From 6f3317f2fdecade2bcdbb54e936659eb312f5378 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 10 Jul 2023 17:01:30 +0200 Subject: [PATCH] Remove USD file development options, will be handled in Blender instead See BogdanNagirniak/blender#65 --- hydra_storm/engine.py | 21 --------------------- hydra_storm/properties.py | 15 --------------- hydra_storm/ui.py | 22 ---------------------- 3 files changed, 58 deletions(-) diff --git a/hydra_storm/engine.py b/hydra_storm/engine.py index da59db07b..0b1930951 100644 --- a/hydra_storm/engine.py +++ b/hydra_storm/engine.py @@ -22,17 +22,6 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine): delegate_id = 'HdStormRendererPlugin' - def __init__(self): - self._usd_stage = None - - def _sync_usd_stage(self): - 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 @@ -44,16 +33,6 @@ 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 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, )) -- 2.30.2