Blender addon: scale attributes of metaball elements

Blender has had some support for metaballs since ages yet the amount of development love they get is not much: some attributes of the individual metaball elements are not exposed to the Python API (like select) and/or are not exposed in the interface. It is for example not possible to change the initial radius of an element once created and it is also not possible to change the stiffness or size attributes for any element but the active one (the S key scales the position of the elements).

This is quite annoying because for some voxel based visualizations metaballs are actually quite nice and the implementation in Blender is reasonably fast too. In order to remedy some of the missing featues I created a small add-on that allows you to scale the radius, stiffness and size attributes of all elements of a selected metaball.

Example

Once installed the operator is available in edit mode under the Metaballs menu. When selected it offers the attributes in the operator panel in your 3d-view toolbaar (press ctrl-T if the toolbar is not visible)

Note that scaling any of those attributes will affect all elements in the metaball object because as explained earlier the select status of individual elements is not exposed to the Python API so unfortunately we have no way of limiting the activity.

Code availability

The code is available on my GitHub repository (you might need to right-click and select File->Save As ... or equivalent depending on your browser)

No comments:

Post a Comment