(
По типу красный вызывает аппетит и агрессию и зубы скрипят...
Size: a a a
(
VK
MV
AM
n
AM
MV
AM
n
n
MV
n
MV
n
MV
(
AM
MV
MV
import c4d
from c4d import gui
from c4d.modules import mograph as mo
# Welcome to the world of Python
# Main function
def main():
frame = 0
fps = doc.GetFps()
time = doc.GetTime()
#Gets Current Frame
#Sets to frame 0
#doc.SetTime(c4d.BaseTime(frame,fps))
obj = doc.GetActiveObject()
clon_dat = mo.GeGetMoData(obj)
cnt = clon_dat.GetCount()
c4d.CallCommand(100004820) # Copy
c4d.CallCommand(100004821) # Paste
c4d.CallCommand(12236)
new_group = doc.GetActiveObject().GetChildren()
for i in xrange(0, cnt):
obj_n_ind = new_group[i]
track = obj_n_ind.FindCTrack(c4d.LIGHT_BRIGHTNESS)
if not track:
track = c4d.CTrack(obj_n_ind, c4d.LIGHT_BRIGHTNESS)
obj_n_ind.InsertTrackSorted(track)
curve = track.GetCurve()
for f in xrange(0, 90):
doc.SetTime(c4d.BaseTime(f,fps))
obj_ind = clon_dat.GetDataIndexInstance(i)
print(obj_ind)
curframe=doc.GetTime().GetFrame(doc.GetFps())
keyDict = curve.AddKey(c4d.BaseTime(curframe, fps))
test = obj_ind.__getitem__(c4d.LIGHT_BRIGHTNESS)
print(test)
obj_n_ind.SetParameter(c4d.LIGHT_BRIGHTNESS, test, c4d.DESCFLAGS_SET_PARAM_SET)
track.FillKey(doc, obj, keyDict['key'])
print(cnt)
c4d.EventAdd()
# Execute main()
if __name__=='__main__':
main()
ST