Brushstroke Tools: Initial Version #328
@ -30,6 +30,7 @@ def find_context_brushstrokes(dummy):
|
|||||||
bs = settings.context_brushstrokes.add()
|
bs = settings.context_brushstrokes.add()
|
||||||
bs.name = ob.name
|
bs.name = ob.name
|
||||||
bs.method = ob['BSBST_method']
|
bs.method = ob['BSBST_method']
|
||||||
|
bs.hide_viewport_base = ob.hide_get()
|
||||||
if name_prev == ob.name:
|
if name_prev == ob.name:
|
||||||
idx = len(settings.context_brushstrokes)-1
|
idx = len(settings.context_brushstrokes)-1
|
||||||
if not settings.context_brushstrokes:
|
if not settings.context_brushstrokes:
|
||||||
@ -79,6 +80,16 @@ def set_brushstroke_name(self, value):
|
|||||||
flow_ob.name = flow_name
|
flow_ob.name = flow_name
|
||||||
flow_ob.data.name = flow_name
|
flow_ob.data.name = flow_name
|
||||||
|
|
||||||
|
def get_hide_viewport_base(self):
|
||||||
|
return self["hide_viewport_base"]
|
||||||
|
|
||||||
|
def set_hide_viewport_base(self, value):
|
||||||
|
self["hide_viewport_base"] = value
|
||||||
|
ob = bpy.data.objects.get(self.name)
|
||||||
|
if not ob:
|
||||||
|
return
|
||||||
|
ob.hide_set(value)
|
||||||
|
|
||||||
def get_active_context_brushstrokes_index(self):
|
def get_active_context_brushstrokes_index(self):
|
||||||
if not self.get('active_context_brushstrokes_index'):
|
if not self.get('active_context_brushstrokes_index'):
|
||||||
return 0
|
return 0
|
||||||
@ -137,6 +148,7 @@ class BSBST_modifier_info(bpy.types.PropertyGroup):
|
|||||||
class BSBST_context_brushstrokes(bpy.types.PropertyGroup):
|
class BSBST_context_brushstrokes(bpy.types.PropertyGroup):
|
||||||
name: bpy.props.StringProperty(default='', get=get_brushstroke_name, set=set_brushstroke_name)
|
name: bpy.props.StringProperty(default='', get=get_brushstroke_name, set=set_brushstroke_name)
|
||||||
method: bpy.props.StringProperty(default='')
|
method: bpy.props.StringProperty(default='')
|
||||||
|
hide_viewport_base: bpy.props.BoolProperty(default=False, get=get_hide_viewport_base, set=set_hide_viewport_base)
|
||||||
|
|
||||||
class BSBST_Settings(bpy.types.PropertyGroup):
|
class BSBST_Settings(bpy.types.PropertyGroup):
|
||||||
attach_to_active_selection: bpy.props.BoolProperty(default=True)
|
attach_to_active_selection: bpy.props.BoolProperty(default=True)
|
||||||
|
@ -121,6 +121,7 @@ class BSBST_UL_brushstroke_objects(bpy.types.UIList):
|
|||||||
bs_ob = bpy.data.objects.get(item.name)
|
bs_ob = bpy.data.objects.get(item.name)
|
||||||
if not bs_ob:
|
if not bs_ob:
|
||||||
return
|
return
|
||||||
|
row.prop(context_brushstroke, 'hide_viewport_base', icon_only=True, emboss=False, icon='HIDE_ON' if context_brushstroke.hide_viewport_base else 'HIDE_OFF')
|
||||||
row.prop(bs_ob, 'hide_viewport', icon_only=True, emboss=False)
|
row.prop(bs_ob, 'hide_viewport', icon_only=True, emboss=False)
|
||||||
row.prop(bs_ob, 'hide_render', icon_only=True, emboss=False)
|
row.prop(bs_ob, 'hide_render', icon_only=True, emboss=False)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user