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,1155 @@
|
|
|
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
|
+
<title>Node Builder API — Vibrante-Node v2.5.1</title>
|
|
7
|
+
<style>
|
|
8
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
+
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
10
|
+
background: #1e1e2e; color: #cdd6f4; line-height: 1.7; }
|
|
11
|
+
.sidebar { position: fixed; top: 0; left: 0; width: 220px; height: 100vh;
|
|
12
|
+
background: #181825; overflow-y: auto; padding: 20px 0; z-index: 100; }
|
|
13
|
+
.sidebar h2 { font-size: 13px; color: #6c7086; text-transform: uppercase;
|
|
14
|
+
letter-spacing: .08em; padding: 0 18px 10px; }
|
|
15
|
+
.sidebar a { display: block; padding: 6px 18px; color: #a6adc8; text-decoration: none;
|
|
16
|
+
font-size: 13px; border-left: 3px solid transparent; transition: all .15s; }
|
|
17
|
+
.sidebar a:hover, .sidebar a.active { color: #cba6f7; border-left-color: #cba6f7;
|
|
18
|
+
background: #1e1e2e; }
|
|
19
|
+
.sidebar .nav-release { font-size: 12px; padding: 4px 18px; }
|
|
20
|
+
.content { margin-left: 220px; max-width: 920px; padding: 40px 48px; }
|
|
21
|
+
h1 { font-size: 2em; color: #cba6f7; border-bottom: 2px solid #313244; padding-bottom: 10px; margin: 28px 0 16px; }
|
|
22
|
+
h2 { font-size: 1.45em; color: #89b4fa; margin: 32px 0 12px; }
|
|
23
|
+
h3 { font-size: 1.15em; color: #94e2d5; margin: 22px 0 8px; }
|
|
24
|
+
h4 { font-size: 1em; color: #f5c2e7; margin: 16px 0 6px; }
|
|
25
|
+
p { margin-bottom: 14px; color: #cdd6f4; }
|
|
26
|
+
a { color: #89b4fa; }
|
|
27
|
+
ul, ol { margin: 10px 0 14px 22px; }
|
|
28
|
+
li { margin-bottom: 5px; }
|
|
29
|
+
code { background: #313244; color: #f38ba8; padding: 2px 6px; border-radius: 4px; font-size: .88em; font-family: 'Consolas','Courier New',monospace; }
|
|
30
|
+
pre { background: #181825; border: 1px solid #313244; border-radius: 8px;
|
|
31
|
+
padding: 18px 20px; overflow-x: auto; margin: 14px 0 20px; }
|
|
32
|
+
pre code { background: none; color: #a6e3a1; padding: 0; font-size: .9em; }
|
|
33
|
+
table { border-collapse: collapse; width: 100%; margin: 14px 0 20px; font-size: .92em; }
|
|
34
|
+
th { background: #313244; color: #cba6f7; padding: 9px 14px; text-align: left; }
|
|
35
|
+
td { border-top: 1px solid #313244; padding: 8px 14px; }
|
|
36
|
+
tr:nth-child(even) td { background: #1e1e2e; }
|
|
37
|
+
hr { border: none; border-top: 1px solid #313244; margin: 28px 0; }
|
|
38
|
+
blockquote { border-left: 4px solid #6c7086; padding-left: 16px; color: #a6adc8; margin: 14px 0; }
|
|
39
|
+
@media (max-width: 700px) { .sidebar { display: none; } .content { margin-left: 0; padding: 24px 18px; } }
|
|
40
|
+
</style>
|
|
41
|
+
</head>
|
|
42
|
+
<body>
|
|
43
|
+
<nav class="sidebar">
|
|
44
|
+
<h2>Vibrante-Node</h2>
|
|
45
|
+
<a href="USER_GUIDE.html">User Guide</a>
|
|
46
|
+
<a href="NODE_BUILDER_API.html">Node Builder API</a>
|
|
47
|
+
<a href="AUTOMATION_API.html">Automation API</a>
|
|
48
|
+
<a href="DEVELOPER.html">Developer Documentation</a>
|
|
49
|
+
<a href="DOCUMENTATION.html">Technical Feature List</a>
|
|
50
|
+
<hr style="border-color:#313244;margin:10px 18px">
|
|
51
|
+
<h2 style="margin-top:8px">Release Notes</h2>
|
|
52
|
+
<a class="nav-release" href="RELEASE_v2.5.0.html">Release Notes v2.5.0</a>
|
|
53
|
+
<a class="nav-release" href="RELEASE_v2.5.0.html">Release Notes v2.5.0</a>
|
|
54
|
+
<a class="nav-release" href="RELEASE_v2.3.0.html">Release Notes v2.3.0</a>
|
|
55
|
+
<a class="nav-release" href="RELEASE_v2.2.1.html">Release Notes v2.2.1</a>
|
|
56
|
+
<a class="nav-release" href="RELEASE_v2.2.0.html">Release Notes v2.2.0</a>
|
|
57
|
+
<a class="nav-release" href="RELEASE_v2.1.1.html">Release Notes v2.1.1</a>
|
|
58
|
+
<a class="nav-release" href="RELEASE_v2.1.0.html">Release Notes v2.1.0</a>
|
|
59
|
+
<a class="nav-release" href="RELEASE_v2.0.0.html">Release Notes v2.0.0</a>
|
|
60
|
+
<a class="nav-release" href="RELEASE_v1.8.5.html">Release Notes v1.8.5</a>
|
|
61
|
+
<a class="nav-release" href="RELEASE_v1.8.4.html">Release Notes v1.8.4</a>
|
|
62
|
+
<a class="nav-release" href="RELEASE_v1.8.3.html">Release Notes v1.8.3</a>
|
|
63
|
+
<a class="nav-release" href="RELEASE_v1.8.2.html">Release Notes v1.8.2</a>
|
|
64
|
+
<a class="nav-release" href="RELEASE_v1.8.1.html">Release Notes v1.8.1</a>
|
|
65
|
+
<a class="nav-release" href="RELEASE_v1.8.0.html">Release Notes v1.8.0</a>
|
|
66
|
+
<a class="nav-release" href="RELEASE_v1.7.0.html">Release Notes v1.7.0</a>
|
|
67
|
+
<a class="nav-release" href="RELEASE_v1.6.1.html">Release Notes v1.6.1</a>
|
|
68
|
+
<a class="nav-release" href="RELEASE_v1.6.0.html">Release Notes v1.6.0</a>
|
|
69
|
+
<a class="nav-release" href="RELEASE_v1.5.0.html">Release Notes v1.5.0</a>
|
|
70
|
+
<a class="nav-release" href="RELEASE_v1.4.0.html">Release Notes v1.4.0</a>
|
|
71
|
+
<a class="nav-release" href="RELEASE_v1.3.0.html">Release Notes v1.3.0</a>
|
|
72
|
+
<a class="nav-release" href="RELEASE_v1.2.0.html">Release Notes v1.2.0</a>
|
|
73
|
+
<a class="nav-release" href="RELEASE_v1.1.5.html">Release Notes v1.1.5</a>
|
|
74
|
+
<a class="nav-release" href="RELEASE_v1.1.0.html">Release Notes v1.1.0</a>
|
|
75
|
+
<a class="nav-release" href="RELEASE_v1.0.5.html">Release Notes v1.0.5</a>
|
|
76
|
+
<hr style="border-color:#313244;margin:10px 18px">
|
|
77
|
+
<h2 style="margin-top:8px">On this page</h2>
|
|
78
|
+
<a href="#vibrante-node-node-builder-api" style="padding-left:18px">Vibrante-Node — Node Builder API</a>
|
|
79
|
+
<a href="#contents" style="padding-left:18px">Contents</a>
|
|
80
|
+
<a href="#1-node-architecture" style="padding-left:18px">1. Node Architecture</a>
|
|
81
|
+
<a href="#what-a-node-is" style="padding-left:32px">What a Node Is</a>
|
|
82
|
+
<a href="#node-lifecycle-during-execution" style="padding-left:32px">Node Lifecycle During Execution</a>
|
|
83
|
+
<a href="#minimal-node-example" style="padding-left:32px">Minimal Node Example</a>
|
|
84
|
+
<a href="#2-node-json-schema" style="padding-left:18px">2. Node JSON Schema</a>
|
|
85
|
+
<a href="#field-reference" style="padding-left:32px">Field Reference</a>
|
|
86
|
+
<a href="#3-basenode-class-reference" style="padding-left:18px">3. BaseNode Class Reference</a>
|
|
87
|
+
<a href="#class-attributes" style="padding-left:32px">Class Attributes</a>
|
|
88
|
+
<a href="#instance-attributes" style="padding-left:32px">Instance Attributes</a>
|
|
89
|
+
<a href="#constructor" style="padding-left:32px">Constructor</a>
|
|
90
|
+
<a href="#methods" style="padding-left:32px">Methods</a>
|
|
91
|
+
<a href="#execute-abstract" style="padding-left:32px">execute() — Abstract</a>
|
|
92
|
+
<a href="#4-port-system" style="padding-left:18px">4. Port System</a>
|
|
93
|
+
<a href="#port-types" style="padding-left:32px">Port Types</a>
|
|
94
|
+
<a href="#widget-types-input-ports-only" style="padding-left:32px">Widget Types (input ports only)</a>
|
|
95
|
+
<a href="#dropdown-ports" style="padding-left:32px">Dropdown Ports</a>
|
|
96
|
+
<a href="#port-definition-in-code-vs-json" style="padding-left:32px">Port Definition in Code vs JSON</a>
|
|
97
|
+
<a href="#5-lifecycle-hooks" style="padding-left:18px">5. Lifecycle Hooks</a>
|
|
98
|
+
<a href="#executeinputs-primary-hook" style="padding-left:32px">execute(inputs) — Primary Hook</a>
|
|
99
|
+
<a href="#on_parameter_changedname-value" style="padding-left:32px">on_parameter_changed(name, value)</a>
|
|
100
|
+
<a href="#on_plug_syncport_name-is_input-other_node-other_port_name" style="padding-left:32px">on_plug_sync(port_name, is_input, other_node, other_port_name)</a>
|
|
101
|
+
<a href="#on_unplug_syncport_name-is_input" style="padding-left:32px">on_unplug_sync(port_name, is_input)</a>
|
|
102
|
+
<a href="#on_plug-on_unplug-async-variants" style="padding-left:32px">on_plug / on_unplug — Async Variants</a>
|
|
103
|
+
<a href="#6-logging" style="padding-left:18px">6. Logging</a>
|
|
104
|
+
<a href="#7-advanced-patterns" style="padding-left:18px">7. Advanced Patterns</a>
|
|
105
|
+
<a href="#data-only-nodes-use_execfalse" style="padding-left:32px">Data-Only Nodes (use_exec=False)</a>
|
|
106
|
+
<a href="#reactive-output-set_output" style="padding-left:32px">Reactive Output — set_output()</a>
|
|
107
|
+
<a href="#dynamic-ports" style="padding-left:32px">Dynamic Ports</a>
|
|
108
|
+
<a href="#shared-state-basenodememory" style="padding-left:32px">Shared State — BaseNode.memory</a>
|
|
109
|
+
<a href="#stopping-gracefully" style="padding-left:32px">Stopping Gracefully</a>
|
|
110
|
+
<a href="#8-houdini-bridge-nodes" style="padding-left:18px">8. Houdini Bridge Nodes</a>
|
|
111
|
+
<a href="#setup" style="padding-left:32px">Setup</a>
|
|
112
|
+
<a href="#houbridge-method-quick-reference" style="padding-left:32px">HouBridge Method Quick Reference</a>
|
|
113
|
+
<a href="#9-headless-action-nodes-maya-and-blender" style="padding-left:18px">9. Headless Action Nodes — Maya and Blender</a>
|
|
114
|
+
<a href="#action-node-skeleton" style="padding-left:32px">Action Node Skeleton</a>
|
|
115
|
+
<a href="#executor-node" style="padding-left:32px">Executor Node</a>
|
|
116
|
+
<a href="#10-prism-pipeline-nodes" style="padding-left:18px">10. Prism Pipeline Nodes</a>
|
|
117
|
+
<a href="#11-node-builder-gui" style="padding-left:18px">11. Node Builder GUI</a>
|
|
118
|
+
<a href="#workflow" style="padding-left:32px">Workflow</a>
|
|
119
|
+
<a href="#exec-checkbox" style="padding-left:32px">Exec Checkbox</a>
|
|
120
|
+
<a href="#edit-existing-node" style="padding-left:32px">Edit Existing Node</a>
|
|
121
|
+
<a href="#gemini-assistance" style="padding-left:32px">Gemini Assistance</a>
|
|
122
|
+
<a href="#12-distribution-and-installation" style="padding-left:18px">12. Distribution and Installation</a>
|
|
123
|
+
<a href="#single-file-distribution" style="padding-left:32px">Single-File Distribution</a>
|
|
124
|
+
<a href="#directory-distribution" style="padding-left:32px">Directory Distribution</a>
|
|
125
|
+
<a href="#houdini-plugin-distribution" style="padding-left:32px">Houdini Plugin Distribution</a>
|
|
126
|
+
<a href="#built-in-nodes-source" style="padding-left:32px">Built-in Nodes (Source)</a>
|
|
127
|
+
<a href="#13-common-mistakes" style="padding-left:18px">13. Common Mistakes</a>
|
|
128
|
+
</nav>
|
|
129
|
+
<main class="content">
|
|
130
|
+
<h1 id="vibrante-node-node-builder-api">Vibrante-Node — Node Builder API</h1>
|
|
131
|
+
<div style="border-left:4px solid #f9e2af;background:#2a2a1f;padding:10px 14px;margin:16px 0"><strong>Distribution note (2.5.0):</strong> <code>plugins/houdini/</code> is not shipped in the PyPI wheels or source distributions. Install it from the source repository before following this page.</div>
|
|
132
|
+
<p><strong>Version:</strong> v2.5.0 | <a href="USER_GUIDE.md">User Guide</a> | <a href="AUTOMATION_API.md">Automation API</a> | <a href="DEVELOPER.md">Developer Guide</a> | <a href="DOCUMENTATION.md">Technical Reference</a></p>
|
|
133
|
+
<p>This document is the complete reference for building custom nodes: <code>BaseNode</code>, port configuration, lifecycle hooks, the JSON node schema, distribution patterns, and integration with Houdini, Maya, Blender, and Prism Pipeline.</p>
|
|
134
|
+
<hr />
|
|
135
|
+
<h2 id="contents">Contents</h2>
|
|
136
|
+
<ol>
|
|
137
|
+
<li><a href="#1-node-architecture">Node Architecture</a></li>
|
|
138
|
+
<li><a href="#2-node-json-schema">Node JSON Schema</a></li>
|
|
139
|
+
<li><a href="#3-basenode-class-reference">BaseNode Class Reference</a></li>
|
|
140
|
+
<li><a href="#4-port-system">Port System</a></li>
|
|
141
|
+
<li><a href="#5-lifecycle-hooks">Lifecycle Hooks</a></li>
|
|
142
|
+
<li><a href="#6-logging">Logging</a></li>
|
|
143
|
+
<li><a href="#7-advanced-patterns">Advanced Patterns</a></li>
|
|
144
|
+
<li><a href="#8-houdini-bridge-nodes">Houdini Bridge Nodes</a></li>
|
|
145
|
+
<li><a href="#9-headless-action-nodes">Headless Action Nodes — Maya and Blender</a></li>
|
|
146
|
+
<li><a href="#10-prism-pipeline-nodes">Prism Pipeline Nodes</a></li>
|
|
147
|
+
<li><a href="#11-node-builder-gui">Node Builder GUI</a></li>
|
|
148
|
+
<li><a href="#12-distribution-and-installation">Distribution and Installation</a></li>
|
|
149
|
+
<li><a href="#13-common-mistakes">Common Mistakes</a></li>
|
|
150
|
+
</ol>
|
|
151
|
+
<hr />
|
|
152
|
+
<h2 id="1-node-architecture">1. Node Architecture</h2>
|
|
153
|
+
<h3 id="what-a-node-is">What a Node Is</h3>
|
|
154
|
+
<p>A node is a <strong>Python class</strong> (<code>BaseNode</code> subclass) paired with a <strong>JSON definition file</strong>. The class implements the logic; the JSON describes the ports, metadata, and embeds the Python source as a string.</p>
|
|
155
|
+
<p>At runtime the <code>NodeRegistry</code> reads the JSON, compiles the <code>python_code</code> field into a live Python class, and registers it. Users place the node on the canvas, wire its ports, and the execution engine calls <code>execute()</code>.</p>
|
|
156
|
+
<h3 id="node-lifecycle-during-execution">Node Lifecycle During Execution</h3>
|
|
157
|
+
<pre><code>Engine starts a run
|
|
158
|
+
│
|
|
159
|
+
▼
|
|
160
|
+
restore_from_parameters(saved_params)
|
|
161
|
+
│ Rebuilds dynamic ports from the saved workflow state.
|
|
162
|
+
▼
|
|
163
|
+
clear_outputs()
|
|
164
|
+
│ Resets all output port values to their defaults.
|
|
165
|
+
▼
|
|
166
|
+
sync inputs from upstream node results
|
|
167
|
+
│ Wire values are copied into the node's parameter dict.
|
|
168
|
+
▼
|
|
169
|
+
execute(inputs) ◄── your implementation runs here
|
|
170
|
+
│
|
|
171
|
+
├──► await self.set_output(name, value) (optional mid-execution push)
|
|
172
|
+
│
|
|
173
|
+
└──► return {"port_name": value, "exec_out": True}
|
|
174
|
+
│
|
|
175
|
+
└── engine propagates outputs, triggers downstream exec chain
|
|
176
|
+
</code></pre>
|
|
177
|
+
<h3 id="minimal-node-example">Minimal Node Example</h3>
|
|
178
|
+
<pre><code class="language-python">from src.nodes.base import BaseNode
|
|
179
|
+
|
|
180
|
+
class Repeat_String(BaseNode):
|
|
181
|
+
name = "repeat_string" # must match node_id in the JSON
|
|
182
|
+
|
|
183
|
+
def __init__(self):
|
|
184
|
+
super().__init__() # adds exec_in and exec_out automatically
|
|
185
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
186
|
+
self.add_input("text", "string", widget_type="text", default="hello")
|
|
187
|
+
self.add_input("count", "int", widget_type="int", default=3)
|
|
188
|
+
self.add_output("result", "string")
|
|
189
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
190
|
+
|
|
191
|
+
async def execute(self, inputs):
|
|
192
|
+
text = inputs.get("text", "")
|
|
193
|
+
count = int(inputs.get("count", 1))
|
|
194
|
+
return {
|
|
195
|
+
"result": (text + " ") * count,
|
|
196
|
+
"exec_out": True,
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
def register_node():
|
|
200
|
+
return Repeat_String
|
|
201
|
+
</code></pre>
|
|
202
|
+
<hr />
|
|
203
|
+
<h2 id="2-node-json-schema">2. Node JSON Schema</h2>
|
|
204
|
+
<p>Every node is distributed as a single <code>.json</code> file. All fields:</p>
|
|
205
|
+
<pre><code class="language-json">{
|
|
206
|
+
"node_id": "repeat_string",
|
|
207
|
+
"name": "repeat_string",
|
|
208
|
+
"display_name": "Repeat String",
|
|
209
|
+
"description": "Repeats a string N times.",
|
|
210
|
+
"category": "String",
|
|
211
|
+
"icon_path": "icons/string.svg",
|
|
212
|
+
"use_exec": true,
|
|
213
|
+
"init_priority": 0,
|
|
214
|
+
"inputs": [
|
|
215
|
+
{
|
|
216
|
+
"name": "text",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"widget_type": "text",
|
|
219
|
+
"options": null,
|
|
220
|
+
"default": "hello"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "count",
|
|
224
|
+
"type": "int",
|
|
225
|
+
"widget_type": "int",
|
|
226
|
+
"options": null,
|
|
227
|
+
"default": 3
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"name": "exec_in",
|
|
231
|
+
"type": "any",
|
|
232
|
+
"widget_type": null,
|
|
233
|
+
"options": null,
|
|
234
|
+
"default": null
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"outputs": [
|
|
238
|
+
{
|
|
239
|
+
"name": "result",
|
|
240
|
+
"type": "string",
|
|
241
|
+
"widget_type": null,
|
|
242
|
+
"options": null,
|
|
243
|
+
"default": null
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "exec_out",
|
|
247
|
+
"type": "any",
|
|
248
|
+
"widget_type": null,
|
|
249
|
+
"options": null,
|
|
250
|
+
"default": null
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"python_code": "..."
|
|
254
|
+
}
|
|
255
|
+
</code></pre>
|
|
256
|
+
<h3 id="field-reference">Field Reference</h3>
|
|
257
|
+
<table>
|
|
258
|
+
<thead>
|
|
259
|
+
<tr>
|
|
260
|
+
<th>Field</th>
|
|
261
|
+
<th>Type</th>
|
|
262
|
+
<th>Required</th>
|
|
263
|
+
<th>Description</th>
|
|
264
|
+
</tr>
|
|
265
|
+
</thead>
|
|
266
|
+
<tbody>
|
|
267
|
+
<tr>
|
|
268
|
+
<td><code>node_id</code></td>
|
|
269
|
+
<td><code>string</code></td>
|
|
270
|
+
<td>Yes</td>
|
|
271
|
+
<td>Registry key. Must match <code>BaseNode.name</code>. Unique across all loaded nodes.</td>
|
|
272
|
+
</tr>
|
|
273
|
+
<tr>
|
|
274
|
+
<td><code>name</code></td>
|
|
275
|
+
<td><code>string</code></td>
|
|
276
|
+
<td>Yes</td>
|
|
277
|
+
<td>Same as <code>node_id</code> for JSON-defined nodes.</td>
|
|
278
|
+
</tr>
|
|
279
|
+
<tr>
|
|
280
|
+
<td><code>display_name</code></td>
|
|
281
|
+
<td><code>string</code></td>
|
|
282
|
+
<td>No</td>
|
|
283
|
+
<td>Text shown in the canvas header. Defaults to <code>name</code>.</td>
|
|
284
|
+
</tr>
|
|
285
|
+
<tr>
|
|
286
|
+
<td><code>description</code></td>
|
|
287
|
+
<td><code>string</code></td>
|
|
288
|
+
<td>No</td>
|
|
289
|
+
<td>Tooltip shown in the Library panel.</td>
|
|
290
|
+
</tr>
|
|
291
|
+
<tr>
|
|
292
|
+
<td><code>category</code></td>
|
|
293
|
+
<td><code>string</code></td>
|
|
294
|
+
<td>Yes</td>
|
|
295
|
+
<td>Library grouping folder name.</td>
|
|
296
|
+
</tr>
|
|
297
|
+
<tr>
|
|
298
|
+
<td><code>icon_path</code></td>
|
|
299
|
+
<td><code>string</code></td>
|
|
300
|
+
<td>No</td>
|
|
301
|
+
<td>Relative path to SVG or PNG icon, or <code>null</code>.</td>
|
|
302
|
+
</tr>
|
|
303
|
+
<tr>
|
|
304
|
+
<td><code>use_exec</code></td>
|
|
305
|
+
<td><code>bool</code></td>
|
|
306
|
+
<td>Yes</td>
|
|
307
|
+
<td><code>true</code> adds <code>exec_in</code>/<code>exec_out</code> ports. <code>false</code> for data-only reactive nodes.</td>
|
|
308
|
+
</tr>
|
|
309
|
+
<tr>
|
|
310
|
+
<td><code>init_priority</code></td>
|
|
311
|
+
<td><code>int</code></td>
|
|
312
|
+
<td>No</td>
|
|
313
|
+
<td><code>> 0</code> marks the node as Init First — created before all other nodes during workflow load. Default <code>0</code>.</td>
|
|
314
|
+
</tr>
|
|
315
|
+
<tr>
|
|
316
|
+
<td><code>inputs</code></td>
|
|
317
|
+
<td><code>array</code></td>
|
|
318
|
+
<td>Yes</td>
|
|
319
|
+
<td>List of input port definitions (see <a href="#4-port-system">Port System</a>).</td>
|
|
320
|
+
</tr>
|
|
321
|
+
<tr>
|
|
322
|
+
<td><code>outputs</code></td>
|
|
323
|
+
<td><code>array</code></td>
|
|
324
|
+
<td>Yes</td>
|
|
325
|
+
<td>List of output port definitions.</td>
|
|
326
|
+
</tr>
|
|
327
|
+
<tr>
|
|
328
|
+
<td><code>python_code</code></td>
|
|
329
|
+
<td><code>string</code></td>
|
|
330
|
+
<td>Yes</td>
|
|
331
|
+
<td>Full Python source as a JSON string (<code>\n</code> for newlines, <code>\"</code> for quotes).</td>
|
|
332
|
+
</tr>
|
|
333
|
+
</tbody>
|
|
334
|
+
</table>
|
|
335
|
+
<blockquote>
|
|
336
|
+
<p>When <code>use_exec: true</code>, the <code>exec_in</code> and <code>exec_out</code> ports <strong>must</strong> appear in the <code>inputs</code> and <code>outputs</code> arrays. However, the <code>BaseNode.__init__</code> call adds these automatically — do not also add them via <code>add_input()</code>/<code>add_output()</code> in your Python code or they will be duplicated.</p>
|
|
337
|
+
</blockquote>
|
|
338
|
+
<hr />
|
|
339
|
+
<h2 id="3-basenode-class-reference">3. BaseNode Class Reference</h2>
|
|
340
|
+
<p><strong>Module:</strong> <code>src.nodes.base</code></p>
|
|
341
|
+
<h3 id="class-attributes">Class Attributes</h3>
|
|
342
|
+
<table>
|
|
343
|
+
<thead>
|
|
344
|
+
<tr>
|
|
345
|
+
<th>Attribute</th>
|
|
346
|
+
<th>Type</th>
|
|
347
|
+
<th>Default</th>
|
|
348
|
+
<th>Description</th>
|
|
349
|
+
</tr>
|
|
350
|
+
</thead>
|
|
351
|
+
<tbody>
|
|
352
|
+
<tr>
|
|
353
|
+
<td><code>name</code></td>
|
|
354
|
+
<td><code>str</code></td>
|
|
355
|
+
<td><code>"BaseNode"</code></td>
|
|
356
|
+
<td>Registry key. Must match <code>node_id</code>.</td>
|
|
357
|
+
</tr>
|
|
358
|
+
<tr>
|
|
359
|
+
<td><code>node_id</code></td>
|
|
360
|
+
<td><code>str</code></td>
|
|
361
|
+
<td>(injected)</td>
|
|
362
|
+
<td>Assigned by the registry on load.</td>
|
|
363
|
+
</tr>
|
|
364
|
+
<tr>
|
|
365
|
+
<td><code>display_name</code></td>
|
|
366
|
+
<td><code>str</code></td>
|
|
367
|
+
<td><code>""</code></td>
|
|
368
|
+
<td>Canvas header text. Falls back to <code>name</code> if empty.</td>
|
|
369
|
+
</tr>
|
|
370
|
+
<tr>
|
|
371
|
+
<td><code>description</code></td>
|
|
372
|
+
<td><code>str</code></td>
|
|
373
|
+
<td><code>""</code></td>
|
|
374
|
+
<td>Tooltip in the Library panel.</td>
|
|
375
|
+
</tr>
|
|
376
|
+
<tr>
|
|
377
|
+
<td><code>category</code></td>
|
|
378
|
+
<td><code>str</code></td>
|
|
379
|
+
<td><code>"General"</code></td>
|
|
380
|
+
<td>Library grouping.</td>
|
|
381
|
+
</tr>
|
|
382
|
+
<tr>
|
|
383
|
+
<td><code>icon_path</code></td>
|
|
384
|
+
<td><code>str\|None</code></td>
|
|
385
|
+
<td><code>None</code></td>
|
|
386
|
+
<td>Relative path to icon file.</td>
|
|
387
|
+
</tr>
|
|
388
|
+
<tr>
|
|
389
|
+
<td><code>init_priority</code></td>
|
|
390
|
+
<td><code>int</code></td>
|
|
391
|
+
<td><code>0</code></td>
|
|
392
|
+
<td>Values <code>> 0</code> = Init First ordering.</td>
|
|
393
|
+
</tr>
|
|
394
|
+
<tr>
|
|
395
|
+
<td><code>memory</code></td>
|
|
396
|
+
<td><code>dict</code></td>
|
|
397
|
+
<td><code>{}</code></td>
|
|
398
|
+
<td>Class-level shared dict, cleared at the start of each run.</td>
|
|
399
|
+
</tr>
|
|
400
|
+
</tbody>
|
|
401
|
+
</table>
|
|
402
|
+
<h3 id="instance-attributes">Instance Attributes</h3>
|
|
403
|
+
<table>
|
|
404
|
+
<thead>
|
|
405
|
+
<tr>
|
|
406
|
+
<th>Attribute</th>
|
|
407
|
+
<th>Type</th>
|
|
408
|
+
<th>Description</th>
|
|
409
|
+
</tr>
|
|
410
|
+
</thead>
|
|
411
|
+
<tbody>
|
|
412
|
+
<tr>
|
|
413
|
+
<td><code>inputs</code></td>
|
|
414
|
+
<td><code>dict[str, Port]</code></td>
|
|
415
|
+
<td>Input ports keyed by name.</td>
|
|
416
|
+
</tr>
|
|
417
|
+
<tr>
|
|
418
|
+
<td><code>outputs</code></td>
|
|
419
|
+
<td><code>dict[str, Port]</code></td>
|
|
420
|
+
<td>Output ports keyed by name.</td>
|
|
421
|
+
</tr>
|
|
422
|
+
<tr>
|
|
423
|
+
<td><code>parameters</code></td>
|
|
424
|
+
<td><code>dict[str, Any]</code></td>
|
|
425
|
+
<td>Widget values, output cache, and internal state.</td>
|
|
426
|
+
</tr>
|
|
427
|
+
<tr>
|
|
428
|
+
<td><code>bypassed</code></td>
|
|
429
|
+
<td><code>bool</code></td>
|
|
430
|
+
<td><code>True</code> when the node is bypassed by the user.</td>
|
|
431
|
+
</tr>
|
|
432
|
+
</tbody>
|
|
433
|
+
</table>
|
|
434
|
+
<h3 id="constructor">Constructor</h3>
|
|
435
|
+
<pre><code class="language-python">def __init__(self, use_exec: bool = True)
|
|
436
|
+
</code></pre>
|
|
437
|
+
<p><code>super().__init__()</code> (with default <code>use_exec=True</code>) automatically adds:<br />
|
|
438
|
+
- <code>exec_in</code> as an input of type <code>any</code><br />
|
|
439
|
+
- <code>exec_out</code> as an output of type <code>any</code></p>
|
|
440
|
+
<p>Do <strong>not</strong> add these manually in your port setup block.</p>
|
|
441
|
+
<h3 id="methods">Methods</h3>
|
|
442
|
+
<table>
|
|
443
|
+
<thead>
|
|
444
|
+
<tr>
|
|
445
|
+
<th>Signature</th>
|
|
446
|
+
<th>Returns</th>
|
|
447
|
+
<th>Description</th>
|
|
448
|
+
</tr>
|
|
449
|
+
</thead>
|
|
450
|
+
<tbody>
|
|
451
|
+
<tr>
|
|
452
|
+
<td><code>add_input(name, type="any", widget_type=None, options=None, default=None)</code></td>
|
|
453
|
+
<td><code>None</code></td>
|
|
454
|
+
<td>Add an input port and initialize its parameter slot.</td>
|
|
455
|
+
</tr>
|
|
456
|
+
<tr>
|
|
457
|
+
<td><code>add_output(name, type="any", default=None)</code></td>
|
|
458
|
+
<td><code>None</code></td>
|
|
459
|
+
<td>Add an output port and initialize its parameter slot.</td>
|
|
460
|
+
</tr>
|
|
461
|
+
<tr>
|
|
462
|
+
<td><code>add_exec_input(name="exec_in")</code></td>
|
|
463
|
+
<td><code>None</code></td>
|
|
464
|
+
<td>Add an exec-type input (type <code>"any"</code>, no widget). Called by <code>__init__</code> automatically.</td>
|
|
465
|
+
</tr>
|
|
466
|
+
<tr>
|
|
467
|
+
<td><code>add_exec_output(name="exec_out")</code></td>
|
|
468
|
+
<td><code>None</code></td>
|
|
469
|
+
<td>Add an exec-type output. Called by <code>__init__</code> automatically.</td>
|
|
470
|
+
</tr>
|
|
471
|
+
<tr>
|
|
472
|
+
<td><code>add_parameter(name, param_type, default=None)</code></td>
|
|
473
|
+
<td><code>None</code></td>
|
|
474
|
+
<td>Define an internal non-port parameter (not shown as a port).</td>
|
|
475
|
+
</tr>
|
|
476
|
+
<tr>
|
|
477
|
+
<td><code>set_parameter(name, value)</code></td>
|
|
478
|
+
<td><code>None</code></td>
|
|
479
|
+
<td>Update a widget value. For dropdown ports, passing a <code>list</code> updates the options. Triggers downstream reactive sync.</td>
|
|
480
|
+
</tr>
|
|
481
|
+
<tr>
|
|
482
|
+
<td><code>get_parameter(name, default=None)</code></td>
|
|
483
|
+
<td><code>Any</code></td>
|
|
484
|
+
<td>Safe parameter read. Returns <code>default</code> if the key is absent.</td>
|
|
485
|
+
</tr>
|
|
486
|
+
<tr>
|
|
487
|
+
<td><code>rebuild_ports()</code></td>
|
|
488
|
+
<td><code>None</code></td>
|
|
489
|
+
<td>Signal the canvas to refresh port layout after dynamic port changes.</td>
|
|
490
|
+
</tr>
|
|
491
|
+
<tr>
|
|
492
|
+
<td><code>is_port_connected(name, is_input)</code></td>
|
|
493
|
+
<td><code>bool</code></td>
|
|
494
|
+
<td>Returns <code>True</code> if the named port has a wire connected.</td>
|
|
495
|
+
</tr>
|
|
496
|
+
<tr>
|
|
497
|
+
<td><code>is_stopped()</code></td>
|
|
498
|
+
<td><code>bool</code></td>
|
|
499
|
+
<td>Returns <code>True</code> if the user pressed Stop. Check this in long loops.</td>
|
|
500
|
+
</tr>
|
|
501
|
+
<tr>
|
|
502
|
+
<td><code>async set_output(name, value)</code></td>
|
|
503
|
+
<td><code>None</code></td>
|
|
504
|
+
<td>Push a value to downstream nodes reactively <strong>before</strong> <code>exec_out</code> fires.</td>
|
|
505
|
+
</tr>
|
|
506
|
+
<tr>
|
|
507
|
+
<td><code>clear_outputs()</code></td>
|
|
508
|
+
<td><code>None</code></td>
|
|
509
|
+
<td>Reset all output values to defaults. Called by the engine before execution.</td>
|
|
510
|
+
</tr>
|
|
511
|
+
<tr>
|
|
512
|
+
<td><code>log_info(msg)</code></td>
|
|
513
|
+
<td><code>None</code></td>
|
|
514
|
+
<td>Send an info-level message to the Log Panel. Thread-safe.</td>
|
|
515
|
+
</tr>
|
|
516
|
+
<tr>
|
|
517
|
+
<td><code>log_success(msg)</code></td>
|
|
518
|
+
<td><code>None</code></td>
|
|
519
|
+
<td>Send a success-level message.</td>
|
|
520
|
+
</tr>
|
|
521
|
+
<tr>
|
|
522
|
+
<td><code>log_error(msg)</code></td>
|
|
523
|
+
<td><code>None</code></td>
|
|
524
|
+
<td>Send an error-level message.</td>
|
|
525
|
+
</tr>
|
|
526
|
+
<tr>
|
|
527
|
+
<td><code>restore_from_parameters(params)</code></td>
|
|
528
|
+
<td><code>None</code></td>
|
|
529
|
+
<td>Override to recreate dynamic ports from saved state on workflow load.</td>
|
|
530
|
+
</tr>
|
|
531
|
+
</tbody>
|
|
532
|
+
</table>
|
|
533
|
+
<h3 id="execute-abstract">execute() — Abstract</h3>
|
|
534
|
+
<pre><code class="language-python">async def execute(self, inputs: dict) -> dict:
|
|
535
|
+
...
|
|
536
|
+
</code></pre>
|
|
537
|
+
<ul>
|
|
538
|
+
<li><strong>Must</strong> be <code>async def</code>.</li>
|
|
539
|
+
<li><code>inputs</code> is a <code>dict</code> mapping port name → current value.</li>
|
|
540
|
+
<li>Must return a <code>dict</code> whose keys match your output port names.</li>
|
|
541
|
+
<li>Must include <code>"exec_out": True</code> for exec-flow nodes.</li>
|
|
542
|
+
<li>Any unhandled exception is caught by the engine; the node gets a red border and the error is logged.</li>
|
|
543
|
+
</ul>
|
|
544
|
+
<hr />
|
|
545
|
+
<h2 id="4-port-system">4. Port System</h2>
|
|
546
|
+
<h3 id="port-types">Port Types</h3>
|
|
547
|
+
<table>
|
|
548
|
+
<thead>
|
|
549
|
+
<tr>
|
|
550
|
+
<th>Type</th>
|
|
551
|
+
<th>Usage</th>
|
|
552
|
+
<th>Python type at runtime</th>
|
|
553
|
+
</tr>
|
|
554
|
+
</thead>
|
|
555
|
+
<tbody>
|
|
556
|
+
<tr>
|
|
557
|
+
<td><code>string</code></td>
|
|
558
|
+
<td>Text values</td>
|
|
559
|
+
<td><code>str</code></td>
|
|
560
|
+
</tr>
|
|
561
|
+
<tr>
|
|
562
|
+
<td><code>int</code></td>
|
|
563
|
+
<td>Integer values</td>
|
|
564
|
+
<td><code>int</code></td>
|
|
565
|
+
</tr>
|
|
566
|
+
<tr>
|
|
567
|
+
<td><code>float</code></td>
|
|
568
|
+
<td>Float values</td>
|
|
569
|
+
<td><code>float</code></td>
|
|
570
|
+
</tr>
|
|
571
|
+
<tr>
|
|
572
|
+
<td><code>bool</code></td>
|
|
573
|
+
<td>Boolean values</td>
|
|
574
|
+
<td><code>bool</code></td>
|
|
575
|
+
</tr>
|
|
576
|
+
<tr>
|
|
577
|
+
<td><code>list</code></td>
|
|
578
|
+
<td>Python lists</td>
|
|
579
|
+
<td><code>list</code></td>
|
|
580
|
+
</tr>
|
|
581
|
+
<tr>
|
|
582
|
+
<td><code>dict</code></td>
|
|
583
|
+
<td>Python dicts</td>
|
|
584
|
+
<td><code>dict</code></td>
|
|
585
|
+
</tr>
|
|
586
|
+
<tr>
|
|
587
|
+
<td><code>any</code></td>
|
|
588
|
+
<td>Generic / exec flow</td>
|
|
589
|
+
<td>any</td>
|
|
590
|
+
</tr>
|
|
591
|
+
</tbody>
|
|
592
|
+
</table>
|
|
593
|
+
<h3 id="widget-types-input-ports-only">Widget Types (input ports only)</h3>
|
|
594
|
+
<table>
|
|
595
|
+
<thead>
|
|
596
|
+
<tr>
|
|
597
|
+
<th>Widget</th>
|
|
598
|
+
<th>Renders as</th>
|
|
599
|
+
<th>When to use</th>
|
|
600
|
+
</tr>
|
|
601
|
+
</thead>
|
|
602
|
+
<tbody>
|
|
603
|
+
<tr>
|
|
604
|
+
<td><code>"text"</code></td>
|
|
605
|
+
<td>Single-line text box</td>
|
|
606
|
+
<td>Short strings, file paths, names</td>
|
|
607
|
+
</tr>
|
|
608
|
+
<tr>
|
|
609
|
+
<td><code>"text_area"</code></td>
|
|
610
|
+
<td>Multi-line text area</td>
|
|
611
|
+
<td>Code, long content, JSON</td>
|
|
612
|
+
</tr>
|
|
613
|
+
<tr>
|
|
614
|
+
<td><code>"int"</code></td>
|
|
615
|
+
<td>Integer spinbox</td>
|
|
616
|
+
<td>Count, index, frame number</td>
|
|
617
|
+
</tr>
|
|
618
|
+
<tr>
|
|
619
|
+
<td><code>"float"</code></td>
|
|
620
|
+
<td>Float spinbox</td>
|
|
621
|
+
<td>Numeric values, scale factors</td>
|
|
622
|
+
</tr>
|
|
623
|
+
<tr>
|
|
624
|
+
<td><code>"bool"</code> / <code>"checkbox"</code></td>
|
|
625
|
+
<td>Checkbox</td>
|
|
626
|
+
<td>On/off flags</td>
|
|
627
|
+
</tr>
|
|
628
|
+
<tr>
|
|
629
|
+
<td><code>"dropdown"</code></td>
|
|
630
|
+
<td>Drop-down selector</td>
|
|
631
|
+
<td>Fixed option sets</td>
|
|
632
|
+
</tr>
|
|
633
|
+
<tr>
|
|
634
|
+
<td><code>"slider"</code></td>
|
|
635
|
+
<td>Horizontal slider</td>
|
|
636
|
+
<td>Constrained numeric range</td>
|
|
637
|
+
</tr>
|
|
638
|
+
<tr>
|
|
639
|
+
<td><code>"file"</code></td>
|
|
640
|
+
<td>Text + browse button (open)</td>
|
|
641
|
+
<td>Input file paths</td>
|
|
642
|
+
</tr>
|
|
643
|
+
<tr>
|
|
644
|
+
<td><code>"file_save"</code></td>
|
|
645
|
+
<td>Text + browse button (save)</td>
|
|
646
|
+
<td>Output file paths</td>
|
|
647
|
+
</tr>
|
|
648
|
+
<tr>
|
|
649
|
+
<td><code>null</code></td>
|
|
650
|
+
<td>No widget (display only)</td>
|
|
651
|
+
<td>Ports that only receive wired data</td>
|
|
652
|
+
</tr>
|
|
653
|
+
</tbody>
|
|
654
|
+
</table>
|
|
655
|
+
<h3 id="dropdown-ports">Dropdown Ports</h3>
|
|
656
|
+
<p>Pass a list of strings as <code>options</code> to populate the dropdown:</p>
|
|
657
|
+
<pre><code class="language-python">self.add_input("format", "string", widget_type="dropdown",
|
|
658
|
+
options=["alembic", "fbx", "obj", "usd"])
|
|
659
|
+
</code></pre>
|
|
660
|
+
<p>To update options programmatically without resetting the selection:</p>
|
|
661
|
+
<pre><code class="language-python">self.set_parameter("format", ["alembic", "fbx", "obj", "usd", "gltf"])
|
|
662
|
+
</code></pre>
|
|
663
|
+
<h3 id="port-definition-in-code-vs-json">Port Definition in Code vs JSON</h3>
|
|
664
|
+
<p>Ports defined in <code>__init__</code> via <code>add_input()</code> / <code>add_output()</code> must <strong>exactly match</strong> the ports listed in the <code>inputs</code> / <code>outputs</code> JSON arrays. The Node Builder keeps these in sync automatically. If you edit a JSON file by hand, ensure both are consistent.</p>
|
|
665
|
+
<hr />
|
|
666
|
+
<h2 id="5-lifecycle-hooks">5. Lifecycle Hooks</h2>
|
|
667
|
+
<h3 id="executeinputs-primary-hook">execute(inputs) — Primary Hook</h3>
|
|
668
|
+
<p>Called by the engine during a workflow run. See <a href="#execute--abstract">BaseNode.execute()</a> above.</p>
|
|
669
|
+
<h3 id="on_parameter_changedname-value">on_parameter_changed(name, value)</h3>
|
|
670
|
+
<pre><code class="language-python">async def on_parameter_changed(self, name: str, value: Any) -> None:
|
|
671
|
+
...
|
|
672
|
+
</code></pre>
|
|
673
|
+
<p>Triggered when:<br />
|
|
674
|
+
- A user interacts with a node widget (types, selects, toggles).<br />
|
|
675
|
+
- Reactively during execution when an upstream node's output is propagated to this node's input port.</p>
|
|
676
|
+
<p><strong>Not</strong> triggered during:<br />
|
|
677
|
+
- The pre-execute input sync sweep (the step that copies wire values into parameters before <code>execute()</code> begins).</p>
|
|
678
|
+
<p><strong>Use for:</strong> real-time output mirroring (pass-through nodes), reactive calculations, updating internal state as the user types.</p>
|
|
679
|
+
<p><strong>Keep it fast.</strong> Avoid heavy I/O in this hook; it fires on every keystroke.</p>
|
|
680
|
+
<pre><code class="language-python"># Pass-through: mirror input to output as the user types
|
|
681
|
+
async def on_parameter_changed(self, name, value):
|
|
682
|
+
if name == "input_text":
|
|
683
|
+
self.parameters["output_text"] = value
|
|
684
|
+
</code></pre>
|
|
685
|
+
<h3 id="on_plug_syncport_name-is_input-other_node-other_port_name">on_plug_sync(port_name, is_input, other_node, other_port_name)</h3>
|
|
686
|
+
<pre><code class="language-python">def on_plug_sync(self, port_name: str, is_input: bool,
|
|
687
|
+
other_node: BaseNode, other_port_name: str) -> None:
|
|
688
|
+
...
|
|
689
|
+
</code></pre>
|
|
690
|
+
<p>Called <strong>synchronously</strong> on the Qt main thread the moment a wire is connected. Use for immediate UI updates or initial data copying.</p>
|
|
691
|
+
<pre><code class="language-python">def on_plug_sync(self, port_name, is_input, other_node, other_port_name):
|
|
692
|
+
if is_input and port_name == "config":
|
|
693
|
+
value = other_node.get_parameter(other_port_name)
|
|
694
|
+
self.set_parameter("config_preview", str(value))
|
|
695
|
+
</code></pre>
|
|
696
|
+
<h3 id="on_unplug_syncport_name-is_input">on_unplug_sync(port_name, is_input)</h3>
|
|
697
|
+
<pre><code class="language-python">def on_unplug_sync(self, port_name: str, is_input: bool) -> None:
|
|
698
|
+
...
|
|
699
|
+
</code></pre>
|
|
700
|
+
<p>Called synchronously when a wire is disconnected. Use to reset widgets or clear cached state.</p>
|
|
701
|
+
<h3 id="on_plug-on_unplug-async-variants">on_plug / on_unplug — Async Variants</h3>
|
|
702
|
+
<pre><code class="language-python">async def on_plug(self, port_name, is_input, other_node, other_port_name): ...
|
|
703
|
+
async def on_unplug(self, port_name, is_input): ...
|
|
704
|
+
</code></pre>
|
|
705
|
+
<p>For heavy async work (network calls, file reads) triggered by a connection event. These run on the asyncio event loop.</p>
|
|
706
|
+
<hr />
|
|
707
|
+
<h2 id="6-logging">6. Logging</h2>
|
|
708
|
+
<p>All log methods are <strong>thread-safe</strong> and can be called from inside <code>execute()</code> even though execution runs on the asyncio loop.</p>
|
|
709
|
+
<table>
|
|
710
|
+
<thead>
|
|
711
|
+
<tr>
|
|
712
|
+
<th>Method</th>
|
|
713
|
+
<th>Log level</th>
|
|
714
|
+
<th>Log panel color</th>
|
|
715
|
+
</tr>
|
|
716
|
+
</thead>
|
|
717
|
+
<tbody>
|
|
718
|
+
<tr>
|
|
719
|
+
<td><code>self.log_info(msg)</code></td>
|
|
720
|
+
<td>Info</td>
|
|
721
|
+
<td>White</td>
|
|
722
|
+
</tr>
|
|
723
|
+
<tr>
|
|
724
|
+
<td><code>self.log_success(msg)</code></td>
|
|
725
|
+
<td>Success</td>
|
|
726
|
+
<td>Green</td>
|
|
727
|
+
</tr>
|
|
728
|
+
<tr>
|
|
729
|
+
<td><code>self.log_error(msg)</code></td>
|
|
730
|
+
<td>Error</td>
|
|
731
|
+
<td>Red — also sets node red border</td>
|
|
732
|
+
</tr>
|
|
733
|
+
</tbody>
|
|
734
|
+
</table>
|
|
735
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
736
|
+
path = inputs.get("file_path", "")
|
|
737
|
+
if not path:
|
|
738
|
+
self.log_error("No file path provided.")
|
|
739
|
+
return {"result": "", "exec_out": True}
|
|
740
|
+
|
|
741
|
+
self.log_info(f"Processing: {path}")
|
|
742
|
+
# ... do work ...
|
|
743
|
+
self.log_success("Done.")
|
|
744
|
+
return {"result": output, "exec_out": True}
|
|
745
|
+
</code></pre>
|
|
746
|
+
<hr />
|
|
747
|
+
<h2 id="7-advanced-patterns">7. Advanced Patterns</h2>
|
|
748
|
+
<h3 id="data-only-nodes-use_execfalse">Data-Only Nodes (use_exec=False)</h3>
|
|
749
|
+
<p>Nodes without exec pins participate exclusively in reactive data flow. They update whenever their inputs change and are "pulled" by exec-flow nodes before execution.</p>
|
|
750
|
+
<pre><code class="language-python">class Math_Multiply(BaseNode):
|
|
751
|
+
name = "math_multiply"
|
|
752
|
+
|
|
753
|
+
def __init__(self):
|
|
754
|
+
super().__init__(use_exec=False) # no exec_in / exec_out
|
|
755
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
756
|
+
self.add_input("a", "float", widget_type="float", default=1.0)
|
|
757
|
+
self.add_input("b", "float", widget_type="float", default=1.0)
|
|
758
|
+
self.add_output("result", "float")
|
|
759
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
760
|
+
|
|
761
|
+
async def execute(self, inputs):
|
|
762
|
+
a = float(inputs.get("a", 1.0))
|
|
763
|
+
b = float(inputs.get("b", 1.0))
|
|
764
|
+
return {"result": a * b}
|
|
765
|
+
</code></pre>
|
|
766
|
+
<p>In JSON: <code>"use_exec": false</code>. Do not include <code>exec_in</code> / <code>exec_out</code> in the port arrays.</p>
|
|
767
|
+
<h3 id="reactive-output-set_output">Reactive Output — set_output()</h3>
|
|
768
|
+
<p>Use <code>await self.set_output(name, value)</code> inside <code>execute()</code> to push a value to downstream nodes <strong>before</strong> <code>exec_out</code> fires. This is useful when downstream nodes need data before their own execution is triggered.</p>
|
|
769
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
770
|
+
items = inputs.get("items", [])
|
|
771
|
+
for item in items:
|
|
772
|
+
await self.set_output("current", item) # push each item
|
|
773
|
+
# exec_out fires after the loop completes
|
|
774
|
+
return {"exec_out": True}
|
|
775
|
+
</code></pre>
|
|
776
|
+
<h3 id="dynamic-ports">Dynamic Ports</h3>
|
|
777
|
+
<p>Override <code>restore_from_parameters()</code> to recreate ports from saved state on workflow load. This is how <code>GroupNode</code> works internally.</p>
|
|
778
|
+
<pre><code class="language-python">def restore_from_parameters(self, params):
|
|
779
|
+
# recreate ports based on saved config
|
|
780
|
+
for port_def in params.get("__port_defs__", []):
|
|
781
|
+
if port_def["is_input"]:
|
|
782
|
+
self.add_input(port_def["name"], port_def["type"])
|
|
783
|
+
else:
|
|
784
|
+
self.add_output(port_def["name"], port_def["type"])
|
|
785
|
+
self.rebuild_ports()
|
|
786
|
+
</code></pre>
|
|
787
|
+
<h3 id="shared-state-basenodememory">Shared State — BaseNode.memory</h3>
|
|
788
|
+
<p><code>BaseNode.memory</code> is a class-level <code>dict</code> shared across all node instances in the same run. It is cleared at the start of each run. Use it to pass data between nodes without wiring — for example, a configuration node writing values that other nodes read.</p>
|
|
789
|
+
<pre><code class="language-python">class Config_Writer(BaseNode):
|
|
790
|
+
async def execute(self, inputs):
|
|
791
|
+
BaseNode.memory["studio_root"] = inputs.get("path", "")
|
|
792
|
+
return {"exec_out": True}
|
|
793
|
+
|
|
794
|
+
class Config_Reader(BaseNode):
|
|
795
|
+
async def execute(self, inputs):
|
|
796
|
+
root = BaseNode.memory.get("studio_root", "")
|
|
797
|
+
return {"path": root, "exec_out": True}
|
|
798
|
+
</code></pre>
|
|
799
|
+
<h3 id="stopping-gracefully">Stopping Gracefully</h3>
|
|
800
|
+
<p>For long loops, check <code>self.is_stopped()</code> to respect the Stop button:</p>
|
|
801
|
+
<pre><code class="language-python">async def execute(self, inputs):
|
|
802
|
+
for i in range(1000):
|
|
803
|
+
if self.is_stopped():
|
|
804
|
+
self.log_info("Stopped by user.")
|
|
805
|
+
return {"exec_out": True}
|
|
806
|
+
# ... process item i ...
|
|
807
|
+
return {"exec_out": True}
|
|
808
|
+
</code></pre>
|
|
809
|
+
<hr />
|
|
810
|
+
<h2 id="8-houdini-bridge-nodes">8. Houdini Bridge Nodes</h2>
|
|
811
|
+
<p>Houdini nodes communicate with a live Houdini session via <code>HouBridge</code> — a TCP JSON-RPC client.</p>
|
|
812
|
+
<h3 id="setup">Setup</h3>
|
|
813
|
+
<pre><code class="language-python">from src.nodes.base import BaseNode
|
|
814
|
+
from src.utils.hou_bridge import get_bridge
|
|
815
|
+
|
|
816
|
+
class Hou_Create_Box(BaseNode):
|
|
817
|
+
name = "hou_create_box"
|
|
818
|
+
category = "Houdini"
|
|
819
|
+
|
|
820
|
+
def __init__(self):
|
|
821
|
+
super().__init__()
|
|
822
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
823
|
+
self.add_input("parent", "string", widget_type="text", default="/obj")
|
|
824
|
+
self.add_input("name", "string", widget_type="text", default="my_box")
|
|
825
|
+
self.add_output("geo_path", "string")
|
|
826
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
827
|
+
|
|
828
|
+
async def execute(self, inputs):
|
|
829
|
+
parent = inputs.get("parent", "/obj")
|
|
830
|
+
name = inputs.get("name", "my_box")
|
|
831
|
+
try:
|
|
832
|
+
bridge = get_bridge()
|
|
833
|
+
geo = bridge.create_node(parent, "geo", name)
|
|
834
|
+
geo_path = geo["path"]
|
|
835
|
+
|
|
836
|
+
# Clear auto-generated default nodes
|
|
837
|
+
for child in bridge.children(geo_path):
|
|
838
|
+
bridge.delete_node(child["path"])
|
|
839
|
+
|
|
840
|
+
# Create a box SOP inside
|
|
841
|
+
box = bridge.create_node(geo_path, "box", "box1")
|
|
842
|
+
bridge.set_display_flag(box["path"], True)
|
|
843
|
+
bridge.set_render_flag(box["path"], True)
|
|
844
|
+
bridge.layout_children(geo_path)
|
|
845
|
+
|
|
846
|
+
return {"geo_path": geo_path, "exec_out": True}
|
|
847
|
+
except Exception as e:
|
|
848
|
+
self.log_error(f"Houdini error: {e}")
|
|
849
|
+
return {"geo_path": "", "exec_out": True}
|
|
850
|
+
</code></pre>
|
|
851
|
+
<h3 id="houbridge-method-quick-reference">HouBridge Method Quick Reference</h3>
|
|
852
|
+
<table>
|
|
853
|
+
<thead>
|
|
854
|
+
<tr>
|
|
855
|
+
<th>Method</th>
|
|
856
|
+
<th>Returns</th>
|
|
857
|
+
<th>Description</th>
|
|
858
|
+
</tr>
|
|
859
|
+
</thead>
|
|
860
|
+
<tbody>
|
|
861
|
+
<tr>
|
|
862
|
+
<td><code>bridge.create_node(parent, type, name="")</code></td>
|
|
863
|
+
<td><code>{"path", "name", "type"}</code></td>
|
|
864
|
+
<td>Create a node</td>
|
|
865
|
+
</tr>
|
|
866
|
+
<tr>
|
|
867
|
+
<td><code>bridge.delete_node(path)</code></td>
|
|
868
|
+
<td><code>{"deleted"}</code></td>
|
|
869
|
+
<td>Delete a node</td>
|
|
870
|
+
</tr>
|
|
871
|
+
<tr>
|
|
872
|
+
<td><code>bridge.set_parm(node, parm, value)</code></td>
|
|
873
|
+
<td><code>{"set": True}</code></td>
|
|
874
|
+
<td>Set single parameter</td>
|
|
875
|
+
</tr>
|
|
876
|
+
<tr>
|
|
877
|
+
<td><code>bridge.get_parm(node, parm)</code></td>
|
|
878
|
+
<td><code>{"value": ...}</code></td>
|
|
879
|
+
<td>Get single parameter</td>
|
|
880
|
+
</tr>
|
|
881
|
+
<tr>
|
|
882
|
+
<td><code>bridge.set_parms(node, parms_dict)</code></td>
|
|
883
|
+
<td><code>{"set": True}</code></td>
|
|
884
|
+
<td>Set multiple parameters</td>
|
|
885
|
+
</tr>
|
|
886
|
+
<tr>
|
|
887
|
+
<td><code>bridge.connect_nodes(from, to, output=0, input=0)</code></td>
|
|
888
|
+
<td><code>{"connected": True}</code></td>
|
|
889
|
+
<td>Wire nodes</td>
|
|
890
|
+
</tr>
|
|
891
|
+
<tr>
|
|
892
|
+
<td><code>bridge.cook_node(path)</code></td>
|
|
893
|
+
<td><code>{"cooked": True}</code></td>
|
|
894
|
+
<td>Cook a node</td>
|
|
895
|
+
</tr>
|
|
896
|
+
<tr>
|
|
897
|
+
<td><code>bridge.run_code(code)</code></td>
|
|
898
|
+
<td><code>{"result": ...}</code></td>
|
|
899
|
+
<td>Run Python inside Houdini</td>
|
|
900
|
+
</tr>
|
|
901
|
+
<tr>
|
|
902
|
+
<td><code>bridge.node_info(path)</code></td>
|
|
903
|
+
<td>info dict</td>
|
|
904
|
+
<td>Node type, category, children</td>
|
|
905
|
+
</tr>
|
|
906
|
+
<tr>
|
|
907
|
+
<td><code>bridge.node_exists(path)</code></td>
|
|
908
|
+
<td><code>{"exists": bool}</code></td>
|
|
909
|
+
<td>Check path exists</td>
|
|
910
|
+
</tr>
|
|
911
|
+
<tr>
|
|
912
|
+
<td><code>bridge.children(path)</code></td>
|
|
913
|
+
<td>list of <code>{"name", "type", "path"}</code></td>
|
|
914
|
+
<td>List child nodes</td>
|
|
915
|
+
</tr>
|
|
916
|
+
<tr>
|
|
917
|
+
<td><code>bridge.set_display_flag(path, on=True)</code></td>
|
|
918
|
+
<td><code>{"set": True}</code></td>
|
|
919
|
+
<td>Display flag</td>
|
|
920
|
+
</tr>
|
|
921
|
+
<tr>
|
|
922
|
+
<td><code>bridge.set_render_flag(path, on=True)</code></td>
|
|
923
|
+
<td><code>{"set": True}</code></td>
|
|
924
|
+
<td>Render flag</td>
|
|
925
|
+
</tr>
|
|
926
|
+
<tr>
|
|
927
|
+
<td><code>bridge.layout_children(path)</code></td>
|
|
928
|
+
<td><code>{"done": True}</code></td>
|
|
929
|
+
<td>Auto-layout</td>
|
|
930
|
+
</tr>
|
|
931
|
+
<tr>
|
|
932
|
+
<td><code>bridge.save_hip(path="")</code></td>
|
|
933
|
+
<td><code>{"saved": path}</code></td>
|
|
934
|
+
<td>Save scene</td>
|
|
935
|
+
</tr>
|
|
936
|
+
<tr>
|
|
937
|
+
<td><code>bridge.set_expression(node, parm, expr, language="hscript")</code></td>
|
|
938
|
+
<td><code>{"set": True}</code></td>
|
|
939
|
+
<td>Set expression</td>
|
|
940
|
+
</tr>
|
|
941
|
+
<tr>
|
|
942
|
+
<td><code>bridge.scene_info()</code></td>
|
|
943
|
+
<td>scene metadata dict</td>
|
|
944
|
+
<td>HIP file, FPS, frame range</td>
|
|
945
|
+
</tr>
|
|
946
|
+
<tr>
|
|
947
|
+
<td><code>bridge.ping()</code></td>
|
|
948
|
+
<td><code>{"status": "ok", "version": ...}</code></td>
|
|
949
|
+
<td>Connectivity check</td>
|
|
950
|
+
</tr>
|
|
951
|
+
</tbody>
|
|
952
|
+
</table>
|
|
953
|
+
<p>See <code>CLAUDE.md</code> section 3 for full return value documentation.</p>
|
|
954
|
+
<hr />
|
|
955
|
+
<h2 id="9-headless-action-nodes-maya-and-blender">9. Headless Action Nodes — Maya and Blender</h2>
|
|
956
|
+
<p>Maya and Blender nodes use a <strong>list-builder</strong> pattern. Action nodes append operation dicts to a list; a headless executor node runs them all in a batch DCC session.</p>
|
|
957
|
+
<h3 id="action-node-skeleton">Action Node Skeleton</h3>
|
|
958
|
+
<pre><code class="language-python">class Maya_Action_Render(BaseNode):
|
|
959
|
+
name = "maya_action_render"
|
|
960
|
+
category = "Maya"
|
|
961
|
+
|
|
962
|
+
def __init__(self):
|
|
963
|
+
super().__init__()
|
|
964
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
965
|
+
self.add_input("actions_in", "list")
|
|
966
|
+
self.add_input("camera", "string", widget_type="text", default="persp")
|
|
967
|
+
self.add_input("start_frame","int", widget_type="int", default=1)
|
|
968
|
+
self.add_input("end_frame", "int", widget_type="int", default=48)
|
|
969
|
+
self.add_output("actions_out", "list")
|
|
970
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
971
|
+
|
|
972
|
+
async def execute(self, inputs):
|
|
973
|
+
actions = list(inputs.get("actions_in") or [])
|
|
974
|
+
actions.append({
|
|
975
|
+
"type": "render",
|
|
976
|
+
"camera": inputs.get("camera", "persp"),
|
|
977
|
+
"start_frame": inputs.get("start_frame", 1),
|
|
978
|
+
"end_frame": inputs.get("end_frame", 48),
|
|
979
|
+
})
|
|
980
|
+
return {"actions_out": actions, "exec_out": True}
|
|
981
|
+
</code></pre>
|
|
982
|
+
<p><strong>Conventions:</strong></p>
|
|
983
|
+
<ul>
|
|
984
|
+
<li><code>node_id</code> prefix: <code>maya_action_*</code> / <code>blender_action_*</code></li>
|
|
985
|
+
<li><code>category</code>: <code>"Maya"</code> / <code>"Blender"</code></li>
|
|
986
|
+
<li>Always use <code>list(inputs.get("actions_in") or [])</code> — never mutate the original list.</li>
|
|
987
|
+
<li>The <code>"type"</code> field must match a handler in the corresponding runner script.</li>
|
|
988
|
+
</ul>
|
|
989
|
+
<h3 id="executor-node">Executor Node</h3>
|
|
990
|
+
<p>Chain action nodes to <code>maya_headless</code> or <code>blender_headless</code>. The executor spawns the DCC process, sends it the action list, and returns a result dict.</p>
|
|
991
|
+
<hr />
|
|
992
|
+
<h2 id="10-prism-pipeline-nodes">10. Prism Pipeline Nodes</h2>
|
|
993
|
+
<p>All Prism nodes share a common skeleton with automatic <code>PrismCore</code> resolution.</p>
|
|
994
|
+
<pre><code class="language-python">from src.nodes.base import BaseNode
|
|
995
|
+
from src.utils.prism_core import resolve_prism_core
|
|
996
|
+
|
|
997
|
+
class Prism_Get_Assets(BaseNode):
|
|
998
|
+
name = "prism_get_assets"
|
|
999
|
+
category = "Prism"
|
|
1000
|
+
|
|
1001
|
+
def __init__(self):
|
|
1002
|
+
super().__init__()
|
|
1003
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
1004
|
+
self.add_input("entity", "string", widget_type="text")
|
|
1005
|
+
self.add_output("assets", "list")
|
|
1006
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
1007
|
+
|
|
1008
|
+
async def execute(self, inputs):
|
|
1009
|
+
core = resolve_prism_core(inputs)
|
|
1010
|
+
if core is None:
|
|
1011
|
+
self.log_error("PrismCore not available. Add a prism_core_init node.")
|
|
1012
|
+
return {"assets": [], "exec_out": True}
|
|
1013
|
+
try:
|
|
1014
|
+
assets = core.getAssets(entity=inputs.get("entity", ""))
|
|
1015
|
+
return {"assets": assets, "exec_out": True}
|
|
1016
|
+
except Exception as e:
|
|
1017
|
+
self.log_error(f"Prism error: {e}")
|
|
1018
|
+
return {"assets": [], "exec_out": True}
|
|
1019
|
+
|
|
1020
|
+
def register_node():
|
|
1021
|
+
return Prism_Get_Assets
|
|
1022
|
+
</code></pre>
|
|
1023
|
+
<p><strong>Prism node conventions:</strong></p>
|
|
1024
|
+
<ul>
|
|
1025
|
+
<li><code>node_id</code> must start with <code>prism_</code></li>
|
|
1026
|
+
<li><code>category</code> must be <code>"Prism"</code></li>
|
|
1027
|
+
<li><code>icon_path</code> should be <code>"icons/prism_icon.png"</code></li>
|
|
1028
|
+
<li>Never add a <code>core</code> input port — it is resolved automatically by <code>resolve_prism_core()</code></li>
|
|
1029
|
+
<li>Always guard with <code>if core is None</code></li>
|
|
1030
|
+
<li>Return safe empty defaults (<code>[]</code> / <code>{}</code>) on failure</li>
|
|
1031
|
+
</ul>
|
|
1032
|
+
<blockquote>
|
|
1033
|
+
<p><strong>Registry injection:</strong> When a <code>prism_*</code> node's Python code is compiled, the registry automatically rewrites <code>core = inputs.get('core')</code> → <code>core = resolve_prism_core(inputs)</code> and injects the import. You do not need to add the import manually in JSON-embedded code.</p>
|
|
1034
|
+
</blockquote>
|
|
1035
|
+
<hr />
|
|
1036
|
+
<h2 id="11-node-builder-gui">11. Node Builder GUI</h2>
|
|
1037
|
+
<p><strong>Open:</strong> Nodes → Node Builder, or press <code>Ctrl+E</code> with a node selected to edit its definition.</p>
|
|
1038
|
+
<h3 id="workflow">Workflow</h3>
|
|
1039
|
+
<ol>
|
|
1040
|
+
<li><strong>Node Metadata</strong> — set ID, display name, category, description, icon path, and exec/init flags.</li>
|
|
1041
|
+
<li><strong>Input / Output Tables</strong> — add rows for each port. Columns: Name, Type, Widget, Options, Default.</li>
|
|
1042
|
+
<li><strong>Code Editor</strong> — the Python code is generated and previewed here. The editor is bi-directional: editing the tables updates the code; editing the code updates the tables.</li>
|
|
1043
|
+
<li><strong>Save & Register</strong> — writes the JSON file to the <code>nodes/</code> directory and registers the node immediately.</li>
|
|
1044
|
+
</ol>
|
|
1045
|
+
<h3 id="exec-checkbox">Exec Checkbox</h3>
|
|
1046
|
+
<p>Checking "Use Exec" adds <code>exec_in</code> and <code>exec_out</code> to the port tables and to the generated code's <code>super().__init__(use_exec=True)</code> call. Do not add exec ports manually as table rows when this checkbox is enabled — they will be duplicated.</p>
|
|
1047
|
+
<h3 id="edit-existing-node">Edit Existing Node</h3>
|
|
1048
|
+
<p>Select a node on the canvas → <code>Ctrl+E</code>. The Node Builder opens with that node's current definition pre-loaded. <code>exec_in</code>/<code>exec_out</code> rows are filtered from the tables (they are managed by the exec checkbox, not the table). Change ports, code, or metadata, then Save & Register. Hot-reload the live canvas instances with <code>Ctrl+R</code>.</p>
|
|
1049
|
+
<h3 id="gemini-assistance">Gemini Assistance</h3>
|
|
1050
|
+
<p>The Node Builder can optionally call Gemini to suggest code snippets and starter templates while you write node logic. Enable it in the Node Builder settings and provide an API key. Always review generated code before executing in production.</p>
|
|
1051
|
+
<hr />
|
|
1052
|
+
<h2 id="12-distribution-and-installation">12. Distribution and Installation</h2>
|
|
1053
|
+
<h3 id="single-file-distribution">Single-File Distribution</h3>
|
|
1054
|
+
<p>A node is a single <code>.json</code> file. Distribute it by sharing the file. Recipients install it via:</p>
|
|
1055
|
+
<p><strong>Nodes → Load Node From JSON</strong> — validates the file, copies it to the user <code>nodes/</code> directory, and registers it immediately.</p>
|
|
1056
|
+
<p>The installer:<br />
|
|
1057
|
+
1. Checks for <code>node_id</code> and <code>python_code</code> fields (rejects workflow files with a clear error).<br />
|
|
1058
|
+
2. Creates the <code>nodes/</code> directory if absent.<br />
|
|
1059
|
+
3. Copies the file.<br />
|
|
1060
|
+
4. Updates <code>NodeRegistry._source_paths</code> so hot-reload targets the installed copy.</p>
|
|
1061
|
+
<h3 id="directory-distribution">Directory Distribution</h3>
|
|
1062
|
+
<p>For larger node libraries, distribute a folder of <code>.json</code> files. Users point <code>v_nodes_dir</code> to that folder via <strong>Edit → Preferences → Application Paths</strong>. The registry loads all <code>.json</code> files from every <code>v_nodes_dir</code> path on startup.</p>
|
|
1063
|
+
<h3 id="houdini-plugin-distribution">Houdini Plugin Distribution</h3>
|
|
1064
|
+
<p>For Houdini-specific node libraries, place the folder in <code>plugins/houdini/v_nodes_houdini/</code> (or configure <code>v_nodes_dir</code> to point to it). The Houdini <code>setup_env()</code> adds this path to the environment automatically when Vibrante-Node is launched from Houdini.</p>
|
|
1065
|
+
<h3 id="built-in-nodes-source">Built-in Nodes (Source)</h3>
|
|
1066
|
+
<p>To add a node directly to the application source:</p>
|
|
1067
|
+
<ol>
|
|
1068
|
+
<li>Create a class in <code>src/nodes/builtins/nodes.py</code> inheriting from <code>BaseNode</code>.</li>
|
|
1069
|
+
<li>Implement <code>__init__</code>, <code>execute()</code>, and <code>register_node()</code>.</li>
|
|
1070
|
+
<li>Call <code>NodeRegistry.register(MyNode)</code> in the <code>register_builtins()</code> function.</li>
|
|
1071
|
+
</ol>
|
|
1072
|
+
<hr />
|
|
1073
|
+
<h2 id="13-common-mistakes">13. Common Mistakes</h2>
|
|
1074
|
+
<table>
|
|
1075
|
+
<thead>
|
|
1076
|
+
<tr>
|
|
1077
|
+
<th>Mistake</th>
|
|
1078
|
+
<th>Correct Approach</th>
|
|
1079
|
+
</tr>
|
|
1080
|
+
</thead>
|
|
1081
|
+
<tbody>
|
|
1082
|
+
<tr>
|
|
1083
|
+
<td><code>super().__init__()</code> not called</td>
|
|
1084
|
+
<td>Always call <code>super().__init__()</code> as the first line of <code>__init__</code>.</td>
|
|
1085
|
+
</tr>
|
|
1086
|
+
<tr>
|
|
1087
|
+
<td>Adding <code>exec_in</code> / <code>exec_out</code> manually in <code>__init__</code></td>
|
|
1088
|
+
<td>They are added automatically by <code>super().__init__()</code>. Adding them again creates duplicate ports.</td>
|
|
1089
|
+
</tr>
|
|
1090
|
+
<tr>
|
|
1091
|
+
<td><code>exec_in</code> / <code>exec_out</code> missing from the JSON port arrays</td>
|
|
1092
|
+
<td>When <code>use_exec: true</code>, these must appear in the JSON arrays even though the Python code doesn't add them manually.</td>
|
|
1093
|
+
</tr>
|
|
1094
|
+
<tr>
|
|
1095
|
+
<td><code>return {}</code> (empty)</td>
|
|
1096
|
+
<td>Always return <code>{"exec_out": True}</code> for exec-flow nodes, even on early exit.</td>
|
|
1097
|
+
</tr>
|
|
1098
|
+
<tr>
|
|
1099
|
+
<td><code>time.sleep(n)</code> in <code>execute()</code></td>
|
|
1100
|
+
<td>Use <code>await asyncio.sleep(n)</code> — synchronous sleep blocks the Qt event loop.</td>
|
|
1101
|
+
</tr>
|
|
1102
|
+
<tr>
|
|
1103
|
+
<td>Calling <code>hou_bridge.get_hou()</code></td>
|
|
1104
|
+
<td>This function does not exist. Use <code>get_bridge()</code> to get the bridge singleton.</td>
|
|
1105
|
+
</tr>
|
|
1106
|
+
<tr>
|
|
1107
|
+
<td><code>result = bridge.create_node(...); result.path()</code></td>
|
|
1108
|
+
<td>The bridge returns dicts, not objects. Use <code>result["path"]</code>.</td>
|
|
1109
|
+
</tr>
|
|
1110
|
+
<tr>
|
|
1111
|
+
<td>Mutating <code>inputs.get("actions_in")</code> directly</td>
|
|
1112
|
+
<td>Always wrap: <code>actions = list(inputs.get("actions_in") or [])</code></td>
|
|
1113
|
+
</tr>
|
|
1114
|
+
<tr>
|
|
1115
|
+
<td>Adding ports twice (in AUTO block and below it)</td>
|
|
1116
|
+
<td>Each port name must appear exactly once.</td>
|
|
1117
|
+
</tr>
|
|
1118
|
+
<tr>
|
|
1119
|
+
<td>Using <code>import hou</code> directly</td>
|
|
1120
|
+
<td>Never import <code>hou</code> in node code — use the bridge. <code>hou</code> is only available inside Houdini's own process.</td>
|
|
1121
|
+
</tr>
|
|
1122
|
+
</tbody>
|
|
1123
|
+
</table>
|
|
1124
|
+
<hr />
|
|
1125
|
+
<p><strong>See also:</strong></p>
|
|
1126
|
+
<ul>
|
|
1127
|
+
<li><a href="USER_GUIDE.md">User Guide</a> — using the Node Builder GUI</li>
|
|
1128
|
+
<li><a href="AUTOMATION_API.md">Automation API</a> — programmatic node creation</li>
|
|
1129
|
+
<li><a href="DEVELOPER.md">Developer Guide</a> — registry internals and hot-reload</li>
|
|
1130
|
+
<li><a href="DOCUMENTATION.md">Technical Reference</a> — complete BaseNode API table, port schema, JSON schema</li>
|
|
1131
|
+
</ul>
|
|
1132
|
+
<section class="licence-attribution" style="margin-top:40px;padding-top:14px;border-top:1px solid #313244;font-size:.82em;color:#a6adc8">
|
|
1133
|
+
<p>Documentation &copy; 2024&ndash;2026 Mahmoud Kamal (KamalTD), licensed under
|
|
1134
|
+
<a href="https://creativecommons.org/licenses/by/4.0/" rel="license">CC BY 4.0</a>.
|
|
1135
|
+
<a href="LICENSE.txt">Full licence notice</a>.</p>
|
|
1136
|
+
<p>Search and syntax highlighting load <a href="https://lunrjs.com/">lunr.js</a> 2.3.9 (MIT)
|
|
1137
|
+
and <a href="https://highlightjs.org/">highlight.js</a> 11.9.0 (BSD-3-Clause) from
|
|
1138
|
+
cdn.jsdelivr.net at view time; neither library is redistributed with these files.</p>
|
|
1139
|
+
</section>
|
|
1140
|
+
</main>
|
|
1141
|
+
<script>
|
|
1142
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
1143
|
+
var links = document.querySelectorAll('.sidebar a');
|
|
1144
|
+
var headings = document.querySelectorAll('h1,h2,h3');
|
|
1145
|
+
window.addEventListener('scroll', function() {
|
|
1146
|
+
var cur = '';
|
|
1147
|
+
headings.forEach(function(h) { if (h.offsetTop <= window.scrollY + 80) cur = h.id; });
|
|
1148
|
+
links.forEach(function(a) {
|
|
1149
|
+
a.classList.toggle('active', a.getAttribute('href') === '#' + cur);
|
|
1150
|
+
});
|
|
1151
|
+
});
|
|
1152
|
+
});
|
|
1153
|
+
</script>
|
|
1154
|
+
</body>
|
|
1155
|
+
</html>
|