.hidden property and groups (scripting)
All  1-4  5-6

Previous
Next
 From:  Michael Gibson
11120.5 In reply to 11120.4 
Hi Peer,

re:
> Showing the top-level parent group causes everything in that group to get shown, which is not what I want.

Right, but that's not the complete operation, after everything is shown you can then set what you want hidden to obj.hidden = true; without needing to do any climbing up group parent trees.


> Two things that caused some trouble are:
>
> Setting hidden = true on a non-group object fails to set hidden = true on sub-objects
> .getSubObjects() operates recursively rather than just giving immediate children

There isn't really any way to change this behavior without potentially breaking already existing scripts.

But if you want to get only the immediate children of a group, there is an .objects property on a group that will give that.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  pressure (PEER)
11120.6 In reply to 11120.5 
Hi Michael,

Thanks for reiterating that the way to do this is by showing everything and then hiding the stuff I want hidden. It took me a little while, but now I think I see what you meant and why this isn't built into setting hidden = false.

Good to know about the .objects property, though like you were hinting, I didn't end up needing it.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-4  5-6