shake scripting question

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2006   #1
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
 
Old 04 April 2006   #2
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
 
Old 04 April 2006   #3
The function you want is:

const char *stringf(const char *, ...);
__________________
Hugh Macdonald
nvizible
 
Old 04 April 2006   #4
Talking

Thanks Hugh, that was exactly what I was looking for. Cheers.
 
Old 04 April 2006   #5
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



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:16 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.