On 09/09/2015 at 05:39, xxxxxxxx wrote:
Hello!
Can anybody point me in the right direction to what I'm doing wrong here?
I can see how many clones are inside the falloff and access their index, but can't set/fix their position
whilst they are inside the falloff region
Here is my code so far:
__________________________
import c4d
from c4d.modules import mograph as mo
def main() :
md = mo.GeGetMoData(op)
if md==None: return False
cnt = md.GetCount()
marr = md.GetArray(c4d.MODATA_MATRIX)
fall = md.GetFalloffs()
carr = md.GetArray(c4d.MODATA_COLOR)
MoColAr = md.GetArray(c4d.MODATA_COLOR)
l = [] # Empty list to store falloff clones
for i in xrange(0, cnt) :
if fall == 1:
_ l2 = i_
_ l.append(l2)_
_ _
_ print "Number of clones inside fall off ", len(l)_
_ #print "Falloff cloner index values: ", l _
_ _
_ _
_ for i in xrange (len(l)) :_
_ print marr ___
_ _ marr = marr _____
_ _ _ #MoColAr = c4d.Vector(0)__
_ _ _ ___
_ _ _ md.SetArray(c4d.MODATA_Matrix, marr, True)___
_ _ _ #md.SetArray(c4d.MODATA_COLOR, MoColAr, True)___
_ _ _ ___
_ _ _ #b = "Number of clones inside falloff = " + str(len(l))___
_ _ _ #c4d.StatusSetText(b)___
_ _ _ ___
_ _ _ ___
_ _ _ return True___
_ _ __________________________________
_ _ Any help on this would be much appreciated! - Thank you in advance!__