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 a54213c3c8 - Show all commits

View File

@ -327,14 +327,17 @@ class BSBST_OT_copy_brushstrokes(bpy.types.Operator):
def execute(self, context):
settings = context.scene.BSBST_settings
surface_objects = [ob for ob in context.selected_objects if ob.type=='MESH' and not utils.is_brushstrokes_object(ob)]
active_surface_object = utils.get_surface_object(utils.get_active_context_brushstrokes_object(context))
surface_objects = [ob for ob in context.selected_objects
if ob.type=='MESH'
and not utils.is_brushstrokes_object(ob)
and not ob==active_surface_object]
if not surface_objects:
return {"CANCELLED"}
print(surface_objects)
if self.copy_all:
bs_objects = [bpy.data.objects.get(bs.name) for bs in settings.context]
bs_objects = [bpy.data.objects.get(bs.name) for bs in settings.context_brushstrokes]
bs_objects = [bs for bs in bs_objects if bs]
else:
bs_objects = [utils.get_active_context_brushstrokes_object(context)]