Skip to main content
Question

Is there a way to identify if a node is truly visible?

  • December 29, 2023
  • 2 replies
  • 405 views

Neel_Sara

I know there’s a visible property that tells you if the node itself is visible or hidden, but one or more parents could be hidden while the actual node is visible, so visible would be true on the actual node. Is there an easy way to see if a node is truly visible, because all of its parents are visible? Would prefer not to traverse the node tree, as this seems inefficient.

Visible property: visible | Plugin API

This topic has been closed for replies.

tank666
  • December 29, 2023

You can check the absoluteRenderBounds property.


Gleb
  • Power Member
  • September 24, 2024

Just discovered this trick, just wanna share a simple example in case anyone else stumbles upon this:

absoluteRenderBounds can be used to check if node is actually visible on canvas, in case it’s not visible because one of its parents is invisible:

myNode.parent.visible // outputs false

myNode.visible // outputs true

myNode.absoluteRenderBounds // outputs null

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings