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

Unlock Detail Bug

$
0
0

1 post

Peter Schmidt (5chmidt) wrote:

Greetings,
I have noticed what I believe is a bug in rs.DetailLock(). Below is a small script I wrote to check my results. I am able to take an unlocked detail and lock it. But I am unable to take a locked detail and unlock it.

import rhinoscriptsyntax as rs

detail = rs.GetObject("select a detail", rs.filter.detail)

if detail: 
    print "Detail GUID: "+str(detail)
    Locked=rs.DetailLock(detail,None)
    print "Current State: "+str(Locked)
    if Locked==False:
        print "Attempted to Lock"
        rs.DetailLock(detail,True)
    else:
        print "Attempted to Unlock"
        rs.DetailLock(detail,False)

    print "Final Locked State: "+str(rs.DetailLock(detail,None))

Here are the print results I found from attempting to lock then unlock the same detail:

Detail GUID: ef51f89a-5af8-499c-beab-783ea5b03d66
Current State: False
Attempted to Lock
Final Locked State: True

Detail GUID: ef51f89a-5af8-499c-beab-783ea5b03d66
Current State: True
Attempted to Unlock
Final Locked State: True

If anyone could shed some light on this issue it would be great.
Thanks,
5chmidt


Viewing all articles
Browse latest Browse all 4131

Trending Articles