diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index 289086f8b86..71db2fc56da 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -532,7 +532,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, /* Get strength by feeding the vertex * location directly into a texture */ hasrgb = externtex(mtex, point, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool); } else { float rotation = -mtex->rot; @@ -587,7 +587,7 @@ float BKE_brush_sample_tex_3D(const Scene *scene, Brush *br, co[2] = 0.0f; hasrgb = externtex(mtex, co, &intensity, - rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool); + rgba, rgba + 1, rgba + 2, rgba + 3, 0, pool); } intensity += br->texture_sample_bias; diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index cd10ef0fe2f..bc813472d7e 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3902,10 +3902,13 @@ static void *do_projectpaint_thread(void *ph_v) sub_v2_v2v2(samplecos, projPixel->projCoSS, pos); } /* taking 3d copy to account for 3D mapping too. It gets concatenated during sampling */ - else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) + else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) { copy_v3_v3(samplecos, projPixel->worldCoSS); - else - copy_v3_v3(samplecos, projPixel->projCoSS); + } + else { + copy_v2_v2(samplecos, projPixel->projCoSS); + samplecos[2] = 0.0f; + } } if (falloff > 0.0f) { diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 21e83918d38..6c9dd490f5d 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -973,7 +973,8 @@ static float tex_strength(SculptSession *ss, Brush *br, avg += br->texture_sample_bias; } else { - avg = BKE_brush_sample_tex_3D(scene, br, point_2d, rgba, ss->tex_pool); + const float point_3d[3] = {point_2d[0], point_2d[1], 0.0f}; + avg = BKE_brush_sample_tex_3D(scene, br, point_3d, rgba, ss->tex_pool); } } diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 96f8753d993..26a0d0a2fa8 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -145,7 +145,7 @@ static void restrictbutton_recursive_ebone(bContext *C, EditBone *ebone_parent, ebone->flag |= flag; } else { - ebone->flag &= ~flag; + ebone->flag &= ~flag; } } } @@ -160,7 +160,7 @@ static void restrictbutton_recursive_bone(bContext *C, bArmature *arm, Bone *bon bone->flag |= flag; } else { - bone->flag &= ~flag; + bone->flag &= ~flag; } restrictbutton_recursive_bone(C, arm, bone, flag, set_flag); } diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index acd8a50f81c..7a1b7358461 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -294,7 +294,7 @@ void view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera } /* only meant for timer usage */ -static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const const wmEvent *event) +static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event) { View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 08f4206e4ca..f5eaa716dfa 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -1128,7 +1128,7 @@ static void shader_print_errors(const char *task, char *log, const char *code) fprintf(stderr, "%s\n", log); } -static const char *gpu_shader_standard_defines() +static const char *gpu_shader_standard_defines(void) { /* some useful defines to detect GPU type */ if(GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY))