Fixed a bug in get_nla_strips_in_timeframe
This commit is contained in:
@@ -27,7 +27,9 @@ def get_nla_strips_in_timeframe(object, frame_min, frame_max) -> List[NlaStrip]:
|
|||||||
strips = []
|
strips = []
|
||||||
for nla_track in object.animation_data.nla_tracks:
|
for nla_track in object.animation_data.nla_tracks:
|
||||||
for strip in nla_track.strips:
|
for strip in nla_track.strips:
|
||||||
if strip.frame_start >= frame_min and strip.frame_end <= frame_max:
|
if (strip.frame_start < frame_min and strip.frame_end > frame_max) or \
|
||||||
|
(frame_min <= strip.frame_start < frame_max) or \
|
||||||
|
(frame_min < strip.frame_end <= frame_max):
|
||||||
strips.append(strip)
|
strips.append(strip)
|
||||||
return strips
|
return strips
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ class PsaBuilder(object):
|
|||||||
pass
|
pass
|
||||||
elif options.sequence_source == 'TIMELINE_MARKERS':
|
elif options.sequence_source == 'TIMELINE_MARKERS':
|
||||||
sequence_frame_ranges = self.get_timeline_marker_sequence_frame_ranges(armature, context, options)
|
sequence_frame_ranges = self.get_timeline_marker_sequence_frame_ranges(armature, context, options)
|
||||||
|
|
||||||
for name, (frame_min, frame_max) in sequence_frame_ranges.items():
|
for name, (frame_min, frame_max) in sequence_frame_ranges.items():
|
||||||
export_sequence = ExportSequence()
|
export_sequence = ExportSequence()
|
||||||
export_sequence.action = None
|
export_sequence.action = None
|
||||||
@@ -142,9 +143,10 @@ class PsaBuilder(object):
|
|||||||
|
|
||||||
frame_min = export_sequence.frame_min
|
frame_min = export_sequence.frame_min
|
||||||
frame_max = export_sequence.frame_max
|
frame_max = export_sequence.frame_max
|
||||||
|
frame_count = frame_max - frame_min + 1
|
||||||
|
|
||||||
psa_sequence.name = bytes(export_sequence.name, encoding='windows-1252')
|
psa_sequence.name = bytes(export_sequence.name, encoding='windows-1252')
|
||||||
psa_sequence.frame_count = frame_max - frame_min + 1
|
psa_sequence.frame_count = frame_count
|
||||||
psa_sequence.frame_start_index = frame_start_index
|
psa_sequence.frame_start_index = frame_start_index
|
||||||
psa_sequence.fps = context.scene.render.fps
|
psa_sequence.fps = context.scene.render.fps
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user