This repository was archived by the owner on May 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,7 +100,6 @@ jobs:
100100 cp enviro_launcher.exe gui_package/
101101 cp enviro_tools_gui.py gui_package/
102102 cp plugin_src/ds_consts.py gui_package/plugin_src
103- cp plugin_src/ds_utils.py gui_package/plugin_src
104103
105104 cp -r python_embed gui_package/
106105
Original file line number Diff line number Diff line change 1515
1616sys .path .insert (0 , os .getcwd ())
1717
18- from plugin_src .ds_utils import launch_operator_by_name
1918from plugin_src .ds_consts import COMB_IDNAME
2019
2120SCRIPT_DIR = os .path .abspath (os .path .join (os .path .dirname (__file__ )))
@@ -602,6 +601,24 @@ def start_pipeline(self):
602601
603602 # Run the operators
604603 print ("Launching Blender operators..." )
604+
605+ def launch_operator_by_name (op_str ):
606+ """
607+ Launches an operator by name.
608+ :param op_str: The name of the operator.
609+ :type op_str: str
610+ :return: None
611+ """
612+ import bpy
613+ try :
614+ category , operator_name = op_str .split ("." )
615+ f = getattr (getattr (bpy .ops , category ), operator_name )
616+ f ()
617+ except AttributeError :
618+ print (f"Error: Operator { op_str } does not exist." )
619+ except RuntimeError as e :
620+ print (f"Runtime Error: { e } " )
621+
605622 launch_operator_by_name (COMB_IDNAME )
606623
607624 # Disable console capture
You can’t perform that action at this time.
0 commit comments