New primitives through Python?

Hi!

Recently started with Blender, and I’m doing pretty much all of my modeling and animating through Python. I’m most used to Java though, which is an object-oriented language.

Essentially, what I’m after is being able to define my own primitives through Python in an object-oriented fashion. For instance, creating a “pyramid” primitive and then being able to change its height and base as a whole (obviously, with written functions for dealing with all the vertices and faces). Can this even be done? If so, is there a resource that points me in the right direction (or even a quick code example)?

Short answer: No, at least not by design. I’ve written a length reply on a similar question here.

Having said that, it would be possible to create your own system for such parametric objects. Addons like Sverchok show that the API can be pushed pretty far, but that approach is not without peril.

I feared as much, but I tried to hold out on hope. I suppose I’ll have to try to solve it some other way. Thanks for the answer!

", creating a “pyramid” primitive and then being able to change its height and base as a whole "

can you elaborate a little more !
do you need parametric objects ?
that can be changed after being created ?

it is easy to create primitives with python but not really as parametric objects
it is possible but complicated to do

happy bl