@@ -171,9 +171,9 @@ def collect_selected_assets(self, parent_item):
171
171
sequence_edits = None
172
172
# Iterate through the selected assets and get their info and add them as items to be published
173
173
for asset in unreal_sg .selected_assets :
174
- if asset .asset_class == "LevelSequence" :
174
+ if asset .asset_class_path . asset_name == "LevelSequence" :
175
175
if sequence_edits is None :
176
- sequence_edits = self .retrieve_sequence_edits ()
176
+ sequence_edits = self .retrieve_sequence_edits (asset . asset_class_path )
177
177
self .collect_level_sequence (parent_item , asset , sequence_edits )
178
178
else :
179
179
self .create_asset_item (
@@ -276,11 +276,12 @@ def collect_level_sequence(self, parent_item, asset, sequence_edits):
276
276
# publishing.
277
277
item .properties ["edits_path" ] = edits_path
278
278
279
- def retrieve_sequence_edits (self ):
279
+ def retrieve_sequence_edits (self , class_path ):
280
280
"""
281
281
Build a dictionary for all Level Sequences where keys are Level Sequences
282
282
and values the list of edits they are in.
283
283
284
+ :param class_path: A :class:`TopLevelAssetPath`.
284
285
:returns: A dictionary of :class:`unreal.LevelSequence` where values are
285
286
lists of :class:`SequenceEdit`.
286
287
"""
@@ -289,7 +290,7 @@ def retrieve_sequence_edits(self):
289
290
290
291
asset_helper = unreal .AssetRegistryHelpers .get_asset_registry ()
291
292
# Retrieve all Level Sequence assets
292
- all_level_sequences = asset_helper .get_assets_by_class ("LevelSequence" )
293
+ all_level_sequences = asset_helper .get_assets_by_class (class_path )
293
294
for lvseq_asset in all_level_sequences :
294
295
lvseq = unreal .load_asset (unreal_sg .object_path (lvseq_asset ), unreal .LevelSequence )
295
296
# Check shots
0 commit comments