stronman
04-06-2009, 07:55 AM
i have just started to learn maya scripting, and picked up the book" Mel companion"
while carefully reading this book , i got my first bump
the code is right blow:
_____________________________________________________
//code part 1
global proc generateGrass ( )
{
for ( $i = 0; $i < 10; $i++ )
generateBlade ;
}
//at this moment i want maya to create 10 blades using for loop
//code part 2:
global proc generateGrass ( )
{
// Creation of Poly Cone
string $blades[] = `polyCone
-radius 0,04
-height 1
-subdivisionsX 3
-subdivisionsY 10
-subdivisionsZ 0
-axis 0 1 0
-constructionHistory off
`
;
}
_________________________________________________________
i just left out rest of the unimportant codes that i understood
once i excuted the code, the maya sais"cant find object name
while carefully reading this book , i got my first bump
the code is right blow:
_____________________________________________________
//code part 1
global proc generateGrass ( )
{
for ( $i = 0; $i < 10; $i++ )
generateBlade ;
}
//at this moment i want maya to create 10 blades using for loop
//code part 2:
global proc generateGrass ( )
{
// Creation of Poly Cone
string $blades[] = `polyCone
-radius 0,04
-height 1
-subdivisionsX 3
-subdivisionsY 10
-subdivisionsZ 0
-axis 0 1 0
-constructionHistory off
`
;
}
_________________________________________________________
i just left out rest of the unimportant codes that i understood
once i excuted the code, the maya sais"cant find object name
