+ Reply to Thread
Results 1 to 3 of 3

Thread: Adding Layers in "Redraw(False)" Mode

  1. #1

    Adding Layers in "Redraw(False)" Mode

    Hi Steve,

    while scripting I found out, that layers, when added in "Redraw(False)" mode are not updated in the layer manager.

    Check out the script below.

    python Code:
      import rhinoscriptsyntax as rs
       
       
      def StartScript():
         
          rs.EnableRedraw(False)
         
          for i in xrange(20):       
              layer_name = rs.AddLayer("New Layer Nr. %d" % i)
         
              pt_id = rs.AddPoint([i,i,0])
              rs.ObjectLayer(pt_id, layer_name)
         
          rs.EnableRedraw(True)
          rs.Redraw()
         
      StartScript()

    - Thanks
    Martin

  2. #2
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    Thanks Martin, I forwarded this to Dale Fugier who write the layer manager UI. He'll have a much better idea of what is going on than me.
    -Steve

  3. #3
    Senior Member Steve Baer's Avatar
    Join Date
    Apr 2010
    Location
    Seattle
    Posts
    1,472
    Blog Entries
    19
    Hi Martin,
    I added some code that should fix this in the next V5 beta.
    Thanks,
    -Steve

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts