Page 1 of 1

Using Kleaner with Walkcycle

Posted: Sun Feb 16, 2020 7:12 am
by deftonesjacket
Hi,
I have a Full character rig that has a walkcycle automation and when the character is stationary i have applied Duik Kleaner to Upper, Lower, Goal of the FK to give it nicer movement.
Issue is :
1. applying Kleaner to these 3 FK controls gets rid of the Walkcycle code applied there. i need to copy and paste the Walkcycle back in.
Is there a way to apply the Kleaner and keep existing code in the property?

2. Pasting the walkcycle code back in under the Kleaner code, fixes the walkcycle code but negates the Kleaner code results.
{//Duik.kleaner
var fx = effect("Kleaner");
//parameters
var doAnticipation = fx(1).value;
----the code goes on for awhile but the standard Kleaner code that is applied
}
result;

}
---Kleaner code ends here and ive pasted the walkcycle effect below it

{//Duik.walkCycle
var sideFx = effect("Arm")(1).value;
var walkFx = thisComp.layer("C | Walk Cycle").effect("Walk Cycle")
sideFx == 1 ? walkFx(67).value + value : walkFx(73).value + value
}

Is there a way to bring the Kleaner code back to life while having the walkcycle code underneath?
Is this possible? any code i can add to have activate and the other deactivate maybe?

Cheers,

deftonesjacket

Re: Using Kleaner with Walkcycle

Posted: Sun Feb 16, 2020 11:26 am
by deftonesjacket
Ok found a a solution,

made a checkbox control called "Kleaner Code", when turned on: the Kleaner code activates , off: the walkcycle code kicks in

add this code in the property:

control = effect("Kleaner Code")("Checkbox") ;

if (control == 1){
//add Kleaner code here
}else{
//add walk cycle code here
}

hope this helps someone :)

that solves problem "2" but i was still wondering if there is a way Kleaner won't erase the existing code when applied to a property.

Cheers,

deftonesjacket

Re: Using Kleaner with Walkcycle

Posted: Sun Feb 16, 2020 4:26 pm
by Duduf
Hi,

There's an easier way to achieve this, you can use the "list"
https://duik-docs.rainboxlab.org/duik-list.html
which is an easy way to combine expressions/automations

Re: Using Kleaner with Walkcycle

Posted: Mon Feb 24, 2020 6:16 am
by deftonesjacket
LISTS! This is awesome, thanks so much. i need to research the tools more! this opens so many ideas. you're a champ!
Cheers,

deftonesjacket :)