[Closed] getTimeRange return unexpected intervals
Hi all,
I’m trying to get the time range for a controller. In the MaxScript reference, there is an example with the height controller of a box, works fine.
But I cannot get the correct time range for a position controller for example.
I create a simple box, set a position key on 0 and 20.
Now I apply the following code:
getTimeRange $Box01.position.controller
This is what I get out of the listener:
(interval -1.34218e+007f -1.34218e+007f)
What’s wrong with that? Actually the interval should be:
(interval 0f 20f)
How can I get the correct time range?
Thanks for any help.
Edit: I’m using Max7.
The position controller in Max 7 is by default a Position_XYZ controller. It does not store keys, it is only the parent of the X, Y and Z sub-controllers that actually get keyframed.
So asking for its interval gives infinite results, but asking for the ranges of its sub-controllers returns what you would expect:
getTimeRange $Box01.position.controller[1].controller
(interval 0f 20f)
Thanks Bobo, I knew it was something like that. I have already tried position.x.controller but that’s an unknown property. Anyway it’s a bit confusing because deleteTime for example works with position.controller only.