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,123 @@
|
|
|
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
|
+
QColor = QtGui.QColor
|
|
10
|
+
QPen = QtGui.QPen
|
|
11
|
+
QBrush = QtGui.QBrush
|
|
12
|
+
QFont = QtGui.QFont
|
|
13
|
+
|
|
14
|
+
class StickyNote(QGraphicsRectItem):
|
|
15
|
+
def __init__(self, text="New Note", pos=(0, 0), size=(200, 150), color="#ffffcc", instance_id=None):
|
|
16
|
+
super().__init__(0, 0, size[0], size[1])
|
|
17
|
+
self.instance_id = instance_id or uuid4()
|
|
18
|
+
self.setPos(pos[0], pos[1])
|
|
19
|
+
|
|
20
|
+
self.setFlag(QGraphicsItem.ItemIsMovable)
|
|
21
|
+
self.setFlag(QGraphicsItem.ItemIsSelectable)
|
|
22
|
+
self.setFlag(QGraphicsItem.ItemSendsGeometryChanges)
|
|
23
|
+
|
|
24
|
+
self.bg_color = QColor(color)
|
|
25
|
+
self.setBrush(QBrush(self.bg_color))
|
|
26
|
+
self.setPen(QPen(Qt.black, 1))
|
|
27
|
+
|
|
28
|
+
# Text Item
|
|
29
|
+
self.text_item = QGraphicsTextItem(text, self)
|
|
30
|
+
self.text_item.setPos(5, 5)
|
|
31
|
+
self.text_item.setTextWidth(size[0] - 10)
|
|
32
|
+
self.text_item.setDefaultTextColor(Qt.black)
|
|
33
|
+
# Enable text editing
|
|
34
|
+
self.text_item.setTextInteractionFlags(Qt.TextEditorInteraction)
|
|
35
|
+
|
|
36
|
+
# Resize State
|
|
37
|
+
self.resizing = False
|
|
38
|
+
self.resize_handle_size = 15
|
|
39
|
+
self.setAcceptHoverEvents(True)
|
|
40
|
+
|
|
41
|
+
def hoverMoveEvent(self, event):
|
|
42
|
+
if self._is_on_handle(event.pos()):
|
|
43
|
+
self.setCursor(Qt.SizeFDiagCursor)
|
|
44
|
+
else:
|
|
45
|
+
self.setCursor(Qt.ArrowCursor)
|
|
46
|
+
super().hoverMoveEvent(event)
|
|
47
|
+
|
|
48
|
+
def _is_on_handle(self, pos):
|
|
49
|
+
return pos.x() > self.rect().width() - self.resize_handle_size and \
|
|
50
|
+
pos.y() > self.rect().height() - self.resize_handle_size
|
|
51
|
+
|
|
52
|
+
def mousePressEvent(self, event):
|
|
53
|
+
if self.text_item.boundingRect().contains(event.pos()):
|
|
54
|
+
pass # Let text item handle it
|
|
55
|
+
|
|
56
|
+
if event.button() == Qt.LeftButton and self._is_on_handle(event.pos()):
|
|
57
|
+
self.resizing = True
|
|
58
|
+
event.accept()
|
|
59
|
+
else:
|
|
60
|
+
super().mousePressEvent(event)
|
|
61
|
+
|
|
62
|
+
def mouseMoveEvent(self, event):
|
|
63
|
+
if self.resizing:
|
|
64
|
+
new_width = max(50, event.pos().x())
|
|
65
|
+
new_height = max(50, event.pos().y())
|
|
66
|
+
self.setRect(0, 0, new_width, new_height)
|
|
67
|
+
self.text_item.setTextWidth(new_width - 10)
|
|
68
|
+
event.accept()
|
|
69
|
+
else:
|
|
70
|
+
super().mouseMoveEvent(event)
|
|
71
|
+
|
|
72
|
+
def mouseReleaseEvent(self, event):
|
|
73
|
+
self.resizing = False
|
|
74
|
+
super().mouseReleaseEvent(event)
|
|
75
|
+
|
|
76
|
+
def paint(self, painter, option, widget):
|
|
77
|
+
painter.setPen(self.pen())
|
|
78
|
+
painter.setBrush(self.brush())
|
|
79
|
+
painter.drawRect(self.rect())
|
|
80
|
+
|
|
81
|
+
# Resize Handle
|
|
82
|
+
painter.setBrush(QBrush(QColor(0, 0, 0, 50)))
|
|
83
|
+
handle_rect = QRectF(self.rect().width() - 10, self.rect().height() - 10, 10, 10)
|
|
84
|
+
painter.drawRect(handle_rect)
|
|
85
|
+
|
|
86
|
+
if self.isSelected():
|
|
87
|
+
painter.setPen(QPen(QColor(255, 165, 0), 2, Qt.DashLine))
|
|
88
|
+
painter.setBrush(Qt.NoBrush)
|
|
89
|
+
painter.drawRect(self.rect().adjusted(-2, -2, 2, 2))
|
|
90
|
+
|
|
91
|
+
def contextMenuEvent(self, event):
|
|
92
|
+
menu = QtWidgets.QMenu()
|
|
93
|
+
|
|
94
|
+
color_act = menu.addAction("Change Color")
|
|
95
|
+
color_act.triggered.connect(self._pick_color)
|
|
96
|
+
|
|
97
|
+
menu.addSeparator()
|
|
98
|
+
|
|
99
|
+
delete_act = menu.addAction("Delete Sticky Note")
|
|
100
|
+
def delete_self():
|
|
101
|
+
if self.scene():
|
|
102
|
+
self.setSelected(True)
|
|
103
|
+
from src.utils.qt_compat import QtGui
|
|
104
|
+
QKeyEvent = QtGui.QKeyEvent
|
|
105
|
+
QEvent = QtCore.QEvent
|
|
106
|
+
ev = QKeyEvent(QEvent.KeyPress, Qt.Key_Delete, Qt.NoModifier)
|
|
107
|
+
self.scene().keyPressEvent(ev)
|
|
108
|
+
delete_act.triggered.connect(delete_self)
|
|
109
|
+
|
|
110
|
+
menu.exec_(event.screenPos())
|
|
111
|
+
|
|
112
|
+
def _pick_color(self):
|
|
113
|
+
color = QtWidgets.QColorDialog.getColor(self.bg_color, None, "Choose Sticky Note Color")
|
|
114
|
+
if color.isValid():
|
|
115
|
+
self.bg_color = color
|
|
116
|
+
self.setBrush(QBrush(self.bg_color))
|
|
117
|
+
self.update()
|
|
118
|
+
|
|
119
|
+
def get_text(self):
|
|
120
|
+
return self.text_item.toPlainText()
|
|
121
|
+
|
|
122
|
+
def set_text(self, text):
|
|
123
|
+
self.text_item.setPlainText(text)
|
src/ui/canvas/view.py
ADDED
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
from src.utils.qt_compat import QtWidgets, QtCore, QtGui, exec_dialog
|
|
2
|
+
from src.ui.canvas.node_search_popup import NodeSearchPopup
|
|
3
|
+
from src.ui.canvas.canvas_search_bar import CanvasSearchBar
|
|
4
|
+
from src.ui.canvas.mini_map import MiniMap
|
|
5
|
+
|
|
6
|
+
QGraphicsView = QtWidgets.QGraphicsView
|
|
7
|
+
QGraphicsScene = QtWidgets.QGraphicsScene
|
|
8
|
+
Qt = QtCore.Qt
|
|
9
|
+
QPoint = QtCore.QPoint
|
|
10
|
+
QPointF = QtCore.QPointF
|
|
11
|
+
QEvent = QtCore.QEvent
|
|
12
|
+
QPainter = QtGui.QPainter
|
|
13
|
+
QWheelEvent = QtGui.QWheelEvent
|
|
14
|
+
QMouseEvent = QtGui.QMouseEvent
|
|
15
|
+
QKeyEvent = QtGui.QKeyEvent
|
|
16
|
+
|
|
17
|
+
class NodeView(QGraphicsView):
|
|
18
|
+
def __init__(self, scene: QGraphicsScene, parent=None):
|
|
19
|
+
super().__init__(scene, parent)
|
|
20
|
+
self.setRenderHint(QPainter.Antialiasing)
|
|
21
|
+
self.setRenderHint(QPainter.SmoothPixmapTransform)
|
|
22
|
+
self.setViewportUpdateMode(QGraphicsView.BoundingRectViewportUpdate)
|
|
23
|
+
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
|
|
24
|
+
self.setResizeAnchor(QGraphicsView.AnchorUnderMouse)
|
|
25
|
+
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
26
|
+
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
|
27
|
+
self.setDragMode(QGraphicsView.RubberBandDrag)
|
|
28
|
+
|
|
29
|
+
# Enable Drops
|
|
30
|
+
self.setAcceptDrops(True)
|
|
31
|
+
|
|
32
|
+
# Enable focus and prevent Tab from being used for navigation
|
|
33
|
+
self.setFocusPolicy(Qt.StrongFocus)
|
|
34
|
+
|
|
35
|
+
self._is_panning = False
|
|
36
|
+
self._last_pan_pos = QPoint()
|
|
37
|
+
self._search_popup = None
|
|
38
|
+
self._last_mouse_scene_pos = QPointF(0, 0)
|
|
39
|
+
self._canvas_search_bar = CanvasSearchBar(self)
|
|
40
|
+
|
|
41
|
+
self._mini_map = MiniMap(self)
|
|
42
|
+
self._mini_map.attach_scene(scene)
|
|
43
|
+
self._mini_map.reposition()
|
|
44
|
+
self.horizontalScrollBar().valueChanged.connect(self._mini_map.refresh)
|
|
45
|
+
self.verticalScrollBar().valueChanged.connect(self._mini_map.refresh)
|
|
46
|
+
|
|
47
|
+
def dragEnterEvent(self, event):
|
|
48
|
+
if event.mimeData().hasFormat("application/x-node-id") or event.mimeData().hasText():
|
|
49
|
+
event.acceptProposedAction()
|
|
50
|
+
else:
|
|
51
|
+
super().dragEnterEvent(event)
|
|
52
|
+
|
|
53
|
+
def dragMoveEvent(self, event):
|
|
54
|
+
if event.mimeData().hasFormat("application/x-node-id") or event.mimeData().hasText():
|
|
55
|
+
event.acceptProposedAction()
|
|
56
|
+
else:
|
|
57
|
+
super().dragMoveEvent(event)
|
|
58
|
+
|
|
59
|
+
def dropEvent(self, event):
|
|
60
|
+
mime = event.mimeData()
|
|
61
|
+
node_id = None
|
|
62
|
+
|
|
63
|
+
if mime.hasFormat("application/x-node-id"):
|
|
64
|
+
node_id = bytes(mime.data("application/x-node-id")).decode("utf-8")
|
|
65
|
+
elif mime.hasText():
|
|
66
|
+
node_id = mime.text()
|
|
67
|
+
|
|
68
|
+
if node_id:
|
|
69
|
+
scene = self.scene()
|
|
70
|
+
if scene:
|
|
71
|
+
# Map drop position to scene coordinates
|
|
72
|
+
pos = self.mapToScene(event.pos())
|
|
73
|
+
result = scene.add_node_by_name(node_id, pos)
|
|
74
|
+
if result:
|
|
75
|
+
scene.push_history()
|
|
76
|
+
event.acceptProposedAction()
|
|
77
|
+
return
|
|
78
|
+
|
|
79
|
+
super().dropEvent(event)
|
|
80
|
+
|
|
81
|
+
def event(self, event):
|
|
82
|
+
"""Override to catch Tab key before it's used for focus navigation."""
|
|
83
|
+
if event.type() == QEvent.KeyPress:
|
|
84
|
+
key_event = event
|
|
85
|
+
if key_event.key() == Qt.Key_Tab:
|
|
86
|
+
self.show_node_search_popup()
|
|
87
|
+
return True
|
|
88
|
+
try:
|
|
89
|
+
return super().event(event)
|
|
90
|
+
except KeyboardInterrupt:
|
|
91
|
+
from src.utils.qt_compat import QtWidgets
|
|
92
|
+
QtWidgets.QApplication.instance().quit()
|
|
93
|
+
return False
|
|
94
|
+
|
|
95
|
+
def mousePressEvent(self, event: QMouseEvent):
|
|
96
|
+
# Ensure view has focus for keyboard shortcuts
|
|
97
|
+
self.setFocus()
|
|
98
|
+
|
|
99
|
+
if event.button() == Qt.MiddleButton or (event.button() == Qt.LeftButton and event.modifiers() == Qt.AltModifier):
|
|
100
|
+
self._start_pan(event.pos())
|
|
101
|
+
event.accept()
|
|
102
|
+
else:
|
|
103
|
+
super().mousePressEvent(event)
|
|
104
|
+
|
|
105
|
+
def mouseMoveEvent(self, event: QMouseEvent):
|
|
106
|
+
# Track mouse position for spawning nodes
|
|
107
|
+
self._last_mouse_scene_pos = self.mapToScene(event.pos())
|
|
108
|
+
|
|
109
|
+
if self._is_panning:
|
|
110
|
+
# Manually pan the view by shifting scrollbars
|
|
111
|
+
delta = event.pos() - self._last_pan_pos
|
|
112
|
+
self._last_pan_pos = event.pos()
|
|
113
|
+
self.horizontalScrollBar().setValue(self.horizontalScrollBar().value() - delta.x())
|
|
114
|
+
self.verticalScrollBar().setValue(self.verticalScrollBar().value() - delta.y())
|
|
115
|
+
event.accept()
|
|
116
|
+
else:
|
|
117
|
+
super().mouseMoveEvent(event)
|
|
118
|
+
|
|
119
|
+
def mouseReleaseEvent(self, event: QMouseEvent):
|
|
120
|
+
if self._is_panning:
|
|
121
|
+
# Stop panning on any button release if we were panning
|
|
122
|
+
self._stop_pan()
|
|
123
|
+
event.accept()
|
|
124
|
+
else:
|
|
125
|
+
super().mouseReleaseEvent(event)
|
|
126
|
+
|
|
127
|
+
def _start_pan(self, pos):
|
|
128
|
+
self._is_panning = True
|
|
129
|
+
self._last_pan_pos = pos
|
|
130
|
+
self.setCursor(Qt.ClosedHandCursor)
|
|
131
|
+
self.setDragMode(QGraphicsView.NoDrag)
|
|
132
|
+
|
|
133
|
+
def _stop_pan(self):
|
|
134
|
+
self._is_panning = False
|
|
135
|
+
self.setCursor(Qt.ArrowCursor)
|
|
136
|
+
self.setDragMode(QGraphicsView.RubberBandDrag)
|
|
137
|
+
|
|
138
|
+
def keyPressEvent(self, event: QKeyEvent):
|
|
139
|
+
from PyQt5.QtWidgets import QApplication, QLineEdit, QTextEdit, QPlainTextEdit
|
|
140
|
+
focus_widget = QApplication.focusWidget()
|
|
141
|
+
if isinstance(focus_widget, (QLineEdit, QTextEdit, QPlainTextEdit)):
|
|
142
|
+
super().keyPressEvent(event)
|
|
143
|
+
return
|
|
144
|
+
if event.key() == Qt.Key_Space and not event.isAutoRepeat():
|
|
145
|
+
self.setCursor(Qt.OpenHandCursor)
|
|
146
|
+
# We don't start panning yet, just show the cursor
|
|
147
|
+
# Actual pan starts on mouse press + space
|
|
148
|
+
elif event.key() == Qt.Key_F:
|
|
149
|
+
self.focus_on_selection()
|
|
150
|
+
elif event.key() == Qt.Key_B and event.modifiers() == Qt.ControlModifier:
|
|
151
|
+
# Toggle Bypass on selection
|
|
152
|
+
scene = self.scene()
|
|
153
|
+
if scene:
|
|
154
|
+
from src.ui.node_widget import NodeWidget
|
|
155
|
+
selected_nodes = [i for i in scene.selectedItems() if isinstance(i, NodeWidget)]
|
|
156
|
+
if selected_nodes:
|
|
157
|
+
scene.push_history()
|
|
158
|
+
# If any are NOT bypassed, bypass them all. Otherwise, unbypass all.
|
|
159
|
+
any_not_bypassed = any(not n.bypassed for n in selected_nodes)
|
|
160
|
+
for node in selected_nodes:
|
|
161
|
+
node.set_bypassed(any_not_bypassed)
|
|
162
|
+
elif event.key() == Qt.Key_G and event.modifiers() == Qt.ControlModifier:
|
|
163
|
+
# Wrap in Backdrop
|
|
164
|
+
scene = self.scene()
|
|
165
|
+
if scene:
|
|
166
|
+
from src.ui.node_widget import NodeWidget
|
|
167
|
+
selected_nodes = [i for i in scene.selectedItems() if isinstance(i, NodeWidget)]
|
|
168
|
+
if selected_nodes:
|
|
169
|
+
# Trigger the wrap logic
|
|
170
|
+
# We can either duplicate the logic or call a method on scene
|
|
171
|
+
if hasattr(scene, '_wrap_selection_in_backdrop'):
|
|
172
|
+
scene._wrap_selection_in_backdrop()
|
|
173
|
+
else:
|
|
174
|
+
# Fallback to direct implementation if method doesn't exist yet
|
|
175
|
+
rect = selected_nodes[0].sceneBoundingRect()
|
|
176
|
+
for node in selected_nodes[1:]:
|
|
177
|
+
rect = rect.united(node.sceneBoundingRect())
|
|
178
|
+
padding = 40
|
|
179
|
+
box_pos = (rect.x() - padding, rect.y() - padding - 20)
|
|
180
|
+
box_size = (rect.width() + padding*2, rect.height() + padding*2 + 20)
|
|
181
|
+
scene.add_backdrop(title="Grouped Nodes", pos=box_pos, size=box_size)
|
|
182
|
+
super().keyPressEvent(event)
|
|
183
|
+
|
|
184
|
+
def focus_on_selection(self):
|
|
185
|
+
scene = self.scene()
|
|
186
|
+
if not scene: return
|
|
187
|
+
|
|
188
|
+
selected_items = scene.selectedItems()
|
|
189
|
+
target_rect = None
|
|
190
|
+
|
|
191
|
+
if selected_items:
|
|
192
|
+
# Focus on bounding rect of selected items
|
|
193
|
+
target_rect = selected_items[0].sceneBoundingRect()
|
|
194
|
+
for item in selected_items[1:]:
|
|
195
|
+
target_rect = target_rect.united(item.sceneBoundingRect())
|
|
196
|
+
else:
|
|
197
|
+
# Focus on all nodes, notes, and backdrops specifically
|
|
198
|
+
from src.ui.node_widget import NodeWidget
|
|
199
|
+
from src.ui.canvas.sticky_note import StickyNote
|
|
200
|
+
from src.ui.canvas.backdrop import Backdrop
|
|
201
|
+
|
|
202
|
+
content_items = [i for i in scene.items() if isinstance(i, (NodeWidget, StickyNote, Backdrop))]
|
|
203
|
+
|
|
204
|
+
if content_items:
|
|
205
|
+
target_rect = content_items[0].sceneBoundingRect()
|
|
206
|
+
for item in content_items[1:]:
|
|
207
|
+
target_rect = target_rect.united(item.sceneBoundingRect())
|
|
208
|
+
|
|
209
|
+
if target_rect:
|
|
210
|
+
# Add some padding (10%)
|
|
211
|
+
padding = max(target_rect.width(), target_rect.height()) * 0.1
|
|
212
|
+
target_rect.adjust(-padding, -padding, padding, padding)
|
|
213
|
+
self.fitInView(target_rect, Qt.KeepAspectRatio)
|
|
214
|
+
else:
|
|
215
|
+
self.centerOn(0, 0)
|
|
216
|
+
|
|
217
|
+
def keyReleaseEvent(self, event: QKeyEvent):
|
|
218
|
+
if event.key() == Qt.Key_Space and not event.isAutoRepeat():
|
|
219
|
+
self._stop_pan()
|
|
220
|
+
super().keyReleaseEvent(event)
|
|
221
|
+
|
|
222
|
+
def wheelEvent(self, event: QWheelEvent):
|
|
223
|
+
"""
|
|
224
|
+
Handle zoom in/out with Ctrl + Wheel.
|
|
225
|
+
"""
|
|
226
|
+
if event.modifiers() == Qt.ControlModifier:
|
|
227
|
+
zoom_in_factor = 1.25
|
|
228
|
+
zoom_out_factor = 1 / zoom_in_factor
|
|
229
|
+
|
|
230
|
+
if event.angleDelta().y() > 0:
|
|
231
|
+
zoom_factor = zoom_in_factor
|
|
232
|
+
else:
|
|
233
|
+
zoom_factor = zoom_out_factor
|
|
234
|
+
|
|
235
|
+
self.scale(zoom_factor, zoom_factor)
|
|
236
|
+
self._mini_map.refresh()
|
|
237
|
+
event.accept()
|
|
238
|
+
else:
|
|
239
|
+
super().wheelEvent(event)
|
|
240
|
+
|
|
241
|
+
def show_node_search_popup(self, pos=None):
|
|
242
|
+
"""Show the node search popup at the current mouse position."""
|
|
243
|
+
scene = self.scene()
|
|
244
|
+
if not scene:
|
|
245
|
+
return
|
|
246
|
+
|
|
247
|
+
# Get spawn position in scene coordinates
|
|
248
|
+
if pos is None:
|
|
249
|
+
spawn_pos = self._last_mouse_scene_pos
|
|
250
|
+
else:
|
|
251
|
+
spawn_pos = pos
|
|
252
|
+
|
|
253
|
+
# Create and show the popup
|
|
254
|
+
popup = NodeSearchPopup(self)
|
|
255
|
+
|
|
256
|
+
# Apply theme based on scene background
|
|
257
|
+
is_dark = scene.backgroundBrush().color().lightness() < 128
|
|
258
|
+
popup.apply_theme(is_dark)
|
|
259
|
+
|
|
260
|
+
# Connect selection signal
|
|
261
|
+
def on_node_selected(node_id):
|
|
262
|
+
scene.push_history()
|
|
263
|
+
scene.add_node_by_name(node_id, spawn_pos)
|
|
264
|
+
|
|
265
|
+
popup.node_selected.connect(on_node_selected)
|
|
266
|
+
|
|
267
|
+
# Position popup near the cursor
|
|
268
|
+
cursor_pos = self.mapFromGlobal(self.cursor().pos())
|
|
269
|
+
popup_pos = self.mapToGlobal(cursor_pos)
|
|
270
|
+
popup.move(popup_pos)
|
|
271
|
+
exec_dialog(popup)
|
|
272
|
+
|
|
273
|
+
def apply_theme(self, is_dark=True):
|
|
274
|
+
self._mini_map.apply_theme(is_dark)
|
|
275
|
+
|
|
276
|
+
def show_canvas_search(self):
|
|
277
|
+
"""Show the floating canvas search bar (Ctrl+F)."""
|
|
278
|
+
self._canvas_search_bar.show_bar()
|
|
279
|
+
|
|
280
|
+
def resizeEvent(self, event):
|
|
281
|
+
super().resizeEvent(event)
|
|
282
|
+
if self._canvas_search_bar.isVisible():
|
|
283
|
+
self._canvas_search_bar._reposition()
|
|
284
|
+
self._mini_map.reposition()
|
|
285
|
+
self._mini_map.refresh()
|