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:
authorSebastian Parborg <zeddb>2018-09-27 16:54:10 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-27 21:19:28 +0300
commita16e5b8efa8be09362d5e56812221db4705b0e26 (patch)
tree2ad732c5d0b78e345a1f0aaef1dbcc36bc1c509f /source/blender/editors/sculpt_paint
parent975a40dceb560a6bfc67b1562829acc541fa5716 (diff)
Cleanup: remove unused DerivedMesh code.
Differential Revision: https://developer.blender.org/D3736
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h8
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_proj.c11
3 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 7d3049434d6..c74dc252d0c 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -54,10 +54,14 @@ struct wmEvent;
struct wmOperator;
struct wmOperatorType;
struct wmWindowManager;
-struct DMCoNo;
struct UndoStep;
enum ePaintMode;
+typedef struct CoNo {
+ float co[3];
+ float no[3];
+} CoNo;
+
/* paint_stroke.c */
typedef bool (*StrokeGetLocation)(struct bContext *C, float location[3], const float mouse[2]);
typedef bool (*StrokeTestStart)(struct bContext *C, struct wmOperator *op, const float mouse[2]);
@@ -161,7 +165,7 @@ void PAINT_OT_weight_sample_group(struct wmOperatorType *ot);
struct VertProjHandle;
struct VertProjHandle *ED_vpaint_proj_handle_create(
struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob,
- struct DMCoNo **r_vcosnos);
+ struct CoNo **r_vcosnos);
void ED_vpaint_proj_handle_update(
struct Depsgraph *depsgraph, struct VertProjHandle *vp_handle,
/* runtime vars */
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index d62865b44d0..4821fd4fef4 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -2472,7 +2472,7 @@ struct VPaintData {
uint paintcol;
struct VertProjHandle *vp_handle;
- struct DMCoNo *vertexcosnos;
+ struct CoNo *vertexcosnos;
/* modify 'me->mcol' directly, since the derived mesh is drawing from this
* array, otherwise we need to refresh the modifier stack */
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_proj.c b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
index 602bfe1ab8e..31ae12c112a 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_proj.c
@@ -39,7 +39,6 @@
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
-#include "BKE_DerivedMesh.h" /* XXX To be removed, only used for DMCoNo struct */
#include "BKE_context.h"
#include "BKE_mesh_iterators.h"
#include "BKE_mesh_runtime.h"
@@ -56,7 +55,7 @@
/* stored while painting */
struct VertProjHandle {
- DMCoNo *vcosnos;
+ CoNo *vcosnos;
bool use_update;
@@ -85,7 +84,7 @@ static void vpaint_proj_dm_map_cosnos_init__map_cb(
const float no_f[3], const short no_s[3])
{
struct VertProjHandle *vp_handle = userData;
- DMCoNo *co_no = &vp_handle->vcosnos[index];
+ CoNo *co_no = &vp_handle->vcosnos[index];
/* check if we've been here before (normal should not be 0) */
if (!is_zero_v3(co_no->no)) {
@@ -127,7 +126,7 @@ static void vpaint_proj_dm_map_cosnos_update__map_cb(
struct VertProjUpdate *vp_update = userData;
struct VertProjHandle *vp_handle = vp_update->vp_handle;
- DMCoNo *co_no = &vp_handle->vcosnos[index];
+ CoNo *co_no = &vp_handle->vcosnos[index];
/* find closest vertex */
{
@@ -187,13 +186,13 @@ static void vpaint_proj_dm_map_cosnos_update(
struct VertProjHandle *ED_vpaint_proj_handle_create(
struct Depsgraph *depsgraph, Scene *scene, Object *ob,
- DMCoNo **r_vcosnos)
+ CoNo **r_vcosnos)
{
struct VertProjHandle *vp_handle = MEM_mallocN(sizeof(struct VertProjHandle), __func__);
Mesh *me = ob->data;
/* setup the handle */
- vp_handle->vcosnos = MEM_mallocN(sizeof(DMCoNo) * me->totvert, "vertexcosnos map");
+ vp_handle->vcosnos = MEM_mallocN(sizeof(CoNo) * me->totvert, "vertexcosnos map");
vp_handle->use_update = false;
/* sets 'use_update' if needed */