fix: reset draw cam rotation

1.7.8

- fix: reset rotation in draw cam mode keep view in the same place (counter camera rotation)
- code: initial enhancement for palette linking
This commit is contained in:
Pullusb
2021-11-25 17:00:09 +01:00
parent 9389faed22
commit 78b70c8fca
7 changed files with 506 additions and 9 deletions
+16 -1
View File
@@ -855,4 +855,19 @@ def draw_kmi(km, kmi, layout):
# kmm = kc.keymaps.find_modal(kmi.idname)
# if kmm:
# draw_km(display_keymaps, kc, kmm, None, layout + 1)
# layout.context_pointer_set("keymap", km)
# layout.context_pointer_set("keymap", km)
def link_objects_in_blend(filepath, obj_name, link=True):
'''Link an object by name from a file, if link is False, append instead of linking'''
with bpy.data.libraries.load(filepath, link=link) as (data_from, data_to):
data_to.objects = [o for o in data_from.objects if o == obj_name] # c.startswith(obj_name)
return data_to.objects
def check_objects_in_blend(filepath, avoid_camera=True):
'''return a list of object name in file'''
with bpy.data.libraries.load(filepath, link=False) as (data_from, data_to):
if avoid_camera:
l = [o for o in data_from.objects if not 'camera' in o.lower()]
else:
l = [o for o in data_from.objects]
return l