From 8bb0c2779113aaa4ec1b8681a3d89232912fface Mon Sep 17 00:00:00 2001 From: DMO Date: Mon, 9 May 2022 17:21:47 +0900 Subject: [PATCH] Removing attr check and explaining in a comment. --- .../publish/extract_multiverse_usd_comp.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_multiverse_usd_comp.py b/openpype/hosts/maya/plugins/publish/extract_multiverse_usd_comp.py index 7bd7768da6..e6bc0c68b5 100644 --- a/openpype/hosts/maya/plugins/publish/extract_multiverse_usd_comp.py +++ b/openpype/hosts/maya/plugins/publish/extract_multiverse_usd_comp.py @@ -113,12 +113,18 @@ class ExtractMultiverseUsdComposition(openpype.api.Extractor): time_opts.framePerSecond = fps comp_write_opts = multiverse.CompositionWriteOptions() - if not hasattr(comp_write_opts, "forceAbsolutePaths"): - self.log.warning("multiverse.CompositionWriteOptions is " + - "missing 'forceAbsolutePaths', extract " + - "will yield incorrect reference paths.") - else: - comp_write_opts.forceAbsolutePaths = True + + """ + OP tells MV to write to a staging directory, and then moves the + file to it's final publish directory. By default, MV write relative + paths, but these paths will break when the referencing file moves. + This option forces writes to absolute paths, which is ok within OP + because all published assets have static paths, and MV can only + reference published assets. When a proper UsdAssetResolver is used, + this won't be needed. + """ + comp_write_opts.forceAbsolutePaths = True + options_discard_keys = { 'numTimeSamples', 'timeSamplesSpan',