Page 1 of 1

Maya relative path issue with referencing

Posted: Thu Aug 24, 2023 12:42 pm
by virtualrepublic
Hi,

maybe anyone can explain to me if this is a general Maya issue with the command line rendering or CGRU is causing this?

I have a Maya scene with referenced scenes. In the Reference Editor I had to set manually the paths to relative by using ../

Locally it works fine. All references will be loaded when the project is set.

But CGRU is causing this error:
Warning: line 1: Could not open file. : ../MOUNTAIN_FOR_MOVIE/scenes/Mountain_modelling_v006_no_lights.mb
Warning: line 1: Could not open file. : ../CHARACTER/scenes/Pilot_sitting_in_Plane_Ref_v009.mb

My suspicion is that CGRU needs to set the Maya project to an ACTIVE project. This could be the reason because the active project defines the path for a relative path.

Thanks,
Michael

Re: Maya relative path issue with referencing

Posted: Thu Aug 24, 2023 2:15 pm
by timurhai
I think that there is the lack of Maya users on this forum.
Better to ask on Maya special forums, how to render via command line and use relative path issue with referencing.
Then I can fix or tell you how to fix Afanasy submission for Maya.

Re: Maya relative path issue with referencing

Posted: Thu Aug 24, 2023 6:02 pm
by virtualrepublic
Hi Timur,

the solution is pretty simple: We need a field where we can set the "project path".

Then you need to add to the render.exe the command "-proj "project_path".

mayarender -proj "project_path" -r file -s 779 -e 779 -b 1 -cam "camera_name" -rd "output_path" "maya_scene.mb"

This will set the project and the relative paths will work in my test.

Cheers,
Michael

Re: Maya relative path issue with referencing

Posted: Mon Aug 28, 2023 10:37 am
by timurhai
Hi Michael,

Submission script should find out the current project and append that argument to the command line.
Can you show your current command?

Can you execute

Code: Select all

import pymel.core as pm
print(pm.workspace(q=1, rootDirectory=1))
What is the output&