Add possibility to render USD file for testing purposes #14

Merged
Bogdan Nagirniak merged 6 commits from BLEN-428 into storm-hydra-addon 2023-06-02 15:55:44 +02:00
Showing only changes of commit 25a463bb74 - Show all commits

View File

@ -28,10 +28,8 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
def _sync_usd_stage(self): def _sync_usd_stage(self):
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 dev.render_usd and dev.usd_file: if preferences.dev_tools and not self._usd_stage and dev.render_usd and dev.usd_file:
if not self._usd_stage: self._usd_stage = Usd.Stage.Open(dev.usd_file)
self._usd_stage = Usd.Stage.Open(dev.usd_file)
if self._usd_stage: if self._usd_stage:
_bpy_hydra.engine_sync_usd(self.engine_ptr, self._usd_stage) _bpy_hydra.engine_sync_usd(self.engine_ptr, self._usd_stage)