26 lines
672 B
Python
26 lines
672 B
Python
"""Operators."""
|
|
|
|
import bpy
|
|
|
|
class WTDBuildOp(bpy.types.Operator):
|
|
|
|
bl_idname = "wtd_tools.build"
|
|
bl_label = "Build"
|
|
|
|
def execute(self, context):
|
|
if bpy.ops.kabaret.cmds_call(
|
|
actor_name="Flow",
|
|
cmd_name="action_needs_dialog",
|
|
args_json=json.dumps([oid]),
|
|
) == {"FINISHED"}:
|
|
result = json.loads(bpy.context.window_manager.kabaret_ipc_last_result)
|
|
else:
|
|
error = bpy.context.window_manager.kabaret_ipc_last_error
|
|
return {"FINISHED"}
|
|
|
|
|
|
def register() -> None:
|
|
bpy.utils.register_class(WTDBuildOp)
|
|
|
|
def unregister() -> None:
|
|
bpy.utils.unregister_class(WTDBuildOp) |