diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-07-07 03:56:59 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-07-07 03:56:59 +0400 |
commit | 84bf3e48c098d6971bab0ac55b4f413adc04708e (patch) | |
tree | 658323440a91d04948d0209053df24b6b728b6ca /source/blender/editors/object | |
parent | 3a0593cc3d5de33248b3a7b913a45729c37dc1b4 (diff) |
style cleanup: use c style comments in C code
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 34 | ||||
-rw-r--r-- | source/blender/editors/object/object_hook.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_transform.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_vgroup.c | 6 |
6 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index ba26b92f354..7ab20033239 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -558,8 +558,8 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) unsigned int layer; float loc[3], rot[3]; float mat[4][4]; - - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; @@ -629,7 +629,7 @@ static int object_add_text_exec(bContext *C, wmOperator *op) unsigned int layer; float loc[3], rot[3]; - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; @@ -669,18 +669,18 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) int enter_editmode; unsigned int layer; float loc[3], rot[3]; - - object_add_generic_invoke_options(C, op); // XXX these props don't get set right when only exec() is called + + object_add_generic_invoke_options(C, op); /* XXX these props don't get set right when only exec() is called */ if (!ED_object_add_generic_get_opts(C, op, loc, rot, &enter_editmode, &layer, NULL)) return OPERATOR_CANCELLED; - + if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) { obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer); ED_object_enter_editmode(C, 0); newob = 1; } else DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); - + if (obedit == NULL) { BKE_report(op->reports, RPT_ERROR, "Cannot create editmode armature"); return OPERATOR_CANCELLED; diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index a38c69fba8a..4e1c8df975c 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -462,7 +462,7 @@ static void test_constraints(Object *owner, bPoseChannel *pchan) if (type == CONSTRAINT_OBTYPE_BONE) { if (!BKE_armature_find_bone_name(BKE_armature_from_object(owner), ct->subtarget)) { /* bone must exist in armature... */ - // TODO: clear subtarget? + /* TODO: clear subtarget? */ curcon->flag |= CONSTRAINT_DISABLE; } else if (strcmp(pchan->name, ct->subtarget) == 0) { @@ -1518,16 +1518,16 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase /* do type-specific tweaking to the constraint settings */ switch (type) { - case CONSTRAINT_TYPE_PYTHON: // FIXME: this code is not really valid anymore + case CONSTRAINT_TYPE_PYTHON: /* FIXME: this code is not really valid anymore */ { #ifdef WITH_PYTHON char *menustr; int scriptint = 0; /* popup a list of usable scripts */ menustr = buildmenu_pyconstraints(NULL, &scriptint); - // XXX scriptint = pupmenu(menustr); + /* XXX scriptint = pupmenu(menustr); */ MEM_freeN(menustr); - + /* only add constraint if a script was chosen */ if (scriptint) { /* add constraint */ diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 35ee641d2c1..e48fe8d3eda 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -408,12 +408,12 @@ void ED_object_enter_editmode(bContext *C, int flag) ScrArea *sa = CTX_wm_area(C); View3D *v3d = NULL; int ok = 0; - + if (scene->id.lib) return; - + if (sa && sa->spacetype == SPACE_VIEW3D) v3d = sa->spacedata.first; - + if ((flag & EM_IGNORE_LAYER) == 0) { base = CTX_data_active_base(C); /* active layer checked here for view3d */ @@ -428,12 +428,12 @@ void ED_object_enter_editmode(bContext *C, int flag) if (ELEM3(NULL, base, base->object, base->object->data)) return; ob = base->object; - + if (BKE_object_obdata_is_libdata(ob)) { error_libdata(); return; } - + if (flag & EM_WAITCURSOR) waitcursor(1); ob->restore_mode = ob->mode; @@ -444,7 +444,7 @@ void ED_object_enter_editmode(bContext *C, int flag) ED_object_toggle_modes(C, ob->mode); ob->mode = OB_MODE_EDIT; - + if (ob->type == OB_MESH) { BMEditMesh *em; ok = 1; @@ -457,7 +457,7 @@ void ED_object_enter_editmode(bContext *C, int flag) /* order doesn't matter */ EDBM_mesh_normals_update(em); BMEdit_RecalcTessellation(em); - + BM_mesh_select_mode_flush(em->bm); } @@ -482,48 +482,48 @@ void ED_object_enter_editmode(bContext *C, int flag) scene->obedit = ob; ED_armature_to_edit(ob); /* to ensure all goes in restposition and without striding */ - DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX: should this be OB_RECALC_DATA? + DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); /* XXX: should this be OB_RECALC_DATA? */ WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_ARMATURE, scene); } else if (ob->type == OB_FONT) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editText(ob); WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_TEXT, scene); } else if (ob->type == OB_MBALL) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editMball(ob); WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_MBALL, scene); } else if (ob->type == OB_LATTICE) { - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ ok = 1; make_editLatt(ob); - + WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_LATTICE, scene); } else if (ob->type == OB_SURF || ob->type == OB_CURVE) { ok = 1; - scene->obedit = ob; // XXX for context + scene->obedit = ob; /* XXX for context */ make_editNurb(ob); - + WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_EDITMODE_CURVE, scene); } - + if (ok) { DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { - scene->obedit = NULL; // XXX for context + scene->obedit = NULL; /* XXX for context */ ob->mode &= ~OB_MODE_EDIT; WM_event_add_notifier(C, NC_SCENE | ND_MODE | NS_MODE_OBJECT, scene); } - + if (flag & EM_DO_UNDO) ED_undo_push(C, "Enter Editmode"); if (flag & EM_WAITCURSOR) waitcursor(0); } diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index e9341d90e86..65dd9a12d3b 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -397,7 +397,7 @@ static void object_hook_select(Object *ob, HookModifierData *hmd) } /* special poll operators for hook operators */ -// TODO: check for properties window modifier context too as alternative? +/* TODO: check for properties window modifier context too as alternative? */ static int hook_op_edit_poll(bContext *C) { Object *obedit = CTX_data_edit_object(C); diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 07557d8ea4c..83d92b9df27 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -119,7 +119,7 @@ static void object_clear_rot(Object *ob) if ((ob->protectflag & OB_LOCK_ROTZ) == 0) ob->quat[3] = ob->dquat[3] = 0.0f; - // TODO: does this quat need normalizing now? + /* TODO: does this quat need normalizing now? */ } else { /* the flag may have been set for the other modes, so just ignore the extra flag... */ @@ -133,7 +133,7 @@ static void object_clear_rot(Object *ob) } else { /* perform clamping using euler form (3-components) */ - // FIXME: deltas are not handled for these cases yet... + /* FIXME: deltas are not handled for these cases yet... */ float eul[3], oldeul[3], quat1[4] = {0}; if (ob->rotmode == ROT_MODE_QUAT) { diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index b5a0451b507..2e9652686da 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1007,7 +1007,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in } } bestIndex = -1; - // find the best change with an acceptable horizontal change + /* find the best change with an acceptable horizontal change */ for (i = 0; i < totweight; i++) { if (fabs(changes[i][0]) > fabs(changes[i][1] * 2.0f)) { bestIndex = i; @@ -1016,8 +1016,8 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in } if (bestIndex != -1) { wasChange = TRUE; - // it is a good place to stop if it tries to move the opposite direction - // (relative to the plane) of last time + /* it is a good place to stop if it tries to move the opposite direction + * (relative to the plane) of last time */ if (lastIndex != -1) { if (wasUp != upDown[bestIndex]) { wasChange = FALSE; |