butler 0 Report post Posted March 19, 2012 I'm looking for some help with this xpresso. So lets say I have a text object that has the word "hello" in it. What would I need to do in xpresso to get letter #2 by itself(which is 'e') so I can have that letter be the text of another text object? I am pretty sure this would need a custom coffee thing but I am clueless. Thanks Quote Share this post Link to post Share on other sites
tcastudios 0 Report post Posted March 19, 2012 (edited) To get you started by using Python expression Tag import c4d def main(): from_obj = doc.GetFirstObject() to_obj = op.GetObject() source = from_obj[c4d.PRIM_TEXT_TEXT] to_obj[c4d.PRIM_TEXT_TEXT] = source[1] Cheers Lennart Edited March 19, 2012 by tcastudios Quote Share this post Link to post Share on other sites
tezuka 0 Report post Posted March 19, 2012 Here's an coffe node inside a xpresso setup which finds a string by position: http://dl.dropbox.com/u/28253825/FindString.c4d Quote Share this post Link to post Share on other sites
butler 0 Report post Posted March 19, 2012 Here's an coffe node inside a xpresso setup which finds a string by position: http://dl.dropbox.co.../FindString.c4d Brilliant!!! Thanks so so much!!!! Quote Share this post Link to post Share on other sites
tezuka 0 Report post Posted March 19, 2012 I just read the actual Coffee SDK and modified an example in there, highly recommended :-) http://www.maxon.net/index.php?id=157&L=0 Quote Share this post Link to post Share on other sites
C.Smith 0 Report post Posted March 20, 2012 Personally I would use Lennart's Python version. Using string slicing in Python is extremely powerful and easy. He just gave you the second letter: 'source[1]' but you could easily get any combination of letters with just a few variations. PEEP THIS for Python string slicing Quote Share this post Link to post Share on other sites