diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index c7e143a29..7b3fd02f1 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -22,20 +22,6 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): delegate_id = 'HdStormRendererPlugin' - def __init__(self): - 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: - self._usd_stage = Usd.Stage.Open(dev.usd_file) - if self._usd_stage: - _bpy_hydra.engine_sync_usd(self.engine_ptr, self._usd_stage) - def get_render_settings(self, engine_type): settings = bpy.context.scene.hydra_storm.viewport if engine_type == 'VIEWPORT' else \ bpy.context.scene.hydra_storm.final @@ -47,16 +33,6 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): 'maxLights': settings.max_lights, } - def _update(self, depsgraph): - super()._update(depsgraph) - self._sync_usd_stage() - - def view_update(self, context, depsgraph): - super().view_update(context, depsgraph) - if self.engine_ptr: - self._sync_usd_stage() - - register, unregister = bpy.utils.register_classes_factory(( StormHydraRenderEngine, )) diff --git a/hydra_storm/properties.py b/hydra_storm/properties.py index 1cbd78663..ad29a5c40 100644 --- a/hydra_storm/properties.py +++ b/hydra_storm/properties.py @@ -50,29 +50,14 @@ class RenderProperties(bpy.types.PropertyGroup): ) -class DevProperties(bpy.types.PropertyGroup): - render_usd: bpy.props.BoolProperty( - name="Render USD", - description="Render USD file with Blender scene", - default=False, - ) - usd_file: bpy.props.StringProperty( - name="USD File", - description="Select USD file to render", - subtype='FILE_PATH', - ) - - class SceneProperties(Properties): type = bpy.types.Scene final: bpy.props.PointerProperty(type=RenderProperties) viewport: bpy.props.PointerProperty(type=RenderProperties) - dev: bpy.props.PointerProperty(type=DevProperties) register, unregister = bpy.utils.register_classes_factory(( RenderProperties, - DevProperties, SceneProperties, )) diff --git a/hydra_storm/ui.py b/hydra_storm/ui.py index fc9e3ecb2..649e777a7 100644 --- a/hydra_storm/ui.py +++ b/hydra_storm/ui.py @@ -149,33 +149,11 @@ class STORM_HYDRA_LIGHT_PT_light(Panel): main_col.prop(light, 'size') -class STORM_HYDRA_RENDER_PT_dev(Panel): - """Final render delegate and settings""" - bl_label = "Dev" - - @classmethod - def poll(cls, context): - return super().poll(context) and addon_preferences().dev_tools - - def draw(self, context): - layout = self.layout - layout.use_property_split = True - layout.use_property_decorate = False - - dev = context.scene.hydra_storm.dev - col = layout.column() - col.prop(dev, 'render_usd') - row = col.row() - row.enabled = dev.render_usd - row.prop(dev, 'usd_file') - - register_classes, unregister_classes = bpy.utils.register_classes_factory(( STORM_HYDRA_RENDER_PT_final, STORM_HYDRA_RENDER_PT_volume_final, STORM_HYDRA_RENDER_PT_viewport, STORM_HYDRA_RENDER_PT_volume_viewport, - STORM_HYDRA_RENDER_PT_dev, STORM_HYDRA_LIGHT_PT_light, ))