Skip to content

Commit 4ed4e4d

Browse files
author
Stephane Deverly
committed
For #14335 wip
1 parent 285cdbd commit 4ed4e4d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hooks/tk-multi-publish2/basic/collector.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ def collect_selected_assets(self, parent_item):
171171
sequence_edits = None
172172
# Iterate through the selected assets and get their info and add them as items to be published
173173
for asset in unreal_sg.selected_assets:
174-
if asset.asset_class == "LevelSequence":
174+
if asset.asset_class_path.asset_name == "LevelSequence":
175175
if sequence_edits is None:
176-
sequence_edits = self.retrieve_sequence_edits()
176+
sequence_edits = self.retrieve_sequence_edits(asset.asset_class_path)
177177
self.collect_level_sequence(parent_item, asset, sequence_edits)
178178
else:
179179
self.create_asset_item(
@@ -276,11 +276,12 @@ def collect_level_sequence(self, parent_item, asset, sequence_edits):
276276
# publishing.
277277
item.properties["edits_path"] = edits_path
278278

279-
def retrieve_sequence_edits(self):
279+
def retrieve_sequence_edits(self, class_path):
280280
"""
281281
Build a dictionary for all Level Sequences where keys are Level Sequences
282282
and values the list of edits they are in.
283283
284+
:param class_path: A :class:`TopLevelAssetPath`.
284285
:returns: A dictionary of :class:`unreal.LevelSequence` where values are
285286
lists of :class:`SequenceEdit`.
286287
"""
@@ -289,7 +290,7 @@ def retrieve_sequence_edits(self):
289290

290291
asset_helper = unreal.AssetRegistryHelpers.get_asset_registry()
291292
# 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)
293294
for lvseq_asset in all_level_sequences:
294295
lvseq = unreal.load_asset(unreal_sg.object_path(lvseq_asset), unreal.LevelSequence)
295296
# Check shots

0 commit comments

Comments
 (0)