Substance Painter
In this start to finish texturing project within Substance Painter we cover all the techniques you need to texture the robot character.
# 1 31-01-2006 , 05:49 PM
Registered User
Join Date: Jun 2005
Posts: 22

String manipulation

every control for a character has this naming format: "chr:_" + character's name + ":" + the control's name

basically my plan is to do an "ls" command then iterate through the list until I find a string that starts with "chr:_"
then for each match, I need to build a list of distinct character names. I already know what the control names are so I don't need to worry about that. That distinct list would populate a drop down menu which allows the animator to choose which character he wants to work on.

For example, an animator opens a scene and it has 2 characters in it.

chr:_ykv01
and
chr:_man2

I need to be able to populate a drop down menu with ykv01 and man2

any clue on how to do this?

thanks

# 2 01-02-2006 , 05:38 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
why not just do

string $myArray = `ls "chr:*"`;

for($a in $myArray)
{

print ("a: " + $a + \n");
//do whatever you want here
}


I'd be carefull using ":" in names though as they are used for namespaces.

user added image
A


Technical Director - Framestore

Currently working on: Your Highness

IMDB
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads