Getting an active page
-
There is no method like model.active_page and PagesObserver doesn't return a 'page' object on the onContentsModified(pages) call. So, is there a way to get the active (selected) page from the API?
V.
-
-
Don't you just love the consistency of the API?
-
Haha, yeah
-
Hah, nice
Thank got this method is even existThanks a lot!
-
@tt_su said:
Don't you just love the consistency of the API?
Actually.. thinking a bit. The naming is correct.
Why? Because you often are animating (in transition,) between two scene pages. After the first frame, you still are nowhere near being "in" the selected (target) page.
Someone might argue that, once animation begins, there really is no active_page. (Ie, you are somewhere in limbo between the previous page and the target page.)
-
Dan, I think TT meant this :
model.active_layer
model.materials.current
model.pages.selected_page
So much for consistency
-
@jiminy-billy-bob said:
model.active_layer
model.materials.current
model.pages.selected_page
Don't forget
model.styles.selected_style
-
I know what he meant.. my arg still stands.
Sometimes "active" is appropriate.. other times "selected" is more appropriate. Still other times "current" may seem more appropriate.
There is a difference between the terms. They are not direct synonyms.
Advertisement