If you want to expand Blenders Add-menu with your own custom objects, this tutorial teaches you how to use simple Python scripting to do just that. The tutorial goes through the process of adding a custom plane to the Add=>Mesh-menu.
Go on and read the tutorial.
10 Comments
That's so cool!
Blenders gui api looks so simple to use.
This looks absolutely awesome! Hmmmm, what to add to the menu....
Yay! Now we can finally add teapots!
yeeeha!!!
I've been wondering about this a while ago.
Thanks!!!!
yay! someone add cornelius ;)
It would help if we had a script to generate the Mesh generation part of the script out of a real mesh. So if you model a teapot, you could have the vertex coordinates in a text file. Otherwise, it will be a hard hard job :-)
Thanks for sharing the tutorial !
ahh, a plane, but what about ultra-high-poly-15-subdiv-fractal-etc?
to malefico
just make the script read in the object data. Say, if you have a RenderMan .RIB file with SubsurfMesh made of tri/quad faces: loop through the faces and create them. it's as simple as that. There are three arrays you'd need to read in.
I'm sure you can do the same with .obj files, etc. Just insert the .obj data into the script and run the script... though... why not just use importer... anyway...
Open BPyAddMesh.py and look at the bottom.
There is a commented py script that can be used to write your own custom objects,
This wasnt included because we didnt want people to use this as a way to store a library of their own objects (library manager)
But if you want. you can copy it into a py file and write your meshes to scripts from the Mesh->Scripts menu.
Can you also add a function?
Like the Sphere function(s) (I don't think, the whole geometry is saved, for every single possible sphere)
That would make noidtluom's suggestion possible :D ( for fractals " + guiswitch for iterations )