simvx.editor.script_ops¶
Script management operations mixin for State.
Module Contents¶
Classes¶
Mixin providing script attach/detach/create/save operations. |
Data¶
API¶
- simvx.editor.script_ops.log¶
‘getLogger(…)’
- class simvx.editor.script_ops.ScriptOps[source]¶
Mixin providing script attach/detach/create/save operations.
Methods in this class are designed to be mixed into State, which provides the workspace, signals, and delegating properties they depend on.
- set_script_text(text: str)[source]¶
Set the code viewport text and sync it to the selected node’s script.
- attach_script(node: simvx.core.Node, path: str, class_name: str = '')[source]¶
Attach a file-based script to node.
Args: node: The node to attach the script to. path: File path (relative to project root). class_name: The Node subclass name defined in the script. If provided,
node.scriptis set to"path::ClassName".