Force Default Viewport on Maya Files while in StandAlone?

When a Maya file is opened, the file restores the Viewport Renderer that was active when it was saved.
If the viewport was 2.0, and the file is opened in standalone mode, it seems to be causing problems.

Aside from text-parsing the ascii files to set the renderer, are there any other options for forcing a renderer on a maya file?

thanks.

Is this true even if you disable restoring UI crap on scene load in the prefs?

upon further investigation, it may not be the viewport renderer. I am having trouble getting the “cgfxShader.mll” to load during initialization of maya standalone.

basically the same issue as this thread:

mayapy and mayabatch do not have a UI (unless something changed?). You can’t do anything that needs to have a UI open. Use a real copy of Maya instead…

So, you’re working on the file and saving and finding different view settings? Or is it that you can’t open files with cgfx shaders in them?

Yea, I don’t need a UI, i just need to process a bunch of files. some of the files try to load the cgfxPlugin and the plugin is failing to initialize because its trying to access the UI.

I suppose it’s not helpful to point out that the cgfx plugin for maya is junk and has created enormous wastes of time and energy?

You can run the whole thing in a GUI maya and kick off your batch process via the commandPort as a temporary workaround. If you need more detailed control, RPYC in ‘classic server’ mode would let you control the whole thing interactively from, eg, Eclipse or whatever) and send/receive messages and data.

If you locally compile CGFX.mll, you could make a non-functioning stub version and swap out the file :slight_smile:

I’ve had issues loading certain plugins in a mayapy session before, but was never able to find much information on it. Could it be a limitation of mayapy?

yea the cgfx plugin is junk… i was using it because it has a helpful vector node… but i suppose it’s time to find an alternative… :slight_smile: