1
0
mirror of https://github.com/DarklightGames/io_scene_psk_psa.git synced 2024-09-23 18:48:26 +02:00

Fixed a bug where using the animation override would not correctly populate the NLA Track Strips list

This commit is contained in:
Colin Basnett 2024-05-19 14:31:14 -07:00
parent 7df032f504
commit 0202263dea

View File

@ -44,12 +44,13 @@ class PSA_PG_export_nla_strip_list_item(PropertyGroup):
def nla_track_update_cb(self: 'PSA_PG_export', context: Context) -> None:
self.nla_strip_list.clear()
if context.object is None or context.object.animation_data is None:
return
match = re.match(r'^(\d+).+$', self.nla_track)
self.nla_track_index = int(match.group(1)) if match else -1
if self.nla_track_index >= 0:
nla_track = context.object.animation_data.nla_tracks[self.nla_track_index]
animation_data = get_animation_data(self, context)
if animation_data is None:
return
nla_track = animation_data.nla_tracks[self.nla_track_index]
for nla_strip in nla_track.strips:
strip: PSA_PG_export_nla_strip_list_item = self.nla_strip_list.add()
strip.action = nla_strip.action