forked from blender/blender-addons
Fix rendering of Final render for Storm delegate. #17
@ -26,6 +26,9 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
|
|||||||
self._usd_stage = None
|
self._usd_stage = None
|
||||||
|
|
||||||
def _sync_usd_stage(self):
|
def _sync_usd_stage(self):
|
||||||
|
if not self.engine_ptr:
|
||||||
|
return
|
||||||
|
|
||||||
preferences = addon_preferences()
|
preferences = addon_preferences()
|
||||||
dev = bpy.context.scene.hydra_storm.dev
|
dev = bpy.context.scene.hydra_storm.dev
|
||||||
if preferences.dev_tools and not self._usd_stage and dev.render_usd and dev.usd_file:
|
if preferences.dev_tools and not self._usd_stage and dev.render_usd and dev.usd_file:
|
||||||
@ -45,10 +48,16 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def update(self, data, depsgraph):
|
def update(self, data, depsgraph):
|
||||||
super().update(data, depsgraph)
|
# This is empty function because: bl_use_gpu_context = True.
|
||||||
if self.engine_ptr:
|
# Engine creation and syncing moved to render() function.
|
||||||
|
pass
|
||||||
|
|
||||||
|
def render(self, depsgraph):
|
||||||
|
super().update(None, depsgraph)
|
||||||
self._sync_usd_stage()
|
self._sync_usd_stage()
|
||||||
|
|
||||||
|
super().render(depsgraph)
|
||||||
|
|
||||||
def view_update(self, context, depsgraph):
|
def view_update(self, context, depsgraph):
|
||||||
super().view_update(context, depsgraph)
|
super().view_update(context, depsgraph)
|
||||||
if self.engine_ptr:
|
if self.engine_ptr:
|
||||||
|
Loading…
Reference in New Issue
Block a user