Page 1 of 1

Change Clip Duration Programmatically...

PostPosted: Sat Dec 03, 2022 3:04 pm
by estebanjgarcia
I was wondering how can I change a clip duration programmatically?
I'm adding (programmatically) a Text clip and by default lasts 5 seconds, but I would like to be able to change programmatically the length.
I'm almost sure it is very easy to do, but I have not been have to find the right function.
Thanks in advance.
E.

Re: Change Clip Duration Programmatically...

PostPosted: Sat Dec 03, 2022 4:40 pm
by estebanjgarcia
Is there the only way to change the default clip duration?!?!?!!?

Re: Change Clip Duration Programmatically...

PostPosted: Sat Dec 03, 2022 7:19 pm
by Charles Bennett
There is no such thing as a default video clip duration. Video clip duration is down to you selecting in and out points. Other things like Stills, Transitions, and Generators, etc, can have defaults set. You will find these in Preferences/User/Editing/General Settings.

Re: Change Clip Duration Programmatically...

PostPosted: Sun Dec 04, 2022 6:35 am
by estebanjgarcia
Hi Charles... any idea about my original question? How can I change the duration of a clip programmatically?

Re: Change Clip Duration Programmatically...

PostPosted: Sun Dec 04, 2022 9:23 am
by Charles Bennett
What are you trying to achieve when you use the term "programmatically"?

Re: Change Clip Duration Programmatically...

PostPosted: Sun Dec 04, 2022 9:39 am
by jhoepffner
Hello,
Working with Fusion, Houdini and TouchDesigner, I understand what you mean by "programmatically".
The way to change the default text duration is there:
Preferences/User/Editing/Standard generator duration (by default 5')
It will change all the future text, not the old one. It would be change "procedurally" :-)
Jacques

Re: Change Clip Duration Programmatically...

PostPosted: Wed Dec 07, 2022 5:04 am
by estebanjgarcia
Charles Bennett wrote:What are you trying to achieve when you use the term "programmatically"?

Hi Charles, by programmatically I meant by using a script, either Lua or Python...
I'm trying to add TimelineItems with Text+ and I would like to be able to setup a duration for each item... individually and without changing a default setting...
Also in TimelineItem there is a getDuration method but there isnt a setDuration....

Re: Change Clip Duration Programmatically...

PostPosted: Tue May 27, 2025 3:26 am
by nicktumi
Did you ever figure this out? I too have been trying to figure this out.