Blender 2.5 Python 3 references API

This is the first of many posts on the blender 2.5 with python 3. I am converting scripts and will post the scripts which work with 2.5 alpha2 and mark labels so that if you want to follow the scripts and get ahead of the game on implementing tools for blender 2.5 then this will be my main interest for a while. The code, references and scripts will be in posts with the blender25alpha2 label and so it should be easy to separate and when alpha 3 comes along then I will make a new label for that and remove the old label when they are updated.

There are lots of scripts and each presents an opportunity to learn something. As I stated in an earlier post, I am using meta-meta code generation, but it must end as usable python so that is what I will post.

Here is a link to python API again. I will code some simple demos and post the scripts here as they will all be modular enough so that if names change I can go back to the posts and just update each in turn as blender becomes settled.

I will get to the IRC when I have enough information to ask intelligent questions and keep what I learn here.

The image is of various mutations of a torus. It seems very simple to me, but there probably are some serious dependencies involved in doing this originally and in modifying the code. It uses sin and cos to create a torus. I have done the math to figure out how to step around a circle and step around another circle. If you are making steps to make a circle in segments it would be at sin,cos of an angle from 0- 2π radians. If I were to plot x,y of the angles on a graph and connect the segments then it would be a circle. In this case then we are centering the circles about another circle, which is the big radius. Wikipedia explains it quite well and so I won't labor that, see wiki torus

Having made tori in OpenGl, I have a feel for how to make different shapes by modification of the para-metrics of the object. The image shows three mutations on the form. The knowledge of math and topology is helpful when dealing with this.

The individual parts of the script register the method in the add menu and then is executed from there. This is the place where I would create the necessary moderators for make human and make ant as buttons and a means to add those as objects. Those would require a bit of genotype to phenotype magic, which is contained in the script and does not change because blender changes. So I will separate out the scripts that create the buttons to control the DNA, and the procedure which creates the vertices. I think I will do an animation of the process, which would be a growth from single cell to blastomere and then through the process of differentiation. blender 2.5 has some new tricks and I can take advantage of those to actually grow the organism as it is animated.

The code comes with blender and it should be understood that all of this is a derivative work and is thus GPL, and not to be used for commercial purpose, free to use.

So here it is, and I will reference each post to this so that nobody is fooled that this is anything other than GPL.

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

Make human with blender 2.5 is changed and so this is a link to that so I can keep up with the changes there.

Also plenty is going on with blender nation.

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen