viewRenderOverrideFromFragments API 2.0 SystemError

viewRenderOverrideFromFragments API 2.0 SystemError

Anonymous
Not applicable
702 Views
4 Replies
Message 1 of 5

viewRenderOverrideFromFragments API 2.0 SystemError

Anonymous
Not applicable

Hi,

 

I was trying to load viewRenderOverrideFromFragments example plugin from devkit but after loading it returns the following error 

"SystemError: error return without exception set" on line 157 of the example code.

 

Here is the source code from

http://help.autodesk.com/view/MAYAUL/2018/ENU//?guid=__py_ref_view_render_override_from_fragments_2p...

 

It errors out on line 157: 'params = self.getParameters()' - getParameters() is a function of MScenerRender

 

I did update plugin initialization path in the code. So just wondering am I doing something wrong while loading this plugin? or is this a bug within maya's internal getParameters() function code? I am assuming this is coming from python interpretation of C++.

 

Is there a way to get around with this problem? Any advice is greatly appreciated.

 

Thanks!

0 Likes
Accepted solutions (1)
703 Views
4 Replies
Replies (4)
Message 2 of 5

cheng_xi_li
Autodesk Support
Autodesk Support

Hi,

 

In pyGroundReflectionRenderer.py line 242, please add your plugin's path like below:

 

    pathToPlugin = 'E:/viewRenderOverrideFromFragments/'

 

 

Yours,

Li

0 Likes
Message 3 of 5

Anonymous
Not applicable

Hi Cheng,

 

I did add the path correctly in line 242 and plugin loaded successfully. The above-mentioned error is returned when I switch to a new viewRenderOverride viewport. 

 

For example, try running the below code in script editor:

 

import maya.api.OpenMaya as om
import maya.api.OpenMayaRender as omr
fsr = omr.MSceneRender('fr').getParameters()

 

Gives a SystemError on line 3, I assume it should return a python swig object but it returns an error when getParameters() function is called.

 

By any chance did it work for you after loading the plugin? 

 

Thanks a lot!

0 Likes
Message 4 of 5

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

After I set path to it

def initializePlugin(mobject):
    # NOTICE:  Please set the path to the plugin before running
    pathToPlugin = 'E:/viewRenderOverrideFromFragments/'

It worked. I've tested it before reply to you.

 

groundReflection.png

 

fsr = omr.MSceneRender('fr').getParameters() won't work because shaderFragment is missing in the renderer.

 

Add a shader fragment fsr = omr.MSceneRender('fr','mayaChecker').getParameters() will work. 

 

So the issue for that sample is plug-in failed to add shaderfragment. I guess path is still incorrect in your source code or shaders' folder and files are missing in the plugin path .

 

Yours,

Li 

Message 5 of 5

Anonymous
Not applicable

Hi Li,

 

Thank you very much for clarifying it and I really appreciate it! You were correct that there was something wrong with my path initialization. 

 

I changed it accordingly and now it works for me.

 

Thanks,

Shashank

 

 

 

0 Likes