Last active
September 27, 2016 13:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In console message
"TypeError: main expected float or c4d.Vector, not bool"