Brushstroke Tools: Initial Version #328
@ -751,7 +751,7 @@ class BSBST_OT_render_setup(bpy.types.Operator):
|
||||
]
|
||||
)
|
||||
trans_pass_toggle: bpy.props.BoolProperty(default=True)
|
||||
trans_pass: bpy.props.IntProperty(default=256)
|
||||
trans_pass: bpy.props.IntProperty(name='Transparency Passes', default=256, min=0, soft_max=1024)
|
||||
|
||||
prop_map = {
|
||||
'CYCLES':['trans_pass',
|
||||
@ -762,12 +762,16 @@ class BSBST_OT_render_setup(bpy.types.Operator):
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
if self.render_engine == 'ALL':
|
||||
props = [*v for k, v in self.prop_map]
|
||||
else:
|
||||
props = self.prop_map[self.render_engine]
|
||||
print(props)
|
||||
layout.prop(self, 'render_engine')
|
||||
layout.prop(self, 'render_engine', text='')
|
||||
for k, v in self.prop_map.items():
|
||||
if self.render_engine not in [k, 'ALL']:
|
||||
continue
|
||||
layout.label(text=k.capitalize())
|
||||
for prop in v:
|
||||
split = layout.split(factor=.1)
|
||||
split.prop(self, f'{prop}_toggle', icon_only=True)
|
||||
split.active = getattr(self, f'{prop}_toggle', False)
|
||||
split.prop(self, prop)
|
||||
|
||||
def execute(self, context):
|
||||
settings = context.scene.BSBST_settings
|
||||
|
Loading…
Reference in New Issue
Block a user