diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index da59db07b..3a7cce9c1 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -26,6 +26,9 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): self._usd_stage = None def _sync_usd_stage(self): + if not self.engine_ptr: + return + preferences = addon_preferences() dev = bpy.context.scene.hydra_storm.dev 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, } - def update(self, data, depsgraph): - super().update(data, depsgraph) - if self.engine_ptr: - self._sync_usd_stage() + def _update(self, depsgraph): + super()._update(depsgraph) + self._sync_usd_stage() def view_update(self, context, depsgraph): super().view_update(context, depsgraph)