Some Questions about Blender API

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
KoRn
Posts: 0
Joined: Thu May 17, 2007 12:15 pm

Some Questions about Blender API

Post by KoRn » Wed May 30, 2007 12:47 pm

Hi guys,

I,m currently working on a script to show graphs in Blender and I have got some questions about Blender API and it's functions. I hope sombody can help me. It'll be great.

Here are my questions:

1) How can I create materials for Text3d objects? I don't find something like myText.materials to assign a material.

2) Is there a possibility to use the function "Center New" in Python or should I implement it by my own?

3) How can I smooth a mesh? I know there is a method like mesh.smooth() but I think it does not work the way I want to use it.

4) If I create a Cube with Mesh.Primitives it isn't really a cube. It's a little bit higher than a cube. Is this a normal thing?

reD_Fox
Posts: 0
Joined: Sat Mar 12, 2005 2:56 pm
Location: Abilene, KS

Post by reD_Fox » Mon Jun 04, 2007 6:51 pm

Hello,

I'm not able to answer your questions to the extent that they deserve, but perhaps I can provide a little help anyway.

1) I haven't looked into it, but I'm assuming you can't. I'm pretty sure lamps have the same issue. Basically, you need a mesh in python before you can access materials.

2) eeh. I'm not positive, but I don't think there is.

3) I don't know the answer to either one, but do you mean "smooth" as in the "smooth button" in the edit button panels (where the vertices are relaxed), or "smooth" as in the "set smooth" button (where the vertices' normals are interpolated)?

4) This is a known issue, and I think it's been fixed in the current development code.

Also, you may consider checking out the BlenderArtists.org python forum since it is a bit more frequented (you have a better chance of getter more help faster):
http://blenderartists.org/forum/forumdisplay.php?f=11

Levi
A three-legged stool never wobbles.

Post Reply