remap relative off, realign obj
1.1.0: - Important change : Remap relative is now disabled by default in addon preferences - feat: Add realign operator in sidebar with reproject as true by default - UI: Batch reproject all frames is now in menus. Same places as native reproject
This commit is contained in:
+5
-2
@@ -15,7 +15,7 @@ bl_info = {
|
||||
"name": "GP toolbox",
|
||||
"description": "Set of tools for Grease Pencil in animation production",
|
||||
"author": "Samuel Bernou",
|
||||
"version": (1, 0, 9),
|
||||
"version": (1, 1, 0),
|
||||
"blender": (2, 91, 0),
|
||||
"location": "sidebar (N menu) > Gpencil > Toolbox / Gpencil properties",
|
||||
"warning": "",
|
||||
@@ -74,11 +74,14 @@ from pathlib import Path
|
||||
|
||||
@persistent
|
||||
def remap_relative(dummy):
|
||||
# try:
|
||||
all_path = [lib for lib in bpy.utils.blend_paths(local=True)]
|
||||
bpy.ops.file.make_paths_relative()
|
||||
for i, lib in enumerate(bpy.utils.blend_paths(local=True)):
|
||||
if all_path[i] != lib:
|
||||
print('Remapped:', all_path[i], '\n>> ', lib)
|
||||
# except Exception as e:
|
||||
# print(e)
|
||||
|
||||
def remap_on_save_update(self, context):
|
||||
pref = get_addon_prefs()
|
||||
@@ -150,7 +153,7 @@ class GPTB_prefs(bpy.types.AddonPreferences):
|
||||
use_relative_remap_on_save : BoolProperty(
|
||||
name="Relative Remap On Save",
|
||||
description="Always remap all external path to relative when saving\nNeed blender restart if changed",
|
||||
default=True,
|
||||
default=False,
|
||||
update=remap_on_save_update
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user