migrate code to GPV3 (still problem with UV fill not set on point anymore)

This commit is contained in:
pullusb
2025-05-26 18:36:06 +02:00
parent 0bd062d212
commit 87c27c12d3
7 changed files with 50 additions and 36 deletions
+2 -2
View File
@@ -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,
+2 -2
View File
@@ -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),
))