View Full Version : Selections within global procs

05 May 2011, 09:16 PM
I'm trying to extrude a selection within a function. I'm storing the created object within a variable, but every time i try to extrude a call from the variable, it extrudes the entire object rather than the component selection. How do I call the component selection appropriately?

Here's my failed code

global proc TablePrim()
string $Table[] = `polyCylinder -r 1 -h 2 -sx 20 -sy 1 -sz 1 -ax 0 1 0 -rcp 0 -cuv 3 -ch 1`;
polyExtrudeFacet -ch 1 -kft 1 -tx 3 $Table.f[0:3] $Table.f[14:23] $Table.f[34:43] $Table.f[54:59];


05 May 2011, 09:40 PM
to catenate variables and literal strings you have to use + and enclose in braces. Also, you cannot catenate arrays.

( $Table[0] + ".f[0:3]" ):nathaN

05 May 2011, 12:45 AM
awesome, thanks for the help Nathan, scripts are working fine now

CGTalk Moderation
05 May 2011, 12:45 AM
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.