Skip to content

Commit f9276e0

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

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ def collect_selected_assets(self, parent_item):
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:
174174
if asset.asset_class_path.asset_name == "LevelSequence":
175+
self.logger.warning("%s.%s"% (asset.asset_class_path.package_name, asset.asset_class_path.asset_name))
175176
if sequence_edits is None:
176-
sequence_edits = self.retrieve_sequence_edits(asset.asset_class_path)
177+
sequence_edits = self.retrieve_sequence_edits()
177178
self.collect_level_sequence(parent_item, asset, sequence_edits)
178179
else:
179180
self.create_asset_item(
@@ -276,21 +277,20 @@ def collect_level_sequence(self, parent_item, asset, sequence_edits):
276277
# publishing.
277278
item.properties["edits_path"] = edits_path
278279

279-
def retrieve_sequence_edits(self, class_path):
280+
def retrieve_sequence_edits(self):
280281
"""
281282
Build a dictionary for all Level Sequences where keys are Level Sequences
282283
and values the list of edits they are in.
283284
284-
:param class_path: A :class:`TopLevelAssetPath`.
285285
:returns: A dictionary of :class:`unreal.LevelSequence` where values are
286286
lists of :class:`SequenceEdit`.
287287
"""
288288
sequence_edits = defaultdict(list)
289289
unreal_sg = sgtk.platform.current_engine().unreal_sg_engine
290-
290+
lclass = unreal.TopLevelAssetPath("/Script/LevelSequence", "LevelSequence")
291291
asset_helper = unreal.AssetRegistryHelpers.get_asset_registry()
292292
# Retrieve all Level Sequence assets
293-
all_level_sequences = asset_helper.get_assets_by_class(class_path)
293+
all_level_sequences = asset_helper.get_assets_by_class(lclass)
294294
for lvseq_asset in all_level_sequences:
295295
lvseq = unreal.load_asset(unreal_sg.object_path(lvseq_asset), unreal.LevelSequence)
296296
# Check shots

0 commit comments

Comments
 (0)