diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 16:08:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-03 17:43:40 +0300 |
commit | 9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch) | |
tree | 63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/editors/object | |
parent | 05f970847e12ce30e8c4c624677d94ae239ce2bc (diff) |
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 16 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake_api.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_data_transfer.c | 10 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 18 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 12 |
12 files changed, 41 insertions, 41 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 11cf3ea5083..6d22da2c2bc 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -407,7 +407,7 @@ void ED_object_add_generic_props(wmOperatorType *ot, bool do_editmode) "Enter edit mode when adding this object"); RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); } - /* note: this property gets hidden for add-camera operator */ + /* NOTE: this property gets hidden for add-camera operator. */ prop = RNA_def_enum( ot->srna, "align", align_options, ALIGN_WORLD, "Align", "The alignment of the new object"); RNA_def_property_update_runtime(prop, view_align_update); @@ -1325,7 +1325,7 @@ static int object_gpencil_add_exec(bContext *C, wmOperator *op) float loc[3], rot[3]; bool newob = false; - /* Note: We use 'Y' here (not 'Z'), as */ + /* NOTE: We use 'Y' here (not 'Z'), as. */ WM_operator_view3d_unit_defaults(C, op); if (!ED_object_add_generic_get_opts(C, op, 'Y', loc, rot, NULL, NULL, &local_view_bits, NULL)) { return OPERATOR_CANCELLED; @@ -1977,7 +1977,7 @@ void OBJECT_OT_pointcloud_add(wmOperatorType *ot) /** \name Delete Object Operator * \{ */ /* remove base from a specific scene */ -/* note: now unlinks constraints as well */ +/* NOTE: now unlinks constraints as well. */ void ED_object_base_free_and_unlink(Main *bmain, Scene *scene, Object *ob) { if (ID_REAL_USERS(ob) <= 1 && ID_EXTRA_USERS(ob) == 0 && @@ -2163,7 +2163,7 @@ static void copy_object_set_idnew(bContext *C) /** \name Make Instanced Objects Real Operator * \{ */ -/* XXX TODO That whole hierarchy handling based on persistent_id tricks is +/* XXX TODO: That whole hierarchy handling based on persistent_id tricks is * very confusing and convoluted, and it will fail in many cases besides basic ones. * Think this should be replaced by a proper tree-like representation of the instantiations, * should help a lot in both readability, and precise consistent rebuilding of hierarchy. @@ -2442,7 +2442,7 @@ static void make_object_duplilist_real(bContext *C, } if (ob_dst->parent) { - /* note, this may be the parent of other objects, but it should + /* NOTE: this may be the parent of other objects, but it should * still work out ok */ BKE_object_apply_mat4(ob_dst, dob->mat, false, true); @@ -2906,7 +2906,7 @@ static int object_convert_exec(bContext *C, wmOperator *op) } /* make new mesh data from the original copy */ - /* note: get the mesh from the original, not from the copy in some + /* NOTE: get the mesh from the original, not from the copy in some * cases this doesn't give correct results (when MDEF is used for eg) */ Scene *scene_eval = (Scene *)DEG_get_evaluated_id(depsgraph, &scene->id); @@ -3349,8 +3349,8 @@ static Base *object_add_duplicate_internal(Main *bmain, /* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */ /* leaves selection of base/object unaltered. - * note: don't call this within a loop since clear_* funcs loop over the entire database. - * note: caller must do DAG_relations_tag_update(bmain); + * NOTE: don't call this within a loop since clear_* funcs loop over the entire database. + * NOTE: caller must do DAG_relations_tag_update(bmain); * this is not done automatic since we may duplicate many objects in a batch */ Base *ED_object_add_duplicate( Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base, const eDupli_ID_Flags dupflag) diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index a5cad4e087c..3a10a423e91 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -566,7 +566,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op) WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE_TEXTURE); WM_jobs_customdata_set(wm_job, bkr, multiresbake_freejob); - WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */ + WM_jobs_timer(wm_job, 0.5, NC_IMAGE, 0); /* TODO: only draw bake image, can we enforce this. */ WM_jobs_callbacks(wm_job, multiresbake_startjob, NULL, NULL, NULL); G.is_break = false; diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c index e941b27879b..233f2a65dac 100644 --- a/source/blender/editors/object/object_bake_api.c +++ b/source/blender/editors/object/object_bake_api.c @@ -158,7 +158,7 @@ static int bake_modal(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) /** * for exec() when there is no render job - * note: this won't check for the escape key being pressed, but doing so isn't thread-safe. + * NOTE: this won't check for the escape key being pressed, but doing so isn't thread-safe. */ static int bake_break(void *UNUSED(rjv)) { @@ -1939,7 +1939,7 @@ static int bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event) WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS, WM_JOB_TYPE_OBJECT_BAKE); WM_jobs_customdata_set(wm_job, bkr, bake_freejob); - /* TODO - only draw bake image, can we enforce this */ + /* TODO: only draw bake image, can we enforce this. */ WM_jobs_timer( wm_job, 0.5, (bkr->target == R_BAKE_TARGET_VERTEX_COLORS) ? NC_GEOM | ND_DATA : NC_IMAGE, 0); WM_jobs_callbacks(wm_job, bake_startjob, NULL, NULL, NULL); diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index a7aa6b4d6a4..4970338973d 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -1731,7 +1731,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) /* force depsgraph to get recalculated since relationships removed */ DEG_relations_tag_update(bmain); - /* note, calling BIK_clear_data() isn't needed here */ + /* NOTE: calling BIK_clear_data() isn't needed here. */ return OPERATOR_FINISHED; } @@ -1745,7 +1745,7 @@ void POSE_OT_constraints_clear(wmOperatorType *ot) /* callbacks */ ot->exec = pose_constraints_clear_exec; - /* XXX - do we want to ensure there are selected bones too? */ + /* XXX: do we want to ensure there are selected bones too? */ ot->poll = ED_operator_object_active_local_editable_posemode_exclusive; } @@ -2461,7 +2461,7 @@ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) /* Refresh depsgraph. */ DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); - /* Note, notifier might evolve. */ + /* NOTE: notifier might evolve. */ WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, ob); } } diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c index 7b7970fbfe5..742c7abb7ff 100644 --- a/source/blender/editors/object/object_data_transfer.c +++ b/source/blender/editors/object/object_data_transfer.c @@ -96,7 +96,7 @@ static const EnumPropertyItem DT_layer_items[] = { {0, NULL, 0, NULL, NULL}, }; -/* Note: rna_enum_dt_layers_select_src_items enum is from rna_modifier.c */ +/* NOTE: #rna_enum_dt_layers_select_src_items enum is from rna_modifier.c. */ static const EnumPropertyItem *dt_layers_select_src_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -201,7 +201,7 @@ static const EnumPropertyItem *dt_layers_select_src_itemf(bContext *C, return item; } -/* Note: rna_enum_dt_layers_select_dst_items enum is from rna_modifier.c */ +/* NOTE: #rna_enum_dt_layers_select_dst_items enum is from `rna_modifier.c`. */ static const EnumPropertyItem *dt_layers_select_dst_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -255,7 +255,7 @@ static const EnumPropertyItem *dt_layers_select_itemf(bContext *C, return dt_layers_select_src_itemf(C, ptr, prop, r_free); } -/* Note: rna_enum_dt_mix_mode_items enum is from rna_modifier.c */ +/* NOTE: rna_enum_dt_mix_mode_items enum is from `rna_modifier.c`. */ static const EnumPropertyItem *dt_mix_mode_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), @@ -511,7 +511,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op) } #if 0 /* TODO */ - /* Note: issue with that is that if canceled, operator cannot be redone... Nasty in our case. */ + /* NOTE: issue with that is that if canceled, operator cannot be redone... Nasty in our case. */ return changed ? OPERATOR_FINISHED : OPERATOR_CANCELLED; #else return OPERATOR_FINISHED; @@ -767,7 +767,7 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot) } /******************************************************************************/ -/* Note: This operator is hybrid, it can work as a usual standalone Object operator, +/* NOTE: This operator is hybrid, it can work as a usual standalone Object operator, * or as a DataTransfer modifier tool. */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 1ca967d9112..1cb6a5c8ff5 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -134,8 +134,8 @@ Object *ED_object_context(const bContext *C) return CTX_data_pointer_get_type(C, "object", &RNA_Object).data; } -/* find the correct active object per context - * note: context can be NULL when called from a enum with PROP_ENUM_NO_CONTEXT */ +/* Find the correct active object per context. + * NOTE: context can be NULL when called from a enum with #PROP_ENUM_NO_CONTEXT. */ Object *ED_object_active_context(const bContext *C) { Object *ob = NULL; diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 620c58196dd..7bbca7ea9e6 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -2598,7 +2598,7 @@ static Object *modifier_skin_armature_create(Depsgraph *depsgraph, Main *bmain, BLI_bitmap *edges_visited = BLI_BITMAP_NEW(me->totedge, "edge_visited"); - /* note: we use EditBones here, easier to set them up and use + /* NOTE: we use EditBones here, easier to set them up and use * edit-armature functions to convert back to regular bones */ for (int v = 0; v < me->totvert; v++) { if (mvert_skin[v].flag & MVERT_SKIN_ROOT) { diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 00ef439c18a..dc60d4df7d1 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -322,7 +322,7 @@ void ED_keymap_object(wmKeyConfig *keyconf) keymap = WM_keymap_ensure(keyconf, "Object Non-modal", 0, 0); /* Object Mode ---------------------------------------------------------------- */ - /* Note: this keymap gets disabled in non-objectmode. */ + /* NOTE: this keymap gets disabled in non-objectmode. */ keymap = WM_keymap_ensure(keyconf, "Object Mode", 0, 0); keymap->poll = object_mode_poll; } diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 15695c4c6f7..30f75e9a150 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -593,7 +593,7 @@ void ED_object_parent_clear(Object *ob, const int type) DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); } -/* note, poll should check for editable scene */ +/* NOTE: poll should check for editable scene. */ static int parent_clear_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); @@ -791,8 +791,8 @@ bool ED_object_parent_set(ReportList *reports, * NOTE: the old (2.4x) method was to set ob->partype = PARSKEL, * creating the virtual modifiers. */ - ob->partype = PAROBJECT; /* Note: DNA define, not operator property. */ - /* ob->partype = PARSKEL; */ /* Note: DNA define, not operator property. */ + ob->partype = PAROBJECT; /* NOTE: DNA define, not operator property. */ + /* ob->partype = PARSKEL; */ /* NOTE: DNA define, not operator property. */ /* BUT, to keep the deforms, we need a modifier, * and then we need to set the object that it uses @@ -837,14 +837,14 @@ bool ED_object_parent_set(ReportList *reports, } break; case PAR_BONE: - ob->partype = PARBONE; /* Note: DNA define, not operator property. */ + ob->partype = PARBONE; /* NOTE: DNA define, not operator property. */ if (pchan->bone) { pchan->bone->flag &= ~BONE_RELATIVE_PARENTING; pchan_eval->bone->flag &= ~BONE_RELATIVE_PARENTING; } break; case PAR_BONE_RELATIVE: - ob->partype = PARBONE; /* Note: DNA define, not operator property. */ + ob->partype = PARBONE; /* NOTE: DNA define, not operator property. */ if (pchan->bone) { pchan->bone->flag |= BONE_RELATIVE_PARENTING; pchan_eval->bone->flag |= BONE_RELATIVE_PARENTING; @@ -860,7 +860,7 @@ bool ED_object_parent_set(ReportList *reports, break; case PAR_OBJECT: case PAR_FOLLOW: - ob->partype = PAROBJECT; /* Note: DNA define, not operator property. */ + ob->partype = PAROBJECT; /* NOTE: DNA define, not operator property. */ break; } @@ -1248,7 +1248,7 @@ static int parent_noinv_set_exec(bContext *C, wmOperator *op) /* set parenting type for object - object only... */ ob->parent = par; - ob->partype = PAROBJECT; /* note, dna define, not operator property */ + ob->partype = PAROBJECT; /* NOTE: DNA define, not operator property. */ } } } @@ -1298,7 +1298,7 @@ static const EnumPropertyItem prop_clear_track_types[] = { {0, NULL, 0, NULL, NULL}, }; -/* note, poll should check for editable scene */ +/* NOTE: poll should check for editable scene. */ static int object_track_clear_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); @@ -2236,7 +2236,7 @@ static int make_local_exec(bContext *C, wmOperator *op) const int mode = RNA_enum_get(op->ptr, "type"); int a; - /* Note: we (ab)use LIB_TAG_PRE_EXISTING to cherry pick which ID to make local... */ + /* NOTE: we (ab)use LIB_TAG_PRE_EXISTING to cherry pick which ID to make local... */ if (mode == MAKE_LOCAL_ALL) { ViewLayer *view_layer = CTX_data_view_layer(C); Collection *collection = CTX_data_collection(C); diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c index 1a0c5a6a83f..eb37aebcff2 100644 --- a/source/blender/editors/object/object_select.c +++ b/source/blender/editors/object/object_select.c @@ -295,7 +295,7 @@ bool ED_object_jump_to_object(bContext *C, Object *ob, const bool UNUSED(reveal_ return false; } - /* TODO, use 'reveal_hidden', as is done with bones. */ + /* TODO: use 'reveal_hidden', as is done with bones. */ if (view_layer->basact != base || !(base->flag & BASE_SELECTED)) { /* Select if not selected. */ @@ -1496,7 +1496,7 @@ void OBJECT_OT_select_random(wmOperatorType *ot) ot->idname = "OBJECT_OT_select_random"; /* api callbacks */ - /*ot->invoke = object_select_random_invoke XXX - need a number popup ;*/ + /*ot->invoke = object_select_random_invoke XXX: need a number popup ;*/ ot->exec = object_select_random_exec; ot->poll = objects_selectable_poll; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index d1e912b2f37..e350653e178 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1431,7 +1431,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) float obmat[4][4]; /* was the object data modified - * note: the functions above must set 'cent' */ + * NOTE: the functions above must set 'cent'. */ /* convert the offset to parent space */ BKE_object_to_mat4(ob, obmat); diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index e6cde60e9aa..37075a29b92 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -509,7 +509,7 @@ void ED_vgroup_parray_from_weight_array(MDeformVert **dvert_array, } } -/* TODO, cache flip data to speedup calls within a loop. */ +/* TODO: cache flip data to speedup calls within a loop. */ static void mesh_defvert_mirror_update_internal(Object *ob, MDeformVert *dvert_dst, MDeformVert *dvert_src, @@ -1000,7 +1000,7 @@ float ED_vgroup_vert_weight(Object *ob, bDeformGroup *dg, int vertnum) void ED_vgroup_select_by_name(Object *ob, const char *name) { - /* note: ob->actdef==0 signals on painting to create a new one, + /* NOTE: ob->actdef==0 signals on painting to create a new one, * if a bone in posemode is selected */ ob->actdef = BKE_object_defgroup_name_index(ob, name) + 1; } @@ -1133,7 +1133,7 @@ static void vgroup_duplicate(Object *ob) ob->actdef = BLI_listbase_count(&ob->defbase); icdg = (ob->actdef - 1); - /* TODO, we might want to allow only copy selected verts here? - campbell */ + /* TODO(campbell): we might want to allow only copy selected verts here? */ ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false); if (dvert_array) { @@ -2352,8 +2352,8 @@ static void dvert_mirror_op(MDeformVert *dvert, } } -/* TODO, vgroup locking */ -/* TODO, face masking */ +/* TODO: vgroup locking. */ +/* TODO: face masking. */ void ED_vgroup_mirror(Object *ob, const bool mirror_weights, const bool flip_vgroups, @@ -3774,7 +3774,7 @@ static int vertex_group_limit_total_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } - /* note, would normally return canceled, except we want the redo + /* NOTE: would normally return canceled, except we want the redo * UI to show up for users to change */ return OPERATOR_FINISHED; } |