Skip to content

Instantly share code, notes, and snippets.

@baku89
Last active September 27, 2016 13:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baku89/1eb6d34bc3f15b28b241 to your computer and use it in GitHub Desktop.
Save baku89/1eb6d34bc3f15b28b241 to your computer and use it in GitHub Desktop.
C4D Python Effector: Easing new clone's size gradually when cloner's count changed
import c4d
from c4d.modules import mograph as mo
prevCnt = 0
def main():
global prevCnt
md = mo.GeGetMoData(op)
if md==None: return False
cnt = md.GetCount()
marr = md.GetArray( c4d.MODATA_MATRIX )
if prevCnt < cnt :
for i in xrange( prevCnt, cnt ) :
marr[i].Scale( 0.001 )
md.SetArray( c4d.MODATA_MATRIX, marr, True )
prevCnt = cnt
return True
@MikeUdin
Copy link

In console message
"TypeError: main expected float or c4d.Vector, not bool"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment