diff options
author | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2010-07-14 18:11:03 +0400 |
---|---|---|
committer | Jason Wilkins <Jason.A.Wilkins@gmail.com> | 2010-07-14 18:11:03 +0400 |
commit | 5505697ac508c02b8a2e196c5a8c07431bc687cf (patch) | |
tree | a550a4718d586066017e3861d42104ef09e969bf /source/blender/editors/sculpt_paint/sculpt_intern.h | |
parent | ae1748b98470f08ed805e101b218f44c17d9b6b2 (diff) |
Merge GSOC Sculpt Branch: 28499-30319
https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-jwilkins
See log of that branch for details.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index c7c6833b695..a46823a0b28 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -32,6 +32,9 @@ #include "DNA_listBase.h" #include "DNA_vec_types.h" +#include "DNA_key_types.h" + +#include "BLI_pbvh.h" struct bContext; struct Brush; @@ -65,8 +68,49 @@ void sculpt_stroke_free(struct SculptStroke *); void sculpt_stroke_add_point(struct SculptStroke *, const short x, const short y); void sculpt_stroke_apply(struct Sculpt *sd, struct SculptStroke *); void sculpt_stroke_apply_all(struct Sculpt *sd, struct SculptStroke *); +int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float out[3], float mouse[2]); /* Partial Mesh Visibility */ void sculptmode_pmv(int mode); +/* Undo */ + +typedef struct SculptUndoNode { + struct SculptUndoNode *next, *prev; + + char idname[MAX_ID_NAME]; /* name instead of pointer*/ + void *node; /* only during push, not valid afterwards! */ + + float (*co)[3]; + short (*no)[3]; + int totvert; + + /* non-multires */ + int maxvert; /* to verify if totvert it still the same */ + int *index; /* to restore into right location */ + + /* multires */ + int maxgrid; /* same for grid */ + int gridsize; /* same for grid */ + int totgrid; /* to restore into right location */ + int *grids; /* to restore into right location */ + + /* layer brush */ + float *layer_disp; + + /* shape keys */ + char *shapeName[32]; /* keep size in sync with keyblock dna */ +} SculptUndoNode; + +SculptUndoNode *sculpt_undo_push_node(SculptSession *ss, PBVHNode *node); +SculptUndoNode *sculpt_undo_get_node(PBVHNode *node); +void sculpt_undo_push_begin(char *name); +void sculpt_undo_push_end(void); + +struct MultiresModifierData *sculpt_multires_active(struct Scene *scene, struct Object *ob); +int sculpt_modifiers_active(Scene *scene, Object *ob); +void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]); + +void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos); + #endif |