Brushstroke Tools: Initial Version #328
@ -484,6 +484,41 @@ def set_brushstrokes_deformable(bs_ob, deformable):
|
||||
return
|
||||
utils.set_deformable(flow_ob, deformable)
|
||||
|
||||
class BSBST_OT_copy_flow(bpy.types.Operator):
|
||||
"""
|
||||
"""
|
||||
bl_idname = "brushstroke_tools.copy_flow"
|
||||
bl_label = "Copy Flow from Existing"
|
||||
bl_description = "Copy the flow object from another brushstroke layer."
|
||||
bl_options = {"REGISTER", "UNDO"}
|
||||
|
||||
source_bs: bpy.props.StringProperty(name="Brushstroke Layers")
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
settings = context.scene.BSBST_settings
|
||||
return bool(settings.context_brushstrokes)
|
||||
|
||||
def execute(self, context):
|
||||
settings = context.scene.BSBST_settings
|
||||
bs_ob = utils.get_active_context_brushstrokes_object(context)
|
||||
if not bs_ob:
|
||||
return {"CANCELLED"}
|
||||
|
||||
# get target object
|
||||
# set flow object
|
||||
# delete old flow
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
def draw(self, context):
|
||||
settings = context.scene.BSBST_settings
|
||||
layout = self.layout
|
||||
layout.prop_search(self, 'source_bs', settings, 'context_brushstrokes')
|
||||
|
||||
def invoke(self, context, event):
|
||||
return context.window_manager.invoke_props_dialog(self)
|
||||
|
||||
class BSBST_OT_switch_deformable(bpy.types.Operator):
|
||||
"""
|
||||
"""
|
||||
@ -883,6 +918,7 @@ classes = [
|
||||
BSBST_OT_delete_brushstrokes,
|
||||
BSBST_OT_duplicate_brushstrokes,
|
||||
BSBST_OT_copy_brushstrokes,
|
||||
BSBST_OT_copy_flow,
|
||||
BSBST_OT_switch_deformable,
|
||||
BSBST_OT_select_surface,
|
||||
BSBST_OT_init_preset,
|
||||
|
@ -224,11 +224,15 @@ class BSBST_MT_bs_context_menu(bpy.types.Menu):
|
||||
|
||||
op = layout.operator('brushstroke_tools.copy_brushstrokes', text='Copy to Selected Objects')
|
||||
op.copy_all = False
|
||||
|
||||
op = layout.operator('brushstroke_tools.copy_brushstrokes', text='Copy All to Selected Objects')
|
||||
op.copy_all = True
|
||||
|
||||
op = layout.operator('brushstroke_tools.switch_deformable')
|
||||
op.switch_all = False
|
||||
|
||||
op = layout.operator('brushstroke_tools.copy_flow')
|
||||
|
||||
class BSBST_PT_brushstroke_tools_panel(bpy.types.Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
|
Loading…
Reference in New Issue
Block a user