Thanks Michal,

This was the kind of stuff I tried and this is what I get with Maya 2015sp6 on 
windows7:
--
RuntimeError: file 
S:\Maya_2015_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py 
line 4821: (kFailure): Object does not exist
--

The usual useful and descriptive error message. :)

Cheers,
Szabolcs


On Friday, December 4, 2015 at 2:15:30 PM UTC+1, Michał Frątczak wrote:
> try this:
> 
> tAttr = OpenMaya.MFnTypedAttribute()
> tAttr.create(name, name, OpenMaya.MFnData.kString, 
> OpenMaya.MFnStringData().create(default_value) )
> 
> W dniu 2015-12-04 o 14:10, Szabolcs Horvátth pisze:
> > Hi,
> >
> > I'd like to specify the default value of a string attribute of a node 
> > generated by a Python plugin.
> > Based on the C++ API docs I assume I have to use 
> > OpenMaya.MFnStringData() but I can't find any solution that actually 
> > works.
> >
> > Any tips and pointers are much appreciated!
> >
> > Cheers,
> > Szabolcs
> >

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/2931105a-8a17-47d7-b90d-2d8918748d4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to