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:
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c8
-rw-r--r--source/blender/editors/armature/reeb.c4
-rw-r--r--source/blender/editors/include/ED_types.h2
-rw-r--r--source/blender/editors/object/object_constraint.c4
-rw-r--r--source/blender/editors/physics/particle_edit.c6
-rw-r--r--source/blender/editors/physics/physics_fluid.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c32
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c20
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
10 files changed, 42 insertions, 40 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 20ffbd8eac0..3fa1d580fc5 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -3289,13 +3289,13 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
break;
case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
- //icon = ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
+ //icon = ((enabled) ? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
icon = ICON_TRIA_RIGHT;
tooltip = TIP_("Make channels grouped under this channel visible");
break;
case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
- //icon = ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
+ //icon = ((enabled) ? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
icon = ICON_LAYER_USED;
tooltip = TIP_("NLA Track is the only one evaluated for the AnimData block it belongs to");
break;
@@ -3304,13 +3304,13 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
case ACHANNEL_SETTING_PROTECT: /* protected lock */
// TODO: what about when there's no protect needed?
- //icon = ((enabled)? ICON_LOCKED : ICON_UNLOCKED);
+ //icon = ((enabled) ? ICON_LOCKED : ICON_UNLOCKED);
icon = ICON_UNLOCKED;
tooltip = TIP_("Editability of keyframes for this channel");
break;
case ACHANNEL_SETTING_MUTE: /* muted speaker */
- //icon = ((enabled)? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
+ //icon = ((enabled) ? ICON_MUTE_IPO_ON : ICON_MUTE_IPO_OFF);
icon = ICON_MUTE_IPO_OFF;
if (ale->type == ALE_FCURVE)
diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c
index d04938fd59b..649ef90f7ba 100644
--- a/source/blender/editors/armature/reeb.c
+++ b/source/blender/editors/armature/reeb.c
@@ -52,9 +52,11 @@ static ReebGraph *FILTERED_RG = NULL;
* SIGGRAPH 2007
*
* */
-
+
+#if 0
#define DEBUG_REEB
#define DEBUG_REEB_NODE
+#endif
/* place-holders! */
typedef struct EditEdge {
diff --git a/source/blender/editors/include/ED_types.h b/source/blender/editors/include/ED_types.h
index 5908dbf3a1d..fac4c02e8ed 100644
--- a/source/blender/editors/include/ED_types.h
+++ b/source/blender/editors/include/ED_types.h
@@ -40,7 +40,7 @@
/* proposal = put scene pointers on function calls? */
// #define BASACT (scene->basact)
-// #define OBACT (BASACT? BASACT->object: NULL)
+// #define OBACT (BASACT ? BASACT->object : NULL)
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 9b61fa44955..3e66c4ca110 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -604,7 +604,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
list = &pchan->constraints;
else {
//if (G.debug & G_DEBUG)
- //printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob)? ob->id.name + 2 : "<None>");
+ //printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob) ? ob->id.name + 2 : "<None>");
return NULL;
}
}
@@ -616,7 +616,7 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int
con = BKE_constraints_findByName(list, constraint_name);
//if (G.debug & G_DEBUG)
- //printf("constraint found = %p, %s\n", (void *)con, (con)?con->name:"<Not found>");
+ //printf("constraint found = %p, %s\n", (void *)con, (con) ? con->name : "<Not found>");
if (con && (type != 0) && (con->type != type))
con = NULL;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index e972b7d6620..f00295a9033 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -2287,13 +2287,13 @@ static void subdivide_particle(PEData *data, int pa_index)
nekey++;
if (ekey->flag & PEK_SELECT && (ekey+1)->flag & PEK_SELECT) {
- nkey->time= (key->time + (key+1)->time)*0.5f;
- state.time= (endtime != 0.0f)? nkey->time/endtime: 0.0f;
+ nkey->time = (key->time + (key + 1)->time) * 0.5f;
+ state.time = (endtime != 0.0f) ? nkey->time / endtime: 0.0f;
psys_get_particle_on_path(&sim, pa_index, &state, 0);
copy_v3_v3(nkey->co, state.co);
nekey->co= nkey->co;
- nekey->time= &nkey->time;
+ nekey->time = &nkey->time;
nekey->flag |= PEK_SELECT;
if (!(psys->flag & PSYS_GLOBAL_HAIR))
nekey->flag |= PEK_USE_WCO;
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index df723b06259..8fe3eb66c67 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -528,7 +528,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
if ( ELEM(fsmesh.type, OB_FLUIDSIM_FLUID, OB_FLUIDSIM_INFLOW)) {
fsmesh.channelInitialVel = fobj->InitialVelocity;
- fsmesh.localInivelCoords = ((fluidmd->fss->typeFlags & OB_FSINFLOW_LOCALCOORD)?1:0);
+ fsmesh.localInivelCoords = ((fluidmd->fss->typeFlags & OB_FSINFLOW_LOCALCOORD) ? 1 : 0);
}
if (fluidmd->fss->typeFlags & OB_FSBND_NOSLIP)
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 1616b3026bd..dd07da6a16f 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -133,7 +133,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col)
int size;
int j;
int refresh;
- int format = col? GL_RGBA : GL_ALPHA;
+ GLenum format = col ? GL_RGBA : GL_ALPHA;
if (br->mtex.brush_map_mode == MTEX_MAP_MODE_TILED && !br->mtex.tex) return 0;
@@ -151,7 +151,7 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col)
if (refresh) {
struct ImagePool *pool = NULL;
/* stencil is rotated later */
- const float rotation = (br->mtex.brush_map_mode != MTEX_MAP_MODE_STENCIL)?
+ const float rotation = (br->mtex.brush_map_mode != MTEX_MAP_MODE_STENCIL) ?
-br->mtex.rot : 0;
float radius = BKE_brush_size_get(vc->scene, br) * zoom;
@@ -257,10 +257,10 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col)
if (br->mtex.brush_map_mode == MTEX_MAP_MODE_VIEW)
mul_v4_fl(rgba, BKE_brush_curve_strength(br, len, 1)); /* Falloff curve */
- buffer[index*4] = rgba[0]*255;
- buffer[index*4 + 1] = rgba[1]*255;
- buffer[index*4 + 2] = rgba[2]*255;
- buffer[index*4 + 3] = rgba[3]*255;
+ buffer[index * 4] = rgba[0] * 255;
+ buffer[index * 4 + 1] = rgba[1] * 255;
+ buffer[index * 4 + 2] = rgba[2] * 255;
+ buffer[index * 4 + 3] = rgba[3] * 255;
}
else {
float avg = br->mtex.tex ? paint_get_tex_pixel(&br->mtex, x, y, pool) : 1;
@@ -275,13 +275,14 @@ static int load_tex(Brush *br, ViewContext *vc, float zoom, bool col)
}
else {
if (col) {
- buffer[index*4] = 0;
- buffer[index*4 + 1] = 0;
- buffer[index*4 + 2] = 0;
- buffer[index*4 + 3] = 0;
+ buffer[index * 4] = 0;
+ buffer[index * 4 + 1] = 0;
+ buffer[index * 4 + 2] = 0;
+ buffer[index * 4 + 3] = 0;
}
- else
+ else {
buffer[index] = 0;
+ }
}
}
}
@@ -424,14 +425,13 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
/* check for overlay mode */
if (brush->mtex.brush_map_mode != MTEX_MAP_MODE_STENCIL &&
- (!(brush->flag & BRUSH_TEXTURE_OVERLAY) ||
+ (!(brush->flag & BRUSH_TEXTURE_OVERLAY) ||
!ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_VIEW, MTEX_MAP_MODE_TILED)))
{
return;
}
- col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX)?
- true: false;
+ col = ELEM3(mode, PAINT_TEXTURE_PROJECTIVE, PAINT_TEXTURE_2D, PAINT_VERTEX) ? true: false;
/* save lots of GL state
* TODO: check on whether all of these are needed? */
glPushAttrib(GL_COLOR_BUFFER_BIT |
@@ -485,7 +485,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
quad.ymax = y + radius;
}
}
- else if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_TILED){
+ else if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_TILED) {
quad.xmin = 0;
quad.ymin = 0;
quad.xmax = BLI_rcti_size_x(&vc->ar->winrct);
@@ -500,7 +500,7 @@ static void paint_draw_alpha_overlay(UnifiedPaintSettings *ups, Brush *brush,
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glTranslatef(brush->stencil_pos[0], brush->stencil_pos[1], 0);
- glRotatef(brush->mtex.rot/M_PI*180, 0, 0, 1);
+ glRotatef(RAD2DEGF(brush->mtex.rot), 0, 0, 1);
glMatrixMode(GL_TEXTURE);
}
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 7ea11cc464a..a63d147e459 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -476,7 +476,7 @@ static int stencil_control_invoke(bContext *C, wmOperator *op, const wmEvent *ev
copy_v2_v2_int(scd->init_sdim, br->stencil_dimension);
copy_v2_v2_int(scd->init_spos, br->stencil_pos);
sub_v2_v2v2_int(mdiff, event->mval, br->stencil_pos);
- scd->lenorig = sqrtf(mdiff[0]*mdiff[0] + mdiff[1]*mdiff[1]);
+ scd->lenorig = sqrtf(mdiff[0] * mdiff[0] + mdiff[1] * mdiff[1]);
scd->br = br;
scd->init_rot = br->mtex.rot;
scd->init_angle = atan2(mdiff[1], mdiff[0]);
@@ -519,10 +519,10 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
{
float len, factor;
sub_v2_v2v2_int(mdiff, event->mval, scd->br->stencil_pos);
- len = sqrtf(mdiff[0]*mdiff[0] + mdiff[1]*mdiff[1]);
+ len = sqrtf(mdiff[0] * mdiff[0] + mdiff[1] * mdiff[1]);
factor = len/scd->lenorig;
- mdiff[0] = factor*scd->init_sdim[0];
- mdiff[1] = factor*scd->init_sdim[1];
+ mdiff[0] = factor * scd->init_sdim[0];
+ mdiff[1] = factor * scd->init_sdim[1];
copy_v2_v2_int(scd->br->stencil_dimension, mdiff);
break;
}
@@ -532,10 +532,10 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
sub_v2_v2v2_int(mdiff, event->mval, scd->br->stencil_pos);
angle = atan2(mdiff[1], mdiff[0]);
angle = scd->init_rot + angle - scd->init_angle;
- if (angle < 0)
- angle += 2*M_PI;
- if (angle > 2*M_PI)
- angle -= 2*M_PI;
+ if (angle < 0.0f)
+ angle += (float)(2 * M_PI);
+ if (angle > (float)(2 * M_PI))
+ angle -= (float)(2 * M_PI);
scd->br->mtex.rot = angle;
break;
}
@@ -543,12 +543,12 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
}
break;
case LEFTMOUSE:
- if(event->val == KM_PRESS) {
+ if (event->val == KM_PRESS) {
MEM_freeN(op->customdata);
return OPERATOR_FINISHED;
}
case RIGHTMOUSE:
- if(event->val == KM_PRESS) {
+ if (event->val == KM_PRESS) {
return stencil_control_cancel(C, op);
}
default:
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 061f073b287..2eca3f94e95 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -883,7 +883,7 @@ static float calc_vp_strength_col_dl(VPaint *vp, ViewContext *vc, const float co
}
factor = rgba[3];
}
- return factor*BKE_brush_curve_strength_clamp(brush, dist, brush_size_pressure);
+ return factor * BKE_brush_curve_strength_clamp(brush, dist, brush_size_pressure);
}
}
if (rgba)
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index c74c160080c..582a319a5f1 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -2364,7 +2364,7 @@ static int node_shader_script_update_exec(bContext *C, wmOperator *op)
RE_engine_free(engine);
- return (found)? OPERATOR_FINISHED: OPERATOR_CANCELLED;
+ return (found) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
void NODE_OT_shader_script_update(wmOperatorType *ot)