Update for blender 5+ with retro-compatibility
- Added version check to keep addon compatible with previous version - Some feature are still broken (e.g: realign, broken since 4.3's gpv3) - note: DIR_PATH string property do not accept relative path since Blender 5.0. preferences brush_path,output_path and playblast_path had "//" by default. those props are turned to stnadard string for now
This commit is contained in:
@@ -165,9 +165,9 @@ class GPTB_OT_import_obj_palette(Operator):
|
||||
# self.report({'WARNING'}, 'All materials are already in other selected object')
|
||||
|
||||
# unlink objects and their gp data
|
||||
data_source = bpy.data.grease_pencils if bpy.app.version >= (5, 0, 0) else bpy.data.grease_pencils_v3
|
||||
for src_ob in linked_objs:
|
||||
bpy.data.grease_pencils_v3.remove(src_ob.data)
|
||||
|
||||
data_source.remove(src_ob.data)
|
||||
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user