migrate code to GPV3 (still problem with UV fill not set on point anymore)
This commit is contained in:
@@ -68,7 +68,7 @@ def setup_bg_camera(image_size, scene=None, cam_type=None):
|
||||
set_collection(anim_cam, 'Camera')
|
||||
return bg_cam
|
||||
|
||||
def import_planes(images, import_type='GPENCIL', mode='REPLACE', image_size=None):
|
||||
def import_planes(images, import_type='GREASEPENCIL', mode='REPLACE', image_size=None):
|
||||
scn = bpy.context.scene
|
||||
|
||||
existing_backgrounds = [(o, *img_info) for o in scn.objects \
|
||||
@@ -113,7 +113,7 @@ def import_planes(images, import_type='GPENCIL', mode='REPLACE', image_size=None
|
||||
bpy.data.objects.remove(current_bg)
|
||||
|
||||
# Import image
|
||||
if import_type == 'GPENCIL':
|
||||
if import_type == 'GREASEPENCIL':
|
||||
bg_img = import_image_as_gp_reference(
|
||||
image=str(image_path),
|
||||
pack_image=False,
|
||||
|
||||
@@ -49,9 +49,9 @@ class BPM_OT_import_bg_images(bpy.types.Operator, ImportHelper):
|
||||
## Choice to place before or after ?
|
||||
|
||||
import_type : EnumProperty(
|
||||
name="Import As", description="Type of import to ", default='GPENCIL', options={'ANIMATABLE'},
|
||||
name="Import As", description="Type of import to ", default='GREASEPENCIL', options={'ANIMATABLE'},
|
||||
items=(
|
||||
('GPENCIL', 'Gpencil Object', 'Import bg planes as gpencil objects', 0),
|
||||
('GREASEPENCIL', 'Gpencil Object', 'Import bg planes as gpencil objects', 0),
|
||||
('EMPTY', 'Empty Reference', 'Import bg planes as empty objects', 1),
|
||||
('MESH', 'Texture Plane', 'Import bg planes as mesh objects', 2),
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user