booboo4ever
01-20-2013, 08:33 PM
hello all,
i am kind of a noob at MEL maybe.
i often like to capture items as variables when i create them so i can rename them etc, even if i do not know what Maya may have named them. so i use syntax like the following
string $group_name[] = `group -em`;
rename $group_name[0] "character_group";
but i find lately in 2013 (unless it was happening before and i am just crazy) that sometimes using and array causes errors and instead i have to use the syntax as follows
string $group_name = `group -em`;
rename $group_name "character_group";
so in the first sample, i need to use an array or 2013 throws an error. in the second sample, i have to just use a string variable or 2013 throws an error. i have tried to make sense of it, but i cannot figure out why one or the other method will work and why. it is simple enough to change one method to the other if it fails, but it is kind of driving me nuts.
thanks so much for any help
i am kind of a noob at MEL maybe.
i often like to capture items as variables when i create them so i can rename them etc, even if i do not know what Maya may have named them. so i use syntax like the following
string $group_name[] = `group -em`;
rename $group_name[0] "character_group";
but i find lately in 2013 (unless it was happening before and i am just crazy) that sometimes using and array causes errors and instead i have to use the syntax as follows
string $group_name = `group -em`;
rename $group_name "character_group";
so in the first sample, i need to use an array or 2013 throws an error. in the second sample, i have to just use a string variable or 2013 throws an error. i have tried to make sense of it, but i cannot figure out why one or the other method will work and why. it is simple enough to change one method to the other if it fails, but it is kind of driving me nuts.
thanks so much for any help
