Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
Showing only changes of commit 204d07a201 - Show all commits

View File

@ -751,7 +751,7 @@ class BSBST_OT_render_setup(bpy.types.Operator):
] ]
) )
trans_pass_toggle: bpy.props.BoolProperty(default=True) 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 = { prop_map = {
'CYCLES':['trans_pass', 'CYCLES':['trans_pass',
@ -762,12 +762,16 @@ class BSBST_OT_render_setup(bpy.types.Operator):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
if self.render_engine == 'ALL': layout.prop(self, 'render_engine', text='')
props = [*v for k, v in self.prop_map] for k, v in self.prop_map.items():
else: if self.render_engine not in [k, 'ALL']:
props = self.prop_map[self.render_engine] continue
print(props) layout.label(text=k.capitalize())
layout.prop(self, 'render_engine') 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): def execute(self, context):
settings = context.scene.BSBST_settings settings = context.scene.BSBST_settings