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
path: root/source
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
parent9bb47c512f748691a170891a74fffc0356af4800 (diff)
Cleanup: comments (long lines) in editors
Diffstat (limited to 'source')
-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
-rw-r--r--source/blender/editors/armature/armature_intern.h5
-rw-r--r--source/blender/editors/armature/armature_naming.c7
-rw-r--r--source/blender/editors/armature/armature_relations.c7
-rw-r--r--source/blender/editors/armature/armature_select.c4
-rw-r--r--source/blender/editors/armature/armature_utils.c4
-rw-r--r--source/blender/editors/armature/pose_lib.c16
-rw-r--r--source/blender/editors/armature/pose_slide.c12
-rw-r--r--source/blender/editors/gpencil/annotate_draw.c18
-rw-r--r--source/blender/editors/gpencil/annotate_paint.c9
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c14
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c3
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c16
-rw-r--r--source/blender/editors/include/ED_anim_api.h3
-rw-r--r--source/blender/editors/mesh/editmesh_add.c4
-rw-r--r--source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c3
-rw-r--r--source/blender/editors/mesh/editmesh_rip.c4
-rw-r--r--source/blender/editors/mesh/editmesh_select.c3
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c7
-rw-r--r--source/blender/editors/object/object_add.c3
-rw-r--r--source/blender/editors/object/object_constraint.c8
-rw-r--r--source/blender/editors/object/object_data_transfer.c7
-rw-r--r--source/blender/editors/object/object_vgroup.c3
-rw-r--r--source/blender/editors/physics/particle_edit.c3
-rw-r--r--source/blender/editors/physics/physics_fluid.c3
-rw-r--r--source/blender/editors/render/render_internal.c5
-rw-r--r--source/blender/editors/screen/area.c3
-rw-r--r--source/blender/editors/screen/screen_draw.c3
-rw-r--r--source/blender/editors/screen/screen_ops.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_2d.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c12
-rw-r--r--source/blender/editors/space_action/action_edit.c16
-rw-r--r--source/blender/editors/space_file/fsmenu.c4
-rw-r--r--source/blender/editors/space_graph/graph_draw.c6
-rw-r--r--source/blender/editors/space_graph/graph_select.c14
-rw-r--r--source/blender/editors/space_graph/graph_utils.c3
-rw-r--r--source/blender/editors/space_image/image_ops.c3
-rw-r--r--source/blender/editors/space_nla/nla_edit.c5
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c5
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c8
48 files changed, 216 insertions, 140 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(
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 4aed4217b6d..6c2d9fe8f42 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -217,8 +217,9 @@ void POSE_OT_propagate(struct wmOperatorType *ot);
/* ******************************************************* */
/* Various Armature Edit/Pose Editing API's */
-/* Ideally, many of these defines would not be needed as everything would be strictly self-contained
- * within each file, but some tools still have a bit of overlap which makes things messy -- Feb 2013
+/* Ideally, many of these defines would not be needed as everything would be strictly
+ * self-contained within each file,
+ * but some tools still have a bit of overlap which makes things messy -- Feb 2013
*/
EditBone *make_boneList(struct ListBase *edbo, struct ListBase *bones, struct Bone *actBone);
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 6d25fac79f6..083967d5d41 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -328,9 +328,10 @@ void ED_armature_bone_rename(Main *bmain,
/* Fix all animdata that may refer to this bone -
* we can't just do the ones attached to objects,
- * since other ID-blocks may have drivers referring to this bone T29822.
- */
- // XXX: the ID here is for armatures, but most bone drivers are actually on the object instead...
+ * since other ID-blocks may have drivers referring to this bone T29822. */
+
+ /* XXX: the ID here is for armatures,
+ * but most bone drivers are actually on the object instead. */
{
BKE_animdata_fix_paths_rename_all(&arm->id, "pose.bones", oldname, newname);
diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c
index 037703c50bf..97a9d854eab 100644
--- a/source/blender/editors/armature/armature_relations.c
+++ b/source/blender/editors/armature/armature_relations.c
@@ -432,9 +432,10 @@ static void separated_armature_fix_links(Main *bmain, Object *origArm, Object *n
cti->get_constraint_targets(con, &targets);
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
+ /* 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.
*/
if (ct->subtarget[0] != 0) {
if (ct->tar == origArm) {
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index 95c10b79678..fbbb68d2003 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -867,8 +867,8 @@ static bool armature_edit_select_op_apply(bArmature *arm,
}
/**
- * Perform a selection operation on elements which have been 'touched', use for lasso & border select
- * but can be used elsewhere too.
+ * Perform a selection operation on elements which have been 'touched',
+ * use for lasso & border select but can be used elsewhere too.
*
* Tagging is done via #EditBone.temp.i using: #BONESEL_ROOT, #BONESEL_TIP, #BONESEL_BONE
* And optionally ignoring end-points using the #BONESEL_ROOT, #BONESEL_TIP right shifted 16 bits.
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index fb3fb310b9d..b23081cd6fa 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -466,8 +466,8 @@ static EditBone *make_boneList_rec(ListBase *edbo,
eBone->parent->flag |= BONE_TIPSEL;
}
- /* For connected bones, take care when changing the selection when we have a connected parent,
- * this flag is a copy of '(eBone->parent->flag & BONE_TIPSEL)'. */
+ /* For connected bones, take care when changing the selection when we have a
+ * connected parent, this flag is a copy of '(eBone->parent->flag & BONE_TIPSEL)'. */
eBone->flag |= BONE_ROOTSEL;
}
else {
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 010f1c0e654..65e1c82e0bf 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -77,7 +77,9 @@ static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUS
}
/* ************************************************************* */
-/* == POSE-LIBRARY TOOL FOR BLENDER ==
+/**
+ * Pose-Library Tool for Blender
+ * =============================
*
* Overview:
* This tool allows animators to store a set of frequently used poses to dump into
@@ -85,13 +87,13 @@ 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
+ * - 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
+ * [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.
*/
/* ************************************************************* */
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c
index 79182a89096..fcfb61bb3a4 100644
--- a/source/blender/editors/armature/pose_slide.c
+++ b/source/blender/editors/armature/pose_slide.c
@@ -362,9 +362,10 @@ static void pose_slide_apply_val(tPoseSlideOp *pso, FCurve *fcu, Object *ob, flo
w2 = (w2 / wtot);
}
- /* 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
+ /* 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.
*/
switch (pso->mode) {
case POSESLIDE_PUSH: /* make the current pose more pronounced */
@@ -698,9 +699,8 @@ static void pose_slide_apply(bContext *C, tPoseSlideOp *pso)
}
if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_PROPS) && (pfl->oldprops)) {
- /* not strictly a transform, but custom properties contribute to the pose produced in many rigs
- * (e.g. the facial rigs used in Sintel)
- */
+ /* Not strictly a transform, but custom properties contribute
+ * to the pose produced in many rigs (e.g. the facial rigs used in Sintel). */
pose_slide_apply_props(pso, pfl, "[\""); /* dummy " for texteditor bugs */
}
}
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c
index 9cd1cf91476..f325422fec7 100644
--- a/source/blender/editors/gpencil/annotate_draw.c
+++ b/source/blender/editors/gpencil/annotate_draw.c
@@ -897,12 +897,13 @@ static void annotation_draw_data_layers(
/* draw the strokes already in active frame */
annotation_draw_strokes(gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, lthick, ink);
- /* Draw verts of selected strokes
+ /* Draw verts of selected strokes:
* - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering
* - locked layers can't be edited, so there's no point showing these verts
* as they will have no bearings on what gets edited
* - only show when in editmode, since operators shouldn't work otherwise
- * (NOTE: doing it this way means that the toggling editmode shows visible change immediately)
+ * (NOTE: doing it this way means that the toggling editmode
+ * shows visible change immediately).
*/
/* XXX: perhaps we don't want to show these when users are drawing... */
if ((G.f & G_FLAG_RENDER_VIEWPORT) == 0 && (gpl->flag & GP_LAYER_LOCKED) == 0 &&
@@ -1114,9 +1115,13 @@ void ED_annotation_draw_2dimage(const bContext *C)
annotation_draw_data_all(scene, gpd, offsx, offsy, sizex, sizey, CFRA, dflag, sa->spacetype);
}
-/* draw grease-pencil sketches to specified 2d-view assuming that matrices are already set correctly
- * Note: this gets called twice - first time with onlyv2d=true to draw 'canvas' strokes,
- * second time with onlyv2d=false for screen-aligned strokes */
+/**
+ * Draw grease-pencil sketches to specified 2d-view
+ * assuming that matrices are already set correctly.
+ *
+ * \note This gets called twice - first time with onlyv2d=true to draw 'canvas' strokes,
+ * second time with onlyv2d=false for screen-aligned strokes.
+ */
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -1135,7 +1140,8 @@ void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
}
/* special hack for Image Editor */
- /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, so disabled */
+ /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way,
+ * so disabled. */
if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
dflag |= GP_DRAWDATA_IEDITHACK;
}
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 0363fd6c754..7babbadb205 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -2205,7 +2205,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
p->ar = ar;
}
- /* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */
+ /* We don't pass on key events, GP is used with key-modifiers -
+ * prevents Dkey to insert drivers. */
if (ISKEYBOARD(event->type)) {
if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) {
/* allow some keys:
@@ -2235,8 +2236,10 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
//printf("\tGP - handle modal event...\n");
- /* exit painting mode (and/or end current stroke)
- * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) as that would break polyline [#32647]
+ /* Exit painting mode (and/or end current stroke)
+ *
+ * NOTE: cannot do RIGHTMOUSE (as is standard for canceling)
+ * as that would break polyline T32647.
*/
if (ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) {
/* exit() ends the current stroke before cleaning up */
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index bc98cb5226b..1af01850707 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1167,7 +1167,8 @@ static bool gpsculpt_brush_apply_clone(bContext *C, tGP_BrushEditData *gso)
}
else {
/* Continuous - Just keep pasting everytime we move */
- /* TODO: The spacing of repeat should be controlled using a "stepsize" or similar property? */
+ /* TODO: The spacing of repeat should be controlled using a
+ * "stepsize" or similar property? */
gp_brush_clone_add(C, gso);
}
}
@@ -1406,9 +1407,10 @@ static void gpsculpt_brush_init_stroke(tGP_BrushEditData *gso)
if (gpencil_layer_is_editable(gpl) && (gpl->actframe != NULL)) {
bGPDframe *gpf = gpl->actframe;
- /* Make a new frame to work on if the layer's frame and the current scene frame don't match up
+ /* Make a new frame to work on if the layer's frame
+ * and the current scene frame don't match up:
* - This is useful when animating as it saves that "uh-oh" moment when you realize you've
- * spent too much time editing the wrong frame...
+ * spent too much time editing the wrong frame.
*/
// XXX: should this be allowed when framelock is enabled?
if (gpf->framenum != cfra_eval) {
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index ded663276a4..5832f092676 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -328,9 +328,9 @@ static int gp_find_end_of_stroke_idx(tGpTimingData *gtd,
else {
float delta, min, max;
- /* This code ensures that if the first gaps have been shorter than average gap_duration,
- * next gaps will tend to be longer (i.e. try to recover the lateness), and vice-versa!
- */
+ /* This code ensures that if the first gaps
+ * have been shorter than average gap_duration, next gaps
+ * will tend to be longer (i.e. try to recover the lateness), and vice-versa! */
delta = delta_time - (gtd->gap_duration * (*nbr_done_gaps));
/* Clamp min between [-gap_randomness, 0.0], with lower delta giving higher min */
@@ -963,10 +963,10 @@ static void gp_stroke_to_bezier(bContext *C,
/* Create "link points" */
/* About "zero-radius" point interpolations:
- * - If we have at least two points in current curve (most common case), we linearly extrapolate
- * the last segment to get the first point (p1) position and timing.
- * - If we do not have those (quite odd, but may happen), we linearly interpolate the last point
- * with the first point of the current stroke.
+ * - If we have at least two points in current curve (most common case),
+ * we linearly extrapolate the last segment to get the first point (p1) position and timing.
+ * - If we do not have those (quite odd, but may happen),
+ * we linearly interpolate the last point with the first point of the current stroke.
*
* The same goes for the second point,
* first segment of the current stroke is "negatively" extrapolated
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 008ed85d52a..7b65a51e8a9 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -2212,7 +2212,8 @@ void gp_stroke_delete_tagged_points(bGPDframe *gpf,
/* Watch out for special case where No islands = All points selected = Delete Stroke only */
if (num_islands) {
- /* there are islands, so create a series of new strokes, adding them before the "next" stroke */
+ /* There are islands, so create a series of new strokes,
+ * adding them before the "next" stroke. */
int idx;
bGPDstroke *new_stroke = NULL;
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index f985ade9c7e..6139c1caada 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1205,10 +1205,9 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
gp_randomize_stroke(gps, brush, p->rng);
}
- /* smooth stroke after subdiv - only if there's something to do
- * for each iteration, the factor is reduced to get a better smoothing without changing too much
- * the original stroke
- */
+ /* Smooth stroke after subdiv - only if there's something to do for each iteration,
+ * the factor is reduced to get a better smoothing
+ * without changing too much the original stroke. */
if ((brush->gpencil_settings->flag & GP_BRUSH_GROUP_SETTINGS) &&
(brush->gpencil_settings->draw_smoothfac > 0.0f)) {
float reduce = 0.0f;
@@ -3474,7 +3473,8 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
}
}
- /* we don't pass on key events, GP is used with key-modifiers - prevents Dkey to insert drivers */
+ /* We don't pass on key events, GP is used with key-modifiers -
+ * prevents Dkey to insert drivers. */
if (ISKEYBOARD(event->type)) {
if (ELEM(event->type, LEFTARROWKEY, DOWNARROWKEY, RIGHTARROWKEY, UPARROWKEY, ZKEY)) {
/* allow some keys:
@@ -3508,8 +3508,10 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event)
//printf("\tGP - handle modal event...\n");
- /* exit painting mode (and/or end current stroke)
- * NOTE: cannot do RIGHTMOUSE (as is standard for canceling) as that would break polyline [#32647]
+ /* Exit painting mode (and/or end current stroke).
+ *
+ * NOTE: cannot do RIGHTMOUSE (as is standard for canceling)
+ * as that would break polyline T32647.
*/
/* if polyline and release shift must cancel */
if ((ELEM(event->type, RETKEY, PADENTER, ESCKEY, SPACEKEY, EKEY)) ||
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 3a9539ee52c..d314e9b4ca6 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -276,7 +276,8 @@ typedef enum eAnim_Update_Flags {
typedef enum eAnimFilter_Flags {
/** data which channel represents is fits the dopesheet filters
* (i.e. scene visibility criteria) */
- // XXX: it's hard to think of any examples where this *ISN'T* the case... perhaps becomes implicit?
+ /* XXX: it's hard to think of any examples where this *ISN'T* the case...
+ * perhaps becomes implicit?. */
ANIMFILTER_DATA_VISIBLE = (1 << 0),
/** channel is visible within the channel-list hierarchy
* (i.e. F-Curves within Groups in ActEdit) */
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index 815f51a4772..a7d1e54ad59 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -490,8 +490,8 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time you will still reach
- * impossible values (10^12 vertices or so...). */
+ /* Note that if you use MESH_ADD_VERTS_MAXI for both x and y at the same time
+ * you will still reach impossible values (10^12 vertices or so...). */
RNA_def_int(
ot->srna, "x_subdivisions", 10, 2, MESH_ADD_VERTS_MAXI, "X Subdivisions", "", 2, 1000);
RNA_def_int(
diff --git a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
index 85be7d902ad..269ead7b23f 100644
--- a/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
+++ b/source/blender/editors/mesh/editmesh_extrude_spin_gizmo.c
@@ -1018,7 +1018,8 @@ static void gizmo_mesh_spin_redo_draw_prepare(const bContext *UNUSED(C), wmGizmo
ggd->data.op = WM_operator_last_redo((bContext *)ggd->data.context);
}
- /* Not essential, just avoids feedback loop where matrices could shift because of float precision.
+ /* Not essential, just avoids feedback loop where matrices
+ * could shift because of float precision.
* Updates in this case are also redundant. */
bool is_modal = false;
for (wmGizmo *gz = gzgroup->gizmos.first; gz; gz = gz->next) {
diff --git a/source/blender/editors/mesh/editmesh_rip.c b/source/blender/editors/mesh/editmesh_rip.c
index a39944fc145..ffdb434405e 100644
--- a/source/blender/editors/mesh/editmesh_rip.c
+++ b/source/blender/editors/mesh/editmesh_rip.c
@@ -939,8 +939,8 @@ static int edbm_rip_invoke__edge(bContext *C, const wmEvent *event, Object *obed
l_b;
l = BM_loop_other_edge_loop(l, v);
- /* important edge is manifold else we can be attempting to split off a fan that don't budge,
- * not crashing but adds duplicate edge. */
+ /* Important edge is manifold else we can be attempting to split off
+ * a fan that don't budge, not crashing but adds duplicate edge. */
if (BM_edge_is_manifold(l->e)) {
l = l->radial_next;
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index d81de37add3..9df03a81762 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -462,7 +462,8 @@ static void findnearestvert__doClosest(void *userData,
*
* \param r_dist: (in/out), minimal distance to the nearest and at the end, actual distance
* \param use_select_bias:
- * - When true, selected vertices are given a 5 pixel bias to make them further than unselect verts.
+ * - When true, selected vertices are given a 5 pixel bias
+ * to make them further than unselect verts.
* - When false, unselected vertices are given the bias.
* \param use_cycle: Cycle over elements within #FIND_NEAR_CYCLE_THRESHOLD_MIN in order of index.
*/
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 349acf754ce..fcca91d4167 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -2810,7 +2810,9 @@ void MESH_OT_colors_reverse(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* props */
- //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around");
+#if 0
+ RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around");
+#endif
}
/** \} */
@@ -7010,7 +7012,8 @@ void MESH_OT_offset_edge_loops(wmOperatorType *ot)
ot->exec = edbm_offset_edgeloop_exec;
ot->poll = ED_operator_editmesh;
- /* Keep internal, since this is only meant to be accessed via 'MESH_OT_offset_edge_loops_slide' */
+ /* Keep internal, since this is only meant to be accessed via
+ * 'MESH_OT_offset_edge_loops_slide'. */
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 87782e895b5..638261ea69f 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1452,7 +1452,8 @@ static int object_delete_exec(bContext *C, wmOperator *op)
}
/* remove from Grease Pencil parent */
- /* XXX This is likely not correct? Will also remove parent from grease pencil from other scenes,
+ /* XXX This is likely not correct?
+ * Will also remove parent from grease pencil from other scenes,
* even when use_global is false... */
for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 8ae736d42c0..5b9b4304064 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1828,9 +1828,8 @@ static bool get_new_constraint_target(
/* transform cent to global coords for loc */
if (pchanact) {
- /* since by default, IK targets the tip of the last bone, use the tip of the active PoseChannel
- * if adding a target for an IK Constraint
- */
+ /* Since by default, IK targets the tip of the last bone,
+ * use the tip of the active PoseChannel if adding a target for an IK Constraint. */
if (con_type == CONSTRAINT_TYPE_KINEMATIC) {
mul_v3_m4v3(obt->loc, obact->obmat, pchanact->pose_tail);
}
@@ -2215,7 +2214,8 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, selected_pose_bones, Object *, ob) {
bConstraint *con, *next;
- /* TODO: should we be checking if these constraints were local before we try and remove them? */
+ /* TODO: should we be checking if these constraints were local
+ * before we try and remove them? */
for (con = pchan->constraints.first; con; con = next) {
next = con->next;
if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index afa2c342452..313ff130e25 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -520,7 +520,8 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
}
/* Used by both OBJECT_OT_data_transfer and OBJECT_OT_datalayout_transfer */
-/* Note this context poll is only really partial, it cannot check for all possible invalid cases. */
+/* Note this context poll is only really partial,
+ * it cannot check for all possible invalid cases. */
static bool data_transfer_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
@@ -773,8 +774,8 @@ static int datalayout_transfer_exec(bContext *C, wmOperator *op)
dtmd = (DataTransferModifierData *)edit_modifier_property_get(
op, ob_act, eModifierType_DataTransfer);
- /* If we have a modifier, we transfer data layout from this modifier's source object to active one.
- * Else, we transfer data layout from active object to all selected ones. */
+ /* If we have a modifier, we transfer data layout from this modifier's source object to
+ * active one. Else, we transfer data layout from active object to all selected ones. */
if (dtmd) {
Object *ob_src = dtmd->ob_source;
Object *ob_dst = ob_act;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index d422ee565a3..3f3932e5041 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -893,7 +893,8 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
* deform group.
*/
- /* TODO, this is slow in a loop, better pass def_nr directly, but leave for later... - campbell */
+ /* TODO(campbell): This is slow in a loop, better pass def_nr directly,
+ * but leave for later. */
const int def_nr = BLI_findindex(&ob->defbase, dg);
if (def_nr != -1) {
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 9921ca02af9..52be2c6eff4 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4162,7 +4162,8 @@ static void brush_add_count_iter(void *__restrict iter_data_v,
add_pars[iter].num_dmcache = DMCACHE_ISCHILD;
}
else if (iter_data->mesh == psmd_eval->mesh_original) {
- /* Final DM is not same topology as orig mesh, we have to map num_dmcache to real final dm. */
+ /* Final DM is not same topology as orig mesh,
+ * we have to map num_dmcache to real final dm. */
add_pars[iter].num = add_pars[iter].num_dmcache;
add_pars[iter].num_dmcache = psys_particle_dm_face_lookup(psmd_eval->mesh_final,
psmd_eval->mesh_original,
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 1ec0aeffa17..fd092eb4b78 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -434,7 +434,8 @@ static void fluid_init_all_channels(bContext *C,
/* now scene data should be current according to animation system, so we fill the channels */
/* Domain time */
- // TODO: have option for not running sim, time mangling, in which case second case comes in handy
+ /* TODO: have option for not running sim, time mangling,
+ * in which case second case comes in handy. */
if (channels->DomainTime) {
time = get_fluid_rate(domainSettings) * (float)channels->aniFrameTime;
timeAtFrame = channels->timeAtFrame[i] + time;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index bc3a18313d6..09bcc0a3058 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -1115,7 +1115,10 @@ void RENDER_OT_render(wmOperatorType *ot)
ot->cancel = screen_render_cancel;
ot->exec = screen_render_exec;
- /*ot->poll = ED_operator_screenactive;*/ /* this isn't needed, causes failer in background mode */
+ /* this isn't needed, causes failer in background mode */
+#if 0
+ ot->poll = ED_operator_screenactive;
+#endif
prop = RNA_def_boolean(ot->srna,
"animation",
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index a06674bd8b8..485a47bfaf7 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1524,7 +1524,8 @@ static void area_calc_totrct(ScrArea *sa, const rcti *window_rect)
sa->totrct.ymax -= px;
}
/* Although the following asserts are correct they lead to a very unstable Blender.
- * And the asserts would fail even in 2.7x (they were added in 2.8x as part of the top-bar commit).
+ * And the asserts would fail even in 2.7x
+ * (they were added in 2.8x as part of the top-bar commit).
* For more details see T54864. */
#if 0
BLI_assert(sa->totrct.xmin >= 0);
diff --git a/source/blender/editors/screen/screen_draw.c b/source/blender/editors/screen/screen_draw.c
index 6fea27a9cff..1124070486f 100644
--- a/source/blender/editors/screen/screen_draw.c
+++ b/source/blender/editors/screen/screen_draw.c
@@ -40,7 +40,8 @@
#include "screen_intern.h"
/**
- * Draw horizontal shape visualizing future joining (left as well right direction of future joining).
+ * Draw horizontal shape visualizing future joining
+ * (left as well right direction of future joining).
*/
static void draw_horizontal_join_shape(ScrArea *sa, char dir, unsigned int pos)
{
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 7e6f1dd2e4f..9f452dd79e0 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -990,7 +990,8 @@ static int actionzone_invoke(bContext *C, wmOperator *op, const wmEvent *event)
AZone *az = screen_actionzone_find_xy(sc, &event->x);
sActionzoneData *sad;
- /* quick escape - Scroll azones only hide/unhide the scroll-bars, they have their own handling. */
+ /* Quick escape - Scroll azones only hide/unhide the scroll-bars,
+ * they have their own handling. */
if (az == NULL || ELEM(az->type, AZONE_REGION_SCROLL)) {
return OPERATOR_PASS_THROUGH;
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_2d.c b/source/blender/editors/sculpt_paint/paint_image_2d.c
index 78832bbbd8f..474d3a8ceba 100644
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@ -999,8 +999,8 @@ static void paint_2d_lift_soften(
/* subtract blurred image from normal image gives high pass filter */
sub_v3_v3v3(outrgb, rgba, outrgb);
- /* now rgba_ub contains the edge result, but this should be converted to luminance to avoid
- * colored speckles appearing in final image, and also to check for threshold */
+ /* Now rgba_ub contains the edge result, but this should be converted to luminance to
+ * avoid colored speckles appearing in final image, and also to check for threshold. */
outrgb[0] = outrgb[1] = outrgb[2] = IMB_colormanagement_get_luminance(outrgb);
if (fabsf(outrgb[0]) > threshold) {
float mask = BKE_brush_alpha_get(s->scene, s->brush);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index f7dfd390f75..314775d090b 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -1772,8 +1772,8 @@ static float project_paint_uvpixel_mask(const ProjPaintState *ps,
} /* otherwise no mask normal is needed, were within the limit */
}
- /* This only works when the opacity doesn't change while painting, stylus pressure messes with this
- * so don't use it. */
+ /* This only works when the opacity doesn't change while painting, stylus pressure messes with
+ * this so don't use it. */
// if (ps->is_airbrush == 0) mask *= BKE_brush_alpha_get(ps->brush);
return mask;
@@ -2203,8 +2203,8 @@ static bool line_clip_rect2f(const rctf *cliprect,
/**
* Scale the tri about its center
- * scaling by #PROJ_FACE_SCALE_SEAM (0.99x) is used for getting fake UV pixel coords that are on the
- * edge of the face but slightly inside it occlusion tests don't return hits on adjacent faces
+ * scaling by #PROJ_FACE_SCALE_SEAM (0.99x) is used for getting fake UV pixel coords that are on
+ * the edge of the face but slightly inside it occlusion tests don't return hits on adjacent faces.
*/
#ifndef PROJ_DEBUG_NOSEAMBLEED
@@ -2303,8 +2303,8 @@ static bool project_bucket_isect_circle(const float cent[2],
/* Note for rect_to_uvspace_ortho() and rect_to_uvspace_persp()
* in ortho view this function gives good results when bucket_bounds are outside the triangle
- * however in some cases, perspective view will mess up with faces that have minimal screenspace area
- * (viewed from the side)
+ * however in some cases, perspective view will mess up with faces
+ * that have minimal screenspace area (viewed from the side).
*
* for this reason its not reliable in this case so we'll use the Simple Barycentric'
* funcs that only account for points inside the triangle.
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 93beb3e851e..7df3077ae61 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -132,7 +132,8 @@ static int act_markers_make_local_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- /* now enable the "show posemarkers only" setting, so that we can see that something did happen */
+ /* Now enable the "show posemarkers only" setting,
+ * so that we can see that something did happen */
sact->flag |= SACTION_POSEMARKERS_SHOW;
/* notifiers - both sets, as this change affects both */
@@ -733,11 +734,14 @@ static void insert_action_keys(bAnimContext *ac, short mode)
FCurve *fcu = (FCurve *)ale->key_data;
float cfra = (float)CFRA;
- /* read value from property the F-Curve represents, or from the curve only?
- * - ale->id != NULL: Typically, this means that we have enough info to try resolving the path
- * - ale->owner != NULL: If this is set, then the path may not be resolvable from the ID alone,
- * so it's easier for now to just read the F-Curve directly.
- * (TODO: add the full-blown PointerRNA relative parsing case here...)
+ /* Read value from property the F-Curve represents, or from the curve only?
+ * - ale->id != NULL:
+ * Typically, this means that we have enough info to try resolving the path.
+ *
+ * - ale->owner != NULL:
+ * If this is set, then the path may not be resolvable from the ID alone,
+ * so it's easier for now to just read the F-Curve directly.
+ * (TODO: add the full-blown PointerRNA relative parsing case here...)
*/
if (ale->id && !ale->owner) {
insert_keyframe(ac->bmain,
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index 982c663cd18..0e63270d104 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -296,8 +296,8 @@ void fsmenu_insert_entry(struct FSMenu *fsmenu,
fsm_iter->save = (flag & FS_INSERT_SAVE) != 0;
if ((category == FS_CATEGORY_RECENT) && (!name || !name[0])) {
- /* Special handling when adding new recent entry - check if dir exists in some other categories,
- * and try to use name from there if so. */
+ /* Special handling when adding new recent entry - check if dir exists in
+ * some other categories, and try to use name from there if so. */
FSMenuCategory cats[] = {
FS_CATEGORY_SYSTEM, FS_CATEGORY_SYSTEM_BOOKMARKS, FS_CATEGORY_BOOKMARKS};
int i = ARRAY_SIZE(cats);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index eb392538d23..fe1291de224 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -1157,7 +1157,8 @@ void graph_draw_curves(
}
/* 2) draw handles and vertices as appropriate based on active
- * - if the option to only show controls if the F-Curve is selected is enabled, we must obey this
+ * - If the option to only show controls if the F-Curve is selected is enabled,
+ * we must obey this.
*/
if (!(sipo->flag & SIPO_SELCUVERTSONLY) || (fcu->flag & FCURVE_SELECTED)) {
if (!fcurve_are_keyframes_usable(fcu) && !(fcu->fpt && fcu->totvert)) {
@@ -1181,7 +1182,8 @@ void graph_draw_curves(
GPU_matrix_scale_2f(1.0f, unit_scale);
GPU_matrix_translate_2f(0.0f, offset);
- /* set this once and for all - all handles and handle-verts should use the same thickness */
+ /* Set this once and for all -
+ * all handles and handle-verts should use the same thickness. */
GPU_line_width(1.0);
if (fcu->bezt) {
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index a5376cd0c0e..295eed1df15 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -117,7 +117,8 @@ void deselect_graph_keys(bAnimContext *ac, bool test, short sel, bool do_channel
/* affect channel selection status? */
if (do_channels) {
- /* only change selection of channel when the visibility of keyframes doesn't depend on this */
+ /* Only change selection of channel when the visibility of keyframes
+ * doesn't depend on this. */
if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) {
/* deactivate the F-Curve, and deselect if deselecting keyframes.
* otherwise select the F-Curve too since we've selected all the keyframes
@@ -324,7 +325,8 @@ static void box_select_graphkeys(bAnimContext *ac,
/* select keyframes that are in the appropriate places */
ANIM_fcurve_keyframes_loop(&ked, fcu, ok_cb, select_cb, NULL);
- /* only change selection of channel when the visibility of keyframes doesn't depend on this */
+ /* Only change selection of channel when the visibility of keyframes
+ * doesn't depend on this. */
if ((sipo->flag & SIPO_SELCUVERTSONLY) == 0) {
/* select the curve too now that curve will be touched */
if (selectmode == SELECT_ADD) {
@@ -1188,7 +1190,8 @@ static void nearest_fcurve_vert_store(ListBase *matches,
tNearestVertInfo *nvi = (tNearestVertInfo *)matches->last;
bool replace = false;
- /* if there is already a point for the F-Curve, check if this point is closer than that was */
+ /* If there is already a point for the F-Curve,
+ * check if this point is closer than that was. */
if ((nvi) && (nvi->fcu == fcu)) {
/* replace if we are closer, or if equal and that one wasn't selected but we are... */
if ((nvi->dist > dist) || ((nvi->sel == 0) && BEZT_ISSEL_ANY(bezt))) {
@@ -1343,8 +1346,9 @@ static tNearestVertInfo *get_best_nearest_fcurve_vert(ListBase *matches)
for (nvi = matches->first; nvi; nvi = nvi->next) {
/* which mode of search are we in: find first selected, or find vert? */
if (found) {
- /* just take this vert now that we've found the selected one
- * - we'll need to remove this from the list so that it can be returned to the original caller
+ /* Just take this vert now that we've found the selected one
+ * - We'll need to remove this from the list
+ * so that it can be returned to the original caller.
*/
BLI_remlink(matches, nvi);
return nvi;
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index b823ddec696..d582ac557fa 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -50,7 +50,8 @@
/* Set Up Drivers Editor */
/* Set up UI configuration for Drivers Editor */
-/* NOTE: Currently called from windowmanager (new drivers editor window) and RNA (mode switching) */
+/* NOTE: Currently called from windowmanager
+ * (new drivers editor window) and RNA (mode switching) */
void ED_drivers_editor_init(bContext *C, ScrArea *sa)
{
SpaceGraph *sipo = (SpaceGraph *)sa->spacedata.first;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 2c99997bbad..748841e8635 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -290,7 +290,8 @@ static bool image_sample_poll(bContext *C)
if (sima) {
Object *obedit = CTX_data_edit_object(C);
if (obedit) {
- /* Disable when UV editing so it doesn't swallow all click events (use for setting cursor). */
+ /* Disable when UV editing so it doesn't swallow all click events
+ * (use for setting cursor). */
if (ED_space_image_show_uvedit(sima, obedit)) {
return false;
}
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 76930d3117b..216ef947a9b 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -657,8 +657,9 @@ static int nlaedit_add_actionclip_exec(bContext *C, wmOperator *op)
AnimData *adt = ale->adt;
NlaStrip *strip = NULL;
- /* sanity check: only apply actions of the right type for this ID
- * NOTE: in the case that this hasn't been set, we've already warned the user about this already
+ /* Sanity check: only apply actions of the right type for this ID.
+ * NOTE: in the case that this hasn't been set,
+ * we've already warned the user about this already
*/
if ((act->idroot) && (act->idroot != GS(ale->id->name))) {
BKE_reportf(
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 4cb80bd1394..49ba397a108 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -175,7 +175,8 @@ static TreeElement *outliner_drop_insert_find(bContext *C,
}
}
else {
- /* mouse doesn't hover any item (ignoring x-axis), so it's either above list bounds or below. */
+ /* Mouse doesn't hover any item (ignoring x-axis),
+ * so it's either above list bounds or below. */
TreeElement *first = soops->tree.first;
TreeElement *last = soops->tree.last;
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index d939f84e186..a943e972cf5 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1634,7 +1634,8 @@ static void tree_element_to_path(TreeElement *te,
/* check if we're looking for first ID, or appending to path */
if (*id) {
/* just 'append' property to path
- * - to prevent memory leaks, we must write to newpath not path, then free old path + swap them
+ * - to prevent memory leaks, we must write to newpath not path,
+ * then free old path + swap them.
*/
if (tse->type == TSE_RNA_PROPERTY) {
if (RNA_property_type(prop) == PROP_POINTER) {
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index fdb505d766d..c7a5f9bba6e 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1479,8 +1479,9 @@ static void outliner_make_object_parent_hierarchy(ListBase *lb)
}
/**
- * For all objects in the tree, lookup the parent in this map, and move or add tree elements as needed.
- */
+ * For all objects in the tree, lookup the parent in this map,
+ * and move or add tree elements as needed.
+ */
static void outliner_make_object_parent_hierarchy_collections(SpaceOutliner *soops,
GHash *object_tree_elements_hash)
{
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 09cc4635254..25e14e01232 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -60,8 +60,8 @@ static void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRIN
neighbor = find_neighboring_sequence(scene, test, SEQ_SIDE_LEFT, -1);
if (neighbor) {
- /* Only select neighbor handle if matching handle from test seq is also selected, or if neighbor
- * was not selected at all up till now.
+ /* Only select neighbor handle if matching handle from test seq is also selected,
+ * or if neighbor was not selected at all up till now.
* Otherwise, we get odd mismatch when shift-alt-rmb selecting neighbor strips... */
if (!(neighbor->flag & SELECT) || (test->flag & SEQ_LEFTSEL)) {
neighbor->flag |= SEQ_RIGHTSEL;
@@ -427,8 +427,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, const wmEvent *e
if (linked_handle) {
if (!ELEM(hand, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT)) {
/* First click selects the strip and its adjacent handles (if valid).
- * Second click selects the strip, both of its handles and its adjacent handles (if valid).
- */
+ * Second click selects the strip,
+ * both of its handles and its adjacent handles (if valid). */
const bool is_striponly_selected = ((seq->flag & SEQ_ALLSEL) == SELECT);
if (!extend) {