diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-19 17:28:19 +0400 |
commit | af3e348430218e609c80d86c8dd418bed15e70e8 (patch) | |
tree | a93e0453c8fe47a954594060cc5bbda90214a7f3 /source/blender/editors/object | |
parent | 2f5173887e0c7f6ba19664f16b177e575d82a241 (diff) |
code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 6 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 14 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 6 |
6 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 69aae5c4f06..fe5fafb0ca0 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -735,7 +735,7 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op) if (BKE_scene_use_new_shading_nodes(scene)) { ED_node_shader_default(scene, &la->id); - la->use_nodes = 1; + la->use_nodes = TRUE; } return OPERATOR_FINISHED; @@ -901,7 +901,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); const short use_global = RNA_boolean_get(op->ptr, "use_global"); - /* int islamp= 0; */ /* UNUSED */ + /* int is_lamp = FALSE; */ /* UNUSED */ if (CTX_data_edit_object(C)) return OPERATOR_CANCELLED; @@ -909,7 +909,7 @@ static int object_delete_exec(bContext *C, wmOperator *op) CTX_DATA_BEGIN (C, Base *, base, selected_bases) { - /* if (base->object->type==OB_LAMP) islamp= 1; */ + /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */ /* deselect object -- it could be used in other scenes */ base->object->flag &= ~SELECT; diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index cea9a0aae6b..b89562e772b 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -434,7 +434,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image *ima, MPassKnownData bkr->baked_faces++; if (bkr->do_update) - *bkr->do_update = 1; + *bkr->do_update = TRUE; if (bkr->progress) *bkr->progress = ((float)bkr->baked_objects + (float)bkr->baked_faces / tot_face) / bkr->tot_obj; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index c97ad9c62f9..107b19b0ed7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -764,7 +764,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) Base *base; Curve *cu, *cu1; Nurb *nu; - int do_scene_sort = 0; + int do_scene_sort = FALSE; if (scene->id.lib) return; @@ -949,7 +949,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event) /* Copy the constraint channels over */ copy_constraints(&base->object->constraints, &ob->constraints, TRUE); - do_scene_sort = 1; + do_scene_sort = TRUE; } else if (event == 23) { base->object->softflag = ob->softflag; @@ -1284,7 +1284,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) Curve *cu; Nurb *nu; int clear = (strcmp(op->idname, "OBJECT_OT_shade_flat") == 0); - int done = 0; + int done = FALSE; CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) { @@ -1295,7 +1295,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); - done = 1; + done = TRUE; } else if (ELEM(ob->type, OB_SURF, OB_CURVE)) { cu = ob->data; @@ -1308,7 +1308,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); - done = 1; + done = TRUE; } } CTX_DATA_END; @@ -1369,7 +1369,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d) for (base = FIRSTBASE; base; base = base->next) { if (TESTBASELIB(v3d, base)) { ob = base->object; - done = 0; + done = FALSE; for (a = 1; a <= ob->totcol; a++) { ma = give_current_material(ob, a); @@ -1398,7 +1398,7 @@ static void UNUSED_FUNCTION(image_aspect) (Scene * scene, View3D * v3d) if (x > y) ob->size[0] = ob->size[1] * x / y; else ob->size[1] = ob->size[0] * y / x; - done = 1; + done = TRUE; DAG_id_tag_update(&ob->id, OB_RECALC_OB); } } diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 191677989b9..0aa7e1083c3 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -1530,7 +1530,7 @@ static void oceanbake_update(void *customdata, float progress, int *cancel) if (oceanbake_breakjob(oj)) *cancel = 1; - *(oj->do_update) = 1; + *(oj->do_update) = TRUE; *(oj->progress) = progress; } @@ -1546,7 +1546,7 @@ static void oceanbake_startjob(void *customdata, short *stop, short *do_update, BKE_bake_ocean(oj->ocean, oj->och, oceanbake_update, (void *)oj); - *do_update = 1; + *do_update = TRUE; *stop = 0; } diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index b7dc3fd7bea..d618d17f797 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -429,7 +429,7 @@ void ED_object_generic_keymap(struct wmKeyConfig *UNUSED(keyconf), struct wmKeyM RNA_string_set(kmi->ptr, "data_path", "tool_settings.proportional_edit_falloff"); // Object mode - if (do_pet == 1) { + if (do_pet == TRUE) { kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", OKEY, KM_PRESS, 0, 0); RNA_string_set(kmi->ptr, "data_path", "tool_settings.use_proportional_edit_objects"); diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index b3e16c8d4eb..2b622b21d2c 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1108,7 +1108,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); unsigned int lay, local; - /* int islamp= 0; */ /* UNUSED */ + /* int is_lamp = FALSE; */ /* UNUSED */ lay = move_to_layer_init(C, op); lay &= 0xFFFFFF; @@ -1125,7 +1125,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) base->object->lay = lay; base->object->flag &= ~SELECT; base->flag &= ~SELECT; - /* if (base->object->type==OB_LAMP) islamp= 1; */ + /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */ } CTX_DATA_END; } @@ -1138,7 +1138,7 @@ static int move_to_layer_exec(bContext *C, wmOperator *op) local = base->lay & 0xFF000000; base->lay = lay + local; base->object->lay = lay; - /* if (base->object->type==OB_LAMP) islamp= 1; */ + /* if (base->object->type==OB_LAMP) is_lamp = TRUE; */ } CTX_DATA_END; } |