Thanks Michał, it works nicely! I was almost there... :)

sz.


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/788a6a39-874c-4782-b61d-36dea51f434c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to