thelemur
thelemur
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
Py Sop Issues Velocity 2012年1月19日14:44
I am attempting to create a new velocity for particles i have created based off of seed particles inside of a Py Sop my issue is i can not seem to access my velocity of the particles i have just created and it is not throwing up a error.
def ink(grouptri):
for i in range(1,len(grouptri)):
velc1 = geo.points()[grouptri].attribValue(“v”)
velc2 = geo.points()[grouptri].attribValue(“v”)
velc3 = geo.points()[grouptri].attribValue(“v”)
hou.setframe(hou.frame()+1)
veln1 = geo.points()[grouptri].attribValue(“v”)
veln2 = geo.points()[grouptri].attribValue(“v”)
veln3 = geo.points()[grouptri].attribValue(“v”)
velcnsort =
vlecnsort.sort()
low = velcnsort
high = velcnsort
alphax = (veln1 - velc1) / 2
alphay = (veln1 - velc1) / 2
alphaz = (veln1 - velc1) / 2
aalpha = [velc1,velc1,velc1]
# balpha = [velc1 + alphax,velc1 + alphay,velc1 + alphaz]
betax = (veln2 - velc2) / 2
betay = (veln2 - velc2) / 2
betaz = (veln2 - velc2) / 2
abeta = [velc2,velc2,velc2]
# bbeta = [velc2 + betax,velc2 + betay,velc2 + betaz]
epsilonx = (veln3 - velc3) / 2
epsilony = (veln3 - velc3) / 2
epsilonz = (veln3 - velc3) / 2
aepsilon = [velc3,velc3,velc3]
# bepsilon = [velc3 + epsilonx,velc3 + epsilony,velc3 + epsilonz]
xcenter = (aepsilon + abeta + aalpha) / 3
ycenter = (aepsilon + abeta + aalpha) / 3
zcenter = (aepsilon + abeta + aalpha) / 3
averaged =
geo.iterPoints().setPointFloatAttribValues(“v”,(low,low,low))
# geo.iterPoints().setAttribValue(“v”,(random.random(low,averaged)))
# geo.iterPoints().setAttribValue(“v”,(random.random(low,averaged)))
XX=XX+3
i am wondering why this is happening. I have ran
in the Py Shell
# geo.iterPoints().setAttribValue(“v”, 1,2,3)
#geo iterPoints() setPoint FloatAttribValue('v', 1,1,1)
both giving me a read only error yet i thought implimentation with in a SOP
would have solved this problem.
def ink(grouptri):
for i in range(1,len(grouptri)):
velc1 = geo.points()[grouptri].attribValue(“v”)
velc2 = geo.points()[grouptri].attribValue(“v”)
velc3 = geo.points()[grouptri].attribValue(“v”)
hou.setframe(hou.frame()+1)
veln1 = geo.points()[grouptri].attribValue(“v”)
veln2 = geo.points()[grouptri].attribValue(“v”)
veln3 = geo.points()[grouptri].attribValue(“v”)
velcnsort =
vlecnsort.sort()
low = velcnsort
high = velcnsort
alphax = (veln1 - velc1) / 2
alphay = (veln1 - velc1) / 2
alphaz = (veln1 - velc1) / 2
aalpha = [velc1,velc1,velc1]
# balpha = [velc1 + alphax,velc1 + alphay,velc1 + alphaz]
betax = (veln2 - velc2) / 2
betay = (veln2 - velc2) / 2
betaz = (veln2 - velc2) / 2
abeta = [velc2,velc2,velc2]
# bbeta = [velc2 + betax,velc2 + betay,velc2 + betaz]
epsilonx = (veln3 - velc3) / 2
epsilony = (veln3 - velc3) / 2
epsilonz = (veln3 - velc3) / 2
aepsilon = [velc3,velc3,velc3]
# bepsilon = [velc3 + epsilonx,velc3 + epsilony,velc3 + epsilonz]
xcenter = (aepsilon + abeta + aalpha) / 3
ycenter = (aepsilon + abeta + aalpha) / 3
zcenter = (aepsilon + abeta + aalpha) / 3
averaged =
geo.iterPoints().setPointFloatAttribValues(“v”,(low,low,low))
# geo.iterPoints().setAttribValue(“v”,(random.random(low,averaged)))
# geo.iterPoints().setAttribValue(“v”,(random.random(low,averaged)))
XX=XX+3
i am wondering why this is happening. I have ran
in the Py Shell
# geo.iterPoints().setAttribValue(“v”, 1,2,3)
#geo iterPoints() setPoint FloatAttribValue('v', 1,1,1)
both giving me a read only error yet i thought implimentation with in a SOP
would have solved this problem.