Sequencer: correct fcurve map usage
This commit is contained in:
@@ -148,15 +148,14 @@ class SequencerFadesClear(Operator):
|
|||||||
|
|
||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
fcurves = context.scene.animation_data.action.fcurves
|
fcurves = context.scene.animation_data.action.fcurves
|
||||||
|
|
||||||
for sequence in context.selected_sequences:
|
|
||||||
animated_property = "volume" if hasattr(sequence, "volume") else "blend_alpha"
|
|
||||||
data_path = sequence.path_from_id() + "." + animated_property
|
|
||||||
fcurve_map = {
|
fcurve_map = {
|
||||||
curve.data_path: curve
|
curve.data_path: curve
|
||||||
for curve in fcurves
|
for curve in fcurves
|
||||||
if curve.data_path.startswith("sequence_editor.sequences_all")
|
if curve.data_path.startswith("sequence_editor.sequences_all")
|
||||||
}
|
}
|
||||||
|
for sequence in context.selected_sequences:
|
||||||
|
animated_property = "volume" if hasattr(sequence, "volume") else "blend_alpha"
|
||||||
|
data_path = sequence.path_from_id() + "." + animated_property
|
||||||
curve = fcurve_map.get(data_path)
|
curve = fcurve_map.get(data_path)
|
||||||
if curve:
|
if curve:
|
||||||
fcurves.remove(curve)
|
fcurves.remove(curve)
|
||||||
|
|||||||
Reference in New Issue
Block a user