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.
Files changed (487) hide show
  1. src/core/__init__.py +0 -0
  2. src/core/engine.py +484 -0
  3. src/core/events.py +32 -0
  4. src/core/graph.py +74 -0
  5. src/core/integrity.py +925 -0
  6. src/core/loader.py +56 -0
  7. src/core/manifest.py +910 -0
  8. src/core/models.py +59 -0
  9. src/core/persistence.py +27 -0
  10. src/core/python_to_workflow.py +182 -0
  11. src/core/registry.py +314 -0
  12. src/core/workflow_to_python.py +801 -0
  13. src/main.py +188 -0
  14. src/models/__init__.py +0 -0
  15. src/nodes/__init__.py +0 -0
  16. src/nodes/ai/__init__.py +1 -0
  17. src/nodes/base.py +174 -0
  18. src/nodes/builtins/__init__.py +0 -0
  19. src/nodes/builtins/group_node.py +210 -0
  20. src/nodes/builtins/nodes.py +452 -0
  21. src/nodes/print.py +19 -0
  22. src/nodes/test.py +19 -0
  23. src/ui/__init__.py +0 -0
  24. src/ui/canvas/__init__.py +0 -0
  25. src/ui/canvas/backdrop.py +223 -0
  26. src/ui/canvas/canvas_search_bar.py +222 -0
  27. src/ui/canvas/edge.py +98 -0
  28. src/ui/canvas/mini_map.py +138 -0
  29. src/ui/canvas/node_search_popup.py +270 -0
  30. src/ui/canvas/scene.py +1149 -0
  31. src/ui/canvas/sticky_note.py +123 -0
  32. src/ui/canvas/view.py +285 -0
  33. src/ui/code_editor.py +435 -0
  34. src/ui/export_python_dialog.py +490 -0
  35. src/ui/gemini_api_dialog.py +41 -0
  36. src/ui/gemini_chat.py +370 -0
  37. src/ui/import_python_dialog.py +122 -0
  38. src/ui/library_panel.py +246 -0
  39. src/ui/log_panel.py +315 -0
  40. src/ui/node_builder.py +841 -0
  41. src/ui/node_widget.py +1009 -0
  42. src/ui/port_widget.py +116 -0
  43. src/ui/script_editor.py +53 -0
  44. src/ui/scripting_console.py +270 -0
  45. src/ui/settings_window.py +575 -0
  46. src/ui/window.py +2012 -0
  47. src/utils/color_manager.py +50 -0
  48. src/utils/config_manager.py +71 -0
  49. src/utils/env_manager.py +232 -0
  50. src/utils/highlighter.py +110 -0
  51. src/utils/paths.py +30 -0
  52. src/utils/prism_config.py +300 -0
  53. src/utils/prism_core.py +80 -0
  54. src/utils/qt_compat.py +159 -0
  55. src/utils/runtime.py +80 -0
  56. vibrante_node/CLA.md +96 -0
  57. vibrante_node/COMMERCIAL_LICENSE.md +170 -0
  58. vibrante_node/LICENSE +178 -0
  59. vibrante_node/LICENSES/AGPL-3.0.txt +661 -0
  60. vibrante_node/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
  61. vibrante_node/LICENSES/CC-BY-4.0.txt +396 -0
  62. vibrante_node/LICENSES/GPL-3.0.txt +674 -0
  63. vibrante_node/LICENSES/LGPL-3.0.txt +165 -0
  64. vibrante_node/LICENSES/README.md +65 -0
  65. vibrante_node/THIRD_PARTY_NOTICES.txt +3277 -0
  66. vibrante_node/__init__.py +2 -0
  67. vibrante_node/app.py +60 -0
  68. vibrante_node/docs/AUTOMATION_API.html +785 -0
  69. vibrante_node/docs/DEVELOPER.html +891 -0
  70. vibrante_node/docs/DOCUMENTATION.html +2761 -0
  71. vibrante_node/docs/LICENSE.txt +35 -0
  72. vibrante_node/docs/NODE_BUILDER_API.html +1155 -0
  73. vibrante_node/docs/RELEASE_v1.0.5.html +140 -0
  74. vibrante_node/docs/RELEASE_v1.1.0.html +163 -0
  75. vibrante_node/docs/RELEASE_v1.1.5.html +286 -0
  76. vibrante_node/docs/RELEASE_v1.2.0.html +175 -0
  77. vibrante_node/docs/RELEASE_v1.3.0.html +168 -0
  78. vibrante_node/docs/RELEASE_v1.4.0.html +160 -0
  79. vibrante_node/docs/RELEASE_v1.5.0.html +432 -0
  80. vibrante_node/docs/RELEASE_v1.6.0.html +293 -0
  81. vibrante_node/docs/RELEASE_v1.6.1.html +171 -0
  82. vibrante_node/docs/RELEASE_v1.7.0.html +270 -0
  83. vibrante_node/docs/RELEASE_v1.8.0.html +201 -0
  84. vibrante_node/docs/RELEASE_v1.8.1.html +124 -0
  85. vibrante_node/docs/RELEASE_v1.8.2.html +119 -0
  86. vibrante_node/docs/RELEASE_v1.8.3.html +125 -0
  87. vibrante_node/docs/RELEASE_v1.8.4.html +210 -0
  88. vibrante_node/docs/RELEASE_v1.8.5.html +223 -0
  89. vibrante_node/docs/RELEASE_v2.0.0.html +284 -0
  90. vibrante_node/docs/RELEASE_v2.1.0.html +259 -0
  91. vibrante_node/docs/RELEASE_v2.1.1.html +156 -0
  92. vibrante_node/docs/RELEASE_v2.2.0.html +369 -0
  93. vibrante_node/docs/RELEASE_v2.2.1.html +168 -0
  94. vibrante_node/docs/RELEASE_v2.3.0.html +185 -0
  95. vibrante_node/docs/RELEASE_v2.4.0.html +446 -0
  96. vibrante_node/docs/RELEASE_v2.5.0.html +478 -0
  97. vibrante_node/docs/RELEASE_v2.5.1.html +190 -0
  98. vibrante_node/docs/USER_GUIDE.html +1407 -0
  99. vibrante_node/docs/index.html +103 -0
  100. vibrante_node/docs/portal/01_introduction.html +1177 -0
  101. vibrante_node/docs/portal/02_getting_started.html +1267 -0
  102. vibrante_node/docs/portal/03_user_guide.html +1736 -0
  103. vibrante_node/docs/portal/04_workflow_tutorials.html +1473 -0
  104. vibrante_node/docs/portal/05_node_development.html +1562 -0
  105. vibrante_node/docs/portal/06_backend_architecture.html +1373 -0
  106. vibrante_node/docs/portal/07_frontend_architecture.html +1588 -0
  107. vibrante_node/docs/portal/08_api_reference.html +2336 -0
  108. vibrante_node/docs/portal/09_advanced_topics.html +1664 -0
  109. vibrante_node/docs/portal/10_contribution_guide.html +1263 -0
  110. vibrante_node/docs/portal/11_troubleshooting.html +1108 -0
  111. vibrante_node/docs/portal/12_examples_library.html +1498 -0
  112. vibrante_node/docs/portal/13_general_purpose_automation.html +1472 -0
  113. vibrante_node/docs/portal/14_custom_nodes_api.html +1960 -0
  114. vibrante_node/docs/portal/index.html +605 -0
  115. vibrante_node/docs/portal/integrations_blender.html +605 -0
  116. vibrante_node/docs/portal/integrations_deadline.html +536 -0
  117. vibrante_node/docs/portal/integrations_houdini.html +787 -0
  118. vibrante_node/docs/portal/integrations_maya.html +675 -0
  119. vibrante_node/docs/portal/integrations_prism.html +628 -0
  120. vibrante_node/docs/portal/search.json +1 -0
  121. vibrante_node/docs/validation.json +333 -0
  122. vibrante_node/examples/arnold_lighting/orchestration_notes.md +45 -0
  123. vibrante_node/examples/arnold_lighting/prompt.md +47 -0
  124. vibrante_node/examples/automation/01_linear_chain.py +10 -0
  125. vibrante_node/examples/automation/02_batch_update_prefix.py +8 -0
  126. vibrante_node/examples/automation/03_reset_scene.py +5 -0
  127. vibrante_node/examples/automation/04_batch_execution.py +9 -0
  128. vibrante_node/examples/automation/05_git_backup.py +6 -0
  129. vibrante_node/examples/automation/06_reset_math_nodes.py +12 -0
  130. vibrante_node/examples/automation/07_stress_test_grid.py +8 -0
  131. vibrante_node/examples/automation/08_scene_summary.py +8 -0
  132. vibrante_node/examples/automation/09_toggle_bools.py +8 -0
  133. vibrante_node/examples/automation/10_session_report.py +7 -0
  134. vibrante_node/examples/automation/11_simple_math_node.py +7 -0
  135. vibrante_node/examples/cinematic_camera/orchestration_notes.md +56 -0
  136. vibrante_node/examples/cinematic_camera/prompt.md +50 -0
  137. vibrante_node/examples/cinematic_explosion/orchestration_notes.md +76 -0
  138. vibrante_node/examples/cinematic_explosion/prompt.md +47 -0
  139. vibrante_node/examples/cinematic_explosion/review.md +75 -0
  140. vibrante_node/examples/dust_wave/orchestration_notes.md +43 -0
  141. vibrante_node/examples/dust_wave/prompt.md +40 -0
  142. vibrante_node/examples/nodes/async_delay.py +21 -0
  143. vibrante_node/examples/nodes/connection_logger.py +25 -0
  144. vibrante_node/examples/nodes/data_filter.py +19 -0
  145. vibrante_node/examples/nodes/dict_merge.py +20 -0
  146. vibrante_node/examples/nodes/dict_summary.py +21 -0
  147. vibrante_node/examples/nodes/dropdown_selector.py +29 -0
  148. vibrante_node/examples/nodes/env_reader.py +18 -0
  149. vibrante_node/examples/nodes/list_item_picker.py +85 -0
  150. vibrante_node/examples/nodes/list_stats.py +27 -0
  151. vibrante_node/examples/nodes/logic_threshold.py +23 -0
  152. vibrante_node/examples/nodes/math_square.py +30 -0
  153. vibrante_node/examples/nodes/random_list.py +18 -0
  154. vibrante_node/examples/nodes/reactive_config.py +24 -0
  155. vibrante_node/examples/nodes/safety_reset.py +31 -0
  156. vibrante_node/examples/nodes/string_reverse.py +16 -0
  157. vibrante_node/icons/210429_DeadlineFreeOn10RenderMachines.jpg +0 -0
  158. vibrante_node/icons/README.md +39 -0
  159. vibrante_node/icons/blender_icon.png +0 -0
  160. vibrante_node/icons/braces.png +0 -0
  161. vibrante_node/icons/braces.svg +1 -0
  162. vibrante_node/icons/builder.png +0 -0
  163. vibrante_node/icons/check.png +0 -0
  164. vibrante_node/icons/check.svg +1 -0
  165. vibrante_node/icons/chevron-right.svg +3 -0
  166. vibrante_node/icons/code.png +0 -0
  167. vibrante_node/icons/code.svg +4 -0
  168. vibrante_node/icons/computer-window.png +0 -0
  169. vibrante_node/icons/data.png +0 -0
  170. vibrante_node/icons/data.svg +5 -0
  171. vibrante_node/icons/database-search.png +0 -0
  172. vibrante_node/icons/database-search.svg +5 -0
  173. vibrante_node/icons/database-zap.png +0 -0
  174. vibrante_node/icons/database-zap.svg +5 -0
  175. vibrante_node/icons/database.png +0 -0
  176. vibrante_node/icons/database.svg +5 -0
  177. vibrante_node/icons/dice.png +0 -0
  178. vibrante_node/icons/dice.svg +1 -0
  179. vibrante_node/icons/divide.svg +5 -0
  180. vibrante_node/icons/file-input.svg +6 -0
  181. vibrante_node/icons/file-plus.png +0 -0
  182. vibrante_node/icons/file-plus.svg +6 -0
  183. vibrante_node/icons/file-text.png +0 -0
  184. vibrante_node/icons/file-text.svg +7 -0
  185. vibrante_node/icons/folder-plus.png +0 -0
  186. vibrante_node/icons/folder-plus.svg +5 -0
  187. vibrante_node/icons/folder.png +0 -0
  188. vibrante_node/icons/folder.svg +3 -0
  189. vibrante_node/icons/gear.png +0 -0
  190. vibrante_node/icons/gear.svg +1 -0
  191. vibrante_node/icons/git-branch.svg +6 -0
  192. vibrante_node/icons/hash.png +0 -0
  193. vibrante_node/icons/hash.svg +1 -0
  194. vibrante_node/icons/houdini.svg +4 -0
  195. vibrante_node/icons/houdini_icon.png +0 -0
  196. vibrante_node/icons/http.png +0 -0
  197. vibrante_node/icons/list-check.png +0 -0
  198. vibrante_node/icons/list-check.svg +7 -0
  199. vibrante_node/icons/list-plus.svg +10 -0
  200. vibrante_node/icons/list.png +0 -0
  201. vibrante_node/icons/list.svg +8 -0
  202. vibrante_node/icons/logic.png +0 -0
  203. vibrante_node/icons/logic.svg +7 -0
  204. vibrante_node/icons/math.png +0 -0
  205. vibrante_node/icons/math.svg +4 -0
  206. vibrante_node/icons/maya_icon.jpg +0 -0
  207. vibrante_node/icons/message.png +0 -0
  208. vibrante_node/icons/message.svg +3 -0
  209. vibrante_node/icons/minus.svg +3 -0
  210. vibrante_node/icons/multiply.png +0 -0
  211. vibrante_node/icons/multiply.svg +1 -0
  212. vibrante_node/icons/online-library.png +0 -0
  213. vibrante_node/icons/percentage.svg +5 -0
  214. vibrante_node/icons/plus.png +0 -0
  215. vibrante_node/icons/plus.svg +1 -0
  216. vibrante_node/icons/print.png +0 -0
  217. vibrante_node/icons/print.svg +5 -0
  218. vibrante_node/icons/prism_icon.png +0 -0
  219. vibrante_node/icons/refresh.svg +6 -0
  220. vibrante_node/icons/repeat.svg +6 -0
  221. vibrante_node/icons/scales.png +0 -0
  222. vibrante_node/icons/scales.svg +1 -0
  223. vibrante_node/icons/shuffle.svg +7 -0
  224. vibrante_node/icons/string.png +0 -0
  225. vibrante_node/icons/string.svg +5 -0
  226. vibrante_node/icons/terminal.png +0 -0
  227. vibrante_node/icons/terminal.svg +1 -0
  228. vibrante_node/icons/timer.png +0 -0
  229. vibrante_node/icons/timer.svg +4 -0
  230. vibrante_node/icons/toggle-switch.svg +5 -0
  231. vibrante_node/icons/uppercase.png +0 -0
  232. vibrante_node/icons/uppercase.svg +1 -0
  233. vibrante_node/icons/variable-get.svg +4 -0
  234. vibrante_node/icons/variable-set.svg +6 -0
  235. vibrante_node/icons/variable.png +0 -0
  236. vibrante_node/icons/variable.svg +5 -0
  237. vibrante_node/icons/vibrante-node-icon.png +0 -0
  238. vibrante_node/icons/vibrante-node-logo.png +0 -0
  239. vibrante_node/icons/vibrante-node-main_logo.png +0 -0
  240. vibrante_node/icons/vibrante-node-resize_main_logo.png +0 -0
  241. vibrante_node/logo.png +0 -0
  242. vibrante_node/mcp_cli.py +36 -0
  243. vibrante_node/node_examples/Split_String.json +35 -0
  244. vibrante_node/node_examples/async_delay.json +32 -0
  245. vibrante_node/node_examples/delay_timer.json +29 -0
  246. vibrante_node/node_examples/file_reader.json +29 -0
  247. vibrante_node/node_examples/fruit_selector.json +37 -0
  248. vibrante_node/node_examples/json_parser.json +29 -0
  249. vibrante_node/node_examples/line_counter.json +29 -0
  250. vibrante_node/node_examples/list_append.json +32 -0
  251. vibrante_node/node_examples/list_images_recursive.json +55 -0
  252. vibrante_node/node_examples/logic_and.json +34 -0
  253. vibrante_node/node_examples/logic_compare.json +36 -0
  254. vibrante_node/node_examples/math_abs.json +29 -0
  255. vibrante_node/node_examples/math_add.json +32 -0
  256. vibrante_node/node_examples/reactive_config.json +28 -0
  257. vibrante_node/node_examples/string_uppercase.json +29 -0
  258. vibrante_node/nodes/Dropdown_Selector.json +27 -0
  259. vibrante_node/nodes/add_integers.json +34 -0
  260. vibrante_node/nodes/blender_action_bake_animation.json +23 -0
  261. vibrante_node/nodes/blender_action_custom.json +21 -0
  262. vibrante_node/nodes/blender_action_export_alembic.json +22 -0
  263. vibrante_node/nodes/blender_action_export_fbx.json +23 -0
  264. vibrante_node/nodes/blender_action_export_gltf.json +21 -0
  265. vibrante_node/nodes/blender_action_export_obj.json +19 -0
  266. vibrante_node/nodes/blender_action_export_usd.json +23 -0
  267. vibrante_node/nodes/blender_action_import_alembic.json +18 -0
  268. vibrante_node/nodes/blender_action_import_fbx.json +18 -0
  269. vibrante_node/nodes/blender_action_import_gltf.json +18 -0
  270. vibrante_node/nodes/blender_action_import_obj.json +18 -0
  271. vibrante_node/nodes/blender_action_new_blend.json +18 -0
  272. vibrante_node/nodes/blender_action_open_blend.json +18 -0
  273. vibrante_node/nodes/blender_action_render.json +23 -0
  274. vibrante_node/nodes/blender_action_save_blend.json +18 -0
  275. vibrante_node/nodes/blender_action_scene_info.json +17 -0
  276. vibrante_node/nodes/blender_action_set_frame_range.json +20 -0
  277. vibrante_node/nodes/blender_action_set_render_settings.json +27 -0
  278. vibrante_node/nodes/blender_get_action_result.json +22 -0
  279. vibrante_node/nodes/blender_headless.json +86 -0
  280. vibrante_node/nodes/compare.json +48 -0
  281. vibrante_node/nodes/console_print.json +29 -0
  282. vibrante_node/nodes/create_dictionary.json +18 -0
  283. vibrante_node/nodes/create_folder.json +17 -0
  284. vibrante_node/nodes/create_list.json +18 -0
  285. vibrante_node/nodes/deadline_blender_submit.json +38 -0
  286. vibrante_node/nodes/deadline_houdini_submit.json +38 -0
  287. vibrante_node/nodes/deadline_job_status.json +28 -0
  288. vibrante_node/nodes/deadline_maya_submit.json +40 -0
  289. vibrante_node/nodes/delay_timer.json +26 -0
  290. vibrante_node/nodes/example_random_float.json +35 -0
  291. vibrante_node/nodes/file_append.json +18 -0
  292. vibrante_node/nodes/file_write.json +18 -0
  293. vibrante_node/nodes/for_loop.json +46 -0
  294. vibrante_node/nodes/get_dict_value.json +19 -0
  295. vibrante_node/nodes/get_list_item.json +19 -0
  296. vibrante_node/nodes/houdini_action_bake_animation.json +20 -0
  297. vibrante_node/nodes/houdini_action_custom.json +20 -0
  298. vibrante_node/nodes/houdini_action_export_alembic.json +20 -0
  299. vibrante_node/nodes/houdini_action_export_camera_alembic.json +20 -0
  300. vibrante_node/nodes/houdini_action_export_fbx.json +18 -0
  301. vibrante_node/nodes/houdini_action_import_alembic.json +18 -0
  302. vibrante_node/nodes/houdini_action_import_camera.json +17 -0
  303. vibrante_node/nodes/houdini_action_import_fbx.json +18 -0
  304. vibrante_node/nodes/houdini_action_import_obj.json +18 -0
  305. vibrante_node/nodes/houdini_action_new_hip.json +16 -0
  306. vibrante_node/nodes/houdini_action_open_hip.json +17 -0
  307. vibrante_node/nodes/houdini_action_save_hip.json +17 -0
  308. vibrante_node/nodes/houdini_action_scene_info.json +16 -0
  309. vibrante_node/nodes/houdini_action_set_frame_range.json +18 -0
  310. vibrante_node/nodes/houdini_get_action_result.json +21 -0
  311. vibrante_node/nodes/houdini_headless.json +85 -0
  312. vibrante_node/nodes/houdini_scene_snapshot.json +41 -0
  313. vibrante_node/nodes/http_request.json +76 -0
  314. vibrante_node/nodes/if_condition.json +45 -0
  315. vibrante_node/nodes/list_directory.json +17 -0
  316. vibrante_node/nodes/list_images_recursive.json +41 -0
  317. vibrante_node/nodes/list_item_picker.json +41 -0
  318. vibrante_node/nodes/list_length.json +17 -0
  319. vibrante_node/nodes/logical_gate.json +45 -0
  320. vibrante_node/nodes/loop_body.json +62 -0
  321. vibrante_node/nodes/math_add.json +17 -0
  322. vibrante_node/nodes/math_divide.json +17 -0
  323. vibrante_node/nodes/math_modulo.json +17 -0
  324. vibrante_node/nodes/math_multiply.json +36 -0
  325. vibrante_node/nodes/math_subtract.json +17 -0
  326. vibrante_node/nodes/maya_action_assign_material.json +18 -0
  327. vibrante_node/nodes/maya_action_bake_animation.json +21 -0
  328. vibrante_node/nodes/maya_action_create_render_layer.json +19 -0
  329. vibrante_node/nodes/maya_action_custom.json +20 -0
  330. vibrante_node/nodes/maya_action_export_alembic.json +22 -0
  331. vibrante_node/nodes/maya_action_export_camera_alembic.json +20 -0
  332. vibrante_node/nodes/maya_action_export_fbx.json +18 -0
  333. vibrante_node/nodes/maya_action_import_alembic.json +17 -0
  334. vibrante_node/nodes/maya_action_import_camera.json +17 -0
  335. vibrante_node/nodes/maya_action_import_fbx.json +17 -0
  336. vibrante_node/nodes/maya_action_import_obj.json +17 -0
  337. vibrante_node/nodes/maya_action_list_references.json +16 -0
  338. vibrante_node/nodes/maya_action_new_scene.json +16 -0
  339. vibrante_node/nodes/maya_action_open_scene.json +18 -0
  340. vibrante_node/nodes/maya_action_playblast.json +22 -0
  341. vibrante_node/nodes/maya_action_reference_alembic.json +18 -0
  342. vibrante_node/nodes/maya_action_reference_scene.json +18 -0
  343. vibrante_node/nodes/maya_action_save_scene.json +18 -0
  344. vibrante_node/nodes/maya_action_scene_info.json +16 -0
  345. vibrante_node/nodes/maya_action_set_aovs.json +18 -0
  346. vibrante_node/nodes/maya_action_set_frame_range.json +18 -0
  347. vibrante_node/nodes/maya_action_set_render_settings.json +23 -0
  348. vibrante_node/nodes/maya_get_action_result.json +21 -0
  349. vibrante_node/nodes/maya_headless.json +27 -0
  350. vibrante_node/nodes/mcp_call_tool.json +19 -0
  351. vibrante_node/nodes/mcp_list_tools.json +18 -0
  352. vibrante_node/nodes/mcp_server_init.json +23 -0
  353. vibrante_node/nodes/message_node.json +32 -0
  354. vibrante_node/nodes/prism_add_integration.json +49 -0
  355. vibrante_node/nodes/prism_build_entity.json +45 -0
  356. vibrante_node/nodes/prism_change_project.json +37 -0
  357. vibrante_node/nodes/prism_core_info.json +37 -0
  358. vibrante_node/nodes/prism_core_init.json +46 -0
  359. vibrante_node/nodes/prism_create_category.json +44 -0
  360. vibrante_node/nodes/prism_create_entity.json +60 -0
  361. vibrante_node/nodes/prism_create_playblast.json +56 -0
  362. vibrante_node/nodes/prism_create_product_version.json +64 -0
  363. vibrante_node/nodes/prism_create_project.json +50 -0
  364. vibrante_node/nodes/prism_create_scene_from_preset.json +59 -0
  365. vibrante_node/nodes/prism_eval.json +42 -0
  366. vibrante_node/nodes/prism_get_aovs.json +29 -0
  367. vibrante_node/nodes/prism_get_asset_by_name.json +69 -0
  368. vibrante_node/nodes/prism_get_asset_type_by_name.json +62 -0
  369. vibrante_node/nodes/prism_get_asset_types_by_project.json +55 -0
  370. vibrante_node/nodes/prism_get_assets_by_project.json +41 -0
  371. vibrante_node/nodes/prism_get_assets_by_type.json +69 -0
  372. vibrante_node/nodes/prism_get_config.json +48 -0
  373. vibrante_node/nodes/prism_get_current_scene.json +37 -0
  374. vibrante_node/nodes/prism_get_departments.json +37 -0
  375. vibrante_node/nodes/prism_get_entity_info.json +69 -0
  376. vibrante_node/nodes/prism_get_entity_path.json +69 -0
  377. vibrante_node/nodes/prism_get_export_path.json +26 -0
  378. vibrante_node/nodes/prism_get_latest_product_path.json +34 -0
  379. vibrante_node/nodes/prism_get_media.json +29 -0
  380. vibrante_node/nodes/prism_get_media_versions.json +33 -0
  381. vibrante_node/nodes/prism_get_plugin.json +35 -0
  382. vibrante_node/nodes/prism_get_preset_scenes.json +35 -0
  383. vibrante_node/nodes/prism_get_product_versions.json +33 -0
  384. vibrante_node/nodes/prism_get_products.json +29 -0
  385. vibrante_node/nodes/prism_get_project_by_name.json +55 -0
  386. vibrante_node/nodes/prism_get_project_config_path.json +26 -0
  387. vibrante_node/nodes/prism_get_scene_files.json +45 -0
  388. vibrante_node/nodes/prism_get_scene_path.json +23 -0
  389. vibrante_node/nodes/prism_get_sequence_by_project.json +48 -0
  390. vibrante_node/nodes/prism_get_sequences_by_project.json +41 -0
  391. vibrante_node/nodes/prism_get_shot_by_name.json +62 -0
  392. vibrante_node/nodes/prism_get_shot_by_sequence.json +55 -0
  393. vibrante_node/nodes/prism_get_shot_info.json +69 -0
  394. vibrante_node/nodes/prism_get_shots.json +29 -0
  395. vibrante_node/nodes/prism_get_shots_by_project_sequence.json +48 -0
  396. vibrante_node/nodes/prism_get_shots_by_sequence.json +48 -0
  397. vibrante_node/nodes/prism_get_tasks.json +39 -0
  398. vibrante_node/nodes/prism_import_product.json +37 -0
  399. vibrante_node/nodes/prism_list_plugins.json +25 -0
  400. vibrante_node/nodes/prism_list_projects.json +25 -0
  401. vibrante_node/nodes/prism_login_token.json +33 -0
  402. vibrante_node/nodes/prism_monkey_patch.json +46 -0
  403. vibrante_node/nodes/prism_open_scene.json +33 -0
  404. vibrante_node/nodes/prism_popup.json +40 -0
  405. vibrante_node/nodes/prism_register_callback.json +58 -0
  406. vibrante_node/nodes/prism_save_scene_version.json +90 -0
  407. vibrante_node/nodes/prism_send_cmd.json +54 -0
  408. vibrante_node/nodes/prism_set_config.json +55 -0
  409. vibrante_node/nodes/prism_studio_assign_project.json +43 -0
  410. vibrante_node/nodes/prism_trigger_callback.json +42 -0
  411. vibrante_node/nodes/prism_usd_department_layer_path.json +35 -0
  412. vibrante_node/nodes/prism_usd_entity_path.json +29 -0
  413. vibrante_node/nodes/prism_usd_sublayer_path.json +41 -0
  414. vibrante_node/nodes/prism_usd_update_department_layer.json +33 -0
  415. vibrante_node/nodes/prism_usd_update_sublayer.json +33 -0
  416. vibrante_node/nodes/python_script.json +17 -0
  417. vibrante_node/nodes/scene_intent_extractor.json +25 -0
  418. vibrante_node/nodes/set_dict_value.json +20 -0
  419. vibrante_node/nodes/string_concat.json +47 -0
  420. vibrante_node/nodes/string_length.json +16 -0
  421. vibrante_node/nodes/string_lowercase.json +16 -0
  422. vibrante_node/nodes/string_replace.json +18 -0
  423. vibrante_node/nodes/string_split.json +17 -0
  424. vibrante_node/nodes/string_uppercase.json +16 -0
  425. vibrante_node/nodes/variable_node.json +42 -0
  426. vibrante_node/nodes/while_loop.json +18 -0
  427. vibrante_node/splash.png +0 -0
  428. vibrante_node/vfx_workflows/01_prism_project_overview.json +492 -0
  429. vibrante_node/vfx_workflows/02_maya_asset_publish.json +776 -0
  430. vibrante_node/vfx_workflows/03_multi_shot_alembic_export.json +856 -0
  431. vibrante_node/vfx_workflows/04_deadline_render_pipeline.json +994 -0
  432. vibrante_node/vfx_workflows/05_houdini_fx_pipeline.json +1056 -0
  433. vibrante_node/vfx_workflows/06_blender_multi_format_export.json +1206 -0
  434. vibrante_node/website_examples/database_query.json +69 -0
  435. vibrante_node/website_examples/email_notification.json +104 -0
  436. vibrante_node/website_examples/file_batch_processor.json +62 -0
  437. vibrante_node/website_examples/folder_monitor.json +55 -0
  438. vibrante_node/website_examples/hou_sop_chain.json +69 -0
  439. vibrante_node/website_examples/http_request.json +90 -0
  440. vibrante_node/website_examples/image_resizer.json +90 -0
  441. vibrante_node/website_examples/llm_text_generation.json +90 -0
  442. vibrante_node/website_examples/prism_multi_asset_publisher.json +76 -0
  443. vibrante_node/website_examples/regex_replace.json +69 -0
  444. vibrante_node/workflows/If_condition.json +134 -0
  445. vibrante_node/workflows/Maya_WorkFlow.json +464 -0
  446. vibrante_node/workflows/asset_intelligence_pipeline.json +259 -0
  447. vibrante_node/workflows/concat_string_with_loop.json +262 -0
  448. vibrante_node/workflows/delay_time.json +74 -0
  449. vibrante_node/workflows/example_workflow_maya_prism_demo.json +503 -0
  450. vibrante_node/workflows/example_workflow_prism_demo.json +276 -0
  451. vibrante_node/workflows/example_workflow_prism_demo_02.json +221 -0
  452. vibrante_node/workflows/extract_FPS_from_maya_scene.json +265 -0
  453. vibrante_node/workflows/for_each.json +260 -0
  454. vibrante_node/workflows/get_list_item.json +151 -0
  455. vibrante_node/workflows/hou_mcp_scene_context_demo.json +67 -0
  456. vibrante_node/workflows/list_recursive_images.json +103 -0
  457. vibrante_node/workflows/logic_if_example.json +262 -0
  458. vibrante_node/workflows/logic_if_with_variables.json +210 -0
  459. vibrante_node/workflows/loop_break_example.json +197 -0
  460. vibrante_node/workflows/loop_operation_example.json +382 -0
  461. vibrante_node/workflows/mcp_list_tools_demo.json +90 -0
  462. vibrante_node/workflows/prism_assets_workflow.json +131 -0
  463. vibrante_node/workflows/python_script_node.json +89 -0
  464. vibrante_node/workflows/run_in_sequence.json +158 -0
  465. vibrante_node/workflows/scene_intent_pipeline.json +134 -0
  466. vibrante_node/workflows/scene_planning_pipeline.json +258 -0
  467. vibrante_node/workflows/semantic_scene_intent.json +96 -0
  468. vibrante_node/workflows/setup_maya_scene.json +352 -0
  469. vibrante_node/workflows/tutorial_maya_headless_prism_pipeline.json +593 -0
  470. vibrante_node/workflows/two_way_switch.json +341 -0
  471. vibrante_node/workflows/while_loop_class_example.json +192 -0
  472. vibrante_node/workflows/while_loop_example.json +184 -0
  473. vibrante_node/workflows/while_loop_retry_example.json +276 -0
  474. vibrante_node-2.5.1.dist-info/METADATA +715 -0
  475. vibrante_node-2.5.1.dist-info/RECORD +487 -0
  476. vibrante_node-2.5.1.dist-info/WHEEL +5 -0
  477. vibrante_node-2.5.1.dist-info/entry_points.txt +3 -0
  478. vibrante_node-2.5.1.dist-info/licenses/CLA.md +96 -0
  479. vibrante_node-2.5.1.dist-info/licenses/COMMERCIAL_LICENSE.md +170 -0
  480. vibrante_node-2.5.1.dist-info/licenses/LICENSE +178 -0
  481. vibrante_node-2.5.1.dist-info/licenses/LICENSES/AGPL-3.0.txt +661 -0
  482. vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0-SCOPE.md +53 -0
  483. vibrante_node-2.5.1.dist-info/licenses/LICENSES/CC-BY-4.0.txt +396 -0
  484. vibrante_node-2.5.1.dist-info/licenses/LICENSES/GPL-3.0.txt +674 -0
  485. vibrante_node-2.5.1.dist-info/licenses/LICENSES/LGPL-3.0.txt +165 -0
  486. vibrante_node-2.5.1.dist-info/licenses/LICENSES/README.md +65 -0
  487. vibrante_node-2.5.1.dist-info/top_level.txt +2 -0
@@ -0,0 +1,1498 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <meta name="description" content="Vibrante-Node v2.5.1 — Examples Library">
7
+ <title>Examples Library — Vibrante-Node Docs</title>
8
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/atom-one-dark.min.css">
9
+ <style>
10
+ /* ── Reset & Variables ─────────────────────────────────────────────────── */
11
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
12
+ :root {
13
+ --bg: #1e1e2e;
14
+ --surface: #181825;
15
+ --surface2: #11111b;
16
+ --border: #313244;
17
+ --text: #cdd6f4;
18
+ --subtext: #a6adc8;
19
+ --muted: #6c7086;
20
+ --lavender: #b4befe;
21
+ --blue: #89b4fa;
22
+ --teal: #94e2d5;
23
+ --green: #a6e3a1;
24
+ --yellow: #f9e2af;
25
+ --peach: #fab387;
26
+ --red: #f38ba8;
27
+ --pink: #f5c2e7;
28
+ --mauve: #cba6f7;
29
+ --sidebar-w: 260px;
30
+ --toc-w: 220px;
31
+ --header-h: 56px;
32
+ --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
33
+ --mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
34
+ }
35
+
36
+ /* ── Layout ─────────────────────────────────────────────────────────────── */
37
+ html { scroll-behavior: smooth; }
38
+ body {
39
+ font-family: var(--font);
40
+ background: var(--bg);
41
+ color: var(--text);
42
+ line-height: 1.7;
43
+ min-height: 100vh;
44
+ display: grid;
45
+ grid-template-rows: var(--header-h) 1fr;
46
+ grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
47
+ grid-template-areas:
48
+ "header header header"
49
+ "sidebar content toc";
50
+ }
51
+
52
+ /* ── Header ─────────────────────────────────────────────────────────────── */
53
+ .header {
54
+ grid-area: header;
55
+ position: sticky; top: 0; z-index: 200;
56
+ background: var(--surface2);
57
+ border-bottom: 1px solid var(--border);
58
+ display: flex; align-items: center; gap: 16px;
59
+ padding: 0 24px;
60
+ }
61
+ .header-logo {
62
+ font-weight: 700; font-size: 1.05em;
63
+ color: var(--mauve);
64
+ text-decoration: none;
65
+ white-space: nowrap;
66
+ }
67
+ .header-version {
68
+ font-size: .78em;
69
+ background: var(--border);
70
+ color: var(--subtext);
71
+ padding: 2px 8px; border-radius: 12px;
72
+ }
73
+ .header-spacer { flex: 1; }
74
+ .search-wrap { position: relative; }
75
+ #search-input {
76
+ background: var(--surface);
77
+ border: 1px solid var(--border);
78
+ border-radius: 8px;
79
+ color: var(--text);
80
+ font-family: var(--font);
81
+ font-size: .9em;
82
+ padding: 6px 14px 6px 36px;
83
+ width: 260px;
84
+ outline: none;
85
+ transition: border-color .15s;
86
+ }
87
+ #search-input:focus { border-color: var(--mauve); }
88
+ .search-icon {
89
+ position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
90
+ color: var(--muted); pointer-events: none; font-size: .9em;
91
+ }
92
+ #search-results {
93
+ position: absolute; top: calc(100% + 8px); right: 0;
94
+ width: 380px; max-height: 420px; overflow-y: auto;
95
+ background: var(--surface);
96
+ border: 1px solid var(--border);
97
+ border-radius: 10px;
98
+ box-shadow: 0 8px 32px rgba(0,0,0,.5);
99
+ display: none; z-index: 300;
100
+ }
101
+ #search-results.visible { display: block; }
102
+ .search-result-item {
103
+ padding: 10px 16px;
104
+ border-bottom: 1px solid var(--border);
105
+ cursor: pointer;
106
+ transition: background .1s;
107
+ }
108
+ .search-result-item:last-child { border-bottom: none; }
109
+ .search-result-item:hover { background: var(--bg); }
110
+ .search-result-title { color: var(--blue); font-weight: 600; font-size: .9em; }
111
+ .search-result-excerpt { color: var(--subtext); font-size: .82em; margin-top: 2px; line-height: 1.4; }
112
+ .search-no-results { padding: 16px; color: var(--muted); text-align: center; font-size: .9em; }
113
+
114
+ /* ── Sidebar ─────────────────────────────────────────────────────────────── */
115
+ .sidebar {
116
+ grid-area: sidebar;
117
+ position: sticky; top: var(--header-h);
118
+ height: calc(100vh - var(--header-h));
119
+ overflow-y: auto;
120
+ background: var(--surface);
121
+ border-right: 1px solid var(--border);
122
+ padding: 20px 0;
123
+ scrollbar-width: thin;
124
+ scrollbar-color: var(--border) transparent;
125
+ }
126
+ .sidebar::-webkit-scrollbar { width: 4px; }
127
+ .sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
128
+
129
+ .sidebar-group { margin-bottom: 4px; }
130
+ .sidebar-group-title {
131
+ font-size: .7em;
132
+ text-transform: uppercase;
133
+ letter-spacing: .1em;
134
+ color: var(--muted);
135
+ padding: 10px 20px 4px;
136
+ font-weight: 600;
137
+ }
138
+ .sidebar-link {
139
+ display: flex; align-items: center; gap: 8px;
140
+ padding: 6px 20px;
141
+ color: var(--subtext);
142
+ text-decoration: none;
143
+ font-size: .88em;
144
+ border-left: 3px solid transparent;
145
+ transition: all .12s;
146
+ line-height: 1.3;
147
+ }
148
+ .sidebar-link:hover { color: var(--text); background: var(--bg); }
149
+ .sidebar-link.active {
150
+ color: var(--mauve);
151
+ border-left-color: var(--mauve);
152
+ background: rgba(180,190,254,.06);
153
+ font-weight: 600;
154
+ }
155
+ .sidebar-num {
156
+ font-size: .7em;
157
+ color: var(--muted);
158
+ background: var(--border);
159
+ border-radius: 4px;
160
+ padding: 1px 5px;
161
+ flex-shrink: 0;
162
+ }
163
+ .sidebar-divider {
164
+ border: none;
165
+ border-top: 1px solid var(--border);
166
+ margin: 12px 16px;
167
+ }
168
+
169
+ /* ── Content ─────────────────────────────────────────────────────────────── */
170
+ .content {
171
+ grid-area: content;
172
+ min-width: 0;
173
+ padding: 40px 48px 80px;
174
+ max-width: 860px;
175
+ }
176
+ .content-inner { max-width: 820px; }
177
+
178
+ /* Breadcrumb */
179
+ .breadcrumb {
180
+ font-size: .8em;
181
+ color: var(--muted);
182
+ margin-bottom: 28px;
183
+ display: flex; align-items: center; gap: 6px;
184
+ }
185
+ .breadcrumb a { color: var(--blue); text-decoration: none; }
186
+ .breadcrumb a:hover { text-decoration: underline; }
187
+ .breadcrumb-sep { color: var(--border); }
188
+
189
+ /* Typography */
190
+ h1 { font-size: 2em; color: var(--mauve); border-bottom: 2px solid var(--border); padding-bottom: 12px; margin: 20px 0 20px; }
191
+ h2 { font-size: 1.45em; color: var(--blue); margin: 40px 0 14px; padding-top: 8px; }
192
+ h3 { font-size: 1.15em; color: var(--teal); margin: 28px 0 10px; }
193
+ h4 { font-size: 1em; color: var(--pink); margin: 20px 0 8px; }
194
+ h5 { font-size: .95em; color: var(--yellow); margin: 16px 0 6px; }
195
+ p { margin-bottom: 16px; color: var(--text); }
196
+ a { color: var(--blue); }
197
+ a:hover { text-decoration: underline; }
198
+ strong { color: var(--peach); }
199
+ em { color: var(--yellow); font-style: italic; }
200
+
201
+ ul, ol { margin: 10px 0 16px 24px; }
202
+ li { margin-bottom: 6px; }
203
+ li > ul, li > ol { margin-top: 4px; margin-bottom: 4px; }
204
+
205
+ blockquote {
206
+ border-left: 4px solid var(--mauve);
207
+ padding: 10px 20px;
208
+ margin: 16px 0;
209
+ background: rgba(180,190,254,.05);
210
+ border-radius: 0 8px 8px 0;
211
+ color: var(--subtext);
212
+ }
213
+ blockquote strong { color: var(--mauve); }
214
+
215
+ hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
216
+
217
+ /* Code */
218
+ code {
219
+ background: var(--surface2);
220
+ color: var(--red);
221
+ padding: 2px 7px; border-radius: 5px;
222
+ font-family: var(--mono); font-size: .87em;
223
+ }
224
+ pre {
225
+ background: var(--surface2) !important;
226
+ border: 1px solid var(--border);
227
+ border-radius: 10px;
228
+ padding: 20px 22px;
229
+ overflow-x: auto;
230
+ margin: 16px 0 22px;
231
+ position: relative;
232
+ }
233
+ pre code {
234
+ background: none !important;
235
+ color: inherit !important;
236
+ padding: 0; font-size: .9em;
237
+ border-radius: 0;
238
+ }
239
+ /* Copy button */
240
+ .copy-btn {
241
+ position: absolute; top: 10px; right: 12px;
242
+ background: var(--border);
243
+ color: var(--subtext);
244
+ border: none; border-radius: 5px;
245
+ padding: 3px 10px; font-size: .75em;
246
+ cursor: pointer; transition: all .12s;
247
+ font-family: var(--font);
248
+ }
249
+ .copy-btn:hover { background: var(--mauve); color: var(--surface2); }
250
+ .copy-btn.copied { background: var(--green); color: var(--surface2); }
251
+
252
+ /* Tables */
253
+ table { border-collapse: collapse; width: 100%; margin: 16px 0 22px; font-size: .9em; }
254
+ th { background: var(--border); color: var(--mauve); padding: 10px 14px; text-align: left; font-weight: 600; }
255
+ td { border-top: 1px solid var(--border); padding: 9px 14px; color: var(--text); }
256
+ tr:nth-child(even) td { background: rgba(17,17,27,.4); }
257
+ td code { font-size: .85em; }
258
+
259
+ /* Callout boxes */
260
+ .callout {
261
+ border-radius: 8px;
262
+ padding: 14px 18px;
263
+ margin: 16px 0 22px;
264
+ border-left: 4px solid;
265
+ }
266
+ .callout-note { background: rgba(137,180,250,.08); border-color: var(--blue); }
267
+ .callout-tip { background: rgba(166,227,161,.08); border-color: var(--green); }
268
+ .callout-warning { background: rgba(249,226,175,.08); border-color: var(--yellow); }
269
+ .callout-danger { background: rgba(243,139,168,.08); border-color: var(--red); }
270
+ .callout-title { font-weight: 700; font-size: .85em; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
271
+ .callout-note .callout-title { color: var(--blue); }
272
+ .callout-tip .callout-title { color: var(--green); }
273
+ .callout-warning .callout-title { color: var(--yellow); }
274
+ .callout-danger .callout-title { color: var(--red); }
275
+
276
+ /* Validation badges */
277
+ .val-badge {
278
+ display: inline-block; font-size: .78em; font-weight: 600;
279
+ padding: 4px 12px; border-radius: 20px; margin-bottom: 18px;
280
+ border: 1px solid transparent; letter-spacing: .02em;
281
+ }
282
+ .val-badge-ok { background: rgba(166,227,161,.12); border-color: var(--green); color: var(--green); }
283
+ .val-badge-warn { background: rgba(249,226,175,.12); border-color: var(--yellow); color: var(--yellow); }
284
+ .val-badge-error { background: rgba(243,139,168,.12); border-color: var(--red); color: var(--red); }
285
+ .val-badge-unknown { background: rgba(108,112,134,.12); border-color: #6c7086; color: #6c7086; }
286
+
287
+ /* Prev/Next navigation */
288
+ .page-nav {
289
+ display: flex; justify-content: space-between;
290
+ margin-top: 60px; padding-top: 24px;
291
+ border-top: 1px solid var(--border);
292
+ gap: 16px;
293
+ }
294
+ .page-nav-link {
295
+ display: flex; flex-direction: column;
296
+ text-decoration: none;
297
+ padding: 14px 20px;
298
+ background: var(--surface);
299
+ border: 1px solid var(--border);
300
+ border-radius: 10px;
301
+ min-width: 200px;
302
+ transition: border-color .15s;
303
+ max-width: 48%;
304
+ }
305
+ .page-nav-link:hover { border-color: var(--mauve); }
306
+ .page-nav-label { font-size: .75em; color: var(--muted); margin-bottom: 4px; }
307
+ .page-nav-title { color: var(--blue); font-weight: 600; font-size: .95em; }
308
+ .page-nav-link.prev .page-nav-label::before { content: '← '; }
309
+ .page-nav-link.next { margin-left: auto; text-align: right; }
310
+ .page-nav-link.next .page-nav-label::after { content: ' →'; }
311
+
312
+ /* ── TOC (right panel) ───────────────────────────────────────────────────── */
313
+ .toc {
314
+ grid-area: toc;
315
+ position: sticky; top: var(--header-h);
316
+ height: calc(100vh - var(--header-h));
317
+ overflow-y: auto;
318
+ padding: 28px 16px 28px 8px;
319
+ scrollbar-width: thin;
320
+ scrollbar-color: var(--border) transparent;
321
+ }
322
+ .toc-title {
323
+ font-size: .72em;
324
+ text-transform: uppercase;
325
+ letter-spacing: .1em;
326
+ color: var(--muted);
327
+ font-weight: 600;
328
+ margin-bottom: 12px;
329
+ padding-left: 8px;
330
+ }
331
+ .toc-link {
332
+ display: block;
333
+ padding: 4px 8px;
334
+ color: var(--subtext);
335
+ text-decoration: none;
336
+ font-size: .82em;
337
+ border-left: 2px solid transparent;
338
+ border-radius: 0 4px 4px 0;
339
+ transition: all .12s;
340
+ line-height: 1.35;
341
+ margin-bottom: 1px;
342
+ }
343
+ .toc-link:hover { color: var(--text); border-left-color: var(--border); }
344
+ .toc-link.active { color: var(--mauve); border-left-color: var(--mauve); background: rgba(180,190,254,.05); }
345
+ .toc-link.toc-h3 { padding-left: 20px; font-size: .79em; }
346
+ .toc-link.toc-h4 { padding-left: 32px; font-size: .76em; color: var(--muted); }
347
+
348
+ /* ── Responsive ──────────────────────────────────────────────────────────── */
349
+ @media (max-width: 1100px) {
350
+ body { grid-template-columns: var(--sidebar-w) 1fr 0; }
351
+ .toc { display: none; }
352
+ }
353
+ @media (max-width: 760px) {
354
+ body { grid-template-columns: 0 1fr 0; grid-template-rows: var(--header-h) 1fr; }
355
+ .sidebar { display: none; }
356
+ .content { padding: 24px 20px 60px; }
357
+ #search-input { width: 180px; }
358
+ }
359
+
360
+ /* ── Index / landing page ────────────────────────────────────────────────── */
361
+ .hero { text-align: center; padding: 60px 0 48px; }
362
+ .hero h1 { border: none; font-size: 2.8em; }
363
+ .hero .tagline { color: var(--subtext); font-size: 1.15em; margin-top: 10px; }
364
+ .hero .version-badge {
365
+ display: inline-block;
366
+ background: var(--border); color: var(--mauve);
367
+ padding: 4px 14px; border-radius: 20px; font-size: .85em;
368
+ margin-top: 14px;
369
+ }
370
+ .group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0 36px; }
371
+ .doc-card {
372
+ background: var(--surface);
373
+ border: 1px solid var(--border);
374
+ border-radius: 12px;
375
+ padding: 20px 24px;
376
+ text-decoration: none;
377
+ color: var(--text);
378
+ transition: border-color .15s, background .15s;
379
+ display: block;
380
+ }
381
+ .doc-card:hover { border-color: var(--mauve); background: rgba(180,190,254,.04); }
382
+ .doc-card-num { font-size: .72em; color: var(--muted); margin-bottom: 4px; }
383
+ .doc-card-title { color: var(--blue); font-weight: 700; font-size: 1em; margin-bottom: 6px; }
384
+ .doc-card-desc { color: var(--subtext); font-size: .85em; line-height: 1.5; }
385
+ .group-title { color: var(--teal); font-size: 1.1em; font-weight: 600; margin: 32px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
386
+ </style>
387
+ <span id="portal-base" data-base="" style="display:none"></span>
388
+ </head>
389
+ <body>
390
+
391
+ <!-- ── Header ─────────────────────────────────────────────────────────── -->
392
+ <header class="header">
393
+ <a class="header-logo" href="index.html">Vibrante-Node</a>
394
+ <span class="header-version">v2.5.1</span>
395
+ <div class="header-spacer"></div>
396
+ <div class="search-wrap">
397
+ <span class="search-icon">&#128269;</span>
398
+ <input id="search-input" type="text" placeholder="Search docs… (/)" autocomplete="off" spellcheck="false">
399
+ <div id="search-results"></div>
400
+ </div>
401
+ </header>
402
+
403
+ <!-- ── Sidebar ────────────────────────────────────────────────────────── -->
404
+ <nav class="sidebar">
405
+ <div class="sidebar-group">
406
+ <div class="sidebar-group-title">Overview</div>
407
+ <a class="sidebar-link" href="01_introduction.html"><span class="sidebar-num">01</span>Introduction</a>
408
+ <a class="sidebar-link" href="02_getting_started.html"><span class="sidebar-num">02</span>Getting Started</a>
409
+ </div>
410
+ <div class="sidebar-group">
411
+ <div class="sidebar-group-title">Using the App</div>
412
+ <a class="sidebar-link" href="03_user_guide.html"><span class="sidebar-num">03</span>User Guide</a>
413
+ <a class="sidebar-link" href="04_workflow_tutorials.html"><span class="sidebar-num">04</span>Workflow Tutorials</a>
414
+ </div>
415
+ <div class="sidebar-group">
416
+ <div class="sidebar-group-title">Developing Nodes</div>
417
+ <a class="sidebar-link" href="05_node_development.html"><span class="sidebar-num">05</span>Node Development Guide</a>
418
+ <a class="sidebar-link" href="14_custom_nodes_api.html"><span class="sidebar-num">14</span>Custom Nodes API</a>
419
+ <a class="sidebar-link" href="08_api_reference.html"><span class="sidebar-num">08</span>API Reference</a>
420
+ </div>
421
+ <div class="sidebar-group">
422
+ <div class="sidebar-group-title">Architecture</div>
423
+ <a class="sidebar-link" href="06_backend_architecture.html"><span class="sidebar-num">06</span>Backend Architecture</a>
424
+ <a class="sidebar-link" href="07_frontend_architecture.html"><span class="sidebar-num">07</span>Frontend Architecture</a>
425
+ </div>
426
+ <div class="sidebar-group">
427
+ <div class="sidebar-group-title">Advanced</div>
428
+ <a class="sidebar-link" href="09_advanced_topics.html"><span class="sidebar-num">09</span>Advanced Topics</a>
429
+ <a class="sidebar-link" href="10_contribution_guide.html"><span class="sidebar-num">10</span>Contribution Guide</a>
430
+ </div>
431
+ <div class="sidebar-group">
432
+ <div class="sidebar-group-title">Reference</div>
433
+ <a class="sidebar-link" href="11_troubleshooting.html"><span class="sidebar-num">11</span>Troubleshooting</a>
434
+ <a class="sidebar-link active" href="12_examples_library.html"><span class="sidebar-num">12</span>Examples Library</a>
435
+ <a class="sidebar-link" href="13_general_purpose_automation.html"><span class="sidebar-num">13</span>General Purpose Automation</a>
436
+ </div>
437
+
438
+ </nav>
439
+
440
+ <!-- ── Main content ───────────────────────────────────────────────────── -->
441
+ <main class="content">
442
+ <div class="content-inner">
443
+ <nav class="breadcrumb"><a href="index.html">Docs</a><span class="breadcrumb-sep">›</span><span>Examples Library</span></nav>
444
+ <div class="val-badge val-badge-ok" title="Verified against source code">&#10003; Verified</div>
445
+ <p># Examples Library</p>
446
+ <p>This chapter provides ten complete, copy-paste-ready node examples. Each example includes the full JSON node definition, the Python code, and a usage guide. All examples follow the node authoring conventions described in the Contribution Guide.</p>
447
+ <hr />
448
+ <h2 id="example-1-custom-string-processor-node">Example 1: Custom String Processor Node</h2>
449
+ <p><strong>Description:</strong> Takes a string input and a regex pattern, replaces all matches with a replacement string, and outputs the modified result along with the count of substitutions made.</p>
450
+ <h3 id="node-json">Node JSON</h3>
451
+ <pre><code class="language-json">{
452
+ &quot;node_id&quot;: &quot;regex_replace&quot;,
453
+ &quot;name&quot;: &quot;regex_replace&quot;,
454
+ &quot;description&quot;: &quot;Replace all regex matches in a string with a substitution value.&quot;,
455
+ &quot;category&quot;: &quot;String&quot;,
456
+ &quot;icon_path&quot;: null,
457
+ &quot;use_exec&quot;: true,
458
+ &quot;inputs&quot;: [
459
+ { &quot;name&quot;: &quot;exec_in&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
460
+ { &quot;name&quot;: &quot;text&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
461
+ { &quot;name&quot;: &quot;pattern&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
462
+ { &quot;name&quot;: &quot;replacement&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
463
+ { &quot;name&quot;: &quot;ignore_case&quot;, &quot;type&quot;: &quot;bool&quot;, &quot;widget_type&quot;: &quot;checkbox&quot;, &quot;options&quot;: null, &quot;default&quot;: false }
464
+ ],
465
+ &quot;outputs&quot;: [
466
+ { &quot;name&quot;: &quot;result&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
467
+ { &quot;name&quot;: &quot;match_count&quot;, &quot;type&quot;: &quot;int&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
468
+ { &quot;name&quot;: &quot;exec_out&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
469
+ ],
470
+ &quot;python_code&quot;: &quot;...&quot;
471
+ }
472
+ </code></pre>
473
+ <h3 id="python-code">Python Code</h3>
474
+ <pre><code class="language-python">import re
475
+ from src.nodes.base import BaseNode
476
+
477
+
478
+ class Regex_Replace(BaseNode):
479
+ name = &quot;regex_replace&quot;
480
+
481
+ def __init__(self):
482
+ super().__init__()
483
+ # [AUTO-GENERATED-PORTS-START]
484
+ self.add_input(&quot;text&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
485
+ self.add_input(&quot;pattern&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
486
+ self.add_input(&quot;replacement&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
487
+ self.add_input(&quot;ignore_case&quot;, &quot;bool&quot;, widget_type=&quot;checkbox&quot;, default=False)
488
+ self.add_output(&quot;result&quot;, &quot;string&quot;)
489
+ self.add_output(&quot;match_count&quot;, &quot;int&quot;)
490
+ # [AUTO-GENERATED-PORTS-END]
491
+
492
+ async def execute(self, inputs: dict) -&gt; dict:
493
+ text = inputs.get(&quot;text&quot;, &quot;&quot;)
494
+ pattern = inputs.get(&quot;pattern&quot;, &quot;&quot;)
495
+ replacement = inputs.get(&quot;replacement&quot;, &quot;&quot;)
496
+ ignore_case = inputs.get(&quot;ignore_case&quot;, False)
497
+
498
+ if not pattern:
499
+ return {&quot;result&quot;: text, &quot;match_count&quot;: 0, &quot;exec_out&quot;: True}
500
+
501
+ flags = re.IGNORECASE if ignore_case else 0
502
+
503
+ try:
504
+ compiled = re.compile(pattern, flags)
505
+ matches = compiled.findall(text)
506
+ result = compiled.sub(replacement, text)
507
+ return {
508
+ &quot;result&quot;: result,
509
+ &quot;match_count&quot;: len(matches),
510
+ &quot;exec_out&quot;: True,
511
+ }
512
+ except re.error as e:
513
+ self.log_error(f&quot;Invalid regex pattern '{pattern}': {e}&quot;)
514
+ return {&quot;result&quot;: text, &quot;match_count&quot;: 0, &quot;exec_out&quot;: True}
515
+
516
+
517
+ def register_node():
518
+ return Regex_Replace
519
+ </code></pre>
520
+ <h3 id="usage">Usage</h3>
521
+ <ol>
522
+ <li>Wire a string value into <code>text</code>.</li>
523
+ <li>Set <code>pattern</code> to a Python regex (e.g., <code>\b\d{4}\b</code> to find 4-digit numbers).</li>
524
+ <li>Set <code>replacement</code> to the substitution string (supports back-references: <code>\1</code>).</li>
525
+ <li>Enable <code>ignore_case</code> for case-insensitive matching.</li>
526
+ <li><code>result</code> carries the modified string; <code>match_count</code> carries how many substitutions were made.</li>
527
+ </ol>
528
+ <hr />
529
+ <h2 id="example-2-http-api-request-node">Example 2: HTTP API Request Node</h2>
530
+ <p><strong>Description:</strong> Makes an async HTTP GET or POST request, handles JSON or text responses, and outputs the parsed data. Uses <code>urllib.request</code> in a thread executor (<code>loop.run_in_executor</code>) for non-blocking I/O — compatible with Vibrante-Node's QTimer-stepped asyncio event loop.</p>
531
+ <h3 id="node-json_1">Node JSON</h3>
532
+ <pre><code class="language-json">{
533
+ &quot;node_id&quot;: &quot;http_request&quot;,
534
+ &quot;name&quot;: &quot;http_request&quot;,
535
+ &quot;description&quot;: &quot;Async HTTP GET or POST request with optional JSON body and headers.&quot;,
536
+ &quot;category&quot;: &quot;Network&quot;,
537
+ &quot;icon_path&quot;: null,
538
+ &quot;use_exec&quot;: true,
539
+ &quot;inputs&quot;: [
540
+ { &quot;name&quot;: &quot;exec_in&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
541
+ { &quot;name&quot;: &quot;url&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;&quot; },
542
+ { &quot;name&quot;: &quot;method&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: &quot;text&quot;, &quot;options&quot;: null, &quot;default&quot;: &quot;GET&quot; },
543
+ { &quot;name&quot;: &quot;headers&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
544
+ { &quot;name&quot;: &quot;body&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
545
+ { &quot;name&quot;: &quot;timeout&quot;, &quot;type&quot;: &quot;int&quot;, &quot;widget_type&quot;: &quot;int&quot;, &quot;options&quot;: null, &quot;default&quot;: 30 }
546
+ ],
547
+ &quot;outputs&quot;: [
548
+ { &quot;name&quot;: &quot;response_data&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
549
+ { &quot;name&quot;: &quot;status_code&quot;, &quot;type&quot;: &quot;int&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
550
+ { &quot;name&quot;: &quot;response_text&quot;, &quot;type&quot;: &quot;string&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
551
+ { &quot;name&quot;: &quot;success&quot;, &quot;type&quot;: &quot;bool&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null },
552
+ { &quot;name&quot;: &quot;exec_out&quot;, &quot;type&quot;: &quot;any&quot;, &quot;widget_type&quot;: null, &quot;options&quot;: null, &quot;default&quot;: null }
553
+ ],
554
+ &quot;python_code&quot;: &quot;...&quot;
555
+ }
556
+ </code></pre>
557
+ <h3 id="python-code_1">Python Code</h3>
558
+ <pre><code class="language-python">import json
559
+ import asyncio
560
+ from src.nodes.base import BaseNode
561
+
562
+
563
+ class Http_Request(BaseNode):
564
+ name = &quot;http_request&quot;
565
+
566
+ def __init__(self):
567
+ super().__init__()
568
+ # [AUTO-GENERATED-PORTS-START]
569
+ self.add_input(&quot;url&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
570
+ self.add_input(&quot;method&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;GET&quot;)
571
+ self.add_input(&quot;headers&quot;, &quot;any&quot;, default=None)
572
+ self.add_input(&quot;body&quot;, &quot;any&quot;, default=None)
573
+ self.add_input(&quot;timeout&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=30)
574
+ self.add_output(&quot;response_data&quot;, &quot;any&quot;)
575
+ self.add_output(&quot;status_code&quot;, &quot;int&quot;)
576
+ self.add_output(&quot;response_text&quot;, &quot;string&quot;)
577
+ self.add_output(&quot;success&quot;, &quot;bool&quot;)
578
+ # [AUTO-GENERATED-PORTS-END]
579
+
580
+ async def execute(self, inputs: dict) -&gt; dict:
581
+ import urllib.request
582
+ import urllib.error
583
+
584
+ url = inputs.get(&quot;url&quot;, &quot;&quot;)
585
+ method = (inputs.get(&quot;method&quot;) or &quot;GET&quot;).upper()
586
+ headers = dict(inputs.get(&quot;headers&quot;) or {})
587
+ body = inputs.get(&quot;body&quot;)
588
+ timeout = int(inputs.get(&quot;timeout&quot;) or 30)
589
+
590
+ if not url:
591
+ self.log_error(&quot;No URL provided.&quot;)
592
+ return {&quot;response_data&quot;: None, &quot;status_code&quot;: 0,
593
+ &quot;response_text&quot;: &quot;&quot;, &quot;success&quot;: False, &quot;exec_out&quot;: True}
594
+
595
+ body_bytes = None
596
+ if body is not None:
597
+ body_str = json.dumps(body) if isinstance(body, (dict, list)) else str(body)
598
+ body_bytes = body_str.encode(&quot;utf-8&quot;)
599
+ headers.setdefault(&quot;Content-Type&quot;, &quot;application/json&quot;)
600
+
601
+ req = urllib.request.Request(url, data=body_bytes, headers=headers, method=method)
602
+
603
+ def _sync_do():
604
+ try:
605
+ with urllib.request.urlopen(req, timeout=timeout) as resp:
606
+ return resp.status, resp.read().decode(&quot;utf-8&quot;)
607
+ except urllib.error.HTTPError as e:
608
+ return e.code, e.read().decode(&quot;utf-8&quot;, errors=&quot;replace&quot;)
609
+
610
+ loop = asyncio.get_running_loop()
611
+ try:
612
+ status, text = await loop.run_in_executor(None, _sync_do)
613
+ try:
614
+ data = json.loads(text)
615
+ except (json.JSONDecodeError, ValueError):
616
+ data = text
617
+ return {
618
+ &quot;response_data&quot;: data,
619
+ &quot;status_code&quot;: status,
620
+ &quot;response_text&quot;: text,
621
+ &quot;success&quot;: 200 &lt;= status &lt; 300,
622
+ &quot;exec_out&quot;: True,
623
+ }
624
+ except Exception as e:
625
+ self.log_error(f&quot;HTTP request failed: {e}&quot;)
626
+ return {&quot;response_data&quot;: None, &quot;status_code&quot;: 0,
627
+ &quot;response_text&quot;: str(e), &quot;success&quot;: False, &quot;exec_out&quot;: True}
628
+
629
+
630
+ def register_node():
631
+ return Http_Request
632
+ </code></pre>
633
+ <h3 id="usage_1">Usage</h3>
634
+ <ul>
635
+ <li>Set <code>url</code> to any REST endpoint.</li>
636
+ <li>Set <code>method</code> to <code>GET</code>, <code>POST</code>, <code>PUT</code>, or <code>DELETE</code>.</li>
637
+ <li>Wire a dict into <code>headers</code> for custom headers (e.g., <code>{"Authorization": "Bearer token"}</code>).</li>
638
+ <li>Wire a dict or list into <code>body</code> for POST requests — it is automatically JSON-encoded.</li>
639
+ <li>Check <code>success</code> with a TwoWaySwitch to branch on HTTP errors.</li>
640
+ </ul>
641
+ <hr />
642
+ <h2 id="example-3-file-batch-processor-node">Example 3: File Batch Processor Node</h2>
643
+ <p><strong>Description:</strong> Scans a folder for files matching a glob pattern and outputs a list of matching absolute paths. Optionally recurses into subdirectories.</p>
644
+ <h3 id="python-code_2">Python Code</h3>
645
+ <pre><code class="language-python">import glob
646
+ import os
647
+ import asyncio
648
+ from src.nodes.base import BaseNode
649
+
650
+
651
+ class File_Batch_Processor(BaseNode):
652
+ name = &quot;file_batch_processor&quot;
653
+
654
+ def __init__(self):
655
+ super().__init__()
656
+ # [AUTO-GENERATED-PORTS-START]
657
+ self.add_input(&quot;folder_path&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
658
+ self.add_input(&quot;pattern&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;*&quot;)
659
+ self.add_input(&quot;recursive&quot;, &quot;bool&quot;, widget_type=&quot;checkbox&quot;, default=False)
660
+ self.add_output(&quot;file_list&quot;, &quot;list&quot;)
661
+ self.add_output(&quot;file_count&quot;, &quot;int&quot;)
662
+ # [AUTO-GENERATED-PORTS-END]
663
+
664
+ async def execute(self, inputs: dict) -&gt; dict:
665
+ folder = inputs.get(&quot;folder_path&quot;, &quot;&quot;)
666
+ pattern = inputs.get(&quot;pattern&quot;, &quot;*&quot;)
667
+ recursive = inputs.get(&quot;recursive&quot;, False)
668
+
669
+ if not folder:
670
+ self.log_error(&quot;No folder path provided.&quot;)
671
+ return {&quot;file_list&quot;: [], &quot;file_count&quot;: 0, &quot;exec_out&quot;: True}
672
+
673
+ folder = os.path.abspath(folder)
674
+
675
+ if not os.path.isdir(folder):
676
+ self.log_error(f&quot;Folder does not exist: {folder}&quot;)
677
+ return {&quot;file_list&quot;: [], &quot;file_count&quot;: 0, &quot;exec_out&quot;: True}
678
+
679
+ def _scan():
680
+ if recursive:
681
+ glob_pattern = os.path.join(folder, &quot;**&quot;, pattern)
682
+ paths = glob.glob(glob_pattern, recursive=True)
683
+ else:
684
+ glob_pattern = os.path.join(folder, pattern)
685
+ paths = glob.glob(glob_pattern)
686
+ return sorted(p for p in paths if os.path.isfile(p))
687
+
688
+ file_list = await asyncio.to_thread(_scan)
689
+
690
+ self.log_info(f&quot;Found {len(file_list)} file(s) matching '{pattern}' in {folder}&quot;)
691
+ return {
692
+ &quot;file_list&quot;: file_list,
693
+ &quot;file_count&quot;: len(file_list),
694
+ &quot;exec_out&quot;: True,
695
+ }
696
+
697
+
698
+ def register_node():
699
+ return File_Batch_Processor
700
+ </code></pre>
701
+ <h3 id="usage_2">Usage</h3>
702
+ <ul>
703
+ <li>Set <code>folder_path</code> to an absolute directory path.</li>
704
+ <li>Set <code>pattern</code> to a glob like <code>*.png</code>, <code>*.{jpg,jpeg,png}</code>, or <code>render_*_beauty.exr</code>.</li>
705
+ <li>Enable <code>recursive</code> to search all subdirectories.</li>
706
+ <li>Connect <code>file_list</code> to a ForEach node to process each file individually.</li>
707
+ </ul>
708
+ <hr />
709
+ <h2 id="example-4-email-notification-node">Example 4: Email Notification Node</h2>
710
+ <p><strong>Description:</strong> Sends an email via SMTP. Supports TLS, configurable sender/recipient, subject and body. Ideal as a final step in an automation pipeline to notify on completion or failure.</p>
711
+ <h3 id="python-code_3">Python Code</h3>
712
+ <pre><code class="language-python">import asyncio
713
+ import smtplib
714
+ import ssl
715
+ from email.mime.text import MIMEText
716
+ from email.mime.multipart import MIMEMultipart
717
+ from src.nodes.base import BaseNode
718
+
719
+
720
+ class Email_Notification(BaseNode):
721
+ name = &quot;email_notification&quot;
722
+
723
+ def __init__(self):
724
+ super().__init__()
725
+ # [AUTO-GENERATED-PORTS-START]
726
+ self.add_input(&quot;smtp_host&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;smtp.gmail.com&quot;)
727
+ self.add_input(&quot;smtp_port&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=587)
728
+ self.add_input(&quot;username&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
729
+ self.add_input(&quot;password&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
730
+ self.add_input(&quot;from_addr&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
731
+ self.add_input(&quot;to_addr&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
732
+ self.add_input(&quot;subject&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
733
+ self.add_input(&quot;body&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
734
+ self.add_input(&quot;use_tls&quot;, &quot;bool&quot;, widget_type=&quot;checkbox&quot;, default=True)
735
+ self.add_output(&quot;sent&quot;, &quot;bool&quot;)
736
+ self.add_output(&quot;error_msg&quot;, &quot;string&quot;)
737
+ # [AUTO-GENERATED-PORTS-END]
738
+
739
+ async def execute(self, inputs: dict) -&gt; dict:
740
+ host = inputs.get(&quot;smtp_host&quot;, &quot;&quot;)
741
+ port = int(inputs.get(&quot;smtp_port&quot;) or 587)
742
+ username = inputs.get(&quot;username&quot;, &quot;&quot;)
743
+ password = inputs.get(&quot;password&quot;, &quot;&quot;)
744
+ from_addr = inputs.get(&quot;from_addr&quot;, &quot;&quot;) or username
745
+ to_addr = inputs.get(&quot;to_addr&quot;, &quot;&quot;)
746
+ subject = inputs.get(&quot;subject&quot;, &quot;(no subject)&quot;)
747
+ body = inputs.get(&quot;body&quot;, &quot;&quot;)
748
+ use_tls = inputs.get(&quot;use_tls&quot;, True)
749
+
750
+ if not host or not to_addr:
751
+ self.log_error(&quot;smtp_host and to_addr are required.&quot;)
752
+ return {&quot;sent&quot;: False, &quot;error_msg&quot;: &quot;Missing host or recipient.&quot;, &quot;exec_out&quot;: True}
753
+
754
+ def _send():
755
+ msg = MIMEMultipart(&quot;alternative&quot;)
756
+ msg[&quot;Subject&quot;] = subject
757
+ msg[&quot;From&quot;] = from_addr
758
+ msg[&quot;To&quot;] = to_addr
759
+ msg.attach(MIMEText(body, &quot;plain&quot;))
760
+
761
+ context = ssl.create_default_context()
762
+
763
+ if use_tls:
764
+ with smtplib.SMTP(host, port) as server:
765
+ server.ehlo()
766
+ server.starttls(context=context)
767
+ if username:
768
+ server.login(username, password)
769
+ server.sendmail(from_addr, to_addr, msg.as_string())
770
+ else:
771
+ with smtplib.SMTP_SSL(host, port, context=context) as server:
772
+ if username:
773
+ server.login(username, password)
774
+ server.sendmail(from_addr, to_addr, msg.as_string())
775
+
776
+ try:
777
+ await asyncio.to_thread(_send)
778
+ self.log_info(f&quot;Email sent to {to_addr}: {subject}&quot;)
779
+ return {&quot;sent&quot;: True, &quot;error_msg&quot;: &quot;&quot;, &quot;exec_out&quot;: True}
780
+ except Exception as e:
781
+ self.log_error(f&quot;Email failed: {e}&quot;)
782
+ return {&quot;sent&quot;: False, &quot;error_msg&quot;: str(e), &quot;exec_out&quot;: True}
783
+
784
+
785
+ def register_node():
786
+ return Email_Notification
787
+ </code></pre>
788
+ <h3 id="usage_3">Usage</h3>
789
+ <ul>
790
+ <li>Configure <code>smtp_host</code>, <code>smtp_port</code>, <code>username</code>, <code>password</code> for your email provider.</li>
791
+ <li>For Gmail: host = <code>smtp.gmail.com</code>, port = <code>587</code>, <code>use_tls</code> = <code>True</code>. Use an App Password, not your main account password.</li>
792
+ <li>Wire <code>sent</code> to a TwoWaySwitch to branch on success/failure.</li>
793
+ <li>Store credentials in <code>SetVariable</code> nodes or read them from environment variables rather than hardcoding.</li>
794
+ </ul>
795
+ <hr />
796
+ <h2 id="example-5-database-query-node">Example 5: Database Query Node</h2>
797
+ <p><strong>Description:</strong> Executes a parameterized SQL query against a SQLite database (or any database via configurable connection string). Returns results as a list of dicts.</p>
798
+ <h3 id="python-code_4">Python Code</h3>
799
+ <pre><code class="language-python">import asyncio
800
+ import sqlite3
801
+ from src.nodes.base import BaseNode
802
+
803
+
804
+ class Database_Query(BaseNode):
805
+ name = &quot;database_query&quot;
806
+
807
+ def __init__(self):
808
+ super().__init__()
809
+ # [AUTO-GENERATED-PORTS-START]
810
+ self.add_input(&quot;db_path&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;:memory:&quot;)
811
+ self.add_input(&quot;query&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
812
+ self.add_input(&quot;parameters&quot;, &quot;list&quot;, default=None)
813
+ self.add_output(&quot;rows&quot;, &quot;list&quot;)
814
+ self.add_output(&quot;row_count&quot;, &quot;int&quot;)
815
+ self.add_output(&quot;columns&quot;, &quot;list&quot;)
816
+ # [AUTO-GENERATED-PORTS-END]
817
+
818
+ async def execute(self, inputs: dict) -&gt; dict:
819
+ db_path = inputs.get(&quot;db_path&quot;, &quot;:memory:&quot;)
820
+ query = inputs.get(&quot;query&quot;, &quot;&quot;)
821
+ parameters = tuple(inputs.get(&quot;parameters&quot;) or [])
822
+
823
+ if not query:
824
+ self.log_error(&quot;No SQL query provided.&quot;)
825
+ return {&quot;rows&quot;: [], &quot;row_count&quot;: 0, &quot;columns&quot;: [], &quot;exec_out&quot;: True}
826
+
827
+ def _run_query():
828
+ con = sqlite3.connect(db_path)
829
+ con.row_factory = sqlite3.Row
830
+ try:
831
+ cur = con.execute(query, parameters)
832
+ if cur.description:
833
+ columns = [desc[0] for desc in cur.description]
834
+ rows = [dict(row) for row in cur.fetchall()]
835
+ else:
836
+ # INSERT / UPDATE / DELETE
837
+ con.commit()
838
+ columns = []
839
+ rows = []
840
+ return rows, columns
841
+ finally:
842
+ con.close()
843
+
844
+ try:
845
+ rows, columns = await asyncio.to_thread(_run_query)
846
+ self.log_info(f&quot;Query returned {len(rows)} row(s).&quot;)
847
+ return {
848
+ &quot;rows&quot;: rows,
849
+ &quot;row_count&quot;: len(rows),
850
+ &quot;columns&quot;: columns,
851
+ &quot;exec_out&quot;: True,
852
+ }
853
+ except sqlite3.Error as e:
854
+ self.log_error(f&quot;SQL error: {e}&quot;)
855
+ return {&quot;rows&quot;: [], &quot;row_count&quot;: 0, &quot;columns&quot;: [], &quot;exec_out&quot;: True}
856
+
857
+
858
+ def register_node():
859
+ return Database_Query
860
+ </code></pre>
861
+ <h3 id="usage_4">Usage</h3>
862
+ <ul>
863
+ <li>Set <code>db_path</code> to a <code>.db</code> file path, or <code>":memory:"</code> for a temporary in-memory database.</li>
864
+ <li>Set <code>query</code> to any SQL statement: <code>SELECT</code>, <code>INSERT</code>, <code>UPDATE</code>, <code>DELETE</code>, or <code>CREATE TABLE</code>.</li>
865
+ <li>Wire a list into <code>parameters</code> for parameterized queries: <code>SELECT * FROM users WHERE id = ?</code> with <code>parameters = [42]</code>.</li>
866
+ <li><code>rows</code> is a list of dicts where each dict maps column name → value.</li>
867
+ <li>For non-SELECT queries, <code>rows</code> is empty but the statement is committed.</li>
868
+ </ul>
869
+ <hr />
870
+ <h2 id="example-6-image-resizer-node">Example 6: Image Resizer Node</h2>
871
+ <p><strong>Description:</strong> Resizes an image file to specified dimensions using Pillow. Supports multiple resampling algorithms and optional aspect-ratio locking.</p>
872
+ <h3 id="python-code_5">Python Code</h3>
873
+ <pre><code class="language-python">import asyncio
874
+ import os
875
+ from src.nodes.base import BaseNode
876
+
877
+ try:
878
+ from PIL import Image
879
+ _PIL_AVAILABLE = True
880
+ except ImportError:
881
+ _PIL_AVAILABLE = False
882
+
883
+
884
+ class Image_Resizer(BaseNode):
885
+ name = &quot;image_resizer&quot;
886
+
887
+ def __init__(self):
888
+ super().__init__()
889
+ # [AUTO-GENERATED-PORTS-START]
890
+ self.add_input(&quot;input_path&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
891
+ self.add_input(&quot;output_path&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
892
+ self.add_input(&quot;width&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=1920)
893
+ self.add_input(&quot;height&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=1080)
894
+ self.add_input(&quot;keep_aspect&quot;, &quot;bool&quot;, widget_type=&quot;checkbox&quot;, default=True)
895
+ self.add_input(&quot;resample&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;LANCZOS&quot;)
896
+ self.add_output(&quot;out_path&quot;, &quot;string&quot;)
897
+ self.add_output(&quot;out_width&quot;, &quot;int&quot;)
898
+ self.add_output(&quot;out_height&quot;, &quot;int&quot;)
899
+ # [AUTO-GENERATED-PORTS-END]
900
+
901
+ async def execute(self, inputs: dict) -&gt; dict:
902
+ if not _PIL_AVAILABLE:
903
+ self.log_error(&quot;Pillow is not installed. Run: pip install Pillow&quot;)
904
+ return {&quot;out_path&quot;: &quot;&quot;, &quot;out_width&quot;: 0, &quot;out_height&quot;: 0, &quot;exec_out&quot;: True}
905
+
906
+ input_path = inputs.get(&quot;input_path&quot;, &quot;&quot;)
907
+ output_path = inputs.get(&quot;output_path&quot;, &quot;&quot;)
908
+ target_w = int(inputs.get(&quot;width&quot;) or 1920)
909
+ target_h = int(inputs.get(&quot;height&quot;) or 1080)
910
+ keep_aspect = inputs.get(&quot;keep_aspect&quot;, True)
911
+ resample_str = (inputs.get(&quot;resample&quot;) or &quot;LANCZOS&quot;).upper()
912
+
913
+ resample_map = {
914
+ &quot;LANCZOS&quot;: Image.LANCZOS,
915
+ &quot;BICUBIC&quot;: Image.BICUBIC,
916
+ &quot;BILINEAR&quot;: Image.BILINEAR,
917
+ &quot;NEAREST&quot;: Image.NEAREST,
918
+ }
919
+ resample = resample_map.get(resample_str, Image.LANCZOS)
920
+
921
+ if not input_path or not os.path.isfile(input_path):
922
+ self.log_error(f&quot;Input file not found: {input_path}&quot;)
923
+ return {&quot;out_path&quot;: &quot;&quot;, &quot;out_width&quot;: 0, &quot;out_height&quot;: 0, &quot;exec_out&quot;: True}
924
+
925
+ if not output_path:
926
+ base, ext = os.path.splitext(input_path)
927
+ output_path = f&quot;{base}_resized{ext}&quot;
928
+
929
+ def _resize():
930
+ with Image.open(input_path) as img:
931
+ if keep_aspect:
932
+ img.thumbnail((target_w, target_h), resample)
933
+ out_w, out_h = img.size
934
+ else:
935
+ img = img.resize((target_w, target_h), resample)
936
+ out_w, out_h = img.size
937
+ img.save(output_path)
938
+ return out_w, out_h
939
+
940
+ try:
941
+ out_w, out_h = await asyncio.to_thread(_resize)
942
+ self.log_info(f&quot;Resized {input_path} → {output_path} ({out_w}x{out_h})&quot;)
943
+ return {&quot;out_path&quot;: output_path, &quot;out_width&quot;: out_w, &quot;out_height&quot;: out_h, &quot;exec_out&quot;: True}
944
+ except Exception as e:
945
+ self.log_error(f&quot;Image resize failed: {e}&quot;)
946
+ return {&quot;out_path&quot;: &quot;&quot;, &quot;out_width&quot;: 0, &quot;out_height&quot;: 0, &quot;exec_out&quot;: True}
947
+
948
+
949
+ def register_node():
950
+ return Image_Resizer
951
+ </code></pre>
952
+ <h3 id="usage_5">Usage</h3>
953
+ <ul>
954
+ <li>Wire file paths from a File Batch Processor node into <code>input_path</code>.</li>
955
+ <li>Set <code>output_path</code> explicitly or leave empty to auto-generate <code>{name}_resized.ext</code>.</li>
956
+ <li><code>keep_aspect=True</code> uses thumbnail mode — the image fits within the box without cropping.</li>
957
+ <li><code>keep_aspect=False</code> forces exact dimensions, potentially distorting the image.</li>
958
+ <li><code>resample</code> options: <code>LANCZOS</code> (best quality), <code>BICUBIC</code>, <code>BILINEAR</code>, <code>NEAREST</code> (fastest).</li>
959
+ </ul>
960
+ <hr />
961
+ <h2 id="example-7-aillm-text-generation-node">Example 7: AI/LLM Text Generation Node</h2>
962
+ <p><strong>Description:</strong> Calls the Google Generative AI API to generate text from a prompt. Supports configurable model selection and temperature.</p>
963
+ <h3 id="python-code_6">Python Code</h3>
964
+ <pre><code class="language-python">import asyncio
965
+ from src.nodes.base import BaseNode
966
+
967
+ try:
968
+ import google.generativeai as genai
969
+ _GENAI_AVAILABLE = True
970
+ except ImportError:
971
+ _GENAI_AVAILABLE = False
972
+
973
+
974
+ class LLM_Text_Generation(BaseNode):
975
+ name = &quot;llm_text_generation&quot;
976
+
977
+ def __init__(self):
978
+ super().__init__()
979
+ # [AUTO-GENERATED-PORTS-START]
980
+ self.add_input(&quot;api_key&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
981
+ self.add_input(&quot;model&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;gemini-1.5-flash&quot;)
982
+ self.add_input(&quot;prompt&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
983
+ self.add_input(&quot;system&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
984
+ self.add_input(&quot;temperature&quot;,&quot;float&quot;, widget_type=&quot;float&quot;, default=0.7)
985
+ self.add_input(&quot;max_tokens&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=1024)
986
+ self.add_output(&quot;generated_text&quot;, &quot;string&quot;)
987
+ self.add_output(&quot;token_count&quot;, &quot;int&quot;)
988
+ self.add_output(&quot;success&quot;, &quot;bool&quot;)
989
+ # [AUTO-GENERATED-PORTS-END]
990
+
991
+ async def execute(self, inputs: dict) -&gt; dict:
992
+ if not _GENAI_AVAILABLE:
993
+ self.log_error(&quot;google-generativeai not installed. Run: pip install google-generativeai&quot;)
994
+ return {&quot;generated_text&quot;: &quot;&quot;, &quot;token_count&quot;: 0, &quot;success&quot;: False, &quot;exec_out&quot;: True}
995
+
996
+ api_key = inputs.get(&quot;api_key&quot;, &quot;&quot;)
997
+ model_name = inputs.get(&quot;model&quot;, &quot;gemini-1.5-flash&quot;)
998
+ prompt = inputs.get(&quot;prompt&quot;, &quot;&quot;)
999
+ system = inputs.get(&quot;system&quot;, &quot;&quot;)
1000
+ temperature = float(inputs.get(&quot;temperature&quot;) or 0.7)
1001
+ max_tokens = int(inputs.get(&quot;max_tokens&quot;) or 1024)
1002
+
1003
+ if not api_key:
1004
+ import os
1005
+ api_key = os.environ.get(&quot;GOOGLE_API_KEY&quot;, &quot;&quot;)
1006
+
1007
+ if not api_key:
1008
+ self.log_error(&quot;No API key provided. Set api_key input or GOOGLE_API_KEY env var.&quot;)
1009
+ return {&quot;generated_text&quot;: &quot;&quot;, &quot;token_count&quot;: 0, &quot;success&quot;: False, &quot;exec_out&quot;: True}
1010
+
1011
+ if not prompt:
1012
+ self.log_error(&quot;No prompt provided.&quot;)
1013
+ return {&quot;generated_text&quot;: &quot;&quot;, &quot;token_count&quot;: 0, &quot;success&quot;: False, &quot;exec_out&quot;: True}
1014
+
1015
+ def _generate():
1016
+ genai.configure(api_key=api_key)
1017
+
1018
+ generation_config = genai.GenerationConfig(
1019
+ temperature=temperature,
1020
+ max_output_tokens=max_tokens,
1021
+ )
1022
+
1023
+ model = genai.GenerativeModel(
1024
+ model_name=model_name,
1025
+ generation_config=generation_config,
1026
+ system_instruction=system if system else None,
1027
+ )
1028
+
1029
+ response = model.generate_content(prompt)
1030
+ text = response.text if response.text else &quot;&quot;
1031
+ token_count = 0
1032
+ if hasattr(response, &quot;usage_metadata&quot;) and response.usage_metadata:
1033
+ token_count = response.usage_metadata.total_token_count or 0
1034
+ return text, token_count
1035
+
1036
+ try:
1037
+ text, tokens = await asyncio.to_thread(_generate)
1038
+ self.log_info(f&quot;LLM generated {len(text)} chars, ~{tokens} tokens.&quot;)
1039
+ return {
1040
+ &quot;generated_text&quot;: text,
1041
+ &quot;token_count&quot;: tokens,
1042
+ &quot;success&quot;: True,
1043
+ &quot;exec_out&quot;: True,
1044
+ }
1045
+ except Exception as e:
1046
+ self.log_error(f&quot;LLM generation failed: {e}&quot;)
1047
+ return {&quot;generated_text&quot;: &quot;&quot;, &quot;token_count&quot;: 0, &quot;success&quot;: False, &quot;exec_out&quot;: True}
1048
+
1049
+
1050
+ def register_node():
1051
+ return LLM_Text_Generation
1052
+ </code></pre>
1053
+ <h3 id="usage_6">Usage</h3>
1054
+ <ul>
1055
+ <li>Set <code>api_key</code> or set the <code>GOOGLE_API_KEY</code> environment variable.</li>
1056
+ <li>Available models: <code>gemini-1.5-flash</code> (fast), <code>gemini-1.5-pro</code> (more capable), <code>gemini-2.0-flash</code>.</li>
1057
+ <li>Wire the output of a Python Script or File Load node into <code>prompt</code> for dynamic prompts.</li>
1058
+ <li>Chain multiple LLM nodes: first generates a summary, second expands it, third translates.</li>
1059
+ </ul>
1060
+ <hr />
1061
+ <h2 id="example-8-folder-monitor-workflow">Example 8: Folder Monitor Workflow</h2>
1062
+ <p><strong>Description:</strong> A workflow that watches a folder for new files, processes each new file (e.g., converts it), and logs completion. Uses Python's <code>watchdog</code> library in a polling loop.</p>
1063
+ <h3 id="workflow-structure-text-description">Workflow Structure (Text Description)</h3>
1064
+ <pre><code>[Python Script: Start Monitor]
1065
+ → watches folder using watchdog.observers.Observer
1066
+ → detects new files matching *.png
1067
+ → appends new file paths to shared memory list &quot;new_files&quot;
1068
+ → runs in asyncio.to_thread for 30 seconds
1069
+ ↓ exec_out
1070
+
1071
+ [GetVariable: &quot;new_files&quot;]
1072
+ ↓ current_list
1073
+
1074
+ [ForEach: iterate new files]
1075
+ ↓ loop_exec_out (per file)
1076
+
1077
+ [Image Resizer: 1920x1080]
1078
+ ↓ exec_out
1079
+ [Console Print: &quot;Processed: {out_path}&quot;]
1080
+ ↓ exec_out (back to ForEach loop_exec_in)
1081
+
1082
+ ↓ exec_out (after loop)
1083
+
1084
+ [Console Print: &quot;Monitor run complete.&quot;]
1085
+ </code></pre>
1086
+ <h3 id="monitor-python-script-node-code">Monitor Python Script Node Code</h3>
1087
+ <pre><code class="language-python">import asyncio
1088
+ import time
1089
+ from src.nodes.base import BaseNode
1090
+
1091
+ try:
1092
+ from watchdog.observers import Observer
1093
+ from watchdog.events import FileSystemEventHandler, FileCreatedEvent
1094
+ _WATCHDOG_AVAILABLE = True
1095
+ except ImportError:
1096
+ _WATCHDOG_AVAILABLE = False
1097
+
1098
+
1099
+ class Folder_Monitor(BaseNode):
1100
+ name = &quot;folder_monitor&quot;
1101
+
1102
+ def __init__(self):
1103
+ super().__init__()
1104
+ # [AUTO-GENERATED-PORTS-START]
1105
+ self.add_input(&quot;folder_path&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
1106
+ self.add_input(&quot;pattern&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;*.png&quot;)
1107
+ self.add_input(&quot;watch_seconds&quot;,&quot;int&quot;, widget_type=&quot;int&quot;, default=30)
1108
+ self.add_output(&quot;new_files&quot;, &quot;list&quot;)
1109
+ # [AUTO-GENERATED-PORTS-END]
1110
+
1111
+ async def execute(self, inputs: dict) -&gt; dict:
1112
+ if not _WATCHDOG_AVAILABLE:
1113
+ self.log_error(&quot;watchdog not installed. Run: pip install watchdog&quot;)
1114
+ return {&quot;new_files&quot;: [], &quot;exec_out&quot;: True}
1115
+
1116
+ import fnmatch
1117
+
1118
+ folder = inputs.get(&quot;folder_path&quot;, &quot;&quot;)
1119
+ pattern = inputs.get(&quot;pattern&quot;, &quot;*.png&quot;)
1120
+ seconds = int(inputs.get(&quot;watch_seconds&quot;) or 30)
1121
+ new_files = []
1122
+
1123
+ class Handler(FileSystemEventHandler):
1124
+ def on_created(self, event):
1125
+ if not event.is_directory:
1126
+ if fnmatch.fnmatch(event.src_path, pattern):
1127
+ new_files.append(event.src_path)
1128
+
1129
+ def _watch():
1130
+ observer = Observer()
1131
+ observer.schedule(Handler(), folder, recursive=False)
1132
+ observer.start()
1133
+ time.sleep(seconds)
1134
+ observer.stop()
1135
+ observer.join()
1136
+
1137
+ self.log_info(f&quot;Watching {folder} for {pattern} for {seconds}s...&quot;)
1138
+ await asyncio.to_thread(_watch)
1139
+ self.log_info(f&quot;Monitor finished. {len(new_files)} new file(s) detected.&quot;)
1140
+ return {&quot;new_files&quot;: new_files, &quot;exec_out&quot;: True}
1141
+
1142
+
1143
+ def register_node():
1144
+ return Folder_Monitor
1145
+ </code></pre>
1146
+ <h3 id="usage_7">Usage</h3>
1147
+ <p>Install watchdog: <code>pip install watchdog</code></p>
1148
+ <p>Set <code>folder_path</code> and <code>pattern</code>. Wire <code>new_files</code> → ForEach → Image Resizer (or any processing node). Set <code>watch_seconds</code> to control how long the monitor runs each execution cycle. To run continuously, wrap the whole workflow in a WhileLoop.</p>
1149
+ <hr />
1150
+ <h2 id="example-9-complete-houdini-sop-chain-workflow">Example 9: Complete Houdini SOP Chain Workflow</h2>
1151
+ <p><strong>Description:</strong> Create a Houdini geometry container, add a Box SOP, add a PolyExtrude SOP, wire and configure them, set display flags, cook the network, and return the final SOP path for downstream use.</p>
1152
+ <h3 id="python-code-single-consolidated-node-for-clarity">Python Code (single consolidated node for clarity)</h3>
1153
+ <pre><code class="language-python">from src.nodes.base import BaseNode
1154
+ from src.utils.hou_bridge import get_bridge
1155
+
1156
+
1157
+ class Hou_SOP_Chain(BaseNode):
1158
+ name = &quot;hou_sop_chain&quot;
1159
+
1160
+ def __init__(self):
1161
+ super().__init__()
1162
+ # [AUTO-GENERATED-PORTS-START]
1163
+ self.add_input(&quot;geo_name&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;my_geo&quot;)
1164
+ self.add_input(&quot;box_size&quot;, &quot;float&quot;, widget_type=&quot;float&quot;, default=1.0)
1165
+ self.add_input(&quot;extrude_dist&quot;, &quot;float&quot;, widget_type=&quot;float&quot;, default=0.3)
1166
+ self.add_input(&quot;extrude_divs&quot;, &quot;int&quot;, widget_type=&quot;int&quot;, default=1)
1167
+ self.add_output(&quot;geo_path&quot;, &quot;string&quot;)
1168
+ self.add_output(&quot;display_sop&quot;, &quot;string&quot;)
1169
+ # [AUTO-GENERATED-PORTS-END]
1170
+
1171
+ async def execute(self, inputs: dict) -&gt; dict:
1172
+ geo_name = inputs.get(&quot;geo_name&quot;, &quot;my_geo&quot;) or &quot;my_geo&quot;
1173
+ box_size = float(inputs.get(&quot;box_size&quot;) or 1.0)
1174
+ extrude_dist = float(inputs.get(&quot;extrude_dist&quot;) or 0.3)
1175
+ extrude_divs = int(inputs.get(&quot;extrude_divs&quot;) or 1)
1176
+
1177
+ try:
1178
+ bridge = get_bridge()
1179
+
1180
+ # 1. Verify connection
1181
+ ping = bridge.ping()
1182
+ if ping.get(&quot;status&quot;) != &quot;ok&quot;:
1183
+ self.log_error(&quot;Cannot reach Houdini.&quot;)
1184
+ return {&quot;geo_path&quot;: &quot;&quot;, &quot;display_sop&quot;: &quot;&quot;, &quot;exec_out&quot;: True}
1185
+
1186
+ # 2. Create /obj-level geo container
1187
+ geo_result = bridge.create_node(&quot;/obj&quot;, &quot;geo&quot;, geo_name)
1188
+ geo_path = geo_result[&quot;path&quot;]
1189
+
1190
+ # 3. Clear default children
1191
+ for child in bridge.children(geo_path):
1192
+ bridge.delete_node(child[&quot;path&quot;])
1193
+
1194
+ # 4. Box SOP
1195
+ box_result = bridge.create_node(geo_path, &quot;box&quot;, &quot;box1&quot;)
1196
+ box_path = box_result[&quot;path&quot;]
1197
+ bridge.set_parms(box_path, {
1198
+ &quot;sizex&quot;: box_size,
1199
+ &quot;sizey&quot;: box_size,
1200
+ &quot;sizez&quot;: box_size,
1201
+ })
1202
+
1203
+ # 5. PolyExtrude SOP
1204
+ extrude_result = bridge.create_node(geo_path, &quot;polyextrude&quot;, &quot;extrude1&quot;)
1205
+ extrude_path = extrude_result[&quot;path&quot;]
1206
+ bridge.connect_nodes(box_path, extrude_path, output=0, input_idx=0)
1207
+ bridge.set_parms(extrude_path, {
1208
+ &quot;dist&quot;: extrude_dist,
1209
+ &quot;divs&quot;: extrude_divs,
1210
+ })
1211
+
1212
+ # 6. Display / render flags on the extrude SOP
1213
+ bridge.set_display_flag(extrude_path, True)
1214
+ bridge.set_render_flag(extrude_path, True)
1215
+
1216
+ # 7. Cook
1217
+ bridge.cook_node(extrude_path, force=True)
1218
+
1219
+ # 8. Auto-layout
1220
+ bridge.layout_children(geo_path)
1221
+
1222
+ self.log_info(f&quot;SOP chain built at {geo_path}, display SOP: {extrude_path}&quot;)
1223
+ return {
1224
+ &quot;geo_path&quot;: geo_path,
1225
+ &quot;display_sop&quot;: extrude_path,
1226
+ &quot;exec_out&quot;: True,
1227
+ }
1228
+
1229
+ except Exception as e:
1230
+ self.log_error(f&quot;Houdini SOP chain failed: {e}&quot;)
1231
+ return {&quot;geo_path&quot;: &quot;&quot;, &quot;display_sop&quot;: &quot;&quot;, &quot;exec_out&quot;: True}
1232
+
1233
+
1234
+ def register_node():
1235
+ return Hou_SOP_Chain
1236
+ </code></pre>
1237
+ <h3 id="usage_8">Usage</h3>
1238
+ <p>Connect the <code>display_sop</code> output to other Houdini nodes that need to reference the SOP context. Use <code>geo_path</code> when working at the Object level (e.g., for transforms or Alembic export from the Object level).</p>
1239
+ <hr />
1240
+ <h2 id="example-10-prism-multi-asset-publisher-workflow">Example 10: Prism Multi-Asset Publisher Workflow</h2>
1241
+ <p><strong>Description:</strong> Iterates over a list of assets, resolves the export path for each, processes the asset (simulated), publishes via PrismCore, and logs the result.</p>
1242
+ <h3 id="python-code_7">Python Code</h3>
1243
+ <pre><code class="language-python">from src.nodes.base import BaseNode
1244
+ from src.utils.prism_core import resolve_prism_core
1245
+
1246
+
1247
+ class Prism_Multi_Asset_Publisher(BaseNode):
1248
+ name = &quot;prism_multi_asset_publisher&quot;
1249
+
1250
+ def __init__(self):
1251
+ super().__init__()
1252
+ # [AUTO-GENERATED-PORTS-START]
1253
+ self.add_input(&quot;asset_names&quot;, &quot;list&quot;)
1254
+ self.add_input(&quot;entity_type&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;Asset&quot;)
1255
+ self.add_input(&quot;task&quot;, &quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;model&quot;)
1256
+ self.add_input(&quot;version_comment&quot;,&quot;string&quot;, widget_type=&quot;text&quot;, default=&quot;&quot;)
1257
+ self.add_output(&quot;published&quot;, &quot;list&quot;)
1258
+ self.add_output(&quot;failed&quot;, &quot;list&quot;)
1259
+ self.add_output(&quot;publish_count&quot;, &quot;int&quot;)
1260
+ # [AUTO-GENERATED-PORTS-END]
1261
+
1262
+ async def execute(self, inputs: dict) -&gt; dict:
1263
+ core = resolve_prism_core(inputs)
1264
+ if core is None:
1265
+ self.log_error(&quot;PrismCore not available. Add prism_core_init node.&quot;)
1266
+ return {&quot;published&quot;: [], &quot;failed&quot;: [], &quot;publish_count&quot;: 0, &quot;exec_out&quot;: True}
1267
+
1268
+ asset_names = list(inputs.get(&quot;asset_names&quot;) or [])
1269
+ entity_type = inputs.get(&quot;entity_type&quot;, &quot;Asset&quot;)
1270
+ task = inputs.get(&quot;task&quot;, &quot;model&quot;)
1271
+ comment = inputs.get(&quot;version_comment&quot;, &quot;&quot;)
1272
+
1273
+ published = []
1274
+ failed = []
1275
+
1276
+ for asset_name in asset_names:
1277
+ try:
1278
+ # Get export paths for this asset
1279
+ paths = core.getExportPaths(
1280
+ entity=asset_name,
1281
+ entityType=entity_type,
1282
+ task=task,
1283
+ )
1284
+
1285
+ if not paths:
1286
+ failed.append({&quot;asset&quot;: asset_name, &quot;reason&quot;: &quot;No export paths found&quot;})
1287
+ self.log_error(f&quot;No export paths for: {asset_name}&quot;)
1288
+ continue
1289
+
1290
+ latest_path = paths[-1]
1291
+
1292
+ # Publish via PrismCore
1293
+ result = core.publishProduct(
1294
+ entity=asset_name,
1295
+ entityType=entity_type,
1296
+ task=task,
1297
+ sourceFile=latest_path,
1298
+ comment=comment or f&quot;Published by Vibrante-Node automation&quot;,
1299
+ )
1300
+
1301
+ if result and result.get(&quot;success&quot;):
1302
+ published.append({
1303
+ &quot;asset&quot;: asset_name,
1304
+ &quot;source&quot;: latest_path,
1305
+ &quot;publish_path&quot;: result.get(&quot;path&quot;, &quot;&quot;),
1306
+ &quot;version&quot;: result.get(&quot;version&quot;, &quot;&quot;),
1307
+ })
1308
+ self.log_info(f&quot;Published: {asset_name} v{result.get('version', '?')}&quot;)
1309
+ else:
1310
+ reason = result.get(&quot;error&quot;, &quot;Unknown error&quot;) if result else &quot;No response&quot;
1311
+ failed.append({&quot;asset&quot;: asset_name, &quot;reason&quot;: reason})
1312
+ self.log_error(f&quot;Publish failed for {asset_name}: {reason}&quot;)
1313
+
1314
+ except Exception as e:
1315
+ failed.append({&quot;asset&quot;: asset_name, &quot;reason&quot;: str(e)})
1316
+ self.log_error(f&quot;Exception publishing {asset_name}: {e}&quot;)
1317
+
1318
+ self.log_info(
1319
+ f&quot;Multi-asset publish complete: {len(published)} succeeded, {len(failed)} failed.&quot;
1320
+ )
1321
+ return {
1322
+ &quot;published&quot;: published,
1323
+ &quot;failed&quot;: failed,
1324
+ &quot;publish_count&quot;: len(published),
1325
+ &quot;exec_out&quot;: True,
1326
+ }
1327
+
1328
+
1329
+ def register_node():
1330
+ return Prism_Multi_Asset_Publisher
1331
+ </code></pre>
1332
+ <h3 id="usage_9">Usage</h3>
1333
+ <ol>
1334
+ <li>Place a <code>prism_core_init</code> node on the canvas (no wiring needed).</li>
1335
+ <li>Wire a list of asset name strings into <code>asset_names</code>.</li>
1336
+ <li>Set <code>entity_type</code> (<code>"Asset"</code> or <code>"Shot"</code>), <code>task</code> (e.g., <code>"model"</code>, <code>"rig"</code>, <code>"anim"</code>).</li>
1337
+ <li>Connect <code>publish_count</code> to a Console Print for a summary.</li>
1338
+ <li>Wire <code>failed</code> to a Python Script that formats and logs any failures.</li>
1339
+ <li>Connect <code>published</code> to downstream processing (e.g., cache invalidation, email notification).</li>
1340
+ </ol>
1341
+ <nav class="page-nav">
1342
+ <a class="page-nav-link prev" href="11_troubleshooting.html"><span class="page-nav-label">Previous</span><span class="page-nav-title">Troubleshooting</span></a>
1343
+ <a class="page-nav-link next" href="13_general_purpose_automation.html"><span class="page-nav-label">Next</span><span class="page-nav-title">General Purpose Automation</span></a>
1344
+ </nav>
1345
+ <section class="licence-attribution" style="margin-top:40px;padding-top:14px;border-top:1px solid #313244;font-size:.82em;color:#a6adc8">
1346
+ <p>Documentation &amp;copy; 2024&amp;ndash;2026 Mahmoud Kamal (KamalTD), licensed under
1347
+ <a href="https://creativecommons.org/licenses/by/4.0/" rel="license">CC BY 4.0</a>.
1348
+ <a href="../LICENSE.txt">Full licence notice</a>.</p>
1349
+ <p>Search and syntax highlighting load <a href="https://lunrjs.com/">lunr.js</a> 2.3.9 (MIT)
1350
+ and <a href="https://highlightjs.org/">highlight.js</a> 11.9.0 (BSD-3-Clause) from
1351
+ cdn.jsdelivr.net at view time; neither library is redistributed with these files.</p>
1352
+ </section>
1353
+ </div>
1354
+ </main>
1355
+
1356
+ <!-- ── TOC ────────────────────────────────────────────────────────────── -->
1357
+ <aside class="toc">
1358
+ <div class="toc-title">On this page</div>
1359
+ <a class="toc-link toc-h2" href="#example-1-custom-string-processor-node">Example 1: Custom String Processor Node</a>
1360
+ <a class="toc-link toc-h3" href="#node-json">Node JSON</a>
1361
+ <a class="toc-link toc-h3" href="#python-code">Python Code</a>
1362
+ <a class="toc-link toc-h3" href="#usage">Usage</a>
1363
+ <a class="toc-link toc-h2" href="#example-2-http-api-request-node">Example 2: HTTP API Request Node</a>
1364
+ <a class="toc-link toc-h3" href="#node-json_1">Node JSON</a>
1365
+ <a class="toc-link toc-h3" href="#python-code_1">Python Code</a>
1366
+ <a class="toc-link toc-h3" href="#usage_1">Usage</a>
1367
+ <a class="toc-link toc-h2" href="#example-3-file-batch-processor-node">Example 3: File Batch Processor Node</a>
1368
+ <a class="toc-link toc-h3" href="#python-code_2">Python Code</a>
1369
+ <a class="toc-link toc-h3" href="#usage_2">Usage</a>
1370
+ <a class="toc-link toc-h2" href="#example-4-email-notification-node">Example 4: Email Notification Node</a>
1371
+ <a class="toc-link toc-h3" href="#python-code_3">Python Code</a>
1372
+ <a class="toc-link toc-h3" href="#usage_3">Usage</a>
1373
+ <a class="toc-link toc-h2" href="#example-5-database-query-node">Example 5: Database Query Node</a>
1374
+ <a class="toc-link toc-h3" href="#python-code_4">Python Code</a>
1375
+ <a class="toc-link toc-h3" href="#usage_4">Usage</a>
1376
+ <a class="toc-link toc-h2" href="#example-6-image-resizer-node">Example 6: Image Resizer Node</a>
1377
+ <a class="toc-link toc-h3" href="#python-code_5">Python Code</a>
1378
+ <a class="toc-link toc-h3" href="#usage_5">Usage</a>
1379
+ <a class="toc-link toc-h2" href="#example-7-aillm-text-generation-node">Example 7: AI/LLM Text Generation Node</a>
1380
+ <a class="toc-link toc-h3" href="#python-code_6">Python Code</a>
1381
+ <a class="toc-link toc-h3" href="#usage_6">Usage</a>
1382
+ <a class="toc-link toc-h2" href="#example-8-folder-monitor-workflow">Example 8: Folder Monitor Workflow</a>
1383
+ <a class="toc-link toc-h3" href="#workflow-structure-text-description">Workflow Structure (Text Description)</a>
1384
+ <a class="toc-link toc-h3" href="#monitor-python-script-node-code">Monitor Python Script Node Code</a>
1385
+ <a class="toc-link toc-h3" href="#usage_7">Usage</a>
1386
+ <a class="toc-link toc-h2" href="#example-9-complete-houdini-sop-chain-workflow">Example 9: Complete Houdini SOP Chain Workflow</a>
1387
+ <a class="toc-link toc-h3" href="#python-code-single-consolidated-node-for-clarity">Python Code (single consolidated node for clarity)</a>
1388
+ <a class="toc-link toc-h3" href="#usage_8">Usage</a>
1389
+ <a class="toc-link toc-h2" href="#example-10-prism-multi-asset-publisher-workflow">Example 10: Prism Multi-Asset Publisher Workflow</a>
1390
+ <a class="toc-link toc-h3" href="#python-code_7">Python Code</a>
1391
+ <a class="toc-link toc-h3" href="#usage_9">Usage</a>
1392
+ </aside>
1393
+
1394
+ <script src="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/highlight.min.js"></script>
1395
+ <script src="https://cdn.jsdelivr.net/npm/lunr@2.3.9/lunr.min.js"></script>
1396
+ <script>
1397
+ // ── Search ──────────────────────────────────────────────────────────────
1398
+ let _idx = null, _docs = [];
1399
+
1400
+ async function initSearch() {
1401
+ try {
1402
+ const base = document.getElementById('portal-base').dataset.base;
1403
+ const resp = await fetch(base + 'search.json');
1404
+ _docs = await resp.json();
1405
+ _idx = lunr(function() {
1406
+ this.ref('id');
1407
+ this.field('title', { boost: 10 });
1408
+ this.field('body');
1409
+ _docs.forEach((d, i) => {
1410
+ this.add({ id: i, title: d.title, body: d.body });
1411
+ });
1412
+ });
1413
+ } catch(e) { console.warn('Search index not available', e); }
1414
+ }
1415
+
1416
+ function doSearch(q) {
1417
+ const box = document.getElementById('search-results');
1418
+ if (!q || q.length < 2) { box.classList.remove('visible'); return; }
1419
+ if (!_idx) { box.innerHTML = '<div class="search-no-results">Search index loading…</div>'; box.classList.add('visible'); return; }
1420
+ const results = _idx.search(q + '~1');
1421
+ if (!results.length) {
1422
+ box.innerHTML = '<div class="search-no-results">No results for "' + q + '"</div>';
1423
+ box.classList.add('visible'); return;
1424
+ }
1425
+ box.innerHTML = results.slice(0, 8).map(r => {
1426
+ const d = _docs[r.ref];
1427
+ const excerpt = d.body.substring(0, 140).replace(/[#*`]/g, '').trim() + '…';
1428
+ return `<a class="search-result-item" href="${d.url}">
1429
+ <div class="search-result-title">${d.title}</div>
1430
+ <div class="search-result-excerpt">${excerpt}</div>
1431
+ </a>`;
1432
+ }).join('');
1433
+ box.classList.add('visible');
1434
+ }
1435
+
1436
+ document.addEventListener('DOMContentLoaded', () => {
1437
+ initSearch();
1438
+ const inp = document.getElementById('search-input');
1439
+ if (inp) {
1440
+ inp.addEventListener('input', e => doSearch(e.target.value));
1441
+ inp.addEventListener('keydown', e => { if (e.key === 'Escape') { e.target.value=''; document.getElementById('search-results').classList.remove('visible'); }});
1442
+ }
1443
+ document.addEventListener('click', e => {
1444
+ if (!e.target.closest('.search-wrap')) document.getElementById('search-results')?.classList.remove('visible');
1445
+ });
1446
+ // Keyboard shortcut: / to focus search
1447
+ document.addEventListener('keydown', e => {
1448
+ if (e.key === '/' && !['INPUT','TEXTAREA'].includes(document.activeElement.tagName)) {
1449
+ e.preventDefault(); document.getElementById('search-input')?.focus();
1450
+ }
1451
+ });
1452
+
1453
+ // ── TOC active section ──────────────────────────────────────────────
1454
+ const tocLinks = document.querySelectorAll('.toc-link');
1455
+ const headings = document.querySelectorAll('h2[id],h3[id],h4[id]');
1456
+ if (tocLinks.length && headings.length) {
1457
+ const obs = new IntersectionObserver(entries => {
1458
+ entries.forEach(entry => {
1459
+ if (entry.isIntersecting) {
1460
+ tocLinks.forEach(l => l.classList.remove('active'));
1461
+ const link = document.querySelector(`.toc-link[href="#${entry.target.id}"]`);
1462
+ if (link) link.classList.add('active');
1463
+ }
1464
+ });
1465
+ }, { rootMargin: '-20% 0px -70% 0px' });
1466
+ headings.forEach(h => obs.observe(h));
1467
+ }
1468
+
1469
+ // ── Copy buttons ────────────────────────────────────────────────────
1470
+ document.querySelectorAll('pre').forEach(pre => {
1471
+ const btn = document.createElement('button');
1472
+ btn.className = 'copy-btn'; btn.textContent = 'Copy';
1473
+ btn.addEventListener('click', () => {
1474
+ const code = pre.querySelector('code');
1475
+ navigator.clipboard.writeText(code ? code.innerText : pre.innerText).then(() => {
1476
+ btn.textContent = 'Copied!'; btn.classList.add('copied');
1477
+ setTimeout(() => { btn.textContent = 'Copy'; btn.classList.remove('copied'); }, 2000);
1478
+ });
1479
+ });
1480
+ pre.style.position = 'relative';
1481
+ pre.appendChild(btn);
1482
+ });
1483
+
1484
+ // ── Sidebar active ──────────────────────────────────────────────────
1485
+ const cur = window.location.pathname.split('/').pop();
1486
+ document.querySelectorAll('.sidebar-link').forEach(l => {
1487
+ if (l.getAttribute('href') === cur || l.getAttribute('href').endsWith(cur)) l.classList.add('active');
1488
+ });
1489
+
1490
+ // ── highlight.js ────────────────────────────────────────────────────
1491
+ if (window.hljs) {
1492
+ hljs.configure({ ignoreUnescapedHTML: true });
1493
+ hljs.highlightAll();
1494
+ }
1495
+ });
1496
+ </script>
1497
+ </body>
1498
+ </html>