Skip to content

Commit 80721fd

Browse files
committed
Build v17.1.18
1 parent b972871 commit 80721fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+5100
-1342
lines changed

dist/libs/DuAEF.jsxinc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24666,6 +24666,10 @@ DuAEProperty.prototype.quickBakeExpressions = function(frameStep) {
2466624666
prop.expressionEnabled = false;
2466724667
// Remove current keyframes
2466824668
propInfo.removeAnimation();
24669+
// If this is a time remap we need to re-enable it,
24670+
// because removing all keyframes at the previous step disables it (Thanks AE!)
24671+
if (prop.matchName == 'ADBE Time Remapping')
24672+
propInfo.layer.timeRemapEnabled = true;
2466924673
// Set values
2467024674
try { prop.setValuesAtTimes(times, values); }
2467124675
catch (e) {}
@@ -24780,6 +24784,10 @@ DuAEProperty.prototype.smartBakeExpressions = function(frameStep) {
2478024784
// Collect interpolations/influences and remove animation
2478124785
// The result can be better if we reset them after baking the expression.
2478224786
propAnim = propInfo.takeAnimation();
24787+
// If this is a time remap we need to re-enable it,
24788+
// because removing all keyframes at the previous step disables it (Thanks AE!)
24789+
if (prop.matchName == 'ADBE Time Remapping')
24790+
propInfo.layer.timeRemapEnabled = true;
2478324791
// Set extreme values
2478424792
if (extremeValues.length > 0) {
2478524793
// For some reason, there are still properties here which can't receive keyframes

dist/libs/api3.jsxinc

Lines changed: 55 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3251,9 +3251,9 @@ Duik.Pin.getByName = function (comp,name,selectedOnly)
32513251
/**
32523252
* Links the path to pins<br />
32533253
* Works with After Effects CC2018 (15.0) and newer only
3254-
* @param {Property|DuAEProperty} prop - The path property
3255-
* @param {bool} [tangents=true] - True to create bones for the tangents
3256-
* @param {bool} [createPinLayers=true] - True to create layers, false to only create a controller effect
3254+
* @param {Property|DuAEProperty} pathProp - The path property
3255+
* @param {Boolean} [tangents=true] - True to create bones for the tangents
3256+
* @param {Boolean} [createPinLayers=true] - True to create layers, false to only create a controller effect
32573257
* @return {DuAEProperty[]} The pin effects created.
32583258
*/
32593259
Duik.Pin.rigPath = function( pathProp, tangents, createPinLayers )
@@ -3790,7 +3790,7 @@ Duik.CmdLib['Bone']["Arm"] = "Duik.Bone.arm()";
37903790
* @param {Boolean} [forearm=true] Whether to create a forearm
37913791
* @param {Boolean} [hand=true] Whether to create a hand
37923792
* @param {Boolean} [claws=false] Whether to add claws
3793-
* @param {Boolean} [location=OCO.Location.FRONT] The location of the arm
3793+
* @param {OCO.Location} [location=OCO.Location.FRONT] The location of the arm
37943794
* @param {boolean} [forceLink=false] - whether link the selected layers/properties to the new armature
37953795
*/
37963796
Duik.Bone.arm = function ( characterName, type, side, shoulder, arm, forearm, hand, claws, location, forceLink )
@@ -3831,7 +3831,7 @@ Duik.Bone.arm = function ( characterName, type, side, shoulder, arm, forearm, ha
38313831
// Creates a limb on the selection, optionally linking the items
38323832
Duik.Bone.createLimb = function ( comp, limbCreator, characterName, forceLink )
38333833
{
3834-
var comp = DuAEProject.getActiveComp();
3834+
comp = def(comp,DuAEProject.getActiveComp());
38353835
if (!comp) return [];
38363836

38373837
// Links
@@ -3867,10 +3867,8 @@ Duik.Bone.createLimb = function ( comp, limbCreator, characterName, forceLink )
38673867
var ok = false;
38683868
it.do( function( layer )
38693869
{
3870-
var side = Duik.Layer.side(layer);
3871-
var location = Duik.Layer.location(layer);
3872-
if (characterName == "") characterName = Duik.Layer.groupName(layer);
3873-
var limbName = Duik.Layer.name(layer);
3870+
if (characterName == "")
3871+
characterName = Duik.Layer.groupName(layer);
38743872

38753873
//get paths
38763874
var props = DuAELayer.getSelectedProps( layer, DuAEProperty.isPathProperty );
@@ -3881,6 +3879,17 @@ Duik.Bone.createLimb = function ( comp, limbCreator, characterName, forceLink )
38813879
for (var i = 0, n = props.length; i < n; i++)
38823880
{
38833881
var path = props[i];
3882+
3883+
var pathProp = new DuAEProperty( path ).pathProperty();
3884+
pathProp = pathProp.getProperty();
3885+
// don't rig twice the same (we may get either the prop or the group)
3886+
if (DuString.startsWith(
3887+
pathProp.expression,
3888+
'// Duik auto-rig')) {
3889+
pathProp.expression = pathProp.expression.replace('// Duik auto-rig\n', '');
3890+
continue;
3891+
}
3892+
38843893
// create the OCODoc
38853894
var doc = OCODoc.fromComp( characterName, comp, [] );
38863895
var limb = limbCreator( doc );
@@ -3889,7 +3898,12 @@ Duik.Bone.createLimb = function ( comp, limbCreator, characterName, forceLink )
38893898
var boneLayers = doc.toComp( comp );
38903899
DuAELayer.moveInsideComp( boneLayers[0] );
38913900
// link
3892-
if (linkPath) Duik.Pin.linkPathToLayers( path, boneLayers );
3901+
if (linkPath)
3902+
Duik.Pin.linkPathToLayers( path, boneLayers );
3903+
3904+
// don't rig twice the same (we may get either the prop or the group)
3905+
pathProp.expression = '// Duik auto-rig\n' + pathProp.expression;
3906+
38933907
ok = true;
38943908
}
38953909
if (layerToRemove) layerToRemove.remove();
@@ -7088,6 +7102,12 @@ Duik.Controller.create = function ( comp, type, layer, parent ) {
70887102
DuAELayer.applyPreset( ctrl, preset );
70897103
Duik.Controller.setColor( DuColor.Color.APP_HIGHLIGHT_COLOR, ctrl );
70907104

7105+
// Reset the side (to flip the controller if needed)
7106+
if ( layer != null) {
7107+
var side = Duik.Layer.side(layer);
7108+
Duik.Controller.setSide( side , ctrl);
7109+
}
7110+
70917111
return ctrl;
70927112
}
70937113

@@ -7836,11 +7856,25 @@ Duik.Controller.setLimbName = function ( limbName, layers ) {
78367856
/**
78377857
* Sets the side of the layer
78387858
* @param {OCO.Side} side The side
7839-
* @param {Layer[]} [layers=DuAEComp.getSelectedLayers()] The layer. If omitted, will use all selected layers in the comp
7859+
* @param {Layer[]|Layer|DuList.<Layer>|LayerCollection} [layers=Duik.Controller.get()] The controller. If omitted, will use all selected controllers in the comp
78407860
*/
78417861
Duik.Controller.setSide = function ( side, layers ) {
78427862
layers = def( layers, Duik.Controller.get() );
7863+
layers = new DuList(layers);
7864+
78437865
Duik.Layer.setSide( side, layers );
7866+
// Flip the Left controllers
7867+
for (var i = 0, n = layers.length(); i < n; i++) {
7868+
var layer = layers.at(i);
7869+
if (layer instanceof ShapeLayer) {
7870+
var effect = layer.effect('Pseudo/DUIK Ctrl v03');
7871+
if (effect) {
7872+
effect.property('Flip').setValue(
7873+
side == OCO.Side.LEFT ? 1 : 0
7874+
);
7875+
}
7876+
}
7877+
}
78447878
}
78457879

78467880
/**
@@ -10640,10 +10674,12 @@ Duik.Constraint.twoOneLayerIK = function(layer1, layer2, layer3, goal, controlle
1064010674
Duik.Constraint.bezierIK = function(layers, goal, controller, showGuides) {
1064110675
goal = def(goal, null);
1064210676
controller = def(controller, null);
10643-
if (controller == null && goal == null) throw "You must provide either a goal layer or a controller";
10677+
if (controller == null && goal == null)
10678+
throw "You must provide either a goal layer or a controller";
1064410679

1064510680
showGuides = def(showGuides, true);
10646-
if (!showGuides) showGuides = false;
10681+
if (!showGuides)
10682+
showGuides = false;
1064710683

1064810684
DuAE.beginUndoGroup( i18n._("B\u00e9zier IK"), false);
1064910685

@@ -12827,8 +12863,6 @@ Duik.Rig.auto = function ( bakeBones, bakeEnvelops, bakeNoodles, longChainMode,
1282712863
}
1282812864
}
1282912865

12830-
// TODO Get/Create a master, parent orphan controllers to it
12831-
// Collect controllers
1283212866
var ctrls = [];
1283312867
var limbs = ocoDoc.getLimbs();
1283412868
for (var i = 0, ni = limbs.length; i < ni; i++ )
@@ -12865,12 +12899,12 @@ Duik.Rig.auto = function ( bakeBones, bakeEnvelops, bakeNoodles, longChainMode,
1286512899
}
1286612900

1286712901
// If controllers are nulls, move them to the top of the comp
12868-
if ( OCO.config.get('after effects/controller layer type', Duik.Controller.LayerMode.SHAPE) == Duik.Controller.LayerMode.NULL) {
12902+
var ctrlType = OCO.config.get('after effects/controller layer type', Duik.Controller.LayerMode.SHAPE);
12903+
if ( ctrlType == Duik.Controller.LayerMode.NULL ) {
1286912904
for (var i = 0; i < ctrls.length; i++) {
1287012905
ctrls[i].moveBefore( comp.layer(1)
1287112906
); };
1287212907
};
12873-
1287412908

1287512909
DuAEProject.setProgressMode( false );
1287612910
DuAE.endUndoGroup( i18n._("Auto-rig") );
@@ -19236,6 +19270,8 @@ Duik.Animation.cut = function ( comp )
1923619270
comp = def(comp, DuAEProject.getActiveComp() );
1923719271
if(!comp) return;
1923819272

19273+
DuAE.beginUndoGroup( i18n._("Cut animation"), false);
19274+
1923919275
var props = new DuList( DuAEComp.getSelectedProps() );
1924019276
// When modifying properties, keys are deselected. Let's keep the list.
1924119277
var selectedKeys = [];
@@ -19252,6 +19288,8 @@ Duik.Animation.cut = function ( comp )
1925219288
prop.removeKey(keys[i]);
1925319289
}
1925419290
});
19291+
19292+
DuAE.endUndoGroup( i18n._("Cut animation"));
1925519293
return animations;
1925619294
}
1925719295

0 commit comments

Comments
 (0)