Brushstroke Tools: Initial Version #328
@ -117,15 +117,15 @@ def icon_from_link_type(link_type):
|
||||
else:
|
||||
return {k : i for i, k in enumerate(bpy.types.UILayout.bl_rna.functions["prop"].parameters["icon"].enum_items.keys())}[icon]
|
||||
|
||||
class BSBST_link_context_setting(bpy.types.PropertyGroup):
|
||||
class BSBST_socket_info(bpy.types.PropertyGroup):
|
||||
name: bpy.props.StringProperty(default='')
|
||||
link_context: bpy.props.BoolProperty(default=False, name='Link to Context')
|
||||
link_context_type: bpy.props.EnumProperty(default=1, name='Link to Context', update=update_link_context_type,
|
||||
items=link_context_type_items)
|
||||
|
||||
class BSBST_socket_info(bpy.types.PropertyGroup):
|
||||
class BSBST_modifier_info(bpy.types.PropertyGroup):
|
||||
name: bpy.props.StringProperty(default='')
|
||||
socket_info: bpy.props.CollectionProperty(type=BSBST_link_context_setting)
|
||||
socket_info: bpy.props.CollectionProperty(type=BSBST_socket_info)
|
||||
|
||||
class BSBST_context_brushstrokes(bpy.types.PropertyGroup):
|
||||
name: bpy.props.StringProperty(default='', get=get_brushstroke_name, set=set_brushstroke_name)
|
||||
@ -166,8 +166,8 @@ class BSBST_Settings(bpy.types.PropertyGroup):
|
||||
set=set_active_context_brushstrokes_index)
|
||||
|
||||
classes = [
|
||||
BSBST_link_context_setting,
|
||||
BSBST_socket_info,
|
||||
BSBST_modifier_info,
|
||||
BSBST_context_brushstrokes,
|
||||
BSBST_Settings,
|
||||
]
|
||||
@ -176,7 +176,7 @@ def register():
|
||||
for c in classes:
|
||||
bpy.utils.register_class(c)
|
||||
bpy.types.Scene.BSBST_settings = bpy.props.PointerProperty(type=BSBST_Settings)
|
||||
bpy.types.Object.modifier_info = bpy.props.CollectionProperty(type=BSBST_socket_info)
|
||||
bpy.types.Object.modifier_info = bpy.props.CollectionProperty(type=BSBST_modifier_info)
|
||||
|
||||
bpy.app.handlers.depsgraph_update_post.append(find_context_brushstrokes)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user