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:
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c48
1 files changed, 27 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 8e9158b8433..9b321ff4e44 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -115,8 +115,10 @@ void BKE_action_free(bAction *act)
/* .................................. */
/**
- * Only copy internal data of Action ID from source to already allocated/initialized destination.
- * You probably never want to use that directly, use BKE_id_copy or BKE_id_copy_ex for typical needs.
+ * Only copy internal data of Action ID from source
+ * to already allocated/initialized destination.
+ * You probably never want to use that directly,
+ * use #BKE_id_copy or #BKE_id_copy_ex for typical needs.
*
* WARNING! This function will not handle ID user count!
*
@@ -139,8 +141,11 @@ void BKE_action_copy_data(Main *UNUSED(bmain),
for (fcu_src = act_src->curves.first; fcu_src; fcu_src = fcu_src->next) {
/* duplicate F-Curve */
- fcu_dst = copy_fcurve(
- fcu_src); /* XXX TODO pass subdata flag? But surprisingly does not seem to be doing any ID refcounting... */
+
+ /* XXX TODO pass subdata flag?
+ * But surprisingly does not seem to be doing any ID refcounting... */
+ fcu_dst = copy_fcurve(fcu_src);
+
BLI_addtail(&act_dst->curves, fcu_dst);
/* fix group links (kindof bad list-in-list search, but this is the most reliable way) */
@@ -309,12 +314,13 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
/* firstly, link this F-Curve to the group */
agrp->channels.first = agrp->channels.last = fcurve;
- /* step through the groups preceding this one, finding the F-Curve there to attach this one after */
+ /* Step through the groups preceding this one,
+ * finding the F-Curve there to attach this one after. */
for (grp = agrp->prev; grp; grp = grp->prev) {
- /* if this group has F-Curves, we want weave the given one in right after the last channel there,
- * but via the Action's list not this group's list
+ /* if this group has F-Curves, we want weave the given one in right after the last channel
+ * there, but via the Action's list not this group's list
* - this is so that the F-Curve is in the right place in the Action,
- * but won't be included in the previous group
+ * but won't be included in the previous group.
*/
if (grp->channels.last) {
/* once we've added, break here since we don't need to search any further... */
@@ -323,9 +329,9 @@ void action_groups_add_channel(bAction *act, bActionGroup *agrp, FCurve *fcurve)
}
}
- /* if grp is NULL, that means we fell through, and this F-Curve should be added as the new first
- * since group is (effectively) the first group. Thus, the existing first F-Curve becomes the
- * second in the chain, etc. etc.
+ /* If grp is NULL, that means we fell through, and this F-Curve should be added as the new
+ * first since group is (effectively) the first group. Thus, the existing first F-Curve becomes
+ * the second in the chain, etc. etc.
*/
if (grp == NULL) {
BLI_insertlinkbefore(&act->curves, act->curves.first, fcurve);
@@ -606,7 +612,8 @@ void BKE_pose_copy_data_ex(bPose **dst,
&listb, &pchan->constraints, flag, true); // BKE_constraints_copy NULLs listb
pchan->constraints = listb;
- /* XXX: This is needed for motionpath drawing to work. Dunno why it was setting to null before... */
+ /* XXX: This is needed for motionpath drawing to work.
+ * Dunno why it was setting to null before... */
pchan->mpath = animviz_copy_motionpath(pchan->mpath);
}
@@ -1287,7 +1294,8 @@ short action_get_item_transforms(bAction *act, Object *ob, bPoseChannel *pchan,
for (fcu = act->curves.first; fcu; fcu = fcu->next) {
const char *bPtr = NULL, *pPtr = NULL;
- /* if enough flags have been found, we can stop checking unless we're also getting the curves */
+ /* If enough flags have been found,
+ * we can stop checking unless we're also getting the curves. */
if ((flags == ACT_TRANS_ALL) && (curves == NULL)) {
break;
}
@@ -1531,14 +1539,12 @@ void what_does_obaction(
}
BLI_strncpy(workob->parsubstr, ob->parsubstr, sizeof(workob->parsubstr));
- BLI_strncpy(
- workob->id.name,
- "OB<ConstrWorkOb>",
- sizeof(
- workob->id
- .name)); /* we don't use real object name, otherwise RNA screws with the real thing */
-
- /* if we're given a group to use, it's likely to be more efficient (though a bit more dangerous) */
+
+ /* we don't use real object name, otherwise RNA screws with the real thing */
+ BLI_strncpy(workob->id.name, "OB<ConstrWorkOb>", sizeof(workob->id.name));
+
+ /* If we're given a group to use, it's likely to be more efficient
+ * (though a bit more dangerous). */
if (agrp) {
/* specifically evaluate this group only */
PointerRNA id_ptr;