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,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "blender_get_action_result",
|
|
3
|
+
"name": "Blender: Get Action Result",
|
|
4
|
+
"description": "Extracts a single action result from the Blender Headless 'executed_actions' output. Select by action type (first match) or by index. Outputs the matched action dict, its 'info' field (if present), and a best-guess path field so downstream nodes don't need to filter the list manually.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/blender_icon.png",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "exec_in", "type": "exec" },
|
|
10
|
+
{ "name": "executed_actions", "type": "list", "default": [] },
|
|
11
|
+
{ "name": "action_type", "type": "string", "widget_type": "text", "default": "" },
|
|
12
|
+
{ "name": "index", "type": "int", "widget_type": "int", "default": 0 }
|
|
13
|
+
],
|
|
14
|
+
"outputs": [
|
|
15
|
+
{ "name": "exec_out", "type": "exec" },
|
|
16
|
+
{ "name": "found", "type": "bool" },
|
|
17
|
+
{ "name": "action", "type": "dict" },
|
|
18
|
+
{ "name": "info", "type": "dict" },
|
|
19
|
+
{ "name": "path", "type": "string" }
|
|
20
|
+
],
|
|
21
|
+
"python_code": "async def execute(self, inputs):\n executed = inputs.get('executed_actions') or []\n if not isinstance(executed, list):\n executed = [executed]\n\n action_type = (inputs.get('action_type') or self.get_parameter('action_type', '') or '').strip()\n index = inputs.get('index')\n if index is None:\n index = self.get_parameter('index', 0)\n try:\n index = int(index)\n except Exception:\n index = 0\n\n match = None\n\n if action_type:\n for a in executed:\n if isinstance(a, dict) and a.get('type') == action_type:\n match = a\n break\n if match is None:\n self.log_error(f'No executed action of type \"{action_type}\" found')\n else:\n if 0 <= index < len(executed):\n candidate = executed[index]\n if isinstance(candidate, dict):\n match = candidate\n else:\n self.log_error(f'Executed action at index {index} is not a dict')\n elif len(executed) == 0:\n self.log_error('executed_actions is empty')\n else:\n self.log_error(f'Index {index} out of range (executed_actions has {len(executed)} entries)')\n\n found = match is not None\n action = match or {}\n info = action.get('info', {}) if isinstance(action, dict) else {}\n if not isinstance(info, dict):\n info = {}\n\n path = ''\n if isinstance(action, dict):\n for key in ('blend_path', 'fbx_path', 'abc_path', 'obj_path', 'gltf_path', 'usd_path', 'output_path'):\n val = action.get(key)\n if val:\n path = val\n break\n\n if found:\n self.log_info(f'Matched action type={action.get(\"type\", \"\")}')\n\n await self.set_output('found', found)\n await self.set_output('action', action)\n await self.set_output('info', info)\n await self.set_output('path', path)\n await self.set_output('exec_out', True)\n return {'found': found, 'action': action, 'info': info, 'path': path}"
|
|
22
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "blender_headless",
|
|
3
|
+
"name": "Blender Headless",
|
|
4
|
+
"description": "Launches Blender in headless (background) mode, optionally opens a .blend file, executes a list of Blender Actions collected from upstream action nodes, and returns the results. Supports custom environment variables via .bat or blender.env file.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/blender_icon.png",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{
|
|
10
|
+
"name": "exec_in",
|
|
11
|
+
"type": "exec"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "blender_version",
|
|
15
|
+
"type": "string",
|
|
16
|
+
"widget_type": "dropdown",
|
|
17
|
+
"options": [
|
|
18
|
+
"4.3",
|
|
19
|
+
"4.2",
|
|
20
|
+
"4.1",
|
|
21
|
+
"4.0",
|
|
22
|
+
"3.6"
|
|
23
|
+
],
|
|
24
|
+
"default": "4.2"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "blender.exe",
|
|
28
|
+
"type": "string",
|
|
29
|
+
"widget_type": "text",
|
|
30
|
+
"default": "C:/Program Files/Blender Foundation/Blender 4.2/blender.exe"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "bat_file",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"widget_type": "file",
|
|
36
|
+
"default": ""
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "blender_env_file",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"widget_type": "file",
|
|
42
|
+
"default": ""
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "blend_file",
|
|
46
|
+
"type": "string",
|
|
47
|
+
"widget_type": "file",
|
|
48
|
+
"default": ""
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "actions",
|
|
52
|
+
"type": "list"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"outputs": [
|
|
56
|
+
{
|
|
57
|
+
"name": "exec_out",
|
|
58
|
+
"type": "exec"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "success",
|
|
62
|
+
"type": "bool"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "stdout",
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "stderr",
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "exit_code",
|
|
74
|
+
"type": "int"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "executed_actions",
|
|
78
|
+
"type": "list"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "skipped_actions",
|
|
82
|
+
"type": "list"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"python_code": "import subprocess, json, tempfile, os\n\nVERSION_PATHS = {\n '4.3': 'C:/Program Files/Blender Foundation/Blender 4.3/blender.exe',\n '4.2': 'C:/Program Files/Blender Foundation/Blender 4.2/blender.exe',\n '4.1': 'C:/Program Files/Blender Foundation/Blender 4.1/blender.exe',\n '4.0': 'C:/Program Files/Blender Foundation/Blender 4.0/blender.exe',\n '3.6': 'C:/Program Files/Blender Foundation/Blender 3.6/blender.exe',\n}\n\nBLENDER_RUNNER_SCRIPT = '''import json, sys, os\nimport bpy\n\n# Blender passes script args after '--' separator\ntry:\n sep = sys.argv.index('--')\n script_args = sys.argv[sep + 1:]\nexcept ValueError:\n script_args = []\n\nif len(script_args) < 2:\n print('ERROR: runner requires payload_path and results_path as args after --')\n sys.exit(1)\n\npayload_path = script_args[0]\nresults_path = script_args[1]\n\nwith open(payload_path, 'r') as f:\n payload = json.load(f)\n\nresults = {'actions': [], 'errors': []}\n\nbpy_version = bpy.app.version # e.g. (4, 2, 0)\n\ndef _import_obj(filepath):\n \"\"\"Version-aware OBJ import.\"\"\"\n if bpy_version >= (4, 0, 0):\n bpy.ops.wm.obj_import(filepath=filepath)\n else:\n bpy.ops.import_scene.obj(filepath=filepath)\n\ndef _export_obj(filepath, selection_only=False):\n \"\"\"Version-aware OBJ export.\"\"\"\n if bpy_version >= (4, 0, 0):\n bpy.ops.wm.obj_export(filepath=filepath, export_selected_objects=selection_only)\n else:\n bpy.ops.export_scene.obj(filepath=filepath, use_selection=selection_only)\n\nblend_file = payload.get('blend_file', '')\nif blend_file:\n try:\n bpy.ops.wm.open_mainfile(filepath=blend_file)\n except Exception as e:\n results['errors'].append('Failed to open blend file: ' + str(e))\n with open(results_path, 'w') as f:\n json.dump(results, f)\n sys.exit(1)\n\nfor i, action in enumerate(payload.get('actions', [])):\n action_type = action.get('type', '')\n entry = {'index': i, 'type': action_type, 'ok': False, 'error': ''}\n try:\n if action_type == 'open_blend':\n bpy.ops.wm.open_mainfile(filepath=action['blend_path'])\n entry['ok'] = True\n elif action_type == 'save_blend':\n bpy.ops.wm.save_as_mainfile(filepath=action['blend_path'])\n entry['ok'] = True\n elif action_type == 'new_blend':\n bpy.ops.wm.read_factory_settings(use_empty=bool(action.get('use_empty', False)))\n entry['ok'] = True\n elif action_type == 'scene_info':\n scene = bpy.context.scene\n info = {\n 'scene_name': scene.name,\n 'blend_path': bpy.data.filepath,\n 'frame_start': scene.frame_start,\n 'frame_end': scene.frame_end,\n 'fps': scene.render.fps,\n 'fps_base': scene.render.fps_base,\n 'render_engine': scene.render.engine,\n 'resolution_x': scene.render.resolution_x,\n 'resolution_y': scene.render.resolution_y,\n 'output_path': scene.render.filepath,\n 'object_count': len(scene.objects),\n 'objects': [o.name for o in scene.objects],\n 'cameras': [o.name for o in scene.objects if o.type == 'CAMERA'],\n 'collections': [c.name for c in bpy.data.collections],\n }\n entry['info'] = info\n entry['ok'] = True\n elif action_type == 'set_frame_range':\n scene = bpy.context.scene\n scene.frame_start = int(action.get('frame_start', 1))\n scene.frame_end = int(action.get('frame_end', 100))\n if 'fps' in action:\n scene.render.fps = int(action['fps'])\n entry['ok'] = True\n elif action_type == 'import_obj':\n _import_obj(action['obj_path'])\n entry['ok'] = True\n elif action_type == 'import_fbx':\n bpy.ops.import_scene.fbx(filepath=action['fbx_path'])\n entry['ok'] = True\n elif action_type == 'import_alembic':\n bpy.ops.wm.alembic_import(filepath=action['abc_path'])\n entry['ok'] = True\n elif action_type == 'import_gltf':\n bpy.ops.import_scene.gltf(filepath=action['gltf_path'])\n entry['ok'] = True\n elif action_type == 'export_obj':\n _export_obj(action['obj_path'], selection_only=bool(action.get('selection_only', False)))\n entry['ok'] = True\n elif action_type == 'export_fbx':\n sel_only = bool(action.get('selection_only', False))\n kwargs = {\n 'filepath': action['fbx_path'],\n 'use_selection': sel_only,\n 'bake_anim': bool(action.get('bake_anim', True)),\n 'bake_anim_use_all_actions': bool(action.get('bake_all_actions', False)),\n 'add_leaf_bones': bool(action.get('add_leaf_bones', False)),\n }\n fs = action.get('frame_start')\n fe = action.get('frame_end')\n if fs is not None:\n kwargs['bake_anim_step'] = 1\n scene = bpy.context.scene\n scene.frame_start = int(fs)\n scene.frame_end = int(fe) if fe is not None else scene.frame_end\n os.makedirs(os.path.dirname(action['fbx_path']), exist_ok=True)\n bpy.ops.export_scene.fbx(**kwargs)\n entry['ok'] = True\n elif action_type == 'export_alembic':\n fs = int(action.get('frame_start', bpy.context.scene.frame_start))\n fe = int(action.get('frame_end', bpy.context.scene.frame_end))\n kwargs = {\n 'filepath': action['abc_path'],\n 'export_hair': bool(action.get('export_hair', False)),\n 'export_particles': bool(action.get('export_particles', False)),\n }\n os.makedirs(os.path.dirname(action['abc_path']), exist_ok=True)\n try:\n bpy.ops.wm.alembic_export(start=fs, end=fe, **kwargs)\n except TypeError:\n bpy.ops.wm.alembic_export(frame_start=fs, frame_end=fe, **kwargs)\n entry['ok'] = True\n elif action_type == 'export_gltf':\n kwargs = {\n 'filepath': action['gltf_path'],\n 'export_format': action.get('format', 'GLB'),\n 'use_selection': bool(action.get('selection_only', False)),\n 'export_animations': bool(action.get('export_animations', True)),\n }\n bpy.ops.export_scene.gltf(**kwargs)\n entry['ok'] = True\n elif action_type == 'export_usd':\n kwargs = {\n 'filepath': action['usd_path'],\n 'export_animation': bool(action.get('export_animation', False)),\n 'export_hair': bool(action.get('export_hair', False)),\n 'export_uvmaps': bool(action.get('export_uvmaps', True)),\n 'export_normals': bool(action.get('export_normals', True)),\n 'export_materials': bool(action.get('export_materials', True)),\n }\n os.makedirs(os.path.dirname(action['usd_path']), exist_ok=True)\n bpy.ops.wm.usd_export(**kwargs)\n entry['ok'] = True\n elif action_type == 'set_render_settings':\n scene = bpy.context.scene\n engine = action.get('render_engine', '')\n if engine:\n scene.render.engine = engine.upper()\n if action.get('resolution_x'):\n scene.render.resolution_x = int(action['resolution_x'])\n if action.get('resolution_y'):\n scene.render.resolution_y = int(action['resolution_y'])\n if action.get('resolution_percentage'):\n scene.render.resolution_percentage = int(action['resolution_percentage'])\n if action.get('frame_start'):\n scene.frame_start = int(action['frame_start'])\n if action.get('frame_end'):\n scene.frame_end = int(action['frame_end'])\n if action.get('output_path'):\n scene.render.filepath = action['output_path']\n if action.get('file_format'):\n scene.render.image_settings.file_format = action['file_format'].upper()\n samples = action.get('samples')\n if samples is not None:\n try:\n if scene.render.engine == 'CYCLES':\n scene.cycles.samples = int(samples)\n elif scene.render.engine == 'BLENDER_EEVEE':\n scene.eevee.taa_render_samples = int(samples)\n elif scene.render.engine == 'BLENDER_EEVEE_NEXT':\n scene.eevee.taa_render_samples = int(samples)\n except Exception as _e:\n pass\n use_gpu = action.get('use_gpu')\n if use_gpu is not None and scene.render.engine == 'CYCLES':\n try:\n scene.cycles.device = 'GPU' if use_gpu else 'CPU'\n prefs = bpy.context.preferences.addons['cycles'].preferences\n prefs.compute_device_type = 'CUDA'\n prefs.get_devices()\n for d in prefs.devices:\n d.use = True\n except Exception as _e:\n pass\n entry['ok'] = True\n elif action_type == 'render':\n scene = bpy.context.scene\n if action.get('output_path'):\n scene.render.filepath = action['output_path']\n if action.get('file_format'):\n scene.render.image_settings.file_format = action['file_format'].upper()\n animate = bool(action.get('animation', False))\n if animate:\n if action.get('frame_start'):\n scene.frame_start = int(action['frame_start'])\n if action.get('frame_end'):\n scene.frame_end = int(action['frame_end'])\n bpy.ops.render.render(animation=True)\n else:\n frame = action.get('frame')\n if frame is not None:\n scene.frame_set(int(frame))\n bpy.ops.render.render(write_still=True)\n entry['info'] = {'output_path': scene.render.filepath, 'animation': animate}\n entry['ok'] = True\n elif action_type == 'bake_animation':\n scene = bpy.context.scene\n fs = int(action.get('frame_start', scene.frame_start))\n fe = int(action.get('frame_end', scene.frame_end))\n step = int(action.get('frame_step', 1))\n only_selected = bool(action.get('only_selected', True))\n bpy.ops.nla.bake(\n frame_start=fs,\n frame_end=fe,\n step=step,\n only_selected=only_selected,\n visual_keying=bool(action.get('visual_keying', True)),\n clear_constraints=bool(action.get('clear_constraints', False)),\n clear_parents=bool(action.get('clear_parents', False)),\n use_current_action=bool(action.get('use_current_action', True)),\n bake_types={'OBJECT', 'POSE'},\n )\n entry['ok'] = True\n elif action_type == 'custom_python':\n user_code = action.get('python_code', '')\n exec(user_code, {'bpy': bpy, 'action': action, 'os': os, 'json': json})\n entry['ok'] = True\n else:\n entry['error'] = 'unknown action type'\n except Exception as e:\n import traceback\n entry['error'] = str(e) + chr(10) + traceback.format_exc()\n results['actions'].append(entry)\n\nwith open(results_path, 'w') as f:\n json.dump(results, f)\n'''\n\ndef _parse_blender_env(path):\n env = {}\n if not path or not os.path.isfile(path):\n return env\n with open(path, 'r') as f:\n for line in f:\n line = line.strip()\n if not line or line.startswith('#'):\n continue\n if '=' in line:\n key, val = line.split('=', 1)\n env[key.strip()] = val.strip()\n return env\n\ndef _parse_bat_env(path):\n env = {}\n if not path or not os.path.isfile(path):\n return env\n with open(path, 'r') as f:\n for line in f:\n line = line.strip()\n lower = line.lower()\n if lower.startswith('set ') and '=' in line:\n rest = line[4:]\n key, val = rest.split('=', 1)\n env[key.strip()] = val.strip()\n return env\n\ndef _build_env(bat_file, blender_env_file):\n env = os.environ.copy()\n blender_vars = _parse_blender_env(blender_env_file)\n bat_vars = _parse_bat_env(bat_file)\n for k, v in blender_vars.items():\n for ek, ev in env.items():\n v = v.replace(f'%{ek}%', ev)\n env[k] = v\n for k, v in bat_vars.items():\n for ek, ev in env.items():\n v = v.replace(f'%{ek}%', ev)\n env[k] = v\n return env\n\nasync def on_parameter_changed(self, name, value):\n if name == 'blender_version' and value in VERSION_PATHS:\n self.set_parameter('blender.exe', VERSION_PATHS[value])\n\ndef _fail(self, msg):\n return {'success': False, 'stdout': '', 'stderr': msg, 'exit_code': -1, 'executed_actions': [], 'skipped_actions': []}\n\nasync def _set_outputs(self, result):\n for k, v in result.items():\n await self.set_output(k, v)\n await self.set_output('exec_out', True)\n\nasync def execute(self, inputs):\n version = inputs.get('blender_version') or self.get_parameter('blender_version', '4.2')\n blender_exe = inputs.get('blender.exe') or self.get_parameter('blender.exe', '')\n if not blender_exe and version in VERSION_PATHS:\n blender_exe = VERSION_PATHS[version]\n bat_file = inputs.get('bat_file') or self.get_parameter('bat_file', '')\n blender_env_file = inputs.get('blender_env_file') or self.get_parameter('blender_env_file', '')\n blend_file = inputs.get('blend_file') or self.get_parameter('blend_file', '')\n actions = inputs.get('actions') or []\n\n if not isinstance(actions, list):\n actions = [actions]\n\n env = _build_env(bat_file, blender_env_file)\n env_sources = []\n if bat_file:\n env_sources.append(f'bat: {bat_file}')\n if blender_env_file:\n env_sources.append(f'blender.env: {blender_env_file}')\n if env_sources:\n self.log_info(f'Environment loaded from: {\" + \".join(env_sources)}')\n\n # Validate actions\n planned = []\n skipped = []\n REQUIRES_PATH = {\n 'open_blend': 'blend_path', 'save_blend': 'blend_path',\n 'import_obj': 'obj_path', 'import_fbx': 'fbx_path',\n 'import_alembic': 'abc_path', 'import_gltf': 'gltf_path',\n 'export_obj': 'obj_path', 'export_fbx': 'fbx_path',\n 'export_alembic': 'abc_path', 'export_gltf': 'gltf_path',\n 'export_usd': 'usd_path', 'render': 'output_path',\n }\n for action in actions:\n if not isinstance(action, dict):\n skipped.append({'action': action, 'reason': 'not a dict'})\n continue\n action_type = action.get('type', '')\n required_field = REQUIRES_PATH.get(action_type)\n if required_field and not action.get(required_field):\n skipped.append({'action': action, 'reason': f'{required_field} is empty'})\n continue\n if action_type == 'custom_python' and not action.get('python_code'):\n skipped.append({'action': action, 'reason': 'python_code is empty'})\n continue\n if action_type == 'bake_animation':\n planned.append(action)\n continue\n KNOWN = {\n 'open_blend', 'save_blend', 'new_blend', 'scene_info', 'set_frame_range',\n 'import_obj', 'import_fbx', 'import_alembic', 'import_gltf',\n 'export_obj', 'export_fbx', 'export_alembic', 'export_gltf', 'export_usd',\n 'set_render_settings', 'render', 'bake_animation', 'custom_python'\n }\n if action_type not in KNOWN:\n skipped.append({'action': action, 'reason': f'unknown action type: {action_type}'})\n continue\n planned.append(action)\n\n if skipped:\n for s in skipped:\n self.log_error(f'Action skipped: {s[\"reason\"]}')\n result = _fail(self, f'{len(skipped)} action(s) skipped due to validation errors')\n result['skipped_actions'] = skipped\n await _set_outputs(self, result)\n return result\n\n payload = {'blend_file': blend_file, 'actions': planned}\n payload_file = tempfile.NamedTemporaryFile(mode='w', suffix='.json', delete=False)\n script_file = tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False)\n results_file = tempfile.NamedTemporaryFile(mode='w', suffix='_results.json', delete=False)\n results_file.close()\n try:\n json.dump(payload, payload_file)\n payload_file.close()\n script_file.write(BLENDER_RUNNER_SCRIPT)\n script_file.close()\n\n # Build Blender command: blender --background [blend] --python runner.py -- payload results\n cmd = [blender_exe, '--background']\n # Note: blend_file is already handled inside the runner via payload,\n # but we don't pre-open it here to keep the runner in full control.\n cmd += ['--python', script_file.name, '--', payload_file.name, results_file.name]\n\n self.log_info(f'Running Blender {version}: {\" \".join(cmd)}')\n\n proc = subprocess.run(cmd, capture_output=True, text=True, timeout=600, env=env)\n\n executed = []\n blender_errors = []\n try:\n with open(results_file.name, 'r') as rf:\n bl_results = json.load(rf)\n for ar in bl_results.get('actions', []):\n if ar.get('ok'):\n merged = dict(planned[ar['index']])\n if 'info' in ar:\n merged['info'] = ar['info']\n executed.append(merged)\n else:\n blender_errors.append(f'Action {ar[\"index\"]} ({ar[\"type\"]}): {ar[\"error\"]}')\n blender_errors.extend(bl_results.get('errors', []))\n except Exception:\n pass\n\n ok = proc.returncode == 0 and not blender_errors\n\n if proc.returncode != 0 and not blender_errors and proc.stderr:\n blender_errors.append(f'Blender process failed with exit code {proc.returncode}')\n\n for err in blender_errors:\n self.log_error(err)\n\n result = {\n 'success': ok,\n 'stdout': proc.stdout,\n 'stderr': proc.stderr,\n 'exit_code': proc.returncode,\n 'executed_actions': executed,\n 'skipped_actions': [],\n }\n await _set_outputs(self, result)\n\n if ok:\n self.log_info(f'Blender completed successfully. {len(executed)} actions executed.')\n else:\n self.log_error(f'Blender run failed. {len(executed)}/{len(planned)} actions succeeded.')\n\n return result\n except Exception as e:\n self.log_error(f'Blender execution failed: {e}')\n result = _fail(self, str(e))\n await _set_outputs(self, result)\n return result\n finally:\n for f in [payload_file.name, script_file.name, results_file.name]:\n try:\n os.unlink(f)\n except Exception:\n pass"
|
|
86
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "compare",
|
|
3
|
+
"name": "Compare",
|
|
4
|
+
"description": "Compares two inputs based on a chosen operation.",
|
|
5
|
+
"category": "Logic",
|
|
6
|
+
"icon_path": "icons/scales.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"name": "exec_in",
|
|
10
|
+
"type": "exec"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "a",
|
|
14
|
+
"type": "any",
|
|
15
|
+
"widget_type": "text"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "operation",
|
|
19
|
+
"type": "string",
|
|
20
|
+
"widget_type": "dropdown",
|
|
21
|
+
"options": [
|
|
22
|
+
"==",
|
|
23
|
+
"!=",
|
|
24
|
+
">",
|
|
25
|
+
"<",
|
|
26
|
+
">=",
|
|
27
|
+
"<="
|
|
28
|
+
],
|
|
29
|
+
"default": "=="
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "b",
|
|
33
|
+
"type": "any",
|
|
34
|
+
"widget_type": "text"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"outputs": [
|
|
38
|
+
{
|
|
39
|
+
"name": "exec_out",
|
|
40
|
+
"type": "exec"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "result",
|
|
44
|
+
"type": "bool"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"python_code": "def _run_compare(self, inputs):\n def convert(val):\n if val is None: return 0\n try: return float(val)\n except (ValueError, TypeError): return str(val)\n\n # Use current execution inputs instead of stale instance parameters\n a = convert(inputs.get('a'))\n b = convert(inputs.get('b'))\n op = inputs.get('operation', '==')\n \n self.log_info(f\"Comparing: {a} {op} {b}\")\n \n try:\n if op == '==': res = a == b\n elif op == '!=': res = a != b\n elif op == '>': res = a > b\n elif op == '<': res = a < b\n elif op == '>=': res = a >= b\n elif op == '<=': res = a <= b\n else: res = False\n return res\n except Exception as e:\n self.log_error(f\"Comparison error: {e}\")\n return False\n\nasync def execute(self, inputs):\n res = self._run_compare(inputs)\n await self.set_output('result', res)\n await self.set_output('exec_out', True)\n return {'result': res}\n\nasync def on_parameter_changed(self, name, value):\n # This is for UI/Reactive updates, using instance parameters is correct here\n if name in ['a', 'b', 'operation']:\n def convert(val):\n if val is None: return 0\n try: return float(val)\n except (ValueError, TypeError): return str(val)\n \n a = convert(self.get_parameter('a'))\n b = convert(self.get_parameter('b'))\n op = self.get_parameter('operation', '==')\n res = False\n try:\n if op == '==': res = a == b\n elif op == '!=': res = a != b\n elif op == '>': res = a > b\n elif op == '<': res = a < b\n elif op == '>=': res = a >= b\n elif op == '<=': res = a <= b\n except: pass\n await self.set_output('result', res)"
|
|
48
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "console_print",
|
|
3
|
+
"name": "Console Print",
|
|
4
|
+
"description": "Prints the input data to the console. Triggered by execution pin or reactive data changes.",
|
|
5
|
+
"category": "IO",
|
|
6
|
+
"icon_path": "icons/terminal.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"name": "exec_in",
|
|
10
|
+
"type": "exec"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "data",
|
|
14
|
+
"type": "any",
|
|
15
|
+
"widget_type": "text"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"outputs": [
|
|
19
|
+
{
|
|
20
|
+
"name": "exec_out",
|
|
21
|
+
"type": "exec"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "out",
|
|
25
|
+
"type": "any"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"python_code": "async def execute(self, inputs):\n data_val = inputs.get('data')\n data = str(data_val) if data_val is not None else ''\n self.log_success(f'[FINAL PRINT]: {data}')\n print(f'PRINT NODE: {data}')\n await self.set_output('out', data)\n await self.set_output('exec_out', True)\n return {'out': data}\n\nasync def on_parameter_changed(self, name, value):\n if name == 'data':\n self.parameters['out'] = value\n # REACTIVE: Always log data changes to the console/log panel\n # This ensures that streaming nodes like 'Sequence' show every step\n self.log_info(f'[STREAM]: {value}')\n print(f'STREAM PRINT: {value}')"
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "create_dictionary",
|
|
3
|
+
"name": "Create Dictionary",
|
|
4
|
+
"description": "Creates a dictionary from provided entries and optionally stores it under `dict_name`.",
|
|
5
|
+
"category": "Data",
|
|
6
|
+
"icon_path": "icons/database.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{ "name": "exec_in", "type": "exec" },
|
|
9
|
+
{ "name": "dict_name", "type": "string", "widget_type": "text", "default": "" },
|
|
10
|
+
{ "name": "entries", "type": "dict" }
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{ "name": "exec_out", "type": "exec" },
|
|
14
|
+
{ "name": "current_dict", "type": "dict" },
|
|
15
|
+
{ "name": "stored", "type": "bool" }
|
|
16
|
+
],
|
|
17
|
+
"python_code": "from src.nodes.base import BaseNode\n\nasync def execute(self, inputs):\n name = inputs.get('dict_name') or self.get_parameter('dict_name', '')\n entries = inputs.get('entries')\n if entries is None:\n entries = self.get_parameter('entries', {})\n try:\n d = dict(entries) if entries is not None else {}\n except Exception:\n d = {}\n\n stored = False\n if name:\n BaseNode.memory[name] = d\n stored = True\n self.log_info(f'Stored dict {name} with {len(d)} entries')\n else:\n self.log_info(f'Created dict with {len(d)} entries (not stored)')\n\n await self.set_output('current_dict', d)\n await self.set_output('stored', stored)\n await self.set_output('exec_out', True)\n return {'current_dict': d, 'stored': stored}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "create_folder",
|
|
3
|
+
"name": "Create Folder",
|
|
4
|
+
"description": "Create a folder (and parents) at the specified path.",
|
|
5
|
+
"category": "File",
|
|
6
|
+
"icon_path": "icons/folder-plus.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{ "name": "exec_in", "type": "exec" },
|
|
9
|
+
{ "name": "path", "type": "string", "widget_type": "text", "default": "" },
|
|
10
|
+
{ "name": "exist_ok", "type": "bool", "widget_type": "bool", "default": true }
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{ "name": "exec_out", "type": "exec" },
|
|
14
|
+
{ "name": "result", "type": "bool" }
|
|
15
|
+
],
|
|
16
|
+
"python_code": "from pathlib import Path\n\nasync def execute(self, inputs):\n p = inputs.get('path') or self.get_parameter('path', '')\n exist_ok = inputs.get('exist_ok') if inputs.get('exist_ok') is not None else self.get_parameter('exist_ok', True)\n try:\n if not p:\n try: self.log_info('Create Folder: path is empty')\n except Exception: pass\n res = False\n else:\n path = Path(p)\n path.mkdir(parents=True, exist_ok=bool(exist_ok))\n res = True\n except Exception as e:\n try: self.log_info(f'Create Folder error: {e}')\n except Exception: pass\n res = False\n\n await self.set_output('result', res)\n await self.set_output('exec_out', True)\n return {'result': res}"
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "create_list",
|
|
3
|
+
"name": "Create List",
|
|
4
|
+
"description": "Initializes a list from provided items and optionally stores it in shared memory under `list_name`.",
|
|
5
|
+
"category": "Data",
|
|
6
|
+
"icon_path": "icons/list-plus.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{ "name": "exec_in", "type": "exec" },
|
|
9
|
+
{ "name": "list_name", "type": "string", "widget_type": "text", "default": "" },
|
|
10
|
+
{ "name": "items", "type": "list" }
|
|
11
|
+
],
|
|
12
|
+
"outputs": [
|
|
13
|
+
{ "name": "exec_out", "type": "exec" },
|
|
14
|
+
{ "name": "current_list", "type": "list" },
|
|
15
|
+
{ "name": "stored", "type": "bool" }
|
|
16
|
+
],
|
|
17
|
+
"python_code": "from src.nodes.base import BaseNode\n\nasync def execute(self, inputs):\n name = inputs.get('list_name') or self.get_parameter('list_name', '')\n items = inputs.get('items')\n # If no explicit items, try instance parameter fallback\n if items is None:\n items = self.get_parameter('items', [])\n try:\n lst = list(items) if items is not None else []\n except Exception:\n lst = [items]\n\n stored = False\n if name:\n BaseNode.memory[name] = lst\n stored = True\n self.log_info(f'Stored list {name} with {len(lst)} items')\n else:\n self.log_info(f'Created list with {len(lst)} items (not stored)')\n\n await self.set_output('current_list', lst)\n await self.set_output('stored', stored)\n await self.set_output('exec_out', True)\n return {'current_list': lst, 'stored': stored}"
|
|
18
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "deadline_blender_submit",
|
|
3
|
+
"name": "Deadline: Submit Blender",
|
|
4
|
+
"description": "Submits a Blender render job to Thinkbox Deadline by writing a Job Info file and Plugin Info file, then calling deadlinecommand. Supports Cycles, EEVEE, and EEVEE Next renderers. Returns the submitted Job ID.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/210429_DeadlineFreeOn10RenderMachines.jpg",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "exec_in", "type": "exec" },
|
|
10
|
+
{ "name": "deadlinecommand", "type": "string", "widget_type": "file", "default": "C:/Program Files/Thinkbox/Deadline10/bin/deadlinecommand.exe" },
|
|
11
|
+
{ "name": "blend_file", "type": "string", "widget_type": "file", "default": "" },
|
|
12
|
+
{ "name": "job_name", "type": "string", "widget_type": "text", "default": "Blender Render Job" },
|
|
13
|
+
{ "name": "batch_name", "type": "string", "widget_type": "text", "default": "" },
|
|
14
|
+
{ "name": "comment", "type": "string", "widget_type": "text", "default": "" },
|
|
15
|
+
{ "name": "pool", "type": "string", "widget_type": "text", "default": "none" },
|
|
16
|
+
{ "name": "secondary_pool", "type": "string", "widget_type": "text", "default": "" },
|
|
17
|
+
{ "name": "group", "type": "string", "widget_type": "text", "default": "none" },
|
|
18
|
+
{ "name": "priority", "type": "int", "widget_type": "int", "default": 50 },
|
|
19
|
+
{ "name": "chunk_size", "type": "int", "widget_type": "int", "default": 1 },
|
|
20
|
+
{ "name": "frame_start", "type": "int", "widget_type": "int", "default": 1 },
|
|
21
|
+
{ "name": "frame_end", "type": "int", "widget_type": "int", "default": 100 },
|
|
22
|
+
{ "name": "frame_step", "type": "int", "widget_type": "int", "default": 1 },
|
|
23
|
+
{ "name": "blender_version", "type": "string", "widget_type": "dropdown", "options": ["4.3", "4.2", "4.1", "4.0", "3.6"], "default": "4.2" },
|
|
24
|
+
{ "name": "renderer", "type": "string", "widget_type": "dropdown", "options": ["CYCLES", "BLENDER_EEVEE", "BLENDER_EEVEE_NEXT", "BLENDER_WORKBENCH"], "default": "CYCLES" },
|
|
25
|
+
{ "name": "output_path", "type": "string", "widget_type": "text", "default": "" },
|
|
26
|
+
{ "name": "output_format", "type": "string", "widget_type": "dropdown", "options": ["PNG", "JPEG", "OPEN_EXR", "OPEN_EXR_MULTILAYER", "TIFF", "BMP"], "default": "PNG" },
|
|
27
|
+
{ "name": "gpu_enable", "type": "bool", "widget_type": "checkbox", "default": false },
|
|
28
|
+
{ "name": "extra_job_args", "type": "string", "widget_type": "text_area","default": "" }
|
|
29
|
+
],
|
|
30
|
+
"outputs": [
|
|
31
|
+
{ "name": "exec_out", "type": "exec" },
|
|
32
|
+
{ "name": "success", "type": "bool" },
|
|
33
|
+
{ "name": "job_id", "type": "string" },
|
|
34
|
+
{ "name": "stdout", "type": "string" },
|
|
35
|
+
{ "name": "stderr", "type": "string" }
|
|
36
|
+
],
|
|
37
|
+
"python_code": "import subprocess, tempfile, os, re\n\ndef _get(inputs, self, key, default):\n v = inputs.get(key)\n return v if v is not None else self.get_parameter(key, default)\n\ndef _build_frame_list(start, end, step):\n if step <= 1:\n return f'{start}-{end}'\n return f'{start}-{end}x{step}'\n\ndef _parse_job_id(output):\n for line in output.splitlines():\n line = line.strip()\n if line.lower().startswith('jobid='):\n return line.split('=', 1)[1].strip()\n m = re.search(r'[0-9a-f]{24}', output)\n return m.group(0) if m else ''\n\nasync def _set_outputs(self, result):\n for k, v in result.items():\n await self.set_output(k, v)\n await self.set_output('exec_out', True)\n\nasync def execute(self, inputs):\n g = lambda key, default: _get(inputs, self, key, default)\n\n deadline_cmd = g('deadlinecommand', 'deadlinecommand')\n blend_file = g('blend_file', '')\n job_name = g('job_name', 'Blender Render Job')\n batch_name = g('batch_name', '')\n comment = g('comment', '')\n pool = g('pool', 'none')\n secondary_pool = g('secondary_pool', '')\n group = g('group', 'none')\n priority = int(g('priority', 50))\n chunk_size = int(g('chunk_size', 1))\n frame_start = int(g('frame_start', 1))\n frame_end = int(g('frame_end', 100))\n frame_step = int(g('frame_step', 1))\n blender_version = g('blender_version', '4.2')\n renderer = g('renderer', 'CYCLES')\n output_path = g('output_path', '')\n output_format = g('output_format', 'PNG')\n gpu_enable = bool(g('gpu_enable', False))\n extra_args = g('extra_job_args', '')\n\n if not blend_file:\n msg = 'blend_file is required'\n self.log_error(msg)\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': msg}\n await _set_outputs(self, result)\n return result\n\n frames = _build_frame_list(frame_start, frame_end, frame_step)\n\n # --- Job Info ---\n job_info_lines = [\n 'Plugin=Blender',\n f'Name={job_name}',\n f'Comment={comment}',\n f'Pool={pool}',\n f'Group={group}',\n f'Priority={priority}',\n f'ChunkSize={chunk_size}',\n f'Frames={frames}',\n 'EnableAutoTimeout=False',\n 'TaskTimeoutMinutes=0',\n ]\n if batch_name:\n job_info_lines.append(f'BatchName={batch_name}')\n if secondary_pool:\n job_info_lines.append(f'SecondaryPool={secondary_pool}')\n if output_path:\n job_info_lines.append(f'OutputDirectory0={os.path.dirname(output_path) if os.path.basename(output_path) else output_path}')\n for line in extra_args.splitlines():\n line = line.strip()\n if line and '=' in line:\n job_info_lines.append(line)\n\n # --- Blender Plugin Info ---\n plugin_info_lines = [\n f'Version={blender_version}',\n f'SceneFile={blend_file}',\n f'Renderer={renderer}',\n f'OutputFile={output_path}',\n f'OutputFormat={output_format}',\n f'GPUEnable={str(gpu_enable)}',\n ]\n\n job_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='_job_info.txt', delete=False, encoding='utf-8')\n plugin_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='_plugin_info.txt', delete=False, encoding='utf-8')\n try:\n job_info_file.write('\\n'.join(job_info_lines))\n job_info_file.close()\n plugin_info_file.write('\\n'.join(plugin_info_lines))\n plugin_info_file.close()\n\n cmd = [deadline_cmd, job_info_file.name, plugin_info_file.name]\n self.log_info(f'Submitting Blender job \"{job_name}\" to Deadline (frames {frames}, renderer={renderer})')\n self.log_info(f'Command: {\" \".join(cmd)}')\n\n proc = subprocess.run(cmd, capture_output=True, text=True, timeout=120)\n\n job_id = _parse_job_id(proc.stdout)\n ok = proc.returncode == 0 and ('Result=Success' in proc.stdout or job_id)\n\n if ok:\n self.log_info(f'Deadline submission successful. JobID: {job_id}')\n else:\n self.log_error(f'Deadline submission failed (exit {proc.returncode}): {proc.stderr or proc.stdout}')\n\n result = {'success': ok, 'job_id': job_id, 'stdout': proc.stdout, 'stderr': proc.stderr}\n await _set_outputs(self, result)\n return result\n except Exception as e:\n self.log_error(f'Deadline submit error: {e}')\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': str(e)}\n await _set_outputs(self, result)\n return result\n finally:\n for f in [job_info_file.name, plugin_info_file.name]:\n try:\n os.unlink(f)\n except Exception:\n pass"
|
|
38
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "deadline_houdini_submit",
|
|
3
|
+
"name": "Deadline: Submit Houdini",
|
|
4
|
+
"description": "Submits a Houdini render job to Thinkbox Deadline by writing a Job Info file and Plugin Info file, then calling deadlinecommand. Specify the ROP output driver path (e.g. /out/mantra1, /out/karma1, /out/arnold). Returns the submitted Job ID.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/210429_DeadlineFreeOn10RenderMachines.jpg",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "exec_in", "type": "exec" },
|
|
10
|
+
{ "name": "deadlinecommand", "type": "string", "widget_type": "file", "default": "C:/Program Files/Thinkbox/Deadline10/bin/deadlinecommand.exe" },
|
|
11
|
+
{ "name": "hip_file", "type": "string", "widget_type": "file", "default": "" },
|
|
12
|
+
{ "name": "rop_path", "type": "string", "widget_type": "text", "default": "/out/mantra1" },
|
|
13
|
+
{ "name": "job_name", "type": "string", "widget_type": "text", "default": "Houdini Render Job" },
|
|
14
|
+
{ "name": "batch_name", "type": "string", "widget_type": "text", "default": "" },
|
|
15
|
+
{ "name": "comment", "type": "string", "widget_type": "text", "default": "" },
|
|
16
|
+
{ "name": "pool", "type": "string", "widget_type": "text", "default": "none" },
|
|
17
|
+
{ "name": "secondary_pool", "type": "string", "widget_type": "text", "default": "" },
|
|
18
|
+
{ "name": "group", "type": "string", "widget_type": "text", "default": "none" },
|
|
19
|
+
{ "name": "priority", "type": "int", "widget_type": "int", "default": 50 },
|
|
20
|
+
{ "name": "chunk_size", "type": "int", "widget_type": "int", "default": 1 },
|
|
21
|
+
{ "name": "frame_start", "type": "int", "widget_type": "int", "default": 1 },
|
|
22
|
+
{ "name": "frame_end", "type": "int", "widget_type": "int", "default": 100 },
|
|
23
|
+
{ "name": "frame_step", "type": "int", "widget_type": "int", "default": 1 },
|
|
24
|
+
{ "name": "houdini_version", "type": "string", "widget_type": "dropdown", "options": ["20.5.445", "20.5.278", "20.0.547", "19.5.493"], "default": "20.5.445" },
|
|
25
|
+
{ "name": "sim_job", "type": "bool", "widget_type": "checkbox", "default": false },
|
|
26
|
+
{ "name": "ignore_inputs", "type": "bool", "widget_type": "checkbox", "default": false },
|
|
27
|
+
{ "name": "auto_workitem", "type": "bool", "widget_type": "checkbox", "default": false },
|
|
28
|
+
{ "name": "extra_job_args", "type": "string", "widget_type": "text_area","default": "" }
|
|
29
|
+
],
|
|
30
|
+
"outputs": [
|
|
31
|
+
{ "name": "exec_out", "type": "exec" },
|
|
32
|
+
{ "name": "success", "type": "bool" },
|
|
33
|
+
{ "name": "job_id", "type": "string" },
|
|
34
|
+
{ "name": "stdout", "type": "string" },
|
|
35
|
+
{ "name": "stderr", "type": "string" }
|
|
36
|
+
],
|
|
37
|
+
"python_code": "import subprocess, tempfile, os, re\n\ndef _get(inputs, self, key, default):\n v = inputs.get(key)\n return v if v is not None else self.get_parameter(key, default)\n\ndef _build_frame_list(start, end, step):\n if step <= 1:\n return f'{start}-{end}'\n return f'{start}-{end}x{step}'\n\ndef _parse_job_id(output):\n for line in output.splitlines():\n line = line.strip()\n if line.lower().startswith('jobid='):\n return line.split('=', 1)[1].strip()\n m = re.search(r'[0-9a-f]{24}', output)\n return m.group(0) if m else ''\n\nasync def _set_outputs(self, result):\n for k, v in result.items():\n await self.set_output(k, v)\n await self.set_output('exec_out', True)\n\nasync def execute(self, inputs):\n g = lambda key, default: _get(inputs, self, key, default)\n\n deadline_cmd = g('deadlinecommand', 'deadlinecommand')\n hip_file = g('hip_file', '')\n rop_path = g('rop_path', '/out/mantra1')\n job_name = g('job_name', 'Houdini Render Job')\n batch_name = g('batch_name', '')\n comment = g('comment', '')\n pool = g('pool', 'none')\n secondary_pool = g('secondary_pool', '')\n group = g('group', 'none')\n priority = int(g('priority', 50))\n chunk_size = int(g('chunk_size', 1))\n frame_start = int(g('frame_start', 1))\n frame_end = int(g('frame_end', 100))\n frame_step = int(g('frame_step', 1))\n houdini_version = g('houdini_version', '20.5.445')\n sim_job = bool(g('sim_job', False))\n ignore_inputs = bool(g('ignore_inputs', False))\n auto_workitem = bool(g('auto_workitem', False))\n extra_args = g('extra_job_args', '')\n\n if not hip_file:\n msg = 'hip_file is required'\n self.log_error(msg)\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': msg}\n await _set_outputs(self, result)\n return result\n\n if not rop_path:\n msg = 'rop_path is required (e.g. /out/mantra1)'\n self.log_error(msg)\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': msg}\n await _set_outputs(self, result)\n return result\n\n frames = _build_frame_list(frame_start, frame_end, frame_step)\n\n # --- Job Info ---\n job_info_lines = [\n 'Plugin=Houdini',\n f'Name={job_name}',\n f'Comment={comment}',\n f'Pool={pool}',\n f'Group={group}',\n f'Priority={priority}',\n f'ChunkSize={chunk_size}',\n f'Frames={frames}',\n 'EnableAutoTimeout=False',\n 'TaskTimeoutMinutes=0',\n ]\n if batch_name:\n job_info_lines.append(f'BatchName={batch_name}')\n if secondary_pool:\n job_info_lines.append(f'SecondaryPool={secondary_pool}')\n for line in extra_args.splitlines():\n line = line.strip()\n if line and '=' in line:\n job_info_lines.append(line)\n\n # --- Houdini Plugin Info ---\n # Extract major.minor from full version string for the Deadline plugin\n version_short = '.'.join(houdini_version.split('.')[:2]) # e.g. '20.5.445' -> '20.5'\n plugin_info_lines = [\n f'Version={version_short}',\n f'SceneFile={hip_file}',\n f'OutputDriver={rop_path}',\n f'SimJob={str(sim_job)}',\n f'IgnoreInputs={str(ignore_inputs)}',\n f'AutoWorkitem={str(auto_workitem)}',\n ]\n\n job_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='_job_info.txt', delete=False, encoding='utf-8')\n plugin_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='_plugin_info.txt', delete=False, encoding='utf-8')\n try:\n job_info_file.write('\\n'.join(job_info_lines))\n job_info_file.close()\n plugin_info_file.write('\\n'.join(plugin_info_lines))\n plugin_info_file.close()\n\n cmd = [deadline_cmd, job_info_file.name, plugin_info_file.name]\n self.log_info(f'Submitting Houdini job \"{job_name}\" to Deadline (frames {frames}, ROP={rop_path})')\n self.log_info(f'Command: {\" \".join(cmd)}')\n\n proc = subprocess.run(cmd, capture_output=True, text=True, timeout=120)\n\n job_id = _parse_job_id(proc.stdout)\n ok = proc.returncode == 0 and ('Result=Success' in proc.stdout or job_id)\n\n if ok:\n self.log_info(f'Deadline submission successful. JobID: {job_id}')\n else:\n self.log_error(f'Deadline submission failed (exit {proc.returncode}): {proc.stderr or proc.stdout}')\n\n result = {'success': ok, 'job_id': job_id, 'stdout': proc.stdout, 'stderr': proc.stderr}\n await _set_outputs(self, result)\n return result\n except Exception as e:\n self.log_error(f'Deadline submit error: {e}')\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': str(e)}\n await _set_outputs(self, result)\n return result\n finally:\n for f in [job_info_file.name, plugin_info_file.name]:\n try:\n os.unlink(f)\n except Exception:\n pass"
|
|
38
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "deadline_job_status",
|
|
3
|
+
"name": "Deadline: Job Status",
|
|
4
|
+
"description": "Queries the status of a Deadline job by Job ID using 'deadlinecommand -GetJobDetails'. Returns status (Active, Rendering, Complete, Failed, Suspended, Pending), progress percentage, task counts, and the full details string. Can optionally wait/poll until the job completes.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/210429_DeadlineFreeOn10RenderMachines.jpg",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "exec_in", "type": "exec" },
|
|
10
|
+
{ "name": "deadlinecommand", "type": "string", "widget_type": "file", "default": "C:/Program Files/Thinkbox/Deadline10/bin/deadlinecommand.exe" },
|
|
11
|
+
{ "name": "job_id", "type": "string", "widget_type": "text", "default": "" },
|
|
12
|
+
{ "name": "poll_until_done", "type": "bool", "widget_type": "checkbox", "default": false },
|
|
13
|
+
{ "name": "poll_interval", "type": "int", "widget_type": "int", "default": 15 },
|
|
14
|
+
{ "name": "timeout_minutes", "type": "int", "widget_type": "int", "default": 120 }
|
|
15
|
+
],
|
|
16
|
+
"outputs": [
|
|
17
|
+
{ "name": "exec_out", "type": "exec" },
|
|
18
|
+
{ "name": "status", "type": "string" },
|
|
19
|
+
{ "name": "progress", "type": "float" },
|
|
20
|
+
{ "name": "tasks_total", "type": "int" },
|
|
21
|
+
{ "name": "tasks_complete", "type": "int" },
|
|
22
|
+
{ "name": "tasks_failed", "type": "int" },
|
|
23
|
+
{ "name": "is_complete", "type": "bool" },
|
|
24
|
+
{ "name": "is_failed", "type": "bool" },
|
|
25
|
+
{ "name": "details", "type": "string" }
|
|
26
|
+
],
|
|
27
|
+
"python_code": "import subprocess, asyncio, time, re\n\ndef _get(inputs, self, key, default):\n v = inputs.get(key)\n return v if v is not None else self.get_parameter(key, default)\n\nFINAL_STATES = {'complete', 'completed', 'failed', 'error'}\nFAIL_STATES = {'failed', 'error'}\n\ndef _query_job(deadline_cmd, job_id):\n \"\"\"Call deadlinecommand -GetJobDetails <id> and return (status, details_str).\"\"\"\n cmd = [deadline_cmd, '-GetJobDetails', job_id]\n try:\n proc = subprocess.run(cmd, capture_output=True, text=True, timeout=30)\n return proc.stdout + proc.stderr, proc.returncode\n except Exception as e:\n return str(e), -1\n\ndef _parse_details(details):\n \"\"\"Extract key fields from the Deadline GetJobDetails output.\"\"\"\n data = {}\n for line in details.splitlines():\n if '=' in line:\n k, _, v = line.partition('=')\n data[k.strip().lower()] = v.strip()\n\n # Status field\n status = (data.get('status') or data.get('jobstatus') or data.get('state') or 'Unknown')\n\n # Task counts (Deadline uses 'taskcount', 'completedtaskcount', 'failedtaskcount')\n def _int(key, fallback=0):\n try:\n return int(data.get(key, fallback))\n except Exception:\n return fallback\n\n total = _int('taskcount') or _int('tasks') or _int('numtasks')\n complete = _int('completedtaskcount') or _int('completedtasks')\n failed = _int('failedtaskcount') or _int('failedtasks')\n\n progress = 0.0\n if total > 0:\n progress = round(complete / total * 100.0, 1)\n\n # Also look for a direct progress/completedpercent field\n for pk in ('completedpercent', 'progress', 'percentcomplete'):\n if pk in data:\n try:\n progress = float(data[pk])\n break\n except Exception:\n pass\n\n return status, progress, total, complete, failed\n\nasync def _set_outputs(self, status, progress, total, complete, failed, details):\n is_complete = status.lower() in FINAL_STATES and status.lower() not in FAIL_STATES\n is_failed = status.lower() in FAIL_STATES\n await self.set_output('status', status)\n await self.set_output('progress', progress)\n await self.set_output('tasks_total', total)\n await self.set_output('tasks_complete', complete)\n await self.set_output('tasks_failed', failed)\n await self.set_output('is_complete', is_complete)\n await self.set_output('is_failed', is_failed)\n await self.set_output('details', details)\n await self.set_output('exec_out', True)\n return is_complete, is_failed\n\nasync def execute(self, inputs):\n g = lambda key, default: _get(inputs, self, key, default)\n\n deadline_cmd = g('deadlinecommand', 'deadlinecommand')\n job_id = g('job_id', '')\n poll_until_done = bool(g('poll_until_done', False))\n poll_interval = max(5, int(g('poll_interval', 15)))\n timeout_minutes = max(1, int(g('timeout_minutes', 120)))\n\n if not job_id:\n self.log_error('job_id is required')\n await _set_outputs(self, 'Unknown', 0.0, 0, 0, 0, 'No job_id provided')\n return {}\n\n if not poll_until_done:\n details, rc = _query_job(deadline_cmd, job_id)\n if rc != 0:\n self.log_error(f'deadlinecommand returned exit code {rc}')\n status, progress, total, complete, failed = _parse_details(details)\n self.log_info(f'Job {job_id}: {status} ({progress}%) {complete}/{total} tasks')\n await _set_outputs(self, status, progress, total, complete, failed, details)\n return {}\n\n # --- Poll mode ---\n deadline_seconds = timeout_minutes * 60\n elapsed = 0\n self.log_info(f'Polling job {job_id} every {poll_interval}s (timeout {timeout_minutes}min)...')\n\n while elapsed < deadline_seconds:\n details, rc = _query_job(deadline_cmd, job_id)\n status, progress, total, complete, failed = _parse_details(details)\n self.log_info(f'Job {job_id}: {status} ({progress}%) {complete}/{total} tasks')\n\n is_done = status.lower() in FINAL_STATES\n if is_done:\n break\n\n await asyncio.sleep(poll_interval)\n elapsed += poll_interval\n else:\n self.log_error(f'Job {job_id} polling timed out after {timeout_minutes} minutes')\n status = 'Timeout'\n\n is_complete, is_failed = await _set_outputs(self, status, progress, total, complete, failed, details)\n if is_failed:\n self.log_error(f'Job {job_id} FAILED ({failed} tasks failed)')\n elif is_complete:\n self.log_info(f'Job {job_id} completed successfully.')"
|
|
28
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "deadline_maya_submit",
|
|
3
|
+
"name": "Deadline: Submit Maya",
|
|
4
|
+
"description": "Submits a Maya render job to Thinkbox Deadline by writing a Job Info file and Plugin Info file, then calling deadlinecommand. Supports Arnold, VRay, Redshift, RenderMan, MayaSoftware, and MayaHardware2. Returns the submitted Job ID.",
|
|
5
|
+
"category": "DCCs",
|
|
6
|
+
"icon_path": "icons/210429_DeadlineFreeOn10RenderMachines.jpg",
|
|
7
|
+
"use_exec": true,
|
|
8
|
+
"inputs": [
|
|
9
|
+
{ "name": "exec_in", "type": "exec" },
|
|
10
|
+
{ "name": "deadlinecommand", "type": "string", "widget_type": "file", "default": "C:/Program Files/Thinkbox/Deadline10/bin/deadlinecommand.exe" },
|
|
11
|
+
{ "name": "scene_file", "type": "string", "widget_type": "file", "default": "" },
|
|
12
|
+
{ "name": "job_name", "type": "string", "widget_type": "text", "default": "Maya Render Job" },
|
|
13
|
+
{ "name": "batch_name", "type": "string", "widget_type": "text", "default": "" },
|
|
14
|
+
{ "name": "comment", "type": "string", "widget_type": "text", "default": "" },
|
|
15
|
+
{ "name": "pool", "type": "string", "widget_type": "text", "default": "none" },
|
|
16
|
+
{ "name": "secondary_pool", "type": "string", "widget_type": "text", "default": "" },
|
|
17
|
+
{ "name": "group", "type": "string", "widget_type": "text", "default": "none" },
|
|
18
|
+
{ "name": "priority", "type": "int", "widget_type": "int", "default": 50 },
|
|
19
|
+
{ "name": "chunk_size", "type": "int", "widget_type": "int", "default": 1 },
|
|
20
|
+
{ "name": "frame_start", "type": "int", "widget_type": "int", "default": 1 },
|
|
21
|
+
{ "name": "frame_end", "type": "int", "widget_type": "int", "default": 100 },
|
|
22
|
+
{ "name": "frame_step", "type": "int", "widget_type": "int", "default": 1 },
|
|
23
|
+
{ "name": "maya_version", "type": "string", "widget_type": "dropdown", "options": ["2022", "2024", "2025", "2026"], "default": "2024" },
|
|
24
|
+
{ "name": "renderer", "type": "string", "widget_type": "dropdown", "options": ["arnold", "vray", "redshift", "renderman", "mayaSoftware", "mayaHardware2"], "default": "arnold" },
|
|
25
|
+
{ "name": "project_path", "type": "string", "widget_type": "file", "default": "" },
|
|
26
|
+
{ "name": "output_path", "type": "string", "widget_type": "text", "default": "" },
|
|
27
|
+
{ "name": "output_prefix", "type": "string", "widget_type": "text", "default": "<Scene>" },
|
|
28
|
+
{ "name": "camera", "type": "string", "widget_type": "text", "default": "" },
|
|
29
|
+
{ "name": "strict_error_check","type": "bool", "widget_type": "checkbox", "default": false },
|
|
30
|
+
{ "name": "extra_job_args", "type": "string", "widget_type": "text_area","default": "" }
|
|
31
|
+
],
|
|
32
|
+
"outputs": [
|
|
33
|
+
{ "name": "exec_out", "type": "exec" },
|
|
34
|
+
{ "name": "success", "type": "bool" },
|
|
35
|
+
{ "name": "job_id", "type": "string" },
|
|
36
|
+
{ "name": "stdout", "type": "string" },
|
|
37
|
+
{ "name": "stderr", "type": "string" }
|
|
38
|
+
],
|
|
39
|
+
"python_code": "import subprocess, tempfile, os, re\n\ndef _get(inputs, self, key, default):\n v = inputs.get(key)\n return v if v is not None else self.get_parameter(key, default)\n\ndef _build_frame_list(start, end, step):\n if step <= 1:\n return f'{start}-{end}'\n return f'{start}-{end}x{step}'\n\ndef _parse_job_id(output):\n \"\"\"Extract JobID from deadlinecommand output.\"\"\"\n for line in output.splitlines():\n line = line.strip()\n if line.lower().startswith('jobid='):\n return line.split('=', 1)[1].strip()\n # fallback: look for a 24-hex-char string\n m = re.search(r'[0-9a-f]{24}', output)\n return m.group(0) if m else ''\n\nasync def _set_outputs(self, result):\n for k, v in result.items():\n await self.set_output(k, v)\n await self.set_output('exec_out', True)\n\nasync def execute(self, inputs):\n g = lambda key, default: _get(inputs, self, key, default)\n\n deadline_cmd = g('deadlinecommand', 'deadlinecommand')\n scene_file = g('scene_file', '')\n job_name = g('job_name', 'Maya Render Job')\n batch_name = g('batch_name', '')\n comment = g('comment', '')\n pool = g('pool', 'none')\n secondary_pool= g('secondary_pool', '')\n group = g('group', 'none')\n priority = int(g('priority', 50))\n chunk_size = int(g('chunk_size', 1))\n frame_start = int(g('frame_start', 1))\n frame_end = int(g('frame_end', 100))\n frame_step = int(g('frame_step', 1))\n maya_version = g('maya_version', '2024')\n renderer = g('renderer', 'arnold')\n project_path = g('project_path', '')\n output_path = g('output_path', '')\n output_prefix = g('output_prefix', '<Scene>')\n camera = g('camera', '')\n strict_error = bool(g('strict_error_check', False))\n extra_args = g('extra_job_args', '')\n\n if not scene_file:\n msg = 'scene_file is required'\n self.log_error(msg)\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': msg}\n await _set_outputs(self, result)\n return result\n\n frames = _build_frame_list(frame_start, frame_end, frame_step)\n\n # --- Build Job Info ---\n job_info_lines = [\n f'Plugin=MayaBatch',\n f'Name={job_name}',\n f'Comment={comment}',\n f'Pool={pool}',\n f'Group={group}',\n f'Priority={priority}',\n f'ChunkSize={chunk_size}',\n f'Frames={frames}',\n f'EnableAutoTimeout=False',\n f'TaskTimeoutMinutes=0',\n ]\n if batch_name:\n job_info_lines.append(f'BatchName={batch_name}')\n if secondary_pool:\n job_info_lines.append(f'SecondaryPool={secondary_pool}')\n # Output path from Deadline perspective (frame tokens handled by Maya plugin)\n if output_path:\n job_info_lines.append(f'OutputDirectory0={output_path}')\n # Extra user-supplied key=value lines\n for line in extra_args.splitlines():\n line = line.strip()\n if line and '=' in line:\n job_info_lines.append(line)\n\n # --- Build Maya Plugin Info ---\n plugin_info_lines = [\n f'Version={maya_version}',\n f'Renderer={renderer}',\n f'SceneFile={scene_file}',\n f'OutputFilePrefix={output_prefix}',\n f'StrictErrorChecking={str(strict_error)}',\n ]\n if project_path:\n plugin_info_lines.append(f'ProjectPath={project_path}')\n if output_path:\n plugin_info_lines.append(f'OutputFilePath={output_path}')\n if camera:\n plugin_info_lines.append(f'Camera={camera}')\n\n # Write temp files\n job_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='_job_info.txt', delete=False, encoding='utf-8')\n plugin_info_file= tempfile.NamedTemporaryFile(mode='w', suffix='_plugin_info.txt', delete=False, encoding='utf-8')\n try:\n job_info_file.write('\\n'.join(job_info_lines))\n job_info_file.close()\n plugin_info_file.write('\\n'.join(plugin_info_lines))\n plugin_info_file.close()\n\n cmd = [deadline_cmd, job_info_file.name, plugin_info_file.name]\n self.log_info(f'Submitting Maya job \"{job_name}\" to Deadline (frames {frames}, renderer={renderer})')\n self.log_info(f'Command: {\" \".join(cmd)}')\n\n proc = subprocess.run(cmd, capture_output=True, text=True, timeout=120)\n\n job_id = _parse_job_id(proc.stdout)\n ok = proc.returncode == 0 and ('Result=Success' in proc.stdout or job_id)\n\n if ok:\n self.log_info(f'Deadline submission successful. JobID: {job_id}')\n else:\n self.log_error(f'Deadline submission failed (exit {proc.returncode}): {proc.stderr or proc.stdout}')\n\n result = {'success': ok, 'job_id': job_id, 'stdout': proc.stdout, 'stderr': proc.stderr}\n await _set_outputs(self, result)\n return result\n except Exception as e:\n self.log_error(f'Deadline submit error: {e}')\n result = {'success': False, 'job_id': '', 'stdout': '', 'stderr': str(e)}\n await _set_outputs(self, result)\n return result\n finally:\n for f in [job_info_file.name, plugin_info_file.name]:\n try:\n os.unlink(f)\n except Exception:\n pass"
|
|
40
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "delay_timer",
|
|
3
|
+
"name": "Delay Timer",
|
|
4
|
+
"description": "Pauses execution for a specified duration (seconds).",
|
|
5
|
+
"category": "Control",
|
|
6
|
+
"icon_path": "icons/timer.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"name": "exec_in",
|
|
10
|
+
"type": "exec"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "delay",
|
|
14
|
+
"type": "float",
|
|
15
|
+
"widget_type": "float",
|
|
16
|
+
"default": 1.0
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"outputs": [
|
|
20
|
+
{
|
|
21
|
+
"name": "exec_out",
|
|
22
|
+
"type": "exec"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"python_code": "import asyncio\nasync def execute(self, inputs):\n delay = float(inputs.get('delay', 1.0))\n self.log_info(f\"Starting delay of {delay}s\")\n await asyncio.sleep(delay)\n self.log_success(\"Delay finished\")\n await self.set_output(\"exec_out\", True)\n return {}"
|
|
26
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "example_random_float",
|
|
3
|
+
"name": "Random Float",
|
|
4
|
+
"description": "Generates a random float between min and max.",
|
|
5
|
+
"category": "Math",
|
|
6
|
+
"icon_path": "icons/dice.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{
|
|
9
|
+
"name": "exec_in",
|
|
10
|
+
"type": "exec"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "min",
|
|
14
|
+
"type": "float",
|
|
15
|
+
"widget_type": "float"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "max",
|
|
19
|
+
"type": "float",
|
|
20
|
+
"widget_type": "float"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"outputs": [
|
|
24
|
+
{
|
|
25
|
+
"name": "exec_out",
|
|
26
|
+
"type": "exec"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "value",
|
|
30
|
+
"type": "float"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"icon_path": "icons/dice.svg",
|
|
34
|
+
"python_code": "import random\nasync def execute(self, inputs):\n mn_val = inputs.get('min')\n mx_val = inputs.get('max')\n \n mn = float(mn_val) if mn_val is not None else 0.0\n mx = float(mx_val) if mx_val is not None else 1.0\n \n res = random.uniform(mn, mx)\n await self.set_output('value', res)\n await self.set_output(\"exec_out\", True)\n return {'value': res}"
|
|
35
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node_id": "file_append",
|
|
3
|
+
"name": "Append File",
|
|
4
|
+
"description": "Append text to a file (creates if missing).",
|
|
5
|
+
"category": "File",
|
|
6
|
+
"icon_path": "icons/file-plus.svg",
|
|
7
|
+
"inputs": [
|
|
8
|
+
{ "name": "exec_in", "type": "exec" },
|
|
9
|
+
{ "name": "path", "type": "string", "widget_type": "text", "default": "" },
|
|
10
|
+
{ "name": "content", "type": "string", "widget_type": "text_area", "default": "" },
|
|
11
|
+
{ "name": "encoding", "type": "string", "widget_type": "text", "default": "utf-8" }
|
|
12
|
+
],
|
|
13
|
+
"outputs": [
|
|
14
|
+
{ "name": "exec_out", "type": "exec" },
|
|
15
|
+
{ "name": "result", "type": "bool" }
|
|
16
|
+
],
|
|
17
|
+
"python_code": "from pathlib import Path\n\nasync def execute(self, inputs):\n p = inputs.get('path') or self.get_parameter('path', '')\n content = inputs.get('content') if inputs.get('content') is not None else self.get_parameter('content', '')\n encoding = inputs.get('encoding') or self.get_parameter('encoding', 'utf-8')\n try:\n if not p:\n try: self.log_info('Append File: path is empty')\n except Exception: pass\n res = False\n else:\n path = Path(p)\n path.parent.mkdir(parents=True, exist_ok=True)\n with path.open('a', encoding=encoding) as f:\n f.write(str(content))\n res = True\n except Exception as e:\n try: self.log_info(f'Append File error: {e}')\n except Exception: pass\n res = False\n\n await self.set_output('result', res)\n await self.set_output('exec_out', True)\n return {'result': res}"
|
|
18
|
+
}
|