New hypeDocument function: Get/Set ElementPropertyInTimelineNamed

  1. What do you want to see in Hype?

I'd like to have getters and setters for elements at specific timecodes in a specified timeline.
hypeDocument.getElementPropertyInTimelineNamed(elementName, "Main Timeline", "top", 0)
hypeDocument.setElementPropertyInTimelineNamed(elementName, "Main Timeline", "left", 1.0)

supplied parameters: element, timeline, property, optional timecode in seconds

  1. Have you found a workaround for this problem?

I have to currently measure element properties in the editor, then copy static values over to javascripts. For example, if I want to know the "min" and "max" vertical positions of a circle that follows a motion path from bottom to top, I scrub the timeline to 0.0s - make a note of the circle's .top value, scrub the timeline to 1.0s (the end of the animation) and make a note of the circle's new .top value.

I then paste those values into a javascript:
var circleTopMin = 19;
var circleMax = 250;

The rationale is to create flexible programmatic behaviour at runtime, rather than relying completely upon pre-scripted paths and behaviours.

  1. How high of a priority is this for you?

[X] Nice to Have
[ ] Important
[ ] Can't use Hype without it

1 Like

just using the duration of a timeline as 100% and calculating the progress is no option in yout setup?
would be interesting to have alook at such a file :slight_smile:


Thanks, that's an interesting request! Unifying a bit I think the setter would be something where you could add keyframes or modify existing keyframes. There's definitely a school of thought that the API should support everything that can be done in the app, like this.

1 Like