04 April 2006 | |
![]() |
|
Veteran
portfolio
Gunter Jackson
Austria
|
shake scripting question
I am trying to make a macro that will display embedded dpx timecode since I haven't had success with the one I found on highend2d.com.
What it does is take the filename (the frame number is embedded in the filename after scanning) and then does the math to arrive at timecode and then print this through a text node. The problem is, that the filename is a string.. so i need to convert this to an int to be able to do the math, then convert back to a string, since the text node can only accept a string. I have used "atoi" to convert the string to int, but as far as i have found, I can't convert this back to a string once i have arrived at the timecode I want to print (sprintf is not recognised by shake?). Anyone know how this can be done? Thanks for any help |
04 April 2006 | |
![]() |
|
New Member
|
i know that there is a itoa funtion to convert int's to strings BUT i think its either only on windows or linux I cant remember, I know for a fact its not on a mac because I tried it....mmm
sprintf() wont work BUT using printf("Frame Number = %i (or %s for a string) \n", varible); in a local variable in your text node will work....mmm not sure if that helps mmm thats all i got right now, Pat |
04 April 2006 | |
![]() |
|
Compositor
Hugh Macdonald
2D Supervisor
Nvizible
United Kingdom
|
The function you want is:
const char *stringf(const char *, ...); |
04 April 2006 | |
![]() |
|
Veteran
portfolio
Gunter Jackson
Austria
|
![]() Thanks Hugh, that was exactly what I was looking for. Cheers.
|
04 April 2006 | |
![]() |
|
Expert
|
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. |
Thread Closed share thread |
«
Previous Thread
|
Next Thread
»
|
|
|