ScriptSpot

Script

Time Range Manager

By lbrooks · Credited author: Lorne Brooks · 2008-05-01

Version
2.8
Version requirement
3dsmax 2019-2023
Date updated
2022-09-24
Votes
27
Description

Allows you to edit and save a collection of named time ranges and access them via a dropdown list to change the scene time range based on their time settings.

Ranges are stored as a collection called sets. Multiple sets are then stored as a collection called projects.

The data is stored in INI files and so makes it independent of any maxfile.

There's also a compact option by clicking the thin bar above the ranges list.

 

See online guide in links section. 

 

Compact Mode

 

 

Additional features include:

Time Tags

Edit scene time tags using the ranges data and transfer this data between scene time tags, loaded ranges or a text file for easy name editing. Create time tags using the interface in the format name [space] startTime [dash] endTime by typing a sequence name, dragging the time slider then clicking Start, drag again and End.

 

FBX Export Animations

Export animations to FBX format using either the currently loaded Ranges or Time Tags as the source for the exported animation name and time range. Both options allow for exporting either the whole scene (if nothing is selected) or by selection. The output files will be saved to the current Max scene folder.

Optionally choose some exposed FBX settings via a separate dialog.

Note: FBX will always attempt use the keys set on the selection which will override any time range you've set or specified in the time tags - as keys may exist outside of the range. For this function to work correctly, you should animate your rig indirectly by constraining the export bones to other control objects that receive animation data. This way when you select the export bones (that your mesh may be skinned to), they won't have keys directly on them and FBX will use whatever time range is set instead.

 

Separate Maxfiles

Split a composite maxfile animation (many sequences one after another) into separate maxfiles based on stored ranges or time tags. The script will remove all keys on selected objects either side of a specific range then move the remaining keys within the range to start at frame 0. The time range will then be adjusted to fit and a new maxfile saved into the same scene folder as the original composite animation file.

Note: Only tested on regular controllers, CAT rigs and Biped. The use of expressions, constraints, or parameteric controllers may not work.

 

Camera Switching

Cameras in the scene will be recognized by the ranges dropdown list, based on a range name prefix matching the camera name.

The currently selected viewport will switch to the camera (if available) automatically.

For example:

Camera names - Cam1,  Cam 2 and Cam3

 

 


Latest Updates:

Version 2.8;

- Added a toolbar icon.

- Added a link to the online guide in the About section.

- Updated FBX export settings to Max 2023.


 

Additional Info

The script can be found in category “LB Tools”.

Installation:

Drag the MZP file into your Max viewport.

Files will be copied to...

C:\Users\<userName>\AppData\Local\Autodesk\3dsMax\<maxVersion>\ENU\scripts\startup

and...

C:\Users\<userName>\AppData\Local\Autodesk\3dsMax\<maxVersion>\ENU\usericons

 

Attachments

Tags: Animation, export, Time, fbx, Range, Frame, Tag

Comments (28)

Updated installer

lbrooks · 2024-04-12

Have re-uploaded the installer with missing button image that resulted in script crashing on start. No other changes.

Time Range Manager UI

Mike Truly · 2017-05-04

Thanks again for this great tool!

Couple things I'd love to see.

1. I want the TRM dialog to always remember it's screen position when I open it. (I use a 4 monitor system so it's critical that dialogs always open in the same place).

2. I would like to see the Time Range Selector slot background color tinted to a color other than white such as Lt Green or Lt Yellow so that when I glace over at the dialog, I can instantly tell where the most important slot is... the one that let's me select different time ranges!).

Thanks again.

Mike Truly

Re: Time Range Manager UI

lbrooks · 2017-05-08

Hi Mike,

I'm glad you're finding the script useful.

I've put a new version up with some UI changes that will hopefully make it a lot easier to find the range selection list (yes, it was a bit cluttered before).

Unfortunately, it doesn't seem like it's possible to change the drop-down list color, so I opted for a bright border instead. I also decided to put all the range editing buttons under the one rollout, to isolate and emphasize the range selection.

Also, the UI should now remember it's last monitor location even after restarting Max.

Cheers.
Lorne

Mike Truly · 2017-05-22

Lorne,

Thanks again for this great tool!

I just now saw that you've updated the tool and so far, it seems to work great! I really appreciate it!

Thanks again.

Thank You!

Mike Truly · 2017-04-19

Thanks for this awesome tool!

FBX 2016??

dukewewe · 2016-03-21

no FBX 2016 ?
and more setting FBX export

thanks

Re: FBX 2016??

lbrooks · 2016-03-25

I've added support for version 2016 and I exposed some more FBX settings to a separate dialog. The FBX animation settings for the name and range are controlled by the manager, as they are based off the loaded ranges or time tags.

Alternative Run

freemanpro · 2016-02-20

hi.. thx for best script.. How i get .mcr file to load this script without post it in startup . thx

ok i done it..

I added a little under the exporter to discharge under the engine. in this script it was not difficult to do . thank you very much for the script.

example :

[anim1]
Name=death
Start=0
End=29
useBonesSet=false

Super Handy! Thanks!

atanguay · 2015-01-05

What an incredibly handy script...thank you!

I have 32 cameras in a scene and need to bop between them while setting up renders. This makes setting their proper ranges a breeze.

If I had one suggestion, it would be the ability to tie a camera to a range so that the range would set as well as the appropriate camera. Just an idea really...it's still an indispensable script.

mickepe · 2014-09-23

Hello... I jumped the gun too quickly. The engine is still throwing a fit due to the fbx file version. Did you upload the latest version of your script?

Re: Hello... I jumped the gun too

lbrooks · 2014-09-24

I found the issue was with the 2006 string for setting the parameter. Should be fixed now. I also added an ASCII output option so you can check the version within the FBX in notepad.

embonchen · 2014-09-23

The script is really cool, and it's a closest thing to the script I've been looking for: a script that split animations in one 3dsmax file to multiple fbx or max files, cos deleting-moving frames to get the animation separated is bored like hell.

But exported fbx files contain out of range frames (like you said above)

Please make a button to save the ranges to separated .max files (each file has one single trimmed animation range and start at 0) that would be awesome.

Thank you for making this script dude, you're the man.

Re: The script is really cool

lbrooks · 2014-09-25

Hi,

I've added the ability to split up sequences into new maxfiles using tags or store ranges. It will remove the keys either side of the range and move the remaining keys to start at 0.

I've only tested this on simple cases like, regular animated objects (directly keyed), human CAT rigs and standard Biped. If you're using more complex rig setups including constraints, expressions, parametric controllers (like noise), etc - then the script may not work for those cases, as it requires "normal" controller keys to move.

Let me know if this suits your needs.

mickepe · 2014-09-23

Your support is brilliant Lorne! Thanks again.
(The version number in the scripts about box is still set to 1.8)

FBX version

mickepe · 2014-09-22

Hello again Lorne,
I was wondering, have you hardcoded the FBX settings for the exports? Or are you using the export options found while exporting a FBX file manually?
I'm exporting to an engine that requires FBX 2006, which is exported fine if I do it manually but if I go through your script the engine refuses to import.

Mikael

Re: FBX version

lbrooks · 2014-09-23

The export settings are being set internally in the script, though previously only for animation related parameters. I've added a dropdown list now to enable setting of the FBX version prior to export - down to version 2006. I was unable to test this, but it should work fine.

As I understand it through my own experiments, the maxscript settings will override any manual settings from your last manual export. It seems the two are kept separate internally. For a scripted export tool, this means you can set whatever you need at any time without concern for manual settings entered by the user.

We tend to handle most export settings internally (via script) at work, as most artists just want to export quickly without dealing with many complex settings each time. Certain settings may be exposed in a separate dialog (like geometry smoothing or triangulation), but most are controlled internally and execute via a limited export tool interface.

mickepe · 2014-09-11

That was quick! Thanks for the new version.

mickepe · 2014-09-10

Hello again,
now after testing it a bit further I noticed something.
In my scenefile I've got a normal Biped and a mesh that acts as a reference in world space. When I export both of them my reference mesh has all of it's animations while the Biped only has the animation from the time range I've specified in your tool.

Mikael

mickepe · 2014-09-10

Fantastic! Thanks a lot for that.
After some initial confusion between Text File > Ranges and Text file > Scene I got it working.
Why doesn't creating a range under the Edit ranges section create Time tags? As I started the export by first creating all my ranges in there. Then when that didn't export I imported the ranges from a text file which got it exporting. To me it seems like I'm doing the same work twice? Maybe it's because I'm only using this for simple straightforward files with an amount of game loops after one another in one max file?
Once again, I really appreciate you sharing this!

Re: Batch fbx export

lbrooks · 2014-09-11

I've added the ability to export directly from the loaded ranges, that way you don't need to put them to the scene as time tags.

Batch fbx export

mickepe · 2014-09-04

Thanks for sharing! I was wondering, would it be a lot of work to integrate batch fbx export of each time segment to separate files into your tool? You mention that it would be easy to script but as I have yet to learn maxscript I'm somewhat limited in that domain.
I've been looking around but have yet to find a good tool for this kind of functionality.

Mikael

Re: Batch fbx export

lbrooks · 2014-09-09

Hi,

I've updated the script with a FBX animation export function. It's pretty basic, but should give you the ability to export separate files for each time tag in the scene using the range data you specify.

can't run at MAX2012

peter yen · 2012-09-14

hello
is the script can be running at MAX2012?
i download the script run at max2012,
but it no response,
is still have changce update the script?

thanks

RE: can't run at MAX2012

lbrooks · 2012-09-21

As it's a macro script, make sure you drag it to a toolbar first from the category "LB Tools" then run it.

There's a newer version now with some fixes.

W DIGITAL · 2009-05-02

thank you very much for this detailed description! makes more sense to me now, and it is extremely useful for animations, which im workin on right now, my bachelor project actually its an abstract music video over 5minutes long so i wouldnt want to work wihtout time range managaer!!!

thanks again :)

W DIGITAL · 2009-05-01

thanks for this script!
i can use it on my upcoming bachelor project an abstract music video!!!

can you explain to me scene ranges? and how do i display time tags in the timeline?

works well with the animate timer vom martinskinner

lbrooks · 2009-05-02

Thank you for the interest.

Here's a more detailed explaination, I hope it helps...

Scene ranges saved into the TRM appear as selectable items in the dropdown list. They give you the ability to quickly (and immediately upon selection) set the time range start and end frames to the numbers indicated in the saved range. This provides an alternative to using the Time Configuration dialog manually, which can be cumbersome if you want switch between many ranges while working especially on long animations with lots of keys. As long time ranges can make the trackbar and trackview hard to edit, it’s best to try and focus on smaller ranges at a time.

You can save a scene range by giving it a name, as well as start and end frames. The frame times are independent from each other between saved ranges and they can overlap or have gaps, but the names must be unique. You can also save the full range using the F button, which is based on the min and max frames found by searching all the stored ranges.

Let’s say you are working on one long cinematic animation and want break down the full scene time range into easily editable chunks. You could separate parts of each shot into named ranges for the purpose of focusing on the keys more easily.

Example:

Opening_Shot_A 0-366

Opening_Shot_B 367-499

Middle_Shot 500-890

End_Shot 920-1208

 

Alternatively, if you are working on game animations and want to combine multiple sequences into one file for convenience, you can then store the ranges in the TRM. This will allow you to use it when editing the animations to quickly set the scene time range to the stored range for any saved sequence, so you can focus on it exclusively.

Example:

Idle_A 0-150

Idle_B 151-350

Walk 351-375

Run 376-390

 

When creating animations like this, you would manually add these sequences to the TRM as you edit them and keep it updated with the latest time changes for each sequence. This way you are in control of what is considered a sequence in terms of time within the overall time range. You store the collection of ranges into a Set which could be a single maxfile, but not necessarily as you can store them for generic use as well. You can then store Sets as a collection called a Project and you can have mutiple Projects.

You will need to open the Projects dialog to load a Set then open the Sets dialog to load the collection of ranges you want. It will update the stored ranges in the list using what is stored in that Set.

Example:

Project – “My First Movie”

Set – “Opening_shot”

Ranges:

Intro_A 0-321

Intro_B 322-560

 

The second part of the tool gives you the ability to transfer the saved ranges from the TRM to the scene Time Tags list (below the Max UI timeline) and back again, or out to a text file for easy editing.

This method works well with game animations stored in one file, particularly as you can script the ability to save out a bunch of sequences stored in the same file to separate files for batch exporting (if need be), by looking at each time tag in turn and using the frames stored in each as the time range for the saved scene. This was its intended use - however there may be other applications.