Hey again! I was wondering if any one could dynamic expressions? I
have a set of particles which have instanced geomentry but i need to
create a simple runtime expression to control the rotation of these
objects. Now i've heard that python is and i've read another post on
here about dynamic expressions but have not been able to get them to
work. It's not that complex of an expression, and i'm only calling
particle attributes and not any variables i've defined in Python.
Well, here's the expression -

string $runTime =       "if ( frame <= 2.0 ) { \n" +
                                "       rotateInitPP = << rand( rotMultMin, 
rotMultMax ), rand
( rotMultMin,rotMultMax), rand(rotMultMin, rotMultMax ) >>; \n" +
                                                "       mass *= rand( 
massMultMin, massMultMax ); \n" +
                                                "} else { \n" +
                                                "       vector $vel = velocity; 
\n" +
                                                "       vector $rot = 
rotateInitPP; \n " +
                                                "       rotatePP += << $vel.x * 
$rot.x, $vel.y * $rot.y, $vel.z *
$rot.z >>; \n" +
                                                "} \n"
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to