Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-14 09:12:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-14 09:21:34 +0300
commit55e719ec35a10c3f9e7231dee13d4b05aad7d965 (patch)
tree563ed5b1b27e9613de8384da90197ce2c3e1924b /source/blender/editors/armature
parentc279f879ab86e03dff0dbfd3a36b14bebb4956f9 (diff)
parentd7f55c4ff58f87b80f0ce2fa43ce2f7cd2b72675 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_add.c4
-rw-r--r--source/blender/editors/armature/armature_edit.c22
-rw-r--r--source/blender/editors/armature/armature_relations.c22
-rw-r--r--source/blender/editors/armature/pose_group.c4
-rw-r--r--source/blender/editors/armature/pose_lib.c36
-rw-r--r--source/blender/editors/armature/pose_select.c4
-rw-r--r--source/blender/editors/armature/pose_slide.c42
-rw-r--r--source/blender/editors/armature/pose_transform.c6
-rw-r--r--source/blender/editors/armature/pose_utils.c8
9 files changed, 74 insertions, 74 deletions
diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c
index 5ed3fb67ec2..4ddbb9fb9c5 100644
--- a/source/blender/editors/armature/armature_add.c
+++ b/source/blender/editors/armature/armature_add.c
@@ -436,7 +436,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
{
EditBone *eBone = MEM_mallocN(sizeof(EditBone), "addup_editbone");
- /* Copy data from old bone to new bone */
+ /* Copy data from old bone to new bone */
memcpy(eBone, curBone, sizeof(EditBone));
curBone->temp.ebone = eBone;
@@ -462,7 +462,7 @@ EditBone *duplicateEditBoneObjects(EditBone *curBone, const char *name, ListBase
chanold = BKE_pose_channel_verify(src_ob->pose, curBone->name);
if (chanold) {
/* WARNING: this creates a new posechannel, but there will not be an attached bone
- * yet as the new bones created here are still 'EditBones' not 'Bones'.
+ * yet as the new bones created here are still 'EditBones' not 'Bones'.
*/
channew = BKE_pose_channel_verify(dst_ob->pose, eBone->name);
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index d3aa451fa6e..6d624f6746e 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -876,9 +876,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
}
/* step 1: add a new bone
- * - head = head/tail of start (default head)
- * - tail = head/tail of end (default tail)
- * - parent = parent of start
+ * - head = head/tail of start (default head)
+ * - tail = head/tail of end (default tail)
+ * - parent = parent of start
*/
if ((start->flag & BONE_TIPSEL) && (start->flag & BONE_SELECTED) == 0) {
copy_v3_v3(head, start->tail);
@@ -900,7 +900,7 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone
BONE_NO_CYCLICOFFSET | BONE_NO_LOCAL_LOCATION | BONE_DONE);
/* step 2a: reparent any side chains which may be parented to any bone in the chain of bones to merge
- * - potentially several tips for side chains leading to some tree exist...
+ * - potentially several tips for side chains leading to some tree exist...
*/
for (chain = chains->first; chain; chain = chain->next) {
/* traverse down chain until we hit the bottom or if we run into the tip of the chain of bones we're
@@ -1103,8 +1103,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
/* loop over bones in chain */
for (ebo = chain->data; ebo; ebo = parent) {
/* parent is this bone's original parent
- * - we store this, as the next bone that is checked is this one
- * but the value of ebo->parent may change here...
+ * - we store this, as the next bone that is checked is this one
+ * but the value of ebo->parent may change here...
*/
parent = ebo->parent;
@@ -1116,8 +1116,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
swap_v3_v3(ebo->head, ebo->tail);
/* do parent swapping:
- * - use 'child' as new parent
- * - connected flag is only set if points are coincidental
+ * - use 'child' as new parent
+ * - connected flag is only set if points are coincidental
*/
ebo->parent = child;
if ((child) && equals_v3v3(ebo->head, child->tail))
@@ -1126,7 +1126,7 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
ebo->flag &= ~BONE_CONNECTED;
/* get next bones
- * - child will become the new parent of next bone
+ * - child will become the new parent of next bone
*/
child = ebo;
}
@@ -1140,8 +1140,8 @@ static int armature_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
}
/* get next bones
- * - child will become new parent of next bone (not swapping occurred,
- * so set to NULL to prevent infinite-loop)
+ * - child will become new parent of next bone (not swapping occurred,
+ * so set to NULL to prevent infinite-loop)
*/
child = NULL;
}
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 80dc2559bdb..0e95b6c3467 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -439,8 +439,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
- * - the target isn't origArm/newArm itself
- * - the target is one that can be found in newArm/origArm
+ * - the target isn't origArm/newArm itself
+ * - the target is one that can be found in newArm/origArm
*/
if (ct->subtarget[0] != 0) {
if (ct->tar == origArm) {
@@ -477,8 +477,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
for (ct = targets.first; ct; ct = ct->next) {
/* any targets which point to original armature are redirected to the new one only if:
- * - the target isn't origArm/newArm itself
- * - the target is one that can be found in newArm/origArm
+ * - the target isn't origArm/newArm itself
+ * - the target is one that can be found in newArm/origArm
*/
if (ct->subtarget[0] != '\0') {
if (ct->tar == origArm) {
@@ -514,8 +514,8 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
}
/* Helper function for armature separating - remove certain bones from the given armature
- * sel: remove selected bones from the armature, otherwise the unselected bones are removed
- * (ob is not in editmode)
+ * sel: remove selected bones from the armature, otherwise the unselected bones are removed
+ * (ob is not in editmode)
*/
static void separate_armature_bones(Main *bmain, Object *ob, short sel)
{
@@ -596,11 +596,11 @@ static int separate_armature_exec(bContext *C, wmOperator *op)
Base *oldbase, *newbase;
/* we are going to do this as follows (unlike every other instance of separate):
- * 1. exit editmode +posemode for active armature/base. Take note of what this is.
- * 2. duplicate base - BASACT is the new one now
- * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc
- * 4. fix constraint links
- * 5. make original armature active and enter editmode
+ * 1. exit editmode +posemode for active armature/base. Take note of what this is.
+ * 2. duplicate base - BASACT is the new one now
+ * 3. for each of the two armatures, enter editmode -> remove appropriate bones -> exit editmode + recalc
+ * 4. fix constraint links
+ * 5. make original armature active and enter editmode
*/
/* 1) only edit-base selected */
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index aefca13d66c..3a619f771bd 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -164,7 +164,7 @@ static int pose_groups_menu_invoke(bContext *C, wmOperator *op, const wmEvent *U
layout = UI_popup_menu_layout(pup);
/* special entry - allow to create new group, then use that
- * (not to be used for removing though)
+ * (not to be used for removing though)
*/
if (strstr(op->idname, "assign")) {
uiItemIntO(layout, "New Group", ICON_NONE, op->idname, "type", 0);
@@ -201,7 +201,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
pose = ob->pose;
/* set the active group number to the one from operator props
- * - if 0 after this, make a new group...
+ * - if 0 after this, make a new group...
*/
pose->active_group = RNA_int_get(op->ptr, "type");
if (pose->active_group == 0)
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index eeefcf39799..18ce6476105 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -90,19 +90,19 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS
* It acts as a kind of "glorified clipboard for poses", allowing for naming of poses.
*
* Features:
- * - PoseLibs are simply normal Actions
- * - Each "pose" is simply a set of keyframes that occur on a particular frame
- * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be
- * found in the Action
- * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding
- * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the
- * animator to preview what action best suits that pose
+ * - PoseLibs are simply normal Actions
+ * - Each "pose" is simply a set of keyframes that occur on a particular frame
+ * -> a set of TimeMarkers that belong to each Action, help 'label' where a 'pose' can be
+ * found in the Action
+ * - The Scrollwheel or PageUp/Down buttons when used in a special mode or after pressing/holding
+ * [a modifier] key, cycles through the poses available for the active pose's poselib, allowing the
+ * animator to preview what action best suits that pose
*/
/* ************************************************************* */
/* gets the first available frame in poselib to store a pose on
- * - frames start from 1, and a pose should occur on every frame... 0 is error!
+ * - frames start from 1, and a pose should occur on every frame... 0 is error!
*/
static int poselib_get_free_index(bAction *act)
{
@@ -476,8 +476,8 @@ static int poselib_add_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
/* add pose to poselib - replaces any existing pose there
- * - for the 'replace' option, this should end up finding the appropriate marker,
- * so no new one will be added
+ * - for the 'replace' option, this should end up finding the appropriate marker,
+ * so no new one will be added
*/
for (marker = act->markers.first; marker; marker = marker->next) {
if (marker->frame == frame) {
@@ -970,9 +970,9 @@ static void poselib_backup_free_data(tPoseLib_PreviewData *pld)
/* ---------------------------- */
/* Applies the appropriate stored pose from the pose-library to the current pose
- * - assumes that a valid object, with a poselib has been supplied
- * - gets the string to print in the header
- * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
+ * - assumes that a valid object, with a poselib has been supplied
+ * - gets the string to print in the header
+ * - this code is based on the code for extract_pose_from_action in blenkernel/action.c
*/
static void poselib_apply_pose(tPoseLib_PreviewData *pld)
{
@@ -1102,7 +1102,7 @@ static void poselib_preview_apply(bContext *C, wmOperator *op)
RNA_int_set(op->ptr, "pose_index", -2); /* -2 means don't apply any pose */
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
// FIXME: shouldn't this use the builtin stuff?
if ((pld->arm->flag & ARM_DELAYDEFORM) == 0)
@@ -1182,8 +1182,8 @@ static void poselib_preview_get_next(tPoseLib_PreviewData *pld, int step)
/* generate a new list of search matches */
for (marker = pld->act->markers.first; marker; marker = marker->next) {
/* does the name partially match?
- * - don't worry about case, to make it easier for users to quickly input a name (or
- * part of one), which is the whole point of this feature
+ * - don't worry about case, to make it easier for users to quickly input a name (or
+ * part of one), which is the whole point of this feature
*/
if (BLI_strcasestr(marker->name, pld->searchstr)) {
/* make link-data to store reference to it */
@@ -1326,7 +1326,7 @@ static int poselib_preview_handle_event(bContext *UNUSED(C), wmOperator *op, con
}
/* backup stuff that needs to occur before every operation
- * - make a copy of searchstr, so that we know if cache needs to be rebuilt
+ * - make a copy of searchstr, so that we know if cache needs to be rebuilt
*/
BLI_strncpy(pld->searchold, pld->searchstr, sizeof(pld->searchold));
@@ -1610,7 +1610,7 @@ static void poselib_preview_cleanup(bContext *C, wmOperator *op)
poselib_backup_restore(pld);
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
if ((arm->flag & ARM_DELAYDEFORM) == 0)
DEG_id_tag_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 0c7de754482..3947fc7388e 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -705,8 +705,8 @@ static bool pose_select_same_group(bContext *C, bool extend)
}
/* alloc a small array to keep track of the groups to use
- * - each cell stores on/off state for whether group should be used
- * - size is (groups_len + 1), since (index = 0) is used for no-group
+ * - each cell stores on/off state for whether group should be used
+ * - size is (groups_len + 1), since (index = 0) is used for no-group
*/
groups_len++;
group_flags_array = MEM_callocN(objects_len * groups_len * sizeof(bool), "pose_select_same_group");
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index be3914b2054..75090a656ae 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -335,9 +335,9 @@ static void pose_slide_apply_val(
w2 = 1.0f - w1; /* this must come first */
}
else {
- /* - these weights are derived from the relative distance of these
- * poses from the current frame
- * - they then get normalized so that they only sum up to 1
+ /* - these weights are derived from the relative distance of these
+ * poses from the current frame
+ * - they then get normalized so that they only sum up to 1
*/
float wtot;
@@ -350,15 +350,15 @@ static void pose_slide_apply_val(
}
/* depending on the mode, calculate the new value
- * - in all of these, the start+end values are multiplied by w2 and w1 (respectively),
- * since multiplication in another order would decrease the value the current frame is closer to
+ * - in all of these, the start+end values are multiplied by w2 and w1 (respectively),
+ * since multiplication in another order would decrease the value the current frame is closer to
*/
switch (pso->mode) {
case POSESLIDE_PUSH: /* make the current pose more pronounced */
{
/* perform a weighted average here, favoring the middle pose
- * - numerator should be larger than denominator to 'expand' the result
- * - perform this weighting a number of times given by the percentage...
+ * - numerator should be larger than denominator to 'expand' the result
+ * - perform this weighting a number of times given by the percentage...
*/
int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */
@@ -370,8 +370,8 @@ static void pose_slide_apply_val(
case POSESLIDE_RELAX: /* make the current pose more like its surrounding ones */
{
/* perform a weighted average here, favoring the middle pose
- * - numerator should be smaller than denominator to 'relax' the result
- * - perform this weighting a number of times given by the percentage...
+ * - numerator should be smaller than denominator to 'relax' the result
+ * - perform this weighting a number of times given by the percentage...
*/
int iters = (int)ceil(10.0f * pso->percentage); /* TODO: maybe a sensitivity ctrl on top of this is needed */
@@ -445,8 +445,8 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, tPChanFCurveLink *pfl, con
continue;
/* do we have a match?
- * - bPtr is the RNA Path with the standard part chopped off
- * - pPtr is the chunk of the path which is left over
+ * - bPtr is the RNA Path with the standard part chopped off
+ * - pPtr is the chunk of the path which is left over
*/
bPtr = strstr(fcu->rna_path, pfl->pchan_path) + len;
pPtr = strstr(bPtr, prop_prefix);
@@ -629,9 +629,9 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
/* for each link, handle each set of transforms */
for (pfl = pso->pfLinks.first; pfl; pfl = pfl->next) {
/* valid transforms for each PoseChannel should have been noted already
- * - sliding the pose should be a straightforward exercise for location+rotation,
- * but rotations get more complicated since we may want to use quaternion blending
- * for quaternions instead...
+ * - sliding the pose should be a straightforward exercise for location+rotation,
+ * but rotations get more complicated since we may want to use quaternion blending
+ * for quaternions instead...
*/
bPoseChannel *pchan = pfl->pchan;
@@ -1334,7 +1334,7 @@ typedef union tPosePropagate_ModeData {
/* get frame on which the "hold" for the bone ends
* XXX: this may not really work that well if a bone moves on some channels and not others
* if this happens to be a major issue, scrap this, and just make this happen
- * independently per F-Curve
+ * independently per F-Curve
*/
static float pose_propagate_get_boneHoldEndFrame(tPChanFCurveLink *pfl, float startFrame)
{
@@ -1354,7 +1354,7 @@ static float pose_propagate_get_boneHoldEndFrame(tPChanFCurveLink *pfl, float st
}
/* find the long keyframe (i.e. hold), and hence obtain the endFrame value
- * - the best case would be one that starts on the frame itself
+ * - the best case would be one that starts on the frame itself
*/
ActKeyColumn *ab = (ActKeyColumn *)BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &startFrame);
@@ -1495,11 +1495,11 @@ static void pose_propagate_fcurve(wmOperator *op, Object *ob, FCurve *fcu,
return;
/* find the first keyframe to start propagating from
- * - if there's a keyframe on the current frame, we probably want to save this value there too
- * since it may be as of yet unkeyed
- * - if starting before the starting frame, don't touch the key, as it may have had some valid
- * values
- * - if only doing selected keyframes, start from the first one
+ * - if there's a keyframe on the current frame, we probably want to save this value there too
+ * since it may be as of yet unkeyed
+ * - if starting before the starting frame, don't touch the key, as it may have had some valid
+ * values
+ * - if only doing selected keyframes, start from the first one
*/
if (mode != POSE_PROPAGATE_SELECTED_KEYS) {
match = binarysearch_bezt_index(fcu->bezt, startFrame, fcu->totvert, &keyExists);
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 5a6757294dc..5960c2d3c81 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -137,8 +137,8 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op)
copy_v3_v3(curbone->tail, pchan_eval->pose_tail);
/* fix roll:
- * 1. find auto-calculated roll value for this bone now
- * 2. remove this from the 'visual' y-rotation
+ * 1. find auto-calculated roll value for this bone now
+ * 2. remove this from the 'visual' y-rotation
*/
{
float premat[3][3], imat[3][3], pmat[3][3], tmat[3][3];
@@ -342,7 +342,7 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, const bo
/* continue? */
if (paste_ok) {
/* only loc rot size
- * - only copies transform info for the pose
+ * - only copies transform info for the pose
*/
copy_v3_v3(pchan->loc, chan->loc);
copy_v3_v3(pchan->size, chan->size);
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c
index a67ee8453bc..b891a181cfc 100644
--- a/source/blender/editors/armature/pose_utils.c
+++ b/source/blender/editors/armature/pose_utils.c
@@ -236,7 +236,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob)
bArmature *arm = (bArmature *)ob->data;
/* old optimize trick... this enforces to bypass the depgraph
- * - note: code copied from transform_generics.c -> recalcData()
+ * - note: code copied from transform_generics.c -> recalcData()
*/
/* FIXME: shouldn't this use the builtin stuff? */
if ((arm->flag & ARM_DELAYDEFORM) == 0)
@@ -338,8 +338,8 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks,
BLI_freelistN(&dsources);
/* do the bone paths
- * - only do this if keyframes should have been added
- * - do not calculate unless there are paths already to update...
+ * - only do this if keyframes should have been added
+ * - do not calculate unless there are paths already to update...
*/
FOREACH_OBJECT_IN_MODE_BEGIN(view_layer, OB_MODE_POSE, ob) {
if (ob->id.tag & LIB_TAG_DOIT) {
@@ -354,7 +354,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks,
/* ------------------------- */
/* find the next F-Curve for a PoseChannel with matching path...
- * - path is not just the pfl rna_path, since that path doesn't have property info yet
+ * - path is not just the pfl rna_path, since that path doesn't have property info yet
*/
LinkData *poseAnim_mapping_getNextFCurve(ListBase *fcuLinks, LinkData *prev, const char *path)
{