1
$\begingroup$

How can I delete a member of object.data.polygon_layers_float?

I only see a .new() function.

$\endgroup$
1
$\begingroup$

Maybe it's missing. Poke a developer to add the remove function for Mesh(ID).

You can delete it using bmesh, but it is pretty cumbersome.

import bpy
import bmesh

bm = bmesh.new()
bm.from_mesh(mesh)

layer = bm.faces.layers.float[layer_name]
bm.faces.layers.float.remove(layer)

bm.to_mesh(mesh)
bm.free()
mesh.update()
$\endgroup$
1
  • $\begingroup$ Wonderful. It works. It's awkward, but it's easy enough to enclose it in a function. $\endgroup$
    – supergra
    Nov 6 '14 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.