Begin port to GPv3 - change GP type
This commit is contained in:
@@ -45,7 +45,7 @@ class GPTB_OT_import_obj_palette(Operator):
|
||||
|
||||
def execute(self, context):
|
||||
## get targets
|
||||
selection = [o for o in context.selected_objects if o.type == 'GPENCIL']
|
||||
selection = [o for o in context.selected_objects if o.type == 'GREASEPENCIL']
|
||||
if not selection:
|
||||
self.report({'ERROR'}, 'Need to have at least one GP object selected in scene')
|
||||
return {"CANCELLED"}
|
||||
@@ -98,7 +98,7 @@ class GPTB_OT_import_obj_palette(Operator):
|
||||
return {"CANCELLED"}
|
||||
|
||||
for i in range(len(linked_objs))[::-1]: # reversed(range(len(l))) / range(len(l))[::-1]
|
||||
if linked_objs[i].type != 'GPENCIL':
|
||||
if linked_objs[i].type != 'GREASEPENCIL':
|
||||
print(f'{linked_objs[i].name} type is "{linked_objs[i].type}"')
|
||||
bpy.data.objects.remove(linked_objs.pop(i))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user