From 5cc8e7ab53cb20a64b8c14268fe2dba2396b4247 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 23 Jun 2021 12:05:40 +1000 Subject: [PATCH] Cleanup: reformat trailing comments that caused line wrapping --- intern/cycles/util/util_color.h | 14 ++++++---- intern/cycles/util/util_system.cpp | 4 +-- intern/ghost/intern/GHOST_XrAction.cpp | 7 +++-- intern/ghost/intern/GHOST_XrSession.h | 9 +++--- source/blender/blenkernel/intern/action.c | 5 ++-- .../blender/blenkernel/intern/curve_deform.c | 10 +++---- source/blender/blenkernel/intern/fluid.c | 5 ++-- source/blender/blenkernel/intern/object.c | 4 +-- source/blender/blenkernel/intern/particle.c | 5 ++-- source/blender/blenkernel/intern/scene.c | 4 +-- source/blender/blenkernel/intern/sound.c | 4 +-- .../bmesh/operators/bmo_fill_attribute.c | 5 ++-- .../editors/animation/anim_channels_edit.c | 10 ++++--- source/blender/editors/animation/anim_deps.c | 13 ++++----- source/blender/editors/interface/view2d.c | 3 +- .../blender/editors/physics/physics_fluid.c | 6 ++-- .../editors/sculpt_paint/paint_image_proj.c | 4 ++- .../editors/space_action/action_select.c | 18 ++++++------ .../editors/space_graph/graph_buttons.c | 4 +-- .../editors/space_graph/graph_select.c | 15 +++++----- .../blender/editors/space_image/image_undo.c | 5 ++-- .../editors/space_outliner/outliner_tree.c | 8 ++---- .../transform/transform_convert_armature.c | 6 ++-- .../blender/imbuf/intern/dds/ColorBlock.cpp | 5 ++-- source/blender/io/collada/BCMath.cpp | 5 ++-- source/blender/makesrna/intern/rna_object.c | 4 +-- .../blender/makesrna/intern/rna_object_api.c | 6 ++-- source/blender/makesrna/intern/rna_pose.c | 4 +-- source/blender/makesrna/intern/rna_ui_api.c | 4 +-- .../modifiers/intern/MOD_simpledeform.c | 28 ++++++++----------- source/blender/windowmanager/WM_api.h | 6 ++-- .../gizmo/intern/wm_gizmo_target_props.c | 7 +++-- 32 files changed, 124 insertions(+), 113 deletions(-) diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h index 203c0b289f6..40c2c431aca 100644 --- a/intern/cycles/util/util_color.h +++ b/intern/cycles/util/util_color.h @@ -223,12 +223,14 @@ ccl_device_inline ssef fastpow24(const ssef &arg) ssef x = fastpow<0x3F4CCCCD, 0x4F55A7FB>(arg); // error max = 0.17 avg = 0.0018 |avg| = 0.05 ssef arg2 = arg * arg; ssef arg4 = arg2 * arg2; - x = improve_5throot_solution(x, - arg4); /* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */ - x = improve_5throot_solution(x, - arg4); /* error max = 0.00021 avg = 1.6e-05 |avg| = 1.6e-05 */ - x = improve_5throot_solution(x, - arg4); /* error max = 6.1e-07 avg = 5.2e-08 |avg| = 1.1e-07 */ + + /* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */ + x = improve_5throot_solution(x, arg4); + /* error max = 0.00021 avg = 1.6e-05 |avg| = 1.6e-05 */ + x = improve_5throot_solution(x, arg4); + /* error max = 6.1e-07 avg = 5.2e-08 |avg| = 1.1e-07 */ + x = improve_5throot_solution(x, arg4); + return x * (x * x); } diff --git a/intern/cycles/util/util_system.cpp b/intern/cycles/util/util_system.cpp index 03bc5aea1dd..b010881058b 100644 --- a/intern/cycles/util/util_system.cpp +++ b/intern/cycles/util/util_system.cpp @@ -282,8 +282,8 @@ static CPUCapabilities &system_cpu_capabilities() /* actual opcode for xgetbv */ __asm__(".byte 0x0f, 0x01, 0xd0" : "=a"(xcr_feature_mask), "=d"(edx) : "c"(0)); # elif defined(_MSC_VER) && defined(_XCR_XFEATURE_ENABLED_MASK) - xcr_feature_mask = (uint32_t)_xgetbv( - _XCR_XFEATURE_ENABLED_MASK); /* min VS2010 SP1 compiler is required */ + /* Minimum VS2010 SP1 compiler is required. */ + xcr_feature_mask = (uint32_t)_xgetbv(_XCR_XFEATURE_ENABLED_MASK); # else xcr_feature_mask = 0; # endif diff --git a/intern/ghost/intern/GHOST_XrAction.cpp b/intern/ghost/intern/GHOST_XrAction.cpp index 172ac40c84f..b10e001df47 100644 --- a/intern/ghost/intern/GHOST_XrAction.cpp +++ b/intern/ghost/intern/GHOST_XrAction.cpp @@ -392,9 +392,10 @@ GHOST_XrActionSet::GHOST_XrActionSet(XrInstance instance, const GHOST_XrActionSe { XrActionSetCreateInfo action_set_info{XR_TYPE_ACTION_SET_CREATE_INFO}; strcpy(action_set_info.actionSetName, info.name); - strcpy(action_set_info.localizedActionSetName, - info.name); /* Just use same name for localized. This can be changed in the future if - necessary. */ + + /* Just use same name for localized. This can be changed in the future if necessary. */ + strcpy(action_set_info.localizedActionSetName, info.name); + action_set_info.priority = 0; /* Use same (default) priority for all action sets. */ CHECK_XR(xrCreateActionSet(instance, &action_set_info, &m_action_set), diff --git a/intern/ghost/intern/GHOST_XrSession.h b/intern/ghost/intern/GHOST_XrSession.h index d09c78e1ea7..a2d3cf2e385 100644 --- a/intern/ghost/intern/GHOST_XrSession.h +++ b/intern/ghost/intern/GHOST_XrSession.h @@ -74,10 +74,11 @@ class GHOST_XrSession { const GHOST_XrActionProfileInfo *infos); bool attachActionSets(); - /** Action functions to be called post-session start. */ - bool syncActions( - const char *action_set_name = nullptr); /* If action_set_name is nullptr, all attached - * action sets will be synced. */ + /** + * Action functions to be called post-session start. + * \param action_set_name: When `nullptr`, all attached action sets will be synced. + */ + bool syncActions(const char *action_set_name = nullptr); bool applyHapticAction(const char *action_set_name, const char *action_name, const GHOST_TInt64 &duration, diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 5db2eceb0d1..71d242e9c79 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -846,8 +846,9 @@ void BKE_pose_copy_data_ex(bPose **dst, } if (copy_constraints) { - BKE_constraints_copy_ex( - &listb, &pchan->constraints, flag, true); /* BKE_constraints_copy NULLs listb */ + /* #BKE_constraints_copy NULL's `listb` */ + BKE_constraints_copy_ex(&listb, &pchan->constraints, flag, true); + pchan->constraints = listb; /* XXX: This is needed for motionpath drawing to work. diff --git a/source/blender/blenkernel/intern/curve_deform.c b/source/blender/blenkernel/intern/curve_deform.c index 10c6d2213ff..7deac4e4f19 100644 --- a/source/blender/blenkernel/intern/curve_deform.c +++ b/source/blender/blenkernel/intern/curve_deform.c @@ -173,12 +173,10 @@ static bool calc_curve_deform( copy_qt_qt(quat, new_quat); copy_v3_v3(cent, co); - /* zero the axis which is not used, - * the big block of text above now applies to these 3 lines */ - quat_apply_track(quat, - axis, - (ELEM(axis, 0, 2)) ? 1 : - 0); /* up flag is a dummy, set so no rotation is done */ + /* Zero the axis which is not used, + * the big block of text above now applies to these 3 lines. + * The `upflag` argument may be a dummy, set so no rotation is done. */ + quat_apply_track(quat, axis, (ELEM(axis, 0, 2)) ? 1 : 0); vec_apply_track(cent, axis); cent[index] = 0.0f; diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 2e8f08519d2..553575b5c7b 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -1615,8 +1615,9 @@ static void emit_from_particles(Object *flow_ob, } } - state.time = BKE_scene_frame_get( - scene); /* DEG_get_ctime(depsgraph) does not give subframe time */ + /* `DEG_get_ctime(depsgraph)` does not give sub-frame time. */ + state.time = BKE_scene_frame_get(scene); + if (psys_get_particle_state(&sim, p, &state, 0) == 0) { continue; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 27222aeae4d..8cfd75b015c 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -957,8 +957,8 @@ static void object_blend_read_lib(BlendLibReader *reader, ID *id) ob, eModifierType_Fluidsim); if (fluidmd && fluidmd->fss) { - BLO_read_id_address( - reader, ob->id.lib, &fluidmd->fss->ipo); /* XXX deprecated - old animation system */ + /* XXX: deprecated - old animation system. */ + BLO_read_id_address(reader, ob->id.lib, &fluidmd->fss->ipo); } } diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 9381baa7506..021121034f1 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -384,8 +384,9 @@ void BKE_particle_partdeflect_blend_read_lib(BlendLibReader *reader, ID *id, Par static void particle_settings_blend_read_lib(BlendLibReader *reader, ID *id) { ParticleSettings *part = (ParticleSettings *)id; - BLO_read_id_address( - reader, part->id.lib, &part->ipo); /* XXX deprecated - old animation system */ + + /* XXX: deprecated - old animation system. */ + BLO_read_id_address(reader, part->id.lib, &part->ipo); BLO_read_id_address(reader, part->id.lib, &part->instance_object); BLO_read_id_address(reader, part->id.lib, &part->instance_collection); diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 2a5a2bf93a1..41f70db3fba 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -1466,8 +1466,8 @@ static void scene_blend_read_lib(BlendLibReader *reader, ID *id) IDP_BlendReadLib(reader, seq->prop); if (seq->ipo) { - BLO_read_id_address( - reader, sce->id.lib, &seq->ipo); /* XXX deprecated - old animation system */ + /* XXX: deprecated - old animation system. */ + BLO_read_id_address(reader, sce->id.lib, &seq->ipo); } seq->scene_sound = NULL; if (seq->scene) { diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 6dd1f66f6b5..f4a9d328d86 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -187,8 +187,8 @@ static void sound_blend_read_data(BlendDataReader *reader, ID *id) static void sound_blend_read_lib(BlendLibReader *reader, ID *id) { bSound *sound = (bSound *)id; - BLO_read_id_address( - reader, sound->id.lib, &sound->ipo); /* XXX deprecated - old animation system */ + /* XXX: deprecated - old animation system. */ + BLO_read_id_address(reader, sound->id.lib, &sound->ipo); } static void sound_blend_read_expand(BlendExpander *expander, ID *id) diff --git a/source/blender/bmesh/operators/bmo_fill_attribute.c b/source/blender/bmesh/operators/bmo_fill_attribute.c index 782fd98c2ea..e377fa6079b 100644 --- a/source/blender/bmesh/operators/bmo_fill_attribute.c +++ b/source/blender/bmesh/operators/bmo_fill_attribute.c @@ -154,8 +154,9 @@ void bmo_face_attribute_fill_exec(BMesh *bm, BMOperator *op) int face_tot; BM_mesh_elem_hflag_disable_all(bm, BM_FACE, BM_ELEM_TAG, false); - BMO_slot_buffer_hflag_enable( - bm, op->slots_in, "faces", BM_FACE, BM_ELEM_TAG, false); /* do inline */ + + /* do inline */ + BMO_slot_buffer_hflag_enable(bm, op->slots_in, "faces", BM_FACE, BM_ELEM_TAG, false); /* now we can copy adjacent data */ face_tot = bmesh_face_attribute_fill(bm, use_normals, use_data); diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 6c6fab13b7a..061fe0b07c5 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -3443,12 +3443,14 @@ static void ANIM_OT_channels_click(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - /* NOTE: don't save settings, otherwise, can end up with some weird behavior (sticky extend) */ - prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); /* SHIFTKEY */ + /* NOTE: don't save settings, otherwise, can end up with some weird behavior (sticky extend) + * + * Key-map: Enable with `Shift`. */ + prop = RNA_def_boolean(ot->srna, "extend", false, "Extend Select", ""); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_boolean( - ot->srna, "children_only", false, "Select Children Only", ""); /* CTRLKEY|SHIFTKEY */ + /* Key-map: Enable with `Ctrl-Shift`. */ + prop = RNA_def_boolean(ot->srna, "children_only", false, "Select Children Only", ""); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 17251587d3b..31284e41b18 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -109,8 +109,8 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) /* in other case we do standard depsgraph update, ideally * we'd be calling property update functions here too ... */ DEG_id_tag_update(id, - ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | - ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */ + /* XXX: or do we want something more restrictive? */ + ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); } } @@ -119,11 +119,10 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) void ANIM_id_update(Main *bmain, ID *id) { if (id) { - DEG_id_tag_update_ex( - bmain, - id, - ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | - ID_RECALC_ANIMATION); /* XXX or do we want something more restrictive? */ + DEG_id_tag_update_ex(bmain, + id, + /* XXX: or do we want something more restrictive? */ + ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); } } diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index e4dad0f1a53..224993555bf 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -991,10 +991,11 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, bool resiz if (ELEM(0, width, height)) { if (G.debug & G_DEBUG) { + /* XXX: temp debug info. */ printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d\n", (void *)v2d, width, - height); /* XXX temp debug info */ + height); } return; } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index a94a2b9b764..cbab4fbd3d1 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -403,8 +403,10 @@ static void fluid_bake_startjob(void *customdata, short *stop, short *do_update, BLI_path_join( temp_dir, sizeof(temp_dir), fds->cache_directory, FLUID_DOMAIN_DIR_PARTICLES, NULL); BLI_path_abs(temp_dir, relbase); - BLI_dir_create_recursive( - temp_dir); /* Create 'particles' subdir if it does not exist already */ + + /* Create 'particles' subdir if it does not exist already */ + BLI_dir_create_recursive(temp_dir); + fds->cache_flag &= ~(FLUID_DOMAIN_BAKED_PARTICLES | FLUID_DOMAIN_OUTDATED_PARTICLES); fds->cache_flag |= FLUID_DOMAIN_BAKING_PARTICLES; job->pause_frame = &fds->cache_frame_pause_particles; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 5adc1f78545..c83e4de281a 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -6468,6 +6468,8 @@ static Image *proj_paint_image_create(wmOperator *op, Main *bmain, bool is_data) alpha = RNA_boolean_get(op->ptr, "alpha"); RNA_string_get(op->ptr, "name", imagename); } + + /* TODO(lukas): Add option for tiled image. */ ima = BKE_image_add_generated(bmain, width, height, @@ -6478,7 +6480,7 @@ static Image *proj_paint_image_create(wmOperator *op, Main *bmain, bool is_data) color, false, is_data, - false); /* TODO(lukas): Add option */ + false); return ima; } diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 98e39520e99..fea01ab5330 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -1872,12 +1872,13 @@ void ACTION_OT_clickselect(wmOperatorType *ot) /* properties */ WM_operator_properties_generic_select(ot); + /* Key-map: Enable with `Shift`. */ prop = RNA_def_boolean( ot->srna, "extend", 0, "Extend Select", - "Toggle keyframe selection instead of leaving newly selected keyframes only"); /* SHIFTKEY */ + "Toggle keyframe selection instead of leaving newly selected keyframes only"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, @@ -1887,20 +1888,21 @@ void ACTION_OT_clickselect(wmOperatorType *ot) "Deselect all when nothing under the cursor"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); + /* Key-map: Enable with `Alt`. */ prop = RNA_def_boolean( ot->srna, "column", 0, "Column Select", - "Select all keyframes that occur on the same frame as the one under the mouse"); /* ALTKEY */ + "Select all keyframes that occur on the same frame as the one under the mouse"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_boolean( - ot->srna, - "channel", - 0, - "Only Channel", - "Select all the keyframes in the channel under the mouse"); /* CTRLKEY + ALTKEY */ + /* Key-map: Enable with `Ctrl-Alt`. */ + prop = RNA_def_boolean(ot->srna, + "channel", + 0, + "Only Channel", + "Select all the keyframes in the channel under the mouse"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c index d88bf8750c2..ec5f443e2dc 100644 --- a/source/blender/editors/space_graph/graph_buttons.c +++ b/source/blender/editors/space_graph/graph_buttons.c @@ -1337,8 +1337,8 @@ static void do_graph_region_modifier_buttons(bContext *C, void *UNUSED(arg), int { switch (event) { case B_FMODIFIER_REDRAW: /* XXX this should send depsgraph updates too */ - WM_event_add_notifier( - C, NC_ANIMATION, NULL); /* XXX need a notifier specially for F-Modifiers */ + /* XXX: need a notifier specially for F-Modifiers */ + WM_event_add_notifier(C, NC_ANIMATION, NULL); break; } } diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 73777568ab1..50d14d18be9 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -1958,12 +1958,14 @@ void GRAPH_OT_clickselect(wmOperatorType *ot) /* properties */ WM_operator_properties_generic_select(ot); + + /* Key-map: Enable with `Shift`. */ prop = RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", "Toggle keyframe selection instead of leaving newly selected " - "keyframes only"); /* SHIFTKEY */ + "keyframes only"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_boolean(ot->srna, @@ -1973,19 +1975,18 @@ void GRAPH_OT_clickselect(wmOperatorType *ot) "Deselect all when nothing under the cursor"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); + /* Key-map: Enable with `Alt`. */ prop = RNA_def_boolean(ot->srna, "column", 0, "Column Select", "Select all keyframes that occur on the same frame as the one under " - "the mouse"); /* ALTKEY */ + "the mouse"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); - prop = RNA_def_boolean(ot->srna, - "curves", - 0, - "Only Curves", - "Select all the keyframes in the curve"); /* CTRLKEY + ALTKEY */ + /* Key-map: Enable with `Ctrl-Atl`. */ + prop = RNA_def_boolean( + ot->srna, "curves", 0, "Only Curves", "Select all the keyframes in the curve"); RNA_def_property_flag(prop, PROP_SKIP_SAVE); } diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index feee268c6d3..09e30298e79 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -293,8 +293,9 @@ static void ptile_restore_runtime_list(ListBase *paint_tiles) SWAP(uint *, ptile->rect.uint, tmpibuf->rect); } - BKE_image_free_gputextures( - image); /* force OpenGL reload (maybe partial update will operate better?) */ + /* Force OpenGL reload (maybe partial update will operate better?) */ + BKE_image_free_gputextures(image); + if (ibuf->rect_float) { ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */ } diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index 90389fc1be2..ae455d957cf 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -312,12 +312,8 @@ static void outliner_add_object_contents(SpaceOutliner *space_outliner, outliner_add_element(space_outliner, &te->subtree, ob, te, TSE_ANIM_DATA, 0); } - outliner_add_element(space_outliner, - &te->subtree, - ob->poselib, - te, - TSE_SOME_ID, - 0); /* XXX FIXME.. add a special type for this. */ + /* FIXME: add a special type for this. */ + outliner_add_element(space_outliner, &te->subtree, ob->poselib, te, TSE_SOME_ID, 0); if (ob->proxy && !ID_IS_LINKED(ob)) { outliner_add_element(space_outliner, &te->subtree, ob->proxy, te, TSE_PROXY, 0); diff --git a/source/blender/editors/transform/transform_convert_armature.c b/source/blender/editors/transform/transform_convert_armature.c index aaea9d05f84..f29f323558a 100644 --- a/source/blender/editors/transform/transform_convert_armature.c +++ b/source/blender/editors/transform/transform_convert_armature.c @@ -1449,9 +1449,9 @@ void recalcData_pose(TransInfo *t) /* TODO: autokeyframe calls need some setting to specify to add samples * (FPoints) instead of keyframes? */ if ((t->animtimer) && (t->context) && IS_AUTOKEY_ON(t->scene)) { - int targetless_ik = - (t->flag & - T_AUTOIK); /* XXX this currently doesn't work, since flags aren't set yet! */ + + /* XXX: this currently doesn't work, since flags aren't set yet! */ + int targetless_ik = (t->flag & T_AUTOIK); animrecord_check_state(t, ob); autokeyframe_pose(t->context, t->scene, ob, t->mode, targetless_ik); diff --git a/source/blender/imbuf/intern/dds/ColorBlock.cpp b/source/blender/imbuf/intern/dds/ColorBlock.cpp index a05c7e2a70d..1a67975b5f0 100644 --- a/source/blender/imbuf/intern/dds/ColorBlock.cpp +++ b/source/blender/imbuf/intern/dds/ColorBlock.cpp @@ -113,9 +113,8 @@ void ColorBlock::init(uint w, uint h, const float *data, uint x, uint y) const uint idx = ((y + by) * w + x + bx); Color32 &c = color(e, i); - c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane], - 0.0f, - 1.0f)); /* @@ Is this the right way to quantize floats to bytes? */ + /* @@ Is this the right way to quantize floats to bytes? */ + c.r = uint8(255 * CLAMP(data[idx + 0 * srcPlane], 0.0f, 1.0f)); c.g = uint8(255 * CLAMP(data[idx + 1 * srcPlane], 0.0f, 1.0f)); c.b = uint8(255 * CLAMP(data[idx + 2 * srcPlane], 0.0f, 1.0f)); c.a = uint8(255 * CLAMP(data[idx + 3 * srcPlane], 0.0f, 1.0f)); diff --git a/source/blender/io/collada/BCMath.cpp b/source/blender/io/collada/BCMath.cpp index 0521fda5fb1..51c86ee53f2 100644 --- a/source/blender/io/collada/BCMath.cpp +++ b/source/blender/io/collada/BCMath.cpp @@ -67,8 +67,9 @@ BCMatrix::BCMatrix(BC_global_forward_axis global_forward_axis, BC_global_up_axis mat3_from_axis_conversion( BC_DEFAULT_FORWARD, BC_DEFAULT_UP, global_forward_axis, global_up_axis, mrot); - transpose_m3( - mrot); /* TODO: Verify that mat3_from_axis_conversion() returns a transposed matrix */ + /* TODO: Verify that `mat3_from_axis_conversion()` returns a transposed matrix */ + transpose_m3(mrot); + copy_m4_m3(mat, mrot); set_transform(mat); } diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 8ad739b5c1a..3d3faf0c56f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1999,8 +1999,8 @@ static void rna_VertexGroup_vertex_add(ID *id, } while (index_len--) { - ED_vgroup_vert_add( - ob, def, *index++, weight, assignmode); /* XXX, not efficient calling within loop*/ + /* XXX: not efficient calling within loop. */ + ED_vgroup_vert_add(ob, def, *index++, weight, assignmode); } DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index e463323c6dc..d08504dd6fe 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -575,8 +575,10 @@ static void rna_Object_ray_cast(Object *ob, /* Test BoundBox first (efficiency) */ BoundBox *bb = BKE_object_boundbox_get(ob); float distmin; - normalize_v3( - direction); /* Needed for valid distance check from isect_ray_aabb_v3_simple() call. */ + + /* Needed for valid distance check from #isect_ray_aabb_v3_simple() call. */ + normalize_v3(direction); + if (!bb || (isect_ray_aabb_v3_simple(origin, direction, bb->vec[0], bb->vec[6], &distmin, NULL) && distmin <= distance)) { diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index b8bb4f58dcd..f736885df77 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -620,8 +620,8 @@ static void rna_PoseChannel_constraints_remove( ED_object_constraint_update(bmain, ob); - BKE_constraints_active_set(&pchan->constraints, - NULL); /* XXX, is this really needed? - Campbell */ + /* XXX(Campbell): is this really needed? */ + BKE_constraints_active_set(&pchan->constraints, NULL); WM_main_add_notifier(NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, id); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index f2949703c4b..dc973a9c75c 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -1018,8 +1018,8 @@ void RNA_api_ui_layout(StructRNA *srna) func = RNA_def_function(srna, "operator_menu_enum", "rna_uiItemMenuEnumO"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); - api_ui_item_op( - func); /* can't use api_ui_item_op_common because property must come right after */ + /* Can't use #api_ui_item_op_common because property must come right after. */ + api_ui_item_op(func); parm = RNA_def_string(func, "property", NULL, 0, "", "Identifier of property in operator"); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); api_ui_item_common(func); diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index db01dec4d19..39ebc415021 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -263,28 +263,24 @@ static void simple_helper(void *__restrict userdata, copy_v3_v3_map(dcut_remap, dcut, axis_map); switch (curr_deform_data->mode) { case MOD_SIMPLEDEFORM_MODE_TWIST: - simpleDeform_twist(curr_deform_data->smd_factor, - curr_deform_data->deform_axis, - dcut_remap, - co_remap); /* apply deform */ + /* Apply deform. */ + simpleDeform_twist( + curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap); break; case MOD_SIMPLEDEFORM_MODE_BEND: - simpleDeform_bend(curr_deform_data->smd_factor, - curr_deform_data->deform_axis, - dcut_remap, - co_remap); /* apply deform */ + /* Apply deform. */ + simpleDeform_bend( + curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap); break; case MOD_SIMPLEDEFORM_MODE_TAPER: - simpleDeform_taper(curr_deform_data->smd_factor, - curr_deform_data->deform_axis, - dcut_remap, - co_remap); /* apply deform */ + /* Apply deform. */ + simpleDeform_taper( + curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap); break; case MOD_SIMPLEDEFORM_MODE_STRETCH: - simpleDeform_stretch(curr_deform_data->smd_factor, - curr_deform_data->deform_axis, - dcut_remap, - co_remap); /* apply deform */ + /* Apply deform. */ + simpleDeform_stretch( + curr_deform_data->smd_factor, curr_deform_data->deform_axis, dcut_remap, co_remap); break; default: return; /* No simple-deform mode? */ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 3525502a6dc..f3c4cb93e7d 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -999,9 +999,9 @@ void WM_xr_action_binding_destroy(wmXrData *xr, unsigned int count_interaction_paths, const char **interaction_paths); -bool WM_xr_active_action_set_set( - wmXrData *xr, const char *action_set_name); /* If action_set_name is NULL, then - * all action sets will be treated as active. */ +/* If action_set_name is NULL, then all action sets will be treated as active. */ +bool WM_xr_active_action_set_set(wmXrData *xr, const char *action_set_name); + bool WM_xr_controller_pose_action_set(wmXrData *xr, const char *action_set_name, const char *action_name); diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c index 7cb1a0bdf4b..63e833d73c3 100644 --- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c +++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_target_props.c @@ -312,9 +312,10 @@ void WM_gizmo_do_msg_notify_tag_refresh(bContext *UNUSED(C), ARegion *region = msg_val->owner; wmGizmoMap *gzmap = msg_val->user_data; - ED_region_tag_redraw( - region); /* Could possibly avoid a full redraw and only tag for editor overlays - * redraw in some cases, see #ED_region_tag_redraw_editor_overlays(). */ + /* Could possibly avoid a full redraw and only tag for editor overlays + * redraw in some cases, see #ED_region_tag_redraw_editor_overlays(). */ + ED_region_tag_redraw(region); + WM_gizmomap_tag_refresh(gzmap); }