-18 -18 24.02.2014, 11:25:26 1 losowe video z kompozycjimyComp = comp(name);n = myComp.numLayers;seedRandom(index+101,true);theLayers = [];for (i = 1; i <= n; i++) theLayers[theLayers.length] = i;for (i = 0; i < theLayers.length; i++){idx = i + Math.floor(random(theLayers.length - i));temp = theLayers[i];theLayers[i] = theLayers[idx];theLayers[idx] = temp;}accumDur = 0;for (i = 0; i < n; i++){myLayer = myComp.layer(theLayers[i]);nextDur = myLayer.outPoint - myLayer.inPoint;if ((time >= accumDur) && (time < (accumDur + nextDur))){break;}accumDur += nextDur}i = Math.min(i,n-1);myComp.layer(theLayers[i]).inPoint + time - accumDur #aftereffects #expression #skrypty Cronox
myComp = comp(name);
n = myComp.numLayers;
seedRandom(index+101,true);
theLayers = [];
for (i = 1; i <= n; i++) theLayers[theLayers.length] = i;
for (i = 0; i < theLayers.length; i++){
idx = i + Math.floor(random(theLayers.length - i));
temp = theLayers[i];
theLayers[i] = theLayers[idx];
theLayers[idx] = temp;
}
accumDur = 0;
for (i = 0; i < n; i++){
myLayer = myComp.layer(theLayers[i]);
nextDur = myLayer.outPoint - myLayer.inPoint;
if ((time >= accumDur) && (time < (accumDur + nextDur))){
break;
}
accumDur += nextDur
}
i = Math.min(i,n-1);
myComp.layer(theLayers[i]).inPoint + time - accumDur
#aftereffects #expression #skrypty