ownmesh.jpgIf 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.



Related Posts


Related posts are selected automatically based on their content.


10 Responses to “Custom objects in Blender with Python”  

  1. 1 bob Edit Link

    That's so cool!
    Blenders gui api looks so simple to use.

  2. 2 Cuby Edit Link

    This looks absolutely awesome! Hmmmm, what to add to the menu….

  3. 3 Antiwhine Edit Link

    Yay! Now we can finally add teapots!

  4. 4 bimbo Edit Link

    yeeeha!!!

    I've been wondering about this a while ago.

    Thanks!!!!

  5. 5 Felix_Kütt Edit Link

    yay! someone add cornelius ;)

  6. 6 malefico Edit Link

    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 !

  7. 7 noidtluom Edit Link

    ahh, a plane, but what about ultra-high-poly-15-subdiv-fractal-etc?

  8. 8 daredemo Edit Link

    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…

  9. 9 Ideasman42 (Campbell Barton) Edit Link

    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.

  10. 10 kram1032 Edit Link

    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 )

Leave a Reply