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:
Pullusb
2025-12-15 23:57:57 +01:00
parent 9fd3b4af83
commit 9d2644eb9f
11 changed files with 153 additions and 107 deletions
+2 -2
View File
@@ -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"}