Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5804

Problems with multiple layer naming in one command

$
0
0

@Alberto wrote:

After running this script

import rhinoscriptsyntax as rs
from scriptcontext import doc

def main():
  layer = doc.Layers[0]

  layer.Name = "One"
  layer.CommitChanges()

  layer.Name = "Two"
  layer.CommitChanges()


if __name__ == "__main__":
  main()

if undoing it, the layer name will be "One" rather then the initial name. Am I doing something wrong?

Thanks a lot
Alberto

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5804

Trending Articles