[Bf-python] TypeError adding Text to a scene

Ron Wheeler rwheeler at artifact-software.com
Fri Oct 9 16:42:26 CEST 2009


Nery Chucuy wrote:
> There you go again saying whatever it comes to your mind just because 
> you cannot click on the right place. 
>
> New and Get methods are related to the whole module. But if you click 
> Text3D under "Classes" (left panel) you'll see all the descriptions of 
> the class methods. Is it so complicated to click on the right place?

You are right. It is easy to click on the right place once you know that 
the information is presented in layers. I guess that I was in a hurry 
and did not see the need to click on Text3d when I appeared to already 
be on the Text3d page and had the constructor and 1 function already in 
view.


I am used to documentation from the Java community which is pretty well 
organized.
I am not sure about the "whole Module" concept but once one realizes 
that the documentation is layered the way it is, it does get easier to 
find things.
The function and property descriptions are frequently very rudimentary 
and could use some extra words and examples of usage in some cases.

I really appreciate the time that you have taken to help get me started.

Am I correct that the API documentation is missing from the trunk or am 
I looking in the wrong place there?

Would my example be a useful addition to the documentation?

Why is Text3d described as a "Font" object. Font usually has a very 
specific meaning that describes only one small aspect of a text object? 
Is that pervasive through the whole Blender documentation or is it 
something that could be clarified.

With your help, I am making pretty good progress on achieving what I 
want to do.

Thanks

Ron

>
> Nery Chucuy (idesisner)
>
> 2009/10/7 Ron Wheeler <rwheeler at artifact-software.com 
> <mailto:rwheeler at artifact-software.com>>
>
>     Thanks
>     That was a great help.
>
>     I was looking in the trunk of the svn and
>     source/blender/python/api2_2x/doc/  does not exist.
>
>     But since you told me what I was looking for, I started working
>     through the tags and found it right away.
>
>     If you look at the API description to Text3d
>     http://www.blender.org/documentation/249PythonDoc/
>
>     It says:
>
>     This module provides access to *Font* objects in Blender.
>
>     Example:
>
>            import Blender
>            from Blender import Curve, Object, Scene, Text3d
>            txt = Text3d.New("MyText")  # create a new Text3d object called MyText
>            scn = Scene.GetCurrent()    # get current scene
>            ob = scn.objects.new(txt)   # create an object from the obdata in the current scene
>            ob.makeDisplayList()        # rebuild the display list for this object
>            Window.RedrawAll()
>         
>
>
>     This is really not helpful.
>     What ##*&* is a "Font" object? That is not a term that a normal
>     person would use to describe what you get. "Access" is only part
>     of what it does. It also enables you  to create new ones.
>
>     According to the rest of the page there are only 2 functions "New"
>     and "get".
>
>     I find it hard to believe that the rest of the Text3d functions
>     are deprecated.
>
>     A quick look at the sources shows that there are more functions
>     with descriptions. Why are they not showing up in the documentation?
>
>     The example would be a lot more hellpful if it actually showed how
>     to get the text that you want into your scene.
>     I would also change the comments to relate a bit better to what
>     the user wants to do not some unrelated discussion of internal
>     functioning.
>     "obdata" is not defined or referenced in the documentation.
>
>            import Blender
>
>            from Blender import Curve, Object, Scene, Text3d
>
>            txt = Text3d.New("MyText")  		# create a new Text3d object called MyText
>
>            txt.setText("Words I want on the scene")  # associate the text "Words I want on the scene" with the text object
>
>            scn = Scene.GetCurrent()    		# get current scene
>
>            ob = scn.objects.new(txt)   		# create an object saying "Words I want on the scene"  in the current scene
>
>            ob.makeDisplayList()        # rebuild the display list for this object - WHY??? DO I ALWAYS NEED TO DO THIS WITH Text3d?
>
>            Window.RedrawAll()
>
>         
>
>
>
>     I realize that documentation is hard to write for programmers
>     since they are frequently too knowledgeable to understand what has
>     to be explained  and are often not application oriented.
>     Adding second language issues does not make it better.
>
>
>     How can I fix the source so that the Text3D description:
>     - has a useful example - once I figure out how, I would add the
>     setting of the string (as above) and changing the font, the size,
>     the alignment, orientation and perhaps even show it being extruded.
>     - describes where the object appears on the screen and how to
>     change its orientation and location
>     - has ALL the non-deprecated functions listed and the deprecated
>     function listed with a note that it is deprecated.
>
>     Why are the rest of the functions not showing up in the
>     documentation? They seem to actually have descriptions. It is hard
>     to use objects with most of the methods and properties undocumented.
>
>
>     Ron
>
>
>
>     Nery Chucuy wrote:
>>
>>     2009/10/5 Ron Wheeler <rwheeler at artifact-software.com
>>     <mailto:rwheeler at artifact-software.com>>
>>
>>         ...
>>         Any idea about where to find the sources for the documentation?
>>         I would not mind putting some effort into fixing things where
>>         I can.
>>
>>
>>     At least on 2.4x python api documentation is on the folder:
>>
>>     source/blender/python/api2_2x/doc/
>>      
>>     However I don't think it worth for 2.4x maybe you can help to do
>>     that on 2.5.About that you can ask to Campbell Barton ( ideasman
>>     on IRC).
>>
>>     Regards,
>>
>>     Nery Chucuy (idesisnery)
>>     ------------------------------------------------------------------------
>>     _______________________________________________ Bf-python mailing
>>     list Bf-python at blender.org <mailto:Bf-python at blender.org>
>>     http://lists.blender.org/mailman/listinfo/bf-python
>
>
>     _______________________________________________
>     Bf-python mailing list
>     Bf-python at blender.org <mailto:Bf-python at blender.org>
>     http://lists.blender.org/mailman/listinfo/bf-python
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python
>   




More information about the Bf-python mailing list