Hi guys,
Just pushed a parametric objects for blender skeleton to make easy for any coder to start from.
Strong basis for any object, eg objects with child parent relationship like frame width door or window in it.
The sample script does not work!?
No panel creation and an error:
Traceback (most recent call last):
File "\parametric_object_skeleton.py", line 338, in execute
o = self.create(context)
File "\parametric_object_skeleton.py", line 325, in create
context.scene.link(o)
AttributeError: 'Scene' object has no attribute 'link'
location: <unknown location>:-1
Well, basically it’s a strong basis to dev parametric objects under Blender.
This one create a box, with a manipulate mode allowing changes of parameters right on screen.
For a (far) more complex application you could look at Archipack as those objects are based on this one.
Updated so now Rocks “out of the box”.
Clone the repo as .zip, then setup as usual.
Find the “ParametricObject” under regular primitives in your Create tab.
Create a parametric object, and then find the ui on bottom of the right panel of your 3d view (hit n)
Use manipulate button to show on screen handles allowing to resize your object.
Hi Stephen, this looks brilliant! Thank you for sharing, for free, and providing the sources on github no less! I wish I could donate something to you. Is it possible?
I’m not particularly skilled with coding, so I want to wait a little while before installing the addon. I will probably try after 2.79 is released. Maybe everything will be optimized by then. Anyways, this is pretty exciting!
Do you think it will be possible to use this with characters and shape keys by chance?
@emboo2 Hopefully at least Archipack will be released in contrib addons with blender 2.8, maybe even sooner. This one is by no means a production ready addon, simply a toolkit like to help other devs to start with parametric objects.
Parametric objects are a way to define a mesh depending on variables.
There is nothing magic behind this, only a lot of work to describe objects starting by any single vertex 3d coords, the way you bind your vertices with faces and so on for material indexes and uv textures coords.
In the code init.py you should see some methods (@properties) where you must return vetex locations, faces, material ids, and uv textures for your objects as arrays.
To get a better picture of what envolved for complex objects, you may take a look at archipack’s objects.
Parametric objects are a way to define a mesh depending on variables.
There is nothing magic behind this, only a lot of work to describe objects starting by any single vertex 3d coords, the way you bind your vertices with faces and so on for material indexes and uv textures coords.
In the code init.py you should see some methods (@properties) where you must return vetex locations, faces, material ids, and uv textures for your objects as arrays.
To get a better picture of what envolved for complex objects, you may take a look at archipack’s objects.