File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
client/ayon_cinema4d/plugins/publish Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ def files_resolver(
201201 """Return filepaths for all frames with given token path and
202202 layer names."""
203203 files : list [str ] = []
204+ token_path = self ._abspath (doc , token_path )
204205 for frame in range (
205206 render_instance .frameStartHandle ,
206207 render_instance .frameEndHandle + 1 ,
@@ -288,7 +289,6 @@ def _collect_multipass(
288289 render_data ,
289290 files_resolver
290291 ) -> dict [str , list [str ]]:
291-
292292 multipass_token_path : str = render_data [c4d .RDATA_MULTIPASS_FILENAME ]
293293 self .log .debug (
294294 f"Collected Multi-Pass Filepath: { multipass_token_path } "
@@ -392,3 +392,15 @@ def _collect_redshift_aovs(
392392
393393 products [aov_name ] = files
394394 return products
395+
396+ def _abspath (self , doc , path : str ) -> str :
397+ """Return absolute path from possibly relative path."""
398+ if os .path .isabs (path ):
399+ return path
400+
401+ project_folder : str = doc .GetDocumentPath ()
402+ abs_path : str = os .path .normpath (os .path .join (project_folder , path ))
403+ self .log .debug (
404+ f"Resolved relative path '{ path } ' to absolute path '{ abs_path } '"
405+ )
406+ return abs_path
You can’t perform that action at this time.
0 commit comments