On 07/04/2017 at 09:56, xxxxxxxx wrote:
I was curious about the proper way to delete a layer with python. I know you can get the layer and do layer.Remove() which does delete the layer but it leaves the scene in a weird state sometimes. If I have objects solo'd when I use layer.Remove() it leaves all objects solo'd even though the layer is gone.
Is there a proper way to go about this?
On 10/04/2017 at 08:48, xxxxxxxx wrote:
import c4d def main() : l = op.GetLayerObject(doc) if l is None: return l.Remove() doc.ChangeNBit(c4d.NBIT_SOLO_LAYER, c4d.NBITCONTROL_CLEAR) c4d.EventAdd() if __name__=='__main__': main()
On 10/04/2017 at 12:01, xxxxxxxx wrote:
That did it, thanks Andreas!