Storm Hydra render addon #104597

Merged
Brecht Van Lommel merged 22 commits from BogdanNagirniak/blender-addons:storm-hydra-addon into main 2023-08-04 17:02:11 +02:00
Showing only changes of commit a3a317091f - Show all commits

View File

@ -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:
@ -44,10 +47,9 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
'maxLights': settings.max_lights, 'maxLights': settings.max_lights,
} }
def update(self, data, depsgraph): def _update(self, depsgraph):
super().update(data, depsgraph) super()._update(depsgraph)
if self.engine_ptr: self._sync_usd_stage()
self._sync_usd_stage()
def view_update(self, context, depsgraph): def view_update(self, context, depsgraph):
super().view_update(context, depsgraph) super().view_update(context, depsgraph)