Remove USD file development options, will be handled in Blender instead #18

Merged
Brecht Van Lommel merged 2 commits from brecht/blender-addons:hydra-remove-usd-file into storm-hydra-addon 2023-07-13 16:47:33 +02:00
3 changed files with 0 additions and 61 deletions

View File

@ -22,20 +22,6 @@ class StormHydraRenderEngine(bpy_hydra.HydraRenderEngine):
brecht marked this conversation as resolved
Review

Seems like this should be bl_idname = 'HYDRA_STORM' .

Seems like this should be `bl_idname = 'HYDRA_STORM' `.
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,
))

View File

@ -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,
))

View File

@ -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,
))