Create possibility to provide render settings via BlenderSceneDelegate #41

Merged
Bogdan Nagirniak merged 10 commits from BLEN-349 into hydra-render 2023-05-19 20:19:17 +02:00

Purpose

Hydra render addons could provide additional settings for BlenderSceneDelegate, like HdRPR could ask for direct MaterialXFilename.

Technical steps

  1. Separated setting render and sync settings in Engine: added Engine::set_sync_setting(), Engine::set_render_setting(). Added corresponded functions to python.cc and bpy_hydra.py.
  2. Added possibility to provide additional settings for BlenderSceneDelegate: BlenderSceneDelegate::set_setting().
  3. Separated MaterialData::init() to export_mtlx() and write_material_network_map().
  4. Adjusted code.
### Purpose Hydra render addons could provide additional settings for `BlenderSceneDelegate`, like HdRPR could ask for direct `MaterialXFilename`. ### Technical steps 1. Separated setting render and sync settings in `Engine`: added `Engine::set_sync_setting(), Engine::set_render_setting()`. Added corresponded functions to `python.cc` and `bpy_hydra.py`. 2. Added possibility to provide additional settings for `BlenderSceneDelegate`: `BlenderSceneDelegate::set_setting()`. 3. Separated `MaterialData::init()` to `export_mtlx()` and `write_material_network_map()`. 4. Adjusted code.
Bogdan Nagirniak added 7 commits 2023-05-15 20:30:36 +02:00
Bogdan Nagirniak requested review from Brian Savery (AMD) 2023-05-15 20:30:46 +02:00
Bogdan Nagirniak requested review from Georgiy Markelov 2023-05-15 20:30:46 +02:00
Bogdan Nagirniak requested review from Vasyl Pidhirskyi 2023-05-15 20:30:46 +02:00
Bogdan Nagirniak added 2 commits 2023-05-16 15:04:12 +02:00
Georgiy Markelov approved these changes 2023-05-17 20:35:01 +02:00
Georgiy Markelov left a comment
Collaborator

Tested. Works fine.

Tested. Works fine.
@ -22,3 +22,3 @@
bpy_hydra.register_plugins(["/path/to/plugin")])
def get_delegate_settings(self, engine_type):
def get_sync_settings(self, engine_type):
Collaborator

Consider to add a note that these settings refer to keys that Hydra asks.

Consider to add a note that these settings refer to keys that Hydra asks.
@ -22,3 +16,3 @@
private:
/* Singleton class instance */
using FinalEngine::FinalEngine;
Collaborator

Why did you move it here?

Why did you move it here?
Author
Owner

PreviewEngine should be created via PreviewEngine::create() therefore constructor moved to private section.

`PreviewEngine` should be created via `PreviewEngine::create()` therefore constructor moved to private section.
Brian Savery (AMD) requested changes 2023-05-18 00:39:31 +02:00
@ -74,3 +80,3 @@
pass
def get_delegate_settings(self, engine_type):
def get_sync_settings(self, engine_type):
Collaborator

We need explanations of how these methods should be used / overridden

We need explanations of how these methods should be used / overridden
Bogdan Nagirniak added 1 commit 2023-05-19 15:56:15 +02:00
Bogdan Nagirniak requested review from Brian Savery (AMD) 2023-05-19 15:56:40 +02:00
Brian Savery (AMD) approved these changes 2023-05-19 19:10:39 +02:00
Bogdan Nagirniak merged commit d14a315b7f into hydra-render 2023-05-19 20:19:17 +02:00
Sign in to join this conversation.
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: BogdanNagirniak/blender#41
No description provided.