save startup to fix blender opening on 2nd monitor
This commit is contained in:
2026-03-24 14:03:54 -06:00
parent 9fcddeca02
commit e75144efca
28 changed files with 337 additions and 129 deletions
@@ -20,7 +20,7 @@
bl_info = {
"name": "Animation Layers",
"author": "Tal Hershkovich",
"version" : (2, 3, 4),
"version" : (2, 3, 5),
"blender" : (3, 2, 0),
"location": "View3D - Properties - Animation Panel",
"description": "Simplifying the NLA editor into an animation layers UI and workflow",
@@ -1049,13 +1049,13 @@ def only_selected_bones(self, context):
def data_type_update(self, context):
obj = self.id_data
anim_data = anim_data_type(obj)
obj.als['layer_index'] = 0
if anim_data is None:
obj.Anim_Layers.clear()
return
if not len(anim_data.nla_tracks):
obj.Anim_Layers.clear()
return
obj.als.layer_index = 0
register_layers(obj, anim_data.nla_tracks)
#change bake method if working with shapekeys
@@ -1980,12 +1980,14 @@ class AddAnimLayer(bpy.types.Operator):
#starting animation layers and getting the default sync layer names
obj.als.auto_rename = context.preferences.addons[__package__].preferences.auto_rename
#Adding base layer
obj.als['layer_index'] = 0
add_animlayer(base_name, index = 0, blend_type = blend_type)
#using a temporary variable instead of calling update_track_list all the time with obj.als.layer_index
index = 0
if anim_data.action:
add_animlayer(layer_name, blend_type = blend_type)
add_animlayer(layer_name, index, blend_type = blend_type)
index += 1
anim_data.action.use_fake_user = True
anim_data.action = None
@@ -2705,10 +2707,10 @@ class AddSlot(bpy.types.Operator):
return {'FINISHED'}
if not hasattr(anim_data, 'action_slot'):
return {'FINISHED'}
index = obj.als.layer_index
if not len(anim_data.nla_tracks[index].strips):
return {'FINISHED'}
index = obj.als.layer_index
strip = anim_data.nla_tracks[index].strips[0]
action = strip.action
@@ -2734,10 +2736,10 @@ class RemoveSlot(bpy.types.Operator):
return {'FINISHED'}
if not hasattr(anim_data, 'action_slot'):
return {'FINISHED'}
index = obj.als.layer_index
if not len(anim_data.nla_tracks[index].strips):
return {'FINISHED'}
index = obj.als.layer_index
strip = anim_data.nla_tracks[index].strips[0]
action = strip.action
action_slot = strip.action_slot
@@ -3260,7 +3262,12 @@ def add_action_slot(obj, action):
if action.slots:
for slot in action.slots:
if obj in slot.users():
if obj.als.data_type != slot.target_id_type:
continue
# Shapekey slot users are the shapekey data, object slot users are the objects
item = obj.data.shape_keys if hasattr(obj.data, 'shape_keys') and obj.als.data_type == 'KEY' else obj
if item in slot.users():
return slot
slot = action.slots.new(obj.als.data_type, obj.name)
@@ -1,16 +1,16 @@
{
"last_check": "2025-12-11 10:42:47.932340",
"backup_date": "",
"last_check": "2026-03-20 10:19:09.867653",
"backup_date": "December-11-2025",
"update_ready": true,
"ignore": false,
"just_restored": false,
"just_updated": false,
"version_text": {
"link": "https://gitlab.com/api/v4/projects/22294607/repository/archive.zip?sha=b3bccbaf23e3171ca198e64cb265eb9bf3810f21",
"link": "https://gitlab.com/api/v4/projects/22294607/repository/archive.zip?sha=3868a0c2bd99dde13a2d390a18ffb1db25883f17",
"version": [
2,
3,
5
7
]
}
}