Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-05-25 13:51:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-25 13:51:53 +0400
commit57c292daf0429624e289eba0c1d082d96747c9b8 (patch)
tree934ea9557e684bff356e61c2b080d5bc8c4dd40a /source/blender/editors
parentc4bbc5abfcb543563872e42a8352917682787b14 (diff)
style cleanup
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c6
-rw-r--r--source/blender/editors/space_text/space_text.c2
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c17
-rw-r--r--source/blender/editors/util/editmode_undo.c2
8 files changed, 20 insertions, 17 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 2543b49a48d..b3b4e47ba81 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -927,11 +927,11 @@ static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene)
return;
BLI_strncpy(from, last_seq->strip->dir, sizeof(from));
-// XXX if (0==sbutton(from, 0, sizeof(from)-1, "From: "))
+// XXX if (0 == sbutton(from, 0, sizeof(from)-1, "From: "))
// return;
BLI_strncpy(to, from, sizeof(to));
-// XXX if (0==sbutton(to, 0, sizeof(to)-1, "To: "))
+// XXX if (0 == sbutton(to, 0, sizeof(to)-1, "To: "))
// return;
if (strcmp(to, from) == 0)
@@ -1989,7 +1989,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
- Sequence *seq, *last_seq = BKE_sequencer_active_get(scene); /* last_seq checks ed==NULL */
+ Sequence *seq, *last_seq = BKE_sequencer_active_get(scene); /* last_seq checks (ed == NULL) */
if (last_seq == NULL || last_seq->type != SEQ_META)
return OPERATOR_CANCELLED;
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index 85eda858d24..501e1cad67e 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -128,7 +128,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn)
switch (wmn->category) {
case NC_TEXT:
/* check if active text was changed, no need to redraw if text isn't active
- * reference==NULL means text was unlinked, should update anyway for this
+ * (reference == NULL) means text was unlinked, should update anyway for this
* case -- no way to know was text active before unlinking or not */
if (wmn->reference && wmn->reference != st->text)
break;
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 6a070070379..0de7e2569c0 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1696,7 +1696,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base,
bone = pchan->bone;
if (bone) {
/* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194]
- * NOTE: this is the only case with NO_DEFORM==0 flag, as this is for envelope influence drawing
+ * NOTE: this is the only case with (NO_DEFORM == 0) flag, as this is for envelope influence drawing
*/
if ( (bone->flag & (BONE_HIDDEN_P | BONE_NO_DEFORM | BONE_HIDDEN_PG)) == 0 &&
((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 56949fbe40c..aec7913e80d 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3949,7 +3949,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
int retval = 0;
/* backface culling */
- if(v3d->flag2 & V3D_BACKFACE_CULLING) {
+ if (v3d->flag2 & V3D_BACKFACE_CULLING) {
/* not all displists use same in/out normal direction convention */
glEnable(GL_CULL_FACE);
glCullFace((ob->type == OB_MBALL) ? GL_BACK : GL_FRONT);
@@ -6592,7 +6592,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if (v3d->zbuf == 0 && dt > OB_WIRE) dt = OB_WIRE;
dtx = 0;
- /* faceselect exception: also draw solid when dt==wire, except in editmode */
+ /* faceselect exception: also draw solid when (dt == wire), except in editmode */
if (is_obact && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) {
if (ob->type == OB_MESH) {
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index f2e585c8f79..f7014bb51eb 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -1863,7 +1863,7 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas
/* generate displist */
if (use_displist == -1) {
- /* note, since this was added, its checked dob->type==OB_DUPLIGROUP
+ /* note, since this was added, its checked (dob->type == OB_DUPLIGROUP)
* however this is very slow, it was probably needed for the NLA
* offset feature (used in group-duplicate.blend but no longer works in 2.5)
* so for now it should be ok to - campbell */
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 06cae3585cd..95cc37d9f87 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -547,7 +547,7 @@ static void flyEvent(FlyInfo *fly, wmEvent *event)
time_currwheel = PIL_check_seconds_timer();
time_wheel = (float)(time_currwheel - fly->time_lastwheel);
fly->time_lastwheel = time_currwheel;
- /* Mouse wheel delays range from 0.5==slow to 0.01==fast */
+ /* Mouse wheel delays range from (0.5 == slow) to (0.01 == fast) */
time_wheel = 1.0f + (10.0f - (20.0f * MIN2(time_wheel, 0.5f))); /* 0-0.5 -> 0-5.0 */
if (fly->speed < 0.0f) {
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index c2d58349075..18c7e975356 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -500,7 +500,7 @@ static void do_lasso_select_curve__doSelect(void *userData, Nurb *UNUSED(nu), BP
}
else {
if (cu->drawflag & CU_HIDE_HANDLES) {
- /* can only be beztindex==0 here since handles are hidden */
+ /* can only be (beztindex == 0) here since handles are hidden */
bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT);
}
else {
@@ -1480,15 +1480,18 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short dese
if (extend) {
ED_base_object_select(basact, BA_SELECT);
}
- else if(deselect) {
+ else if (deselect) {
ED_base_object_select(basact, BA_DESELECT);
}
- else if(toggle) {
+ else if (toggle) {
if (basact->flag & SELECT) {
- if (basact == oldbasact)
+ if (basact == oldbasact) {
ED_base_object_select(basact, BA_DESELECT);
+ }
+ }
+ else {
+ ED_base_object_select(basact, BA_SELECT);
}
- else ED_base_object_select(basact, BA_SELECT);
}
else {
deselectall_except(scene, basact);
@@ -1549,7 +1552,7 @@ static void do_nurbs_box_select__doSelect(void *userData, Nurb *UNUSED(nu), BPoi
}
else {
if (cu->drawflag & CU_HIDE_HANDLES) {
- /* can only be beztindex==0 here since handles are hidden */
+ /* can only be (beztindex == 0) here since handles are hidden */
bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT);
}
else {
@@ -2294,7 +2297,7 @@ static void nurbscurve_circle_doSelect(void *userData, Nurb *UNUSED(nu), BPoint
}
else {
if (cu->drawflag & CU_HIDE_HANDLES) {
- /* can only be beztindex==0 here since handles are hidden */
+ /* can only be (beztindex == 0) here since handles are hidden */
bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT);
}
else {
diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c
index 9aaccb57fe2..18610d57bbd 100644
--- a/source/blender/editors/util/editmode_undo.c
+++ b/source/blender/editors/util/editmode_undo.c
@@ -129,7 +129,7 @@ void undo_editmode_push(bContext *C, const char *name,
/* at first here was code to prevent an "original" key to be inserted twice
* this was giving conflicts for example when mesh changed due to keys or apply */
- /* remove all undos after (also when curundo==NULL) */
+ /* remove all undos after (also when curundo == NULL) */
while (undobase.last != curundo) {
uel = undobase.last;
uel->freedata(uel->undodata);