cgfx plugin not loading in mayapy, but loads in maya -batch

308 views
Skip to first unread message

jos...@z2.com

unread,
Jan 14, 2014, 3:55:47 AM1/14/14
to python_in...@googlegroups.com
Hey guys, I'm trying to run some batch operations in mayapy. I'm on OSX. The problem is when I when I load one of our scenes, I get an error saying the cgfx plugin won't load.

The error:
###
Warning: file: /path/to/file.ma line 213: Unrecognized node type 'cgfxShader'; preserving node information during this session.
File read in 0 seconds.
Warning: Errors have occurred while reading this scene that may result in data loss.
Error: file: /path/to/file.ma line 6: Unqualified video card : Offscreen contexts not supported. CgFx plugin will not be loaded.
Error: file: /path/to/file.ma line 6: initializePlugin function failed (cgfxShader)
###

Well that's a bummer. Cgfx is an essential part of our pipeline, and I need to get data from those materials. The error "Unqualified video card : Offscreen contexts not supported." doesn't seem to be true, because I can wrap the same scripts in a mel python command and run them from maya in batch mode. I tried loading the plugin, but got a similar error.


If I query the type of the node in mayapy, it returns 'unknown,' because the plugin failed to load.
###
>>> pm.PyNode('material_name').type()
u'unknown'
###

However, if I do this exact same thing in the standalone maya prompt I get no errors when the scene loads, and I can see that the object is of type cgfxShader...
###
mel: python("pm.PyNode('material_name').type()")
Result: cgfxShader
###

Anyone know how I might solve or troubleshoot this?

Marcus Ottosson

unread,
Jan 22, 2014, 7:03:14 AM1/22/14
to python_in...@googlegroups.com
Shot in the dark, but I'm running a laptop at home with dual graphics card controlled by Nvidia Optimus. I get into similar issues when Optimus decides to run a program (say, a game) using the wrong graphicscard. I solve it by insisting on running it with the more capable of the two. Perhaps when you run Maya, Optimus or whatever controller you may have, runs it using the appropriate card, but in batch it doesn't? You could probably find out by asking Maya what OpenGL version it's on in batch.



--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/7839bad3-14ec-4cf7-8392-4562d07a9d18%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Reply all
Reply to author
Forward
0 new messages