Commit: 6667273bb18ba7725b0d625e714579c330e6d938
Author: Nathan Vollmer
Date:   Tue Aug 23 18:18:08 2016 -0600
Branches: soc-2016-pbvh-painting
https://developer.blender.org/rB6667273bb18ba7725b0d625e714579c330e6d938

Fixed paint_intern.h header.

===================================================================

M       source/blender/editors/sculpt_paint/paint_intern.h
M       source/blender/editors/sculpt_paint/paint_vertex.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_intern.h 
b/source/blender/editors/sculpt_paint/paint_intern.h
index 7d0271d..00f7fb4 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -27,11 +27,7 @@
 /** \file blender/editors/sculpt_paint/paint_intern.h
  *  \ingroup edsculpt
  */
-
 #include "ED_view3d.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_mesh_mapping.h"
-#include "BLI_stack.h"
 
 #ifndef __PAINT_INTERN_H__
 #define __PAINT_INTERN_H__
@@ -58,6 +54,8 @@ struct wmOperator;
 struct wmOperatorType;
 struct wmWindowManager;
 struct DMCoNo;
+struct BLI_Stack;
+struct MeshElemMap;
 enum PaintMode;
 
 /* paint_stroke.c */
@@ -113,37 +111,6 @@ struct WeightPaintGroupData {
        const bool *lock;
 };
 
-typedef struct WPaintData {
-       ViewContext vc;
-       int *indexar;
-
-       struct WeightPaintGroupData active, mirror;
-
-       void *vp_handle;
-       DMCoNo *vertexcosnos;
-
-       float wpimat[3][3];
-
-       /* variables for auto normalize */
-       const bool *vgroup_validmap; /* stores if vgroups tie to deforming 
bones or not */
-       const bool *lock_flags;
-
-       /* variables for multipaint */
-       const bool *defbase_sel;      /* set of selected groups */
-       int defbase_tot_sel;          /* number of selected groups */
-       bool do_multipaint;           /* true if multipaint enabled and 
multiple groups selected */
-
-       /* variables for blur */
-       struct {
-               MeshElemMap *vmap;
-               int *vmap_mem;
-       } blur_data;
-
-       BLI_Stack *accumulate_stack;  /* for reuse (WPaintDefer) */
-
-       int defbase_tot;
-} WPaintData;
-
 /* struct to avoid passing many args each call to do_weight_paint_vertex()
  * this _could_ be made a part of the operators 'WPaintData' struct, or at
  * least a member, but for now keep its own struct, initialized on every
@@ -175,12 +142,12 @@ typedef struct WeightPaintInfo {
 
 /* paint_vertex.c */
 typedef struct VPaintData {
-       ViewContext vc;
+       struct ViewContext vc;
        unsigned int paintcol;
        int *indexar;
 
        struct VertProjHandle *vp_handle;
-       DMCoNo *vertexcosnos;
+       struct DMCoNo *vertexcosnos;
 
        float vpimat[3][3];
 
@@ -195,6 +162,38 @@ typedef struct VPaintData {
        bool is_texbrush;
 } VPaintData;
 
+typedef struct WPaintData {
+  struct ViewContext vc;
+  int *indexar;
+
+  struct WeightPaintGroupData active, mirror;
+
+  void *vp_handle;
+  struct DMCoNo *vertexcosnos;
+
+  float wpimat[3][3];
+
+  /* variables for auto normalize */
+  const bool *vgroup_validmap; /* stores if vgroups tie to deforming bones or 
not */
+  const bool *lock_flags;
+
+  /* variables for multipaint */
+  const bool *defbase_sel;      /* set of selected groups */
+  int defbase_tot_sel;          /* number of selected groups */
+  bool do_multipaint;           /* true if multipaint enabled and multiple 
groups selected */
+
+  /* variables for blur */
+  struct {
+    struct MeshElemMap *vmap;
+    int *vmap_mem;
+  } blur_data;
+
+  struct BLI_Stack *accumulate_stack;  /* for reuse (WPaintDefer) */
+
+  int defbase_tot;
+} WPaintData;
+
+
 int weight_paint_poll(struct bContext *C);
 int weight_paint_mode_poll(struct bContext *C);
 int vertex_paint_poll(struct bContext *C);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c 
b/source/blender/editors/sculpt_paint/paint_vertex.c
index b7c84bb..e7ce986 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2409,12 +2409,12 @@ static void do_wpaint_brush_blur_task_cb_ex(
       }
       if (totalHitLoops != 0) {
         const float fade = BKE_brush_curve_strength(brush, test.dist, 
cache->radius);
-               const float dot = dot_vf3vs3(cache->sculpt_normal_symm, vd.no);
+        const float dot = dot_vf3vs3(cache->sculpt_normal_symm, vd.no);
 
-               finalColor /= totalHitLoops;
-               if (dot > 0.0) {
+        finalColor /= totalHitLoops;
+        if (dot > 0.0) {
           do_weight_paint_vertex(data->vp, data->ob, data->wpi, vertexIndex, 
dot * fade * bstrength, (float)finalColor);
-               }
+        }
       }
     }
     BKE_pbvh_vertex_iter_end;
@@ -2453,7 +2453,7 @@ static void do_wpaint_brush_smudge_task_cb_ex(
         //Minimum dot product between brush direction and current to neighbor 
direction is 0.0, meaning orthogonal.
         float maxDotProduct = 0.0f;
 
-        //Get the color of the loop in the opposite direction of the brush 
movement
+        //Get the color of the loop in the opposite direction of the brush 
movement (this callback is specifically for smudge.)
         finalWeight = 0;
         for (int j = 0; j < ss->vert_to_poly[vertexIndex].count; j++) {
           int polyIndex = ss->vert_to_poly[vertexIndex].indices[j];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to