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,1664 @@
|
|
|
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 — Advanced Topics">
|
|
7
|
+
<title>Advanced Topics — 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" 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 active" 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>Advanced Topics</span></nav>
|
|
444
|
+
<div class="val-badge val-badge-ok" title="Verified against source code">✓ Verified</div>
|
|
445
|
+
<p># 09 — Advanced Topics</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><strong>Vibrante-Node v2.5.0 — Technical Reference</strong></p>
|
|
452
|
+
<p>This document covers advanced usage patterns, production deployment, DCC integration deep-dives, headless execution, custom executors, security considerations, and version migration. It is intended for pipeline TDs, tool developers, and studio engineers who need to go beyond the basic node-authoring workflow.</p>
|
|
453
|
+
<hr />
|
|
454
|
+
<h2 id="table-of-contents">Table of Contents</h2>
|
|
455
|
+
<ol>
|
|
456
|
+
<li><a href="#1-building-a-node-plugin-package">Building a Node Plugin Package</a></li>
|
|
457
|
+
<li><a href="#2-remote-and-headless-execution">Remote and Headless Execution</a></li>
|
|
458
|
+
<li><a href="#3-distributed-workflows">Distributed Workflows</a></li>
|
|
459
|
+
<li><a href="#4-custom-executors">Custom Executors</a></li>
|
|
460
|
+
<li><a href="#5-houdini-integration-deep-dive">Houdini Integration Deep-Dive</a></li>
|
|
461
|
+
<li><a href="#6-maya-headless-integration">Maya Headless Integration</a></li>
|
|
462
|
+
<li><a href="#7-blender-headless-integration">Blender Headless Integration</a></li>
|
|
463
|
+
<li><a href="#8-prism-pipeline-integration">Prism Pipeline Integration</a></li>
|
|
464
|
+
<li><a href="#9-production-deployment-with-pyinstaller">Production Deployment with PyInstaller</a></li>
|
|
465
|
+
<li><a href="#10-scaling-workflows">Scaling Workflows</a></li>
|
|
466
|
+
<li><a href="#11-memory-and-state-management">Memory and State Management</a></li>
|
|
467
|
+
<li><a href="#12-security-considerations">Security Considerations</a></li>
|
|
468
|
+
<li><a href="#13-version-migration">Version Migration</a></li>
|
|
469
|
+
<li><a href="#14-extending-the-node-builder-with-ai">Extending the Node Builder with AI</a></li>
|
|
470
|
+
<li><a href="#15-hot-reload-during-development">Hot-Reload during Development</a></li>
|
|
471
|
+
</ol>
|
|
472
|
+
<hr />
|
|
473
|
+
<h2 id="1-building-a-node-plugin-package">1. Building a Node Plugin Package</h2>
|
|
474
|
+
<p>A node plugin package is a directory (or zip-distributed directory) containing <code>.json</code> node definition files and optionally <code>.py</code> script files. The engine loads it at startup when the <code>v_nodes_dir</code> environment variable points to its location.</p>
|
|
475
|
+
<h3 id="recommended-folder-structure">Recommended folder structure</h3>
|
|
476
|
+
<pre><code>my_pipeline_nodes/
|
|
477
|
+
├── README.md
|
|
478
|
+
├── icons/
|
|
479
|
+
│ └── my_pipeline.svg
|
|
480
|
+
├── scripts/ # optional; shown in Scripts menu via v_scripts_path
|
|
481
|
+
│ ├── publish_asset.py
|
|
482
|
+
│ └── open_shot_folder.py
|
|
483
|
+
└── nodes/
|
|
484
|
+
├── my_get_asset.json
|
|
485
|
+
├── my_publish_version.json
|
|
486
|
+
├── my_open_in_nuke.json
|
|
487
|
+
└── my_slate_generator.json
|
|
488
|
+
</code></pre>
|
|
489
|
+
<h3 id="registering-the-package">Registering the package</h3>
|
|
490
|
+
<h4 id="option-a-environment-variable-any-host">Option A: Environment variable (any host)</h4>
|
|
491
|
+
<p>Set <code>v_nodes_dir</code> to the <code>nodes/</code> subdirectory before launching Vibrante-Node:</p>
|
|
492
|
+
<pre><code class="language-batch">:: Windows batch
|
|
493
|
+
set v_nodes_dir=C:\pipeline\my_pipeline_nodes\nodes
|
|
494
|
+
python src\main.py
|
|
495
|
+
</code></pre>
|
|
496
|
+
<pre><code class="language-bash"># Linux/macOS
|
|
497
|
+
export v_nodes_dir=/pipeline/my_pipeline_nodes/nodes
|
|
498
|
+
python src/main.py
|
|
499
|
+
</code></pre>
|
|
500
|
+
<p>Multiple directories are separated by the OS path separator (<code>;</code> on Windows, <code>:</code> on Linux/macOS):</p>
|
|
501
|
+
<pre><code>v_nodes_dir=C:\nodes\houdini_nodes;C:\nodes\prism_nodes;C:\nodes\nuke_nodes
|
|
502
|
+
</code></pre>
|
|
503
|
+
<h4 id="option-b-houdini-package-json">Option B: Houdini package JSON</h4>
|
|
504
|
+
<p>When Vibrante-Node is launched from Houdini, the <code>vibrante_node.json</code> package file can set <code>v_nodes_dir</code> for that DCC context:</p>
|
|
505
|
+
<pre><code class="language-json">{
|
|
506
|
+
"env": [
|
|
507
|
+
{ "VIBRANTE_NODE_APP": "C:/pipeline/vibrante_node_app" },
|
|
508
|
+
{ "VIBRANTE_PYTHON_EXE": "C:/Python311/python.exe" },
|
|
509
|
+
{ "v_nodes_dir": "C:/pipeline/my_pipeline_nodes/nodes" }
|
|
510
|
+
],
|
|
511
|
+
"path": "$VIBRANTE_NODE_APP/plugins/houdini/houdini"
|
|
512
|
+
}
|
|
513
|
+
</code></pre>
|
|
514
|
+
<h4 id="option-c-scripts-directory-for-v_scripts_path">Option C: scripts directory for v_scripts_path</h4>
|
|
515
|
+
<p>Point <code>v_scripts_path</code> to the <code>scripts/</code> subdirectory to populate the Scripts menu:</p>
|
|
516
|
+
<pre><code>v_scripts_path=C:\pipeline\my_pipeline_nodes\scripts
|
|
517
|
+
</code></pre>
|
|
518
|
+
<p>Script files (<code>.py</code>) in that directory appear as clickable menu items. They are executed with:</p>
|
|
519
|
+
<pre><code class="language-python">exec(script_code, {'window': main_window, 'scene': current_scene})
|
|
520
|
+
</code></pre>
|
|
521
|
+
<h3 id="node-json-authoring-checklist">Node JSON authoring checklist</h3>
|
|
522
|
+
<ul>
|
|
523
|
+
<li><code>node_id</code> must be globally unique. Use a studio prefix: <code>acme_get_asset</code>, not <code>get_asset</code>.</li>
|
|
524
|
+
<li><code>category</code> groups nodes in the Library panel. Use a consistent studio category: <code>"ACME Pipeline"</code>.</li>
|
|
525
|
+
<li><code>icon_path</code> can be an absolute path or a path relative to the app root.</li>
|
|
526
|
+
<li><code>use_exec: true</code> for any node that participates in the execution flow.</li>
|
|
527
|
+
<li>Include <code>exec_in</code> / <code>exec_out</code> in the <code>inputs</code> / <code>outputs</code> arrays when <code>use_exec: true</code>; the registry auto-inserts them if missing.</li>
|
|
528
|
+
<li><code>python_code</code> must be a single JSON string. Use <code>\n</code> for newlines and <code>\"</code> for quotes. Test parsing with Python's <code>json.loads()</code> before committing.</li>
|
|
529
|
+
</ul>
|
|
530
|
+
<hr />
|
|
531
|
+
<h2 id="2-remote-and-headless-execution">2. Remote and Headless Execution</h2>
|
|
532
|
+
<p>Vibrante-Node does not have a dedicated headless runner, but the engine can be instantiated and run without the Qt UI by running <code>src/core/engine.py</code> directly from a script.</p>
|
|
533
|
+
<h3 id="minimal-headless-runner">Minimal headless runner</h3>
|
|
534
|
+
<pre><code class="language-python"># headless_run.py
|
|
535
|
+
import asyncio
|
|
536
|
+
import json
|
|
537
|
+
import sys
|
|
538
|
+
|
|
539
|
+
# Qt is required for QObject (NetworkExecutor inherits it)
|
|
540
|
+
from PyQt5.QtWidgets import QApplication
|
|
541
|
+
app = QApplication(sys.argv)
|
|
542
|
+
|
|
543
|
+
from src.core.models import WorkflowModel
|
|
544
|
+
from src.core.graph import GraphManager
|
|
545
|
+
from src.core.registry import NodeRegistry
|
|
546
|
+
from src.core.engine import NetworkExecutor
|
|
547
|
+
|
|
548
|
+
# Load node definitions
|
|
549
|
+
NodeRegistry.load_all_with_extras("nodes")
|
|
550
|
+
|
|
551
|
+
# Load workflow
|
|
552
|
+
with open(sys.argv[1]) as f:
|
|
553
|
+
data = json.load(f)
|
|
554
|
+
model = WorkflowModel.model_validate(data)
|
|
555
|
+
|
|
556
|
+
gm = GraphManager()
|
|
557
|
+
gm.from_model(model)
|
|
558
|
+
|
|
559
|
+
# Wire up logging
|
|
560
|
+
executor = NetworkExecutor(gm)
|
|
561
|
+
executor.node_log.connect(lambda nid, msg, lvl: print(f"[{lvl}] {msg}"))
|
|
562
|
+
executor.node_error.connect(lambda nid, msg: print(f"ERROR: {msg}", file=sys.stderr))
|
|
563
|
+
executor.execution_finished.connect(lambda ok: print(f"Finished: {ok}") or app.quit())
|
|
564
|
+
|
|
565
|
+
# Run via asyncio directly (no _EventLoopRunner needed for headless)
|
|
566
|
+
loop = asyncio.new_event_loop()
|
|
567
|
+
asyncio.set_event_loop(loop)
|
|
568
|
+
|
|
569
|
+
task = loop.create_task(executor.run())
|
|
570
|
+
|
|
571
|
+
# Pump both loops
|
|
572
|
+
import time
|
|
573
|
+
while not task.done():
|
|
574
|
+
loop.call_soon(loop.stop)
|
|
575
|
+
loop.run_forever()
|
|
576
|
+
app.processEvents()
|
|
577
|
+
time.sleep(0.005)
|
|
578
|
+
|
|
579
|
+
loop.close()
|
|
580
|
+
sys.exit(0 if not executor._is_stopped else 1)
|
|
581
|
+
</code></pre>
|
|
582
|
+
<p>Usage:</p>
|
|
583
|
+
<pre><code>python headless_run.py my_workflow.json
|
|
584
|
+
</code></pre>
|
|
585
|
+
<h3 id="cli-argument-pattern">CLI argument pattern</h3>
|
|
586
|
+
<p>For scheduled or farm-submitted workflows, pass the workflow path and any parameter overrides as arguments:</p>
|
|
587
|
+
<pre><code class="language-python">import argparse
|
|
588
|
+
parser = argparse.ArgumentParser()
|
|
589
|
+
parser.add_argument("workflow", help="Path to .json workflow file")
|
|
590
|
+
parser.add_argument("--param", nargs=2, action="append", metavar=("NODE_ID:PORT", "VALUE"))
|
|
591
|
+
args = parser.parse_args()
|
|
592
|
+
|
|
593
|
+
# Override parameters before execution:
|
|
594
|
+
if args.param:
|
|
595
|
+
for node_port, value in args.param:
|
|
596
|
+
node_id, port = node_port.split(":", 1)
|
|
597
|
+
for node_model in model.nodes:
|
|
598
|
+
if node_model.node_id == node_id:
|
|
599
|
+
node_model.parameters[port] = value
|
|
600
|
+
</code></pre>
|
|
601
|
+
<h3 id="exit-code-convention">Exit code convention</h3>
|
|
602
|
+
<p>Return exit code <code>0</code> on success, <code>1</code> on failure. Connect <code>execution_finished</code>:</p>
|
|
603
|
+
<pre><code class="language-python">_result = [True]
|
|
604
|
+
executor.execution_finished.connect(lambda ok: _result.__setitem__(0, ok))
|
|
605
|
+
# ... run ...
|
|
606
|
+
sys.exit(0 if _result[0] else 1)
|
|
607
|
+
</code></pre>
|
|
608
|
+
<hr />
|
|
609
|
+
<h2 id="3-distributed-workflows">3. Distributed Workflows</h2>
|
|
610
|
+
<p>Vibrante-Node does not have built-in distributed execution, but workflows can be split across machines using the following strategies.</p>
|
|
611
|
+
<h3 id="strategy-1-split-at-file-boundaries">Strategy 1: Split at file boundaries</h3>
|
|
612
|
+
<p>Design your workflow so that each segment writes its outputs to disk (files, databases, or shared network storage) at strategic checkpoints. Split the monolithic workflow into multiple smaller <code>.json</code> files:</p>
|
|
613
|
+
<pre><code>00_asset_resolve.json → writes asset_list.json to NAS
|
|
614
|
+
01_scene_setup.json → reads asset_list.json, writes hip files to NAS
|
|
615
|
+
02_render_submit.json → reads hip paths, submits to farm
|
|
616
|
+
</code></pre>
|
|
617
|
+
<p>Each workflow file is a self-contained unit that can be run on any machine with <code>headless_run.py</code>. A pipeline coordinator (e.g. a render farm scheduler, a Jenkins pipeline, or a simple Python script) runs them in sequence.</p>
|
|
618
|
+
<h3 id="strategy-2-action-list-pattern-with-dcc-subprocesses">Strategy 2: Action-list pattern with DCC subprocesses</h3>
|
|
619
|
+
<p>For DCC-specific work, use the headless action-list pattern (see sections 6 and 7). The Vibrante-Node workflow runs on one machine and launches DCC subprocesses on the same or remote machines via network file system + command-line:</p>
|
|
620
|
+
<pre><code class="language-python"># In a node's execute():
|
|
621
|
+
import subprocess
|
|
622
|
+
ssh_cmd = ["ssh", "render_farm_host", "mayapy", "/nas/scripts/process_asset.py", asset_path]
|
|
623
|
+
result = await asyncio.create_subprocess_exec(*ssh_cmd, stdout=asyncio.subprocess.PIPE)
|
|
624
|
+
stdout, _ = await result.communicate()
|
|
625
|
+
</code></pre>
|
|
626
|
+
<h3 id="strategy-3-message-queue-integration">Strategy 3: Message queue integration</h3>
|
|
627
|
+
<p>For true distributed workflows, add a node that publishes a message (e.g. to RabbitMQ, Redis Streams, or a REST API) and a separate workflow that subscribes and processes. This pattern decouples the publisher from the consumer and allows arbitrary scaling.</p>
|
|
628
|
+
<h3 id="practical-considerations">Practical considerations</h3>
|
|
629
|
+
<ul>
|
|
630
|
+
<li><strong>Shared filesystem</strong>: All machines must be able to read/write to a common NAS path for the file-passing strategy.</li>
|
|
631
|
+
<li><strong>Node registration</strong>: Each machine must have <code>v_nodes_dir</code> pointing to the same plugin package (or a network copy of it).</li>
|
|
632
|
+
<li><strong>Credentials and secrets</strong>: Pass credentials via environment variables, not hardcoded in node JSON.</li>
|
|
633
|
+
<li><strong>Idempotency</strong>: Design nodes so that re-running them produces the same result. This makes retry logic safe.</li>
|
|
634
|
+
</ul>
|
|
635
|
+
<hr />
|
|
636
|
+
<h2 id="4-custom-executors">4. Custom Executors</h2>
|
|
637
|
+
<h3 id="subclassing-networkexecutor">Subclassing NetworkExecutor</h3>
|
|
638
|
+
<p>You can subclass <code>NetworkExecutor</code> to add pre/post hooks, intercept signals, or alter execution behaviour:</p>
|
|
639
|
+
<pre><code class="language-python">from src.core.engine import NetworkExecutor
|
|
640
|
+
|
|
641
|
+
class AuditingExecutor(NetworkExecutor):
|
|
642
|
+
"""Logs every node execution to an external audit trail."""
|
|
643
|
+
|
|
644
|
+
def __init__(self, graph_manager, audit_client):
|
|
645
|
+
super().__init__(graph_manager)
|
|
646
|
+
self._audit = audit_client
|
|
647
|
+
# Connect to our own signals to audit them
|
|
648
|
+
self.node_started.connect(self._on_started)
|
|
649
|
+
self.node_finished.connect(self._on_finished)
|
|
650
|
+
self.node_error.connect(self._on_error)
|
|
651
|
+
|
|
652
|
+
def _on_started(self, node_id):
|
|
653
|
+
self._audit.record_start(str(node_id))
|
|
654
|
+
|
|
655
|
+
def _on_finished(self, node_id, status):
|
|
656
|
+
self._audit.record_finish(str(node_id), status)
|
|
657
|
+
|
|
658
|
+
def _on_error(self, node_id, message):
|
|
659
|
+
self._audit.record_error(str(node_id), message)
|
|
660
|
+
</code></pre>
|
|
661
|
+
<h3 id="adding-pre-execution-hooks">Adding pre-execution hooks</h3>
|
|
662
|
+
<p>Override <code>run()</code> to inject setup logic:</p>
|
|
663
|
+
<pre><code class="language-python">async def run(self, init_only=False):
|
|
664
|
+
# Pre-execution setup
|
|
665
|
+
await self._pre_run_hook()
|
|
666
|
+
# Run the standard engine
|
|
667
|
+
await super().run(init_only=init_only)
|
|
668
|
+
# Post-execution cleanup
|
|
669
|
+
await self._post_run_hook()
|
|
670
|
+
|
|
671
|
+
async def _pre_run_hook(self):
|
|
672
|
+
self.node_log.emit(
|
|
673
|
+
list(self.graph_manager.nodes.keys())[0],
|
|
674
|
+
"Pre-run hook: validating credentials...",
|
|
675
|
+
"info"
|
|
676
|
+
)
|
|
677
|
+
# ... your setup logic ...
|
|
678
|
+
|
|
679
|
+
async def _post_run_hook(self):
|
|
680
|
+
# ... your cleanup logic ...
|
|
681
|
+
pass
|
|
682
|
+
</code></pre>
|
|
683
|
+
<h3 id="intercepting-node-output">Intercepting node output</h3>
|
|
684
|
+
<p>Override <code>_run_single_node_impl()</code> to intercept output after each node:</p>
|
|
685
|
+
<pre><code class="language-python">async def _run_single_node_impl(self, node_id, is_data_pull=False):
|
|
686
|
+
result = await super()._run_single_node_impl(node_id, is_data_pull)
|
|
687
|
+
if result and node_id in self.node_results:
|
|
688
|
+
self._validate_outputs(node_id, self.node_results[node_id])
|
|
689
|
+
return result
|
|
690
|
+
|
|
691
|
+
def _validate_outputs(self, node_id, outputs):
|
|
692
|
+
for key, value in outputs.items():
|
|
693
|
+
if value is None and key != "exec_out":
|
|
694
|
+
self.node_log.emit(node_id, f"Warning: output '{key}' is None", "warning")
|
|
695
|
+
</code></pre>
|
|
696
|
+
<h3 id="using-a-custom-executor-in-the-ui">Using a custom executor in the UI</h3>
|
|
697
|
+
<pre><code class="language-python"># In MainWindow.execute_pipeline():
|
|
698
|
+
from my_pipeline.executor import AuditingExecutor
|
|
699
|
+
|
|
700
|
+
executor = AuditingExecutor(graph_manager, audit_client=self._audit_client)
|
|
701
|
+
runner = _EventLoopRunner(executor)
|
|
702
|
+
# ... connect signals, start runner ...
|
|
703
|
+
</code></pre>
|
|
704
|
+
<hr />
|
|
705
|
+
<h2 id="5-houdini-integration-deep-dive">5. Houdini Integration Deep-Dive</h2>
|
|
706
|
+
<h3 id="architecture-overview">Architecture overview</h3>
|
|
707
|
+
<pre><code>Houdini process Vibrante-Node subprocess
|
|
708
|
+
┌─────────────────────────────────┐ ┌──────────────────────────────────┐
|
|
709
|
+
│ hou (Python API) │ │ NetworkExecutor │
|
|
710
|
+
│ │ │ │ │
|
|
711
|
+
│ vibrante_hou_server.py │◄────┤ HouBridge._send() │
|
|
712
|
+
│ ├─ _accept_loop (thread) │ │ │ JSON-RPC over TCP │
|
|
713
|
+
│ ├─ _handle_client (thread) │ │ │ 127.0.0.1:18811 │
|
|
714
|
+
│ └─ hdefereval.executeDeferred│ │ │ │
|
|
715
|
+
│ (Houdini main thread) │ │ node python_code: │
|
|
716
|
+
│ │ │ bridge = get_bridge() │
|
|
717
|
+
│ pythonrc.py (startup) │ │ bridge.create_node(...) │
|
|
718
|
+
│ vibrante_node_houdini.py │ │ bridge.set_parm(...) │
|
|
719
|
+
│ ├─ launch() │─────► bridge.run_code(...) │
|
|
720
|
+
│ ├─ setup_env() │ └──────────────────────────────────┘
|
|
721
|
+
│ └─ _ensure_command_server() │
|
|
722
|
+
└─────────────────────────────────┘
|
|
723
|
+
</code></pre>
|
|
724
|
+
<h3 id="rpc-server-lifecycle-vibrante_hou_serverpy">RPC server lifecycle (vibrante_hou_server.py)</h3>
|
|
725
|
+
<p>The server starts when <code>launch()</code> is called inside Houdini:</p>
|
|
726
|
+
<ol>
|
|
727
|
+
<li><code>_ensure_command_server()</code> calls <code>vibrante_hou_server.start()</code>.</li>
|
|
728
|
+
<li><code>start()</code> acquires <code>_lock</code> to prevent double-bind race conditions.</li>
|
|
729
|
+
<li>Creates a TCP socket bound to <code>127.0.0.1:18811</code> with <code>SO_REUSEADDR</code>.</li>
|
|
730
|
+
<li>Starts <code>_accept_loop()</code> in a daemon background thread.</li>
|
|
731
|
+
<li>Returns the port number, which is passed to the subprocess as <code>VIBRANTE_HOU_PORT</code>.</li>
|
|
732
|
+
</ol>
|
|
733
|
+
<p>Per client connection, <code>_handle_client()</code> runs in its own daemon thread, reading newline-delimited JSON commands and dispatching them.</p>
|
|
734
|
+
<h3 id="main-thread-dispatch">Main-thread dispatch</h3>
|
|
735
|
+
<p>All Houdini API calls must run on Houdini's main thread. The server uses <code>hdefereval.executeDeferred()</code>:</p>
|
|
736
|
+
<pre><code class="language-python">event = threading.Event()
|
|
737
|
+
result_box = {"result": None, "error": None, "done": False}
|
|
738
|
+
|
|
739
|
+
def _run(h=handler, p=params, box=result_box, evt=event):
|
|
740
|
+
try:
|
|
741
|
+
box["result"] = h(p)
|
|
742
|
+
except Exception as exc:
|
|
743
|
+
box["error"] = f"{type(exc).__name__}: {exc}\n{traceback.format_exc()}"
|
|
744
|
+
box["done"] = True
|
|
745
|
+
evt.set()
|
|
746
|
+
|
|
747
|
+
hdefereval.executeDeferred(_run)
|
|
748
|
+
event.wait(timeout=30)
|
|
749
|
+
</code></pre>
|
|
750
|
+
<p>The client thread blocks on <code>event.wait()</code> (max 30 seconds) while Houdini's main thread executes the command. If Houdini is blocked (e.g. cooking a slow geometry), the wait times out and the error is returned to the client.</p>
|
|
751
|
+
<h3 id="houbridge-client-thread-safety">HouBridge client thread safety</h3>
|
|
752
|
+
<p><code>HouBridge._send()</code> acquires <code>self._lock</code> before touching the socket. This means multiple nodes executed concurrently (from parallel exec chains) can safely call bridge methods without corrupting the response stream.</p>
|
|
753
|
+
<h3 id="environment-variable-flow">Environment variable flow</h3>
|
|
754
|
+
<p>When <code>launch()</code> is called:</p>
|
|
755
|
+
<ol>
|
|
756
|
+
<li><code>setup_env()</code> builds the subprocess environment:</li>
|
|
757
|
+
<li>Strips <code>PYTHONHOME</code>, <code>PYTHONSTARTUP</code> (Houdini's Python vars that break system Python).</li>
|
|
758
|
+
<li>Adds <code>$HFS/python3.Xlibs</code> to <code>PYTHONPATH</code> (so <code>import hou</code> works in the subprocess).</li>
|
|
759
|
+
<li>Adds <code>$HFS/bin</code> to <code>PATH</code> (for <code>_hou.pyd</code> DLL dependencies).</li>
|
|
760
|
+
<li>Sets <code>v_nodes_dir</code> to <code>plugins/houdini/v_nodes_houdini/</code>.</li>
|
|
761
|
+
<li>Sets <code>v_scripts_path</code> to <code>plugins/houdini/v_scripts_houdini/</code>.</li>
|
|
762
|
+
<li>Sets <code>VIBRANTE_HOUDINI_MODE=subprocess</code>.</li>
|
|
763
|
+
<li>Sets <code>VIBRANTE_HIP_FILE</code> if a .hip is open.</li>
|
|
764
|
+
<li>
|
|
765
|
+
<p>Sets <code>VIBRANTE_HOU_PORT</code> to the command server port.</p>
|
|
766
|
+
</li>
|
|
767
|
+
<li>
|
|
768
|
+
<p><code>_find_system_python()</code> locates a Python 3.11 installation with PyQt5 (Houdini's Python ships without PyQt5). Resolution order: <code>VIBRANTE_PYTHON_EXE</code> env var → Windows Registry → Windows Python Launcher → common paths → PATH scan.</p>
|
|
769
|
+
</li>
|
|
770
|
+
<li>
|
|
771
|
+
<p><code>subprocess.Popen([python_exe, "src/main.py"], cwd=app_root, env=env)</code> launches the UI.</p>
|
|
772
|
+
</li>
|
|
773
|
+
</ol>
|
|
774
|
+
<h3 id="accessing-hip-context-in-nodes">Accessing HIP context in nodes</h3>
|
|
775
|
+
<p>After <code>launch_with_context()</code>, these environment variables are available inside node <code>execute()</code> code:</p>
|
|
776
|
+
<pre><code class="language-python">import os
|
|
777
|
+
hip_file = os.environ.get("VIBRANTE_HIP_FILE", "")
|
|
778
|
+
hip_name = os.environ.get("VIBRANTE_HIP_NAME", "")
|
|
779
|
+
hou_version = os.environ.get("VIBRANTE_HOUDINI_VERSION", "")
|
|
780
|
+
</code></pre>
|
|
781
|
+
<h3 id="known-server-behaviours-and-workarounds">Known server behaviours and workarounds</h3>
|
|
782
|
+
<table>
|
|
783
|
+
<thead>
|
|
784
|
+
<tr>
|
|
785
|
+
<th>Situation</th>
|
|
786
|
+
<th>Behaviour</th>
|
|
787
|
+
</tr>
|
|
788
|
+
</thead>
|
|
789
|
+
<tbody>
|
|
790
|
+
<tr>
|
|
791
|
+
<td><code>hou.playbar</code> in headless (hbatch/hython)</td>
|
|
792
|
+
<td><code>AttributeError</code> caught; <code>frame_range</code> returns <code>[1, 240]</code></td>
|
|
793
|
+
</tr>
|
|
794
|
+
<tr>
|
|
795
|
+
<td><code>setDisplayFlag</code> on unsupported node types</td>
|
|
796
|
+
<td><code>getattr</code> capability check + <code>hou.OperationFailed</code> guard; raises <code>ValueError</code> with message</td>
|
|
797
|
+
</tr>
|
|
798
|
+
<tr>
|
|
799
|
+
<td>Double <code>start()</code> call</td>
|
|
800
|
+
<td><code>_lock</code> prevents double-bind; logs existing port and returns it</td>
|
|
801
|
+
</tr>
|
|
802
|
+
<tr>
|
|
803
|
+
<td>Houdini blocked cooking > 30s</td>
|
|
804
|
+
<td><code>event.wait(timeout=30)</code> expires; error returned to client; bridge disconnects</td>
|
|
805
|
+
</tr>
|
|
806
|
+
<tr>
|
|
807
|
+
<td>Broken pipe (Houdini closed)</td>
|
|
808
|
+
<td>Client catches <code>BrokenPipeError</code>, reconnects once, retries</td>
|
|
809
|
+
</tr>
|
|
810
|
+
</tbody>
|
|
811
|
+
</table>
|
|
812
|
+
<hr />
|
|
813
|
+
<h2 id="6-maya-headless-integration">6. Maya Headless Integration</h2>
|
|
814
|
+
<p>Maya integration uses the <strong>action-list pattern</strong>: nodes in Vibrante-Node build a list of action dictionaries, which a separate Maya subprocess processes in a single headless invocation. This avoids the overhead of launching Maya once per node.</p>
|
|
815
|
+
<h3 id="action-node-skeleton">Action node skeleton</h3>
|
|
816
|
+
<pre><code class="language-python"># nodes/maya_action_set_attr.json python_code:
|
|
817
|
+
from src.nodes.base import BaseNode
|
|
818
|
+
|
|
819
|
+
class Maya_Action_Set_Attr(BaseNode):
|
|
820
|
+
name = "maya_action_set_attr"
|
|
821
|
+
category = "Maya"
|
|
822
|
+
|
|
823
|
+
def __init__(self):
|
|
824
|
+
super().__init__()
|
|
825
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
826
|
+
self.add_input("actions_in", "list")
|
|
827
|
+
self.add_input("node_path", "string", widget_type="text")
|
|
828
|
+
self.add_input("attribute", "string", widget_type="text")
|
|
829
|
+
self.add_input("value", "any")
|
|
830
|
+
self.add_output("actions_out", "list")
|
|
831
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
832
|
+
|
|
833
|
+
async def execute(self, inputs):
|
|
834
|
+
actions = list(inputs.get("actions_in") or [])
|
|
835
|
+
actions.append({
|
|
836
|
+
"type": "set_attr",
|
|
837
|
+
"node": inputs.get("node_path", ""),
|
|
838
|
+
"attr": inputs.get("attribute", ""),
|
|
839
|
+
"value": inputs.get("value"),
|
|
840
|
+
})
|
|
841
|
+
return {"actions_out": actions, "exec_out": True}
|
|
842
|
+
|
|
843
|
+
def register_node():
|
|
844
|
+
return Maya_Action_Set_Attr
|
|
845
|
+
</code></pre>
|
|
846
|
+
<h3 id="maya-executor-node">Maya executor node</h3>
|
|
847
|
+
<p>A terminal node (e.g. <code>maya_headless_execute</code>) receives the final action list and runs Maya:</p>
|
|
848
|
+
<pre><code class="language-python">import subprocess, json, tempfile, os
|
|
849
|
+
|
|
850
|
+
async def execute(self, inputs):
|
|
851
|
+
actions = inputs.get("actions_in") or []
|
|
852
|
+
scene_file = inputs.get("scene_file", "")
|
|
853
|
+
maya_exe = inputs.get("maya_exe", "mayapy")
|
|
854
|
+
|
|
855
|
+
# Write actions to temp file (avoid shell quoting issues)
|
|
856
|
+
with tempfile.NamedTemporaryFile(mode="w", suffix=".json",
|
|
857
|
+
delete=False) as f:
|
|
858
|
+
json.dump({"scene": scene_file, "actions": actions}, f)
|
|
859
|
+
actions_path = f.name
|
|
860
|
+
|
|
861
|
+
runner_script = os.path.join(
|
|
862
|
+
os.path.dirname(__file__), "maya_runner.py"
|
|
863
|
+
)
|
|
864
|
+
|
|
865
|
+
try:
|
|
866
|
+
proc = await asyncio.create_subprocess_exec(
|
|
867
|
+
maya_exe, runner_script, actions_path,
|
|
868
|
+
stdout=asyncio.subprocess.PIPE,
|
|
869
|
+
stderr=asyncio.subprocess.PIPE,
|
|
870
|
+
)
|
|
871
|
+
stdout, stderr = await proc.communicate()
|
|
872
|
+
|
|
873
|
+
if proc.returncode != 0:
|
|
874
|
+
self.log_error(f"Maya failed:\n{stderr.decode()}")
|
|
875
|
+
return {"success": False, "exec_fail": True}
|
|
876
|
+
|
|
877
|
+
self.log_success("Maya execution complete.")
|
|
878
|
+
return {"success": True, "exec_out": True}
|
|
879
|
+
finally:
|
|
880
|
+
os.unlink(actions_path)
|
|
881
|
+
</code></pre>
|
|
882
|
+
<h3 id="maya-runner-script-maya_runnerpy">Maya runner script (maya_runner.py)</h3>
|
|
883
|
+
<pre><code class="language-python"># maya_runner.py — runs inside mayapy
|
|
884
|
+
import sys, json
|
|
885
|
+
import maya.standalone
|
|
886
|
+
maya.standalone.initialize(name="python")
|
|
887
|
+
import maya.cmds as cmds
|
|
888
|
+
|
|
889
|
+
with open(sys.argv[1]) as f:
|
|
890
|
+
data = json.load(f)
|
|
891
|
+
|
|
892
|
+
if data.get("scene"):
|
|
893
|
+
cmds.file(data["scene"], open=True, force=True)
|
|
894
|
+
|
|
895
|
+
handlers = {
|
|
896
|
+
"set_attr": lambda a: cmds.setAttr(f"{a['node']}.{a['attr']}", a["value"]),
|
|
897
|
+
"select": lambda a: cmds.select(a["nodes"]),
|
|
898
|
+
# ... add more action types here
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
for action in data.get("actions", []):
|
|
902
|
+
handler = handlers.get(action["type"])
|
|
903
|
+
if handler:
|
|
904
|
+
handler(action)
|
|
905
|
+
else:
|
|
906
|
+
print(f"Warning: unknown action type '{action['type']}'", file=sys.stderr)
|
|
907
|
+
|
|
908
|
+
maya.standalone.uninitialize()
|
|
909
|
+
</code></pre>
|
|
910
|
+
<h3 id="node-id-convention">Node ID convention</h3>
|
|
911
|
+
<p>Maya action nodes should use the prefix <code>maya_action_</code> (e.g. <code>maya_action_set_attr</code>, <code>maya_action_export_fbx</code>). The terminal executor node uses <code>maya_headless_execute</code>. Use category <code>"Maya"</code> for all Maya nodes.</p>
|
|
912
|
+
<hr />
|
|
913
|
+
<h2 id="7-blender-headless-integration">7. Blender Headless Integration</h2>
|
|
914
|
+
<p>Blender follows the same action-list pattern as Maya. The key difference is that Blender's headless Python (<code>blender --background --python script.py</code>) does not use <code>standalone.initialize()</code>.</p>
|
|
915
|
+
<h3 id="blender-runner-script-blender_runnerpy">Blender runner script (blender_runner.py)</h3>
|
|
916
|
+
<pre><code class="language-python"># blender_runner.py — runs inside blender --background
|
|
917
|
+
import sys, json
|
|
918
|
+
import bpy
|
|
919
|
+
|
|
920
|
+
with open(sys.argv[-1]) as f:
|
|
921
|
+
data = json.load(f)
|
|
922
|
+
|
|
923
|
+
if data.get("scene"):
|
|
924
|
+
bpy.ops.wm.open_mainfile(filepath=data["scene"])
|
|
925
|
+
|
|
926
|
+
handlers = {
|
|
927
|
+
"set_object_location": lambda a: (
|
|
928
|
+
setattr(bpy.data.objects[a["name"]].location, "x", a["x"]),
|
|
929
|
+
setattr(bpy.data.objects[a["name"]].location, "y", a["y"]),
|
|
930
|
+
setattr(bpy.data.objects[a["name"]].location, "z", a["z"]),
|
|
931
|
+
),
|
|
932
|
+
"render": lambda a: (
|
|
933
|
+
setattr(bpy.context.scene.render, "filepath", a.get("output", "/tmp/")),
|
|
934
|
+
bpy.ops.render.render(write_still=True),
|
|
935
|
+
),
|
|
936
|
+
# ... more action types
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
for action in data.get("actions", []):
|
|
940
|
+
handler = handlers.get(action["type"])
|
|
941
|
+
if handler:
|
|
942
|
+
handler(action)
|
|
943
|
+
else:
|
|
944
|
+
print(f"Unknown action: {action['type']}")
|
|
945
|
+
|
|
946
|
+
bpy.ops.wm.quit_blender()
|
|
947
|
+
</code></pre>
|
|
948
|
+
<h3 id="launching-blender-subprocess">Launching Blender subprocess</h3>
|
|
949
|
+
<pre><code class="language-python">proc = await asyncio.create_subprocess_exec(
|
|
950
|
+
"blender",
|
|
951
|
+
"--background",
|
|
952
|
+
"--python", runner_script,
|
|
953
|
+
"--", # separator: everything after -- is sys.argv in the script
|
|
954
|
+
actions_path,
|
|
955
|
+
stdout=asyncio.subprocess.PIPE,
|
|
956
|
+
stderr=asyncio.subprocess.PIPE,
|
|
957
|
+
)
|
|
958
|
+
</code></pre>
|
|
959
|
+
<p>Note the <code>--</code> separator: Blender passes all arguments after <code>--</code> as <code>sys.argv</code> to the Python script.</p>
|
|
960
|
+
<h3 id="node-id-convention_1">Node ID convention</h3>
|
|
961
|
+
<p>Use prefix <code>blender_action_</code> for action nodes and <code>blender_headless_execute</code> for the terminal node. Use category <code>"Blender"</code>.</p>
|
|
962
|
+
<hr />
|
|
963
|
+
<h2 id="8-prism-pipeline-integration">8. Prism Pipeline Integration</h2>
|
|
964
|
+
<p>Prism Pipeline is a studio project management system. Vibrante-Node integrates with it via <code>PrismCore</code>, which provides APIs for assets, shots, versions, and file paths.</p>
|
|
965
|
+
<h3 id="bootstrap-prism_core_init-node">Bootstrap (prism_core_init node)</h3>
|
|
966
|
+
<p>Place a <code>prism_core_init</code> node anywhere in the graph. The engine detects it during <code>_bootstrap_prism_if_needed()</code> before main graph execution and calls <code>bootstrap_prism_core()</code> on the Qt main thread:</p>
|
|
967
|
+
<pre><code class="language-python"># From engine.py
|
|
968
|
+
for node_id, node_model in self.graph_manager.nodes.items():
|
|
969
|
+
if node_model.node_id == "prism_core_init":
|
|
970
|
+
params = node_model.parameters
|
|
971
|
+
bootstrap_prism_core(
|
|
972
|
+
prism_scripts_path=params.get("prism_scripts_path",
|
|
973
|
+
"C:/Program Files/Prism2/Scripts"),
|
|
974
|
+
load_project=bool(params.get("load_project", True)),
|
|
975
|
+
show_ui=bool(params.get("show_ui", False)),
|
|
976
|
+
)
|
|
977
|
+
break
|
|
978
|
+
</code></pre>
|
|
979
|
+
<p><code>bootstrap_prism_core()</code> (<code>src/utils/prism_core.py</code>) adds <code>prism_scripts_path</code> to <code>sys.path</code>, imports <code>PrismCore</code>, and calls <code>PrismCore.create(prismArgs=["noUI", "loadProject"])</code>. The resulting object is stored in both <code>_CACHED_PRISM_CORE</code> (module-level) and <code>BaseNode.memory["_prism_core"]</code>.</p>
|
|
980
|
+
<p><strong>The <code>prism_core_init</code> node does not need to be wired to anything.</strong> Its mere presence in the graph triggers the bootstrap.</p>
|
|
981
|
+
<h3 id="core-resolution-resolve_prism_core">Core resolution (resolve_prism_core)</h3>
|
|
982
|
+
<p>Every <code>prism_*</code> node (except <code>prism_core_init</code>) gets its <code>core = inputs.get('core')</code> line automatically rewritten by <code>NodeRegistry._prepare_definition()</code> to:</p>
|
|
983
|
+
<pre><code class="language-python">core = resolve_prism_core(inputs)
|
|
984
|
+
</code></pre>
|
|
985
|
+
<p><code>resolve_prism_core()</code> checks four sources in order:<br />
|
|
986
|
+
1. <code>inputs["core"]</code> (explicit wire — backward compatible)<br />
|
|
987
|
+
2. <code>BaseNode.memory["_prism_core"]</code> (shared workflow memory)<br />
|
|
988
|
+
3. <code>_CACHED_PRISM_CORE</code> (module-level cache, survives multiple runs)<br />
|
|
989
|
+
4. <code>__main__.pcore</code> (for nodes running directly inside a DCC that has Prism loaded)</p>
|
|
990
|
+
<h3 id="prism-node-categories-and-examples">Prism node categories and examples</h3>
|
|
991
|
+
<p>Prism nodes are organised by the area of the pipeline they address. All use <code>category: "Prism"</code> and <code>icon_path: "icons/prism_icon.png"</code>.</p>
|
|
992
|
+
<table>
|
|
993
|
+
<thead>
|
|
994
|
+
<tr>
|
|
995
|
+
<th>Category</th>
|
|
996
|
+
<th>Node IDs (examples)</th>
|
|
997
|
+
</tr>
|
|
998
|
+
</thead>
|
|
999
|
+
<tbody>
|
|
1000
|
+
<tr>
|
|
1001
|
+
<td>Project</td>
|
|
1002
|
+
<td><code>prism_get_project_info</code>, <code>prism_set_project</code></td>
|
|
1003
|
+
</tr>
|
|
1004
|
+
<tr>
|
|
1005
|
+
<td>Assets</td>
|
|
1006
|
+
<td><code>prism_get_assets</code>, <code>prism_get_asset_info</code>, <code>prism_create_asset</code></td>
|
|
1007
|
+
</tr>
|
|
1008
|
+
<tr>
|
|
1009
|
+
<td>Shots</td>
|
|
1010
|
+
<td><code>prism_get_shots</code>, <code>prism_get_shot_info</code>, <code>prism_create_shot</code></td>
|
|
1011
|
+
</tr>
|
|
1012
|
+
<tr>
|
|
1013
|
+
<td>Sequences</td>
|
|
1014
|
+
<td><code>prism_get_sequences</code></td>
|
|
1015
|
+
</tr>
|
|
1016
|
+
<tr>
|
|
1017
|
+
<td>Versions</td>
|
|
1018
|
+
<td><code>prism_get_latest_version</code>, <code>prism_create_version</code>, <code>prism_get_version_path</code></td>
|
|
1019
|
+
</tr>
|
|
1020
|
+
<tr>
|
|
1021
|
+
<td>Export</td>
|
|
1022
|
+
<td><code>prism_export_scene</code>, <code>prism_publish_version</code></td>
|
|
1023
|
+
</tr>
|
|
1024
|
+
<tr>
|
|
1025
|
+
<td>Import</td>
|
|
1026
|
+
<td><code>prism_import_product</code>, <code>prism_load_asset_version</code></td>
|
|
1027
|
+
</tr>
|
|
1028
|
+
<tr>
|
|
1029
|
+
<td>Render</td>
|
|
1030
|
+
<td><code>prism_submit_render</code>, <code>prism_get_render_outputs</code></td>
|
|
1031
|
+
</tr>
|
|
1032
|
+
<tr>
|
|
1033
|
+
<td>Playblast</td>
|
|
1034
|
+
<td><code>prism_create_playblast</code></td>
|
|
1035
|
+
</tr>
|
|
1036
|
+
<tr>
|
|
1037
|
+
<td>Review</td>
|
|
1038
|
+
<td><code>prism_open_in_rv</code>, <code>prism_send_to_review</code></td>
|
|
1039
|
+
</tr>
|
|
1040
|
+
<tr>
|
|
1041
|
+
<td>Users</td>
|
|
1042
|
+
<td><code>prism_get_current_user</code>, <code>prism_get_users</code></td>
|
|
1043
|
+
</tr>
|
|
1044
|
+
<tr>
|
|
1045
|
+
<td>Settings</td>
|
|
1046
|
+
<td><code>prism_get_setting</code>, <code>prism_set_setting</code></td>
|
|
1047
|
+
</tr>
|
|
1048
|
+
</tbody>
|
|
1049
|
+
</table>
|
|
1050
|
+
<h3 id="writing-a-prism-node">Writing a Prism node</h3>
|
|
1051
|
+
<pre><code class="language-json">{
|
|
1052
|
+
"node_id": "prism_get_assets",
|
|
1053
|
+
"name": "prism_get_assets",
|
|
1054
|
+
"category": "Prism",
|
|
1055
|
+
"icon_path": "icons/prism_icon.png",
|
|
1056
|
+
"use_exec": true,
|
|
1057
|
+
"inputs": [
|
|
1058
|
+
{"name": "exec_in", "type": "exec"},
|
|
1059
|
+
{"name": "entity_type", "type": "string", "widget_type": "text", "default": ""}
|
|
1060
|
+
],
|
|
1061
|
+
"outputs": [
|
|
1062
|
+
{"name": "exec_out", "type": "exec"},
|
|
1063
|
+
{"name": "assets", "type": "list"}
|
|
1064
|
+
],
|
|
1065
|
+
"python_code": "..."
|
|
1066
|
+
}
|
|
1067
|
+
</code></pre>
|
|
1068
|
+
<pre><code class="language-python"># python_code (the registry auto-rewrites the core line):
|
|
1069
|
+
from src.nodes.base import BaseNode
|
|
1070
|
+
|
|
1071
|
+
class Prism_Get_Assets(BaseNode):
|
|
1072
|
+
name = "prism_get_assets"
|
|
1073
|
+
|
|
1074
|
+
def __init__(self):
|
|
1075
|
+
super().__init__()
|
|
1076
|
+
self.add_input("entity_type", "string", widget_type="text")
|
|
1077
|
+
self.add_output("assets", "list")
|
|
1078
|
+
|
|
1079
|
+
async def execute(self, inputs):
|
|
1080
|
+
core = inputs.get("core") # auto-rewritten to resolve_prism_core(inputs)
|
|
1081
|
+
if core is None:
|
|
1082
|
+
self.log_error("PrismCore not initialized.")
|
|
1083
|
+
return {"assets": [], "exec_out": True}
|
|
1084
|
+
try:
|
|
1085
|
+
assets = core.getAssets()
|
|
1086
|
+
return {"assets": assets, "exec_out": True}
|
|
1087
|
+
except Exception as e:
|
|
1088
|
+
self.log_error(f"Prism error: {e}")
|
|
1089
|
+
return {"assets": [], "exec_out": True}
|
|
1090
|
+
|
|
1091
|
+
def register_node():
|
|
1092
|
+
return Prism_Get_Assets
|
|
1093
|
+
</code></pre>
|
|
1094
|
+
<h3 id="qt-compatibility-for-prism">Qt compatibility for Prism</h3>
|
|
1095
|
+
<p>Prism internally uses <code>QColor.fromString()</code> and <code>shiboken2</code> stubs that may not exist in all Qt5 builds. <code>src/utils/qt_compat.py</code> provides shims:</p>
|
|
1096
|
+
<pre><code class="language-python">from src.utils.qt_compat import ensure_qcolor_from_string, ensure_shiboken_stub
|
|
1097
|
+
ensure_qcolor_from_string()
|
|
1098
|
+
ensure_shiboken_stub()
|
|
1099
|
+
</code></pre>
|
|
1100
|
+
<p><code>bootstrap_prism_core()</code> calls both of these before importing <code>PrismCore</code>. Prism node authors do not need to call them directly.</p>
|
|
1101
|
+
<hr />
|
|
1102
|
+
<h2 id="9-production-deployment-with-pyinstaller">9. Production Deployment with PyInstaller</h2>
|
|
1103
|
+
<p>Vibrante-Node is bundled for distribution using PyInstaller with the spec file <code>vibrante_node.spec</code>.</p>
|
|
1104
|
+
<h3 id="bundling">Bundling</h3>
|
|
1105
|
+
<pre><code class="language-batch">pyinstaller vibrante_node.spec
|
|
1106
|
+
</code></pre>
|
|
1107
|
+
<p>The resulting <code>dist/vibrante_node/</code> directory (or <code>dist/vibrante_node.exe</code> for one-file mode) contains the full Python runtime, all dependencies, and the application code.</p>
|
|
1108
|
+
<h3 id="spec-file-customisation-points">Spec file customisation points</h3>
|
|
1109
|
+
<p>The spec file needs attention in several areas:</p>
|
|
1110
|
+
<h4 id="hidden-imports">Hidden imports</h4>
|
|
1111
|
+
<p>Some imports are dynamic (via <code>exec()</code> in <code>NodeRegistry</code>) and PyInstaller cannot detect them statically. Add them to <code>hiddenimports</code>:</p>
|
|
1112
|
+
<pre><code class="language-python"># vibrante_node.spec
|
|
1113
|
+
a = Analysis(
|
|
1114
|
+
['src/main.py'],
|
|
1115
|
+
hiddenimports=[
|
|
1116
|
+
'PyQt5.Qsci', # optional QScintilla
|
|
1117
|
+
'toposort',
|
|
1118
|
+
'pydantic',
|
|
1119
|
+
'pydantic.v1', # some Prism versions use pydantic v1 shim
|
|
1120
|
+
'PrismCore', # if Prism nodes are bundled
|
|
1121
|
+
],
|
|
1122
|
+
# ... other Analysis arguments ...
|
|
1123
|
+
)
|
|
1124
|
+
</code></pre>
|
|
1125
|
+
<h4 id="data-files">Data files</h4>
|
|
1126
|
+
<p>Node JSON files and icons must be included as data:</p>
|
|
1127
|
+
<pre><code class="language-python">a = Analysis(
|
|
1128
|
+
# ...
|
|
1129
|
+
datas=[
|
|
1130
|
+
('nodes', 'nodes'), # bundled node definitions
|
|
1131
|
+
('icons', 'icons'), # icon SVG/PNG files
|
|
1132
|
+
('plugins', 'plugins'), # plugin directories
|
|
1133
|
+
],
|
|
1134
|
+
# ...
|
|
1135
|
+
)
|
|
1136
|
+
</code></pre>
|
|
1137
|
+
<p>The <code>resource_path()</code> function (<code>src/utils/paths.py</code>) handles the runtime path difference between running from source and running from a PyInstaller bundle (using <code>sys._MEIPASS</code> when frozen).</p>
|
|
1138
|
+
<h4 id="user-nodes-directory">User nodes directory</h4>
|
|
1139
|
+
<p>User-created nodes are stored in <code>app_dir()/nodes/</code>, where <code>app_dir()</code> returns the directory of the executable (not <code>sys._MEIPASS</code>). This allows users to add nodes without extracting the bundle:</p>
|
|
1140
|
+
<pre><code>dist/vibrante_node/ ← PyInstaller bundle root
|
|
1141
|
+
vibrante_node.exe ← or vibrante_node on Linux/macOS
|
|
1142
|
+
_internal/ ← frozen modules and bundled nodes
|
|
1143
|
+
nodes/ ← bundled node definitions (resource_path)
|
|
1144
|
+
nodes/ ← user-created nodes (app_dir)
|
|
1145
|
+
</code></pre>
|
|
1146
|
+
<h4 id="excluding-houdini-specific-dependencies">Excluding Houdini-specific dependencies</h4>
|
|
1147
|
+
<p>Houdini integration relies on <code>hou</code>, which is only available inside Houdini's Python. Do <strong>not</strong> bundle <code>hou</code> in the PyInstaller distribution. The bridge is designed to work via dynamic import at runtime.</p>
|
|
1148
|
+
<h3 id="distributing-to-artists">Distributing to artists</h3>
|
|
1149
|
+
<p>Typical studio distribution:</p>
|
|
1150
|
+
<ol>
|
|
1151
|
+
<li>Build the bundle on a reference machine (same OS as target).</li>
|
|
1152
|
+
<li>Place the <code>dist/vibrante_node/</code> directory on a network share.</li>
|
|
1153
|
+
<li>Artists run <code>vibrante_node.exe</code> (or <code>./vibrante_node</code>) directly from the network share, or IT creates a shortcut/module to it.</li>
|
|
1154
|
+
<li>Each artist's user nodes directory (<code>app_dir()/nodes/</code>) is local to their machine or in their user profile.</li>
|
|
1155
|
+
</ol>
|
|
1156
|
+
<h3 id="version-locking">Version locking</h3>
|
|
1157
|
+
<p>Pin all dependencies in <code>requirements.txt</code> to exact versions for reproducible builds:</p>
|
|
1158
|
+
<pre><code>PyQt5==5.15.10
|
|
1159
|
+
PyQt5-Qt5==5.15.2
|
|
1160
|
+
pydantic==2.6.4
|
|
1161
|
+
toposort==1.10
|
|
1162
|
+
QScintilla==2.14.1
|
|
1163
|
+
</code></pre>
|
|
1164
|
+
<hr />
|
|
1165
|
+
<h2 id="10-scaling-workflows">10. Scaling Workflows</h2>
|
|
1166
|
+
<h3 id="node-count">Node count</h3>
|
|
1167
|
+
<p>The engine is designed for typical workflow sizes of 5–50 nodes. For graphs with 100+ nodes:</p>
|
|
1168
|
+
<ul>
|
|
1169
|
+
<li><strong>Pre-calculation is O(n + e)</strong>: The lookup maps (<code>_incoming_data_conns</code>, <code>_driven_by_flow</code>) are built once per run from all connections. This is fast even for large graphs.</li>
|
|
1170
|
+
<li><strong>Topological sort</strong>: The <code>toposort</code> library is O(n + e). Sorting 1000 nodes typically takes under 1 ms.</li>
|
|
1171
|
+
<li><strong>Scene rendering</strong>: The Qt scene renders all visible items on every paint event. For 200+ nodes, enable Qt's BSP tree (<code>scene.setItemIndexMethod(QGraphicsScene.BspTreeIndex)</code>) for faster item lookup. This is the default.</li>
|
|
1172
|
+
<li><strong>History snapshots</strong>: Each <code>push_history()</code> serialises the entire graph. For 100+ nodes with complex parameters, this can take 10–50 ms. If undo performance is degraded, reduce the history depth or skip history on mouse-move events (only push on mouse-release).</li>
|
|
1173
|
+
</ul>
|
|
1174
|
+
<h3 id="connection-count">Connection count</h3>
|
|
1175
|
+
<p>Each node output traverses all connections during reactive propagation. For a node with 500 downstream connections (unusual but possible in fan-out graphs), each <code>set_output()</code> call iterates 500 connection objects. This is rarely a bottleneck in practice but can be addressed by batching outputs.</p>
|
|
1176
|
+
<h3 id="memory-per-node-result">Memory per node result</h3>
|
|
1177
|
+
<p><code>node_results</code> holds every output of every node. For a 100-node workflow where each node outputs a 10 MB numpy array, <code>node_results</code> holds 1 GB in memory. Design pipelines to either:</p>
|
|
1178
|
+
<ul>
|
|
1179
|
+
<li>Chain data through a single path (pass by reference, not copy), or</li>
|
|
1180
|
+
<li>Offload large data to disk and pass file paths between nodes.</li>
|
|
1181
|
+
</ul>
|
|
1182
|
+
<h3 id="profiling">Profiling</h3>
|
|
1183
|
+
<p>To profile execution time per node, add <code>time.perf_counter()</code> calls around the <code>SafeRuntime.run_node_safe()</code> call (already done in <code>MainWindow</code> for the log panel). For deep profiling, use Python's <code>cProfile</code>:</p>
|
|
1184
|
+
<pre><code class="language-python">import cProfile
|
|
1185
|
+
cProfile.run('asyncio.run(executor.run())', 'profile_output')
|
|
1186
|
+
import pstats
|
|
1187
|
+
p = pstats.Stats('profile_output')
|
|
1188
|
+
p.sort_stats('cumulative').print_stats(20)
|
|
1189
|
+
</code></pre>
|
|
1190
|
+
<hr />
|
|
1191
|
+
<h2 id="11-memory-and-state-management">11. Memory and State Management</h2>
|
|
1192
|
+
<h3 id="basenodememory">BaseNode.memory</h3>
|
|
1193
|
+
<p><code>BaseNode.memory</code> is a class-level <code>Dict[str, Any]</code> shared across all node instances in a run. It is cleared at the start of every <code>run()</code> call.</p>
|
|
1194
|
+
<p>Use it for:<br />
|
|
1195
|
+
- Passing values between nodes that are not directly connected (e.g. <code>SetVariable</code> / <code>GetVariable</code>).<br />
|
|
1196
|
+
- Caching expensive lookups (e.g. database connections, credential tokens) across multiple nodes in the same run.<br />
|
|
1197
|
+
- Storing loop state.</p>
|
|
1198
|
+
<p>Do <strong>not</strong> use it for:<br />
|
|
1199
|
+
- Persistent state between separate run clicks (it is cleared each time).<br />
|
|
1200
|
+
- Large data structures that should be passed via wires (use output ports for that).<br />
|
|
1201
|
+
- Cross-tab state (each tab has its own executor, which clears <code>memory</code>).</p>
|
|
1202
|
+
<h3 id="persistent-state-between-runs">Persistent state between runs</h3>
|
|
1203
|
+
<p>If a node needs to persist state between run clicks (e.g. a connection pool, a cached credential), use Python module-level globals in the node's code, or a file-based cache. Module-level state persists for the lifetime of the Python process.</p>
|
|
1204
|
+
<pre><code class="language-python"># In node python_code:
|
|
1205
|
+
_CACHED_TOKEN = None
|
|
1206
|
+
|
|
1207
|
+
async def execute(self, inputs):
|
|
1208
|
+
global _CACHED_TOKEN
|
|
1209
|
+
if _CACHED_TOKEN is None:
|
|
1210
|
+
_CACHED_TOKEN = await _authenticate(inputs.get("api_key"))
|
|
1211
|
+
# use _CACHED_TOKEN
|
|
1212
|
+
</code></pre>
|
|
1213
|
+
<p>Be aware that reloading the workflow (which re-registers the node class via <code>exec()</code>) resets module-level state in that scope.</p>
|
|
1214
|
+
<h3 id="groupnode-memory-isolation">GroupNode memory isolation</h3>
|
|
1215
|
+
<p><code>GroupNode</code> saves and restores <code>BaseNode.memory</code> around sub-execution:</p>
|
|
1216
|
+
<pre><code class="language-python">saved_memory = dict(_BaseNode.memory)
|
|
1217
|
+
await sub_executor.run() # clears memory internally
|
|
1218
|
+
_BaseNode.memory.clear()
|
|
1219
|
+
_BaseNode.memory.update(saved_memory)
|
|
1220
|
+
</code></pre>
|
|
1221
|
+
<p>Sub-graph nodes can read and write their own memory keys without affecting the outer graph's variables. Variables set in the outer graph before the <code>GroupNode</code> are visible to inner nodes because the sub-executor starts with an empty memory (not a copy of the outer memory).</p>
|
|
1222
|
+
<p>If you need to pass data from the outer graph into a sub-graph, use the <code>GroupInNode</code> / data wire mechanism, not <code>memory</code>.</p>
|
|
1223
|
+
<h3 id="clearing-state-between-runs">Clearing state between runs</h3>
|
|
1224
|
+
<p><code>NetworkExecutor.run()</code> clears at the start:</p>
|
|
1225
|
+
<pre><code class="language-python">BaseNode.memory.clear()
|
|
1226
|
+
self._executed_nodes.clear()
|
|
1227
|
+
self._currently_executing.clear()
|
|
1228
|
+
self._is_stopped = False
|
|
1229
|
+
self._active_tasks.clear()
|
|
1230
|
+
self.node_results = {}
|
|
1231
|
+
self.node_instances = {}
|
|
1232
|
+
</code></pre>
|
|
1233
|
+
<p>All node instances are re-created from scratch each run. Python objects held by previous instances are garbage-collected.</p>
|
|
1234
|
+
<hr />
|
|
1235
|
+
<h2 id="12-security-considerations">12. Security Considerations</h2>
|
|
1236
|
+
<h3 id="node-code-execution">Node code execution</h3>
|
|
1237
|
+
<p>Node <code>python_code</code> is executed via <code>exec()</code> in <code>NodeRegistry.register_definition()</code>:</p>
|
|
1238
|
+
<pre><code class="language-python">namespace = {}
|
|
1239
|
+
exec(definition.python_code, namespace)
|
|
1240
|
+
</code></pre>
|
|
1241
|
+
<p>This runs arbitrary Python code with the full privileges of the Python process. There is <strong>no sandboxing</strong>.</p>
|
|
1242
|
+
<h3 id="implications">Implications</h3>
|
|
1243
|
+
<ul>
|
|
1244
|
+
<li>A malicious node JSON file can execute any code on the machine, including file deletion, network access, and registry modification.</li>
|
|
1245
|
+
<li>Users who load workflows from untrusted sources are at risk if those workflows reference malicious node types.</li>
|
|
1246
|
+
<li>Nodes distributed via <code>v_nodes_dir</code> are loaded automatically on startup.</li>
|
|
1247
|
+
</ul>
|
|
1248
|
+
<h3 id="mitigations-in-production">Mitigations in production</h3>
|
|
1249
|
+
<ol>
|
|
1250
|
+
<li><strong>Code review before deployment</strong>: All node JSON files in the studio's plugin package should be reviewed by a trusted engineer before being added to <code>v_nodes_dir</code>.</li>
|
|
1251
|
+
<li><strong>Read-only plugin directories</strong>: Set the <code>v_nodes_dir</code> directory to read-only for regular users so they cannot replace node files with malicious versions.</li>
|
|
1252
|
+
<li><strong>Workflow allowlists</strong>: If running headless on a farm, validate that the workflow only uses node IDs from an approved list before executing.</li>
|
|
1253
|
+
<li><strong>Network isolation</strong>: Run the Vibrante-Node process under a service account with limited network and file system permissions.</li>
|
|
1254
|
+
<li><strong>Signed nodes</strong> (future): A potential enhancement is to require cryptographic signatures on node JSON files (e.g. using <code>nacl</code> or <code>cryptography</code>). Unsigned nodes would be rejected by the registry.</li>
|
|
1255
|
+
</ol>
|
|
1256
|
+
<h3 id="houdini-bridge-security">Houdini bridge security</h3>
|
|
1257
|
+
<p>The Houdini command server listens on <code>127.0.0.1</code> only (loopback). It cannot be accessed from other machines on the network. All commands require the caller to already have a local process on the same machine, which means an attacker would need local code execution to reach the server — at which point they already have the same privileges.</p>
|
|
1258
|
+
<h3 id="autosave-file">Autosave file</h3>
|
|
1259
|
+
<p>The autosave file at <code>~/.vibrante_node_autosave.json</code> contains a complete serialization of all open workflows. It is written with normal user file permissions. On shared workstations, other users with file system access could read workflow data. If workflows contain sensitive information (API keys in parameter widgets, file paths, credentials stored in node parameters), consider encrypting the autosave file or disabling it for sensitive use cases.</p>
|
|
1260
|
+
<hr />
|
|
1261
|
+
<h2 id="13-version-migration">13. Version Migration</h2>
|
|
1262
|
+
<p>Vibrante-Node uses Pydantic v2 for workflow serialization. The <code>WorkflowModel</code> schema has been stable since v1.5.0, but field additions and changes require migration logic for older files.</p>
|
|
1263
|
+
<h3 id="how-pydantic-handles-missing-fields">How Pydantic handles missing fields</h3>
|
|
1264
|
+
<p>Pydantic v2's <code>model_validate()</code> uses the field's <code>default</code> or <code>default_factory</code> for any key absent from the JSON. This means older workflow files load without errors even when new fields have been added, as long as new fields always have defaults.</p>
|
|
1265
|
+
<p>Current fields with defaults that were added in later versions:</p>
|
|
1266
|
+
<table>
|
|
1267
|
+
<thead>
|
|
1268
|
+
<tr>
|
|
1269
|
+
<th>Model</th>
|
|
1270
|
+
<th>Field</th>
|
|
1271
|
+
<th>Added in</th>
|
|
1272
|
+
<th>Default</th>
|
|
1273
|
+
</tr>
|
|
1274
|
+
</thead>
|
|
1275
|
+
<tbody>
|
|
1276
|
+
<tr>
|
|
1277
|
+
<td><code>NodeInstanceModel</code></td>
|
|
1278
|
+
<td><code>bypassed</code></td>
|
|
1279
|
+
<td>v1.6.0</td>
|
|
1280
|
+
<td><code>False</code></td>
|
|
1281
|
+
</tr>
|
|
1282
|
+
<tr>
|
|
1283
|
+
<td><code>NodeInstanceModel</code></td>
|
|
1284
|
+
<td><code>init_priority</code></td>
|
|
1285
|
+
<td>v1.8.5</td>
|
|
1286
|
+
<td><code>0</code></td>
|
|
1287
|
+
</tr>
|
|
1288
|
+
<tr>
|
|
1289
|
+
<td><code>WorkflowModel</code></td>
|
|
1290
|
+
<td><code>sticky_notes</code></td>
|
|
1291
|
+
<td>v1.7.0</td>
|
|
1292
|
+
<td><code>[]</code></td>
|
|
1293
|
+
</tr>
|
|
1294
|
+
<tr>
|
|
1295
|
+
<td><code>WorkflowModel</code></td>
|
|
1296
|
+
<td><code>backdrops</code></td>
|
|
1297
|
+
<td>v1.7.0</td>
|
|
1298
|
+
<td><code>[]</code></td>
|
|
1299
|
+
</tr>
|
|
1300
|
+
<tr>
|
|
1301
|
+
<td><code>WorkflowModel</code></td>
|
|
1302
|
+
<td><code>metadata</code></td>
|
|
1303
|
+
<td>v1.8.0</td>
|
|
1304
|
+
<td><code>{}</code></td>
|
|
1305
|
+
</tr>
|
|
1306
|
+
<tr>
|
|
1307
|
+
<td><code>ConnectionModel</code></td>
|
|
1308
|
+
<td><code>is_exec</code></td>
|
|
1309
|
+
<td>v1.5.0</td>
|
|
1310
|
+
<td><code>False</code></td>
|
|
1311
|
+
</tr>
|
|
1312
|
+
</tbody>
|
|
1313
|
+
</table>
|
|
1314
|
+
<p>All of these have safe defaults that make old files load correctly without any migration script.</p>
|
|
1315
|
+
<h3 id="node-id-changes">Node ID changes</h3>
|
|
1316
|
+
<p>If a node is renamed (its <code>node_id</code> changes), existing workflows that use the old <code>node_id</code> will fail to load that node (the registry will not find it). To handle this:</p>
|
|
1317
|
+
<h4 id="option-a-alias-registration">Option A: Alias registration</h4>
|
|
1318
|
+
<p>Register the node under both the old and new IDs:</p>
|
|
1319
|
+
<pre><code class="language-python"># In NodeRegistry.register_builtins() or a plugin's __init__:
|
|
1320
|
+
NodeRegistry._classes["old_node_id"] = NewNodeClass
|
|
1321
|
+
NodeRegistry._definitions["old_node_id"] = NodeRegistry._definitions.get("new_node_id")
|
|
1322
|
+
</code></pre>
|
|
1323
|
+
<h4 id="option-b-migration-script">Option B: Migration script</h4>
|
|
1324
|
+
<p>Write a one-time script that reads old workflow files and rewrites the <code>node_id</code>:</p>
|
|
1325
|
+
<pre><code class="language-python">import json, glob, os
|
|
1326
|
+
|
|
1327
|
+
OLD_ID = "my_old_node"
|
|
1328
|
+
NEW_ID = "my_new_node"
|
|
1329
|
+
|
|
1330
|
+
for path in glob.glob("workflows/**/*.json", recursive=True):
|
|
1331
|
+
with open(path) as f:
|
|
1332
|
+
data = json.load(f)
|
|
1333
|
+
changed = False
|
|
1334
|
+
for node in data.get("nodes", []):
|
|
1335
|
+
if node.get("node_id") == OLD_ID:
|
|
1336
|
+
node["node_id"] = NEW_ID
|
|
1337
|
+
changed = True
|
|
1338
|
+
if changed:
|
|
1339
|
+
with open(path, "w") as f:
|
|
1340
|
+
json.dump(data, f, indent=2)
|
|
1341
|
+
print(f"Migrated: {path}")
|
|
1342
|
+
</code></pre>
|
|
1343
|
+
<h4 id="option-c-compatibility-shim-in-the-registry">Option C: Compatibility shim in the registry</h4>
|
|
1344
|
+
<p>Override <code>register_definition()</code> to detect old IDs during loading and transparently remap them:</p>
|
|
1345
|
+
<pre><code class="language-python">LEGACY_NODE_IDS = {
|
|
1346
|
+
"my_old_node": "my_new_node",
|
|
1347
|
+
"hou_create_geo_v1": "hou_create_geo",
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
@classmethod
|
|
1351
|
+
def load_node(cls, file_path):
|
|
1352
|
+
# ... existing load logic ...
|
|
1353
|
+
with open(file_path) as f:
|
|
1354
|
+
data = json.load(f)
|
|
1355
|
+
# Remap legacy node_id in the JSON before validation
|
|
1356
|
+
if data.get("node_id") in LEGACY_NODE_IDS:
|
|
1357
|
+
data["node_id"] = LEGACY_NODE_IDS[data["node_id"]]
|
|
1358
|
+
definition = NodeDefinitionJSON.model_validate(data)
|
|
1359
|
+
# ...
|
|
1360
|
+
</code></pre>
|
|
1361
|
+
<p>For workflow files that reference legacy <code>node_id</code> values, add the remapping in <code>NodeScene.from_workflow_model()</code>:</p>
|
|
1362
|
+
<pre><code class="language-python">for node_model in model.nodes:
|
|
1363
|
+
if node_model.node_id in LEGACY_NODE_IDS:
|
|
1364
|
+
node_model.node_id = LEGACY_NODE_IDS[node_model.node_id]
|
|
1365
|
+
</code></pre>
|
|
1366
|
+
<h3 id="parameter-schema-changes">Parameter schema changes</h3>
|
|
1367
|
+
<p>When a node's parameter names change, old workflow files will have the old key in <code>NodeInstanceModel.parameters</code>. The node's <code>restore_from_parameters()</code> method is the right place to handle this migration:</p>
|
|
1368
|
+
<pre><code class="language-python">def restore_from_parameters(self, parameters):
|
|
1369
|
+
# Legacy: "file" was renamed to "file_path" in v1.8.0
|
|
1370
|
+
if "file" in parameters and "file_path" not in parameters:
|
|
1371
|
+
parameters["file_path"] = parameters.pop("file")
|
|
1372
|
+
# ... rest of restore logic ...
|
|
1373
|
+
</code></pre>
|
|
1374
|
+
<h3 id="workflow-version-field">Workflow version field</h3>
|
|
1375
|
+
<p><code>WorkflowModel.metadata</code> (a <code>Dict[str, Any]</code>) can store a version number:</p>
|
|
1376
|
+
<pre><code class="language-python"># When saving:
|
|
1377
|
+
model = scene.to_workflow_model()
|
|
1378
|
+
model.metadata["vibrante_version"] = "2.1.0"
|
|
1379
|
+
</code></pre>
|
|
1380
|
+
<pre><code class="language-python"># When loading:
|
|
1381
|
+
ver = model.metadata.get("vibrante_version", "unknown")
|
|
1382
|
+
if ver < "2.0.0":
|
|
1383
|
+
# apply migration
|
|
1384
|
+
pass
|
|
1385
|
+
</code></pre>
|
|
1386
|
+
<p>Version comparison with semantic version strings should use <code>packaging.version.Version</code> for correctness:</p>
|
|
1387
|
+
<pre><code class="language-python">from packaging.version import Version
|
|
1388
|
+
if Version(ver) < Version("2.0.0"):
|
|
1389
|
+
# migrate
|
|
1390
|
+
pass
|
|
1391
|
+
</code></pre>
|
|
1392
|
+
<hr />
|
|
1393
|
+
<h2 id="14-extending-the-node-builder-with-ai">14. Extending the Node Builder with AI</h2>
|
|
1394
|
+
<p>The <code>NodeBuilderDialog</code> includes a <code>GeminiChatWidget</code> that connects to the Gemini API for AI-assisted node code generation. This can be extended or replaced with a different AI provider.</p>
|
|
1395
|
+
<h3 id="adding-a-custom-ai-provider">Adding a custom AI provider</h3>
|
|
1396
|
+
<ol>
|
|
1397
|
+
<li>Create a new chat widget class that inherits from <code>QWidget</code> and emits <code>code_generated(str)</code> when the AI returns code.</li>
|
|
1398
|
+
<li>Replace the <code>GeminiChatWidget</code> instantiation in <code>NodeBuilderDialog._init_ui()</code> with your widget.</li>
|
|
1399
|
+
<li>Connect the signal to <code>self.code_edit.setPlainText(code)</code>.</li>
|
|
1400
|
+
</ol>
|
|
1401
|
+
<h3 id="prompt-engineering-for-node-generation">Prompt engineering for node generation</h3>
|
|
1402
|
+
<p>The most effective prompts include:</p>
|
|
1403
|
+
<ul>
|
|
1404
|
+
<li>The full <code>CLAUDE.md</code> / <code>GEMINI.md</code> developer guide as system context.</li>
|
|
1405
|
+
<li>The specific node category and DCC target.</li>
|
|
1406
|
+
<li>Example input/output port names and data types.</li>
|
|
1407
|
+
<li>A description of what the node should do.</li>
|
|
1408
|
+
</ul>
|
|
1409
|
+
<p>The AI should output a complete JSON block (with <code>python_code</code> included) or just the <code>python_code</code> string, which the dialog can auto-fill into the editor.</p>
|
|
1410
|
+
<hr />
|
|
1411
|
+
<h2 id="15-hot-reload-during-development">15. Hot-Reload during Development</h2>
|
|
1412
|
+
<p>During active node development, it is not necessary to restart the application to pick up code changes in a node's <code>.json</code> file.</p>
|
|
1413
|
+
<h3 id="reloading-a-single-node">Reloading a single node</h3>
|
|
1414
|
+
<pre><code class="language-python"># From the Scripting Console:
|
|
1415
|
+
from src.core.registry import NodeRegistry
|
|
1416
|
+
|
|
1417
|
+
# Re-read from disk and re-compile
|
|
1418
|
+
ok = NodeRegistry.reload_node_definition("my_node_id")
|
|
1419
|
+
if ok:
|
|
1420
|
+
print("Reloaded successfully")
|
|
1421
|
+
else:
|
|
1422
|
+
print(f"Error: {NodeRegistry.last_error}")
|
|
1423
|
+
|
|
1424
|
+
# Refresh the Library panel to show updated ports
|
|
1425
|
+
window.library_panel.refresh()
|
|
1426
|
+
</code></pre>
|
|
1427
|
+
<p>After reload, any newly placed <code>NodeWidget</code> of this type will use the new code. Existing widgets in the scene will continue to use the old instance until the scene is reloaded or the widget is removed and re-added.</p>
|
|
1428
|
+
<h3 id="reloading-all-nodes-from-a-directory">Reloading all nodes from a directory</h3>
|
|
1429
|
+
<pre><code class="language-python"># From the Scripting Console:
|
|
1430
|
+
from src.core.registry import NodeRegistry
|
|
1431
|
+
NodeRegistry._load_directory("/path/to/my_nodes")
|
|
1432
|
+
window.library_panel.refresh()
|
|
1433
|
+
</code></pre>
|
|
1434
|
+
<p>This scans the directory and re-registers any changed <code>.json</code> files. Existing node IDs are overwritten.</p>
|
|
1435
|
+
<h3 id="live-code-testing-in-the-scripting-console">Live code testing in the Scripting Console</h3>
|
|
1436
|
+
<p>You can prototype node logic directly in the Scripting Console before writing it into a <code>.json</code> file:</p>
|
|
1437
|
+
<pre><code class="language-python">from src.nodes.base import BaseNode
|
|
1438
|
+
import asyncio
|
|
1439
|
+
|
|
1440
|
+
class TestNode(BaseNode):
|
|
1441
|
+
name = "test"
|
|
1442
|
+
def __init__(self):
|
|
1443
|
+
super().__init__(use_exec=False)
|
|
1444
|
+
self.add_input("x", "float", default=1.0)
|
|
1445
|
+
self.add_output("y", "float")
|
|
1446
|
+
|
|
1447
|
+
async def execute(self, inputs):
|
|
1448
|
+
return {"y": inputs["x"] * 2}
|
|
1449
|
+
|
|
1450
|
+
n = TestNode()
|
|
1451
|
+
result = asyncio.run(n.execute({"x": 5.0}))
|
|
1452
|
+
print(result) # {"y": 10.0}
|
|
1453
|
+
</code></pre>
|
|
1454
|
+
<p>This runs synchronously in the console and gives immediate feedback on the node's logic without touching the registry or canvas.</p>
|
|
1455
|
+
<nav class="page-nav">
|
|
1456
|
+
<a class="page-nav-link prev" href="08_api_reference.html"><span class="page-nav-label">Previous</span><span class="page-nav-title">API Reference</span></a>
|
|
1457
|
+
<a class="page-nav-link next" href="10_contribution_guide.html"><span class="page-nav-label">Next</span><span class="page-nav-title">Contribution Guide</span></a>
|
|
1458
|
+
</nav>
|
|
1459
|
+
<section class="licence-attribution" style="margin-top:40px;padding-top:14px;border-top:1px solid #313244;font-size:.82em;color:#a6adc8">
|
|
1460
|
+
<p>Documentation &copy; 2024&ndash;2026 Mahmoud Kamal (KamalTD), licensed under
|
|
1461
|
+
<a href="https://creativecommons.org/licenses/by/4.0/" rel="license">CC BY 4.0</a>.
|
|
1462
|
+
<a href="../LICENSE.txt">Full licence notice</a>.</p>
|
|
1463
|
+
<p>Search and syntax highlighting load <a href="https://lunrjs.com/">lunr.js</a> 2.3.9 (MIT)
|
|
1464
|
+
and <a href="https://highlightjs.org/">highlight.js</a> 11.9.0 (BSD-3-Clause) from
|
|
1465
|
+
cdn.jsdelivr.net at view time; neither library is redistributed with these files.</p>
|
|
1466
|
+
</section>
|
|
1467
|
+
</div>
|
|
1468
|
+
</main>
|
|
1469
|
+
|
|
1470
|
+
<!-- ── TOC ────────────────────────────────────────────────────────────── -->
|
|
1471
|
+
<aside class="toc">
|
|
1472
|
+
<div class="toc-title">On this page</div>
|
|
1473
|
+
<a class="toc-link toc-h2" href="#table-of-contents">Table of Contents</a>
|
|
1474
|
+
<a class="toc-link toc-h2" href="#1-building-a-node-plugin-package">1. Building a Node Plugin Package</a>
|
|
1475
|
+
<a class="toc-link toc-h3" href="#recommended-folder-structure">Recommended folder structure</a>
|
|
1476
|
+
<a class="toc-link toc-h3" href="#registering-the-package">Registering the package</a>
|
|
1477
|
+
<a class="toc-link toc-h4" href="#option-a-environment-variable-any-host">Option A: Environment variable (any host)</a>
|
|
1478
|
+
<a class="toc-link toc-h4" href="#option-b-houdini-package-json">Option B: Houdini package JSON</a>
|
|
1479
|
+
<a class="toc-link toc-h4" href="#option-c-scripts-directory-for-v_scripts_path">Option C: scripts directory for v_scripts_path</a>
|
|
1480
|
+
<a class="toc-link toc-h3" href="#node-json-authoring-checklist">Node JSON authoring checklist</a>
|
|
1481
|
+
<a class="toc-link toc-h2" href="#2-remote-and-headless-execution">2. Remote and Headless Execution</a>
|
|
1482
|
+
<a class="toc-link toc-h3" href="#minimal-headless-runner">Minimal headless runner</a>
|
|
1483
|
+
<a class="toc-link toc-h3" href="#cli-argument-pattern">CLI argument pattern</a>
|
|
1484
|
+
<a class="toc-link toc-h3" href="#exit-code-convention">Exit code convention</a>
|
|
1485
|
+
<a class="toc-link toc-h2" href="#3-distributed-workflows">3. Distributed Workflows</a>
|
|
1486
|
+
<a class="toc-link toc-h3" href="#strategy-1-split-at-file-boundaries">Strategy 1: Split at file boundaries</a>
|
|
1487
|
+
<a class="toc-link toc-h3" href="#strategy-2-action-list-pattern-with-dcc-subprocesses">Strategy 2: Action-list pattern with DCC subprocesses</a>
|
|
1488
|
+
<a class="toc-link toc-h3" href="#strategy-3-message-queue-integration">Strategy 3: Message queue integration</a>
|
|
1489
|
+
<a class="toc-link toc-h3" href="#practical-considerations">Practical considerations</a>
|
|
1490
|
+
<a class="toc-link toc-h2" href="#4-custom-executors">4. Custom Executors</a>
|
|
1491
|
+
<a class="toc-link toc-h3" href="#subclassing-networkexecutor">Subclassing NetworkExecutor</a>
|
|
1492
|
+
<a class="toc-link toc-h3" href="#adding-pre-execution-hooks">Adding pre-execution hooks</a>
|
|
1493
|
+
<a class="toc-link toc-h3" href="#intercepting-node-output">Intercepting node output</a>
|
|
1494
|
+
<a class="toc-link toc-h3" href="#using-a-custom-executor-in-the-ui">Using a custom executor in the UI</a>
|
|
1495
|
+
<a class="toc-link toc-h2" href="#5-houdini-integration-deep-dive">5. Houdini Integration Deep-Dive</a>
|
|
1496
|
+
<a class="toc-link toc-h3" href="#architecture-overview">Architecture overview</a>
|
|
1497
|
+
<a class="toc-link toc-h3" href="#rpc-server-lifecycle-vibrante_hou_serverpy">RPC server lifecycle (vibrante_hou_server.py)</a>
|
|
1498
|
+
<a class="toc-link toc-h3" href="#main-thread-dispatch">Main-thread dispatch</a>
|
|
1499
|
+
<a class="toc-link toc-h3" href="#houbridge-client-thread-safety">HouBridge client thread safety</a>
|
|
1500
|
+
<a class="toc-link toc-h3" href="#environment-variable-flow">Environment variable flow</a>
|
|
1501
|
+
<a class="toc-link toc-h3" href="#accessing-hip-context-in-nodes">Accessing HIP context in nodes</a>
|
|
1502
|
+
<a class="toc-link toc-h3" href="#known-server-behaviours-and-workarounds">Known server behaviours and workarounds</a>
|
|
1503
|
+
<a class="toc-link toc-h2" href="#6-maya-headless-integration">6. Maya Headless Integration</a>
|
|
1504
|
+
<a class="toc-link toc-h3" href="#action-node-skeleton">Action node skeleton</a>
|
|
1505
|
+
<a class="toc-link toc-h3" href="#maya-executor-node">Maya executor node</a>
|
|
1506
|
+
<a class="toc-link toc-h3" href="#maya-runner-script-maya_runnerpy">Maya runner script (maya_runner.py)</a>
|
|
1507
|
+
<a class="toc-link toc-h3" href="#node-id-convention">Node ID convention</a>
|
|
1508
|
+
<a class="toc-link toc-h2" href="#7-blender-headless-integration">7. Blender Headless Integration</a>
|
|
1509
|
+
<a class="toc-link toc-h3" href="#blender-runner-script-blender_runnerpy">Blender runner script (blender_runner.py)</a>
|
|
1510
|
+
<a class="toc-link toc-h3" href="#launching-blender-subprocess">Launching Blender subprocess</a>
|
|
1511
|
+
<a class="toc-link toc-h3" href="#node-id-convention_1">Node ID convention</a>
|
|
1512
|
+
<a class="toc-link toc-h2" href="#8-prism-pipeline-integration">8. Prism Pipeline Integration</a>
|
|
1513
|
+
<a class="toc-link toc-h3" href="#bootstrap-prism_core_init-node">Bootstrap (prism_core_init node)</a>
|
|
1514
|
+
<a class="toc-link toc-h3" href="#core-resolution-resolve_prism_core">Core resolution (resolve_prism_core)</a>
|
|
1515
|
+
<a class="toc-link toc-h3" href="#prism-node-categories-and-examples">Prism node categories and examples</a>
|
|
1516
|
+
<a class="toc-link toc-h3" href="#writing-a-prism-node">Writing a Prism node</a>
|
|
1517
|
+
<a class="toc-link toc-h3" href="#qt-compatibility-for-prism">Qt compatibility for Prism</a>
|
|
1518
|
+
<a class="toc-link toc-h2" href="#9-production-deployment-with-pyinstaller">9. Production Deployment with PyInstaller</a>
|
|
1519
|
+
<a class="toc-link toc-h3" href="#bundling">Bundling</a>
|
|
1520
|
+
<a class="toc-link toc-h3" href="#spec-file-customisation-points">Spec file customisation points</a>
|
|
1521
|
+
<a class="toc-link toc-h4" href="#hidden-imports">Hidden imports</a>
|
|
1522
|
+
<a class="toc-link toc-h4" href="#data-files">Data files</a>
|
|
1523
|
+
<a class="toc-link toc-h4" href="#user-nodes-directory">User nodes directory</a>
|
|
1524
|
+
<a class="toc-link toc-h4" href="#excluding-houdini-specific-dependencies">Excluding Houdini-specific dependencies</a>
|
|
1525
|
+
<a class="toc-link toc-h3" href="#distributing-to-artists">Distributing to artists</a>
|
|
1526
|
+
<a class="toc-link toc-h3" href="#version-locking">Version locking</a>
|
|
1527
|
+
<a class="toc-link toc-h2" href="#10-scaling-workflows">10. Scaling Workflows</a>
|
|
1528
|
+
<a class="toc-link toc-h3" href="#node-count">Node count</a>
|
|
1529
|
+
<a class="toc-link toc-h3" href="#connection-count">Connection count</a>
|
|
1530
|
+
<a class="toc-link toc-h3" href="#memory-per-node-result">Memory per node result</a>
|
|
1531
|
+
<a class="toc-link toc-h3" href="#profiling">Profiling</a>
|
|
1532
|
+
<a class="toc-link toc-h2" href="#11-memory-and-state-management">11. Memory and State Management</a>
|
|
1533
|
+
<a class="toc-link toc-h3" href="#basenodememory">BaseNode.memory</a>
|
|
1534
|
+
<a class="toc-link toc-h3" href="#persistent-state-between-runs">Persistent state between runs</a>
|
|
1535
|
+
<a class="toc-link toc-h3" href="#groupnode-memory-isolation">GroupNode memory isolation</a>
|
|
1536
|
+
<a class="toc-link toc-h3" href="#clearing-state-between-runs">Clearing state between runs</a>
|
|
1537
|
+
<a class="toc-link toc-h2" href="#12-security-considerations">12. Security Considerations</a>
|
|
1538
|
+
<a class="toc-link toc-h3" href="#node-code-execution">Node code execution</a>
|
|
1539
|
+
<a class="toc-link toc-h3" href="#implications">Implications</a>
|
|
1540
|
+
<a class="toc-link toc-h3" href="#mitigations-in-production">Mitigations in production</a>
|
|
1541
|
+
<a class="toc-link toc-h3" href="#houdini-bridge-security">Houdini bridge security</a>
|
|
1542
|
+
<a class="toc-link toc-h3" href="#autosave-file">Autosave file</a>
|
|
1543
|
+
<a class="toc-link toc-h2" href="#13-version-migration">13. Version Migration</a>
|
|
1544
|
+
<a class="toc-link toc-h3" href="#how-pydantic-handles-missing-fields">How Pydantic handles missing fields</a>
|
|
1545
|
+
<a class="toc-link toc-h3" href="#node-id-changes">Node ID changes</a>
|
|
1546
|
+
<a class="toc-link toc-h4" href="#option-a-alias-registration">Option A: Alias registration</a>
|
|
1547
|
+
<a class="toc-link toc-h4" href="#option-b-migration-script">Option B: Migration script</a>
|
|
1548
|
+
<a class="toc-link toc-h4" href="#option-c-compatibility-shim-in-the-registry">Option C: Compatibility shim in the registry</a>
|
|
1549
|
+
<a class="toc-link toc-h3" href="#parameter-schema-changes">Parameter schema changes</a>
|
|
1550
|
+
<a class="toc-link toc-h3" href="#workflow-version-field">Workflow version field</a>
|
|
1551
|
+
<a class="toc-link toc-h2" href="#14-extending-the-node-builder-with-ai">14. Extending the Node Builder with AI</a>
|
|
1552
|
+
<a class="toc-link toc-h3" href="#adding-a-custom-ai-provider">Adding a custom AI provider</a>
|
|
1553
|
+
<a class="toc-link toc-h3" href="#prompt-engineering-for-node-generation">Prompt engineering for node generation</a>
|
|
1554
|
+
<a class="toc-link toc-h2" href="#15-hot-reload-during-development">15. Hot-Reload during Development</a>
|
|
1555
|
+
<a class="toc-link toc-h3" href="#reloading-a-single-node">Reloading a single node</a>
|
|
1556
|
+
<a class="toc-link toc-h3" href="#reloading-all-nodes-from-a-directory">Reloading all nodes from a directory</a>
|
|
1557
|
+
<a class="toc-link toc-h3" href="#live-code-testing-in-the-scripting-console">Live code testing in the Scripting Console</a>
|
|
1558
|
+
</aside>
|
|
1559
|
+
|
|
1560
|
+
<script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/highlight.min.js"></script>
|
|
1561
|
+
<script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
|
|
1562
|
+
<script>
|
|
1563
|
+
// ── Search ──────────────────────────────────────────────────────────────
|
|
1564
|
+
let _idx = null, _docs = [];
|
|
1565
|
+
|
|
1566
|
+
async function initSearch() {
|
|
1567
|
+
try {
|
|
1568
|
+
const base = document.getElementById('portal-base').dataset.base;
|
|
1569
|
+
const resp = await fetch(base + 'search.json');
|
|
1570
|
+
_docs = await resp.json();
|
|
1571
|
+
_idx = lunr(function() {
|
|
1572
|
+
this.ref('id');
|
|
1573
|
+
this.field('title', { boost: 10 });
|
|
1574
|
+
this.field('body');
|
|
1575
|
+
_docs.forEach((d, i) => {
|
|
1576
|
+
this.add({ id: i, title: d.title, body: d.body });
|
|
1577
|
+
});
|
|
1578
|
+
});
|
|
1579
|
+
} catch(e) { console.warn('Search index not available', e); }
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
function doSearch(q) {
|
|
1583
|
+
const box = document.getElementById('search-results');
|
|
1584
|
+
if (!q || q.length < 2) { box.classList.remove('visible'); return; }
|
|
1585
|
+
if (!_idx) { box.innerHTML = '<div class="search-no-results">Search index loading…</div>'; box.classList.add('visible'); return; }
|
|
1586
|
+
const results = _idx.search(q + '~1');
|
|
1587
|
+
if (!results.length) {
|
|
1588
|
+
box.innerHTML = '<div class="search-no-results">No results for "' + q + '"</div>';
|
|
1589
|
+
box.classList.add('visible'); return;
|
|
1590
|
+
}
|
|
1591
|
+
box.innerHTML = results.slice(0, 8).map(r => {
|
|
1592
|
+
const d = _docs[r.ref];
|
|
1593
|
+
const excerpt = d.body.substring(0, 140).replace(/[#*`]/g, '').trim() + '…';
|
|
1594
|
+
return `<a class="search-result-item" href="${d.url}">
|
|
1595
|
+
<div class="search-result-title">${d.title}</div>
|
|
1596
|
+
<div class="search-result-excerpt">${excerpt}</div>
|
|
1597
|
+
</a>`;
|
|
1598
|
+
}).join('');
|
|
1599
|
+
box.classList.add('visible');
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
1603
|
+
initSearch();
|
|
1604
|
+
const inp = document.getElementById('search-input');
|
|
1605
|
+
if (inp) {
|
|
1606
|
+
inp.addEventListener('input', e => doSearch(e.target.value));
|
|
1607
|
+
inp.addEventListener('keydown', e => { if (e.key === 'Escape') { e.target.value=''; document.getElementById('search-results').classList.remove('visible'); }});
|
|
1608
|
+
}
|
|
1609
|
+
document.addEventListener('click', e => {
|
|
1610
|
+
if (!e.target.closest('.search-wrap')) document.getElementById('search-results')?.classList.remove('visible');
|
|
1611
|
+
});
|
|
1612
|
+
// Keyboard shortcut: / to focus search
|
|
1613
|
+
document.addEventListener('keydown', e => {
|
|
1614
|
+
if (e.key === '/' && !['INPUT','TEXTAREA'].includes(document.activeElement.tagName)) {
|
|
1615
|
+
e.preventDefault(); document.getElementById('search-input')?.focus();
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
// ── TOC active section ──────────────────────────────────────────────
|
|
1620
|
+
const tocLinks = document.querySelectorAll('.toc-link');
|
|
1621
|
+
const headings = document.querySelectorAll('h2[id],h3[id],h4[id]');
|
|
1622
|
+
if (tocLinks.length && headings.length) {
|
|
1623
|
+
const obs = new IntersectionObserver(entries => {
|
|
1624
|
+
entries.forEach(entry => {
|
|
1625
|
+
if (entry.isIntersecting) {
|
|
1626
|
+
tocLinks.forEach(l => l.classList.remove('active'));
|
|
1627
|
+
const link = document.querySelector(`.toc-link[href="#${entry.target.id}"]`);
|
|
1628
|
+
if (link) link.classList.add('active');
|
|
1629
|
+
}
|
|
1630
|
+
});
|
|
1631
|
+
}, { rootMargin: '-20% 0px -70% 0px' });
|
|
1632
|
+
headings.forEach(h => obs.observe(h));
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
// ── Copy buttons ────────────────────────────────────────────────────
|
|
1636
|
+
document.querySelectorAll('pre').forEach(pre => {
|
|
1637
|
+
const btn = document.createElement('button');
|
|
1638
|
+
btn.className = 'copy-btn'; btn.textContent = 'Copy';
|
|
1639
|
+
btn.addEventListener('click', () => {
|
|
1640
|
+
const code = pre.querySelector('code');
|
|
1641
|
+
navigator.clipboard.writeText(code ? code.innerText : pre.innerText).then(() => {
|
|
1642
|
+
btn.textContent = 'Copied!'; btn.classList.add('copied');
|
|
1643
|
+
setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('copied'); }, 2000);
|
|
1644
|
+
});
|
|
1645
|
+
});
|
|
1646
|
+
pre.style.position = 'relative';
|
|
1647
|
+
pre.appendChild(btn);
|
|
1648
|
+
});
|
|
1649
|
+
|
|
1650
|
+
// ── Sidebar active ──────────────────────────────────────────────────
|
|
1651
|
+
const cur = window.location.pathname.split('/').pop();
|
|
1652
|
+
document.querySelectorAll('.sidebar-link').forEach(l => {
|
|
1653
|
+
if (l.getAttribute('href') === cur || l.getAttribute('href').endsWith(cur)) l.classList.add('active');
|
|
1654
|
+
});
|
|
1655
|
+
|
|
1656
|
+
// ── highlight.js ────────────────────────────────────────────────────
|
|
1657
|
+
if (window.hljs) {
|
|
1658
|
+
hljs.configure({ ignoreUnescapedHTML: true });
|
|
1659
|
+
hljs.highlightAll();
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
</script>
|
|
1663
|
+
</body>
|
|
1664
|
+
</html>
|