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.