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,452 @@
|
|
|
1
|
+
from src.nodes.base import BaseNode
|
|
2
|
+
from typing import Dict, Any
|
|
3
|
+
import os
|
|
4
|
+
import asyncio
|
|
5
|
+
|
|
6
|
+
class FileLoaderNode(BaseNode):
|
|
7
|
+
name = "File Loader"
|
|
8
|
+
category = "IO"
|
|
9
|
+
icon_path = "icons/file-input.svg"
|
|
10
|
+
def __init__(self):
|
|
11
|
+
super().__init__()
|
|
12
|
+
self.add_input("file_path", "string", widget_type="file")
|
|
13
|
+
self.add_output("file_data", "string")
|
|
14
|
+
|
|
15
|
+
async def execute(self, inputs):
|
|
16
|
+
path = inputs.get("file_path")
|
|
17
|
+
if not path or not os.path.exists(path):
|
|
18
|
+
return {"file_data": ""}
|
|
19
|
+
try:
|
|
20
|
+
# Use utf-8 with fallback to ignore/replace to handle various file types safely
|
|
21
|
+
with open(path, "r", encoding="utf-8", errors="replace") as f:
|
|
22
|
+
data = f.read()
|
|
23
|
+
return {"file_data": data}
|
|
24
|
+
except Exception as e:
|
|
25
|
+
return {"file_data": f"Error reading file: {str(e)}"}
|
|
26
|
+
|
|
27
|
+
class DataProcessorNode(BaseNode):
|
|
28
|
+
name = "Data Processor"
|
|
29
|
+
category = "General"
|
|
30
|
+
icon_path = "icons/gear.svg"
|
|
31
|
+
def __init__(self):
|
|
32
|
+
super().__init__()
|
|
33
|
+
self.add_input("data_in")
|
|
34
|
+
self.add_output("data_out")
|
|
35
|
+
|
|
36
|
+
async def execute(self, inputs):
|
|
37
|
+
return {"data_out": f"Processed: {inputs.get('data_in')}"}
|
|
38
|
+
|
|
39
|
+
class ConsoleSinkNode(BaseNode):
|
|
40
|
+
name = "Console Sink"
|
|
41
|
+
category = "IO"
|
|
42
|
+
icon_path = "icons/terminal.svg"
|
|
43
|
+
def __init__(self):
|
|
44
|
+
super().__init__()
|
|
45
|
+
self.add_input("data")
|
|
46
|
+
|
|
47
|
+
async def execute(self, inputs):
|
|
48
|
+
print(f"SINK: {inputs.get('data')}")
|
|
49
|
+
return {}
|
|
50
|
+
|
|
51
|
+
class SequenceNode(BaseNode):
|
|
52
|
+
name = "Sequencer"
|
|
53
|
+
category = "Flow"
|
|
54
|
+
description = "Sequences data-only nodes. Triggers 'exec_step' for every item in the sequence."
|
|
55
|
+
icon_path = "icons/list.svg"
|
|
56
|
+
|
|
57
|
+
def __init__(self):
|
|
58
|
+
# use_exec=False removes both default exec_in and exec_out
|
|
59
|
+
super().__init__(use_exec=False)
|
|
60
|
+
self.add_input("step_0", "any")
|
|
61
|
+
self.add_output("result", "any")
|
|
62
|
+
self.add_exec_output("exec_step") # Trigger for EACH step
|
|
63
|
+
self.add_exec_output("exec_out") # Trigger when sequence is COMPLETE
|
|
64
|
+
self._step_count = 1
|
|
65
|
+
|
|
66
|
+
def on_plug_sync(self, port_name, is_input, other_node, other_port_name):
|
|
67
|
+
if is_input and port_name.startswith("step_"):
|
|
68
|
+
# Only increment if we actually have a node being connected (not during restoration)
|
|
69
|
+
if not other_node: return
|
|
70
|
+
|
|
71
|
+
idx = int(port_name.split("_")[1])
|
|
72
|
+
# If we plugged into the last step, add a new empty step
|
|
73
|
+
if idx == self._step_count - 1:
|
|
74
|
+
self.add_input(f"step_{self._step_count}", "any")
|
|
75
|
+
self._step_count += 1
|
|
76
|
+
self.rebuild_ports()
|
|
77
|
+
|
|
78
|
+
def on_unplug_sync(self, port_name, is_input):
|
|
79
|
+
if is_input and port_name.startswith("step_"):
|
|
80
|
+
# Shrink the list if multiple empty steps at the end
|
|
81
|
+
self._cleanup_steps()
|
|
82
|
+
|
|
83
|
+
def _cleanup_steps(self):
|
|
84
|
+
"""Removes trailing empty ports, ensuring exactly one empty port remains at the end."""
|
|
85
|
+
changed = False
|
|
86
|
+
# Ensure we always keep at least step_0
|
|
87
|
+
while self._step_count > 1:
|
|
88
|
+
last_port = f"step_{self._step_count - 1}"
|
|
89
|
+
prev_port = f"step_{self._step_count - 2}"
|
|
90
|
+
|
|
91
|
+
# If the last port is disconnected AND the one before it is ALSO disconnected,
|
|
92
|
+
# we can safely remove the last one.
|
|
93
|
+
# This ensures we always have exactly ONE empty slot at the end.
|
|
94
|
+
if not self.is_port_connected(last_port, is_input=True) and \
|
|
95
|
+
not self.is_port_connected(prev_port, is_input=True):
|
|
96
|
+
if last_port in self.inputs:
|
|
97
|
+
del self.inputs[last_port]
|
|
98
|
+
if last_port in self.parameters:
|
|
99
|
+
del self.parameters[last_port]
|
|
100
|
+
self._step_count -= 1
|
|
101
|
+
changed = True
|
|
102
|
+
else: break
|
|
103
|
+
else:
|
|
104
|
+
break
|
|
105
|
+
|
|
106
|
+
if changed:
|
|
107
|
+
self.rebuild_ports()
|
|
108
|
+
|
|
109
|
+
def restore_from_parameters(self, parameters: Dict[str, Any]):
|
|
110
|
+
"""Restores step_X ports from saved parameters."""
|
|
111
|
+
for key in parameters:
|
|
112
|
+
if key.startswith("step_"):
|
|
113
|
+
try:
|
|
114
|
+
idx = int(key.split("_")[1])
|
|
115
|
+
if idx >= self._step_count:
|
|
116
|
+
for i in range(self._step_count, idx + 1):
|
|
117
|
+
port_name = f"step_{i}"
|
|
118
|
+
if port_name not in self.inputs:
|
|
119
|
+
self.add_input(port_name, "any")
|
|
120
|
+
self._step_count = idx + 1
|
|
121
|
+
except (ValueError, IndexError):
|
|
122
|
+
continue
|
|
123
|
+
|
|
124
|
+
async def execute(self, inputs):
|
|
125
|
+
"""
|
|
126
|
+
The engine pulls upstream data nodes in the order of self.inputs keys.
|
|
127
|
+
Since step_0 was added first, it will be executed first.
|
|
128
|
+
We stream the results out one by one.
|
|
129
|
+
"""
|
|
130
|
+
last_val = None
|
|
131
|
+
# Get all step names sorted numerically just to be absolutely safe
|
|
132
|
+
steps = sorted([k for k in self.inputs.keys() if k.startswith("step_")],
|
|
133
|
+
key=lambda x: int(x.split("_")[1]))
|
|
134
|
+
|
|
135
|
+
self.log_info(f"Starting sequence of {len(steps)} steps...")
|
|
136
|
+
|
|
137
|
+
for step_name in steps:
|
|
138
|
+
if self.is_stopped(): break
|
|
139
|
+
|
|
140
|
+
val = inputs.get(step_name)
|
|
141
|
+
if val is not None:
|
|
142
|
+
last_val = val
|
|
143
|
+
# STREAM: Update the output result port for EACH step
|
|
144
|
+
self.log_info(f"Triggering result for {step_name}: {val}")
|
|
145
|
+
await self.set_output("result", val)
|
|
146
|
+
|
|
147
|
+
# TRIGGER: Force downstream full execution for this step
|
|
148
|
+
await self.set_output("exec_step", True)
|
|
149
|
+
|
|
150
|
+
# Minimal yield to allow downstream reactive updates to process
|
|
151
|
+
await asyncio.sleep(0)
|
|
152
|
+
|
|
153
|
+
self.log_success("Sequence complete.")
|
|
154
|
+
return {"result": last_val}
|
|
155
|
+
|
|
156
|
+
class SetVariableNode(BaseNode):
|
|
157
|
+
name = "Set Variable"
|
|
158
|
+
category = "Memory"
|
|
159
|
+
icon_path = "icons/variable-set.svg"
|
|
160
|
+
def __init__(self):
|
|
161
|
+
super().__init__(use_exec=True)
|
|
162
|
+
self.add_input("name", "string", widget_type="text", default="")
|
|
163
|
+
self.add_input("value", "any")
|
|
164
|
+
self.add_output("value_out", "any", default="")
|
|
165
|
+
|
|
166
|
+
async def execute(self, inputs):
|
|
167
|
+
var_name = inputs.get("name")
|
|
168
|
+
var_val = inputs.get("value")
|
|
169
|
+
if var_name:
|
|
170
|
+
BaseNode.memory[var_name] = var_val
|
|
171
|
+
self.log_success(f"Stored: {var_name} = {var_val}")
|
|
172
|
+
|
|
173
|
+
await self.set_output("value_out", var_val)
|
|
174
|
+
await self.set_output("exec_out", True)
|
|
175
|
+
return {"value_out": var_val}
|
|
176
|
+
|
|
177
|
+
class GetVariableNode(BaseNode):
|
|
178
|
+
name = "Get Variable"
|
|
179
|
+
category = "Memory"
|
|
180
|
+
icon_path = "icons/variable-get.svg"
|
|
181
|
+
def __init__(self):
|
|
182
|
+
super().__init__(use_exec=False)
|
|
183
|
+
self.add_input("name", "string", widget_type="text", default="")
|
|
184
|
+
self.add_output("value", "any")
|
|
185
|
+
|
|
186
|
+
async def execute(self, inputs):
|
|
187
|
+
var_name = inputs.get("name")
|
|
188
|
+
var_val = BaseNode.memory.get(var_name)
|
|
189
|
+
self.log_info(f"Retrieved: {var_name} = {var_val}")
|
|
190
|
+
|
|
191
|
+
await self.set_output("value", var_val)
|
|
192
|
+
return {"value": var_val}
|
|
193
|
+
|
|
194
|
+
async def on_parameter_changed(self, name, value):
|
|
195
|
+
if name == "name":
|
|
196
|
+
var_val = BaseNode.memory.get(value)
|
|
197
|
+
await self.set_output("value", var_val)
|
|
198
|
+
|
|
199
|
+
class ListAppendNode(BaseNode):
|
|
200
|
+
name = "List Append"
|
|
201
|
+
category = "Memory"
|
|
202
|
+
description = "Manages a list in shared memory. Appends items and outputs the full list."
|
|
203
|
+
icon_path = "icons/list-plus.svg"
|
|
204
|
+
|
|
205
|
+
def __init__(self):
|
|
206
|
+
super().__init__(use_exec=True)
|
|
207
|
+
self.add_input("list_name", "string", widget_type="text")
|
|
208
|
+
self.add_input("item", "any")
|
|
209
|
+
self.add_output("current_list", "list")
|
|
210
|
+
|
|
211
|
+
async def execute(self, inputs):
|
|
212
|
+
name = inputs.get("list_name")
|
|
213
|
+
item = inputs.get("item")
|
|
214
|
+
|
|
215
|
+
if not name:
|
|
216
|
+
return {"current_list": []}
|
|
217
|
+
|
|
218
|
+
# Initialize list if doesn't exist
|
|
219
|
+
if name not in BaseNode.memory or not isinstance(BaseNode.memory[name], list):
|
|
220
|
+
BaseNode.memory[name] = []
|
|
221
|
+
|
|
222
|
+
if item is not None:
|
|
223
|
+
BaseNode.memory[name].append(item)
|
|
224
|
+
self.log_info(f"Appended to '{name}': {item}")
|
|
225
|
+
|
|
226
|
+
full_list = BaseNode.memory[name]
|
|
227
|
+
await self.set_output("current_list", full_list)
|
|
228
|
+
await self.set_output("exec_out", True)
|
|
229
|
+
|
|
230
|
+
return {"current_list": full_list}
|
|
231
|
+
|
|
232
|
+
class TwoWaySwitchNode(BaseNode):
|
|
233
|
+
name = "Two Way Switch"
|
|
234
|
+
category = "Logic"
|
|
235
|
+
description = "Switches between input_1 and input_2 based on a condition."
|
|
236
|
+
icon_path = "icons/shuffle.svg"
|
|
237
|
+
|
|
238
|
+
def __init__(self):
|
|
239
|
+
super().__init__(use_exec=True)
|
|
240
|
+
self.add_input("condition", "bool", widget_type="bool")
|
|
241
|
+
self.add_input("input_1", "any")
|
|
242
|
+
self.add_input("input_2", "any")
|
|
243
|
+
self.add_output("output", "any")
|
|
244
|
+
|
|
245
|
+
async def execute(self, inputs):
|
|
246
|
+
cond = bool(inputs.get("condition", False))
|
|
247
|
+
val1 = inputs.get("input_1")
|
|
248
|
+
val2 = inputs.get("input_2")
|
|
249
|
+
|
|
250
|
+
result = val1 if cond else val2
|
|
251
|
+
|
|
252
|
+
self.log_info(f"Switch: condition={cond}, result={result}")
|
|
253
|
+
await self.set_output("output", result)
|
|
254
|
+
await self.set_output("exec_out", True)
|
|
255
|
+
|
|
256
|
+
return {"output": result}
|
|
257
|
+
|
|
258
|
+
async def on_parameter_changed(self, name, value):
|
|
259
|
+
if name in ["condition", "input_1", "input_2"]:
|
|
260
|
+
cond = bool(self.get_parameter("condition", False))
|
|
261
|
+
val1 = self.get_parameter("input_1")
|
|
262
|
+
val2 = self.get_parameter("input_2")
|
|
263
|
+
result = val1 if cond else val2
|
|
264
|
+
await self.set_output("output", result)
|
|
265
|
+
|
|
266
|
+
class ForEachNode(BaseNode):
|
|
267
|
+
name = "For Each"
|
|
268
|
+
category = "Flow"
|
|
269
|
+
description = "Iterates over a collection. Triggers 'each_item' for every item. Can be stopped via 'break_condition' or skipped via 'continue_condition'."
|
|
270
|
+
icon_path = "icons/repeat.svg"
|
|
271
|
+
|
|
272
|
+
def __init__(self):
|
|
273
|
+
super().__init__(use_exec=True)
|
|
274
|
+
# Rename default exec_out to finished for clarity
|
|
275
|
+
if "exec_out" in self.outputs:
|
|
276
|
+
del self.outputs["exec_out"]
|
|
277
|
+
|
|
278
|
+
self.add_input("collection", "any")
|
|
279
|
+
self.add_input("break_condition", "bool", widget_type="bool")
|
|
280
|
+
self.add_input("continue_condition", "bool", widget_type="bool")
|
|
281
|
+
|
|
282
|
+
self.add_exec_output("each_item") # Trigger for EACH item
|
|
283
|
+
self.add_exec_output("exec_skip") # Trigger if item is skipped
|
|
284
|
+
self.add_exec_output("exec_on_finished") # FINAL trigger when loop is over
|
|
285
|
+
|
|
286
|
+
self.add_output("completed", "bool") # True if finished normally
|
|
287
|
+
self.add_output("broken", "bool") # True if broken early
|
|
288
|
+
|
|
289
|
+
self.add_output("current_item", "any")
|
|
290
|
+
self.add_output("current_index", "int")
|
|
291
|
+
self.add_output("indices", "list")
|
|
292
|
+
|
|
293
|
+
async def execute(self, inputs):
|
|
294
|
+
# RESET conditions at start
|
|
295
|
+
self.parameters['break_condition'] = False
|
|
296
|
+
self.parameters['continue_condition'] = False
|
|
297
|
+
await self.set_output("completed", False)
|
|
298
|
+
await self.set_output("broken", False)
|
|
299
|
+
|
|
300
|
+
collection = inputs.get("collection")
|
|
301
|
+
if not collection:
|
|
302
|
+
self.log_info("Empty collection, skipping loop.")
|
|
303
|
+
await self.set_output("completed", True)
|
|
304
|
+
await self.set_output("exec_on_finished", True)
|
|
305
|
+
return {"indices": [], "completed": True, "broken": False}
|
|
306
|
+
|
|
307
|
+
try:
|
|
308
|
+
items = list(collection)
|
|
309
|
+
except TypeError:
|
|
310
|
+
self.log_error(f"Input is not iterable: {type(collection)}")
|
|
311
|
+
await self.set_output("completed", True)
|
|
312
|
+
await self.set_output("exec_on_finished", True)
|
|
313
|
+
return {"indices": [], "completed": True, "broken": False}
|
|
314
|
+
|
|
315
|
+
indices = list(range(len(items)))
|
|
316
|
+
await self.set_output("indices", indices)
|
|
317
|
+
|
|
318
|
+
self.log_info(f"Starting loop over {len(items)} items...")
|
|
319
|
+
|
|
320
|
+
is_broken = False
|
|
321
|
+
for i, item in enumerate(items):
|
|
322
|
+
if self.is_stopped(): break
|
|
323
|
+
|
|
324
|
+
# Reset conditions for this specific iteration BEFORE updating data
|
|
325
|
+
self.parameters['continue_condition'] = False
|
|
326
|
+
self.parameters['break_condition'] = False
|
|
327
|
+
|
|
328
|
+
# 1. Update data outputs FIRST
|
|
329
|
+
# This allows reactive nodes to evaluate the NEW item before we trigger execution
|
|
330
|
+
await self.set_output("current_item", item)
|
|
331
|
+
await self.set_output("current_index", i)
|
|
332
|
+
|
|
333
|
+
# 2. Yield to allow reactive updates from downstream to propagate back to our parameters
|
|
334
|
+
await asyncio.sleep(0)
|
|
335
|
+
|
|
336
|
+
# 3. Check for PRE-EXECUTION continue (skip)
|
|
337
|
+
cont_cond = bool(self.get_parameter("continue_condition", False))
|
|
338
|
+
if cont_cond:
|
|
339
|
+
self.log_info(f"Skipping index {i} ({item}) - Pre-trigger")
|
|
340
|
+
await self.set_output("exec_skip", True)
|
|
341
|
+
continue
|
|
342
|
+
|
|
343
|
+
# 4. Trigger iteration pin (Flow execution)
|
|
344
|
+
await self.set_output("each_item", True)
|
|
345
|
+
|
|
346
|
+
# 5. Yield again to allow flow-based logic to potentially set conditions for the NEXT item
|
|
347
|
+
# or to check break_condition after this item's execution.
|
|
348
|
+
await asyncio.sleep(0)
|
|
349
|
+
|
|
350
|
+
# 6. Check for break
|
|
351
|
+
if bool(self.get_parameter("break_condition", False)):
|
|
352
|
+
self.log_info(f"Loop broken at index {i}")
|
|
353
|
+
is_broken = True
|
|
354
|
+
break
|
|
355
|
+
|
|
356
|
+
if is_broken:
|
|
357
|
+
await self.set_output("broken", True)
|
|
358
|
+
else:
|
|
359
|
+
self.log_success("Loop complete.")
|
|
360
|
+
await self.set_output("completed", True)
|
|
361
|
+
|
|
362
|
+
await self.set_output("exec_on_finished", True)
|
|
363
|
+
return {"indices": indices, "completed": not is_broken, "broken": is_broken}
|
|
364
|
+
|
|
365
|
+
class WhileLoopNode(BaseNode):
|
|
366
|
+
name = "While Loop"
|
|
367
|
+
category = "Flow"
|
|
368
|
+
description = "Executes while `condition` is true. Triggers 'each_iteration' for every iteration. Can be stopped via 'break_condition' or skipped via 'continue_condition'."
|
|
369
|
+
icon_path = "icons/repeat.svg"
|
|
370
|
+
|
|
371
|
+
def __init__(self):
|
|
372
|
+
super().__init__(use_exec=True)
|
|
373
|
+
# Remove default exec_out for clearer pins
|
|
374
|
+
if "exec_out" in self.outputs:
|
|
375
|
+
del self.outputs["exec_out"]
|
|
376
|
+
|
|
377
|
+
self.add_input("condition", "bool", widget_type="bool")
|
|
378
|
+
self.add_input("break_condition", "bool", widget_type="bool")
|
|
379
|
+
self.add_input("continue_condition", "bool", widget_type="bool")
|
|
380
|
+
self.add_input("max_iterations", "int", widget_type="int", default=1000)
|
|
381
|
+
|
|
382
|
+
self.add_exec_output("each_iteration")
|
|
383
|
+
self.add_exec_output("exec_skip")
|
|
384
|
+
self.add_exec_output("exec_on_finished")
|
|
385
|
+
|
|
386
|
+
self.add_output("completed", "bool")
|
|
387
|
+
self.add_output("broken", "bool")
|
|
388
|
+
self.add_output("current_index", "int")
|
|
389
|
+
|
|
390
|
+
async def execute(self, inputs):
|
|
391
|
+
# Reset control flags
|
|
392
|
+
self.parameters['break_condition'] = False
|
|
393
|
+
self.parameters['continue_condition'] = False
|
|
394
|
+
await self.set_output("completed", False)
|
|
395
|
+
await self.set_output("broken", False)
|
|
396
|
+
|
|
397
|
+
try:
|
|
398
|
+
max_it = int(inputs.get("max_iterations", 1000))
|
|
399
|
+
except Exception:
|
|
400
|
+
max_it = 1000
|
|
401
|
+
|
|
402
|
+
# Initial condition: prefer parameter if present, else input
|
|
403
|
+
cond = bool(self.get_parameter("condition", inputs.get("condition", False)))
|
|
404
|
+
|
|
405
|
+
i = 0
|
|
406
|
+
is_broken = False
|
|
407
|
+
|
|
408
|
+
self.log_info(f"Starting while-loop with max_iterations={max_it}")
|
|
409
|
+
|
|
410
|
+
while cond and not self.is_stopped() and i < max_it:
|
|
411
|
+
# Reset iteration-level control flags
|
|
412
|
+
self.parameters['continue_condition'] = False
|
|
413
|
+
self.parameters['break_condition'] = False
|
|
414
|
+
|
|
415
|
+
# Publish current index first so downstream nodes can react
|
|
416
|
+
await self.set_output("current_index", i)
|
|
417
|
+
|
|
418
|
+
# Yield for reactive updates
|
|
419
|
+
await asyncio.sleep(0)
|
|
420
|
+
|
|
421
|
+
# Check for continue (skip this iteration)
|
|
422
|
+
if bool(self.get_parameter("continue_condition", False)):
|
|
423
|
+
self.log_info(f"Skipping iteration {i} - Pre-trigger")
|
|
424
|
+
await self.set_output("exec_skip", True)
|
|
425
|
+
i += 1
|
|
426
|
+
# Re-evaluate condition (allow downstream to change it via parameters)
|
|
427
|
+
cond = bool(self.get_parameter("condition", inputs.get("condition", False)))
|
|
428
|
+
continue
|
|
429
|
+
|
|
430
|
+
# Trigger iteration flow
|
|
431
|
+
await self.set_output("each_iteration", True)
|
|
432
|
+
|
|
433
|
+
# Small yield to allow flow-triggered nodes to run and potentially set break
|
|
434
|
+
await asyncio.sleep(0)
|
|
435
|
+
|
|
436
|
+
# Check for break
|
|
437
|
+
if bool(self.get_parameter("break_condition", False)):
|
|
438
|
+
self.log_info(f"Loop broken at iteration {i}")
|
|
439
|
+
is_broken = True
|
|
440
|
+
break
|
|
441
|
+
|
|
442
|
+
i += 1
|
|
443
|
+
# Re-evaluate condition for next loop
|
|
444
|
+
cond = bool(self.get_parameter("condition", inputs.get("condition", False)))
|
|
445
|
+
|
|
446
|
+
if is_broken:
|
|
447
|
+
await self.set_output("broken", True)
|
|
448
|
+
else:
|
|
449
|
+
await self.set_output("completed", True)
|
|
450
|
+
|
|
451
|
+
await self.set_output("exec_on_finished", True)
|
|
452
|
+
return {"completed": not is_broken, "broken": is_broken, "current_index": i}
|
src/nodes/print.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from src.nodes.base import BaseNode
|
|
2
|
+
|
|
3
|
+
class print(BaseNode):
|
|
4
|
+
name = "print"
|
|
5
|
+
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__()
|
|
8
|
+
self.add_input("in", "any")
|
|
9
|
+
self.add_output("string", "any")
|
|
10
|
+
|
|
11
|
+
# Ports will be auto-injected during save
|
|
12
|
+
|
|
13
|
+
async def execute(self, inputs):
|
|
14
|
+
# inputs is a dict: {port_name: value}
|
|
15
|
+
# return a dict: {port_name: value}
|
|
16
|
+
return {}
|
|
17
|
+
|
|
18
|
+
def register_node():
|
|
19
|
+
return print
|
src/nodes/test.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from src.nodes.base import BaseNode
|
|
2
|
+
|
|
3
|
+
class test(BaseNode):
|
|
4
|
+
name = "test"
|
|
5
|
+
|
|
6
|
+
def __init__(self):
|
|
7
|
+
super().__init__()
|
|
8
|
+
self.add_input("port_0", "any")
|
|
9
|
+
self.add_output("port_0", "any")
|
|
10
|
+
|
|
11
|
+
# Ports will be auto-injected during save
|
|
12
|
+
|
|
13
|
+
async def execute(self, inputs):
|
|
14
|
+
# inputs is a dict: {port_name: value}
|
|
15
|
+
# return a dict: {port_name: value}
|
|
16
|
+
return {}
|
|
17
|
+
|
|
18
|
+
def register_node():
|
|
19
|
+
return test
|
src/ui/__init__.py
ADDED
|
File without changes
|
|
File without changes
|