Skip to content

Instantly share code, notes, and snippets.

@gregtemp
gregtemp / newFlockingAttempt.py
Created June 11, 2014 21:35
newFlockingAttempt python maya mel
import maya.cmds as cmds
import maya.OpenMaya as om
import random
random.seed (1234)
amountOfParticles = 10
dist = 10
ease = 1
@gregtemp
gregtemp / randomParticles.py
Created June 10, 2014 20:02
Basic random particles - MAYA python/mel
import maya.cmds as cmds
import maya.OpenMaya as om
import random
random.seed (1234)
amountOfParticles = 5000
positionList = list()
@gregtemp
gregtemp / flockingNoALimit.py
Last active October 13, 2017 09:11
Flocking (a couple different versions... none of which really work) - MAYA mel python
# master lists version - Boids
import maya.cmds as cmds
import random
from maya.OpenMaya import MVector
random.seed(1234)
# setup
@gregtemp
gregtemp / today3.py
Last active August 29, 2015 14:02
today maya mel python
# master lists version - Boids
import maya.cmds as cmds
import random
from maya.OpenMaya import MVector
random.seed(1234)
# setup
@gregtemp
gregtemp / today2.py
Last active August 29, 2015 14:02
Today2 maya python mel
# random particle velocity -- (the right way)
# maybe try making a list that cross checks before and after dynamics? is that a bad idea?
import maya.cmds as cmds
import random
from maya.OpenMaya import MVector
random.seed(1234)
@gregtemp
gregtemp / today.py
Last active August 29, 2015 14:02
Today - Maya mel python
# random particle velocity -- (the right way)
import maya.cmds as cmds
import random
from maya.OpenMaya import MVector
random.seed(1234)
@gregtemp
gregtemp / expression.mel
Created June 6, 2014 06:08
The magic "pass dat vector" script for runtime before dynamics expression - Maya
if (particleShape1.particleId == 0) {
vector $myv = particleShape1.position;
string $myPy = "myOtherFunc(" + $myv.x + "," + $myv.y + "," + $myv.z +")";
python($myPy);
}
@gregtemp
gregtemp / crap.py
Last active August 29, 2015 14:02
the last thing i was working on - MAYA
# random particle velocity -- (the right way)
import maya.cmds as cmds
import random
from maya.OpenMaya import MVector
random.seed(1234)
@gregtemp
gregtemp / first.py
Last active August 29, 2015 14:02
get global python functions in mel - maya mel python
global def myGlobalPythonThing ():
return "heres a working python!"
@gregtemp
gregtemp / first.mel
Created June 6, 2014 00:13
get global proc's in pymel - maya mel / python
global proc string myGlobalProc()
{
return "my thing works!";
}