Various Python integration changes #77

Closed
Brecht Van Lommel wants to merge 6 commits from brecht:hydra-python-changes into hydra-render

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 29c7b48002 - Show all commits

View File

@ -1283,6 +1283,7 @@ class HydraRenderEngine(RenderEngine):
# Final render. # Final render.
def update(self, data, depsgraph): def update(self, data, depsgraph):
import _bpy_hydra import _bpy_hydra
import bpy
engine_type = 'PREVIEW' if self.is_preview else 'FINAL' engine_type = 'PREVIEW' if self.is_preview else 'FINAL'
if not self.engine_ptr: if not self.engine_ptr:
@ -1293,7 +1294,7 @@ class HydraRenderEngine(RenderEngine):
for key, val in self.get_sync_settings(engine_type).items(): for key, val in self.get_sync_settings(engine_type).items():
_bpy_hydra.engine_set_sync_setting(self.engine_ptr, key, val) _bpy_hydra.engine_set_sync_setting(self.engine_ptr, key, val)
_bpy_hydra.engine_update(self.engine_ptr, depsgraph, 0) _bpy_hydra.engine_update(self.engine_ptr, depsgraph, bpy.context)
for key, val in self.get_render_settings('PREVIEW' if self.is_preview else 'FINAL').items(): for key, val in self.get_render_settings('PREVIEW' if self.is_preview else 'FINAL').items():
_bpy_hydra.engine_set_render_setting(self.engine_ptr, key, val) _bpy_hydra.engine_set_render_setting(self.engine_ptr, key, val)