Was this copied from something of ours? This is not handling the name generation the way I would expect it to - not using the most efficient way.
Among the editor settings should be duration settings - there should be a selector for the units for the duration. Then, in the automatic livename options should be a checkbox to include the duration. Then, you can delete the line that's setting the duration in the script.
|