Hi Szabolcs
Sorry for late reply, I missed your post.
Can't help with exact error message, but in case you haven't resolved it by 
now, here's a working code:

http://pastebin.com/SXwQUMB1



On Friday, December 4, 2015 at 9:00:56 PM UTC+1, 
szabolcs...@digicpictures.com wrote:
>
> 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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/d3d14ca4-6624-4ab3-a12a-01945e08d126%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to