I have a selection of polygons that I plan to extrude individually, but I need the distance each polygon is extruded to be proportional to the area of the polygon, so that larger polygons are extruded farther than smaller polygons.
I figure I loop through the active selection of polygons, get the area of the polygon, use the
Extrude Individual and Move tool with the extrusion distance equal to the polygon area times some scale factor.
But I'm not sure where to start — I assume the selection of polygons must be accessible through
context, though I haven't found it yet. And I'm not sure how to use the
bpy.ops.view3d.edit_mesh_extrude_individual_move() tool either, but that too seems like it should be very straight forward, I just can't seem to find my footing.
This also seems like it would make for a good option on the extrude tools. To get really fancy we could even allow for a user entered formula to determine the relationship between the polygon area and the extrusion distance, which I suspect could lead to novel results. Recursive extrusions with arbitrary or random tilts or scaling could make for an interesting tool too, though all that is way beyond what I'm looking to do here.