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>2018-10-04 02:23:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-04 02:33:49 +0300
commit971ab57c7df0b0ecdc948bc47a9bc133e35fb94f (patch)
treef26af3c28dadb02019d93fc23b970164307b9361
parenta04155dd52ee26fa0567b10255d7f48849197c02 (diff)
Cleanup: style
-rw-r--r--source/blender/blenkernel/intern/unit.c41
-rw-r--r--source/blender/draw/modes/object_mode.c2
-rw-r--r--source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c2
-rw-r--r--source/blender/editors/transform/transform_gizmo_3d.c4
-rw-r--r--source/blender/editors/util/numinput.c2
5 files changed, 25 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index c132053a82b..bca7b3dd357 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -346,7 +346,7 @@ static void unit_dual_convert(
double value, const bUnitCollection *usys,
bUnitDef const **r_unit_a, bUnitDef const **r_unit_b,
double *r_value_a, double *r_value_b,
- const bUnitDef *main_unit)
+ const bUnitDef *main_unit)
{
const bUnitDef *unit;
if (main_unit) unit = main_unit;
@@ -500,25 +500,24 @@ static const bUnitDef *get_preferred_unit_if_used(int type, PreferredUnits units
int max_offset = usys->length - 1;
- switch (type)
- {
- case B_UNIT_LENGTH:
- case B_UNIT_AREA:
- case B_UNIT_VOLUME:
- if (units.length == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.length, max_offset);
- case B_UNIT_MASS:
- if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.mass, max_offset);
- case B_UNIT_TIME:
- if (units.time == USER_UNIT_ADAPTIVE) return NULL;
- return usys->units + MIN2(units.time, max_offset);
- case B_UNIT_ROTATION:
- if (units.rotation == 0) return usys->units + 0;
- else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
- break;
- default:
- break;
+ switch (type) {
+ case B_UNIT_LENGTH:
+ case B_UNIT_AREA:
+ case B_UNIT_VOLUME:
+ if (units.length == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.length, max_offset);
+ case B_UNIT_MASS:
+ if (units.mass == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.mass, max_offset);
+ case B_UNIT_TIME:
+ if (units.time == USER_UNIT_ADAPTIVE) return NULL;
+ return usys->units + MIN2(units.time, max_offset);
+ case B_UNIT_ROTATION:
+ if (units.rotation == 0) return usys->units + 0;
+ else if (units.rotation == USER_UNIT_ROT_RADIANS) return usys->units + 3;
+ break;
+ default:
+ break;
}
return NULL;
}
@@ -964,4 +963,4 @@ double bUnit_GetScaler(const void *usys_pt, int index)
bool bUnit_IsSuppressed(const void *usys_pt, int index)
{
return (((bUnitCollection *)usys_pt)->units[index].flag & B_UNIT_DEF_SUPPRESS) != 0;
-} \ No newline at end of file
+}
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 3b95f0b86d0..f18125af005 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2764,7 +2764,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
case OB_GPENCIL:
/* in all modes except object mode hide always */
if ((OBACT(view_layer)) &&
- (OBACT(view_layer)->mode != OB_MODE_OBJECT))
+ (OBACT(view_layer)->mode != OB_MODE_OBJECT))
{
break;
}
diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
index 7dc0a24add9..fa8dd38cad6 100644
--- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
+++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c
@@ -357,7 +357,7 @@ static void dial_draw_intern(
}
if (draw_options & ED_GIZMO_DIAL_DRAW_FLAG_ANGLE_VALUE &&
- (gz->flag & WM_GIZMO_DRAW_VALUE))
+ (gz->flag & WM_GIZMO_DRAW_VALUE))
{
DialInteraction *inter = gz->interaction_data;
if (inter) {
diff --git a/source/blender/editors/transform/transform_gizmo_3d.c b/source/blender/editors/transform/transform_gizmo_3d.c
index 097e902105b..90f94eb268a 100644
--- a/source/blender/editors/transform/transform_gizmo_3d.c
+++ b/source/blender/editors/transform/transform_gizmo_3d.c
@@ -1283,8 +1283,8 @@ void drawDial3d(const TransInfo *t)
scale *= ED_view3d_pixel_size_no_ui_scale(t->ar->regiondata, mat_final[3]);
mul_mat3_m4_fl(mat_final, scale);
- if ((t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID))
- && activeSnap(t))
+ if ((t->tsnap.mode & (SCE_SNAP_MODE_INCREMENT | SCE_SNAP_MODE_GRID)) &&
+ activeSnap(t))
{
increment = (t->modifiers & MOD_PRECISION) ? t->snap[2] : t->snap[1];
}
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 887c85300d1..52cf1b2d708 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -556,7 +556,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
}
else {
n->val_flag[idx] |= NUM_INVALID;
- }
+ }
#ifdef USE_FAKE_EDIT