Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_intern.h
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | typedef struct { | ||||
| /* Original coordinate, normal, and mask. */ | /* Original coordinate, normal, and mask. */ | ||||
| const float *co; | const float *co; | ||||
| const float *no; | const float *no; | ||||
| float mask; | float mask; | ||||
| const float *col; | const float *col; | ||||
| } SculptOrigVertData; | } SculptOrigVertData; | ||||
| typedef struct SculptOrigFaceData { | |||||
| struct SculptUndoNode *unode; | |||||
| struct BMLog *bm_log; | |||||
| const int *face_sets; | |||||
| int face_set; | |||||
| } SculptOrigFaceData; | |||||
| /* Flood Fill. */ | /* Flood Fill. */ | ||||
| typedef struct { | typedef struct { | ||||
| GSQueue *queue; | GSQueue *queue; | ||||
| BLI_bitmap *visited_verts; | BLI_bitmap *visited_verts; | ||||
| } SculptFloodFill; | } SculptFloodFill; | ||||
| typedef enum eBoundaryAutomaskMode { | typedef enum eBoundaryAutomaskMode { | ||||
| AUTOMASK_INIT_BOUNDARY_EDGES = 1, | AUTOMASK_INIT_BOUNDARY_EDGES = 1, | ||||
| ▲ Show 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | typedef struct SculptUndoNode { | ||||
| /* pivot */ | /* pivot */ | ||||
| float pivot_pos[3]; | float pivot_pos[3]; | ||||
| float pivot_rot[4]; | float pivot_rot[4]; | ||||
| /* Sculpt Face Sets */ | /* Sculpt Face Sets */ | ||||
| int *face_sets; | int *face_sets; | ||||
| PBVHFaceRef *faces; | |||||
| int faces_num; | |||||
| size_t undo_size; | size_t undo_size; | ||||
| } SculptUndoNode; | } SculptUndoNode; | ||||
| /* Factor of brush to have rake point following behind | /* Factor of brush to have rake point following behind | ||||
| * (could be configurable but this is reasonable default). */ | * (could be configurable but this is reasonable default). */ | ||||
| #define SCULPT_RAKE_BRUSH_FACTOR 0.25f | #define SCULPT_RAKE_BRUSH_FACTOR 0.25f | ||||
| struct SculptRakeData { | struct SculptRakeData { | ||||
| ▲ Show 20 Lines • Show All 817 Lines • ▼ Show 20 Lines | |||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Face Sets API | /** \name Face Sets API | ||||
| * \{ */ | * \{ */ | ||||
| int SCULPT_active_face_set_get(SculptSession *ss); | int SCULPT_active_face_set_get(SculptSession *ss); | ||||
| int SCULPT_vertex_face_set_get(SculptSession *ss, PBVHVertRef vertex); | int SCULPT_vertex_face_set_get(SculptSession *ss, PBVHVertRef vertex); | ||||
| void SCULPT_vertex_face_set_set(SculptSession *ss, PBVHVertRef vertex, int face_set); | void SCULPT_vertex_face_set_set(SculptSession *ss, PBVHVertRef vertex, int face_set); | ||||
| int SCULPT_face_set_get(const SculptSession *ss, PBVHFaceRef face); | |||||
| void SCULPT_face_set_set(SculptSession *ss, PBVHFaceRef face, int fset); | |||||
| bool SCULPT_vertex_has_face_set(SculptSession *ss, PBVHVertRef vertex, int face_set); | bool SCULPT_vertex_has_face_set(SculptSession *ss, PBVHVertRef vertex, int face_set); | ||||
| bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, PBVHVertRef vertex); | bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, PBVHVertRef vertex); | ||||
| int SCULPT_face_set_next_available_get(SculptSession *ss); | int SCULPT_face_set_next_available_get(SculptSession *ss); | ||||
| void SCULPT_face_set_visibility_set(SculptSession *ss, int face_set, bool visible); | void SCULPT_face_set_visibility_set(SculptSession *ss, int face_set, bool visible); | ||||
| /** \} */ | /** \} */ | ||||
| Show All 16 Lines | |||||
| void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter); | void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter); | ||||
| /** | /** | ||||
| * Initialize a #SculptOrigVertData for accessing original vertex data; | * Initialize a #SculptOrigVertData for accessing original vertex data; | ||||
| * handles #BMesh, #Mesh, and multi-resolution. | * handles #BMesh, #Mesh, and multi-resolution. | ||||
| */ | */ | ||||
| void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, | void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, | ||||
| Object *ob, | Object *ob, | ||||
| struct SculptUndoNode *unode); | struct SculptUndoNode *unode); | ||||
| /** | |||||
| * Initialize a #SculptOrigFaceData for accessing original face data; | |||||
| * handles #BMesh, #Mesh, and multi-resolution. | |||||
| */ | |||||
| void SCULPT_orig_face_data_init(SculptOrigFaceData *data, | |||||
| Object *ob, | |||||
| PBVHNode *node, | |||||
| SculptUndoType type); | |||||
| /** | |||||
| * Update a #SculptOrigFaceData for a particular vertex from the PBVH iterator. | |||||
| */ | |||||
| void SCULPT_orig_face_data_update(SculptOrigFaceData *orig_data, PBVHFaceIter *iter); | |||||
| /** | |||||
| * Initialize a #SculptOrigVertData for accessing original vertex data; | |||||
| * handles #BMesh, #Mesh, and multi-resolution. | |||||
| */ | |||||
| void SCULPT_orig_face_data_unode_init(SculptOrigFaceData *data, | |||||
| Object *ob, | |||||
| struct SculptUndoNode *unode); | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Brush Utilities. | /** \name Brush Utilities. | ||||
| * \{ */ | * \{ */ | ||||
| BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes(const Brush *brush) | BLI_INLINE bool SCULPT_tool_needs_all_pbvh_nodes(const Brush *brush) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 828 Lines • Show Last 20 Lines | |||||