vibrante-node 2.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- src/core/__init__.py +0 -0
- src/core/engine.py +484 -0
- src/core/events.py +32 -0
- src/core/graph.py +74 -0
- src/core/integrity.py +925 -0
- src/core/loader.py +56 -0
- src/core/manifest.py +910 -0
- src/core/models.py +59 -0
- src/core/persistence.py +27 -0
- src/core/python_to_workflow.py +182 -0
- src/core/registry.py +314 -0
- src/core/workflow_to_python.py +801 -0
- src/main.py +188 -0
- src/models/__init__.py +0 -0
- src/nodes/__init__.py +0 -0
- src/nodes/ai/__init__.py +1 -0
- src/nodes/base.py +174 -0
- src/nodes/builtins/__init__.py +0 -0
- src/nodes/builtins/group_node.py +210 -0
- src/nodes/builtins/nodes.py +452 -0
- src/nodes/print.py +19 -0
- src/nodes/test.py +19 -0
- src/ui/__init__.py +0 -0
- src/ui/canvas/__init__.py +0 -0
- src/ui/canvas/backdrop.py +223 -0
- src/ui/canvas/canvas_search_bar.py +222 -0
- src/ui/canvas/edge.py +98 -0
- src/ui/canvas/mini_map.py +138 -0
- src/ui/canvas/node_search_popup.py +270 -0
- src/ui/canvas/scene.py +1149 -0
- src/ui/canvas/sticky_note.py +123 -0
- src/ui/canvas/view.py +285 -0
- src/ui/code_editor.py +435 -0
- src/ui/export_python_dialog.py +490 -0
- src/ui/gemini_api_dialog.py +41 -0
- src/ui/gemini_chat.py +370 -0
- src/ui/import_python_dialog.py +122 -0
- src/ui/library_panel.py +246 -0
- src/ui/log_panel.py +315 -0
- src/ui/node_builder.py +841 -0
- src/ui/node_widget.py +1009 -0
- src/ui/port_widget.py +116 -0
- src/ui/script_editor.py +53 -0
- src/ui/scripting_console.py +270 -0
- src/ui/settings_window.py +575 -0
- src/ui/window.py +2012 -0
- src/utils/color_manager.py +50 -0
- src/utils/config_manager.py +71 -0
- src/utils/env_manager.py +232 -0
- src/utils/highlighter.py +110 -0
- src/utils/paths.py +30 -0
- src/utils/prism_config.py +300 -0
- src/utils/prism_core.py +80 -0
- src/utils/qt_compat.py +159 -0
- src/utils/runtime.py +80 -0
- vibrante_node/CLA.md +96 -0
- vibrante_node/COMMERCIAL_LICENSE.md +170 -0
- vibrante_node/LICENSE +178 -0
- vibrante_node/LICENSES/AGPL-3.0.txt +661 -0
- vibrante_node/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
- vibrante_node/LICENSES/CC-BY-4.0.txt +396 -0
- vibrante_node/LICENSES/GPL-3.0.txt +674 -0
- vibrante_node/LICENSES/LGPL-3.0.txt +165 -0
- vibrante_node/LICENSES/README.md +65 -0
- vibrante_node/THIRD_PARTY_NOTICES.txt +3277 -0
- vibrante_node/__init__.py +2 -0
- vibrante_node/app.py +60 -0
- vibrante_node/docs/AUTOMATION_API.html +785 -0
- vibrante_node/docs/DEVELOPER.html +891 -0
- vibrante_node/docs/DOCUMENTATION.html +2761 -0
- vibrante_node/docs/LICENSE.txt +35 -0
- vibrante_node/docs/NODE_BUILDER_API.html +1155 -0
- vibrante_node/docs/RELEASE_v1.0.5.html +140 -0
- vibrante_node/docs/RELEASE_v1.1.0.html +163 -0
- vibrante_node/docs/RELEASE_v1.1.5.html +286 -0
- vibrante_node/docs/RELEASE_v1.2.0.html +175 -0
- vibrante_node/docs/RELEASE_v1.3.0.html +168 -0
- vibrante_node/docs/RELEASE_v1.4.0.html +160 -0
- vibrante_node/docs/RELEASE_v1.5.0.html +432 -0
- vibrante_node/docs/RELEASE_v1.6.0.html +293 -0
- vibrante_node/docs/RELEASE_v1.6.1.html +171 -0
- vibrante_node/docs/RELEASE_v1.7.0.html +270 -0
- vibrante_node/docs/RELEASE_v1.8.0.html +201 -0
- vibrante_node/docs/RELEASE_v1.8.1.html +124 -0
- vibrante_node/docs/RELEASE_v1.8.2.html +119 -0
- vibrante_node/docs/RELEASE_v1.8.3.html +125 -0
- vibrante_node/docs/RELEASE_v1.8.4.html +210 -0
- vibrante_node/docs/RELEASE_v1.8.5.html +223 -0
- vibrante_node/docs/RELEASE_v2.0.0.html +284 -0
- vibrante_node/docs/RELEASE_v2.1.0.html +259 -0
- vibrante_node/docs/RELEASE_v2.1.1.html +156 -0
- vibrante_node/docs/RELEASE_v2.2.0.html +369 -0
- vibrante_node/docs/RELEASE_v2.2.1.html +168 -0
- vibrante_node/docs/RELEASE_v2.3.0.html +185 -0
- vibrante_node/docs/RELEASE_v2.4.0.html +446 -0
- vibrante_node/docs/RELEASE_v2.5.0.html +478 -0
- vibrante_node/docs/RELEASE_v2.5.1.html +190 -0
- vibrante_node/docs/USER_GUIDE.html +1407 -0
- vibrante_node/docs/index.html +103 -0
- vibrante_node/docs/portal/01_introduction.html +1177 -0
- vibrante_node/docs/portal/02_getting_started.html +1267 -0
- vibrante_node/docs/portal/03_user_guide.html +1736 -0
- vibrante_node/docs/portal/04_workflow_tutorials.html +1473 -0
- vibrante_node/docs/portal/05_node_development.html +1562 -0
- vibrante_node/docs/portal/06_backend_architecture.html +1373 -0
- vibrante_node/docs/portal/07_frontend_architecture.html +1588 -0
- vibrante_node/docs/portal/08_api_reference.html +2336 -0
- vibrante_node/docs/portal/09_advanced_topics.html +1664 -0
- vibrante_node/docs/portal/10_contribution_guide.html +1263 -0
- vibrante_node/docs/portal/11_troubleshooting.html +1108 -0
- vibrante_node/docs/portal/12_examples_library.html +1498 -0
- vibrante_node/docs/portal/13_general_purpose_automation.html +1472 -0
- vibrante_node/docs/portal/14_custom_nodes_api.html +1960 -0
- vibrante_node/docs/portal/index.html +605 -0
- vibrante_node/docs/portal/integrations_blender.html +605 -0
- vibrante_node/docs/portal/integrations_deadline.html +536 -0
- vibrante_node/docs/portal/integrations_houdini.html +787 -0
- vibrante_node/docs/portal/integrations_maya.html +675 -0
- vibrante_node/docs/portal/integrations_prism.html +628 -0
- vibrante_node/docs/portal/search.json +1 -0
- vibrante_node/docs/validation.json +333 -0
- vibrante_node/examples/arnold_lighting/orchestration_notes.md +45 -0
- vibrante_node/examples/arnold_lighting/prompt.md +47 -0
- vibrante_node/examples/automation/01_linear_chain.py +10 -0
- vibrante_node/examples/automation/02_batch_update_prefix.py +8 -0
- vibrante_node/examples/automation/03_reset_scene.py +5 -0
- vibrante_node/examples/automation/04_batch_execution.py +9 -0
- vibrante_node/examples/automation/05_git_backup.py +6 -0
- vibrante_node/examples/automation/06_reset_math_nodes.py +12 -0
- vibrante_node/examples/automation/07_stress_test_grid.py +8 -0
- vibrante_node/examples/automation/08_scene_summary.py +8 -0
- vibrante_node/examples/automation/09_toggle_bools.py +8 -0
- vibrante_node/examples/automation/10_session_report.py +7 -0
- vibrante_node/examples/automation/11_simple_math_node.py +7 -0
- vibrante_node/examples/cinematic_camera/orchestration_notes.md +56 -0
- vibrante_node/examples/cinematic_camera/prompt.md +50 -0
- vibrante_node/examples/cinematic_explosion/orchestration_notes.md +76 -0
- vibrante_node/examples/cinematic_explosion/prompt.md +47 -0
- vibrante_node/examples/cinematic_explosion/review.md +75 -0
- vibrante_node/examples/dust_wave/orchestration_notes.md +43 -0
- vibrante_node/examples/dust_wave/prompt.md +40 -0
- vibrante_node/examples/nodes/async_delay.py +21 -0
- vibrante_node/examples/nodes/connection_logger.py +25 -0
- vibrante_node/examples/nodes/data_filter.py +19 -0
- vibrante_node/examples/nodes/dict_merge.py +20 -0
- vibrante_node/examples/nodes/dict_summary.py +21 -0
- vibrante_node/examples/nodes/dropdown_selector.py +29 -0
- vibrante_node/examples/nodes/env_reader.py +18 -0
- vibrante_node/examples/nodes/list_item_picker.py +85 -0
- vibrante_node/examples/nodes/list_stats.py +27 -0
- vibrante_node/examples/nodes/logic_threshold.py +23 -0
- vibrante_node/examples/nodes/math_square.py +30 -0
- vibrante_node/examples/nodes/random_list.py +18 -0
- vibrante_node/examples/nodes/reactive_config.py +24 -0
- vibrante_node/examples/nodes/safety_reset.py +31 -0
- vibrante_node/examples/nodes/string_reverse.py +16 -0
- vibrante_node/icons/210429_DeadlineFreeOn10RenderMachines.jpg +0 -0
- vibrante_node/icons/README.md +39 -0
- vibrante_node/icons/blender_icon.png +0 -0
- vibrante_node/icons/braces.png +0 -0
- vibrante_node/icons/braces.svg +1 -0
- vibrante_node/icons/builder.png +0 -0
- vibrante_node/icons/check.png +0 -0
- vibrante_node/icons/check.svg +1 -0
- vibrante_node/icons/chevron-right.svg +3 -0
- vibrante_node/icons/code.png +0 -0
- vibrante_node/icons/code.svg +4 -0
- vibrante_node/icons/computer-window.png +0 -0
- vibrante_node/icons/data.png +0 -0
- vibrante_node/icons/data.svg +5 -0
- vibrante_node/icons/database-search.png +0 -0
- vibrante_node/icons/database-search.svg +5 -0
- vibrante_node/icons/database-zap.png +0 -0
- vibrante_node/icons/database-zap.svg +5 -0
- vibrante_node/icons/database.png +0 -0
- vibrante_node/icons/database.svg +5 -0
- vibrante_node/icons/dice.png +0 -0
- vibrante_node/icons/dice.svg +1 -0
- vibrante_node/icons/divide.svg +5 -0
- vibrante_node/icons/file-input.svg +6 -0
- vibrante_node/icons/file-plus.png +0 -0
- vibrante_node/icons/file-plus.svg +6 -0
- vibrante_node/icons/file-text.png +0 -0
- vibrante_node/icons/file-text.svg +7 -0
- vibrante_node/icons/folder-plus.png +0 -0
- vibrante_node/icons/folder-plus.svg +5 -0
- vibrante_node/icons/folder.png +0 -0
- vibrante_node/icons/folder.svg +3 -0
- vibrante_node/icons/gear.png +0 -0
- vibrante_node/icons/gear.svg +1 -0
- vibrante_node/icons/git-branch.svg +6 -0
- vibrante_node/icons/hash.png +0 -0
- vibrante_node/icons/hash.svg +1 -0
- vibrante_node/icons/houdini.svg +4 -0
- vibrante_node/icons/houdini_icon.png +0 -0
- vibrante_node/icons/http.png +0 -0
- vibrante_node/icons/list-check.png +0 -0
- vibrante_node/icons/list-check.svg +7 -0
- vibrante_node/icons/list-plus.svg +10 -0
- vibrante_node/icons/list.png +0 -0
- vibrante_node/icons/list.svg +8 -0
- vibrante_node/icons/logic.png +0 -0
- vibrante_node/icons/logic.svg +7 -0
- vibrante_node/icons/math.png +0 -0
- vibrante_node/icons/math.svg +4 -0
- vibrante_node/icons/maya_icon.jpg +0 -0
- vibrante_node/icons/message.png +0 -0
- vibrante_node/icons/message.svg +3 -0
- vibrante_node/icons/minus.svg +3 -0
- vibrante_node/icons/multiply.png +0 -0
- vibrante_node/icons/multiply.svg +1 -0
- vibrante_node/icons/online-library.png +0 -0
- vibrante_node/icons/percentage.svg +5 -0
- vibrante_node/icons/plus.png +0 -0
- vibrante_node/icons/plus.svg +1 -0
- vibrante_node/icons/print.png +0 -0
- vibrante_node/icons/print.svg +5 -0
- vibrante_node/icons/prism_icon.png +0 -0
- vibrante_node/icons/refresh.svg +6 -0
- vibrante_node/icons/repeat.svg +6 -0
- vibrante_node/icons/scales.png +0 -0
- vibrante_node/icons/scales.svg +1 -0
- vibrante_node/icons/shuffle.svg +7 -0
- vibrante_node/icons/string.png +0 -0
- vibrante_node/icons/string.svg +5 -0
- vibrante_node/icons/terminal.png +0 -0
- vibrante_node/icons/terminal.svg +1 -0
- vibrante_node/icons/timer.png +0 -0
- vibrante_node/icons/timer.svg +4 -0
- vibrante_node/icons/toggle-switch.svg +5 -0
- vibrante_node/icons/uppercase.png +0 -0
- vibrante_node/icons/uppercase.svg +1 -0
- vibrante_node/icons/variable-get.svg +4 -0
- vibrante_node/icons/variable-set.svg +6 -0
- vibrante_node/icons/variable.png +0 -0
- vibrante_node/icons/variable.svg +5 -0
- vibrante_node/icons/vibrante-node-icon.png +0 -0
- vibrante_node/icons/vibrante-node-logo.png +0 -0
- vibrante_node/icons/vibrante-node-main_logo.png +0 -0
- vibrante_node/icons/vibrante-node-resize_main_logo.png +0 -0
- vibrante_node/logo.png +0 -0
- vibrante_node/mcp_cli.py +36 -0
- vibrante_node/node_examples/Split_String.json +35 -0
- vibrante_node/node_examples/async_delay.json +32 -0
- vibrante_node/node_examples/delay_timer.json +29 -0
- vibrante_node/node_examples/file_reader.json +29 -0
- vibrante_node/node_examples/fruit_selector.json +37 -0
- vibrante_node/node_examples/json_parser.json +29 -0
- vibrante_node/node_examples/line_counter.json +29 -0
- vibrante_node/node_examples/list_append.json +32 -0
- vibrante_node/node_examples/list_images_recursive.json +55 -0
- vibrante_node/node_examples/logic_and.json +34 -0
- vibrante_node/node_examples/logic_compare.json +36 -0
- vibrante_node/node_examples/math_abs.json +29 -0
- vibrante_node/node_examples/math_add.json +32 -0
- vibrante_node/node_examples/reactive_config.json +28 -0
- vibrante_node/node_examples/string_uppercase.json +29 -0
- vibrante_node/nodes/Dropdown_Selector.json +27 -0
- vibrante_node/nodes/add_integers.json +34 -0
- vibrante_node/nodes/blender_action_bake_animation.json +23 -0
- vibrante_node/nodes/blender_action_custom.json +21 -0
- vibrante_node/nodes/blender_action_export_alembic.json +22 -0
- vibrante_node/nodes/blender_action_export_fbx.json +23 -0
- vibrante_node/nodes/blender_action_export_gltf.json +21 -0
- vibrante_node/nodes/blender_action_export_obj.json +19 -0
- vibrante_node/nodes/blender_action_export_usd.json +23 -0
- vibrante_node/nodes/blender_action_import_alembic.json +18 -0
- vibrante_node/nodes/blender_action_import_fbx.json +18 -0
- vibrante_node/nodes/blender_action_import_gltf.json +18 -0
- vibrante_node/nodes/blender_action_import_obj.json +18 -0
- vibrante_node/nodes/blender_action_new_blend.json +18 -0
- vibrante_node/nodes/blender_action_open_blend.json +18 -0
- vibrante_node/nodes/blender_action_render.json +23 -0
- vibrante_node/nodes/blender_action_save_blend.json +18 -0
- vibrante_node/nodes/blender_action_scene_info.json +17 -0
- vibrante_node/nodes/blender_action_set_frame_range.json +20 -0
- vibrante_node/nodes/blender_action_set_render_settings.json +27 -0
- vibrante_node/nodes/blender_get_action_result.json +22 -0
- vibrante_node/nodes/blender_headless.json +86 -0
- vibrante_node/nodes/compare.json +48 -0
- vibrante_node/nodes/console_print.json +29 -0
- vibrante_node/nodes/create_dictionary.json +18 -0
- vibrante_node/nodes/create_folder.json +17 -0
- vibrante_node/nodes/create_list.json +18 -0
- vibrante_node/nodes/deadline_blender_submit.json +38 -0
- vibrante_node/nodes/deadline_houdini_submit.json +38 -0
- vibrante_node/nodes/deadline_job_status.json +28 -0
- vibrante_node/nodes/deadline_maya_submit.json +40 -0
- vibrante_node/nodes/delay_timer.json +26 -0
- vibrante_node/nodes/example_random_float.json +35 -0
- vibrante_node/nodes/file_append.json +18 -0
- vibrante_node/nodes/file_write.json +18 -0
- vibrante_node/nodes/for_loop.json +46 -0
- vibrante_node/nodes/get_dict_value.json +19 -0
- vibrante_node/nodes/get_list_item.json +19 -0
- vibrante_node/nodes/houdini_action_bake_animation.json +20 -0
- vibrante_node/nodes/houdini_action_custom.json +20 -0
- vibrante_node/nodes/houdini_action_export_alembic.json +20 -0
- vibrante_node/nodes/houdini_action_export_camera_alembic.json +20 -0
- vibrante_node/nodes/houdini_action_export_fbx.json +18 -0
- vibrante_node/nodes/houdini_action_import_alembic.json +18 -0
- vibrante_node/nodes/houdini_action_import_camera.json +17 -0
- vibrante_node/nodes/houdini_action_import_fbx.json +18 -0
- vibrante_node/nodes/houdini_action_import_obj.json +18 -0
- vibrante_node/nodes/houdini_action_new_hip.json +16 -0
- vibrante_node/nodes/houdini_action_open_hip.json +17 -0
- vibrante_node/nodes/houdini_action_save_hip.json +17 -0
- vibrante_node/nodes/houdini_action_scene_info.json +16 -0
- vibrante_node/nodes/houdini_action_set_frame_range.json +18 -0
- vibrante_node/nodes/houdini_get_action_result.json +21 -0
- vibrante_node/nodes/houdini_headless.json +85 -0
- vibrante_node/nodes/houdini_scene_snapshot.json +41 -0
- vibrante_node/nodes/http_request.json +76 -0
- vibrante_node/nodes/if_condition.json +45 -0
- vibrante_node/nodes/list_directory.json +17 -0
- vibrante_node/nodes/list_images_recursive.json +41 -0
- vibrante_node/nodes/list_item_picker.json +41 -0
- vibrante_node/nodes/list_length.json +17 -0
- vibrante_node/nodes/logical_gate.json +45 -0
- vibrante_node/nodes/loop_body.json +62 -0
- vibrante_node/nodes/math_add.json +17 -0
- vibrante_node/nodes/math_divide.json +17 -0
- vibrante_node/nodes/math_modulo.json +17 -0
- vibrante_node/nodes/math_multiply.json +36 -0
- vibrante_node/nodes/math_subtract.json +17 -0
- vibrante_node/nodes/maya_action_assign_material.json +18 -0
- vibrante_node/nodes/maya_action_bake_animation.json +21 -0
- vibrante_node/nodes/maya_action_create_render_layer.json +19 -0
- vibrante_node/nodes/maya_action_custom.json +20 -0
- vibrante_node/nodes/maya_action_export_alembic.json +22 -0
- vibrante_node/nodes/maya_action_export_camera_alembic.json +20 -0
- vibrante_node/nodes/maya_action_export_fbx.json +18 -0
- vibrante_node/nodes/maya_action_import_alembic.json +17 -0
- vibrante_node/nodes/maya_action_import_camera.json +17 -0
- vibrante_node/nodes/maya_action_import_fbx.json +17 -0
- vibrante_node/nodes/maya_action_import_obj.json +17 -0
- vibrante_node/nodes/maya_action_list_references.json +16 -0
- vibrante_node/nodes/maya_action_new_scene.json +16 -0
- vibrante_node/nodes/maya_action_open_scene.json +18 -0
- vibrante_node/nodes/maya_action_playblast.json +22 -0
- vibrante_node/nodes/maya_action_reference_alembic.json +18 -0
- vibrante_node/nodes/maya_action_reference_scene.json +18 -0
- vibrante_node/nodes/maya_action_save_scene.json +18 -0
- vibrante_node/nodes/maya_action_scene_info.json +16 -0
- vibrante_node/nodes/maya_action_set_aovs.json +18 -0
- vibrante_node/nodes/maya_action_set_frame_range.json +18 -0
- vibrante_node/nodes/maya_action_set_render_settings.json +23 -0
- vibrante_node/nodes/maya_get_action_result.json +21 -0
- vibrante_node/nodes/maya_headless.json +27 -0
- vibrante_node/nodes/mcp_call_tool.json +19 -0
- vibrante_node/nodes/mcp_list_tools.json +18 -0
- vibrante_node/nodes/mcp_server_init.json +23 -0
- vibrante_node/nodes/message_node.json +32 -0
- vibrante_node/nodes/prism_add_integration.json +49 -0
- vibrante_node/nodes/prism_build_entity.json +45 -0
- vibrante_node/nodes/prism_change_project.json +37 -0
- vibrante_node/nodes/prism_core_info.json +37 -0
- vibrante_node/nodes/prism_core_init.json +46 -0
- vibrante_node/nodes/prism_create_category.json +44 -0
- vibrante_node/nodes/prism_create_entity.json +60 -0
- vibrante_node/nodes/prism_create_playblast.json +56 -0
- vibrante_node/nodes/prism_create_product_version.json +64 -0
- vibrante_node/nodes/prism_create_project.json +50 -0
- vibrante_node/nodes/prism_create_scene_from_preset.json +59 -0
- vibrante_node/nodes/prism_eval.json +42 -0
- vibrante_node/nodes/prism_get_aovs.json +29 -0
- vibrante_node/nodes/prism_get_asset_by_name.json +69 -0
- vibrante_node/nodes/prism_get_asset_type_by_name.json +62 -0
- vibrante_node/nodes/prism_get_asset_types_by_project.json +55 -0
- vibrante_node/nodes/prism_get_assets_by_project.json +41 -0
- vibrante_node/nodes/prism_get_assets_by_type.json +69 -0
- vibrante_node/nodes/prism_get_config.json +48 -0
- vibrante_node/nodes/prism_get_current_scene.json +37 -0
- vibrante_node/nodes/prism_get_departments.json +37 -0
- vibrante_node/nodes/prism_get_entity_info.json +69 -0
- vibrante_node/nodes/prism_get_entity_path.json +69 -0
- vibrante_node/nodes/prism_get_export_path.json +26 -0
- vibrante_node/nodes/prism_get_latest_product_path.json +34 -0
- vibrante_node/nodes/prism_get_media.json +29 -0
- vibrante_node/nodes/prism_get_media_versions.json +33 -0
- vibrante_node/nodes/prism_get_plugin.json +35 -0
- vibrante_node/nodes/prism_get_preset_scenes.json +35 -0
- vibrante_node/nodes/prism_get_product_versions.json +33 -0
- vibrante_node/nodes/prism_get_products.json +29 -0
- vibrante_node/nodes/prism_get_project_by_name.json +55 -0
- vibrante_node/nodes/prism_get_project_config_path.json +26 -0
- vibrante_node/nodes/prism_get_scene_files.json +45 -0
- vibrante_node/nodes/prism_get_scene_path.json +23 -0
- vibrante_node/nodes/prism_get_sequence_by_project.json +48 -0
- vibrante_node/nodes/prism_get_sequences_by_project.json +41 -0
- vibrante_node/nodes/prism_get_shot_by_name.json +62 -0
- vibrante_node/nodes/prism_get_shot_by_sequence.json +55 -0
- vibrante_node/nodes/prism_get_shot_info.json +69 -0
- vibrante_node/nodes/prism_get_shots.json +29 -0
- vibrante_node/nodes/prism_get_shots_by_project_sequence.json +48 -0
- vibrante_node/nodes/prism_get_shots_by_sequence.json +48 -0
- vibrante_node/nodes/prism_get_tasks.json +39 -0
- vibrante_node/nodes/prism_import_product.json +37 -0
- vibrante_node/nodes/prism_list_plugins.json +25 -0
- vibrante_node/nodes/prism_list_projects.json +25 -0
- vibrante_node/nodes/prism_login_token.json +33 -0
- vibrante_node/nodes/prism_monkey_patch.json +46 -0
- vibrante_node/nodes/prism_open_scene.json +33 -0
- vibrante_node/nodes/prism_popup.json +40 -0
- vibrante_node/nodes/prism_register_callback.json +58 -0
- vibrante_node/nodes/prism_save_scene_version.json +90 -0
- vibrante_node/nodes/prism_send_cmd.json +54 -0
- vibrante_node/nodes/prism_set_config.json +55 -0
- vibrante_node/nodes/prism_studio_assign_project.json +43 -0
- vibrante_node/nodes/prism_trigger_callback.json +42 -0
- vibrante_node/nodes/prism_usd_department_layer_path.json +35 -0
- vibrante_node/nodes/prism_usd_entity_path.json +29 -0
- vibrante_node/nodes/prism_usd_sublayer_path.json +41 -0
- vibrante_node/nodes/prism_usd_update_department_layer.json +33 -0
- vibrante_node/nodes/prism_usd_update_sublayer.json +33 -0
- vibrante_node/nodes/python_script.json +17 -0
- vibrante_node/nodes/scene_intent_extractor.json +25 -0
- vibrante_node/nodes/set_dict_value.json +20 -0
- vibrante_node/nodes/string_concat.json +47 -0
- vibrante_node/nodes/string_length.json +16 -0
- vibrante_node/nodes/string_lowercase.json +16 -0
- vibrante_node/nodes/string_replace.json +18 -0
- vibrante_node/nodes/string_split.json +17 -0
- vibrante_node/nodes/string_uppercase.json +16 -0
- vibrante_node/nodes/variable_node.json +42 -0
- vibrante_node/nodes/while_loop.json +18 -0
- vibrante_node/splash.png +0 -0
- vibrante_node/vfx_workflows/01_prism_project_overview.json +492 -0
- vibrante_node/vfx_workflows/02_maya_asset_publish.json +776 -0
- vibrante_node/vfx_workflows/03_multi_shot_alembic_export.json +856 -0
- vibrante_node/vfx_workflows/04_deadline_render_pipeline.json +994 -0
- vibrante_node/vfx_workflows/05_houdini_fx_pipeline.json +1056 -0
- vibrante_node/vfx_workflows/06_blender_multi_format_export.json +1206 -0
- vibrante_node/website_examples/database_query.json +69 -0
- vibrante_node/website_examples/email_notification.json +104 -0
- vibrante_node/website_examples/file_batch_processor.json +62 -0
- vibrante_node/website_examples/folder_monitor.json +55 -0
- vibrante_node/website_examples/hou_sop_chain.json +69 -0
- vibrante_node/website_examples/http_request.json +90 -0
- vibrante_node/website_examples/image_resizer.json +90 -0
- vibrante_node/website_examples/llm_text_generation.json +90 -0
- vibrante_node/website_examples/prism_multi_asset_publisher.json +76 -0
- vibrante_node/website_examples/regex_replace.json +69 -0
- vibrante_node/workflows/If_condition.json +134 -0
- vibrante_node/workflows/Maya_WorkFlow.json +464 -0
- vibrante_node/workflows/asset_intelligence_pipeline.json +259 -0
- vibrante_node/workflows/concat_string_with_loop.json +262 -0
- vibrante_node/workflows/delay_time.json +74 -0
- vibrante_node/workflows/example_workflow_maya_prism_demo.json +503 -0
- vibrante_node/workflows/example_workflow_prism_demo.json +276 -0
- vibrante_node/workflows/example_workflow_prism_demo_02.json +221 -0
- vibrante_node/workflows/extract_FPS_from_maya_scene.json +265 -0
- vibrante_node/workflows/for_each.json +260 -0
- vibrante_node/workflows/get_list_item.json +151 -0
- vibrante_node/workflows/hou_mcp_scene_context_demo.json +67 -0
- vibrante_node/workflows/list_recursive_images.json +103 -0
- vibrante_node/workflows/logic_if_example.json +262 -0
- vibrante_node/workflows/logic_if_with_variables.json +210 -0
- vibrante_node/workflows/loop_break_example.json +197 -0
- vibrante_node/workflows/loop_operation_example.json +382 -0
- vibrante_node/workflows/mcp_list_tools_demo.json +90 -0
- vibrante_node/workflows/prism_assets_workflow.json +131 -0
- vibrante_node/workflows/python_script_node.json +89 -0
- vibrante_node/workflows/run_in_sequence.json +158 -0
- vibrante_node/workflows/scene_intent_pipeline.json +134 -0
- vibrante_node/workflows/scene_planning_pipeline.json +258 -0
- vibrante_node/workflows/semantic_scene_intent.json +96 -0
- vibrante_node/workflows/setup_maya_scene.json +352 -0
- vibrante_node/workflows/tutorial_maya_headless_prism_pipeline.json +593 -0
- vibrante_node/workflows/two_way_switch.json +341 -0
- vibrante_node/workflows/while_loop_class_example.json +192 -0
- vibrante_node/workflows/while_loop_example.json +184 -0
- vibrante_node/workflows/while_loop_retry_example.json +276 -0
- vibrante_node-2.5.1.dist-info/METADATA +715 -0
- vibrante_node-2.5.1.dist-info/RECORD +487 -0
- vibrante_node-2.5.1.dist-info/WHEEL +5 -0
- vibrante_node-2.5.1.dist-info/entry_points.txt +3 -0
- vibrante_node-2.5.1.dist-info/licenses/CLA.md +96 -0
- vibrante_node-2.5.1.dist-info/licenses/COMMERCIAL_LICENSE.md +170 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSE +178 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/AGPL-3.0.txt +661 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0.txt +396 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/GPL-3.0.txt +674 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/LGPL-3.0.txt +165 -0
- vibrante_node-2.5.1.dist-info/licenses/LICENSES/README.md +65 -0
- vibrante_node-2.5.1.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,1960 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<meta name="description" content="Vibrante-Node v2.5.1 — Custom Nodes API">
|
|
7
|
+
<title>Custom Nodes API — Vibrante-Node Docs</title>
|
|
8
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/atom-one-dark.min.css">
|
|
9
|
+
<style>
|
|
10
|
+
/* ── Reset & Variables ─────────────────────────────────────────────────── */
|
|
11
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
12
|
+
:root {
|
|
13
|
+
--bg: #1e1e2e;
|
|
14
|
+
--surface: #181825;
|
|
15
|
+
--surface2: #11111b;
|
|
16
|
+
--border: #313244;
|
|
17
|
+
--text: #cdd6f4;
|
|
18
|
+
--subtext: #a6adc8;
|
|
19
|
+
--muted: #6c7086;
|
|
20
|
+
--lavender: #b4befe;
|
|
21
|
+
--blue: #89b4fa;
|
|
22
|
+
--teal: #94e2d5;
|
|
23
|
+
--green: #a6e3a1;
|
|
24
|
+
--yellow: #f9e2af;
|
|
25
|
+
--peach: #fab387;
|
|
26
|
+
--red: #f38ba8;
|
|
27
|
+
--pink: #f5c2e7;
|
|
28
|
+
--mauve: #cba6f7;
|
|
29
|
+
--sidebar-w: 260px;
|
|
30
|
+
--toc-w: 220px;
|
|
31
|
+
--header-h: 56px;
|
|
32
|
+
--font: 'Segoe UI', system-ui, -apple-system, sans-serif;
|
|
33
|
+
--mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ── Layout ─────────────────────────────────────────────────────────────── */
|
|
37
|
+
html { scroll-behavior: smooth; }
|
|
38
|
+
body {
|
|
39
|
+
font-family: var(--font);
|
|
40
|
+
background: var(--bg);
|
|
41
|
+
color: var(--text);
|
|
42
|
+
line-height: 1.7;
|
|
43
|
+
min-height: 100vh;
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-rows: var(--header-h) 1fr;
|
|
46
|
+
grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
|
|
47
|
+
grid-template-areas:
|
|
48
|
+
"header header header"
|
|
49
|
+
"sidebar content toc";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* ── Header ─────────────────────────────────────────────────────────────── */
|
|
53
|
+
.header {
|
|
54
|
+
grid-area: header;
|
|
55
|
+
position: sticky; top: 0; z-index: 200;
|
|
56
|
+
background: var(--surface2);
|
|
57
|
+
border-bottom: 1px solid var(--border);
|
|
58
|
+
display: flex; align-items: center; gap: 16px;
|
|
59
|
+
padding: 0 24px;
|
|
60
|
+
}
|
|
61
|
+
.header-logo {
|
|
62
|
+
font-weight: 700; font-size: 1.05em;
|
|
63
|
+
color: var(--mauve);
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
white-space: nowrap;
|
|
66
|
+
}
|
|
67
|
+
.header-version {
|
|
68
|
+
font-size: .78em;
|
|
69
|
+
background: var(--border);
|
|
70
|
+
color: var(--subtext);
|
|
71
|
+
padding: 2px 8px; border-radius: 12px;
|
|
72
|
+
}
|
|
73
|
+
.header-spacer { flex: 1; }
|
|
74
|
+
.search-wrap { position: relative; }
|
|
75
|
+
#search-input {
|
|
76
|
+
background: var(--surface);
|
|
77
|
+
border: 1px solid var(--border);
|
|
78
|
+
border-radius: 8px;
|
|
79
|
+
color: var(--text);
|
|
80
|
+
font-family: var(--font);
|
|
81
|
+
font-size: .9em;
|
|
82
|
+
padding: 6px 14px 6px 36px;
|
|
83
|
+
width: 260px;
|
|
84
|
+
outline: none;
|
|
85
|
+
transition: border-color .15s;
|
|
86
|
+
}
|
|
87
|
+
#search-input:focus { border-color: var(--mauve); }
|
|
88
|
+
.search-icon {
|
|
89
|
+
position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
|
|
90
|
+
color: var(--muted); pointer-events: none; font-size: .9em;
|
|
91
|
+
}
|
|
92
|
+
#search-results {
|
|
93
|
+
position: absolute; top: calc(100% + 8px); right: 0;
|
|
94
|
+
width: 380px; max-height: 420px; overflow-y: auto;
|
|
95
|
+
background: var(--surface);
|
|
96
|
+
border: 1px solid var(--border);
|
|
97
|
+
border-radius: 10px;
|
|
98
|
+
box-shadow: 0 8px 32px rgba(0,0,0,.5);
|
|
99
|
+
display: none; z-index: 300;
|
|
100
|
+
}
|
|
101
|
+
#search-results.visible { display: block; }
|
|
102
|
+
.search-result-item {
|
|
103
|
+
padding: 10px 16px;
|
|
104
|
+
border-bottom: 1px solid var(--border);
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
transition: background .1s;
|
|
107
|
+
}
|
|
108
|
+
.search-result-item:last-child { border-bottom: none; }
|
|
109
|
+
.search-result-item:hover { background: var(--bg); }
|
|
110
|
+
.search-result-title { color: var(--blue); font-weight: 600; font-size: .9em; }
|
|
111
|
+
.search-result-excerpt { color: var(--subtext); font-size: .82em; margin-top: 2px; line-height: 1.4; }
|
|
112
|
+
.search-no-results { padding: 16px; color: var(--muted); text-align: center; font-size: .9em; }
|
|
113
|
+
|
|
114
|
+
/* ── Sidebar ─────────────────────────────────────────────────────────────── */
|
|
115
|
+
.sidebar {
|
|
116
|
+
grid-area: sidebar;
|
|
117
|
+
position: sticky; top: var(--header-h);
|
|
118
|
+
height: calc(100vh - var(--header-h));
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
background: var(--surface);
|
|
121
|
+
border-right: 1px solid var(--border);
|
|
122
|
+
padding: 20px 0;
|
|
123
|
+
scrollbar-width: thin;
|
|
124
|
+
scrollbar-color: var(--border) transparent;
|
|
125
|
+
}
|
|
126
|
+
.sidebar::-webkit-scrollbar { width: 4px; }
|
|
127
|
+
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
|
|
128
|
+
|
|
129
|
+
.sidebar-group { margin-bottom: 4px; }
|
|
130
|
+
.sidebar-group-title {
|
|
131
|
+
font-size: .7em;
|
|
132
|
+
text-transform: uppercase;
|
|
133
|
+
letter-spacing: .1em;
|
|
134
|
+
color: var(--muted);
|
|
135
|
+
padding: 10px 20px 4px;
|
|
136
|
+
font-weight: 600;
|
|
137
|
+
}
|
|
138
|
+
.sidebar-link {
|
|
139
|
+
display: flex; align-items: center; gap: 8px;
|
|
140
|
+
padding: 6px 20px;
|
|
141
|
+
color: var(--subtext);
|
|
142
|
+
text-decoration: none;
|
|
143
|
+
font-size: .88em;
|
|
144
|
+
border-left: 3px solid transparent;
|
|
145
|
+
transition: all .12s;
|
|
146
|
+
line-height: 1.3;
|
|
147
|
+
}
|
|
148
|
+
.sidebar-link:hover { color: var(--text); background: var(--bg); }
|
|
149
|
+
.sidebar-link.active {
|
|
150
|
+
color: var(--mauve);
|
|
151
|
+
border-left-color: var(--mauve);
|
|
152
|
+
background: rgba(180,190,254,.06);
|
|
153
|
+
font-weight: 600;
|
|
154
|
+
}
|
|
155
|
+
.sidebar-num {
|
|
156
|
+
font-size: .7em;
|
|
157
|
+
color: var(--muted);
|
|
158
|
+
background: var(--border);
|
|
159
|
+
border-radius: 4px;
|
|
160
|
+
padding: 1px 5px;
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
}
|
|
163
|
+
.sidebar-divider {
|
|
164
|
+
border: none;
|
|
165
|
+
border-top: 1px solid var(--border);
|
|
166
|
+
margin: 12px 16px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ── Content ─────────────────────────────────────────────────────────────── */
|
|
170
|
+
.content {
|
|
171
|
+
grid-area: content;
|
|
172
|
+
min-width: 0;
|
|
173
|
+
padding: 40px 48px 80px;
|
|
174
|
+
max-width: 860px;
|
|
175
|
+
}
|
|
176
|
+
.content-inner { max-width: 820px; }
|
|
177
|
+
|
|
178
|
+
/* Breadcrumb */
|
|
179
|
+
.breadcrumb {
|
|
180
|
+
font-size: .8em;
|
|
181
|
+
color: var(--muted);
|
|
182
|
+
margin-bottom: 28px;
|
|
183
|
+
display: flex; align-items: center; gap: 6px;
|
|
184
|
+
}
|
|
185
|
+
.breadcrumb a { color: var(--blue); text-decoration: none; }
|
|
186
|
+
.breadcrumb a:hover { text-decoration: underline; }
|
|
187
|
+
.breadcrumb-sep { color: var(--border); }
|
|
188
|
+
|
|
189
|
+
/* Typography */
|
|
190
|
+
h1 { font-size: 2em; color: var(--mauve); border-bottom: 2px solid var(--border); padding-bottom: 12px; margin: 20px 0 20px; }
|
|
191
|
+
h2 { font-size: 1.45em; color: var(--blue); margin: 40px 0 14px; padding-top: 8px; }
|
|
192
|
+
h3 { font-size: 1.15em; color: var(--teal); margin: 28px 0 10px; }
|
|
193
|
+
h4 { font-size: 1em; color: var(--pink); margin: 20px 0 8px; }
|
|
194
|
+
h5 { font-size: .95em; color: var(--yellow); margin: 16px 0 6px; }
|
|
195
|
+
p { margin-bottom: 16px; color: var(--text); }
|
|
196
|
+
a { color: var(--blue); }
|
|
197
|
+
a:hover { text-decoration: underline; }
|
|
198
|
+
strong { color: var(--peach); }
|
|
199
|
+
em { color: var(--yellow); font-style: italic; }
|
|
200
|
+
|
|
201
|
+
ul, ol { margin: 10px 0 16px 24px; }
|
|
202
|
+
li { margin-bottom: 6px; }
|
|
203
|
+
li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }
|
|
204
|
+
|
|
205
|
+
blockquote {
|
|
206
|
+
border-left: 4px solid var(--mauve);
|
|
207
|
+
padding: 10px 20px;
|
|
208
|
+
margin: 16px 0;
|
|
209
|
+
background: rgba(180,190,254,.05);
|
|
210
|
+
border-radius: 0 8px 8px 0;
|
|
211
|
+
color: var(--subtext);
|
|
212
|
+
}
|
|
213
|
+
blockquote strong { color: var(--mauve); }
|
|
214
|
+
|
|
215
|
+
hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
|
|
216
|
+
|
|
217
|
+
/* Code */
|
|
218
|
+
code {
|
|
219
|
+
background: var(--surface2);
|
|
220
|
+
color: var(--red);
|
|
221
|
+
padding: 2px 7px; border-radius: 5px;
|
|
222
|
+
font-family: var(--mono); font-size: .87em;
|
|
223
|
+
}
|
|
224
|
+
pre {
|
|
225
|
+
background: var(--surface2) !important;
|
|
226
|
+
border: 1px solid var(--border);
|
|
227
|
+
border-radius: 10px;
|
|
228
|
+
padding: 20px 22px;
|
|
229
|
+
overflow-x: auto;
|
|
230
|
+
margin: 16px 0 22px;
|
|
231
|
+
position: relative;
|
|
232
|
+
}
|
|
233
|
+
pre code {
|
|
234
|
+
background: none !important;
|
|
235
|
+
color: inherit !important;
|
|
236
|
+
padding: 0; font-size: .9em;
|
|
237
|
+
border-radius: 0;
|
|
238
|
+
}
|
|
239
|
+
/* Copy button */
|
|
240
|
+
.copy-btn {
|
|
241
|
+
position: absolute; top: 10px; right: 12px;
|
|
242
|
+
background: var(--border);
|
|
243
|
+
color: var(--subtext);
|
|
244
|
+
border: none; border-radius: 5px;
|
|
245
|
+
padding: 3px 10px; font-size: .75em;
|
|
246
|
+
cursor: pointer; transition: all .12s;
|
|
247
|
+
font-family: var(--font);
|
|
248
|
+
}
|
|
249
|
+
.copy-btn:hover { background: var(--mauve); color: var(--surface2); }
|
|
250
|
+
.copy-btn.copied { background: var(--green); color: var(--surface2); }
|
|
251
|
+
|
|
252
|
+
/* Tables */
|
|
253
|
+
table { border-collapse: collapse; width: 100%; margin: 16px 0 22px; font-size: .9em; }
|
|
254
|
+
th { background: var(--border); color: var(--mauve); padding: 10px 14px; text-align: left; font-weight: 600; }
|
|
255
|
+
td { border-top: 1px solid var(--border); padding: 9px 14px; color: var(--text); }
|
|
256
|
+
tr:nth-child(even) td { background: rgba(17,17,27,.4); }
|
|
257
|
+
td code { font-size: .85em; }
|
|
258
|
+
|
|
259
|
+
/* Callout boxes */
|
|
260
|
+
.callout {
|
|
261
|
+
border-radius: 8px;
|
|
262
|
+
padding: 14px 18px;
|
|
263
|
+
margin: 16px 0 22px;
|
|
264
|
+
border-left: 4px solid;
|
|
265
|
+
}
|
|
266
|
+
.callout-note { background: rgba(137,180,250,.08); border-color: var(--blue); }
|
|
267
|
+
.callout-tip { background: rgba(166,227,161,.08); border-color: var(--green); }
|
|
268
|
+
.callout-warning { background: rgba(249,226,175,.08); border-color: var(--yellow); }
|
|
269
|
+
.callout-danger { background: rgba(243,139,168,.08); border-color: var(--red); }
|
|
270
|
+
.callout-title { font-weight: 700; font-size: .85em; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
|
|
271
|
+
.callout-note .callout-title { color: var(--blue); }
|
|
272
|
+
.callout-tip .callout-title { color: var(--green); }
|
|
273
|
+
.callout-warning .callout-title { color: var(--yellow); }
|
|
274
|
+
.callout-danger .callout-title { color: var(--red); }
|
|
275
|
+
|
|
276
|
+
/* Validation badges */
|
|
277
|
+
.val-badge {
|
|
278
|
+
display: inline-block; font-size: .78em; font-weight: 600;
|
|
279
|
+
padding: 4px 12px; border-radius: 20px; margin-bottom: 18px;
|
|
280
|
+
border: 1px solid transparent; letter-spacing: .02em;
|
|
281
|
+
}
|
|
282
|
+
.val-badge-ok { background: rgba(166,227,161,.12); border-color: var(--green); color: var(--green); }
|
|
283
|
+
.val-badge-warn { background: rgba(249,226,175,.12); border-color: var(--yellow); color: var(--yellow); }
|
|
284
|
+
.val-badge-error { background: rgba(243,139,168,.12); border-color: var(--red); color: var(--red); }
|
|
285
|
+
.val-badge-unknown { background: rgba(108,112,134,.12); border-color: #6c7086; color: #6c7086; }
|
|
286
|
+
|
|
287
|
+
/* Prev/Next navigation */
|
|
288
|
+
.page-nav {
|
|
289
|
+
display: flex; justify-content: space-between;
|
|
290
|
+
margin-top: 60px; padding-top: 24px;
|
|
291
|
+
border-top: 1px solid var(--border);
|
|
292
|
+
gap: 16px;
|
|
293
|
+
}
|
|
294
|
+
.page-nav-link {
|
|
295
|
+
display: flex; flex-direction: column;
|
|
296
|
+
text-decoration: none;
|
|
297
|
+
padding: 14px 20px;
|
|
298
|
+
background: var(--surface);
|
|
299
|
+
border: 1px solid var(--border);
|
|
300
|
+
border-radius: 10px;
|
|
301
|
+
min-width: 200px;
|
|
302
|
+
transition: border-color .15s;
|
|
303
|
+
max-width: 48%;
|
|
304
|
+
}
|
|
305
|
+
.page-nav-link:hover { border-color: var(--mauve); }
|
|
306
|
+
.page-nav-label { font-size: .75em; color: var(--muted); margin-bottom: 4px; }
|
|
307
|
+
.page-nav-title { color: var(--blue); font-weight: 600; font-size: .95em; }
|
|
308
|
+
.page-nav-link.prev .page-nav-label::before { content: '← '; }
|
|
309
|
+
.page-nav-link.next { margin-left: auto; text-align: right; }
|
|
310
|
+
.page-nav-link.next .page-nav-label::after { content: ' →'; }
|
|
311
|
+
|
|
312
|
+
/* ── TOC (right panel) ───────────────────────────────────────────────────── */
|
|
313
|
+
.toc {
|
|
314
|
+
grid-area: toc;
|
|
315
|
+
position: sticky; top: var(--header-h);
|
|
316
|
+
height: calc(100vh - var(--header-h));
|
|
317
|
+
overflow-y: auto;
|
|
318
|
+
padding: 28px 16px 28px 8px;
|
|
319
|
+
scrollbar-width: thin;
|
|
320
|
+
scrollbar-color: var(--border) transparent;
|
|
321
|
+
}
|
|
322
|
+
.toc-title {
|
|
323
|
+
font-size: .72em;
|
|
324
|
+
text-transform: uppercase;
|
|
325
|
+
letter-spacing: .1em;
|
|
326
|
+
color: var(--muted);
|
|
327
|
+
font-weight: 600;
|
|
328
|
+
margin-bottom: 12px;
|
|
329
|
+
padding-left: 8px;
|
|
330
|
+
}
|
|
331
|
+
.toc-link {
|
|
332
|
+
display: block;
|
|
333
|
+
padding: 4px 8px;
|
|
334
|
+
color: var(--subtext);
|
|
335
|
+
text-decoration: none;
|
|
336
|
+
font-size: .82em;
|
|
337
|
+
border-left: 2px solid transparent;
|
|
338
|
+
border-radius: 0 4px 4px 0;
|
|
339
|
+
transition: all .12s;
|
|
340
|
+
line-height: 1.35;
|
|
341
|
+
margin-bottom: 1px;
|
|
342
|
+
}
|
|
343
|
+
.toc-link:hover { color: var(--text); border-left-color: var(--border); }
|
|
344
|
+
.toc-link.active { color: var(--mauve); border-left-color: var(--mauve); background: rgba(180,190,254,.05); }
|
|
345
|
+
.toc-link.toc-h3 { padding-left: 20px; font-size: .79em; }
|
|
346
|
+
.toc-link.toc-h4 { padding-left: 32px; font-size: .76em; color: var(--muted); }
|
|
347
|
+
|
|
348
|
+
/* ── Responsive ──────────────────────────────────────────────────────────── */
|
|
349
|
+
@media (max-width: 1100px) {
|
|
350
|
+
body { grid-template-columns: var(--sidebar-w) 1fr 0; }
|
|
351
|
+
.toc { display: none; }
|
|
352
|
+
}
|
|
353
|
+
@media (max-width: 760px) {
|
|
354
|
+
body { grid-template-columns: 0 1fr 0; grid-template-rows: var(--header-h) 1fr; }
|
|
355
|
+
.sidebar { display: none; }
|
|
356
|
+
.content { padding: 24px 20px 60px; }
|
|
357
|
+
#search-input { width: 180px; }
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* ── Index / landing page ────────────────────────────────────────────────── */
|
|
361
|
+
.hero { text-align: center; padding: 60px 0 48px; }
|
|
362
|
+
.hero h1 { border: none; font-size: 2.8em; }
|
|
363
|
+
.hero .tagline { color: var(--subtext); font-size: 1.15em; margin-top: 10px; }
|
|
364
|
+
.hero .version-badge {
|
|
365
|
+
display: inline-block;
|
|
366
|
+
background: var(--border); color: var(--mauve);
|
|
367
|
+
padding: 4px 14px; border-radius: 20px; font-size: .85em;
|
|
368
|
+
margin-top: 14px;
|
|
369
|
+
}
|
|
370
|
+
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 36px; }
|
|
371
|
+
.doc-card {
|
|
372
|
+
background: var(--surface);
|
|
373
|
+
border: 1px solid var(--border);
|
|
374
|
+
border-radius: 12px;
|
|
375
|
+
padding: 20px 24px;
|
|
376
|
+
text-decoration: none;
|
|
377
|
+
color: var(--text);
|
|
378
|
+
transition: border-color .15s, background .15s;
|
|
379
|
+
display: block;
|
|
380
|
+
}
|
|
381
|
+
.doc-card:hover { border-color: var(--mauve); background: rgba(180,190,254,.04); }
|
|
382
|
+
.doc-card-num { font-size: .72em; color: var(--muted); margin-bottom: 4px; }
|
|
383
|
+
.doc-card-title { color: var(--blue); font-weight: 700; font-size: 1em; margin-bottom: 6px; }
|
|
384
|
+
.doc-card-desc { color: var(--subtext); font-size: .85em; line-height: 1.5; }
|
|
385
|
+
.group-title { color: var(--teal); font-size: 1.1em; font-weight: 600; margin: 32px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
|
|
386
|
+
</style>
|
|
387
|
+
<span id="portal-base" data-base="" style="display:none"></span>
|
|
388
|
+
</head>
|
|
389
|
+
<body>
|
|
390
|
+
|
|
391
|
+
<!-- ── Header ─────────────────────────────────────────────────────────── -->
|
|
392
|
+
<header class="header">
|
|
393
|
+
<a class="header-logo" href="index.html">Vibrante-Node</a>
|
|
394
|
+
<span class="header-version">v2.5.1</span>
|
|
395
|
+
<div class="header-spacer"></div>
|
|
396
|
+
<div class="search-wrap">
|
|
397
|
+
<span class="search-icon">🔍</span>
|
|
398
|
+
<input id="search-input" type="text" placeholder="Search docs… (/)" autocomplete="off" spellcheck="false">
|
|
399
|
+
<div id="search-results"></div>
|
|
400
|
+
</div>
|
|
401
|
+
</header>
|
|
402
|
+
|
|
403
|
+
<!-- ── Sidebar ────────────────────────────────────────────────────────── -->
|
|
404
|
+
<nav class="sidebar">
|
|
405
|
+
<div class="sidebar-group">
|
|
406
|
+
<div class="sidebar-group-title">Overview</div>
|
|
407
|
+
<a class="sidebar-link" href="01_introduction.html"><span class="sidebar-num">01</span>Introduction</a>
|
|
408
|
+
<a class="sidebar-link" href="02_getting_started.html"><span class="sidebar-num">02</span>Getting Started</a>
|
|
409
|
+
</div>
|
|
410
|
+
<div class="sidebar-group">
|
|
411
|
+
<div class="sidebar-group-title">Using the App</div>
|
|
412
|
+
<a class="sidebar-link" href="03_user_guide.html"><span class="sidebar-num">03</span>User Guide</a>
|
|
413
|
+
<a class="sidebar-link" href="04_workflow_tutorials.html"><span class="sidebar-num">04</span>Workflow Tutorials</a>
|
|
414
|
+
</div>
|
|
415
|
+
<div class="sidebar-group">
|
|
416
|
+
<div class="sidebar-group-title">Developing Nodes</div>
|
|
417
|
+
<a class="sidebar-link" href="05_node_development.html"><span class="sidebar-num">05</span>Node Development Guide</a>
|
|
418
|
+
<a class="sidebar-link active" href="14_custom_nodes_api.html"><span class="sidebar-num">14</span>Custom Nodes API</a>
|
|
419
|
+
<a class="sidebar-link" href="08_api_reference.html"><span class="sidebar-num">08</span>API Reference</a>
|
|
420
|
+
</div>
|
|
421
|
+
<div class="sidebar-group">
|
|
422
|
+
<div class="sidebar-group-title">Architecture</div>
|
|
423
|
+
<a class="sidebar-link" href="06_backend_architecture.html"><span class="sidebar-num">06</span>Backend Architecture</a>
|
|
424
|
+
<a class="sidebar-link" href="07_frontend_architecture.html"><span class="sidebar-num">07</span>Frontend Architecture</a>
|
|
425
|
+
</div>
|
|
426
|
+
<div class="sidebar-group">
|
|
427
|
+
<div class="sidebar-group-title">Advanced</div>
|
|
428
|
+
<a class="sidebar-link" href="09_advanced_topics.html"><span class="sidebar-num">09</span>Advanced Topics</a>
|
|
429
|
+
<a class="sidebar-link" href="10_contribution_guide.html"><span class="sidebar-num">10</span>Contribution Guide</a>
|
|
430
|
+
</div>
|
|
431
|
+
<div class="sidebar-group">
|
|
432
|
+
<div class="sidebar-group-title">Reference</div>
|
|
433
|
+
<a class="sidebar-link" href="11_troubleshooting.html"><span class="sidebar-num">11</span>Troubleshooting</a>
|
|
434
|
+
<a class="sidebar-link" href="12_examples_library.html"><span class="sidebar-num">12</span>Examples Library</a>
|
|
435
|
+
<a class="sidebar-link" href="13_general_purpose_automation.html"><span class="sidebar-num">13</span>General Purpose Automation</a>
|
|
436
|
+
</div>
|
|
437
|
+
|
|
438
|
+
</nav>
|
|
439
|
+
|
|
440
|
+
<!-- ── Main content ───────────────────────────────────────────────────── -->
|
|
441
|
+
<main class="content">
|
|
442
|
+
<div class="content-inner">
|
|
443
|
+
<nav class="breadcrumb"><a href="index.html">Docs</a><span class="breadcrumb-sep">›</span><span>Custom Nodes API</span></nav>
|
|
444
|
+
<div class="val-badge val-badge-ok" title="Verified against source code">✓ Verified</div>
|
|
445
|
+
<p># Custom Nodes SDK / API Reference — Vibrante-Node v2.5.0</p>
|
|
446
|
+
<blockquote>
|
|
447
|
+
<p><strong>Distribution note (2.5.0):</strong> <code>plugins/houdini/</code> is not shipped in the PyPI<br />
|
|
448
|
+
wheels or source distributions. Install it from the source repository before<br />
|
|
449
|
+
following this page.</p>
|
|
450
|
+
</blockquote>
|
|
451
|
+
<p>This document is the authoritative reference for every class, method, attribute,<br />
|
|
452
|
+
and hook exposed to custom node authors. It covers the full lifecycle from<br />
|
|
453
|
+
<code>__init__</code> through execution, persistence, dynamic ports, and packaging.</p>
|
|
454
|
+
<hr />
|
|
455
|
+
<h2 id="table-of-contents">Table of Contents</h2>
|
|
456
|
+
<ol>
|
|
457
|
+
<li><a href="#1-basenode-class-reference">BaseNode Class Reference</a></li>
|
|
458
|
+
<li><a href="#2-port-class-reference">Port Class Reference</a></li>
|
|
459
|
+
<li><a href="#3-exec-pin-mechanics">Exec Pin Mechanics</a></li>
|
|
460
|
+
<li><a href="#4-set_output-reactive-system">set_output() Reactive System</a></li>
|
|
461
|
+
<li><a href="#5-clear_outputs-call-sequence">clear_outputs() Call Sequence</a></li>
|
|
462
|
+
<li><a href="#6-is_stopped-cancellation">is_stopped() Cancellation</a></li>
|
|
463
|
+
<li><a href="#7-restore_from_parameters">restore_from_parameters()</a></li>
|
|
464
|
+
<li><a href="#8-on_parameter_changed-hook">on_parameter_changed() Hook</a></li>
|
|
465
|
+
<li><a href="#9-on_plug--on_unplug-hooks">on_plug / on_unplug Hooks</a></li>
|
|
466
|
+
<li><a href="#10-node-lifecycle">Node Lifecycle</a></li>
|
|
467
|
+
<li><a href="#11-json-schema-reference">JSON Schema Reference</a></li>
|
|
468
|
+
<li><a href="#12-python_code-compilation">python_code Compilation</a></li>
|
|
469
|
+
<li><a href="#13-register_node-function">register_node() Function</a></li>
|
|
470
|
+
<li><a href="#14-exec-flow-semantics">Exec Flow Semantics</a></li>
|
|
471
|
+
<li><a href="#15-multiple-exec-outputs">Multiple Exec Outputs</a></li>
|
|
472
|
+
<li><a href="#16-groupnode-pattern">GroupNode Pattern</a></li>
|
|
473
|
+
<li><a href="#17-quick-reference-tables">Quick-Reference Tables</a></li>
|
|
474
|
+
<li><a href="#18-packaging-node-plugins">Packaging Node Plugins</a></li>
|
|
475
|
+
<li><a href="#19-distributing-nodes">Distributing Nodes</a></li>
|
|
476
|
+
</ol>
|
|
477
|
+
<hr />
|
|
478
|
+
<h2 id="1-basenode-class-reference">1. BaseNode Class Reference</h2>
|
|
479
|
+
<pre><code class="language-python">from src.nodes.base import BaseNode
|
|
480
|
+
</code></pre>
|
|
481
|
+
<p><code>BaseNode</code> is an abstract class. Every custom node must inherit from it and<br />
|
|
482
|
+
implement <code>execute()</code>.</p>
|
|
483
|
+
<h3 id="class-attributes">Class Attributes</h3>
|
|
484
|
+
<table>
|
|
485
|
+
<thead>
|
|
486
|
+
<tr>
|
|
487
|
+
<th>Attribute</th>
|
|
488
|
+
<th>Type</th>
|
|
489
|
+
<th>Default</th>
|
|
490
|
+
<th>Description</th>
|
|
491
|
+
</tr>
|
|
492
|
+
</thead>
|
|
493
|
+
<tbody>
|
|
494
|
+
<tr>
|
|
495
|
+
<td><code>name</code></td>
|
|
496
|
+
<td><code>str</code></td>
|
|
497
|
+
<td><code>"BaseNode"</code></td>
|
|
498
|
+
<td>Must match <code>node_id</code> in the JSON file. Used as the primary key in the registry.</td>
|
|
499
|
+
</tr>
|
|
500
|
+
<tr>
|
|
501
|
+
<td><code>description</code></td>
|
|
502
|
+
<td><code>str</code></td>
|
|
503
|
+
<td><code>""</code></td>
|
|
504
|
+
<td>Human-readable description shown in the library and node tooltip.</td>
|
|
505
|
+
</tr>
|
|
506
|
+
<tr>
|
|
507
|
+
<td><code>category</code></td>
|
|
508
|
+
<td><code>str</code></td>
|
|
509
|
+
<td><code>"General"</code></td>
|
|
510
|
+
<td>Groups the node in the library panel.</td>
|
|
511
|
+
</tr>
|
|
512
|
+
<tr>
|
|
513
|
+
<td><code>icon_path</code></td>
|
|
514
|
+
<td><code>Optional[str]</code></td>
|
|
515
|
+
<td><code>None</code></td>
|
|
516
|
+
<td>Relative path from app root to an SVG or PNG icon.</td>
|
|
517
|
+
</tr>
|
|
518
|
+
<tr>
|
|
519
|
+
<td><code>memory</code></td>
|
|
520
|
+
<td><code>Dict[str, Any]</code></td>
|
|
521
|
+
<td><code>{}</code></td>
|
|
522
|
+
<td><strong>Class-level</strong> shared dict. Cleared to <code>{}</code> at the start of each pipeline run. All instances see the same dict within a run.</td>
|
|
523
|
+
</tr>
|
|
524
|
+
<tr>
|
|
525
|
+
<td><code>node_id</code></td>
|
|
526
|
+
<td><code>str</code></td>
|
|
527
|
+
<td>(set by registry)</td>
|
|
528
|
+
<td>Set by <code>NodeRegistry</code> at registration time. Mirrors <code>name</code> for JSON-defined nodes.</td>
|
|
529
|
+
</tr>
|
|
530
|
+
</tbody>
|
|
531
|
+
</table>
|
|
532
|
+
<h3 id="instance-attributes">Instance Attributes</h3>
|
|
533
|
+
<table>
|
|
534
|
+
<thead>
|
|
535
|
+
<tr>
|
|
536
|
+
<th>Attribute</th>
|
|
537
|
+
<th>Type</th>
|
|
538
|
+
<th>Description</th>
|
|
539
|
+
</tr>
|
|
540
|
+
</thead>
|
|
541
|
+
<tbody>
|
|
542
|
+
<tr>
|
|
543
|
+
<td><code>inputs</code></td>
|
|
544
|
+
<td><code>Dict[str, Port]</code></td>
|
|
545
|
+
<td>All input ports, keyed by port name. Populated in <code>__init__</code>.</td>
|
|
546
|
+
</tr>
|
|
547
|
+
<tr>
|
|
548
|
+
<td><code>outputs</code></td>
|
|
549
|
+
<td><code>Dict[str, Port]</code></td>
|
|
550
|
+
<td>All output ports, keyed by port name. Populated in <code>__init__</code>.</td>
|
|
551
|
+
</tr>
|
|
552
|
+
<tr>
|
|
553
|
+
<td><code>parameters</code></td>
|
|
554
|
+
<td><code>Dict[str, Any]</code></td>
|
|
555
|
+
<td>Persistent key/value store. Widget values, output values, and internal state all live here.</td>
|
|
556
|
+
</tr>
|
|
557
|
+
<tr>
|
|
558
|
+
<td><code>parameter_types</code></td>
|
|
559
|
+
<td><code>Dict[str, Type]</code></td>
|
|
560
|
+
<td>Optional type hints per parameter key (used by <code>add_parameter()</code>).</td>
|
|
561
|
+
</tr>
|
|
562
|
+
</tbody>
|
|
563
|
+
</table>
|
|
564
|
+
<h3 id="internal-hooks-do-not-set-manually">Internal Hooks (do not set manually)</h3>
|
|
565
|
+
<p>These are set by the engine and UI at runtime. They are documented here for<br />
|
|
566
|
+
completeness but you should never assign to them directly in your node.</p>
|
|
567
|
+
<table>
|
|
568
|
+
<thead>
|
|
569
|
+
<tr>
|
|
570
|
+
<th>Attribute</th>
|
|
571
|
+
<th>Set by</th>
|
|
572
|
+
<th>Purpose</th>
|
|
573
|
+
</tr>
|
|
574
|
+
</thead>
|
|
575
|
+
<tbody>
|
|
576
|
+
<tr>
|
|
577
|
+
<td><code>_on_log</code></td>
|
|
578
|
+
<td>Engine</td>
|
|
579
|
+
<td>Routes <code>log_*</code> calls to the log panel signal.</td>
|
|
580
|
+
</tr>
|
|
581
|
+
<tr>
|
|
582
|
+
<td><code>_pending_logs</code></td>
|
|
583
|
+
<td>BaseNode</td>
|
|
584
|
+
<td>Buffer for log calls made before <code>_on_log</code> is wired.</td>
|
|
585
|
+
</tr>
|
|
586
|
+
<tr>
|
|
587
|
+
<td><code>_on_output</code></td>
|
|
588
|
+
<td>Engine</td>
|
|
589
|
+
<td>Called by <code>set_output()</code> to propagate values and trigger exec chains.</td>
|
|
590
|
+
</tr>
|
|
591
|
+
<tr>
|
|
592
|
+
<td><code>_check_stopped</code></td>
|
|
593
|
+
<td>Engine</td>
|
|
594
|
+
<td>Returns <code>True</code> if the user clicked Stop.</td>
|
|
595
|
+
</tr>
|
|
596
|
+
<tr>
|
|
597
|
+
<td><code>_on_ports_changed</code></td>
|
|
598
|
+
<td>UI</td>
|
|
599
|
+
<td>Called by <code>rebuild_ports()</code> to refresh the canvas widget.</td>
|
|
600
|
+
</tr>
|
|
601
|
+
<tr>
|
|
602
|
+
<td><code>_is_port_connected</code></td>
|
|
603
|
+
<td>UI</td>
|
|
604
|
+
<td>Returns <code>True</code> if a named port has a connected wire.</td>
|
|
605
|
+
</tr>
|
|
606
|
+
<tr>
|
|
607
|
+
<td><code>_on_dropdown_options_changed</code></td>
|
|
608
|
+
<td>UI</td>
|
|
609
|
+
<td>Called by <code>set_parameter()</code> when a dropdown's option list changes.</td>
|
|
610
|
+
</tr>
|
|
611
|
+
</tbody>
|
|
612
|
+
</table>
|
|
613
|
+
<hr />
|
|
614
|
+
<h3 id="constructor">Constructor</h3>
|
|
615
|
+
<pre><code class="language-python">def __init__(self, use_exec: bool = True)
|
|
616
|
+
</code></pre>
|
|
617
|
+
<p><strong>Parameters:</strong></p>
|
|
618
|
+
<ul>
|
|
619
|
+
<li><code>use_exec</code> — When <code>True</code> (the default), automatically adds <code>exec_in</code> (input)<br />
|
|
620
|
+
and <code>exec_out</code> (output) ports of data_type <code>exec</code>. Pass <code>False</code> for<br />
|
|
621
|
+
data-only nodes.</li>
|
|
622
|
+
</ul>
|
|
623
|
+
<p><strong>You must call <code>super().__init__()</code> as the very first line of your <code>__init__</code>.</strong><br />
|
|
624
|
+
Do not pass arguments unless you intentionally want <code>use_exec=False</code>:</p>
|
|
625
|
+
<pre><code class="language-python">def __init__(self):
|
|
626
|
+
super().__init__() # use_exec=True (default)
|
|
627
|
+
# ... add your ports here
|
|
628
|
+
</code></pre>
|
|
629
|
+
<pre><code class="language-python">def __init__(self):
|
|
630
|
+
super().__init__(use_exec=False) # no exec pins
|
|
631
|
+
# ... add your ports here
|
|
632
|
+
</code></pre>
|
|
633
|
+
<hr />
|
|
634
|
+
<h3 id="port-management-methods">Port Management Methods</h3>
|
|
635
|
+
<h4 id="add_input">add_input</h4>
|
|
636
|
+
<pre><code class="language-python">def add_input(
|
|
637
|
+
self,
|
|
638
|
+
name: str,
|
|
639
|
+
data_type: str = "any",
|
|
640
|
+
widget_type: str = None,
|
|
641
|
+
options: List[str] = None,
|
|
642
|
+
default: Any = None
|
|
643
|
+
) -> None
|
|
644
|
+
</code></pre>
|
|
645
|
+
<p>Adds an input port. Also initializes <code>self.parameters[name]</code> to <code>default</code> if<br />
|
|
646
|
+
the key does not already exist. Default values are coerced by type if <code>default</code><br />
|
|
647
|
+
is <code>None</code>:</p>
|
|
648
|
+
<table>
|
|
649
|
+
<thead>
|
|
650
|
+
<tr>
|
|
651
|
+
<th><code>data_type</code></th>
|
|
652
|
+
<th>Auto-default</th>
|
|
653
|
+
</tr>
|
|
654
|
+
</thead>
|
|
655
|
+
<tbody>
|
|
656
|
+
<tr>
|
|
657
|
+
<td><code>string</code></td>
|
|
658
|
+
<td><code>""</code></td>
|
|
659
|
+
</tr>
|
|
660
|
+
<tr>
|
|
661
|
+
<td><code>list</code></td>
|
|
662
|
+
<td><code>[]</code></td>
|
|
663
|
+
</tr>
|
|
664
|
+
<tr>
|
|
665
|
+
<td><code>bool</code></td>
|
|
666
|
+
<td><code>False</code></td>
|
|
667
|
+
</tr>
|
|
668
|
+
<tr>
|
|
669
|
+
<td><code>int</code> / <code>float</code> / <code>number</code></td>
|
|
670
|
+
<td><code>0</code></td>
|
|
671
|
+
</tr>
|
|
672
|
+
<tr>
|
|
673
|
+
<td>others</td>
|
|
674
|
+
<td><code>None</code></td>
|
|
675
|
+
</tr>
|
|
676
|
+
</tbody>
|
|
677
|
+
</table>
|
|
678
|
+
<p><strong>Call this only inside <code>__init__</code> or <code>restore_from_parameters()</code>.</strong> Calling it<br />
|
|
679
|
+
during <code>execute()</code> creates ports mid-run which the engine was not prepared for.</p>
|
|
680
|
+
<h4 id="add_output">add_output</h4>
|
|
681
|
+
<pre><code class="language-python">def add_output(
|
|
682
|
+
self,
|
|
683
|
+
name: str,
|
|
684
|
+
data_type: str = "any",
|
|
685
|
+
default: Any = None
|
|
686
|
+
) -> None
|
|
687
|
+
</code></pre>
|
|
688
|
+
<p>Adds an output port. Applies the same type-based auto-default as <code>add_input</code>.<br />
|
|
689
|
+
Also initializes <code>self.parameters[name]</code> to <code>default</code>.</p>
|
|
690
|
+
<h4 id="add_exec_input">add_exec_input</h4>
|
|
691
|
+
<pre><code class="language-python">def add_exec_input(self, name: str = "exec_in") -> None
|
|
692
|
+
</code></pre>
|
|
693
|
+
<p>Convenience wrapper: calls <code>add_input(name, data_type="exec")</code>. Rarely needed<br />
|
|
694
|
+
directly — <code>super().__init__(use_exec=True)</code> already calls it.</p>
|
|
695
|
+
<h4 id="add_exec_output">add_exec_output</h4>
|
|
696
|
+
<pre><code class="language-python">def add_exec_output(self, name: str = "exec_out") -> None
|
|
697
|
+
</code></pre>
|
|
698
|
+
<p>Convenience wrapper: calls <code>add_output(name, data_type="exec")</code>. Use this to<br />
|
|
699
|
+
add additional exec outputs beyond the default <code>exec_out</code>:</p>
|
|
700
|
+
<pre><code class="language-python">self.add_exec_output("exec_fail") # adds a failure branch
|
|
701
|
+
</code></pre>
|
|
702
|
+
<h4 id="add_parameter">add_parameter</h4>
|
|
703
|
+
<pre><code class="language-python">def add_parameter(self, name: str, param_type: Type, default: Any = None) -> None
|
|
704
|
+
</code></pre>
|
|
705
|
+
<p>Adds an internal parameter (not a port). Useful for storing typed configuration<br />
|
|
706
|
+
that does not appear as a port but is saved/restored with the workflow.</p>
|
|
707
|
+
<h4 id="rebuild_ports">rebuild_ports</h4>
|
|
708
|
+
<pre><code class="language-python">def rebuild_ports(self) -> None
|
|
709
|
+
</code></pre>
|
|
710
|
+
<p>Notifies the UI canvas to redraw this node's ports. Call once after all<br />
|
|
711
|
+
<code>add_input</code> / <code>del self.inputs[name]</code> operations are complete.</p>
|
|
712
|
+
<hr />
|
|
713
|
+
<h3 id="parameter-access-methods">Parameter Access Methods</h3>
|
|
714
|
+
<h4 id="set_parameter">set_parameter</h4>
|
|
715
|
+
<pre><code class="language-python">def set_parameter(self, name: str, value: Any) -> None
|
|
716
|
+
</code></pre>
|
|
717
|
+
<p>Sets <code>self.parameters[name] = value</code>. When <code>value</code> is a list <strong>and</strong> the named<br />
|
|
718
|
+
port has <code>widget_type="dropdown"</code>, the dropdown's option list is replaced and<br />
|
|
719
|
+
<code>_on_dropdown_options_changed</code> is fired. The current selection is preserved if<br />
|
|
720
|
+
it still exists in the new list; otherwise the first option is selected.</p>
|
|
721
|
+
<h4 id="get_parameter">get_parameter</h4>
|
|
722
|
+
<pre><code class="language-python">def get_parameter(self, name: str, default: Any = None) -> Any
|
|
723
|
+
</code></pre>
|
|
724
|
+
<p>Returns <code>self.parameters.get(name, default)</code>. Safe to call at any time.</p>
|
|
725
|
+
<h4 id="__getitem__-shortcut"><code>__getitem__</code> shortcut</h4>
|
|
726
|
+
<pre><code class="language-python">value = node["port_name"] # equivalent to node.get_parameter("port_name")
|
|
727
|
+
</code></pre>
|
|
728
|
+
<hr />
|
|
729
|
+
<h3 id="connection-query-methods">Connection Query Methods</h3>
|
|
730
|
+
<h4 id="is_port_connected">is_port_connected</h4>
|
|
731
|
+
<pre><code class="language-python">def is_port_connected(self, name: str, is_input: bool) -> bool
|
|
732
|
+
</code></pre>
|
|
733
|
+
<p>Returns <code>True</code> if the named port currently has a connected wire. Queries the<br />
|
|
734
|
+
UI via the <code>_is_port_connected</code> hook. Returns <code>False</code> if the hook is not set<br />
|
|
735
|
+
(e.g., when running headlessly or in tests).</p>
|
|
736
|
+
<hr />
|
|
737
|
+
<h3 id="logging-methods">Logging Methods</h3>
|
|
738
|
+
<h4 id="log_info">log_info</h4>
|
|
739
|
+
<pre><code class="language-python">def log_info(self, msg: str) -> None
|
|
740
|
+
</code></pre>
|
|
741
|
+
<p>Emits an informational (white/grey) message to the log panel.</p>
|
|
742
|
+
<h4 id="log_success">log_success</h4>
|
|
743
|
+
<pre><code class="language-python">def log_success(self, msg: str) -> None
|
|
744
|
+
</code></pre>
|
|
745
|
+
<p>Emits a success (green) message to the log panel.</p>
|
|
746
|
+
<h4 id="log_error">log_error</h4>
|
|
747
|
+
<pre><code class="language-python">def log_error(self, msg: str) -> None
|
|
748
|
+
</code></pre>
|
|
749
|
+
<p>Emits an error (red) message to the log panel.</p>
|
|
750
|
+
<p>All three methods buffer the message if <code>_on_log</code> is not yet wired (which can<br />
|
|
751
|
+
happen if you log during <code>__init__</code>). The buffer is flushed when the engine<br />
|
|
752
|
+
wires the hook before calling <code>execute()</code>.</p>
|
|
753
|
+
<hr />
|
|
754
|
+
<h3 id="output-methods">Output Methods</h3>
|
|
755
|
+
<h4 id="set_output-async">set_output (async)</h4>
|
|
756
|
+
<pre><code class="language-python">async def set_output(self, name: str, value: Any) -> None
|
|
757
|
+
</code></pre>
|
|
758
|
+
<p>Pushes <code>value</code> to the named output port reactively — before <code>execute()</code><br />
|
|
759
|
+
returns. The engine immediately:</p>
|
|
760
|
+
<ol>
|
|
761
|
+
<li>Updates <code>self.parameters[name]</code> and the engine's <code>node_results</code> cache.</li>
|
|
762
|
+
<li>Propagates the value to all downstream nodes connected to this port.</li>
|
|
763
|
+
<li>If <code>name</code> is an <code>exec</code>-type port and <code>value</code> is truthy, triggers the<br />
|
|
764
|
+
full exec chain of every downstream node connected to it.</li>
|
|
765
|
+
</ol>
|
|
766
|
+
<p><strong>Must be awaited.</strong> Calling without <code>await</code> discards the coroutine silently.</p>
|
|
767
|
+
<h4 id="clear_outputs">clear_outputs</h4>
|
|
768
|
+
<pre><code class="language-python">def clear_outputs(self) -> None
|
|
769
|
+
</code></pre>
|
|
770
|
+
<p>Resets every output port's value in <code>self.parameters</code> to its default.<br />
|
|
771
|
+
Called by the engine during node preparation, before <code>execute()</code> is called.<br />
|
|
772
|
+
You should not call this manually.</p>
|
|
773
|
+
<hr />
|
|
774
|
+
<h3 id="cancellation">Cancellation</h3>
|
|
775
|
+
<h4 id="is_stopped">is_stopped</h4>
|
|
776
|
+
<pre><code class="language-python">def is_stopped(self) -> bool
|
|
777
|
+
</code></pre>
|
|
778
|
+
<p>Returns <code>True</code> if the user has requested pipeline cancellation (clicked Stop).<br />
|
|
779
|
+
Check this inside long loops or before expensive operations:</p>
|
|
780
|
+
<pre><code class="language-python">for item in items:
|
|
781
|
+
if self.is_stopped():
|
|
782
|
+
self.log_info("Cancelled by user.")
|
|
783
|
+
break
|
|
784
|
+
process(item)
|
|
785
|
+
</code></pre>
|
|
786
|
+
<p>Returns <code>False</code> when running headlessly (no hook wired).</p>
|
|
787
|
+
<hr />
|
|
788
|
+
<h3 id="abstract-method">Abstract Method</h3>
|
|
789
|
+
<h4 id="execute-async-abstract">execute (async, abstract)</h4>
|
|
790
|
+
<pre><code class="language-python">@abstractmethod
|
|
791
|
+
async def execute(self, inputs: Dict[str, Any]) -> Dict[str, Any]
|
|
792
|
+
</code></pre>
|
|
793
|
+
<p><strong>You must implement this method.</strong> It is the main execution entry point.</p>
|
|
794
|
+
<ul>
|
|
795
|
+
<li><strong><code>inputs</code></strong> — A snapshot of <code>self.parameters</code> after all upstream values have<br />
|
|
796
|
+
been merged in. Read input values from here rather than from <code>self.parameters</code><br />
|
|
797
|
+
to avoid race conditions with reactive propagation.</li>
|
|
798
|
+
<li><strong>Return value</strong> — A dict mapping output port names to values. Include<br />
|
|
799
|
+
<code>"exec_out": True</code> for exec-flow nodes to continue the chain. Return an empty<br />
|
|
800
|
+
dict or <code>None</code> if you have no outputs (rare).</li>
|
|
801
|
+
</ul>
|
|
802
|
+
<hr />
|
|
803
|
+
<h2 id="2-port-class-reference">2. Port Class Reference</h2>
|
|
804
|
+
<pre><code class="language-python">from src.nodes.base import Port
|
|
805
|
+
</code></pre>
|
|
806
|
+
<p><code>Port</code> describes a single connection point on a node.</p>
|
|
807
|
+
<h3 id="attributes">Attributes</h3>
|
|
808
|
+
<table>
|
|
809
|
+
<thead>
|
|
810
|
+
<tr>
|
|
811
|
+
<th>Attribute</th>
|
|
812
|
+
<th>Type</th>
|
|
813
|
+
<th>Description</th>
|
|
814
|
+
</tr>
|
|
815
|
+
</thead>
|
|
816
|
+
<tbody>
|
|
817
|
+
<tr>
|
|
818
|
+
<td><code>name</code></td>
|
|
819
|
+
<td><code>str</code></td>
|
|
820
|
+
<td>Unique name within the node's inputs or outputs dict.</td>
|
|
821
|
+
</tr>
|
|
822
|
+
<tr>
|
|
823
|
+
<td><code>data_type</code></td>
|
|
824
|
+
<td><code>str</code></td>
|
|
825
|
+
<td>One of <code>string</code>, <code>int</code>, <code>float</code>, <code>bool</code>, <code>list</code>, <code>dict</code>, <code>any</code>, <code>exec</code>.</td>
|
|
826
|
+
</tr>
|
|
827
|
+
<tr>
|
|
828
|
+
<td><code>widget_type</code></td>
|
|
829
|
+
<td><code>Optional[str]</code></td>
|
|
830
|
+
<td>Inline editor type shown when the port is unconnected.</td>
|
|
831
|
+
</tr>
|
|
832
|
+
<tr>
|
|
833
|
+
<td><code>options</code></td>
|
|
834
|
+
<td><code>Optional[List[str]]</code></td>
|
|
835
|
+
<td>Option list for <code>dropdown</code> widgets. <code>None</code> for all other types.</td>
|
|
836
|
+
</tr>
|
|
837
|
+
<tr>
|
|
838
|
+
<td><code>default</code></td>
|
|
839
|
+
<td><code>Any</code></td>
|
|
840
|
+
<td>Value used when no wire is connected and no widget value has been set.</td>
|
|
841
|
+
</tr>
|
|
842
|
+
</tbody>
|
|
843
|
+
</table>
|
|
844
|
+
<h3 id="accessing-ports">Accessing ports</h3>
|
|
845
|
+
<pre><code class="language-python">port = instance.inputs["my_port"]
|
|
846
|
+
print(port.name, port.data_type, port.default)
|
|
847
|
+
|
|
848
|
+
port = instance.outputs["result"]
|
|
849
|
+
print(port.widget_type) # always None for outputs
|
|
850
|
+
</code></pre>
|
|
851
|
+
<p>Ports are plain data objects — they do not have methods. To query whether a<br />
|
|
852
|
+
port is connected, use <code>self.is_port_connected()</code>.</p>
|
|
853
|
+
<hr />
|
|
854
|
+
<h2 id="3-exec-pin-mechanics">3. Exec Pin Mechanics</h2>
|
|
855
|
+
<p>Exec pins are ports with <code>data_type="exec"</code>. They represent the <strong>execution<br />
|
|
856
|
+
flow</strong> — the sequence in which nodes fire.</p>
|
|
857
|
+
<h3 id="exec_in">exec_in</h3>
|
|
858
|
+
<p>An exec-type input. When the upstream node fires <code>exec_out</code> (or any exec output<br />
|
|
859
|
+
wired to this node's <code>exec_in</code>), the engine calls <code>execute()</code> on this node.</p>
|
|
860
|
+
<p>Nodes with <code>exec_in</code> only run when an exec signal arrives. They are <strong>not</strong> run<br />
|
|
861
|
+
automatically by the engine's data-pull mechanism.</p>
|
|
862
|
+
<h3 id="exec_out">exec_out</h3>
|
|
863
|
+
<p>An exec-type output. When your <code>execute()</code> returns <code>{"exec_out": True}</code> or you<br />
|
|
864
|
+
call <code>await self.set_output("exec_out", True)</code>, the engine recursively executes<br />
|
|
865
|
+
all nodes whose <code>exec_in</code> is wired to this port.</p>
|
|
866
|
+
<h3 id="how-the-exec-chain-works">How the exec chain works</h3>
|
|
867
|
+
<pre><code>Node A (exec_out) ──► Node B (exec_in / exec_out) ──► Node C (exec_in)
|
|
868
|
+
</code></pre>
|
|
869
|
+
<ol>
|
|
870
|
+
<li>Node A's <code>execute()</code> returns <code>{"exec_out": True}</code>.</li>
|
|
871
|
+
<li>The engine sees <code>exec_out</code> is truthy and its port type is <code>exec</code>.</li>
|
|
872
|
+
<li>The engine calls <code>_execute_flow(Node B)</code>.</li>
|
|
873
|
+
<li>Node B's <code>execute()</code> runs and returns <code>{"exec_out": True}</code>.</li>
|
|
874
|
+
<li>The engine calls <code>_execute_flow(Node C)</code>.</li>
|
|
875
|
+
<li>Node C's <code>execute()</code> runs.</li>
|
|
876
|
+
</ol>
|
|
877
|
+
<p>The chain is depth-first. If Node B has two downstream exec nodes they are<br />
|
|
878
|
+
triggered in order of connection.</p>
|
|
879
|
+
<h3 id="exec-pins-added-by-superinit">exec pins added by super().<strong>init</strong>()</h3>
|
|
880
|
+
<p>When <code>use_exec=True</code>:<br />
|
|
881
|
+
- <code>exec_in</code> is added to <code>self.inputs</code> with <code>data_type="exec"</code>.<br />
|
|
882
|
+
- <code>exec_out</code> is added to <code>self.outputs</code> with <code>data_type="exec"</code>.</p>
|
|
883
|
+
<p>These are plain <code>Port</code> objects. The engine identifies exec ports by checking<br />
|
|
884
|
+
<code>port.data_type == "exec"</code>.</p>
|
|
885
|
+
<h3 id="deleting-the-default-exec_out">Deleting the default exec_out</h3>
|
|
886
|
+
<p>Some built-in nodes (e.g., <code>ForEachNode</code>) delete the default <code>exec_out</code> and<br />
|
|
887
|
+
replace it with more descriptive outputs:</p>
|
|
888
|
+
<pre><code class="language-python">def __init__(self):
|
|
889
|
+
super().__init__(use_exec=True)
|
|
890
|
+
if "exec_out" in self.outputs:
|
|
891
|
+
del self.outputs["exec_out"]
|
|
892
|
+
self.add_exec_output("each_item")
|
|
893
|
+
self.add_exec_output("exec_on_finished")
|
|
894
|
+
</code></pre>
|
|
895
|
+
<p>This is safe — the engine treats any <code>exec</code>-type output the same way.</p>
|
|
896
|
+
<hr />
|
|
897
|
+
<h2 id="4-set_output-reactive-system">4. set_output() Reactive System</h2>
|
|
898
|
+
<p><code>await self.set_output(name, value)</code> is the mechanism for reactive, mid-<br />
|
|
899
|
+
execution value propagation.</p>
|
|
900
|
+
<h3 id="what-happens-when-you-call-set_output">What happens when you call set_output</h3>
|
|
901
|
+
<p>Inside the engine's <code>_on_output</code> handler (set up per-node before execution):</p>
|
|
902
|
+
<ol>
|
|
903
|
+
<li><code>node_results[node_id][name] = value</code> — result cache updated immediately.</li>
|
|
904
|
+
<li><code>node_output</code> signal emitted — the UI updates wire tooltips.</li>
|
|
905
|
+
<li>For every data connection from this port to a downstream node:</li>
|
|
906
|
+
<li><code>target.parameters[conn.to_port] = value</code> — downstream parameter updated.</li>
|
|
907
|
+
<li><code>target_node_results[to_port] = value</code> — downstream result cache updated.</li>
|
|
908
|
+
<li>If the target node is not exec-driven (<code>to_node not in _driven_by_flow</code>),<br />
|
|
909
|
+
it is <strong>invalidated</strong> from <code>_executed_nodes</code> so it re-runs on next pull.</li>
|
|
910
|
+
<li><code>await target.on_parameter_changed(to_port, value)</code> — reactive hook called.</li>
|
|
911
|
+
<li>If <code>name</code> is an exec port and <code>value</code> is truthy:</li>
|
|
912
|
+
<li>For every exec connection from this port, <code>_execute_flow(downstream_node)</code><br />
|
|
913
|
+
is awaited sequentially.</li>
|
|
914
|
+
</ol>
|
|
915
|
+
<h3 id="ordering-set_output-vs-return-dict">Ordering: set_output vs. return dict</h3>
|
|
916
|
+
<p>The return dict is processed <strong>after</strong> <code>execute()</code> returns. Values pushed via<br />
|
|
917
|
+
<code>set_output()</code> arrive at downstream nodes earlier. This matters for loops:</p>
|
|
918
|
+
<pre><code class="language-python"># Loop iteration pattern
|
|
919
|
+
for item in items:
|
|
920
|
+
await self.set_output("current_item", item) # downstream sees item NOW
|
|
921
|
+
await self.set_output("exec_step", True) # trigger downstream exec chain
|
|
922
|
+
await asyncio.sleep(0) # yield
|
|
923
|
+
|
|
924
|
+
return {"current_item": last_item, "exec_out": True} # final cleanup
|
|
925
|
+
</code></pre>
|
|
926
|
+
<h3 id="set_output-is-safe-to-call-multiple-times">set_output is safe to call multiple times</h3>
|
|
927
|
+
<p>You can call <code>set_output</code> for the same port multiple times. Each call fully<br />
|
|
928
|
+
propagates before the next <code>await</code> returns.</p>
|
|
929
|
+
<h3 id="set_output-on-exec-ports-flow-control">set_output on exec ports: flow control</h3>
|
|
930
|
+
<pre><code class="language-python">await self.set_output("exec_out", True) # continues the chain
|
|
931
|
+
await self.set_output("exec_fail", True) # continues the failure branch
|
|
932
|
+
</code></pre>
|
|
933
|
+
<p>You can fire both in the same execute() call — both chains will run. To<br />
|
|
934
|
+
restrict to one branch, use conditional logic.</p>
|
|
935
|
+
<hr />
|
|
936
|
+
<h2 id="5-clear_outputs-call-sequence">5. clear_outputs() Call Sequence</h2>
|
|
937
|
+
<p>The engine calls <code>instance.clear_outputs()</code> during node preparation — after<br />
|
|
938
|
+
<code>restore_from_parameters()</code> but before syncing upstream values or calling<br />
|
|
939
|
+
<code>execute()</code>.</p>
|
|
940
|
+
<pre><code class="language-python">def clear_outputs(self) -> None:
|
|
941
|
+
for name, port in self.outputs.items():
|
|
942
|
+
self.parameters[name] = port.default
|
|
943
|
+
</code></pre>
|
|
944
|
+
<p>This resets every output port's cached value to its declared default (e.g.,<br />
|
|
945
|
+
<code>""</code> for string, <code>[]</code> for list, <code>False</code> for bool).</p>
|
|
946
|
+
<p><strong>Why this matters for GroupInNode:</strong> The <code>value</code> output port is reset to<br />
|
|
947
|
+
<code>None</code> by <code>clear_outputs()</code> before <code>execute()</code> runs. That is why <code>GroupInNode</code><br />
|
|
948
|
+
reads from <code>self.parameters["_injected_value"]</code> (not <code>"value"</code>) — the injected<br />
|
|
949
|
+
value is stored under a different key that <code>clear_outputs()</code> does not touch.</p>
|
|
950
|
+
<hr />
|
|
951
|
+
<h2 id="6-is_stopped-cancellation">6. is_stopped() Cancellation</h2>
|
|
952
|
+
<pre><code class="language-python">def is_stopped(self) -> bool
|
|
953
|
+
</code></pre>
|
|
954
|
+
<p>Internally calls <code>self._check_stopped()</code>, which is wired by the engine to<br />
|
|
955
|
+
<code>NetworkExecutor._is_stopped</code>. Returns <code>False</code> if the hook is not set.</p>
|
|
956
|
+
<h3 id="pattern-for-long-operations">Pattern for long operations</h3>
|
|
957
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
958
|
+
for i, path in enumerate(file_list):
|
|
959
|
+
if self.is_stopped():
|
|
960
|
+
self.log_info(f"Stopped after {i} files.")
|
|
961
|
+
return {"processed": i, "exec_out": True}
|
|
962
|
+
|
|
963
|
+
process_file(path)
|
|
964
|
+
if i % 10 == 0:
|
|
965
|
+
await asyncio.sleep(0) # yield periodically
|
|
966
|
+
|
|
967
|
+
return {"processed": len(file_list), "exec_out": True}
|
|
968
|
+
</code></pre>
|
|
969
|
+
<h3 id="pattern-for-async-operations">Pattern for async operations</h3>
|
|
970
|
+
<p>The engine also cancels active <code>asyncio.Task</code> objects when <code>stop()</code> is called.<br />
|
|
971
|
+
If your node is inside an <code>await</code>, the task receives <code>asyncio.CancelledError</code>.<br />
|
|
972
|
+
Catch it if you need to clean up:</p>
|
|
973
|
+
<pre><code class="language-python">try:
|
|
974
|
+
result = await some_long_operation()
|
|
975
|
+
except asyncio.CancelledError:
|
|
976
|
+
self.log_info("Operation cancelled.")
|
|
977
|
+
raise # re-raise so the engine knows the task was cancelled
|
|
978
|
+
</code></pre>
|
|
979
|
+
<hr />
|
|
980
|
+
<h2 id="7-restore_from_parameters">7. restore_from_parameters()</h2>
|
|
981
|
+
<pre><code class="language-python">def restore_from_parameters(self, parameters: Dict[str, Any]) -> None
|
|
982
|
+
</code></pre>
|
|
983
|
+
<p>Called by the engine during node preparation — after the node class is<br />
|
|
984
|
+
instantiated but before <code>clear_outputs()</code> and <code>execute()</code>. The <code>parameters</code><br />
|
|
985
|
+
argument is the dict loaded from the saved workflow file.</p>
|
|
986
|
+
<p>The base implementation does nothing (<code>pass</code>). Override it to recreate<br />
|
|
987
|
+
<strong>dynamic ports</strong> from saved state.</p>
|
|
988
|
+
<h3 id="when-to-override">When to override</h3>
|
|
989
|
+
<p>Override <code>restore_from_parameters()</code> if your node:<br />
|
|
990
|
+
- Adds input or output ports dynamically at runtime.<br />
|
|
991
|
+
- Needs to restore non-port state before execution (e.g., parse a config).</p>
|
|
992
|
+
<h3 id="typical-pattern">Typical pattern</h3>
|
|
993
|
+
<pre><code class="language-python">def restore_from_parameters(self, parameters: Dict[str, Any]) -> None:
|
|
994
|
+
# Recreate any step_N ports that were saved
|
|
995
|
+
for key in parameters:
|
|
996
|
+
if key.startswith("step_") and key not in self.inputs:
|
|
997
|
+
self.add_input(key, "any")
|
|
998
|
+
|
|
999
|
+
# Update internal counter
|
|
1000
|
+
count = max(
|
|
1001
|
+
(int(k.split("_")[1]) + 1 for k in parameters if k.startswith("step_")),
|
|
1002
|
+
default=1,
|
|
1003
|
+
)
|
|
1004
|
+
self._step_count = count
|
|
1005
|
+
</code></pre>
|
|
1006
|
+
<h3 id="important-do-not-call-rebuild_ports-here">Important: do not call rebuild_ports() here</h3>
|
|
1007
|
+
<p><code>restore_from_parameters()</code> runs in the engine before the UI canvas exists<br />
|
|
1008
|
+
(when running headlessly) or before the canvas widget has been fully<br />
|
|
1009
|
+
initialized. Calling <code>rebuild_ports()</code> here is safe but unnecessary — the UI<br />
|
|
1010
|
+
rebuilds all ports when it creates the <code>NodeWidget</code>.</p>
|
|
1011
|
+
<hr />
|
|
1012
|
+
<h2 id="8-on_parameter_changed-hook">8. on_parameter_changed() Hook</h2>
|
|
1013
|
+
<pre><code class="language-python">async def on_parameter_changed(self, name: str, value: Any) -> None
|
|
1014
|
+
</code></pre>
|
|
1015
|
+
<p>Called by the engine's reactive propagation system when an upstream node<br />
|
|
1016
|
+
pushes a new value to a data port of this node (via <code>set_output</code>). At this<br />
|
|
1017
|
+
point <code>self.parameters[name]</code> has already been updated.</p>
|
|
1018
|
+
<p><strong>This is not called during <code>execute()</code> pre-sync.</strong> It is only triggered by<br />
|
|
1019
|
+
reactive propagation mid-run.</p>
|
|
1020
|
+
<h3 id="use-cases">Use cases</h3>
|
|
1021
|
+
<ul>
|
|
1022
|
+
<li>Recompute a derived output when an upstream value changes (e.g., <code>TwoWaySwitchNode</code>).</li>
|
|
1023
|
+
<li>Update dropdown options based on a connected category port.</li>
|
|
1024
|
+
<li>Log changes for debugging.</li>
|
|
1025
|
+
</ul>
|
|
1026
|
+
<h3 id="example-reactive-switch">Example: reactive switch</h3>
|
|
1027
|
+
<pre><code class="language-python">async def on_parameter_changed(self, name: str, value: Any) -> None:
|
|
1028
|
+
if name in ("condition", "input_1", "input_2"):
|
|
1029
|
+
cond = bool(self.get_parameter("condition", False))
|
|
1030
|
+
val1 = self.get_parameter("input_1")
|
|
1031
|
+
val2 = self.get_parameter("input_2")
|
|
1032
|
+
await self.set_output("output", val1 if cond else val2)
|
|
1033
|
+
</code></pre>
|
|
1034
|
+
<p>This pattern allows <code>TwoWaySwitchNode</code> to update its output in real-time as<br />
|
|
1035
|
+
upstream nodes push new values during a <code>ForEachNode</code> loop, without waiting for<br />
|
|
1036
|
+
its own exec trigger.</p>
|
|
1037
|
+
<hr />
|
|
1038
|
+
<h2 id="9-on_plug-on_unplug-hooks">9. on_plug / on_unplug Hooks</h2>
|
|
1039
|
+
<p>Four hooks fire when connections are created or removed in the canvas.</p>
|
|
1040
|
+
<h3 id="on_plug-async">on_plug (async)</h3>
|
|
1041
|
+
<pre><code class="language-python">async def on_plug(
|
|
1042
|
+
self,
|
|
1043
|
+
port_name: str,
|
|
1044
|
+
is_input: bool,
|
|
1045
|
+
other_node: BaseNode,
|
|
1046
|
+
other_port_name: str
|
|
1047
|
+
) -> None
|
|
1048
|
+
</code></pre>
|
|
1049
|
+
<p>Called asynchronously when a wire is connected to one of this node's ports.<br />
|
|
1050
|
+
Use for async operations that should happen when a port is connected (e.g.,<br />
|
|
1051
|
+
fetching options from a connected node).</p>
|
|
1052
|
+
<h3 id="on_plug_sync">on_plug_sync</h3>
|
|
1053
|
+
<pre><code class="language-python">def on_plug_sync(
|
|
1054
|
+
self,
|
|
1055
|
+
port_name: str,
|
|
1056
|
+
is_input: bool,
|
|
1057
|
+
other_node: BaseNode,
|
|
1058
|
+
other_port_name: str
|
|
1059
|
+
) -> None
|
|
1060
|
+
</code></pre>
|
|
1061
|
+
<p>Called synchronously when a wire is connected. Use for immediate UI updates<br />
|
|
1062
|
+
such as adding a dynamic port:</p>
|
|
1063
|
+
<pre><code class="language-python">def on_plug_sync(self, port_name, is_input, other_node, other_port_name):
|
|
1064
|
+
if is_input and port_name == f"step_{self._step_count - 1}":
|
|
1065
|
+
self.add_input(f"step_{self._step_count}", "any")
|
|
1066
|
+
self._step_count += 1
|
|
1067
|
+
self.rebuild_ports()
|
|
1068
|
+
</code></pre>
|
|
1069
|
+
<h3 id="on_unplug-async">on_unplug (async)</h3>
|
|
1070
|
+
<pre><code class="language-python">async def on_unplug(self, port_name: str, is_input: bool) -> None
|
|
1071
|
+
</code></pre>
|
|
1072
|
+
<p>Called asynchronously when a wire is removed from one of this node's ports.</p>
|
|
1073
|
+
<h3 id="on_unplug_sync">on_unplug_sync</h3>
|
|
1074
|
+
<pre><code class="language-python">def on_unplug_sync(self, port_name: str, is_input: bool) -> None
|
|
1075
|
+
</code></pre>
|
|
1076
|
+
<p>Called synchronously when a wire is removed. Use for immediate port cleanup.</p>
|
|
1077
|
+
<hr />
|
|
1078
|
+
<h2 id="10-node-lifecycle">10. Node Lifecycle</h2>
|
|
1079
|
+
<p>The complete sequence from workflow load to execution completion:</p>
|
|
1080
|
+
<pre><code>1. NodeRegistry.get_class(node_id) → node_class
|
|
1081
|
+
2. instance = node_class()
|
|
1082
|
+
│
|
|
1083
|
+
└── BaseNode.__init__(use_exec=True)
|
|
1084
|
+
├── self.inputs = {}
|
|
1085
|
+
├── self.outputs = {}
|
|
1086
|
+
├── self.parameters = {}
|
|
1087
|
+
├── add_exec_input("exec_in")
|
|
1088
|
+
├── add_exec_output("exec_out")
|
|
1089
|
+
└── [your __init__ code: add_input(), add_output(), ...]
|
|
1090
|
+
|
|
1091
|
+
3. instance.restore_from_parameters(workflow_node.parameters)
|
|
1092
|
+
└── [your override: recreate dynamic ports from saved state]
|
|
1093
|
+
|
|
1094
|
+
4. Sync parameters from workflow:
|
|
1095
|
+
├── For ports with incoming data connections: reset to port default
|
|
1096
|
+
└── For all other parameters: copy from saved workflow
|
|
1097
|
+
|
|
1098
|
+
5. instance.clear_outputs()
|
|
1099
|
+
└── self.parameters[output_name] = port.default (for every output)
|
|
1100
|
+
|
|
1101
|
+
6. Upstream data nodes are pulled recursively (if not exec-driven)
|
|
1102
|
+
|
|
1103
|
+
7. Incoming connection values merged into instance.parameters
|
|
1104
|
+
|
|
1105
|
+
8. inputs = instance.parameters.copy()
|
|
1106
|
+
|
|
1107
|
+
9. instance.execute(inputs)
|
|
1108
|
+
├── [your code: read inputs, compute results]
|
|
1109
|
+
├── await self.set_output(...) → reactive propagation + exec triggers
|
|
1110
|
+
└── return {output_name: value, ..., "exec_out": True}
|
|
1111
|
+
|
|
1112
|
+
10. result merged into node_results[node_id]
|
|
1113
|
+
11. node_output signal emitted
|
|
1114
|
+
12. node_finished signal emitted
|
|
1115
|
+
</code></pre>
|
|
1116
|
+
<hr />
|
|
1117
|
+
<h2 id="11-json-schema-reference">11. JSON Schema Reference</h2>
|
|
1118
|
+
<p>Every node JSON file must conform to the <code>NodeDefinitionJSON</code> Pydantic model.</p>
|
|
1119
|
+
<h3 id="top-level-fields">Top-level fields</h3>
|
|
1120
|
+
<table>
|
|
1121
|
+
<thead>
|
|
1122
|
+
<tr>
|
|
1123
|
+
<th>Field</th>
|
|
1124
|
+
<th>Type</th>
|
|
1125
|
+
<th>Required</th>
|
|
1126
|
+
<th>Description</th>
|
|
1127
|
+
</tr>
|
|
1128
|
+
</thead>
|
|
1129
|
+
<tbody>
|
|
1130
|
+
<tr>
|
|
1131
|
+
<td><code>node_id</code></td>
|
|
1132
|
+
<td><code>str</code></td>
|
|
1133
|
+
<td>Yes</td>
|
|
1134
|
+
<td>Unique identifier. Snake_case recommended. Must match <code>name</code> class attribute.</td>
|
|
1135
|
+
</tr>
|
|
1136
|
+
<tr>
|
|
1137
|
+
<td><code>name</code></td>
|
|
1138
|
+
<td><code>str</code></td>
|
|
1139
|
+
<td>Yes</td>
|
|
1140
|
+
<td>Display name. Usually identical to <code>node_id</code>.</td>
|
|
1141
|
+
</tr>
|
|
1142
|
+
<tr>
|
|
1143
|
+
<td><code>description</code></td>
|
|
1144
|
+
<td><code>str</code></td>
|
|
1145
|
+
<td>No</td>
|
|
1146
|
+
<td>Shown in library tooltip. Defaults to <code>""</code>.</td>
|
|
1147
|
+
</tr>
|
|
1148
|
+
<tr>
|
|
1149
|
+
<td><code>category</code></td>
|
|
1150
|
+
<td><code>str</code></td>
|
|
1151
|
+
<td>No</td>
|
|
1152
|
+
<td>Library grouping. Defaults to <code>"General"</code>.</td>
|
|
1153
|
+
</tr>
|
|
1154
|
+
<tr>
|
|
1155
|
+
<td><code>icon_path</code></td>
|
|
1156
|
+
<td><code>str \| null</code></td>
|
|
1157
|
+
<td>No</td>
|
|
1158
|
+
<td>Relative path to an icon file.</td>
|
|
1159
|
+
</tr>
|
|
1160
|
+
<tr>
|
|
1161
|
+
<td><code>use_exec</code></td>
|
|
1162
|
+
<td><code>bool</code></td>
|
|
1163
|
+
<td>No</td>
|
|
1164
|
+
<td>Adds exec_in/exec_out if <code>true</code>. Defaults to <code>true</code>.</td>
|
|
1165
|
+
</tr>
|
|
1166
|
+
<tr>
|
|
1167
|
+
<td><code>inputs</code></td>
|
|
1168
|
+
<td><code>PortModel[]</code></td>
|
|
1169
|
+
<td>No</td>
|
|
1170
|
+
<td>List of input port definitions.</td>
|
|
1171
|
+
</tr>
|
|
1172
|
+
<tr>
|
|
1173
|
+
<td><code>outputs</code></td>
|
|
1174
|
+
<td><code>PortModel[]</code></td>
|
|
1175
|
+
<td>No</td>
|
|
1176
|
+
<td>List of output port definitions.</td>
|
|
1177
|
+
</tr>
|
|
1178
|
+
<tr>
|
|
1179
|
+
<td><code>python_code</code></td>
|
|
1180
|
+
<td><code>str</code></td>
|
|
1181
|
+
<td>Yes</td>
|
|
1182
|
+
<td>Full Python source as a single string. Use <code>\n</code> for newlines.</td>
|
|
1183
|
+
</tr>
|
|
1184
|
+
</tbody>
|
|
1185
|
+
</table>
|
|
1186
|
+
<h3 id="portmodel-fields">PortModel fields</h3>
|
|
1187
|
+
<table>
|
|
1188
|
+
<thead>
|
|
1189
|
+
<tr>
|
|
1190
|
+
<th>Field</th>
|
|
1191
|
+
<th>Type</th>
|
|
1192
|
+
<th>Required</th>
|
|
1193
|
+
<th>Description</th>
|
|
1194
|
+
</tr>
|
|
1195
|
+
</thead>
|
|
1196
|
+
<tbody>
|
|
1197
|
+
<tr>
|
|
1198
|
+
<td><code>name</code></td>
|
|
1199
|
+
<td><code>str</code></td>
|
|
1200
|
+
<td>Yes</td>
|
|
1201
|
+
<td>Port name. Must be unique within inputs (or outputs).</td>
|
|
1202
|
+
</tr>
|
|
1203
|
+
<tr>
|
|
1204
|
+
<td><code>type</code></td>
|
|
1205
|
+
<td><code>str</code></td>
|
|
1206
|
+
<td>No</td>
|
|
1207
|
+
<td>Data type. Defaults to <code>"any"</code>.</td>
|
|
1208
|
+
</tr>
|
|
1209
|
+
<tr>
|
|
1210
|
+
<td><code>widget_type</code></td>
|
|
1211
|
+
<td><code>str \| null</code></td>
|
|
1212
|
+
<td>No</td>
|
|
1213
|
+
<td>Inline editor. <code>null</code> = no widget.</td>
|
|
1214
|
+
</tr>
|
|
1215
|
+
<tr>
|
|
1216
|
+
<td><code>options</code></td>
|
|
1217
|
+
<td><code>str[] \| null</code></td>
|
|
1218
|
+
<td>No</td>
|
|
1219
|
+
<td>Options list for <code>dropdown</code> widgets.</td>
|
|
1220
|
+
</tr>
|
|
1221
|
+
<tr>
|
|
1222
|
+
<td><code>default</code></td>
|
|
1223
|
+
<td><code>any</code></td>
|
|
1224
|
+
<td>No</td>
|
|
1225
|
+
<td>Default value. <code>null</code> defers to type-based auto-default.</td>
|
|
1226
|
+
</tr>
|
|
1227
|
+
</tbody>
|
|
1228
|
+
</table>
|
|
1229
|
+
<h3 id="exec-pin-normalization">Exec pin normalization</h3>
|
|
1230
|
+
<p>When <code>use_exec=true</code>, the registry normalizes the JSON before compiling:</p>
|
|
1231
|
+
<ul>
|
|
1232
|
+
<li>If no input named <code>"exec_in"</code> exists, one is prepended automatically.</li>
|
|
1233
|
+
<li>If no output named <code>"exec_out"</code> exists, one is prepended automatically.</li>
|
|
1234
|
+
</ul>
|
|
1235
|
+
<p>This means you can safely declare <code>"use_exec": true</code> and omit the exec pins<br />
|
|
1236
|
+
from the <code>inputs</code>/<code>outputs</code> arrays — the registry adds them. However, for<br />
|
|
1237
|
+
clarity it is recommended to include them explicitly.</p>
|
|
1238
|
+
<h3 id="minimal-valid-json">Minimal valid JSON</h3>
|
|
1239
|
+
<pre><code class="language-json">{
|
|
1240
|
+
"node_id": "hello_world",
|
|
1241
|
+
"name": "hello_world",
|
|
1242
|
+
"python_code": "from src.nodes.base import BaseNode\n\nclass Hello_World(BaseNode):\n name = 'hello_world'\n\n async def execute(self, inputs):\n self.log_info('Hello, World!')\n return {'exec_out': True}\n\ndef register_node():\n return Hello_World"
|
|
1243
|
+
}
|
|
1244
|
+
</code></pre>
|
|
1245
|
+
<hr />
|
|
1246
|
+
<h2 id="12-python_code-compilation">12. python_code Compilation</h2>
|
|
1247
|
+
<p>The registry compiles <code>python_code</code> using Python's built-in <code>exec()</code>:</p>
|
|
1248
|
+
<pre><code class="language-python">namespace = {}
|
|
1249
|
+
exec(definition.python_code, namespace)
|
|
1250
|
+
</code></pre>
|
|
1251
|
+
<p>The compiled namespace is inspected for:</p>
|
|
1252
|
+
<ol>
|
|
1253
|
+
<li>
|
|
1254
|
+
<p><strong><code>register_node</code> function</strong> (preferred) — called to get the node class:<br />
|
|
1255
|
+
<code>python
|
|
1256
|
+
node_class = namespace['register_node']()</code></p>
|
|
1257
|
+
</li>
|
|
1258
|
+
<li>
|
|
1259
|
+
<p><strong><code>execute</code> function</strong> (simplified format) — if no <code>register_node</code> but an<br />
|
|
1260
|
+
<code>execute</code> function exists, a <code>DynamicNode</code> class is generated automatically.<br />
|
|
1261
|
+
Any function in the namespace whose name starts with <code>_</code> is promoted to a<br />
|
|
1262
|
+
class method.</p>
|
|
1263
|
+
</li>
|
|
1264
|
+
</ol>
|
|
1265
|
+
<h3 id="class-attribute-injection">Class attribute injection</h3>
|
|
1266
|
+
<p>After the class is retrieved, the registry injects class attributes from the<br />
|
|
1267
|
+
JSON definition:</p>
|
|
1268
|
+
<pre><code class="language-python">node_class.name = definition.name
|
|
1269
|
+
node_class.node_id = definition.node_id
|
|
1270
|
+
node_class.category = definition.category
|
|
1271
|
+
node_class.description = definition.description
|
|
1272
|
+
node_class.icon_path = definition.icon_path
|
|
1273
|
+
</code></pre>
|
|
1274
|
+
<p>This means you do not need to set these in the class body — but setting them<br />
|
|
1275
|
+
there is harmless and useful for IDE autocomplete during development.</p>
|
|
1276
|
+
<h3 id="prism-node-auto-patching">Prism node auto-patching</h3>
|
|
1277
|
+
<p>For nodes whose <code>node_id</code> starts with <code>prism_</code> (except <code>prism_core_init</code>), the<br />
|
|
1278
|
+
registry automatically:</p>
|
|
1279
|
+
<ol>
|
|
1280
|
+
<li>Prepends <code>from src.utils.prism_core import resolve_prism_core</code> if not already present.</li>
|
|
1281
|
+
<li>Replaces <code>core = inputs.get('core')</code> with <code>core = resolve_prism_core(inputs)</code>.</li>
|
|
1282
|
+
<li>Replaces <code>core = inputs.get("core")</code> with <code>core = resolve_prism_core(inputs)</code>.</li>
|
|
1283
|
+
</ol>
|
|
1284
|
+
<p>This means <code>prism_*</code> nodes never need to wire a <code>core</code> input — PrismCore is<br />
|
|
1285
|
+
resolved automatically from the shared cache.</p>
|
|
1286
|
+
<h3 id="compilation-errors">Compilation errors</h3>
|
|
1287
|
+
<p>If <code>exec()</code> raises or the resulting class does not subclass <code>BaseNode</code>,<br />
|
|
1288
|
+
<code>NodeRegistry.last_error</code> is set to a descriptive message and the node is not<br />
|
|
1289
|
+
registered. Check this attribute after loading if a node silently disappears.</p>
|
|
1290
|
+
<hr />
|
|
1291
|
+
<h2 id="13-register_node-function">13. register_node() Function</h2>
|
|
1292
|
+
<pre><code class="language-python">def register_node() -> Type[BaseNode]:
|
|
1293
|
+
return My_Node_Class
|
|
1294
|
+
</code></pre>
|
|
1295
|
+
<p><code>register_node</code> must be a module-level function (not a method) that returns the<br />
|
|
1296
|
+
node class (not an instance). The registry calls it once at load time.</p>
|
|
1297
|
+
<h3 id="why-not-just-import-the-class">Why not just import the class?</h3>
|
|
1298
|
+
<p>Using a function makes the registry agnostic to the class name. The function<br />
|
|
1299
|
+
acts as an explicit declaration: "this is the node class for this file."</p>
|
|
1300
|
+
<h3 id="alternative-no-register_node">Alternative: no register_node</h3>
|
|
1301
|
+
<p>If <code>register_node</code> is absent but an <code>execute</code> function exists at module level,<br />
|
|
1302
|
+
the registry creates a <code>DynamicNode</code> wrapper. This simplified format works for<br />
|
|
1303
|
+
stateless one-file nodes but does not support lifecycle hooks.</p>
|
|
1304
|
+
<hr />
|
|
1305
|
+
<h2 id="14-exec-flow-semantics">14. Exec Flow Semantics</h2>
|
|
1306
|
+
<h3 id="when-exec_out-fires">When exec_out fires</h3>
|
|
1307
|
+
<p><code>exec_out</code> fires in two ways:</p>
|
|
1308
|
+
<ol>
|
|
1309
|
+
<li><strong>Via return dict</strong> — <code>return {"exec_out": True}</code>. The engine processes the<br />
|
|
1310
|
+
full return dict after <code>execute()</code> returns, then triggers exec chains.</li>
|
|
1311
|
+
<li><strong>Via set_output</strong> — <code>await self.set_output("exec_out", True)</code>. The exec<br />
|
|
1312
|
+
chain fires immediately at that point, before <code>execute()</code> returns.</li>
|
|
1313
|
+
</ol>
|
|
1314
|
+
<p>For simple nodes, use the return dict. For loops and streaming patterns, use<br />
|
|
1315
|
+
<code>set_output()</code>.</p>
|
|
1316
|
+
<h3 id="when-set_output-fires-vs-return-dict">When set_output fires vs. return dict</h3>
|
|
1317
|
+
<pre><code>execute() called
|
|
1318
|
+
│
|
|
1319
|
+
├── await self.set_output("partial", val) ← fires NOW (reactive)
|
|
1320
|
+
│ └── downstream data nodes updated
|
|
1321
|
+
│
|
|
1322
|
+
├── await self.set_output("exec_step", True) ← fires NOW (exec chain)
|
|
1323
|
+
│ └── downstream exec nodes run to completion
|
|
1324
|
+
│ └── control returns here after all downstream nodes finish
|
|
1325
|
+
│
|
|
1326
|
+
├── ... more loop iterations ...
|
|
1327
|
+
│
|
|
1328
|
+
└── return {"result": val, "exec_out": True}
|
|
1329
|
+
└── exec_out chain fires AFTER execute() returns
|
|
1330
|
+
</code></pre>
|
|
1331
|
+
<h3 id="bypass-mode">Bypass mode</h3>
|
|
1332
|
+
<p>When a node is bypassed (user right-clicked → Bypass), the engine skips<br />
|
|
1333
|
+
<code>execute()</code> and instead fires all exec outputs unconditionally, passing data<br />
|
|
1334
|
+
through unchanged. This allows the pipeline to run end-to-end even when<br />
|
|
1335
|
+
individual nodes are disabled.</p>
|
|
1336
|
+
<hr />
|
|
1337
|
+
<h2 id="15-multiple-exec-outputs">15. Multiple Exec Outputs</h2>
|
|
1338
|
+
<p>Use multiple exec outputs to implement branching:</p>
|
|
1339
|
+
<pre><code class="language-python">self.add_exec_output("exec_success") # fires when operation succeeds
|
|
1340
|
+
self.add_exec_output("exec_fail") # fires when operation fails
|
|
1341
|
+
</code></pre>
|
|
1342
|
+
<p>Only one branch fires per run (unless you explicitly fire both):</p>
|
|
1343
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
1344
|
+
try:
|
|
1345
|
+
result = risky_operation()
|
|
1346
|
+
await self.set_output("exec_success", True)
|
|
1347
|
+
return {"result": result, "exec_success": True, "exec_fail": False}
|
|
1348
|
+
except Exception as e:
|
|
1349
|
+
self.log_error(str(e))
|
|
1350
|
+
await self.set_output("exec_fail", True)
|
|
1351
|
+
return {"result": None, "exec_success": False, "exec_fail": True}
|
|
1352
|
+
</code></pre>
|
|
1353
|
+
<p>Wire <code>exec_success</code> to normal downstream nodes and <code>exec_fail</code> to error<br />
|
|
1354
|
+
handling nodes (e.g., a notification node or a cleanup node).</p>
|
|
1355
|
+
<h3 id="groupnode-exec-branches">GroupNode exec branches</h3>
|
|
1356
|
+
<p><code>GroupNode</code> uses exactly this pattern:<br />
|
|
1357
|
+
- <code>exec_out</code> fires when the inner graph completes without exceptions.<br />
|
|
1358
|
+
- <code>exec_fail</code> fires when an inner node emits <code>node_error</code>.</p>
|
|
1359
|
+
<hr />
|
|
1360
|
+
<h2 id="16-groupnode-pattern">16. GroupNode Pattern</h2>
|
|
1361
|
+
<p>A <code>GroupNode</code> is a node that embeds a complete <code>WorkflowModel</code> and executes it<br />
|
|
1362
|
+
via a headless <code>NetworkExecutor</code> sub-process when triggered.</p>
|
|
1363
|
+
<h3 id="how-groupnode-executes">How GroupNode executes</h3>
|
|
1364
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
1365
|
+
workflow = WorkflowModel.model_validate(self.parameters["__workflow__"])
|
|
1366
|
+
|
|
1367
|
+
# Inject external inputs into group_in nodes
|
|
1368
|
+
for node_model in workflow.nodes:
|
|
1369
|
+
if node_model.node_id == "group_in":
|
|
1370
|
+
port_name = node_model.parameters.get("port_name", "")
|
|
1371
|
+
if port_name in inputs:
|
|
1372
|
+
node_model.parameters["_injected_value"] = inputs[port_name]
|
|
1373
|
+
|
|
1374
|
+
gm = GraphManager()
|
|
1375
|
+
gm.from_model(workflow)
|
|
1376
|
+
|
|
1377
|
+
sub_executor = NetworkExecutor(gm)
|
|
1378
|
+
await sub_executor.run()
|
|
1379
|
+
|
|
1380
|
+
# Collect outputs from group_out nodes
|
|
1381
|
+
for inst_id, node_model in gm.nodes.items():
|
|
1382
|
+
if node_model.node_id == "group_out":
|
|
1383
|
+
port_name = node_model.parameters.get("port_name", "")
|
|
1384
|
+
value = sub_executor.node_results.get(inst_id, {}).get("value")
|
|
1385
|
+
await self.set_output(port_name, value)
|
|
1386
|
+
</code></pre>
|
|
1387
|
+
<h3 id="creating-nodes-that-run-sub-executors">Creating nodes that run sub-executors</h3>
|
|
1388
|
+
<p>If you want a custom node that runs a sub-workflow, follow this pattern:<br />
|
|
1389
|
+
- Store the sub-workflow as <code>self.parameters["__workflow__"]</code> (a dict).<br />
|
|
1390
|
+
- In <code>restore_from_parameters()</code>, recreate dynamic ports from <code>parameters["__port_defs__"]</code>.<br />
|
|
1391
|
+
- In <code>execute()</code>, instantiate <code>GraphManager</code>, call <code>gm.from_model(workflow)</code>,<br />
|
|
1392
|
+
create <code>NetworkExecutor(gm)</code>, and <code>await sub_executor.run()</code>.<br />
|
|
1393
|
+
- Save outer <code>BaseNode.memory</code> before and restore it after (the sub-executor<br />
|
|
1394
|
+
clears memory on startup).</p>
|
|
1395
|
+
<h3 id="groupinnode-injection-key">GroupInNode injection key</h3>
|
|
1396
|
+
<p>GroupInNode reads <code>self.parameters["_injected_value"]</code> — not <code>"value"</code>. This<br />
|
|
1397
|
+
is critical because <code>"value"</code> is an output port and <code>clear_outputs()</code> resets it<br />
|
|
1398
|
+
to <code>None</code> before <code>execute()</code> is called. The <code>"_injected_value"</code> key is written<br />
|
|
1399
|
+
by the parent GroupNode after <code>clear_outputs()</code> has already run.</p>
|
|
1400
|
+
<hr />
|
|
1401
|
+
<h2 id="17-quick-reference-tables">17. Quick-Reference Tables</h2>
|
|
1402
|
+
<h3 id="all-port-data-types">All port data types</h3>
|
|
1403
|
+
<table>
|
|
1404
|
+
<thead>
|
|
1405
|
+
<tr>
|
|
1406
|
+
<th>Type</th>
|
|
1407
|
+
<th>Widget types available</th>
|
|
1408
|
+
<th>Default value</th>
|
|
1409
|
+
</tr>
|
|
1410
|
+
</thead>
|
|
1411
|
+
<tbody>
|
|
1412
|
+
<tr>
|
|
1413
|
+
<td><code>string</code></td>
|
|
1414
|
+
<td><code>text</code>, <code>text_area</code>, <code>dropdown</code>, <code>file</code>, <code>file_save</code></td>
|
|
1415
|
+
<td><code>""</code></td>
|
|
1416
|
+
</tr>
|
|
1417
|
+
<tr>
|
|
1418
|
+
<td><code>int</code></td>
|
|
1419
|
+
<td><code>int</code>, <code>slider</code></td>
|
|
1420
|
+
<td><code>0</code></td>
|
|
1421
|
+
</tr>
|
|
1422
|
+
<tr>
|
|
1423
|
+
<td><code>float</code></td>
|
|
1424
|
+
<td><code>float</code>, <code>slider</code></td>
|
|
1425
|
+
<td><code>0</code></td>
|
|
1426
|
+
</tr>
|
|
1427
|
+
<tr>
|
|
1428
|
+
<td><code>bool</code></td>
|
|
1429
|
+
<td><code>bool</code> (checkbox)</td>
|
|
1430
|
+
<td><code>False</code></td>
|
|
1431
|
+
</tr>
|
|
1432
|
+
<tr>
|
|
1433
|
+
<td><code>list</code></td>
|
|
1434
|
+
<td>none</td>
|
|
1435
|
+
<td><code>[]</code></td>
|
|
1436
|
+
</tr>
|
|
1437
|
+
<tr>
|
|
1438
|
+
<td><code>dict</code></td>
|
|
1439
|
+
<td>none</td>
|
|
1440
|
+
<td><code>{}</code></td>
|
|
1441
|
+
</tr>
|
|
1442
|
+
<tr>
|
|
1443
|
+
<td><code>any</code></td>
|
|
1444
|
+
<td>none (generic)</td>
|
|
1445
|
+
<td><code>None</code></td>
|
|
1446
|
+
</tr>
|
|
1447
|
+
<tr>
|
|
1448
|
+
<td><code>exec</code></td>
|
|
1449
|
+
<td>none (internal)</td>
|
|
1450
|
+
<td><code>None</code></td>
|
|
1451
|
+
</tr>
|
|
1452
|
+
</tbody>
|
|
1453
|
+
</table>
|
|
1454
|
+
<h3 id="all-widget-types">All widget types</h3>
|
|
1455
|
+
<table>
|
|
1456
|
+
<thead>
|
|
1457
|
+
<tr>
|
|
1458
|
+
<th><code>widget_type</code></th>
|
|
1459
|
+
<th>Data type</th>
|
|
1460
|
+
<th>Description</th>
|
|
1461
|
+
</tr>
|
|
1462
|
+
</thead>
|
|
1463
|
+
<tbody>
|
|
1464
|
+
<tr>
|
|
1465
|
+
<td><code>text</code></td>
|
|
1466
|
+
<td>string</td>
|
|
1467
|
+
<td>Single-line text input</td>
|
|
1468
|
+
</tr>
|
|
1469
|
+
<tr>
|
|
1470
|
+
<td><code>text_area</code></td>
|
|
1471
|
+
<td>string</td>
|
|
1472
|
+
<td>Multi-line text editor</td>
|
|
1473
|
+
</tr>
|
|
1474
|
+
<tr>
|
|
1475
|
+
<td><code>int</code></td>
|
|
1476
|
+
<td>int</td>
|
|
1477
|
+
<td>Integer spinner</td>
|
|
1478
|
+
</tr>
|
|
1479
|
+
<tr>
|
|
1480
|
+
<td><code>float</code></td>
|
|
1481
|
+
<td>float</td>
|
|
1482
|
+
<td>Float spinner</td>
|
|
1483
|
+
</tr>
|
|
1484
|
+
<tr>
|
|
1485
|
+
<td><code>bool</code></td>
|
|
1486
|
+
<td>bool</td>
|
|
1487
|
+
<td>Checkbox toggle</td>
|
|
1488
|
+
</tr>
|
|
1489
|
+
<tr>
|
|
1490
|
+
<td><code>dropdown</code></td>
|
|
1491
|
+
<td>string</td>
|
|
1492
|
+
<td>Combo box; requires <code>options</code> list</td>
|
|
1493
|
+
</tr>
|
|
1494
|
+
<tr>
|
|
1495
|
+
<td><code>slider</code></td>
|
|
1496
|
+
<td>int or float</td>
|
|
1497
|
+
<td>0–100 range slider</td>
|
|
1498
|
+
</tr>
|
|
1499
|
+
<tr>
|
|
1500
|
+
<td><code>file</code></td>
|
|
1501
|
+
<td>string</td>
|
|
1502
|
+
<td>File path picker (open)</td>
|
|
1503
|
+
</tr>
|
|
1504
|
+
<tr>
|
|
1505
|
+
<td><code>file_save</code></td>
|
|
1506
|
+
<td>string</td>
|
|
1507
|
+
<td>File path picker (save)</td>
|
|
1508
|
+
</tr>
|
|
1509
|
+
</tbody>
|
|
1510
|
+
</table>
|
|
1511
|
+
<h3 id="all-basenode-methods">All BaseNode methods</h3>
|
|
1512
|
+
<table>
|
|
1513
|
+
<thead>
|
|
1514
|
+
<tr>
|
|
1515
|
+
<th>Method</th>
|
|
1516
|
+
<th>Async</th>
|
|
1517
|
+
<th>Returns</th>
|
|
1518
|
+
<th>Description</th>
|
|
1519
|
+
</tr>
|
|
1520
|
+
</thead>
|
|
1521
|
+
<tbody>
|
|
1522
|
+
<tr>
|
|
1523
|
+
<td><code>add_input(name, type, widget_type, options, default)</code></td>
|
|
1524
|
+
<td>No</td>
|
|
1525
|
+
<td>None</td>
|
|
1526
|
+
<td>Add input port</td>
|
|
1527
|
+
</tr>
|
|
1528
|
+
<tr>
|
|
1529
|
+
<td><code>add_output(name, type, default)</code></td>
|
|
1530
|
+
<td>No</td>
|
|
1531
|
+
<td>None</td>
|
|
1532
|
+
<td>Add output port</td>
|
|
1533
|
+
</tr>
|
|
1534
|
+
<tr>
|
|
1535
|
+
<td><code>add_exec_input(name)</code></td>
|
|
1536
|
+
<td>No</td>
|
|
1537
|
+
<td>None</td>
|
|
1538
|
+
<td>Add exec input port</td>
|
|
1539
|
+
</tr>
|
|
1540
|
+
<tr>
|
|
1541
|
+
<td><code>add_exec_output(name)</code></td>
|
|
1542
|
+
<td>No</td>
|
|
1543
|
+
<td>None</td>
|
|
1544
|
+
<td>Add exec output port</td>
|
|
1545
|
+
</tr>
|
|
1546
|
+
<tr>
|
|
1547
|
+
<td><code>add_parameter(name, type, default)</code></td>
|
|
1548
|
+
<td>No</td>
|
|
1549
|
+
<td>None</td>
|
|
1550
|
+
<td>Add internal parameter</td>
|
|
1551
|
+
</tr>
|
|
1552
|
+
<tr>
|
|
1553
|
+
<td><code>rebuild_ports()</code></td>
|
|
1554
|
+
<td>No</td>
|
|
1555
|
+
<td>None</td>
|
|
1556
|
+
<td>Notify UI to redraw ports</td>
|
|
1557
|
+
</tr>
|
|
1558
|
+
<tr>
|
|
1559
|
+
<td><code>is_port_connected(name, is_input)</code></td>
|
|
1560
|
+
<td>No</td>
|
|
1561
|
+
<td><code>bool</code></td>
|
|
1562
|
+
<td>Check if port has a wire</td>
|
|
1563
|
+
</tr>
|
|
1564
|
+
<tr>
|
|
1565
|
+
<td><code>is_stopped()</code></td>
|
|
1566
|
+
<td>No</td>
|
|
1567
|
+
<td><code>bool</code></td>
|
|
1568
|
+
<td>Check if pipeline was cancelled</td>
|
|
1569
|
+
</tr>
|
|
1570
|
+
<tr>
|
|
1571
|
+
<td><code>set_output(name, value)</code></td>
|
|
1572
|
+
<td>Yes</td>
|
|
1573
|
+
<td>None</td>
|
|
1574
|
+
<td>Reactive value push</td>
|
|
1575
|
+
</tr>
|
|
1576
|
+
<tr>
|
|
1577
|
+
<td><code>clear_outputs()</code></td>
|
|
1578
|
+
<td>No</td>
|
|
1579
|
+
<td>None</td>
|
|
1580
|
+
<td>Reset outputs to defaults</td>
|
|
1581
|
+
</tr>
|
|
1582
|
+
<tr>
|
|
1583
|
+
<td><code>set_parameter(name, value)</code></td>
|
|
1584
|
+
<td>No</td>
|
|
1585
|
+
<td>None</td>
|
|
1586
|
+
<td>Set parameter (handles dropdown)</td>
|
|
1587
|
+
</tr>
|
|
1588
|
+
<tr>
|
|
1589
|
+
<td><code>get_parameter(name, default)</code></td>
|
|
1590
|
+
<td>No</td>
|
|
1591
|
+
<td><code>Any</code></td>
|
|
1592
|
+
<td>Safe parameter read</td>
|
|
1593
|
+
</tr>
|
|
1594
|
+
<tr>
|
|
1595
|
+
<td><code>log_info(msg)</code></td>
|
|
1596
|
+
<td>No</td>
|
|
1597
|
+
<td>None</td>
|
|
1598
|
+
<td>Info log message</td>
|
|
1599
|
+
</tr>
|
|
1600
|
+
<tr>
|
|
1601
|
+
<td><code>log_success(msg)</code></td>
|
|
1602
|
+
<td>No</td>
|
|
1603
|
+
<td>None</td>
|
|
1604
|
+
<td>Success log message</td>
|
|
1605
|
+
</tr>
|
|
1606
|
+
<tr>
|
|
1607
|
+
<td><code>log_error(msg)</code></td>
|
|
1608
|
+
<td>No</td>
|
|
1609
|
+
<td>None</td>
|
|
1610
|
+
<td>Error log message</td>
|
|
1611
|
+
</tr>
|
|
1612
|
+
<tr>
|
|
1613
|
+
<td><code>execute(inputs)</code></td>
|
|
1614
|
+
<td>Yes</td>
|
|
1615
|
+
<td><code>dict</code></td>
|
|
1616
|
+
<td><strong>Abstract — implement this</strong></td>
|
|
1617
|
+
</tr>
|
|
1618
|
+
<tr>
|
|
1619
|
+
<td><code>restore_from_parameters(params)</code></td>
|
|
1620
|
+
<td>No</td>
|
|
1621
|
+
<td>None</td>
|
|
1622
|
+
<td>Override to restore dynamic ports</td>
|
|
1623
|
+
</tr>
|
|
1624
|
+
<tr>
|
|
1625
|
+
<td><code>on_parameter_changed(name, value)</code></td>
|
|
1626
|
+
<td>Yes</td>
|
|
1627
|
+
<td>None</td>
|
|
1628
|
+
<td>Override for reactive response</td>
|
|
1629
|
+
</tr>
|
|
1630
|
+
<tr>
|
|
1631
|
+
<td><code>on_plug(port, is_input, node, port)</code></td>
|
|
1632
|
+
<td>Yes</td>
|
|
1633
|
+
<td>None</td>
|
|
1634
|
+
<td>Override for async connection event</td>
|
|
1635
|
+
</tr>
|
|
1636
|
+
<tr>
|
|
1637
|
+
<td><code>on_plug_sync(port, is_input, node, port)</code></td>
|
|
1638
|
+
<td>No</td>
|
|
1639
|
+
<td>None</td>
|
|
1640
|
+
<td>Override for sync connection event</td>
|
|
1641
|
+
</tr>
|
|
1642
|
+
<tr>
|
|
1643
|
+
<td><code>on_unplug(port, is_input)</code></td>
|
|
1644
|
+
<td>Yes</td>
|
|
1645
|
+
<td>None</td>
|
|
1646
|
+
<td>Override for async disconnect event</td>
|
|
1647
|
+
</tr>
|
|
1648
|
+
<tr>
|
|
1649
|
+
<td><code>on_unplug_sync(port, is_input)</code></td>
|
|
1650
|
+
<td>No</td>
|
|
1651
|
+
<td>None</td>
|
|
1652
|
+
<td>Override for sync disconnect event</td>
|
|
1653
|
+
</tr>
|
|
1654
|
+
</tbody>
|
|
1655
|
+
</table>
|
|
1656
|
+
<hr />
|
|
1657
|
+
<h2 id="18-packaging-node-plugins">18. Packaging Node Plugins</h2>
|
|
1658
|
+
<p>A node plugin is a directory containing one or more node files plus an optional<br />
|
|
1659
|
+
metadata manifest.</p>
|
|
1660
|
+
<h3 id="recommended-directory-structure">Recommended directory structure</h3>
|
|
1661
|
+
<pre><code>my_nodes/
|
|
1662
|
+
├── README.md ← (optional) human docs
|
|
1663
|
+
├── nodes/
|
|
1664
|
+
│ ├── my_category/
|
|
1665
|
+
│ │ ├── my_node_a.json
|
|
1666
|
+
│ │ └── my_node_b.json
|
|
1667
|
+
│ └── my_other_node.json
|
|
1668
|
+
├── icons/
|
|
1669
|
+
│ └── my_icon.svg
|
|
1670
|
+
└── scripts/
|
|
1671
|
+
└── my_script.py
|
|
1672
|
+
</code></pre>
|
|
1673
|
+
<p>The <code>NodeRegistry._load_directory()</code> method walks the directory recursively, so<br />
|
|
1674
|
+
any depth of nesting works.</p>
|
|
1675
|
+
<h3 id="icon-paths">Icon paths</h3>
|
|
1676
|
+
<p>If your nodes reference custom icons, use paths relative to the <strong>app root</strong><br />
|
|
1677
|
+
(where <code>src/main.py</code> lives), not relative to the plugin directory. When<br />
|
|
1678
|
+
distributing a plugin, either:<br />
|
|
1679
|
+
- Include the icons in the app's <code>icons/</code> directory.<br />
|
|
1680
|
+
- Use absolute paths in <code>icon_path</code>.<br />
|
|
1681
|
+
- Accept that icons will be missing on other machines (the node still works).</p>
|
|
1682
|
+
<h3 id="node-file-format-checklist">Node file format checklist</h3>
|
|
1683
|
+
<p>Before packaging:<br />
|
|
1684
|
+
- <code>node_id</code> and <code>name</code> match and are snake_case.<br />
|
|
1685
|
+
- <code>python_code</code> compiles without errors (<code>exec(code, {})</code> in a Python REPL).<br />
|
|
1686
|
+
- All ports declared in <code>inputs</code>/<code>outputs</code> have matching <code>add_input</code>/<code>add_output</code><br />
|
|
1687
|
+
calls in <code>python_code</code>.<br />
|
|
1688
|
+
- <code>exec_in</code>/<code>exec_out</code> are not added manually in <code>__init__</code> for <code>use_exec=true</code> nodes.<br />
|
|
1689
|
+
- <code>register_node()</code> returns the correct class.<br />
|
|
1690
|
+
- The class has <code>name = "node_id"</code> matching the JSON.</p>
|
|
1691
|
+
<hr />
|
|
1692
|
+
<h2 id="19-distributing-nodes">19. Distributing Nodes</h2>
|
|
1693
|
+
<h3 id="using-the-v_nodes_dir-environment-variable">Using the v_nodes_dir environment variable</h3>
|
|
1694
|
+
<p>Set <code>v_nodes_dir</code> to a colon-separated (Unix) or semicolon-separated (Windows)<br />
|
|
1695
|
+
list of directories. <code>NodeRegistry.load_all_with_extras()</code> loads nodes from<br />
|
|
1696
|
+
every directory in this list after loading the bundled nodes.</p>
|
|
1697
|
+
<pre><code class="language-bash"># Unix
|
|
1698
|
+
export v_nodes_dir="/home/user/my_nodes:/shared/studio_nodes"
|
|
1699
|
+
|
|
1700
|
+
# Windows
|
|
1701
|
+
set v_nodes_dir=C:\my_nodes;\\fileserver\studio_nodes
|
|
1702
|
+
</code></pre>
|
|
1703
|
+
<h3 id="houdini-plugin-integration">Houdini plugin integration</h3>
|
|
1704
|
+
<p>For nodes specific to Houdini, place them in the plugin's <code>v_nodes_houdini/</code><br />
|
|
1705
|
+
folder. The Houdini launch script (<code>vibrante_node_houdini.py</code>) sets<br />
|
|
1706
|
+
<code>v_nodes_dir</code> to include this folder automatically.</p>
|
|
1707
|
+
<pre><code>plugins/houdini/
|
|
1708
|
+
└── v_nodes_houdini/
|
|
1709
|
+
├── hou_create_geo.json
|
|
1710
|
+
├── hou_set_parm.json
|
|
1711
|
+
└── ...
|
|
1712
|
+
</code></pre>
|
|
1713
|
+
<p>These nodes appear in the library only when the app is launched from Houdini.</p>
|
|
1714
|
+
<h3 id="registering-nodes-programmatically">Registering nodes programmatically</h3>
|
|
1715
|
+
<pre><code class="language-python">from src.core.registry import NodeRegistry
|
|
1716
|
+
|
|
1717
|
+
# Load an entire directory
|
|
1718
|
+
NodeRegistry._load_directory("/path/to/my_nodes")
|
|
1719
|
+
|
|
1720
|
+
# Load a single file
|
|
1721
|
+
NodeRegistry.load_node("/path/to/my_node.json")
|
|
1722
|
+
|
|
1723
|
+
# Register a Python class directly (for built-ins)
|
|
1724
|
+
NodeRegistry._register_builtin_class(MyNodeClass)
|
|
1725
|
+
</code></pre>
|
|
1726
|
+
<h3 id="reloading-a-node-after-editing">Reloading a node after editing</h3>
|
|
1727
|
+
<pre><code class="language-python"># After editing my_node.json on disk:
|
|
1728
|
+
NodeRegistry.reload_node_definition("my_node")
|
|
1729
|
+
</code></pre>
|
|
1730
|
+
<p>This re-reads the JSON, re-compiles the Python code, and replaces the class in<br />
|
|
1731
|
+
<code>_classes</code>. Existing <code>NodeWidget</code> instances in the canvas are <strong>not</strong> updated<br />
|
|
1732
|
+
automatically — close and reopen the workflow, or refresh via the Node Builder.</p>
|
|
1733
|
+
<h3 id="checking-for-registration-errors">Checking for registration errors</h3>
|
|
1734
|
+
<pre><code class="language-python">if not NodeRegistry.load_node("/path/to/my_node.json"):
|
|
1735
|
+
print(NodeRegistry.last_error)
|
|
1736
|
+
</code></pre>
|
|
1737
|
+
<p><code>last_error</code> is a string describing the most recent load failure, or <code>None</code> if<br />
|
|
1738
|
+
the last load succeeded.</p>
|
|
1739
|
+
<nav class="page-nav">
|
|
1740
|
+
<a class="page-nav-link prev" href="13_general_purpose_automation.html"><span class="page-nav-label">Previous</span><span class="page-nav-title">General Purpose Automation</span></a>
|
|
1741
|
+
|
|
1742
|
+
</nav>
|
|
1743
|
+
<section class="licence-attribution" style="margin-top:40px;padding-top:14px;border-top:1px solid #313244;font-size:.82em;color:#a6adc8">
|
|
1744
|
+
<p>Documentation &copy; 2024&ndash;2026 Mahmoud Kamal (KamalTD), licensed under
|
|
1745
|
+
<a href="https://creativecommons.org/licenses/by/4.0/" rel="license">CC BY 4.0</a>.
|
|
1746
|
+
<a href="../LICENSE.txt">Full licence notice</a>.</p>
|
|
1747
|
+
<p>Search and syntax highlighting load <a href="https://lunrjs.com/">lunr.js</a> 2.3.9 (MIT)
|
|
1748
|
+
and <a href="https://highlightjs.org/">highlight.js</a> 11.9.0 (BSD-3-Clause) from
|
|
1749
|
+
cdn.jsdelivr.net at view time; neither library is redistributed with these files.</p>
|
|
1750
|
+
</section>
|
|
1751
|
+
</div>
|
|
1752
|
+
</main>
|
|
1753
|
+
|
|
1754
|
+
<!-- ── TOC ────────────────────────────────────────────────────────────── -->
|
|
1755
|
+
<aside class="toc">
|
|
1756
|
+
<div class="toc-title">On this page</div>
|
|
1757
|
+
<a class="toc-link toc-h2" href="#table-of-contents">Table of Contents</a>
|
|
1758
|
+
<a class="toc-link toc-h2" href="#1-basenode-class-reference">1. BaseNode Class Reference</a>
|
|
1759
|
+
<a class="toc-link toc-h3" href="#class-attributes">Class Attributes</a>
|
|
1760
|
+
<a class="toc-link toc-h3" href="#instance-attributes">Instance Attributes</a>
|
|
1761
|
+
<a class="toc-link toc-h3" href="#internal-hooks-do-not-set-manually">Internal Hooks (do not set manually)</a>
|
|
1762
|
+
<a class="toc-link toc-h3" href="#constructor">Constructor</a>
|
|
1763
|
+
<a class="toc-link toc-h3" href="#port-management-methods">Port Management Methods</a>
|
|
1764
|
+
<a class="toc-link toc-h4" href="#add_input">add_input</a>
|
|
1765
|
+
<a class="toc-link toc-h4" href="#add_output">add_output</a>
|
|
1766
|
+
<a class="toc-link toc-h4" href="#add_exec_input">add_exec_input</a>
|
|
1767
|
+
<a class="toc-link toc-h4" href="#add_exec_output">add_exec_output</a>
|
|
1768
|
+
<a class="toc-link toc-h4" href="#add_parameter">add_parameter</a>
|
|
1769
|
+
<a class="toc-link toc-h4" href="#rebuild_ports">rebuild_ports</a>
|
|
1770
|
+
<a class="toc-link toc-h3" href="#parameter-access-methods">Parameter Access Methods</a>
|
|
1771
|
+
<a class="toc-link toc-h4" href="#set_parameter">set_parameter</a>
|
|
1772
|
+
<a class="toc-link toc-h4" href="#get_parameter">get_parameter</a>
|
|
1773
|
+
<a class="toc-link toc-h4" href="#__getitem__-shortcut">__getitem__ shortcut</a>
|
|
1774
|
+
<a class="toc-link toc-h3" href="#connection-query-methods">Connection Query Methods</a>
|
|
1775
|
+
<a class="toc-link toc-h4" href="#is_port_connected">is_port_connected</a>
|
|
1776
|
+
<a class="toc-link toc-h3" href="#logging-methods">Logging Methods</a>
|
|
1777
|
+
<a class="toc-link toc-h4" href="#log_info">log_info</a>
|
|
1778
|
+
<a class="toc-link toc-h4" href="#log_success">log_success</a>
|
|
1779
|
+
<a class="toc-link toc-h4" href="#log_error">log_error</a>
|
|
1780
|
+
<a class="toc-link toc-h3" href="#output-methods">Output Methods</a>
|
|
1781
|
+
<a class="toc-link toc-h4" href="#set_output-async">set_output (async)</a>
|
|
1782
|
+
<a class="toc-link toc-h4" href="#clear_outputs">clear_outputs</a>
|
|
1783
|
+
<a class="toc-link toc-h3" href="#cancellation">Cancellation</a>
|
|
1784
|
+
<a class="toc-link toc-h4" href="#is_stopped">is_stopped</a>
|
|
1785
|
+
<a class="toc-link toc-h3" href="#abstract-method">Abstract Method</a>
|
|
1786
|
+
<a class="toc-link toc-h4" href="#execute-async-abstract">execute (async, abstract)</a>
|
|
1787
|
+
<a class="toc-link toc-h2" href="#2-port-class-reference">2. Port Class Reference</a>
|
|
1788
|
+
<a class="toc-link toc-h3" href="#attributes">Attributes</a>
|
|
1789
|
+
<a class="toc-link toc-h3" href="#accessing-ports">Accessing ports</a>
|
|
1790
|
+
<a class="toc-link toc-h2" href="#3-exec-pin-mechanics">3. Exec Pin Mechanics</a>
|
|
1791
|
+
<a class="toc-link toc-h3" href="#exec_in">exec_in</a>
|
|
1792
|
+
<a class="toc-link toc-h3" href="#exec_out">exec_out</a>
|
|
1793
|
+
<a class="toc-link toc-h3" href="#how-the-exec-chain-works">How the exec chain works</a>
|
|
1794
|
+
<a class="toc-link toc-h3" href="#exec-pins-added-by-superinit">exec pins added by super().init()</a>
|
|
1795
|
+
<a class="toc-link toc-h3" href="#deleting-the-default-exec_out">Deleting the default exec_out</a>
|
|
1796
|
+
<a class="toc-link toc-h2" href="#4-set_output-reactive-system">4. set_output() Reactive System</a>
|
|
1797
|
+
<a class="toc-link toc-h3" href="#what-happens-when-you-call-set_output">What happens when you call set_output</a>
|
|
1798
|
+
<a class="toc-link toc-h3" href="#ordering-set_output-vs-return-dict">Ordering: set_output vs. return dict</a>
|
|
1799
|
+
<a class="toc-link toc-h3" href="#set_output-is-safe-to-call-multiple-times">set_output is safe to call multiple times</a>
|
|
1800
|
+
<a class="toc-link toc-h3" href="#set_output-on-exec-ports-flow-control">set_output on exec ports: flow control</a>
|
|
1801
|
+
<a class="toc-link toc-h2" href="#5-clear_outputs-call-sequence">5. clear_outputs() Call Sequence</a>
|
|
1802
|
+
<a class="toc-link toc-h2" href="#6-is_stopped-cancellation">6. is_stopped() Cancellation</a>
|
|
1803
|
+
<a class="toc-link toc-h3" href="#pattern-for-long-operations">Pattern for long operations</a>
|
|
1804
|
+
<a class="toc-link toc-h3" href="#pattern-for-async-operations">Pattern for async operations</a>
|
|
1805
|
+
<a class="toc-link toc-h2" href="#7-restore_from_parameters">7. restore_from_parameters()</a>
|
|
1806
|
+
<a class="toc-link toc-h3" href="#when-to-override">When to override</a>
|
|
1807
|
+
<a class="toc-link toc-h3" href="#typical-pattern">Typical pattern</a>
|
|
1808
|
+
<a class="toc-link toc-h3" href="#important-do-not-call-rebuild_ports-here">Important: do not call rebuild_ports() here</a>
|
|
1809
|
+
<a class="toc-link toc-h2" href="#8-on_parameter_changed-hook">8. on_parameter_changed() Hook</a>
|
|
1810
|
+
<a class="toc-link toc-h3" href="#use-cases">Use cases</a>
|
|
1811
|
+
<a class="toc-link toc-h3" href="#example-reactive-switch">Example: reactive switch</a>
|
|
1812
|
+
<a class="toc-link toc-h2" href="#9-on_plug-on_unplug-hooks">9. on_plug / on_unplug Hooks</a>
|
|
1813
|
+
<a class="toc-link toc-h3" href="#on_plug-async">on_plug (async)</a>
|
|
1814
|
+
<a class="toc-link toc-h3" href="#on_plug_sync">on_plug_sync</a>
|
|
1815
|
+
<a class="toc-link toc-h3" href="#on_unplug-async">on_unplug (async)</a>
|
|
1816
|
+
<a class="toc-link toc-h3" href="#on_unplug_sync">on_unplug_sync</a>
|
|
1817
|
+
<a class="toc-link toc-h2" href="#10-node-lifecycle">10. Node Lifecycle</a>
|
|
1818
|
+
<a class="toc-link toc-h2" href="#11-json-schema-reference">11. JSON Schema Reference</a>
|
|
1819
|
+
<a class="toc-link toc-h3" href="#top-level-fields">Top-level fields</a>
|
|
1820
|
+
<a class="toc-link toc-h3" href="#portmodel-fields">PortModel fields</a>
|
|
1821
|
+
<a class="toc-link toc-h3" href="#exec-pin-normalization">Exec pin normalization</a>
|
|
1822
|
+
<a class="toc-link toc-h3" href="#minimal-valid-json">Minimal valid JSON</a>
|
|
1823
|
+
<a class="toc-link toc-h2" href="#12-python_code-compilation">12. python_code Compilation</a>
|
|
1824
|
+
<a class="toc-link toc-h3" href="#class-attribute-injection">Class attribute injection</a>
|
|
1825
|
+
<a class="toc-link toc-h3" href="#prism-node-auto-patching">Prism node auto-patching</a>
|
|
1826
|
+
<a class="toc-link toc-h3" href="#compilation-errors">Compilation errors</a>
|
|
1827
|
+
<a class="toc-link toc-h2" href="#13-register_node-function">13. register_node() Function</a>
|
|
1828
|
+
<a class="toc-link toc-h3" href="#why-not-just-import-the-class">Why not just import the class?</a>
|
|
1829
|
+
<a class="toc-link toc-h3" href="#alternative-no-register_node">Alternative: no register_node</a>
|
|
1830
|
+
<a class="toc-link toc-h2" href="#14-exec-flow-semantics">14. Exec Flow Semantics</a>
|
|
1831
|
+
<a class="toc-link toc-h3" href="#when-exec_out-fires">When exec_out fires</a>
|
|
1832
|
+
<a class="toc-link toc-h3" href="#when-set_output-fires-vs-return-dict">When set_output fires vs. return dict</a>
|
|
1833
|
+
<a class="toc-link toc-h3" href="#bypass-mode">Bypass mode</a>
|
|
1834
|
+
<a class="toc-link toc-h2" href="#15-multiple-exec-outputs">15. Multiple Exec Outputs</a>
|
|
1835
|
+
<a class="toc-link toc-h3" href="#groupnode-exec-branches">GroupNode exec branches</a>
|
|
1836
|
+
<a class="toc-link toc-h2" href="#16-groupnode-pattern">16. GroupNode Pattern</a>
|
|
1837
|
+
<a class="toc-link toc-h3" href="#how-groupnode-executes">How GroupNode executes</a>
|
|
1838
|
+
<a class="toc-link toc-h3" href="#creating-nodes-that-run-sub-executors">Creating nodes that run sub-executors</a>
|
|
1839
|
+
<a class="toc-link toc-h3" href="#groupinnode-injection-key">GroupInNode injection key</a>
|
|
1840
|
+
<a class="toc-link toc-h2" href="#17-quick-reference-tables">17. Quick-Reference Tables</a>
|
|
1841
|
+
<a class="toc-link toc-h3" href="#all-port-data-types">All port data types</a>
|
|
1842
|
+
<a class="toc-link toc-h3" href="#all-widget-types">All widget types</a>
|
|
1843
|
+
<a class="toc-link toc-h3" href="#all-basenode-methods">All BaseNode methods</a>
|
|
1844
|
+
<a class="toc-link toc-h2" href="#18-packaging-node-plugins">18. Packaging Node Plugins</a>
|
|
1845
|
+
<a class="toc-link toc-h3" href="#recommended-directory-structure">Recommended directory structure</a>
|
|
1846
|
+
<a class="toc-link toc-h3" href="#icon-paths">Icon paths</a>
|
|
1847
|
+
<a class="toc-link toc-h3" href="#node-file-format-checklist">Node file format checklist</a>
|
|
1848
|
+
<a class="toc-link toc-h2" href="#19-distributing-nodes">19. Distributing Nodes</a>
|
|
1849
|
+
<a class="toc-link toc-h3" href="#using-the-v_nodes_dir-environment-variable">Using the v_nodes_dir environment variable</a>
|
|
1850
|
+
<a class="toc-link toc-h3" href="#houdini-plugin-integration">Houdini plugin integration</a>
|
|
1851
|
+
<a class="toc-link toc-h3" href="#registering-nodes-programmatically">Registering nodes programmatically</a>
|
|
1852
|
+
<a class="toc-link toc-h3" href="#reloading-a-node-after-editing">Reloading a node after editing</a>
|
|
1853
|
+
<a class="toc-link toc-h3" href="#checking-for-registration-errors">Checking for registration errors</a>
|
|
1854
|
+
</aside>
|
|
1855
|
+
|
|
1856
|
+
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/highlight.min.js"></script>
|
|
1857
|
+
<script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
|
|
1858
|
+
<script>
|
|
1859
|
+
// ── Search ──────────────────────────────────────────────────────────────
|
|
1860
|
+
let _idx = null, _docs = [];
|
|
1861
|
+
|
|
1862
|
+
async function initSearch() {
|
|
1863
|
+
try {
|
|
1864
|
+
const base = document.getElementById('portal-base').dataset.base;
|
|
1865
|
+
const resp = await fetch(base + 'search.json');
|
|
1866
|
+
_docs = await resp.json();
|
|
1867
|
+
_idx = lunr(function() {
|
|
1868
|
+
this.ref('id');
|
|
1869
|
+
this.field('title', { boost: 10 });
|
|
1870
|
+
this.field('body');
|
|
1871
|
+
_docs.forEach((d, i) => {
|
|
1872
|
+
this.add({ id: i, title: d.title, body: d.body });
|
|
1873
|
+
});
|
|
1874
|
+
});
|
|
1875
|
+
} catch(e) { console.warn('Search index not available', e); }
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
function doSearch(q) {
|
|
1879
|
+
const box = document.getElementById('search-results');
|
|
1880
|
+
if (!q || q.length < 2) { box.classList.remove('visible'); return; }
|
|
1881
|
+
if (!_idx) { box.innerHTML = '<div class="search-no-results">Search index loading…</div>'; box.classList.add('visible'); return; }
|
|
1882
|
+
const results = _idx.search(q + '~1');
|
|
1883
|
+
if (!results.length) {
|
|
1884
|
+
box.innerHTML = '<div class="search-no-results">No results for "' + q + '"</div>';
|
|
1885
|
+
box.classList.add('visible'); return;
|
|
1886
|
+
}
|
|
1887
|
+
box.innerHTML = results.slice(0, 8).map(r => {
|
|
1888
|
+
const d = _docs[r.ref];
|
|
1889
|
+
const excerpt = d.body.substring(0, 140).replace(/[#*`]/g, '').trim() + '…';
|
|
1890
|
+
return `<a class="search-result-item" href="${d.url}">
|
|
1891
|
+
<div class="search-result-title">${d.title}</div>
|
|
1892
|
+
<div class="search-result-excerpt">${excerpt}</div>
|
|
1893
|
+
</a>`;
|
|
1894
|
+
}).join('');
|
|
1895
|
+
box.classList.add('visible');
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1898
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
1899
|
+
initSearch();
|
|
1900
|
+
const inp = document.getElementById('search-input');
|
|
1901
|
+
if (inp) {
|
|
1902
|
+
inp.addEventListener('input', e => doSearch(e.target.value));
|
|
1903
|
+
inp.addEventListener('keydown', e => { if (e.key === 'Escape') { e.target.value=''; document.getElementById('search-results').classList.remove('visible'); }});
|
|
1904
|
+
}
|
|
1905
|
+
document.addEventListener('click', e => {
|
|
1906
|
+
if (!e.target.closest('.search-wrap')) document.getElementById('search-results')?.classList.remove('visible');
|
|
1907
|
+
});
|
|
1908
|
+
// Keyboard shortcut: / to focus search
|
|
1909
|
+
document.addEventListener('keydown', e => {
|
|
1910
|
+
if (e.key === '/' && !['INPUT','TEXTAREA'].includes(document.activeElement.tagName)) {
|
|
1911
|
+
e.preventDefault(); document.getElementById('search-input')?.focus();
|
|
1912
|
+
}
|
|
1913
|
+
});
|
|
1914
|
+
|
|
1915
|
+
// ── TOC active section ──────────────────────────────────────────────
|
|
1916
|
+
const tocLinks = document.querySelectorAll('.toc-link');
|
|
1917
|
+
const headings = document.querySelectorAll('h2[id],h3[id],h4[id]');
|
|
1918
|
+
if (tocLinks.length && headings.length) {
|
|
1919
|
+
const obs = new IntersectionObserver(entries => {
|
|
1920
|
+
entries.forEach(entry => {
|
|
1921
|
+
if (entry.isIntersecting) {
|
|
1922
|
+
tocLinks.forEach(l => l.classList.remove('active'));
|
|
1923
|
+
const link = document.querySelector(`.toc-link[href="#${entry.target.id}"]`);
|
|
1924
|
+
if (link) link.classList.add('active');
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
}, { rootMargin: '-20% 0px -70% 0px' });
|
|
1928
|
+
headings.forEach(h => obs.observe(h));
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
// ── Copy buttons ────────────────────────────────────────────────────
|
|
1932
|
+
document.querySelectorAll('pre').forEach(pre => {
|
|
1933
|
+
const btn = document.createElement('button');
|
|
1934
|
+
btn.className = 'copy-btn'; btn.textContent = 'Copy';
|
|
1935
|
+
btn.addEventListener('click', () => {
|
|
1936
|
+
const code = pre.querySelector('code');
|
|
1937
|
+
navigator.clipboard.writeText(code ? code.innerText : pre.innerText).then(() => {
|
|
1938
|
+
btn.textContent = 'Copied!'; btn.classList.add('copied');
|
|
1939
|
+
setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('copied'); }, 2000);
|
|
1940
|
+
});
|
|
1941
|
+
});
|
|
1942
|
+
pre.style.position = 'relative';
|
|
1943
|
+
pre.appendChild(btn);
|
|
1944
|
+
});
|
|
1945
|
+
|
|
1946
|
+
// ── Sidebar active ──────────────────────────────────────────────────
|
|
1947
|
+
const cur = window.location.pathname.split('/').pop();
|
|
1948
|
+
document.querySelectorAll('.sidebar-link').forEach(l => {
|
|
1949
|
+
if (l.getAttribute('href') === cur || l.getAttribute('href').endsWith(cur)) l.classList.add('active');
|
|
1950
|
+
});
|
|
1951
|
+
|
|
1952
|
+
// ── highlight.js ────────────────────────────────────────────────────
|
|
1953
|
+
if (window.hljs) {
|
|
1954
|
+
hljs.configure({ ignoreUnescapedHTML: true });
|
|
1955
|
+
hljs.highlightAll();
|
|
1956
|
+
}
|
|
1957
|
+
});
|
|
1958
|
+
</script>
|
|
1959
|
+
</body>
|
|
1960
|
+
</html>
|