as I couldn't figure out why MSwatchRenderRegister is crashing, I decided to fallback to the old method for setup a render swatch, using:
OpenMayaUI.MHWShaderSwatchGenerator.initialize() this time it doesn't crash, but MHWShaderSwatchGenerator.initialize() returns a "Swig Object of type 'MString *'" instead of return a proper python string. I supose this is a maya bug... but I was wondering if someone here has experience dealing with Boost Swig objects... Is it possible to access the string stored inside the MString object using some method of the Swig Object? Its really frustating getting to a dead end on this after so much research... plz help!! [image: :)] -H On Tue, Apr 14, 2009 at 1:21 AM, Hradec <[email protected]> wrote: > > > I'm trying to create a new hardware shader node in python, but I'm running > into a problem when registering a new renderSwatch for my node. > > maya crashes when running: > > OpenMayaRender.MSwatchRenderRegister.registerSwatchRender(swatchName, > OpenMayaUI.MHWShaderSwatchGenerator.createObj ) > > I'm following the hlslShader C++ example plugin to setup the swatch, but > for some reason it crashes in python... > > thanks for any help or comments! [image: :)] > > -- > Hradec > -- Hradec --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/python_inside_maya -~----------~----~----~----~------~----~------~--~---
