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
src/main.py
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
# Add the project root to sys.path
|
|
5
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
6
|
+
|
|
7
|
+
# Process PYTHONPATH: add entries to sys.path for external library access
|
|
8
|
+
def _apply_pythonpath():
|
|
9
|
+
pythonpath = os.environ.get('PYTHONPATH', '')
|
|
10
|
+
if pythonpath:
|
|
11
|
+
for p in pythonpath.split(os.pathsep):
|
|
12
|
+
p = p.strip()
|
|
13
|
+
if p and os.path.isdir(p) and p not in sys.path:
|
|
14
|
+
sys.path.insert(0, p)
|
|
15
|
+
print(f"Added to sys.path: {p}")
|
|
16
|
+
|
|
17
|
+
# Register Houdini DLL directories so `import hou` works on Windows.
|
|
18
|
+
# Python 3.8+ no longer uses PATH for DLL resolution; os.add_dll_directory()
|
|
19
|
+
# must be called explicitly for each directory containing required DLLs.
|
|
20
|
+
def _register_houdini_dlls():
|
|
21
|
+
hfs = os.environ.get('HFS', '')
|
|
22
|
+
if not hfs:
|
|
23
|
+
return
|
|
24
|
+
dll_dirs = [
|
|
25
|
+
os.path.join(hfs, 'bin'),
|
|
26
|
+
os.path.join(hfs, 'custom', 'houdini', 'dsolib'),
|
|
27
|
+
]
|
|
28
|
+
for d in dll_dirs:
|
|
29
|
+
if os.path.isdir(d):
|
|
30
|
+
try:
|
|
31
|
+
os.add_dll_directory(d)
|
|
32
|
+
print(f"Registered DLL directory: {d}")
|
|
33
|
+
except OSError:
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
_apply_pythonpath()
|
|
37
|
+
_register_houdini_dlls()
|
|
38
|
+
|
|
39
|
+
from src.utils.env_manager import env_manager
|
|
40
|
+
env_manager.initialize()
|
|
41
|
+
|
|
42
|
+
from src.utils.qt_compat import QtWidgets, QtGui, QtCore, exec_app
|
|
43
|
+
from src.utils.paths import resource_path
|
|
44
|
+
QApplication = QtWidgets.QApplication
|
|
45
|
+
QSplashScreen = QtWidgets.QSplashScreen
|
|
46
|
+
QProgressBar = QtWidgets.QProgressBar
|
|
47
|
+
QPixmap = QtGui.QPixmap
|
|
48
|
+
QColor = QtGui.QColor
|
|
49
|
+
QFont = QtGui.QFont
|
|
50
|
+
QPainter = QtGui.QPainter
|
|
51
|
+
Qt = QtCore.Qt
|
|
52
|
+
QTimer = QtCore.QTimer
|
|
53
|
+
|
|
54
|
+
import signal
|
|
55
|
+
import traceback
|
|
56
|
+
|
|
57
|
+
def exception_hook(exctype, value, tb):
|
|
58
|
+
"""Global function to catch unhandled exceptions."""
|
|
59
|
+
if exctype is KeyboardInterrupt:
|
|
60
|
+
sys.exit(0)
|
|
61
|
+
error_msg = "".join(traceback.format_exception(exctype, value, tb))
|
|
62
|
+
print(error_msg)
|
|
63
|
+
with open("crash.log", "w") as f:
|
|
64
|
+
f.write(error_msg)
|
|
65
|
+
sys.exit(1)
|
|
66
|
+
|
|
67
|
+
sys.excepthook = exception_hook
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class SplashScreen(QSplashScreen):
|
|
71
|
+
VERSION = "v2.5.1"
|
|
72
|
+
COPYRIGHT = "\u00a9 2026 Mahmoud Kamal - KamalTD"
|
|
73
|
+
|
|
74
|
+
def __init__(self):
|
|
75
|
+
splash_path = resource_path('splash.png')
|
|
76
|
+
pixmap = QPixmap(splash_path)
|
|
77
|
+
# Scale to a reasonable splash size while keeping aspect ratio
|
|
78
|
+
pixmap = pixmap.scaled(800, 500, Qt.KeepAspectRatio, Qt.SmoothTransformation)
|
|
79
|
+
|
|
80
|
+
# Paint version and copyright onto the pixmap
|
|
81
|
+
painter = QPainter(pixmap)
|
|
82
|
+
painter.setRenderHint(QPainter.TextAntialiasing)
|
|
83
|
+
|
|
84
|
+
# Version - top right
|
|
85
|
+
version_font = QFont("Segoe UI", 11, QFont.Bold)
|
|
86
|
+
painter.setFont(version_font)
|
|
87
|
+
painter.setPen(QColor(200, 200, 200, 200))
|
|
88
|
+
painter.drawText(
|
|
89
|
+
pixmap.rect().adjusted(0, 12, -16, 0),
|
|
90
|
+
Qt.AlignTop | Qt.AlignRight,
|
|
91
|
+
self.VERSION
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Copyright - bottom left
|
|
95
|
+
copyright_font = QFont("Segoe UI", 8)
|
|
96
|
+
painter.setFont(copyright_font)
|
|
97
|
+
painter.setPen(QColor(180, 180, 180, 180))
|
|
98
|
+
painter.drawText(
|
|
99
|
+
pixmap.rect().adjusted(12, 0, 0, -16),
|
|
100
|
+
Qt.AlignBottom | Qt.AlignLeft,
|
|
101
|
+
self.COPYRIGHT
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
painter.end()
|
|
105
|
+
|
|
106
|
+
super().__init__(pixmap, Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint)
|
|
107
|
+
|
|
108
|
+
# Add a progress bar at the bottom of the splash
|
|
109
|
+
self.progress_bar = QProgressBar(self)
|
|
110
|
+
bar_height = 6
|
|
111
|
+
self.progress_bar.setGeometry(0, pixmap.height() - bar_height, pixmap.width(), bar_height)
|
|
112
|
+
self.progress_bar.setTextVisible(False)
|
|
113
|
+
self.progress_bar.setStyleSheet("""
|
|
114
|
+
QProgressBar {
|
|
115
|
+
background-color: rgba(0, 0, 0, 100);
|
|
116
|
+
border: none;
|
|
117
|
+
}
|
|
118
|
+
QProgressBar::chunk {
|
|
119
|
+
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
|
|
120
|
+
stop:0 #b44aff, stop:1 #00d4ff);
|
|
121
|
+
}
|
|
122
|
+
""")
|
|
123
|
+
self.progress_bar.setValue(0)
|
|
124
|
+
|
|
125
|
+
# Message font
|
|
126
|
+
self._msg_font = QFont("Segoe UI", 9)
|
|
127
|
+
|
|
128
|
+
def showMessage(self, message, progress=0):
|
|
129
|
+
self.progress_bar.setValue(progress)
|
|
130
|
+
super().showMessage(
|
|
131
|
+
message,
|
|
132
|
+
Qt.AlignBottom | Qt.AlignHCenter,
|
|
133
|
+
QColor(200, 200, 200)
|
|
134
|
+
)
|
|
135
|
+
QApplication.processEvents()
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def main():
|
|
139
|
+
print("Starting QApplication...")
|
|
140
|
+
app = QApplication(sys.argv)
|
|
141
|
+
|
|
142
|
+
# Set application icon
|
|
143
|
+
icon_path = resource_path('icons', 'vibrante-node-icon.png')
|
|
144
|
+
if os.path.isfile(icon_path):
|
|
145
|
+
app.setWindowIcon(QtGui.QIcon(icon_path))
|
|
146
|
+
|
|
147
|
+
# Show splash screen
|
|
148
|
+
splash = SplashScreen()
|
|
149
|
+
splash.show()
|
|
150
|
+
QApplication.processEvents()
|
|
151
|
+
|
|
152
|
+
splash.showMessage("Loading modules...", 10)
|
|
153
|
+
|
|
154
|
+
from src.ui.window import MainWindow
|
|
155
|
+
|
|
156
|
+
splash.showMessage("Initializing application...", 40)
|
|
157
|
+
|
|
158
|
+
print("Initializing MainWindow...")
|
|
159
|
+
window = MainWindow()
|
|
160
|
+
|
|
161
|
+
splash.showMessage("Preparing workspace...", 70)
|
|
162
|
+
QApplication.processEvents()
|
|
163
|
+
|
|
164
|
+
splash.showMessage("Almost ready...", 90)
|
|
165
|
+
QApplication.processEvents()
|
|
166
|
+
|
|
167
|
+
print("Showing MainWindow...")
|
|
168
|
+
window.show()
|
|
169
|
+
|
|
170
|
+
splash.showMessage("Welcome to Vibrante-Node!", 100)
|
|
171
|
+
QApplication.processEvents()
|
|
172
|
+
|
|
173
|
+
# Close splash after a brief moment so the user sees 100%
|
|
174
|
+
QTimer.singleShot(500, splash.close)
|
|
175
|
+
|
|
176
|
+
# Let Ctrl+C in the terminal exit cleanly instead of crashing into Qt's event loop.
|
|
177
|
+
signal.signal(signal.SIGINT, lambda *_: app.quit())
|
|
178
|
+
# Wake the Python interpreter every 200 ms so SIGINT is processed promptly.
|
|
179
|
+
_sigint_timer = QTimer()
|
|
180
|
+
_sigint_timer.setInterval(200)
|
|
181
|
+
_sigint_timer.timeout.connect(lambda: None)
|
|
182
|
+
_sigint_timer.start()
|
|
183
|
+
|
|
184
|
+
print("Entering Event Loop...")
|
|
185
|
+
sys.exit(exec_app(app))
|
|
186
|
+
|
|
187
|
+
if __name__ == "__main__":
|
|
188
|
+
main()
|
src/models/__init__.py
ADDED
|
File without changes
|
src/nodes/__init__.py
ADDED
|
File without changes
|
src/nodes/ai/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""AI node definitions."""
|
src/nodes/base.py
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
from abc import ABC, abstractmethod
|
|
2
|
+
from typing import Dict, Any, List, Type, Optional
|
|
3
|
+
|
|
4
|
+
class Port:
|
|
5
|
+
def __init__(self, name: str, data_type: str = "any", widget_type: str = None, options: List[str] = None, default: Any = None):
|
|
6
|
+
self.name = name
|
|
7
|
+
self.data_type = data_type
|
|
8
|
+
self.widget_type = widget_type
|
|
9
|
+
self.options = options
|
|
10
|
+
self.default = default
|
|
11
|
+
|
|
12
|
+
class BaseNode(ABC):
|
|
13
|
+
name: str = "BaseNode"
|
|
14
|
+
description: str = ""
|
|
15
|
+
category: str = "General"
|
|
16
|
+
icon_path: Optional[str] = None
|
|
17
|
+
|
|
18
|
+
# Shared memory for variables during a single execution run
|
|
19
|
+
memory: Dict[str, Any] = {}
|
|
20
|
+
|
|
21
|
+
def __init__(self, use_exec: bool = True):
|
|
22
|
+
self.inputs: Dict[str, Port] = {}
|
|
23
|
+
self.outputs: Dict[str, Port] = {}
|
|
24
|
+
self.parameters: Dict[str, Any] = {}
|
|
25
|
+
self.parameter_types: Dict[str, Type] = {}
|
|
26
|
+
self._on_log = None # Hook for engine to capture logs
|
|
27
|
+
self._pending_logs: List[tuple] = [] # Buffer for log calls made before _on_log is set
|
|
28
|
+
self._on_output = None # Hook for engine to capture intermediate outputs
|
|
29
|
+
self._check_stopped = None # Hook for engine to check cancellation
|
|
30
|
+
self._on_ports_changed = None # Hook for UI to rebuild ports
|
|
31
|
+
self._is_port_connected = None # Hook for UI to check connections
|
|
32
|
+
self._on_dropdown_options_changed = None # Hook for UI to update dropdown items
|
|
33
|
+
|
|
34
|
+
if use_exec:
|
|
35
|
+
# DEFAULT pins if requested
|
|
36
|
+
self.add_exec_input("exec_in")
|
|
37
|
+
self.add_exec_output("exec_out")
|
|
38
|
+
|
|
39
|
+
def rebuild_ports(self) -> None:
|
|
40
|
+
"""Notifies the UI to rebuild the node's ports."""
|
|
41
|
+
if self._on_ports_changed:
|
|
42
|
+
self._on_ports_changed()
|
|
43
|
+
|
|
44
|
+
def is_port_connected(self, name: str, is_input: bool) -> bool:
|
|
45
|
+
"""Checks if a port is connected via the UI hook."""
|
|
46
|
+
if self._is_port_connected:
|
|
47
|
+
return self._is_port_connected(name, is_input)
|
|
48
|
+
return False
|
|
49
|
+
|
|
50
|
+
def is_stopped(self) -> bool:
|
|
51
|
+
"""Checks if the execution has been requested to stop."""
|
|
52
|
+
if self._check_stopped:
|
|
53
|
+
return self._check_stopped()
|
|
54
|
+
return False
|
|
55
|
+
|
|
56
|
+
async def set_output(self, name: str, value: Any) -> None:
|
|
57
|
+
"""Allows a node to push output data during execution (streaming)."""
|
|
58
|
+
if name in self.outputs:
|
|
59
|
+
self.parameters[name] = value
|
|
60
|
+
if self._on_output:
|
|
61
|
+
await self._on_output(name, value)
|
|
62
|
+
|
|
63
|
+
def clear_outputs(self) -> None:
|
|
64
|
+
"""Resets all output parameters to their defaults before a new execution."""
|
|
65
|
+
for name, port in self.outputs.items():
|
|
66
|
+
self.parameters[name] = port.default
|
|
67
|
+
|
|
68
|
+
def log_info(self, msg: str) -> None:
|
|
69
|
+
if self._on_log: self._on_log(msg, "info")
|
|
70
|
+
else: self._pending_logs.append((msg, "info"))
|
|
71
|
+
|
|
72
|
+
def log_success(self, msg: str) -> None:
|
|
73
|
+
if self._on_log: self._on_log(msg, "success")
|
|
74
|
+
else: self._pending_logs.append((msg, "success"))
|
|
75
|
+
|
|
76
|
+
def log_error(self, msg: str) -> None:
|
|
77
|
+
if self._on_log: self._on_log(msg, "error")
|
|
78
|
+
else: self._pending_logs.append((msg, "error"))
|
|
79
|
+
|
|
80
|
+
def _flush_pending_logs(self):
|
|
81
|
+
if self._on_log and self._pending_logs:
|
|
82
|
+
for msg, lvl in self._pending_logs:
|
|
83
|
+
self._on_log(msg, lvl)
|
|
84
|
+
self._pending_logs.clear()
|
|
85
|
+
|
|
86
|
+
def add_input(self, name: str, data_type: str = "any", widget_type: str = None, options: List[str] = None, default: Any = None) -> None:
|
|
87
|
+
# Provide sensible defaults instead of None for certain types
|
|
88
|
+
if default is None:
|
|
89
|
+
if data_type == "string": default = ""
|
|
90
|
+
elif data_type == "list": default = []
|
|
91
|
+
elif data_type == "bool": default = False
|
|
92
|
+
elif data_type in ["int", "float", "number"]: default = 0
|
|
93
|
+
|
|
94
|
+
self.inputs[name] = Port(name, data_type, widget_type, options, default)
|
|
95
|
+
# Always initialize parameter key to ensure it's accessible via .parameters.get()
|
|
96
|
+
if name not in self.parameters:
|
|
97
|
+
self.parameters[name] = default
|
|
98
|
+
|
|
99
|
+
def add_exec_input(self, name: str = "exec_in") -> None:
|
|
100
|
+
self.add_input(name, data_type="exec")
|
|
101
|
+
|
|
102
|
+
def add_output(self, name: str, data_type: str = "any", default: Any = None) -> None:
|
|
103
|
+
# Provide sensible defaults instead of None for certain types
|
|
104
|
+
if default is None:
|
|
105
|
+
if data_type == "string": default = ""
|
|
106
|
+
elif data_type == "list": default = []
|
|
107
|
+
elif data_type == "bool": default = False
|
|
108
|
+
elif data_type in ["int", "float", "number"]: default = 0
|
|
109
|
+
|
|
110
|
+
self.outputs[name] = Port(name, data_type, default=default)
|
|
111
|
+
# ALSO initialize output name in parameters so other nodes can query its 'last known' or 'default' state
|
|
112
|
+
if name not in self.parameters:
|
|
113
|
+
self.parameters[name] = default
|
|
114
|
+
|
|
115
|
+
def add_exec_output(self, name: str = "exec_out") -> None:
|
|
116
|
+
self.add_output(name, data_type="exec")
|
|
117
|
+
|
|
118
|
+
def add_parameter(self, name: str, param_type: Type, default: Any = None) -> None:
|
|
119
|
+
self.parameter_types[name] = param_type
|
|
120
|
+
self.parameters[name] = default
|
|
121
|
+
|
|
122
|
+
def restore_from_parameters(self, parameters: Dict[str, Any]) -> None:
|
|
123
|
+
"""Optional hook to restore dynamic state (like ports) from saved parameters."""
|
|
124
|
+
pass
|
|
125
|
+
|
|
126
|
+
def set_parameter(self, name: str, value: Any) -> None:
|
|
127
|
+
"""Set a parameter value. If the port is a dropdown and value is a list, updates options
|
|
128
|
+
and preserves the current selection when it still exists in the new list, otherwise
|
|
129
|
+
falls back to the first item."""
|
|
130
|
+
if isinstance(value, list) and name in self.inputs and self.inputs[name].widget_type == "dropdown":
|
|
131
|
+
self.inputs[name].options = value
|
|
132
|
+
current = self.parameters.get(name)
|
|
133
|
+
self.parameters[name] = current if (current and current in value) else (value[0] if value else "")
|
|
134
|
+
if self._on_dropdown_options_changed:
|
|
135
|
+
self._on_dropdown_options_changed(name, value)
|
|
136
|
+
else:
|
|
137
|
+
self.parameters[name] = value
|
|
138
|
+
|
|
139
|
+
def get_parameter(self, name: str, default: Any = None) -> Any:
|
|
140
|
+
"""Safely retrieve a parameter value."""
|
|
141
|
+
return self.parameters.get(name, default)
|
|
142
|
+
|
|
143
|
+
def __getitem__(self, key: str) -> Any:
|
|
144
|
+
"""Shortcut for get_parameter: node['param_name']"""
|
|
145
|
+
return self.get_parameter(key)
|
|
146
|
+
|
|
147
|
+
async def on_plug(self, port_name: str, is_input: bool, other_node: 'BaseNode', other_port_name: str) -> None:
|
|
148
|
+
"""Called when a connection is established (Async)."""
|
|
149
|
+
pass
|
|
150
|
+
|
|
151
|
+
async def on_unplug(self, port_name: str, is_input: bool) -> None:
|
|
152
|
+
"""Called when a connection is removed (Async)."""
|
|
153
|
+
pass
|
|
154
|
+
|
|
155
|
+
def on_plug_sync(self, port_name: str, is_input: bool, other_node: 'BaseNode', other_port_name: str) -> None:
|
|
156
|
+
"""Called when a connection is established (Sync)."""
|
|
157
|
+
pass
|
|
158
|
+
|
|
159
|
+
def on_unplug_sync(self, port_name: str, is_input: bool) -> None:
|
|
160
|
+
"""Called when a connection is removed (Sync)."""
|
|
161
|
+
pass
|
|
162
|
+
|
|
163
|
+
async def on_parameter_changed(self, name: str, value: Any) -> None:
|
|
164
|
+
"""Called when a parameter/widget value is changed."""
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
@abstractmethod
|
|
168
|
+
async def execute(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
|
|
169
|
+
"""
|
|
170
|
+
Main execution logic for the node.
|
|
171
|
+
:param inputs: Dictionary of input data from connected nodes.
|
|
172
|
+
:return: Dictionary of output data.
|
|
173
|
+
"""
|
|
174
|
+
pass
|
|
File without changes
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
from src.nodes.base import BaseNode
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class GroupInNode(BaseNode):
|
|
5
|
+
"""Input boundary marker inside a subgraph.
|
|
6
|
+
|
|
7
|
+
The GroupNode sets parameters['_injected_value'] to the external input
|
|
8
|
+
before running the sub-executor. execute() reads that key (not 'value',
|
|
9
|
+
which is an output port and is wiped by clear_outputs() during engine prep).
|
|
10
|
+
"""
|
|
11
|
+
name = "group_in"
|
|
12
|
+
description = "Subgraph input boundary — provides an external value to the internal graph"
|
|
13
|
+
category = "Group"
|
|
14
|
+
|
|
15
|
+
def __init__(self):
|
|
16
|
+
super().__init__(use_exec=False)
|
|
17
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
18
|
+
self.add_input("port_name", "string", widget_type="text", default="")
|
|
19
|
+
self.add_output("value", "any")
|
|
20
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
21
|
+
|
|
22
|
+
async def execute(self, inputs):
|
|
23
|
+
return {"value": self.parameters.get("_injected_value")}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class GroupOutNode(BaseNode):
|
|
27
|
+
"""Output boundary marker inside a subgraph.
|
|
28
|
+
|
|
29
|
+
After the sub-executor finishes, GroupNode reads node_results[id]['value']
|
|
30
|
+
and maps it to the corresponding group output port.
|
|
31
|
+
|
|
32
|
+
exec_in/exec_out allow the inner exec chain to route explicitly through this
|
|
33
|
+
node. When wired, the node runs at the point the exec chain reaches it.
|
|
34
|
+
When not wired (legacy subgraphs), it runs as a data entry node — same
|
|
35
|
+
as before, so existing saved workflows are unaffected.
|
|
36
|
+
"""
|
|
37
|
+
name = "group_out"
|
|
38
|
+
description = "Subgraph output boundary — returns a value to the parent graph"
|
|
39
|
+
category = "Group"
|
|
40
|
+
|
|
41
|
+
def __init__(self):
|
|
42
|
+
super().__init__(use_exec=True)
|
|
43
|
+
# [AUTO-GENERATED-PORTS-START]
|
|
44
|
+
self.add_input("port_name", "string", widget_type="text", default="")
|
|
45
|
+
self.add_input("value", "any")
|
|
46
|
+
self.add_output("value", "any")
|
|
47
|
+
# [AUTO-GENERATED-PORTS-END]
|
|
48
|
+
|
|
49
|
+
async def execute(self, inputs):
|
|
50
|
+
await self.set_output("exec_out", True)
|
|
51
|
+
return {"value": inputs.get("value"), "exec_out": True}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class GroupNode(BaseNode):
|
|
55
|
+
"""Collapsed subgraph node.
|
|
56
|
+
|
|
57
|
+
Stores a complete WorkflowModel in parameters['__workflow__'] and
|
|
58
|
+
executes it with a headless NetworkExecutor when triggered.
|
|
59
|
+
Dynamic input/output ports are recreated from parameters['__port_defs__']
|
|
60
|
+
via restore_from_parameters() which the engine calls before each run.
|
|
61
|
+
"""
|
|
62
|
+
name = "group_node"
|
|
63
|
+
description = "Collapsed group of nodes — double-click to inspect"
|
|
64
|
+
category = "Group"
|
|
65
|
+
|
|
66
|
+
def __init__(self):
|
|
67
|
+
super().__init__(use_exec=True)
|
|
68
|
+
# Fixed failure branch — fires when the inner graph reports an error;
|
|
69
|
+
# exec_out fires only on success. Both are fixed ports (not in __port_defs__).
|
|
70
|
+
self.add_exec_output("exec_fail")
|
|
71
|
+
# Dynamic ports are added at group-creation time and restored at load time.
|
|
72
|
+
# These three keys are always present so serialization has stable keys.
|
|
73
|
+
self.parameters.setdefault("__workflow__", {})
|
|
74
|
+
self.parameters.setdefault("__port_defs__", [])
|
|
75
|
+
self.parameters.setdefault("__name__", "Group")
|
|
76
|
+
|
|
77
|
+
# ------------------------------------------------------------------
|
|
78
|
+
# Port restoration (called by engine before each execution)
|
|
79
|
+
# ------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
def restore_from_parameters(self, parameters):
|
|
82
|
+
port_defs = parameters.get("__port_defs__", [])
|
|
83
|
+
for pd in port_defs:
|
|
84
|
+
name = pd.get("name", "")
|
|
85
|
+
data_type = pd.get("type", "any")
|
|
86
|
+
if not name:
|
|
87
|
+
continue
|
|
88
|
+
if pd.get("is_input", True):
|
|
89
|
+
if name not in self.inputs:
|
|
90
|
+
self.add_input(name, data_type)
|
|
91
|
+
else:
|
|
92
|
+
if name not in self.outputs:
|
|
93
|
+
self.add_output(name, data_type)
|
|
94
|
+
|
|
95
|
+
# ------------------------------------------------------------------
|
|
96
|
+
# Execution
|
|
97
|
+
# ------------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
async def execute(self, inputs):
|
|
100
|
+
from src.core.models import WorkflowModel
|
|
101
|
+
from src.core.graph import GraphManager
|
|
102
|
+
from src.core.engine import NetworkExecutor
|
|
103
|
+
from src.nodes.base import BaseNode as _BaseNode
|
|
104
|
+
|
|
105
|
+
workflow_json = self.parameters.get("__workflow__", {})
|
|
106
|
+
if not workflow_json:
|
|
107
|
+
self.log_error("Group node has no internal workflow.")
|
|
108
|
+
await self.set_output("exec_fail", True)
|
|
109
|
+
return {"exec_out": False, "exec_fail": True}
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
workflow = WorkflowModel.model_validate(workflow_json)
|
|
113
|
+
except Exception as e:
|
|
114
|
+
self.log_error(f"Failed to load internal workflow: {e}")
|
|
115
|
+
await self.set_output("exec_fail", True)
|
|
116
|
+
return {"exec_out": False, "exec_fail": True}
|
|
117
|
+
|
|
118
|
+
# Inject external input values into group_in nodes.
|
|
119
|
+
# Use '_injected_value' (not 'value') because 'value' is an output port and
|
|
120
|
+
# the engine's clear_outputs() wipes parameters["value"] back to None during
|
|
121
|
+
# node prep — before execute() is ever called.
|
|
122
|
+
for node_model in workflow.nodes:
|
|
123
|
+
if node_model.node_id == "group_in":
|
|
124
|
+
port_name = node_model.parameters.get("port_name", "")
|
|
125
|
+
if port_name and port_name in inputs:
|
|
126
|
+
node_model.parameters["_injected_value"] = inputs[port_name]
|
|
127
|
+
|
|
128
|
+
gm = GraphManager()
|
|
129
|
+
gm.from_model(workflow)
|
|
130
|
+
|
|
131
|
+
# Track inner node errors so we can choose the correct exec branch.
|
|
132
|
+
inner_errors = []
|
|
133
|
+
def _capture_error(nid, msg):
|
|
134
|
+
inner_errors.append(msg)
|
|
135
|
+
node_model = gm.nodes.get(nid)
|
|
136
|
+
label = node_model.node_id if node_model else str(nid)
|
|
137
|
+
self.log_error(f"[{label}] {msg}")
|
|
138
|
+
|
|
139
|
+
def _forward_log(nid, msg, lvl):
|
|
140
|
+
node_model = gm.nodes.get(nid)
|
|
141
|
+
label = node_model.node_id if node_model else str(nid)
|
|
142
|
+
if lvl == "error":
|
|
143
|
+
self.log_error(f"[{label}] {msg}")
|
|
144
|
+
elif lvl == "success":
|
|
145
|
+
self.log_success(f"[{label}] {msg}")
|
|
146
|
+
else:
|
|
147
|
+
self.log_info(f"[{label}] {msg}")
|
|
148
|
+
|
|
149
|
+
# Preserve outer execution memory — the sub-executor clears it on entry
|
|
150
|
+
saved_memory = dict(_BaseNode.memory)
|
|
151
|
+
sub_executor = NetworkExecutor(gm)
|
|
152
|
+
sub_executor.node_error.connect(_capture_error)
|
|
153
|
+
sub_executor.node_log.connect(_forward_log)
|
|
154
|
+
try:
|
|
155
|
+
await sub_executor.run()
|
|
156
|
+
finally:
|
|
157
|
+
_BaseNode.memory.clear()
|
|
158
|
+
_BaseNode.memory.update(saved_memory)
|
|
159
|
+
|
|
160
|
+
# exec_fail fires only when the inner graph has an unhandled exception.
|
|
161
|
+
# Semantic failures (e.g. maya_headless success=False) are the inner graph's
|
|
162
|
+
# responsibility — it routes them via its own exec pins (e.g. if_condition).
|
|
163
|
+
inner_success = len(inner_errors) == 0
|
|
164
|
+
|
|
165
|
+
# Build a map: group_out inst_id → (source_node_id, source_port)
|
|
166
|
+
# Reading directly from the source avoids timing issues where group_out
|
|
167
|
+
# (a pure data entry-node) executed before the exec chain populated its value.
|
|
168
|
+
group_out_sources = {}
|
|
169
|
+
for conn in workflow.connections:
|
|
170
|
+
if conn.is_exec:
|
|
171
|
+
continue
|
|
172
|
+
target = gm.nodes.get(conn.to_node)
|
|
173
|
+
if target and target.node_id == "group_out" and conn.to_port == "value":
|
|
174
|
+
group_out_sources[conn.to_node] = (conn.from_node, conn.from_port)
|
|
175
|
+
|
|
176
|
+
# Collect outputs from group_out nodes
|
|
177
|
+
data_results = {}
|
|
178
|
+
for inst_id, node_model in gm.nodes.items():
|
|
179
|
+
if node_model.node_id == "group_out":
|
|
180
|
+
port_name = node_model.parameters.get("port_name", "")
|
|
181
|
+
if not port_name:
|
|
182
|
+
continue
|
|
183
|
+
if inst_id in group_out_sources:
|
|
184
|
+
src_id, src_port = group_out_sources[inst_id]
|
|
185
|
+
value = sub_executor.node_results.get(src_id, {}).get(src_port)
|
|
186
|
+
else:
|
|
187
|
+
value = sub_executor.node_results.get(inst_id, {}).get("value")
|
|
188
|
+
data_results[port_name] = value
|
|
189
|
+
|
|
190
|
+
group_name = self.parameters.get("__name__", "Group")
|
|
191
|
+
self.log_info(f"Group '{group_name}' finished — success={inner_success}, outputs={len(data_results)}.")
|
|
192
|
+
|
|
193
|
+
# Push data outputs reactively before triggering exec flow so downstream
|
|
194
|
+
# nodes see correct values when the exec chain continues.
|
|
195
|
+
for port_name, value in data_results.items():
|
|
196
|
+
await self.set_output(port_name, value)
|
|
197
|
+
|
|
198
|
+
# Fire exec_out on success, exec_fail on failure so the outer graph can
|
|
199
|
+
# route the two outcomes to separate downstream paths.
|
|
200
|
+
if inner_success:
|
|
201
|
+
await self.set_output("exec_out", True)
|
|
202
|
+
data_results["exec_out"] = True
|
|
203
|
+
data_results["exec_fail"] = False
|
|
204
|
+
else:
|
|
205
|
+
self.log_error(f"Group '{group_name}' inner execution reported failure.")
|
|
206
|
+
await self.set_output("exec_fail", True)
|
|
207
|
+
data_results["exec_out"] = False
|
|
208
|
+
data_results["exec_fail"] = True
|
|
209
|
+
|
|
210
|
+
return data_results
|