Merge branch 'master' into sculpt-dev
This commit is contained in:
commit
3ac83dcc73
|
@ -1 +1 @@
|
|||
Subproject commit 4fcdbfe7c20edfc1204c0aa46c98ea25354abcd9
|
||||
Subproject commit 27fe7f3a4f964b53af436c4da4ddea337eff0c7e
|
|
@ -1 +1 @@
|
|||
Subproject commit 7d78c8a63f2f4b146f9327ddc0d567a5921b94ea
|
||||
Subproject commit 5a82baad9f986722104280e8354a4427d8e9eab1
|
|
@ -53,7 +53,7 @@ set(SRC
|
|||
intern/draw_cache.c
|
||||
intern/draw_cache_extract_mesh_extractors.c
|
||||
intern/draw_cache_extract_mesh_render_data.c
|
||||
intern/draw_cache_extract_mesh.c
|
||||
intern/draw_cache_extract_mesh.cc
|
||||
intern/draw_cache_impl_curve.cc
|
||||
intern/draw_cache_impl_displist.c
|
||||
intern/draw_cache_impl_gpencil.c
|
||||
|
|
|
@ -68,13 +68,13 @@ typedef struct DRW_MeshCDMask {
|
|||
* bit-wise and atomic operations are used to compare and update the struct.
|
||||
* See `mesh_cd_layers_type_*` functions. */
|
||||
BLI_STATIC_ASSERT(sizeof(DRW_MeshCDMask) <= sizeof(uint64_t), "DRW_MeshCDMask exceeds 64 bits")
|
||||
|
||||
typedef enum eMRIterType {
|
||||
MR_ITER_LOOPTRI = 1 << 0,
|
||||
MR_ITER_POLY = 1 << 1,
|
||||
MR_ITER_LEDGE = 1 << 2,
|
||||
MR_ITER_LVERT = 1 << 3,
|
||||
} eMRIterType;
|
||||
ENUM_OPERATORS(eMRIterType, MR_ITER_LVERT)
|
||||
|
||||
typedef enum eMRDataType {
|
||||
MR_DATA_POLY_NOR = 1 << 1,
|
||||
|
@ -83,6 +83,11 @@ typedef enum eMRDataType {
|
|||
/** Force loop normals calculation. */
|
||||
MR_DATA_TAN_LOOP_NOR = 1 << 4,
|
||||
} eMRDataType;
|
||||
ENUM_OPERATORS(eMRDataType, MR_DATA_TAN_LOOP_NOR)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
BLI_INLINE int mesh_render_mat_len_get(Mesh *me)
|
||||
{
|
||||
|
@ -294,7 +299,10 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
const bool use_subsurf_fdots,
|
||||
const DRW_MeshCDMask *cd_layer_used,
|
||||
const Scene *scene,
|
||||
const ToolSettings *ts,
|
||||
const bool use_hide);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -246,7 +246,7 @@ const MeshExtract extract_tris = {.init = extract_tris_init,
|
|||
.iter_looptri_bm = extract_tris_iter_looptri_bm,
|
||||
.iter_looptri_mesh = extract_tris_iter_looptri_mesh,
|
||||
.finish = extract_tris_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.tris)};
|
||||
|
||||
|
@ -375,7 +375,7 @@ const MeshExtract extract_lines = {.init = extract_lines_init,
|
|||
.iter_ledge_bm = extract_lines_iter_ledge_bm,
|
||||
.iter_ledge_mesh = extract_lines_iter_ledge_mesh,
|
||||
.finish = extract_lines_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines)};
|
||||
|
||||
|
@ -414,7 +414,7 @@ const MeshExtract extract_lines_with_lines_loose = {
|
|||
.iter_ledge_bm = extract_lines_iter_ledge_bm,
|
||||
.iter_ledge_mesh = extract_lines_iter_ledge_mesh,
|
||||
.finish = extract_lines_with_lines_loose_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines)};
|
||||
|
||||
|
@ -542,7 +542,7 @@ const MeshExtract extract_points = {.init = extract_points_init,
|
|||
.iter_lvert_bm = extract_points_iter_lvert_bm,
|
||||
.iter_lvert_mesh = extract_points_iter_lvert_mesh,
|
||||
.finish = extract_points_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.points)};
|
||||
|
||||
|
@ -617,7 +617,7 @@ const MeshExtract extract_fdots = {.init = extract_fdots_init,
|
|||
.iter_poly_bm = extract_fdots_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_fdots_iter_poly_mesh,
|
||||
.finish = extract_fdots_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.fdots)};
|
||||
|
||||
|
@ -700,7 +700,7 @@ const MeshExtract extract_lines_paint_mask = {
|
|||
.init = extract_lines_paint_mask_init,
|
||||
.iter_poly_mesh = extract_lines_paint_mask_iter_poly_mesh,
|
||||
.finish = extract_lines_paint_mask_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_paint_mask)};
|
||||
|
||||
|
@ -852,7 +852,7 @@ const MeshExtract extract_lines_adjacency = {
|
|||
.iter_looptri_bm = extract_lines_adjacency_iter_looptri_bm,
|
||||
.iter_looptri_mesh = extract_lines_adjacency_iter_looptri_mesh,
|
||||
.finish = extract_lines_adjacency_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_adjacency)};
|
||||
|
||||
|
@ -928,7 +928,7 @@ const MeshExtract extract_edituv_tris = {
|
|||
.iter_looptri_bm = extract_edituv_tris_iter_looptri_bm,
|
||||
.iter_looptri_mesh = extract_edituv_tris_iter_looptri_mesh,
|
||||
.finish = extract_edituv_tris_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_tris)};
|
||||
|
||||
|
@ -1012,7 +1012,7 @@ const MeshExtract extract_edituv_lines = {
|
|||
.iter_poly_bm = extract_edituv_lines_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_edituv_lines_iter_poly_mesh,
|
||||
.finish = extract_edituv_lines_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_lines)};
|
||||
|
||||
|
@ -1091,7 +1091,7 @@ const MeshExtract extract_edituv_points = {
|
|||
.iter_poly_bm = extract_edituv_points_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_edituv_points_iter_poly_mesh,
|
||||
.finish = extract_edituv_points_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_points)};
|
||||
|
||||
|
@ -1182,7 +1182,7 @@ const MeshExtract extract_edituv_fdots = {
|
|||
.iter_poly_bm = extract_edituv_fdots_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_edituv_fdots_iter_poly_mesh,
|
||||
.finish = extract_edituv_fdots_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_fdots)};
|
||||
|
||||
|
@ -1362,7 +1362,7 @@ const MeshExtract extract_pos_nor = {.init = extract_pos_nor_init,
|
|||
.iter_lvert_bm = extract_pos_nor_iter_lvert_bm,
|
||||
.iter_lvert_mesh = extract_pos_nor_iter_lvert_mesh,
|
||||
.finish = extract_pos_nor_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.pos_nor)};
|
||||
|
||||
|
@ -1550,7 +1550,7 @@ const MeshExtract extract_pos_nor_hq = {
|
|||
.iter_lvert_bm = extract_pos_nor_hq_iter_lvert_bm,
|
||||
.iter_lvert_mesh = extract_pos_nor_hq_iter_lvert_mesh,
|
||||
.finish = extract_pos_nor_hq_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.pos_nor)};
|
||||
|
||||
|
@ -1641,7 +1641,7 @@ static void extract_lnor_hq_iter_poly_mesh(const MeshRenderData *mr,
|
|||
const MeshExtract extract_lnor_hq = {.init = extract_lnor_hq_init,
|
||||
.iter_poly_bm = extract_lnor_hq_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_lnor_hq_iter_poly_mesh,
|
||||
.data_flag = MR_DATA_LOOP_NOR,
|
||||
.data_type = MR_DATA_LOOP_NOR,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.lnor)};
|
||||
|
||||
|
@ -1730,7 +1730,7 @@ static void extract_lnor_iter_poly_mesh(const MeshRenderData *mr,
|
|||
const MeshExtract extract_lnor = {.init = extract_lnor_init,
|
||||
.iter_poly_bm = extract_lnor_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_lnor_iter_poly_mesh,
|
||||
.data_flag = MR_DATA_LOOP_NOR,
|
||||
.data_type = MR_DATA_LOOP_NOR,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.lnor)};
|
||||
|
||||
|
@ -1825,7 +1825,7 @@ static void *extract_uv_init(const MeshRenderData *mr, struct MeshBatchCache *ca
|
|||
}
|
||||
|
||||
const MeshExtract extract_uv = {.init = extract_uv_init,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.uv)};
|
||||
|
||||
|
@ -2014,7 +2014,7 @@ static void *extract_tan_init(const MeshRenderData *mr, struct MeshBatchCache *c
|
|||
}
|
||||
|
||||
const MeshExtract extract_tan = {.init = extract_tan_init,
|
||||
.data_flag = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR |
|
||||
.data_type = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR |
|
||||
MR_DATA_LOOPTRI,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.tan)};
|
||||
|
@ -2033,7 +2033,7 @@ static void *extract_tan_hq_init(const MeshRenderData *mr, struct MeshBatchCache
|
|||
|
||||
const MeshExtract extract_tan_hq = {
|
||||
.init = extract_tan_hq_init,
|
||||
.data_flag = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR | MR_DATA_LOOPTRI,
|
||||
.data_type = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR | MR_DATA_LOOPTRI,
|
||||
.use_threading = false,
|
||||
};
|
||||
|
||||
|
@ -2132,7 +2132,7 @@ static void *extract_sculpt_data_init(const MeshRenderData *mr,
|
|||
|
||||
const MeshExtract extract_sculpt_data = {
|
||||
.init = extract_sculpt_data_init,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
/* TODO: enable threading. */
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.sculpt_data)};
|
||||
|
@ -2280,7 +2280,7 @@ static void *extract_vcol_init(const MeshRenderData *mr, struct MeshBatchCache *
|
|||
}
|
||||
|
||||
const MeshExtract extract_vcol = {.init = extract_vcol_init,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.vcol)};
|
||||
|
||||
|
@ -2366,7 +2366,7 @@ const MeshExtract extract_orco = {.init = extract_orco_init,
|
|||
.iter_poly_bm = extract_orco_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_orco_iter_poly_mesh,
|
||||
.finish = extract_orco_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.orco)};
|
||||
|
||||
|
@ -2567,7 +2567,7 @@ const MeshExtract extract_edge_fac = {
|
|||
.iter_ledge_bm = extract_edge_fac_iter_ledge_bm,
|
||||
.iter_ledge_mesh = extract_edge_fac_iter_ledge_mesh,
|
||||
.finish = extract_edge_fac_finish,
|
||||
.data_flag = MR_DATA_POLY_NOR,
|
||||
.data_type = MR_DATA_POLY_NOR,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edge_fac)};
|
||||
|
||||
|
@ -2721,7 +2721,7 @@ const MeshExtract extract_weights = {.init = extract_weights_init,
|
|||
.iter_poly_bm = extract_weights_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_weights_iter_poly_mesh,
|
||||
.finish = extract_weights_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.weights)};
|
||||
|
||||
|
@ -3000,7 +3000,7 @@ const MeshExtract extract_edit_data = {
|
|||
.iter_ledge_mesh = extract_edit_data_iter_ledge_mesh,
|
||||
.iter_lvert_bm = extract_edit_data_iter_lvert_bm,
|
||||
.iter_lvert_mesh = extract_edit_data_iter_lvert_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edit_data)};
|
||||
|
||||
|
@ -3111,7 +3111,7 @@ const MeshExtract extract_edituv_data = {
|
|||
.iter_poly_bm = extract_edituv_data_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_edituv_data_iter_poly_mesh,
|
||||
.finish = extract_edituv_data_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_data)};
|
||||
|
||||
|
@ -3227,7 +3227,7 @@ static void extract_edituv_stretch_area_finish(const MeshRenderData *mr,
|
|||
const MeshExtract extract_edituv_stretch_area = {
|
||||
.init = extract_edituv_stretch_area_init,
|
||||
.finish = extract_edituv_stretch_area_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_stretch_area)};
|
||||
|
||||
|
@ -3430,7 +3430,7 @@ const MeshExtract extract_edituv_stretch_angle = {
|
|||
.iter_poly_bm = extract_edituv_stretch_angle_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_edituv_stretch_angle_iter_poly_mesh,
|
||||
.finish = extract_edituv_stretch_angle_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_stretch_angle)};
|
||||
|
||||
|
@ -4037,7 +4037,7 @@ const MeshExtract extract_mesh_analysis = {
|
|||
.finish = extract_analysis_iter_finish_mesh,
|
||||
/* This is not needed for all visualization types.
|
||||
* * Maybe split into different extract. */
|
||||
.data_flag = MR_DATA_POLY_NOR | MR_DATA_LOOPTRI,
|
||||
.data_type = MR_DATA_POLY_NOR | MR_DATA_LOOPTRI,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.mesh_analysis)};
|
||||
|
||||
|
@ -4117,7 +4117,7 @@ const MeshExtract extract_fdots_pos = {
|
|||
.init = extract_fdots_pos_init,
|
||||
.iter_poly_bm = extract_fdots_pos_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_fdots_pos_iter_poly_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_pos)};
|
||||
|
||||
|
@ -4199,7 +4199,7 @@ static void extract_fdots_nor_finish(const MeshRenderData *mr,
|
|||
const MeshExtract extract_fdots_nor = {
|
||||
.init = extract_fdots_nor_init,
|
||||
.finish = extract_fdots_nor_finish,
|
||||
.data_flag = MR_DATA_POLY_NOR,
|
||||
.data_type = MR_DATA_POLY_NOR,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_nor)};
|
||||
|
||||
|
@ -4276,7 +4276,7 @@ static void extract_fdots_nor_hq_finish(const MeshRenderData *mr,
|
|||
const MeshExtract extract_fdots_nor_hq = {
|
||||
.init = extract_fdots_nor_hq_init,
|
||||
.finish = extract_fdots_nor_hq_finish,
|
||||
.data_flag = MR_DATA_POLY_NOR,
|
||||
.data_type = MR_DATA_POLY_NOR,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_nor)};
|
||||
|
||||
|
@ -4375,7 +4375,7 @@ const MeshExtract extract_fdots_uv = {
|
|||
.iter_poly_bm = extract_fdots_uv_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_fdots_uv_iter_poly_mesh,
|
||||
.finish = extract_fdots_uv_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_uv)};
|
||||
|
||||
|
@ -4447,7 +4447,7 @@ const MeshExtract extract_fdots_edituv_data = {
|
|||
.iter_poly_bm = extract_fdots_edituv_data_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_fdots_edituv_data_iter_poly_mesh,
|
||||
.finish = extract_fdots_edituv_data_finish,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_edituv_data)};
|
||||
|
||||
|
@ -4504,7 +4504,7 @@ static void *extract_skin_roots_init(const MeshRenderData *mr,
|
|||
|
||||
const MeshExtract extract_skin_roots = {
|
||||
.init = extract_skin_roots_init,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = false,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.skin_roots)};
|
||||
|
||||
|
@ -4676,7 +4676,7 @@ const MeshExtract extract_poly_idx = {
|
|||
.init = extract_select_idx_init,
|
||||
.iter_poly_bm = extract_poly_idx_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_poly_idx_iter_poly_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.poly_idx)};
|
||||
|
||||
|
@ -4686,7 +4686,7 @@ const MeshExtract extract_edge_idx = {
|
|||
.iter_poly_mesh = extract_edge_idx_iter_poly_mesh,
|
||||
.iter_ledge_bm = extract_edge_idx_iter_ledge_bm,
|
||||
.iter_ledge_mesh = extract_edge_idx_iter_ledge_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edge_idx)};
|
||||
|
||||
|
@ -4698,7 +4698,7 @@ const MeshExtract extract_vert_idx = {
|
|||
.iter_ledge_mesh = extract_vert_idx_iter_ledge_mesh,
|
||||
.iter_lvert_bm = extract_vert_idx_iter_lvert_bm,
|
||||
.iter_lvert_mesh = extract_vert_idx_iter_lvert_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.vert_idx)};
|
||||
|
||||
|
@ -4743,6 +4743,6 @@ const MeshExtract extract_fdot_idx = {
|
|||
.init = extract_fdot_idx_init,
|
||||
.iter_poly_bm = extract_fdot_idx_iter_poly_bm,
|
||||
.iter_poly_mesh = extract_fdot_idx_iter_poly_mesh,
|
||||
.data_flag = 0,
|
||||
.data_type = 0,
|
||||
.use_threading = true,
|
||||
.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdot_idx)};
|
|
@ -34,6 +34,10 @@
|
|||
|
||||
#include "draw_cache_extract.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum eMRExtractType {
|
||||
MR_EXTRACT_BMESH,
|
||||
MR_EXTRACT_MAPPED,
|
||||
|
@ -426,7 +430,7 @@ typedef struct MeshExtract {
|
|||
/** Executed on one worker thread after all elements iterations. */
|
||||
ExtractFinishFn *finish;
|
||||
/** Used to request common data. */
|
||||
const eMRDataType data_flag;
|
||||
const eMRDataType data_type;
|
||||
/** Used to know if the element callbacks are thread-safe and can be parallelized. */
|
||||
const bool use_threading;
|
||||
/**
|
||||
|
@ -447,12 +451,10 @@ MeshRenderData *mesh_render_data_create(Mesh *me,
|
|||
const float obmat[4][4],
|
||||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
const DRW_MeshCDMask *cd_used,
|
||||
const ToolSettings *ts,
|
||||
const eMRIterType iter_type);
|
||||
void mesh_render_data_free(MeshRenderData *mr);
|
||||
void mesh_render_data_update_normals(MeshRenderData *mr,
|
||||
const eMRIterType iter_type,
|
||||
const eMRDataType data_flag);
|
||||
void mesh_render_data_update_looptris(MeshRenderData *mr,
|
||||
const eMRIterType iter_type,
|
||||
|
@ -507,3 +509,7 @@ extern const MeshExtract extract_poly_idx;
|
|||
extern const MeshExtract extract_edge_idx;
|
||||
extern const MeshExtract extract_vert_idx;
|
||||
extern const MeshExtract extract_fdot_idx;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -151,7 +151,6 @@ void mesh_render_data_update_looptris(MeshRenderData *mr,
|
|||
}
|
||||
|
||||
void mesh_render_data_update_normals(MeshRenderData *mr,
|
||||
const eMRIterType UNUSED(iter_type),
|
||||
const eMRDataType data_flag)
|
||||
{
|
||||
Mesh *me = mr->me;
|
||||
|
@ -238,7 +237,6 @@ MeshRenderData *mesh_render_data_create(Mesh *me,
|
|||
const float obmat[4][4],
|
||||
const bool do_final,
|
||||
const bool do_uvedit,
|
||||
const DRW_MeshCDMask *UNUSED(cd_used),
|
||||
const ToolSettings *ts,
|
||||
const eMRIterType iter_type)
|
||||
{
|
||||
|
|
|
@ -1569,7 +1569,6 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
|
|||
false,
|
||||
true,
|
||||
false,
|
||||
&cache->cd_used,
|
||||
scene,
|
||||
ts,
|
||||
true);
|
||||
|
@ -1588,7 +1587,6 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
|
|||
false,
|
||||
false,
|
||||
use_subsurf_fdots,
|
||||
&cache->cd_used,
|
||||
scene,
|
||||
ts,
|
||||
true);
|
||||
|
@ -1606,7 +1604,6 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
|
|||
true,
|
||||
false,
|
||||
use_subsurf_fdots,
|
||||
&cache->cd_used,
|
||||
scene,
|
||||
ts,
|
||||
use_hide);
|
||||
|
|
|
@ -184,13 +184,17 @@ static void deformVerts(ModifierData *md,
|
|||
|
||||
surmd->cfra = cfra;
|
||||
|
||||
surmd->bvhtree = MEM_callocN(sizeof(BVHTreeFromMesh), "BVHTreeFromMesh");
|
||||
const bool has_poly = surmd->mesh->totpoly > 0;
|
||||
const bool has_edge = surmd->mesh->totedge > 0;
|
||||
if (has_poly || has_edge) {
|
||||
surmd->bvhtree = MEM_callocN(sizeof(BVHTreeFromMesh), "BVHTreeFromMesh");
|
||||
|
||||
if (surmd->mesh->totpoly) {
|
||||
BKE_bvhtree_from_mesh_get(surmd->bvhtree, surmd->mesh, BVHTREE_FROM_LOOPTRI, 2);
|
||||
}
|
||||
else {
|
||||
BKE_bvhtree_from_mesh_get(surmd->bvhtree, surmd->mesh, BVHTREE_FROM_EDGES, 2);
|
||||
if (has_poly) {
|
||||
BKE_bvhtree_from_mesh_get(surmd->bvhtree, surmd->mesh, BVHTREE_FROM_LOOPTRI, 2);
|
||||
}
|
||||
else if (has_edge) {
|
||||
BKE_bvhtree_from_mesh_get(surmd->bvhtree, surmd->mesh, BVHTREE_FROM_EDGES, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f99d29ae3e6ad44d45d79309454c45f8088781a4
|
||||
Subproject commit 01f51a0e551ab730f0934dc6488613690ac4bf8f
|
Loading…
Reference in New Issue