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>2019-04-29 12:29:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-29 12:29:41 +0300
commitc7f67d60fbe24df942bcde49aadf480ac6622e71 (patch)
tree10f6863146a0b2d56f2dcc06856d43fd321a37f7 /source/blender/editors/animation
parent9bb47c512f748691a170891a74fffc0356af4800 (diff)
Cleanup: comments (long lines) in editors
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c3
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c10
-rw-r--r--source/blender/editors/animation/anim_filter.c46
-rw-r--r--source/blender/editors/animation/keyframes_edit.c6
-rw-r--r--source/blender/editors/animation/keyframing.c11
-rw-r--r--source/blender/editors/animation/keyingsets.c6
6 files changed, 53 insertions, 29 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index bab76911449..cb6023e20ea 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -222,7 +222,8 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
rgb_uchar_to_float(r_color, cp);
}
else {
- // FIXME: what happens when the indention is 1 greater than what it should be (due to grouping)?
+ /* FIXME: what happens when the indention is 1 greater than what it should be
+ * (due to grouping)? */
int colOfs = 10 - 10 * indent;
UI_GetThemeColorShade3fv(TH_SHADE2, colOfs, r_color);
}
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index d0eb2d187fd..3107eb927e4 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -474,7 +474,8 @@ void ANIM_flush_setting_anim_channels(bAnimContext *ac,
for (ale = anim_data->first; ale; ale = ale->next) {
/* compare data, and type as main way of identifying the channel */
if ((ale->data == ale_setting->data) && (ale->type == ale_setting->type)) {
- /* we also have to check the ID, this is assigned to, since a block may have multiple users */
+ /* We also have to check the ID, this is assigned to,
+ * since a block may have multiple users. */
/* TODO: is the owner-data more revealing? */
if (ale->id == ale_setting->id) {
match = ale;
@@ -1233,9 +1234,10 @@ static void rearrange_action_channels(bAnimContext *ac, bAction *act, eRearrange
/* Filter visible data. */
rearrange_animchannels_filter_visible(&anim_data_visible, ac, ANIMTYPE_GROUP);
- /* rearrange groups first
- * - the group's channels will only get considered if nothing happened when rearranging the groups
- * i.e. the rearrange function returned 0
+ /* Rearrange groups first:
+ * - The group's channels will only get considered
+ * if nothing happened when rearranging the groups
+ * i.e. the rearrange function returned 0.
*/
do_channels = (rearrange_animchannel_islands(
&act->groups, rearrange_func, mode, ANIMTYPE_GROUP, &anim_data_visible) == 0);
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 674f530894d..6a0f7d21f55 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -425,7 +425,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
animedit_get_yscale_factor(ac);
/* get data context info */
- // XXX: if the below fails, try to grab this info from context instead... (to allow for scripting)
+ /* XXX: if the below fails, try to grab this info from context instead...
+ * (to allow for scripting). */
return ANIM_animdata_context_getdata(ac);
}
@@ -486,7 +487,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
* Quick macro to test for all three above usability tests, performing the appropriate provided
* action for each when the AnimData context is appropriate.
*
- * Priority order for this goes (most important, to least): AnimData blocks, NLA, Drivers, Keyframes.
+ * Priority order for this goes (most important, to least):
+ * AnimData blocks, NLA, Drivers, Keyframes.
*
* For this to work correctly,
* a standard set of data needs to be available within the scope that this
@@ -582,7 +584,8 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
#define ANIMCHANNEL_ACTIVEOK(ale) \
(!(filter_mode & ANIMFILTER_ACTIVE) || !(ale->adt) || (ale->adt->flag & ADT_UI_ACTIVE))
-/* quick macro to test if an anim-channel (F-Curve, Group, etc.) is selected in an acceptable way */
+/* Quick macro to test if an anim-channel (F-Curve, Group, etc.)
+ * is selected in an acceptable way. */
#define ANIMCHANNEL_SELOK(test_func) \
(!(filter_mode & (ANIMFILTER_SEL | ANIMFILTER_UNSEL)) || \
((filter_mode & ANIMFILTER_SEL) && test_func) || \
@@ -1210,12 +1213,13 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads,
*/
for (fcu = first; ((fcu) && (fcu->grp == grp)); fcu = fcu->next) {
/* special exception for Pose-Channel/Sequence-Strip/Node Based F-Curves:
- * - the 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data which
- * can be independently selected/hidden, such as Pose-Channels, Sequence Strips, and Nodes.
- * Since these checks were traditionally done as first check for objects, we do the same here
- * - we currently use an 'approximate' method for getting these F-Curves that doesn't require
- * carefully checking the entire path
- * - this will also affect things like Drivers, and also works for Bone Constraints
+ * - The 'Only Selected' and 'Include Hidden' data filters should be applied to sub-ID data
+ * which can be independently selected/hidden, such as Pose-Channels, Sequence Strips,
+ * and Nodes. Since these checks were traditionally done as first check for objects,
+ * we do the same here.
+ * - We currently use an 'approximate' method for getting these F-Curves that doesn't require
+ * carefully checking the entire path.
+ * - This will also affect things like Drivers, and also works for Bone Constraints.
*/
if (ads && owner_id) {
if ((filter_mode & ANIMFILTER_TMP_IGNORE_ONLYSEL) == 0) {
@@ -1498,7 +1502,8 @@ static size_t animfilter_nla(bAnimContext *UNUSED(ac),
next = nlt->next;
}
- /* if we're in NLA-tweakmode, don't show this track if it was disabled (due to tweaking) for now
+ /* if we're in NLA-tweakmode, don't show this track if it was disabled
+ * (due to tweaking) for now:
* - active track should still get shown though (even though it has disabled flag set)
*/
// FIXME: the channels after should still get drawn, just 'differently',
@@ -1811,7 +1816,8 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
*/
if ((filter_mode & ANIMFILTER_DATA_VISIBLE) &&
!(ads->filterflag & ADS_FILTER_INCL_HIDDEN)) {
- /* layer visibility - we check both object and base, since these may not be in sync yet */
+ /* Layer visibility - we check both object and base,
+ * since these may not be in sync yet. */
if ((base->flag & BASE_VISIBLE) == 0) {
continue;
}
@@ -2223,7 +2229,8 @@ static size_t animdata_filter_ds_textures(
}
}
- /* firstly check that we actuallly have some textures, by gathering all textures in a temp list */
+ /* Firstly check that we actuallly have some textures,
+ * by gathering all textures in a temp list. */
for (a = 0; a < MAX_MTEX; a++) {
Tex *tex = (mtex[a]) ? mtex[a]->tex : NULL;
@@ -2393,7 +2400,8 @@ static size_t animdata_filter_ds_modifiers(
/* 1) create a temporary "context" containing all the info we have here to pass to the callback
* use to walk through the dependencies of the modifiers
*
- * ! Assumes that all other unspecified values (i.e. accumulation buffers) are zero'd out properly
+ * Assumes that all other unspecified values (i.e. accumulation buffers)
+ * are zero'd out properly!
*/
afm.ac = ac;
afm.ads = ads;
@@ -2915,7 +2923,8 @@ static size_t animdata_filter_dopesheet_scene(
tmp_items += animdata_filter_ds_gpencil(ac, &tmp_data, ads, gpd, filter_mode);
}
- /* TODO: one day, when sequencer becomes its own datatype, perhaps it should be included here */
+ /* TODO: one day, when sequencer becomes its own datatype,
+ * perhaps it should be included here. */
}
END_ANIMFILTER_SUBCHANNELS;
@@ -3148,7 +3157,8 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac,
/* If filtering for channel drawing, we want the objects in alphabetical order,
* to make it easier to predict where items are in the hierarchy
- * - This order only really matters if we need to show all channels in the list (e.g. for drawing)
+ * - This order only really matters
+ * if we need to show all channels in the list (e.g. for drawing).
* (XXX: What about lingering "active" flags? The order may now become unpredictable)
* - Don't do this if this behavior has been turned off (i.e. due to it being too slow)
* - Don't do this if there's just a single object
@@ -3320,7 +3330,8 @@ static size_t animdata_filter_remove_duplis(ListBase *anim_data)
/* check if hash has any record of an entry like this
* - just use ale->data for now, though it would be nicer to involve
- * ale->type in combination too to capture corner cases (where same data performs differently)
+ * ale->type in combination too to capture corner cases
+ * (where same data performs differently)
*/
if (BLI_gset_add(gs, ale->data)) {
/* this entry is 'unique' and can be kept */
@@ -3439,7 +3450,8 @@ size_t ANIM_animdata_filter(bAnimContext *ac,
break;
}
- /* Timeline Mode - Basically the same as dopesheet, except we only have the summary for now */
+ /* Timeline Mode - Basically the same as dopesheet,
+ * except we only have the summary for now */
case ANIMCONT_TIMELINE: {
/* the DopeSheet editor is the primary place where the DopeSheet summaries are useful */
if (animdata_filter_dopesheet_summary(ac, anim_data, filter_mode, &items)) {
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 815d4c5f3af..884a8c20b19 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -240,7 +240,8 @@ static short ob_keyframes_loop(KeyframeEditData *ked,
filter = ANIMFILTER_DATA_VISIBLE; // curves only
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- /* loop through each F-Curve, applying the operation as required, but stopping on the first one */
+ /* Loop through each F-Curve, applying the operation as required,
+ * but stopping on the first one. */
for (ale = anim_data.first; ale; ale = ale->next) {
if (ANIM_fcurve_keyframes_loop(ked, (FCurve *)ale->data, key_ok, key_cb, fcu_cb)) {
ret = 1;
@@ -288,7 +289,8 @@ static short scene_keyframes_loop(KeyframeEditData *ked,
filter = ANIMFILTER_DATA_VISIBLE; // curves only
ANIM_animdata_filter(&ac, &anim_data, filter, ac.data, ac.datatype);
- /* loop through each F-Curve, applying the operation as required, but stopping on the first one */
+ /* Loop through each F-Curve, applying the operation as required,
+ * but stopping on the first one. */
for (ale = anim_data.first; ale; ale = ale->next) {
if (ANIM_fcurve_keyframes_loop(ked, (FCurve *)ale->data, key_ok, key_cb, fcu_cb)) {
ret = 1;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 4851665c9f3..9b2e1af55e4 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1071,7 +1071,10 @@ static float *visualkey_get_values(Depsgraph *depsgraph,
/* ------------------------- Insert Key API ------------------------- */
-/* Retrieve current property values to keyframe, possibly applying NLA correction when necessary. */
+/**
+ * Retrieve current property values to keyframe,
+ * possibly applying NLA correction when necessary.
+ */
static float *get_keyframe_values(Depsgraph *depsgraph,
ReportList *reports,
PointerRNA ptr,
@@ -2787,8 +2790,10 @@ bool fcurve_is_changed(PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, float fra
return !compare_ff_relative(fcurve_val, cur_val, FLT_EPSILON, 64);
}
-/* Checks whether an Action has a keyframe for a given frame
- * Since we're only concerned whether a keyframe exists, we can simply loop until a match is found...
+/**
+ * Checks whether an Action has a keyframe for a given frame
+ * Since we're only concerned whether a keyframe exists,
+ * we can simply loop until a match is found.
*/
static bool action_frame_has_keyframe(bAction *act, float frame, short filter)
{
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 7362a7e04a1..3fd2e4382af 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -1021,8 +1021,10 @@ static short keyingset_apply_keying_flags(const short base_flags,
return result;
}
-/* Given a KeyingSet and context info (if required), modify keyframes for the channels specified
- * by the KeyingSet. This takes into account many of the different combinations of using KeyingSets.
+/**
+ * Given a KeyingSet and context info (if required),
+ * modify keyframes for the channels specified by the KeyingSet.
+ * This takes into account many of the different combinations of using KeyingSets.
* Returns the number of channels that keyframes were added to
*/
int ANIM_apply_keyingset(