nessus
02-19-2006, 07:15 AM
i am trying to use this command with -proc flag to triger a procedure.
here is the simple code example:
global proc test(string obj, int id, string objHit)
{ scale -r 5 5 5 pCube2;
}
event -proc test(particle1, 0, pCube1) particle1;
what this code is supposing to do is that when particle ID "0" of "particle1" collides with "pCube1", global proc test is called, and it will scale pCube2 to 5 5 5 in space.
this is the error returned:
"// Error: Invalid use of Maya object "particle1". //"
following is the description from maya doc:
-proc (-pr)
Specify a MEL proc to be called each time the event occurs. This must be a global proc with arguments as follows: global proc procName( string obj, int id, string objHit ); Arguments passed in are the name of the particle object, the id of the particle which collided, and the name of the object collided with. You can use particle -id -q to get values of the particle's attributes.
maya example:
event -proc myProc myCloud
Call the MEL proc "myProc(name, id, name) each time a particle
of myCloud collides with anything.
here is the simple code example:
global proc test(string obj, int id, string objHit)
{ scale -r 5 5 5 pCube2;
}
event -proc test(particle1, 0, pCube1) particle1;
what this code is supposing to do is that when particle ID "0" of "particle1" collides with "pCube1", global proc test is called, and it will scale pCube2 to 5 5 5 in space.
this is the error returned:
"// Error: Invalid use of Maya object "particle1". //"
following is the description from maya doc:
-proc (-pr)
Specify a MEL proc to be called each time the event occurs. This must be a global proc with arguments as follows: global proc procName( string obj, int id, string objHit ); Arguments passed in are the name of the particle object, the id of the particle which collided, and the name of the object collided with. You can use particle -id -q to get values of the particle's attributes.
maya example:
event -proc myProc myCloud
Call the MEL proc "myProc(name, id, name) each time a particle
of myCloud collides with anything.
