forked from bartvdbraak/blender
style cleanup
This commit is contained in:
parent
7ec47aa864
commit
afe9970d48
@ -147,7 +147,7 @@ static float event_tablet_data(const wmEvent *event, int *pen_flip)
|
||||
/* Initialize the stroke cache variants from operator properties */
|
||||
static void paint_brush_update(bContext *C, Brush *brush, PaintMode mode,
|
||||
struct PaintStroke *stroke,
|
||||
const float mouse[2], float pressure)
|
||||
const float mouse[2], float pressure)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
|
||||
@ -289,7 +289,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, const wmEve
|
||||
/* XXX: meh, this is round about because
|
||||
* BKE_brush_jitter_pos isn't written in the best way to
|
||||
* be reused here */
|
||||
if(factor != 1.0f) {
|
||||
if (factor != 1.0f) {
|
||||
sub_v2_v2v2(delta, mouse_out, mouse_in);
|
||||
mul_v2_fl(delta, factor);
|
||||
add_v2_v2v2(mouse_out, mouse_in, delta);
|
||||
@ -324,7 +324,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2],
|
||||
output[1] = sample->mouse[1];
|
||||
|
||||
if (paint_supports_smooth_stroke(stroke->brush, mode)) {
|
||||
float radius = stroke->brush->smooth_stroke_radius*stroke->zoom_2d;
|
||||
float radius = stroke->brush->smooth_stroke_radius * stroke->zoom_2d;
|
||||
float u = stroke->brush->smooth_stroke_factor, v = 1.0f - u;
|
||||
float dx = stroke->last_mouse_position[0] - sample->mouse[0];
|
||||
float dy = stroke->last_mouse_position[1] - sample->mouse[1];
|
||||
@ -483,9 +483,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
|
||||
|
||||
bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
|
||||
{
|
||||
if(!(br->flag & BRUSH_SMOOTH_STROKE) ||
|
||||
(br->flag & BRUSH_ANCHORED) ||
|
||||
(br->flag & BRUSH_RESTORE_MESH))
|
||||
if (!(br->flag & BRUSH_SMOOTH_STROKE) ||
|
||||
(br->flag & BRUSH_ANCHORED) ||
|
||||
(br->flag & BRUSH_RESTORE_MESH))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1134,7 +1134,7 @@ static void *do_proxy_thread(void *data_v)
|
||||
|
||||
static void do_sequence_proxy(void *pjv, int *build_sizes, int build_count,
|
||||
int *build_undistort_sizes, int build_undistort_count,
|
||||
short *stop, short *do_update, float *progress)
|
||||
short *stop, short *do_update, float *progress)
|
||||
{
|
||||
ProxyJob *pj = pjv;
|
||||
MovieClip *clip = pj->clip;
|
||||
|
@ -141,10 +141,10 @@ static int txtfmt_osl_find_specialvar(const char *string)
|
||||
int i, len;
|
||||
|
||||
/* OSL shader types */
|
||||
if (STR_LITERAL_STARTSWITH(string, "shader", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "surface", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "volume", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len;
|
||||
if (STR_LITERAL_STARTSWITH(string, "shader", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "surface", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "volume", len)) i = len;
|
||||
else if (STR_LITERAL_STARTSWITH(string, "displacement", len)) i = len;
|
||||
else i = 0;
|
||||
|
||||
/* If next source char is an identifier (eg. 'i' in "definate") no match */
|
||||
|
@ -1357,8 +1357,9 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
|
||||
char error[256];
|
||||
|
||||
if (rv3d->gpuoffscreen) {
|
||||
if (GPU_offscreen_width(rv3d->gpuoffscreen) != w ||
|
||||
GPU_offscreen_height(rv3d->gpuoffscreen) != h) {
|
||||
if (GPU_offscreen_width(rv3d->gpuoffscreen) != w ||
|
||||
GPU_offscreen_height(rv3d->gpuoffscreen) != h)
|
||||
{
|
||||
GPU_offscreen_free(rv3d->gpuoffscreen);
|
||||
rv3d->gpuoffscreen = NULL;
|
||||
}
|
||||
|
@ -233,7 +233,7 @@ void math_pow(float val1, float val2, out float outval)
|
||||
else {
|
||||
float val2_mod_1 = mod(abs(val2), 1.0);
|
||||
|
||||
if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001)
|
||||
if (val2_mod_1 > 0.999 || val2_mod_1 < 0.001)
|
||||
outval = compatible_pow(val1, floor(val2 + 0.5));
|
||||
else
|
||||
outval = 0.0;
|
||||
|
Loading…
Reference in New Issue
Block a user