Hi
How can i get the properties of a cue part with lua ?
I've found local seq = SelectedSequence()
local cue = seq:Children()
Printf(cue[1]."property name")
How can i get the part. Are they child of the cue ?
i want to get the Duration.
Thanks.
Hi
How can i get the properties of a cue part with lua ?
I've found local seq = SelectedSequence()
local cue = seq:Children()
Printf(cue[1]."property name")
How can i get the part. Are they child of the cue ?
i want to get the Duration.
Thanks.
Are they child of the cue ?
yes
Thanks, but Part = cue:Children() gives me an error. "Attempt to call a nil value (method 'Children')"
in your script example the variable cue is not a cue, it is a table that contain cues
Yes, i understand and i've tried :
return function()
local seq = SelectedSequence()
local cue = seq:Children()
local cu = cue[5]
local part = cu:Children()
Printf(part[0].name)
end
but this doesn' work.
What is the good method ?
When i do Printf(cue[4].name) it's ok. But i can't reach the part.
Thanks Andreas
lua tables always count from 1
local luatable = cu:Children()
local part0 = luatable[1]
What is the good method ?
for cues and parts, where commandline numbering don't match lua table indexes the easiest method is in my opinion to use the ObjectList function, which returns a table with all objects matching the given commandline syntax, then take the first entry of that table, [1]
local mypart = ObjectList('Cue 5 Part 0')[1]
Thanks a lot Andreas
But then when i ask for duration, i have something like 67108864 (my duration is 4s).
Do you know what that means and how to convert in a real time value ?
Thanks again.
try
local duration = myPart.Duration/256^3
Waou ! Thanks a lot Andreas, you're always the best.
But what is this formula ?
It remembers me something in gma2, but i don't remember exactly what.
Looks like a sort of 24 bits conversion.
Thanks again.
Don’t have an account yet? Register yourself now and be a part of our community!