I'm running this little script
Now if you make a cube and called it "PhoenixCubeKill" and try to go and kill some data, that dosen't happen
for sure I've to work more on it ad investigate better for what's going on, in the meantime, some one have an idea?
From the documentation I don't get really weel how "set" call the value so that why I used all the set separately.
thanks for your patience
Simone.
Code:
import maya.cmds as cmds from phxfd import * def OnSimulationEnd(node, t, dt): setsystem('core') sx = cmds.getAttr(node + '.xSize') sy = cmds.getAttr(node + '.ySize') sz = cmds.getAttr(node + '.zSize') cellSize = float(cmds.getAttr(node+'.cellSize')) nodeT = cmds.listRelatives(node, p=True) nodeTranslate = cmds.xform(nodeT[0], query=True, ws=True, t= True) #print nodeTranslate #Debug Purpose tx = nodeTranslate[0] ty = nodeTranslate[1] tz = nodeTranslate[2] cubeKill = cmds.xform("PhoenixCubeKill", query=True, ws=True, bb= True) ## xmin ymin zmin xmax ymax zmax. print "PhoenixCubeKill in Action" # visual print check for x in range(sx): if ((x+tx)*cellSize)>=cubeKill[0] and ((x+tx)*cellSize)<=cubeKill[3]: #print "found x" #print str(x)+" - "+str((x+tx)*cellSize) + " major of " + str(cubeKill[0]) + " minor of " + str(cubeKill[3]) for y in range(sy): if (((y+ty)*cellSize)+cellSize)>=cubeKill[1] and (((y+ty)*cellSize)+cellSize)<=cubeKill[4]: #print "found y" #print str(y)+" - "+str(((y+ty)*cellSize)+cellSize) + " major of " + str(cubeKill[1]) + " minor of " + str(cubeKill[4]) for z in range(sz): if ((z+tz)*cellSize)>=cubeKill[3] and ((z+tz)*cellSize)<=cubeKill[5]: #print "found z" #print str(z)+" - "+str((z+tz)*cellSize) + " major of " + str(cubeKill[3]) + " minor of " + str(cubeKill[5]) setSm((x, y, z), 0) setT((x, y, z), 0) setFl((x, y, z), 0) setV((x, y, z),[0,0,0])
for sure I've to work more on it ad investigate better for what's going on, in the meantime, some one have an idea?
From the documentation I don't get really weel how "set" call the value so that why I used all the set separately.
thanks for your patience
Simone.
Comment