In V5, rs.ObjectsByType(n,state=1) got only visible, selectable objects. Objects that were locked, hidden or on locked or off layers were (correctly) ignored.
In V6, rs.ObjectsByType(n,state=1) is also getting “unselectable” objects that are not hidden or locked, but reside on off or locked layers.
I include here the definition of “normal objects”
Normal objects are visible, can be snapped to, and are independent of selection state
i.e. objects on off or locked layers are not to be considered “normal objects”
I noticed this because suddenly my scripted laser cutting time calculator started to give me some pretty wacky wrong numbers (much too high) - and after a bit of testing I understood why - it was counting everything on the off layers as well.
Please fix this soon… there’s a ton of scripts that will be invalidated by this change.
– as an emergency fix, I am now using
objs=[obj for obj in rs.ObjectsByType(n) if rs.IsObjectSelectable(obj)]
but again, there will be a lot of scripts (mine and others) that will need surgery.