Added sanity check baseline made by claude.
Also changed the location to a panel in VIEW_3D instead of menu.
This commit is contained in:
1 parent
71b1a61b5c
commit
4617c47ad0
33 files changed
+2771
-52
No files matched your search
@@ -0,0 +1,30 @@
|
||||
"""Operators."""
|
||||
|
||||
import bpy
|
||||
import json
|
||||
|
||||
class WTDGetOidForPath(bpy.types.Operator):
|
||||
|
||||
bl_idname = "wtd_tools.getoidforpath"
|
||||
bl_label = "Get Oid For Open Scene"
|
||||
|
||||
def execute(self, context):
|
||||
oid = ""
|
||||
if bpy.ops.kabaret.cmds_call(
|
||||
actor_name="Flow",
|
||||
cmd_name="getoidforpath",
|
||||
args_json=json.dumps([]),
|
||||
kwargs_json=json.dumps({'path': bpy.data.filepath.replace('\\', '/')}),
|
||||
) == {"FINISHED"}:
|
||||
result = json.loads(bpy.context.window_manager.kabaret_ipc_last_result)
|
||||
self.report({'INFO'}, str(result))
|
||||
else:
|
||||
error = bpy.context.window_manager.kabaret_ipc_last_error
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
def register() -> None:
|
||||
bpy.utils.register_class(WTDGetOidForPath)
|
||||
|
||||
def unregister() -> None:
|
||||
bpy.utils.unregister_class(WTDGetOidForPath)
|
||||
Reference in new issue
Block a user