Skip to main content
Participant
Dec 26, 2022 4:49 PM UTC
Answered

Error with AFPHairRig v03.51

Tengo el siguiente error en pantalla con este script y no se como solucionarlo:

 

Por si necesitas todo el código es el siguiente:

/////AFPHairRig//////
if(thisComp.layer('MASTER_HR_controller').effect('TurnOffHairRig')('Checkbox') == false)
{

puntoDesdePadre= 4;
refLayer = esta capa;
pos = refLayer.effect('Delay')('Slider')*(pointFromParent/8);
fallOffLoc = (pointFromParent-1)/4;
amp = refLayer.effect('Amp')('Slider')*refLayer.effect('FallOff')('Slider').valueAtTime(fallOffLoc)*thisComp.layer('MASTER_HR_controller').effect('masterFallOff') ('Slider').valueAtTime(fallOffLoc)*comp('GLOBAL_HR_controller').layer('GLOBAL_HR_controller').effect('globalFallOff')('Slider').valueAtTime(fallOffLoc);
frecuencia = refLayer.effect('Freq')('Slider');
masterFreq = thisComp.layer('MASTER_HR_controller').effect('masterFreq')('Slider');
globalFreq = comp('GLOBAL_HR_controller').

desplazamiento =refLayer.effect('Offset')('Slider');
fase = refLayer.effect('PhaseLocator')('Slider');
delay = 1-(pos*(1/refLayer.effect('Freq')('Slider')));

n = frec.numKeys+masterFreq.numKeys+globalFreq.numKeys;
si (n > 0)
{
retraso = (1-(pos));
};
value+refLayer.effect('WaveMath')('Angle').valueAtTime(time+delay)*amp;


}más
{
valor;
};

This topic is closed to new replies. Start a new post to keep the conversation going.
Juampi277086241skuCorrect answer
Participant
Dec 26, 2022 9:19 PM UTC

It appears that when you run the script, it creates the control layer and then applies expressions to your shape layer (with puppet pins) that refer to the controls. It sounds like that's not the process you followed here, is that correct? Is this an older project file where the script had been run previously? If so, maybe the control layer got renamed or deleted?


I created another new project and the script worked for me, I don't know how but hey, thanks anyway for helping me.

5 replies

Mylenium
Legend
Dec 26, 2022 6:22 PM UTC

Well, have you actually created the controller layer with all the sliders mentioned in the code?

 

Mylenium 

Translate
Dan Ebberts
Community Expert
Community Expert
Dec 26, 2022 6:20 PM UTC

That's a strange error message. It's complaining about not being able to find the Slider Control named 'globalFallOff', but the line that it's pointing at doesn't reference that control. Can you post a screen shot of the controls on the 'GLOBAL_HR_controller' layer?

Translate
Participant
Dec 26, 2022 7:53 PM UTC

Sorry, I can't find that layer anywhere, maybe that's the problem. This script was not created by me, it was made by Anthony Possobon. The problem is that it also worked correctly before, the only thing I did was update after effects to the 2022 version.
If it works for you, I'll pass you the script.

Translate
Dan Ebberts
Community Expert
Community Expert
Dec 26, 2022 8:25 PM UTC

It appears that when you run the script, it creates the control layer and then applies expressions to your shape layer (with puppet pins) that refer to the controls. It sounds like that's not the process you followed here, is that correct? Is this an older project file where the script had been run previously? If so, maybe the control layer got renamed or deleted?

Translate