Frustrating Expressions error
Posted: July 10th, 2008, 10:54 am
Hey everyone first time posting here, but have been reading a lot of the other posts. Great information!
I cobbled/hacked together the following code from a tutorial I found on Dan's site about random motion.
The idea with this expression was to have a couple of 3D layers randomly float in the x and y axis, while allowing the Z axis to remain constant where I set it.
segMin & segMax control the length of time before change in vector.
minVal & maxVal control the range of motion.
I am using five floating layers and a controller null with sliders. The floating layers are children of the null controller.
When I RAM preview, scrub the playhead all the layers work great. Except when I place the comp in the render queue and start the render process I get the following error. And the floating layers don't float.
'After Effects warning: logged 9 errors, please check log. First error was 'warnings: Class 'Layer' has no property or method named 'start' Expression disabled.
Error occurred at line 23.
Comp: 'Blue Bars white bckgrnd'
Layer: 11 ('panel 36')
Property: 'Position'
Here is the code in the position property.
segMin = thisComp.layer("Panel Controller-1").effect("Seg Min Control")("Slider") //minimum segment duration
segMax = thisComp.layer("Panel Controller-1").effect("Seg Max Control")("Slider"); //maximum segment duration
minVal = thisComp.layer("Panel Controller-1").effect("Min Value Modifier")("Slider");
maxVal = thisComp.layer("Panel Controller-1").effect("Max Value Modifier")("Slider");
end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
x = position[0];
y = position[1];
z = position[2];
linear(time,start,end,[x,startVal,z],[x,endVal,z])
I thank you in advance for any guidance on this issue.
I cobbled/hacked together the following code from a tutorial I found on Dan's site about random motion.
The idea with this expression was to have a couple of 3D layers randomly float in the x and y axis, while allowing the Z axis to remain constant where I set it.
segMin & segMax control the length of time before change in vector.
minVal & maxVal control the range of motion.
I am using five floating layers and a controller null with sliders. The floating layers are children of the null controller.
When I RAM preview, scrub the playhead all the layers work great. Except when I place the comp in the render queue and start the render process I get the following error. And the floating layers don't float.
'After Effects warning: logged 9 errors, please check log. First error was 'warnings: Class 'Layer' has no property or method named 'start' Expression disabled.
Error occurred at line 23.
Comp: 'Blue Bars white bckgrnd'
Layer: 11 ('panel 36')
Property: 'Position'
Here is the code in the position property.
segMin = thisComp.layer("Panel Controller-1").effect("Seg Min Control")("Slider") //minimum segment duration
segMax = thisComp.layer("Panel Controller-1").effect("Seg Max Control")("Slider"); //maximum segment duration
minVal = thisComp.layer("Panel Controller-1").effect("Min Value Modifier")("Slider");
maxVal = thisComp.layer("Panel Controller-1").effect("Max Value Modifier")("Slider");
end = 0;
j = 0;
while ( time >= end){
j += 1;
seedRandom(j,true);
start = end;
end += random(segMin,segMax);
}
endVal = random(minVal,maxVal);
seedRandom(j-1,true);
dummy=random(); //this is a throw-away value
startVal = random(minVal,maxVal);
x = position[0];
y = position[1];
z = position[2];
linear(time,start,end,[x,startVal,z],[x,endVal,z])
I thank you in advance for any guidance on this issue.