Hello Ron,<div><br></div><div>I've been using Python API for some time and yes, the documentation is not that clear but if you put a attention you'll get what you want.</div><div><br></div><div>What I think you want to use in this case is not a Text but a Text3d. Text is for the TextEditor and Text3d is for the object that appears through the menu: Add>Text.</div>
<div><br></div><div>Hope this helps,</div><div><br></div><div>Nery Chucuy (idesisnery)<br><br><div class="gmail_quote">2009/10/5 Ron Wheeler <span dir="ltr"><<a href="mailto:rwheeler@artifact-software.com">rwheeler@artifact-software.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In general, the API documentation is terrible (examples use methods or<br>
properties that do not appear in the documentation,<br>
lots of properties and methods seem to work that are not documented)<br>
but I have not been able to find the sources for any of the<br>
documentation or find the code for the classes in the sources so I can<br>
read them for the whole story.<br>
<br>
I am currently stuck on trying to add Text to a scene as a child of a<br>
mesh that I want to animate with a script.<br>
<br>
The following code is supposed to generate a text Object that I can<br>
associate to a mesh as a child.<br>
<br>
It generates an error.<br>
The scn is OK and I can add a camara, a Lamp and a bunch of meshes to it<br>
but creating text in the scene does not seem to work.<br>
<br>
<br>
def makeTextObject(scn,name,text,type="top"):<br>
   myTxt=Text.New("MyText")<br>
   myTxt.write("test Text")<br>
   print "Made a text called " + myTxt.name<br>
<br>
   textOb = scn.objects.new(myTxt)    #Generates the TypeError<br>
<br>
   print "Made a Text object called " + textOb.name + "containing" + text<br>
   return textOb<br>
<br>
<br>
<br>
TypeError: expected an object and optionally a string as arguments<br>
<br>
x<br>
_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
</blockquote></div><br></div>