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,223 @@
|
|
|
1
|
+
from src.utils.qt_compat import QtWidgets, QtCore, QtGui
|
|
2
|
+
from uuid import uuid4
|
|
3
|
+
|
|
4
|
+
QGraphicsRectItem = QtWidgets.QGraphicsRectItem
|
|
5
|
+
QGraphicsTextItem = QtWidgets.QGraphicsTextItem
|
|
6
|
+
QGraphicsItem = QtWidgets.QGraphicsItem
|
|
7
|
+
Qt = QtCore.Qt
|
|
8
|
+
QRectF = QtCore.QRectF
|
|
9
|
+
QPointF = QtCore.QPointF
|
|
10
|
+
QColor = QtGui.QColor
|
|
11
|
+
QPen = QtGui.QPen
|
|
12
|
+
QBrush = QtGui.QBrush
|
|
13
|
+
QCursor = QtGui.QCursor
|
|
14
|
+
|
|
15
|
+
class Backdrop(QGraphicsRectItem):
|
|
16
|
+
def __init__(self, title="Network Box", pos=(0, 0), size=(400, 300), color="#444444", instance_id=None):
|
|
17
|
+
super().__init__(0, 0, size[0], size[1])
|
|
18
|
+
self.instance_id = instance_id or uuid4()
|
|
19
|
+
self.setPos(pos[0], pos[1])
|
|
20
|
+
self.setZValue(-100) # Always behind nodes
|
|
21
|
+
|
|
22
|
+
self.setFlag(QGraphicsItem.ItemIsMovable)
|
|
23
|
+
self.setFlag(QGraphicsItem.ItemIsSelectable)
|
|
24
|
+
self.setFlag(QGraphicsItem.ItemSendsGeometryChanges)
|
|
25
|
+
|
|
26
|
+
self.bg_color = QColor(color)
|
|
27
|
+
self.bg_color.setAlpha(100) # Semi-transparent
|
|
28
|
+
self.setBrush(QBrush(self.bg_color))
|
|
29
|
+
self.setPen(QPen(QColor(255, 255, 255, 50), 2))
|
|
30
|
+
|
|
31
|
+
# Title Item
|
|
32
|
+
self.title_item = QGraphicsTextItem(title, self)
|
|
33
|
+
self.title_item.setPos(5, 5)
|
|
34
|
+
self.title_item.setDefaultTextColor(Qt.white)
|
|
35
|
+
font = self.title_item.font()
|
|
36
|
+
font.setBold(True)
|
|
37
|
+
font.setPointSize(12)
|
|
38
|
+
self.title_item.setFont(font)
|
|
39
|
+
self.title_item.setTextInteractionFlags(Qt.TextEditorInteraction)
|
|
40
|
+
|
|
41
|
+
# Resize State
|
|
42
|
+
self.resizing = False
|
|
43
|
+
self.resize_handle_size = 20
|
|
44
|
+
self.setAcceptHoverEvents(True)
|
|
45
|
+
|
|
46
|
+
def hoverMoveEvent(self, event):
|
|
47
|
+
if self._is_on_handle(event.pos()):
|
|
48
|
+
self.setCursor(Qt.SizeFDiagCursor)
|
|
49
|
+
else:
|
|
50
|
+
self.setCursor(Qt.ArrowCursor)
|
|
51
|
+
super().hoverMoveEvent(event)
|
|
52
|
+
|
|
53
|
+
def _is_on_handle(self, pos):
|
|
54
|
+
return pos.x() > self.rect().width() - self.resize_handle_size and \
|
|
55
|
+
pos.y() > self.rect().height() - self.resize_handle_size
|
|
56
|
+
|
|
57
|
+
def mousePressEvent(self, event):
|
|
58
|
+
# 1. Title item interaction
|
|
59
|
+
if self.title_item.boundingRect().contains(event.pos()):
|
|
60
|
+
super().mousePressEvent(event)
|
|
61
|
+
return
|
|
62
|
+
|
|
63
|
+
# 2. Resize handle interaction
|
|
64
|
+
if event.button() == Qt.LeftButton and self._is_on_handle(event.pos()):
|
|
65
|
+
self.resizing = True
|
|
66
|
+
event.accept()
|
|
67
|
+
return
|
|
68
|
+
|
|
69
|
+
# 3. Header interaction (Move & Select)
|
|
70
|
+
if event.pos().y() < 35:
|
|
71
|
+
self.setFlag(QGraphicsItem.ItemIsMovable, True)
|
|
72
|
+
super().mousePressEvent(event)
|
|
73
|
+
else:
|
|
74
|
+
# 4. Body interaction (Select, but allow RubberBand selection through to the View)
|
|
75
|
+
self.setFlag(QGraphicsItem.ItemIsMovable, False)
|
|
76
|
+
self.setSelected(True)
|
|
77
|
+
# By ignoring the event, we allow the QGraphicsView to receive it
|
|
78
|
+
# and start its RubberBandDrag logic if the user drags.
|
|
79
|
+
event.ignore()
|
|
80
|
+
|
|
81
|
+
def mouseMoveEvent(self, event):
|
|
82
|
+
if self.resizing:
|
|
83
|
+
new_width = max(100, event.pos().x())
|
|
84
|
+
new_height = max(100, event.pos().y())
|
|
85
|
+
self.setRect(0, 0, new_width, new_height)
|
|
86
|
+
event.accept()
|
|
87
|
+
else:
|
|
88
|
+
super().mouseMoveEvent(event)
|
|
89
|
+
|
|
90
|
+
def mouseReleaseEvent(self, event):
|
|
91
|
+
self.resizing = False
|
|
92
|
+
super().mouseReleaseEvent(event)
|
|
93
|
+
|
|
94
|
+
def contextMenuEvent(self, event):
|
|
95
|
+
menu = QtWidgets.QMenu()
|
|
96
|
+
|
|
97
|
+
color_act = menu.addAction("Change Color")
|
|
98
|
+
color_act.triggered.connect(self._pick_color)
|
|
99
|
+
|
|
100
|
+
menu.addSeparator()
|
|
101
|
+
|
|
102
|
+
fit_act = menu.addAction("Fit to Contained Nodes")
|
|
103
|
+
fit_act.triggered.connect(self.fit_to_nodes)
|
|
104
|
+
|
|
105
|
+
select_act = menu.addAction("Select Contained Nodes")
|
|
106
|
+
select_act.triggered.connect(self.select_contained_nodes)
|
|
107
|
+
|
|
108
|
+
menu.addSeparator()
|
|
109
|
+
|
|
110
|
+
delete_act = menu.addAction("Delete Network Box")
|
|
111
|
+
def delete_self():
|
|
112
|
+
if self.scene():
|
|
113
|
+
# NodeScene handles the actual removal from its internal lists if we use its logic,
|
|
114
|
+
# but for simple UI triggered delete, we can just send a Delete key event to the scene
|
|
115
|
+
# or call scene method.
|
|
116
|
+
self.setSelected(True)
|
|
117
|
+
from src.utils.qt_compat import QtGui
|
|
118
|
+
QKeyEvent = QtGui.QKeyEvent
|
|
119
|
+
QEvent = QtCore.QEvent
|
|
120
|
+
ev = QKeyEvent(QEvent.KeyPress, Qt.Key_Delete, Qt.NoModifier)
|
|
121
|
+
self.scene().keyPressEvent(ev)
|
|
122
|
+
delete_act.triggered.connect(delete_self)
|
|
123
|
+
|
|
124
|
+
menu.exec_(event.screenPos())
|
|
125
|
+
|
|
126
|
+
def _pick_color(self):
|
|
127
|
+
opaque = QColor(self.bg_color)
|
|
128
|
+
opaque.setAlpha(255)
|
|
129
|
+
color = QtWidgets.QColorDialog.getColor(opaque, None, "Choose Network Box Color")
|
|
130
|
+
if color.isValid():
|
|
131
|
+
self.bg_color = QColor(color)
|
|
132
|
+
self.bg_color.setAlpha(100)
|
|
133
|
+
self.setBrush(QBrush(self.bg_color))
|
|
134
|
+
self.update()
|
|
135
|
+
|
|
136
|
+
def fit_to_nodes(self):
|
|
137
|
+
"""Resizes the backdrop to fit all nodes currently inside or partially inside it."""
|
|
138
|
+
if not self.scene(): return
|
|
139
|
+
|
|
140
|
+
contained_items = []
|
|
141
|
+
from src.ui.node_widget import NodeWidget
|
|
142
|
+
from src.ui.canvas.sticky_note import StickyNote
|
|
143
|
+
|
|
144
|
+
# Find all nodes/notes in the scene that overlap with this backdrop
|
|
145
|
+
for item in self.scene().items():
|
|
146
|
+
if item == self: continue
|
|
147
|
+
if isinstance(item, (NodeWidget, StickyNote)):
|
|
148
|
+
if self.sceneBoundingRect().intersects(item.sceneBoundingRect()):
|
|
149
|
+
contained_items.append(item)
|
|
150
|
+
|
|
151
|
+
if not contained_items:
|
|
152
|
+
return
|
|
153
|
+
|
|
154
|
+
# Calculate new bounding rect
|
|
155
|
+
rect = contained_items[0].sceneBoundingRect()
|
|
156
|
+
for item in contained_items[1:]:
|
|
157
|
+
rect = rect.united(item.sceneBoundingRect())
|
|
158
|
+
|
|
159
|
+
# Add padding
|
|
160
|
+
padding = 40
|
|
161
|
+
new_pos = QtCore.QPointF(rect.x() - padding, rect.y() - padding - 20)
|
|
162
|
+
new_size = (rect.width() + padding*2, rect.height() + padding*2 + 20)
|
|
163
|
+
|
|
164
|
+
self.prepareGeometryChange()
|
|
165
|
+
self.setPos(new_pos)
|
|
166
|
+
self.setRect(0, 0, new_size[0], new_size[1])
|
|
167
|
+
|
|
168
|
+
def select_contained_nodes(self):
|
|
169
|
+
if not self.scene(): return
|
|
170
|
+
self.scene().clearSelection()
|
|
171
|
+
|
|
172
|
+
from src.ui.node_widget import NodeWidget
|
|
173
|
+
from src.ui.canvas.sticky_note import StickyNote
|
|
174
|
+
|
|
175
|
+
bounds = self.sceneBoundingRect()
|
|
176
|
+
for item in self.scene().items():
|
|
177
|
+
if isinstance(item, (NodeWidget, StickyNote)):
|
|
178
|
+
if bounds.contains(item.sceneBoundingRect().center()):
|
|
179
|
+
item.setSelected(True)
|
|
180
|
+
|
|
181
|
+
def paint(self, painter, option, widget):
|
|
182
|
+
# Draw background
|
|
183
|
+
painter.setPen(self.pen())
|
|
184
|
+
painter.setBrush(self.brush())
|
|
185
|
+
painter.drawRoundedRect(self.rect(), 10, 10)
|
|
186
|
+
|
|
187
|
+
# Draw header area
|
|
188
|
+
header_rect = QRectF(self.rect().x(), self.rect().y(), self.rect().width(), 35)
|
|
189
|
+
painter.setBrush(QBrush(QColor(255, 255, 255, 20)))
|
|
190
|
+
painter.setPen(Qt.NoPen)
|
|
191
|
+
painter.drawRoundedRect(header_rect, 10, 10)
|
|
192
|
+
|
|
193
|
+
# Resize Handle (bottom right)
|
|
194
|
+
painter.setBrush(QBrush(QColor(255, 255, 255, 100)))
|
|
195
|
+
handle_rect = QRectF(self.rect().width() - 15, self.rect().height() - 15, 10, 10)
|
|
196
|
+
painter.drawRect(handle_rect)
|
|
197
|
+
|
|
198
|
+
if self.isSelected():
|
|
199
|
+
painter.setPen(QPen(QColor(255, 165, 0), 2))
|
|
200
|
+
painter.setBrush(Qt.NoBrush)
|
|
201
|
+
painter.drawRoundedRect(self.rect().adjusted(-2, -2, 2, 2), 10, 10)
|
|
202
|
+
|
|
203
|
+
def itemChange(self, change, value):
|
|
204
|
+
if change == QGraphicsItem.ItemPositionChange and self.scene():
|
|
205
|
+
# Calculate delta based on new value (which is the proposed new position)
|
|
206
|
+
delta = value - self.pos()
|
|
207
|
+
|
|
208
|
+
# Find nodes that were INSIDE before we moved
|
|
209
|
+
# Use current pos for check
|
|
210
|
+
current_bounds = self.sceneBoundingRect()
|
|
211
|
+
|
|
212
|
+
for item in self.scene().items():
|
|
213
|
+
# Avoid circular dependencies and only move specific types
|
|
214
|
+
from src.ui.node_widget import NodeWidget
|
|
215
|
+
from src.ui.canvas.sticky_note import StickyNote
|
|
216
|
+
|
|
217
|
+
if isinstance(item, (NodeWidget, StickyNote)):
|
|
218
|
+
if current_bounds.contains(item.sceneBoundingRect()):
|
|
219
|
+
# Only move child if it's NOT also selected (prevent double move)
|
|
220
|
+
if not item.isSelected():
|
|
221
|
+
item.setPos(item.pos() + delta)
|
|
222
|
+
|
|
223
|
+
return super().itemChange(change, value)
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
from src.utils.qt_compat import QtWidgets, QtCore, QtGui
|
|
2
|
+
|
|
3
|
+
QFrame = QtWidgets.QFrame
|
|
4
|
+
QHBoxLayout = QtWidgets.QHBoxLayout
|
|
5
|
+
QLineEdit = QtWidgets.QLineEdit
|
|
6
|
+
QLabel = QtWidgets.QLabel
|
|
7
|
+
QToolButton = QtWidgets.QToolButton
|
|
8
|
+
Qt = QtCore.Qt
|
|
9
|
+
QKeyEvent = QtGui.QKeyEvent
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class CanvasSearchBar(QFrame):
|
|
13
|
+
"""Floating search bar overlaid on NodeView.
|
|
14
|
+
|
|
15
|
+
Press Ctrl+F to open. Type to filter nodes by name. Enter/▼ cycles
|
|
16
|
+
forward through matches; Shift+Enter/▲ cycles backward. Escape closes.
|
|
17
|
+
The matched node is selected and the view pans to it.
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, view):
|
|
21
|
+
super().__init__(view)
|
|
22
|
+
self._view = view
|
|
23
|
+
self._matches = []
|
|
24
|
+
self._current_idx = -1
|
|
25
|
+
|
|
26
|
+
layout = QHBoxLayout(self)
|
|
27
|
+
layout.setContentsMargins(8, 6, 8, 6)
|
|
28
|
+
layout.setSpacing(4)
|
|
29
|
+
|
|
30
|
+
self._input = QLineEdit()
|
|
31
|
+
self._input.setPlaceholderText("Search nodes…")
|
|
32
|
+
self._input.setFixedWidth(200)
|
|
33
|
+
self._input.textChanged.connect(self._on_text_changed)
|
|
34
|
+
layout.addWidget(self._input)
|
|
35
|
+
|
|
36
|
+
self._label = QLabel("0 / 0")
|
|
37
|
+
self._label.setFixedWidth(46)
|
|
38
|
+
self._label.setAlignment(Qt.AlignCenter)
|
|
39
|
+
layout.addWidget(self._label)
|
|
40
|
+
|
|
41
|
+
self._prev_btn = QToolButton()
|
|
42
|
+
self._prev_btn.setText("▲")
|
|
43
|
+
self._prev_btn.setToolTip("Previous match (Shift+Enter)")
|
|
44
|
+
self._prev_btn.clicked.connect(self._go_prev)
|
|
45
|
+
layout.addWidget(self._prev_btn)
|
|
46
|
+
|
|
47
|
+
self._next_btn = QToolButton()
|
|
48
|
+
self._next_btn.setText("▼")
|
|
49
|
+
self._next_btn.setToolTip("Next match (Enter)")
|
|
50
|
+
self._next_btn.clicked.connect(self._go_next)
|
|
51
|
+
layout.addWidget(self._next_btn)
|
|
52
|
+
|
|
53
|
+
close_btn = QToolButton()
|
|
54
|
+
close_btn.setText("✕")
|
|
55
|
+
close_btn.setToolTip("Close (Escape)")
|
|
56
|
+
close_btn.clicked.connect(self.hide_bar)
|
|
57
|
+
layout.addWidget(close_btn)
|
|
58
|
+
|
|
59
|
+
self.adjustSize()
|
|
60
|
+
self.hide()
|
|
61
|
+
self.apply_theme(True)
|
|
62
|
+
|
|
63
|
+
# ------------------------------------------------------------------
|
|
64
|
+
# Public API
|
|
65
|
+
# ------------------------------------------------------------------
|
|
66
|
+
|
|
67
|
+
def show_bar(self):
|
|
68
|
+
scene = self._view.scene()
|
|
69
|
+
if scene:
|
|
70
|
+
is_dark = scene.backgroundBrush().color().lightness() < 128
|
|
71
|
+
self.apply_theme(is_dark)
|
|
72
|
+
self._reposition()
|
|
73
|
+
self.show()
|
|
74
|
+
self.raise_()
|
|
75
|
+
self._input.setFocus()
|
|
76
|
+
self._input.selectAll()
|
|
77
|
+
self._on_text_changed(self._input.text())
|
|
78
|
+
|
|
79
|
+
def hide_bar(self):
|
|
80
|
+
self.hide()
|
|
81
|
+
self._clear_state()
|
|
82
|
+
self._view.setFocus()
|
|
83
|
+
|
|
84
|
+
# ------------------------------------------------------------------
|
|
85
|
+
# Internal helpers
|
|
86
|
+
# ------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
def _reposition(self):
|
|
89
|
+
self.adjustSize()
|
|
90
|
+
x = max(0, (self._view.width() - self.width()) // 2)
|
|
91
|
+
self.move(x, 8)
|
|
92
|
+
|
|
93
|
+
def _on_text_changed(self, text):
|
|
94
|
+
scene = self._view.scene()
|
|
95
|
+
if not scene:
|
|
96
|
+
return
|
|
97
|
+
t = text.strip().lower()
|
|
98
|
+
if t:
|
|
99
|
+
self._matches = [
|
|
100
|
+
w for w in scene.nodes
|
|
101
|
+
if t in w.node_definition.name.lower()
|
|
102
|
+
or t in getattr(w.node_definition, 'node_id', '').lower()
|
|
103
|
+
]
|
|
104
|
+
else:
|
|
105
|
+
self._matches = []
|
|
106
|
+
self._current_idx = 0 if self._matches else -1
|
|
107
|
+
self._update_label()
|
|
108
|
+
self._pan_to_current()
|
|
109
|
+
|
|
110
|
+
def _go_next(self):
|
|
111
|
+
if not self._matches:
|
|
112
|
+
return
|
|
113
|
+
self._current_idx = (self._current_idx + 1) % len(self._matches)
|
|
114
|
+
self._update_label()
|
|
115
|
+
self._pan_to_current()
|
|
116
|
+
|
|
117
|
+
def _go_prev(self):
|
|
118
|
+
if not self._matches:
|
|
119
|
+
return
|
|
120
|
+
self._current_idx = (self._current_idx - 1) % len(self._matches)
|
|
121
|
+
self._update_label()
|
|
122
|
+
self._pan_to_current()
|
|
123
|
+
|
|
124
|
+
def _update_label(self):
|
|
125
|
+
total = len(self._matches)
|
|
126
|
+
if total:
|
|
127
|
+
self._label.setText(f"{self._current_idx + 1} / {total}")
|
|
128
|
+
else:
|
|
129
|
+
self._label.setText("0 / 0")
|
|
130
|
+
|
|
131
|
+
def _pan_to_current(self):
|
|
132
|
+
scene = self._view.scene()
|
|
133
|
+
if not scene or self._current_idx < 0 or not self._matches:
|
|
134
|
+
if scene:
|
|
135
|
+
scene.clearSelection()
|
|
136
|
+
return
|
|
137
|
+
node = self._matches[self._current_idx]
|
|
138
|
+
scene.clearSelection()
|
|
139
|
+
node.setSelected(True)
|
|
140
|
+
self._view.centerOn(node)
|
|
141
|
+
|
|
142
|
+
def _clear_state(self):
|
|
143
|
+
scene = self._view.scene()
|
|
144
|
+
if scene:
|
|
145
|
+
scene.clearSelection()
|
|
146
|
+
self._matches = []
|
|
147
|
+
self._current_idx = -1
|
|
148
|
+
self._label.setText("0 / 0")
|
|
149
|
+
self._input.clear()
|
|
150
|
+
|
|
151
|
+
# ------------------------------------------------------------------
|
|
152
|
+
# Events
|
|
153
|
+
# ------------------------------------------------------------------
|
|
154
|
+
|
|
155
|
+
def keyPressEvent(self, event: QKeyEvent):
|
|
156
|
+
if event.key() == Qt.Key_Escape:
|
|
157
|
+
self.hide_bar()
|
|
158
|
+
elif event.key() in (Qt.Key_Return, Qt.Key_Enter):
|
|
159
|
+
if event.modifiers() & Qt.ShiftModifier:
|
|
160
|
+
self._go_prev()
|
|
161
|
+
else:
|
|
162
|
+
self._go_next()
|
|
163
|
+
else:
|
|
164
|
+
super().keyPressEvent(event)
|
|
165
|
+
|
|
166
|
+
# ------------------------------------------------------------------
|
|
167
|
+
# Theme
|
|
168
|
+
# ------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
def apply_theme(self, is_dark=True):
|
|
171
|
+
if is_dark:
|
|
172
|
+
self.setStyleSheet("""
|
|
173
|
+
QFrame {
|
|
174
|
+
background-color: #2b2b2b;
|
|
175
|
+
border: 1px solid #555;
|
|
176
|
+
border-radius: 6px;
|
|
177
|
+
}
|
|
178
|
+
QLineEdit {
|
|
179
|
+
background-color: #3c3f41;
|
|
180
|
+
color: #ffffff;
|
|
181
|
+
border: 1px solid #555;
|
|
182
|
+
border-radius: 4px;
|
|
183
|
+
padding: 4px 6px;
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
}
|
|
186
|
+
QLineEdit:focus { border: 1px solid #6699cc; }
|
|
187
|
+
QLabel { color: #aaaaaa; font-size: 11px; min-width: 46px; }
|
|
188
|
+
QToolButton {
|
|
189
|
+
color: #cccccc;
|
|
190
|
+
background: transparent;
|
|
191
|
+
border: none;
|
|
192
|
+
font-size: 11px;
|
|
193
|
+
padding: 2px 6px;
|
|
194
|
+
}
|
|
195
|
+
QToolButton:hover { color: #ffffff; background: #4b4d4d; border-radius: 3px; }
|
|
196
|
+
""")
|
|
197
|
+
else:
|
|
198
|
+
self.setStyleSheet("""
|
|
199
|
+
QFrame {
|
|
200
|
+
background-color: #f0f0f0;
|
|
201
|
+
border: 1px solid #ccc;
|
|
202
|
+
border-radius: 6px;
|
|
203
|
+
}
|
|
204
|
+
QLineEdit {
|
|
205
|
+
background-color: #ffffff;
|
|
206
|
+
color: #000000;
|
|
207
|
+
border: 1px solid #ccc;
|
|
208
|
+
border-radius: 4px;
|
|
209
|
+
padding: 4px 6px;
|
|
210
|
+
font-size: 12px;
|
|
211
|
+
}
|
|
212
|
+
QLineEdit:focus { border: 1px solid #4a90d9; }
|
|
213
|
+
QLabel { color: #666666; font-size: 11px; min-width: 46px; }
|
|
214
|
+
QToolButton {
|
|
215
|
+
color: #333333;
|
|
216
|
+
background: transparent;
|
|
217
|
+
border: none;
|
|
218
|
+
font-size: 11px;
|
|
219
|
+
padding: 2px 6px;
|
|
220
|
+
}
|
|
221
|
+
QToolButton:hover { color: #000000; background: #e0e0e0; border-radius: 3px; }
|
|
222
|
+
""")
|
src/ui/canvas/edge.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
from src.utils.qt_compat import QtWidgets, QtCore, QtGui
|
|
2
|
+
|
|
3
|
+
QGraphicsPathItem = QtWidgets.QGraphicsPathItem
|
|
4
|
+
QGraphicsItem = QtWidgets.QGraphicsItem
|
|
5
|
+
Qt = QtCore.Qt
|
|
6
|
+
QPointF = QtCore.QPointF
|
|
7
|
+
QPainterPath = QtGui.QPainterPath
|
|
8
|
+
QPen = QtGui.QPen
|
|
9
|
+
QColor = QtGui.QColor
|
|
10
|
+
QPainterPathStroker = QtGui.QPainterPathStroker
|
|
11
|
+
|
|
12
|
+
class Edge(QGraphicsPathItem):
|
|
13
|
+
def __init__(self, from_port, to_port=None, parent=None):
|
|
14
|
+
super().__init__(parent)
|
|
15
|
+
self.from_port = from_port
|
|
16
|
+
self.to_port = to_port
|
|
17
|
+
self.pos_end = QPointF(0, 0)
|
|
18
|
+
self.is_dark = True
|
|
19
|
+
self._live_value = None
|
|
20
|
+
|
|
21
|
+
self.setZValue(-1) # Draw edges behind nodes
|
|
22
|
+
self.setFlag(QGraphicsPathItem.ItemIsSelectable)
|
|
23
|
+
self.apply_theme(True)
|
|
24
|
+
|
|
25
|
+
self.update_path()
|
|
26
|
+
|
|
27
|
+
def apply_theme(self, is_dark=True):
|
|
28
|
+
self.is_dark = is_dark
|
|
29
|
+
self._refresh_color()
|
|
30
|
+
|
|
31
|
+
def _refresh_color(self):
|
|
32
|
+
if self.from_port is not None:
|
|
33
|
+
color = self.from_port.brush().color()
|
|
34
|
+
# White exec wires are invisible on a light background.
|
|
35
|
+
if not self.is_dark and color.lightness() > 200:
|
|
36
|
+
color = QColor(Qt.black)
|
|
37
|
+
else:
|
|
38
|
+
color = QColor(Qt.white) if self.is_dark else QColor(Qt.black)
|
|
39
|
+
self.setPen(QPen(color, 2))
|
|
40
|
+
self.update()
|
|
41
|
+
|
|
42
|
+
def update_path(self):
|
|
43
|
+
"""
|
|
44
|
+
Updates the cubic path between from_port and to_port (or pos_end).
|
|
45
|
+
"""
|
|
46
|
+
if not self.from_port: return
|
|
47
|
+
|
|
48
|
+
pos_start = self.from_port.get_scene_pos()
|
|
49
|
+
pos_end = self.to_port.get_scene_pos() if self.to_port else self.pos_end
|
|
50
|
+
|
|
51
|
+
path = QPainterPath()
|
|
52
|
+
path.moveTo(pos_start)
|
|
53
|
+
|
|
54
|
+
# Calculate control points for a smooth curve
|
|
55
|
+
dx = pos_end.x() - pos_start.x()
|
|
56
|
+
dist = max(abs(dx) * 0.5, 20) # Ensure some curvature
|
|
57
|
+
|
|
58
|
+
if self.from_port.is_input:
|
|
59
|
+
# If from_port is input, it means it's actually the 'to' side in logic
|
|
60
|
+
# but in Edge object it's the anchor.
|
|
61
|
+
# This case is handled in mouseReleaseEvent by swapping.
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
ctrl1 = QPointF(pos_start.x() + dist, pos_start.y())
|
|
65
|
+
ctrl2 = QPointF(pos_end.x() - dist, pos_end.y())
|
|
66
|
+
|
|
67
|
+
path.cubicTo(ctrl1, ctrl2, pos_end)
|
|
68
|
+
self.setPath(path)
|
|
69
|
+
self._refresh_color()
|
|
70
|
+
|
|
71
|
+
def set_end_pos(self, pos):
|
|
72
|
+
self.pos_end = pos
|
|
73
|
+
self.update_path()
|
|
74
|
+
|
|
75
|
+
def shape(self):
|
|
76
|
+
"""Widen the hit area to 12 px so hovering for tooltips is easy."""
|
|
77
|
+
stroker = QPainterPathStroker()
|
|
78
|
+
stroker.setWidth(12)
|
|
79
|
+
return stroker.createStroke(self.path())
|
|
80
|
+
|
|
81
|
+
def set_live_value(self, value):
|
|
82
|
+
"""Store a live execution value and show it as a hover tooltip."""
|
|
83
|
+
self._live_value = value
|
|
84
|
+
if value is None:
|
|
85
|
+
self.setToolTip("")
|
|
86
|
+
return
|
|
87
|
+
port_name = ""
|
|
88
|
+
if self.from_port is not None:
|
|
89
|
+
port_name = getattr(getattr(self.from_port, 'port_definition', None), 'name', '') or ''
|
|
90
|
+
s = repr(value)
|
|
91
|
+
if len(s) > 300:
|
|
92
|
+
s = s[:297] + "..."
|
|
93
|
+
self.setToolTip(f"{port_name}: {s}" if port_name else s)
|
|
94
|
+
|
|
95
|
+
def clear_live_value(self):
|
|
96
|
+
"""Remove the live value tooltip."""
|
|
97
|
+
self._live_value = None
|
|
98
|
+
self.setToolTip("")
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
from src.utils.qt_compat import QtWidgets, QtCore, QtGui
|
|
2
|
+
|
|
3
|
+
QGraphicsView = QtWidgets.QGraphicsView
|
|
4
|
+
Qt = QtCore.Qt
|
|
5
|
+
QRectF = QtCore.QRectF
|
|
6
|
+
QTimer = QtCore.QTimer
|
|
7
|
+
QPen = QtGui.QPen
|
|
8
|
+
QColor = QtGui.QColor
|
|
9
|
+
QBrush = QtGui.QBrush
|
|
10
|
+
QPainter = QtGui.QPainter
|
|
11
|
+
|
|
12
|
+
_W, _H = 200, 150 # fixed widget size in pixels
|
|
13
|
+
_PAD = 40 # extra scene-unit padding around items bounding rect
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class MiniMap(QGraphicsView):
|
|
17
|
+
"""Thumbnail of the full canvas overlaid at the bottom-right of NodeView.
|
|
18
|
+
|
|
19
|
+
Shares the same QGraphicsScene as the parent NodeView.
|
|
20
|
+
Draws a blue semi-transparent rectangle showing the current viewport.
|
|
21
|
+
Click or drag to pan the main view.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
def __init__(self, main_view):
|
|
25
|
+
super().__init__(main_view) # child widget of NodeView
|
|
26
|
+
self._main_view = main_view
|
|
27
|
+
self._dragging = False
|
|
28
|
+
|
|
29
|
+
self.setObjectName("MiniMapView")
|
|
30
|
+
self.setFixedSize(_W, _H)
|
|
31
|
+
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
32
|
+
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
33
|
+
self.setInteractive(False)
|
|
34
|
+
self.setDragMode(QGraphicsView.NoDrag)
|
|
35
|
+
self.setRenderHint(QPainter.Antialiasing)
|
|
36
|
+
self.setTransformationAnchor(QGraphicsView.NoAnchor)
|
|
37
|
+
self.setResizeAnchor(QGraphicsView.NoAnchor)
|
|
38
|
+
|
|
39
|
+
# Debounce re-fit when scene items change rapidly
|
|
40
|
+
self._fit_timer = QTimer(self)
|
|
41
|
+
self._fit_timer.setSingleShot(True)
|
|
42
|
+
self._fit_timer.setInterval(80)
|
|
43
|
+
self._fit_timer.timeout.connect(self._do_fit)
|
|
44
|
+
|
|
45
|
+
self.apply_theme(True)
|
|
46
|
+
|
|
47
|
+
# ------------------------------------------------------------------
|
|
48
|
+
# Public API
|
|
49
|
+
# ------------------------------------------------------------------
|
|
50
|
+
|
|
51
|
+
def attach_scene(self, scene):
|
|
52
|
+
"""Attach to a scene, disconnecting from any previous one."""
|
|
53
|
+
old = self.scene()
|
|
54
|
+
if old is not None:
|
|
55
|
+
try:
|
|
56
|
+
old.changed.disconnect(self._schedule_fit)
|
|
57
|
+
except RuntimeError:
|
|
58
|
+
pass
|
|
59
|
+
self.setScene(scene)
|
|
60
|
+
if scene is not None:
|
|
61
|
+
scene.changed.connect(self._schedule_fit)
|
|
62
|
+
self._do_fit()
|
|
63
|
+
|
|
64
|
+
def refresh(self):
|
|
65
|
+
"""Redraw the viewport indicator without re-fitting (cheap)."""
|
|
66
|
+
self.update()
|
|
67
|
+
|
|
68
|
+
def reposition(self):
|
|
69
|
+
"""Pin to the bottom-right corner of the parent NodeView."""
|
|
70
|
+
pv = self._main_view
|
|
71
|
+
self.move(pv.width() - self.width() - 8,
|
|
72
|
+
pv.height() - self.height() - 8)
|
|
73
|
+
|
|
74
|
+
def apply_theme(self, is_dark=True):
|
|
75
|
+
border = "#555555" if is_dark else "#aaaaaa"
|
|
76
|
+
self.setStyleSheet(
|
|
77
|
+
f"QGraphicsView#MiniMapView {{ border: 1px solid {border};"
|
|
78
|
+
f" border-radius: 4px; }}"
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# ------------------------------------------------------------------
|
|
82
|
+
# Internal — scene fit
|
|
83
|
+
# ------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
def _schedule_fit(self, _rects=None):
|
|
86
|
+
if not self._fit_timer.isActive():
|
|
87
|
+
self._fit_timer.start()
|
|
88
|
+
|
|
89
|
+
def _do_fit(self):
|
|
90
|
+
scene = self.scene()
|
|
91
|
+
if not scene:
|
|
92
|
+
return
|
|
93
|
+
r = scene.itemsBoundingRect()
|
|
94
|
+
if r.isEmpty():
|
|
95
|
+
r = QRectF(-200, -200, 400, 400)
|
|
96
|
+
else:
|
|
97
|
+
r.adjust(-_PAD, -_PAD, _PAD, _PAD)
|
|
98
|
+
self.fitInView(r, Qt.KeepAspectRatio)
|
|
99
|
+
self.update()
|
|
100
|
+
|
|
101
|
+
# ------------------------------------------------------------------
|
|
102
|
+
# Viewport indicator drawn over the scene thumbnail
|
|
103
|
+
# ------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
def drawForeground(self, painter, rect):
|
|
106
|
+
super().drawForeground(painter, rect)
|
|
107
|
+
mv = self._main_view
|
|
108
|
+
vp = mv.viewport().rect()
|
|
109
|
+
scene_rect = QRectF(mv.mapToScene(vp.topLeft()),
|
|
110
|
+
mv.mapToScene(vp.bottomRight()))
|
|
111
|
+
painter.save()
|
|
112
|
+
painter.setBrush(QBrush(QColor(100, 180, 255, 35)))
|
|
113
|
+
painter.setPen(QPen(QColor(100, 180, 255, 200), 1.5))
|
|
114
|
+
painter.drawRect(scene_rect)
|
|
115
|
+
painter.restore()
|
|
116
|
+
|
|
117
|
+
# ------------------------------------------------------------------
|
|
118
|
+
# Mouse — pan main view; do NOT propagate to scene items
|
|
119
|
+
# ------------------------------------------------------------------
|
|
120
|
+
|
|
121
|
+
def mousePressEvent(self, event):
|
|
122
|
+
if event.button() == Qt.LeftButton:
|
|
123
|
+
self._dragging = True
|
|
124
|
+
self._pan_to(event.pos())
|
|
125
|
+
|
|
126
|
+
def mouseMoveEvent(self, event):
|
|
127
|
+
if self._dragging:
|
|
128
|
+
self._pan_to(event.pos())
|
|
129
|
+
|
|
130
|
+
def mouseReleaseEvent(self, event):
|
|
131
|
+
if event.button() == Qt.LeftButton:
|
|
132
|
+
self._dragging = False
|
|
133
|
+
self._main_view.setFocus()
|
|
134
|
+
|
|
135
|
+
def _pan_to(self, mini_pos):
|
|
136
|
+
scene_pos = self.mapToScene(mini_pos)
|
|
137
|
+
self._main_view.centerOn(scene_pos)
|
|
138
|
+
self.update()
|