2026-02-16

This commit is contained in:
2026-03-17 15:25:32 -06:00
parent d5dd373de0
commit 60100fbab2
560 changed files with 33397 additions and 20776 deletions
+11 -9
View File
@@ -124,7 +124,9 @@ def add_value(key, value):
apply_handles(key, handle_r, handle_l)
#calculate the difference between current value and the fcurve value
def add_diff(fcurves, path, current_value, eval_array):
def add_diff(fcurves, path, current_value, eval_array):
if eval_array is None:
return
array_value = current_value - eval_array
if not any(array_value):
return
@@ -160,7 +162,7 @@ class ScaleValuesOp(bpy.types.Operator):
for obj in context.selected_objects:
if obj.animation_data.action is None:
continue
fcurves = Tools.get_fcurves_channelbag(obj, obj.animation_data.action)
fcurves = Tools.get_fcurves(obj, obj.animation_data.action)
for fcu in fcurves:
if obj.mode == 'POSE':
if selected_bones_filter(obj, fcu.data_path):
@@ -255,7 +257,7 @@ def random_value(self, context):
for obj in context.selected_objects:
if obj.animation_data.action is None:
continue
fcurves = Tools.get_fcurves_channelbag(obj, obj.animation_data.action)
fcurves = Tools.get_fcurves(obj, obj.animation_data.action)
for fcu in fcurves:
if obj.mode == 'POSE':
if selected_bones_filter(obj, fcu.data_path):
@@ -306,8 +308,8 @@ def evaluate_array(fcurves, fcu_path, frame, array_default = [0, 0, 0]):
continue
fcu_array[i] = fcu.evaluate(frame)
if (fcu_array == array_default).all():
return None
# if (fcu_array == array_default).all():
# return None
return np.array(fcu_array)
def evaluate_layers(context, obj, anim_data, fcu, array_default):
@@ -363,7 +365,7 @@ def evaluate_layers(context, obj, anim_data, fcu, array_default):
frame_eval = last_frame - (frame_eval - strip.frame_start)
offset = (strip.frame_start * 1/strip.scale - strip.action_frame_start) * strip.scale
frame_eval = strip.frame_start * 1/strip.scale + (frame_eval - strip.frame_start) * 1/strip.scale - offset * 1/strip.scale
fcurves = Tools.get_fcurves_channelbag(obj, action)
fcurves = Tools.get_fcurves(obj, action)
eval_array = evaluate_blend_type(fcurves, eval_array, fcu_path, frame_eval, influence, array_default, blend_type, blend_types)
#Adding an extra layer from the action outside and on top of the nla
@@ -376,7 +378,7 @@ def evaluate_layers(context, obj, anim_data, fcu, array_default):
influence = anim_data.action_influence
blend_type = anim_data.action_blend_type
fcurves = Tools.get_fcurves_channelbag(obj, action)
fcurves = Tools.get_fcurves(obj, action)
eval_array = evaluate_blend_type(fcurves, eval_array, fcu_path, frame, influence, array_default, blend_type, blend_types)
anim_data.use_tweak_mode = tweak_mode
@@ -419,7 +421,7 @@ def evaluate_value(self, context):
if obj.mode == 'POSE':
bonelist = context.selected_pose_bones if ui.multikey.selectedbones else obj.pose.bones
fcurves = Tools.get_fcurves_channelbag(obj, action)
fcurves = Tools.get_fcurves(obj, action)
for fcu in fcurves:
if fcu in fcu_paths:
continue
@@ -453,7 +455,7 @@ def evaluate_value(self, context):
array_default = np.array(attr_default(obj, (fcu.data_path, fcu.array_index)))
eval_array = evaluate_layers(context, obj, anim_data, fcu, array_default)
if eval_array is None:
fcurves = Tools.get_fcurves_channelbag(obj, action)
# fcurves = Tools.get_fcurves(obj, action)
eval_array = evaluate_array(fcurves, fcu.data_path, context.scene.frame_current, array_default)
#calculate the difference between current value and the fcurve value