From 2abfcebb0eb7989e3d1e7d03f37ecf5c088210af Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 10 Oct 2020 18:19:55 +1100 Subject: Cleanup: use C comments for descriptive text Follow our code style guide by using C-comments for text descriptions. --- source/blender/editors/armature/armature_add.c | 16 ++++++++-------- source/blender/editors/armature/armature_relations.c | 2 +- source/blender/editors/armature/meshlaplacian.c | 2 +- source/blender/editors/armature/pose_edit.c | 2 +- source/blender/editors/armature/pose_lib.c | 4 ++-- source/blender/editors/armature/pose_select.c | 4 ++-- source/blender/editors/armature/pose_slide.c | 8 ++++---- source/blender/editors/armature/pose_transform.c | 8 ++++---- source/blender/editors/armature/pose_utils.c | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) (limited to 'source/blender/editors/armature') diff --git a/source/blender/editors/armature/armature_add.c b/source/blender/editors/armature/armature_add.c index 5f01c4ed038..4d31a5e786b 100644 --- a/source/blender/editors/armature/armature_add.c +++ b/source/blender/editors/armature/armature_add.c @@ -942,7 +942,7 @@ static int armature_duplicate_selected_exec(bContext *C, wmOperator *op) Object *ob = objects[ob_index]; bArmature *arm = ob->data; - ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed? + ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */ preEditBoneDuplicate(arm->edbo); @@ -1117,7 +1117,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op) /* The beginning of the duplicated mirrored bones in the edbo list */ EditBone *ebone_first_dupe = NULL; - ED_armature_edit_sync_selection(arm->edbo); // XXX why is this needed? + ED_armature_edit_sync_selection(arm->edbo); /* XXX why is this needed? */ preEditBoneDuplicate(arm->edbo); @@ -1399,7 +1399,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) if (arm->flag & ARM_MIRROR_EDIT) { flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone); if (flipbone) { - forked_iter = 0; // we extrude 2 different bones + forked_iter = 0; /* we extrude 2 different bones */ if (flipbone->flag & (BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED)) { /* don't want this bone to be selected... */ flipbone->flag &= ~(BONE_TIPSEL | BONE_SELECTED | BONE_ROOTSEL); @@ -1449,7 +1449,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) newbone->dist = ebone->dist; newbone->xwidth = ebone->xwidth; newbone->zwidth = ebone->zwidth; - newbone->rad_head = ebone->rad_tail; // don't copy entire bone... + newbone->rad_head = ebone->rad_tail; /* don't copy entire bone. */ newbone->rad_tail = ebone->rad_tail; newbone->segments = 1; newbone->layer = ebone->layer; @@ -1470,7 +1470,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op) BLI_strncpy(newbone->name, ebone->name, sizeof(newbone->name)); - if (flipbone && forked_iter) { // only set if mirror edit + if (flipbone && forked_iter) { /* only set if mirror edit */ if (strlen(newbone->name) < (MAXBONENAME - 2)) { if (a == 0) { strcat(newbone->name, "_L"); @@ -1587,10 +1587,10 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op) copy_v3_v3(bone->head, curs); if (rv3d && (U.flag & USER_ADD_VIEWALIGNED)) { - add_v3_v3v3(bone->tail, bone->head, imat[1]); // bone with unit length 1 + add_v3_v3v3(bone->tail, bone->head, imat[1]); /* bone with unit length 1 */ } else { - add_v3_v3v3(bone->tail, bone->head, imat[2]); // bone with unit length 1, pointing up Z + add_v3_v3v3(bone->tail, bone->head, imat[2]); /* bone with unit length 1, pointing up Z */ } ED_armature_edit_refresh_layer_used(obedit->data); @@ -1638,7 +1638,7 @@ static int armature_subdivide_exec(bContext *C, wmOperator *op) cuts = RNA_int_get(op->ptr, "number_cuts"); /* loop over all editable bones */ - // XXX the old code did this in reverse order though! + /* XXX the old code did this in reverse order though! */ CTX_DATA_BEGIN_WITH_ID (C, EditBone *, ebone, selected_editable_bones, bArmature *, arm) { for (i = cuts + 1; i > 1; i--) { /* compute cut ratio first */ diff --git a/source/blender/editors/armature/armature_relations.c b/source/blender/editors/armature/armature_relations.c index 2efb7315b89..14d64d2d808 100644 --- a/source/blender/editors/armature/armature_relations.c +++ b/source/blender/editors/armature/armature_relations.c @@ -685,7 +685,7 @@ static int separate_armature_exec(bContext *C, wmOperator *op) separate_armature_bones(bmain, ob_old, true); separate_armature_bones(bmain, ob_new, false); - /* 4) fix links before depsgraph flushes */ // err... or after? + /* 4) fix links before depsgraph flushes, err... or after? */ separated_armature_fix_links(bmain, ob_old, ob_new); DEG_id_tag_update(&ob_old->id, ID_RECALC_GEOMETRY); /* this is the original one */ diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c index cf64cfc849d..e51e5ec5cef 100644 --- a/source/blender/editors/armature/meshlaplacian.c +++ b/source/blender/editors/armature/meshlaplacian.c @@ -451,7 +451,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys) BLI_bvhtree_insert(sys->heat.bvhtree, a, bb, 2); - // Setup inverse pointers to use on isect.orig + /* Setup inverse pointers to use on isect.orig */ sys->heat.vltree[vtri[0]] = lt; sys->heat.vltree[vtri[1]] = lt; sys->heat.vltree[vtri[2]] = lt; diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c index 85948f3abc3..e8c35958115 100644 --- a/source/blender/editors/armature/pose_edit.c +++ b/source/blender/editors/armature/pose_edit.c @@ -279,7 +279,7 @@ static int pose_calculate_paths_invoke(bContext *C, wmOperator *op, const wmEven } /* show popup dialog to allow editing of range... */ - // FIXME: hardcoded dimensions here are just arbitrary + /* FIXME: hard-coded dimensions here are just arbitrary. */ return WM_operator_props_dialog_popup(C, op, 200); } diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c index 33c1a8a8b4f..947e2dbf5aa 100644 --- a/source/blender/editors/armature/pose_lib.c +++ b/source/blender/editors/armature/pose_lib.c @@ -1856,7 +1856,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; /* properties */ - // TODO: make the pose_index into a proper enum instead of a cryptic int... + /* TODO: make the pose_index into a proper enum instead of a cryptic int. */ ot->prop = RNA_def_int( ot->srna, "pose_index", @@ -1868,7 +1868,7 @@ void POSELIB_OT_browse_interactive(wmOperatorType *ot) 0, INT_MAX); - // XXX: percentage vs factor? + /* XXX: percentage vs factor? */ /* not used yet */ #if 0 RNA_def_float_factor(ot->srna, diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c index c63f2ff12c5..731d0d10e0b 100644 --- a/source/blender/editors/armature/pose_select.c +++ b/source/blender/editors/armature/pose_select.c @@ -114,7 +114,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) bArmature *arm; /* sanity checks */ - // XXX: actually, we can probably still get away with no object - at most we have no updates + /* XXX: actually, we can probably still get away with no object - at most we have no updates */ if (ELEM(NULL, ob, ob->pose, pchan, pchan->bone)) { return; } @@ -133,7 +133,7 @@ void ED_pose_bone_select(Object *ob, bPoseChannel *pchan, bool select) arm->act_bone = NULL; } - // TODO: select and activate corresponding vgroup? + /* TODO: select and activate corresponding vgroup? */ ED_pose_bone_select_tag_update(ob); } } diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index e60270bc3f0..59e14f85c81 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -480,7 +480,7 @@ static void pose_slide_apply_props(tPoseSlideOp *pso, float tval = (float)RNA_property_boolean_get(&ptr, prop); pose_slide_apply_val(pso, fcu, pfl->ob, &tval); RNA_property_boolean_set( - &ptr, prop, (int)tval); // XXX: do we need threshold clamping here? + &ptr, prop, (int)tval); /* XXX: do we need threshold clamping here? */ break; } case PROP_ENUM: { @@ -681,14 +681,14 @@ static void pose_slide_rest_pose_apply(bContext *C, tPoseSlideOp *pso) if (ELEM(pso->channels, PS_TFM_ALL, PS_TFM_BBONE_SHAPE) && (pchan->flag & POSE_BBONE_SHAPE)) { /* bbone properties - they all start a "bbone_" prefix */ - // TODO Not implemented + /* TODO Not implemented */ // pose_slide_apply_props(pso, pfl, "bbone_"); } 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). */ - // TODO Not implemented + /* TODO Not implemented */ // pose_slide_apply_props(pso, pfl, "[\""); /* dummy " for texteditor bugs */ } } @@ -790,7 +790,7 @@ static void pose_slide_reset(tPoseSlideOp *pso) /* ------------------------------------ */ /* draw percentage indicator in header */ -// TODO: Include hints about locks here... +/* TODO: Include hints about locks here... */ static void pose_slide_draw_status(tPoseSlideOp *pso) { char status_str[UI_MAX_DRAW_STR]; diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index b09015096a6..d3f11c5a16f 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -385,7 +385,7 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); Scene *scene = CTX_data_scene(C); - // must be active object, not edit-object + /* must be active object, not edit-object */ Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C)); const Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob); bArmature *arm = BKE_armature_from_object(ob); @@ -688,8 +688,8 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, pchan->curve_in_x *= -1; pchan->curve_out_x *= -1; - pchan->roll1 *= -1; // XXX? - pchan->roll2 *= -1; // XXX? + pchan->roll1 *= -1; /* XXX? */ + pchan->roll2 *= -1; /* XXX? */ /* has to be done as eulers... */ if (pchan->rotmode > 0) { @@ -1108,7 +1108,7 @@ static int pose_clear_transform_generic_exec(bContext *C, ViewLayer *view_layer = CTX_data_view_layer(C); View3D *v3d = CTX_wm_view3d(C); FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob_iter) { - // XXX: UGLY HACK (for autokey + clear transforms) + /* XXX: UGLY HACK (for autokey + clear transforms) */ Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob_iter); ListBase dsources = {NULL, NULL}; bool changed = false; diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index e2038bdd2a3..2a6dc9f406b 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -332,7 +332,7 @@ void poseAnim_mapping_autoKeyframe(bContext *C, Scene *scene, ListBase *pfLinks, FOREACH_OBJECT_IN_MODE_BEGIN (view_layer, v3d, OB_ARMATURE, OB_MODE_POSE, ob) { if (ob->id.tag & LIB_TAG_DOIT) { if (ob->pose->avs.path_bakeflag & MOTIONPATH_BAKE_HAS_PATHS) { - // ED_pose_clear_paths(C, ob); // XXX for now, don't need to clear + // ED_pose_clear_paths(C, ob); /* XXX for now, don't need to clear. */ /* TODO(sergey): Should ensure we can use more narrow update range here. */ ED_pose_recalculate_paths(C, scene, ob, POSE_PATH_CALC_RANGE_FULL); } -- cgit v1.2.3