1
$\begingroup$

I'm trying to create an unique identifier per face like so:

l_face_id = l_bm.faces.layers.int.new('id')

The problem comes when extruding or duplicating the faces, since the IDs gets duplicated. I saw there was this reported to implement and option to set the values to a default one when this happens:

https://projects.blender.org/blender/blender/issues/42865

It seems, this was never implemented, but in one of the comments someone mentions there is a "set_default" callback already, but I cannot find any documentation about it.

I have tried to set it like this:

l_face_id = l_bm.faces.layers.int.new(name='id', set=cb_set)

But I got this error: TypeError: new() takes no keyword arguments

Any idea how I can set a default value for cases like extruding? Or, if there is any other way I could create a unique identifier for faces that doesn't change when other faces get deleted or added?

$\endgroup$

0

You must log in to answer this question.

Browse other questions tagged .