Commit: 0a75579e1fcf125e17aac0698c1ac6ebfcf2931d Author: Fabian Schempp Date: Tue Jul 13 22:00:23 2021 +0200 Branches: soc-2021-porting-modifiers-to-nodes-remesh-blocks https://developer.blender.org/rB0a75579e1fcf125e17aac0698c1ac6ebfcf2931d
Geometry Nodes: Remesh Blocks This patch adds a Remesh Blocks node (compared to Remesh Voxel) It internaly moves the remesh algorithm, used in all modes of the Remesh modifier except the Voxel mode to blender kernel and shares that code with the modifier. Differential Revision: https://developer.blender.org/D11905 =================================================================== M source/blender/blenkernel/BKE_mesh_remesh_blocks.h M source/blender/blenkernel/intern/mesh_remesh_blocks.c M source/blender/nodes/geometry/nodes/node_geo_remesh_blocks.cc =================================================================== diff --git a/source/blender/blenkernel/BKE_mesh_remesh_blocks.h b/source/blender/blenkernel/BKE_mesh_remesh_blocks.h index 9078413e471..0a81e12aa60 100644 --- a/source/blender/blenkernel/BKE_mesh_remesh_blocks.h +++ b/source/blender/blenkernel/BKE_mesh_remesh_blocks.h @@ -38,14 +38,13 @@ typedef enum eRemeshBlocksMode { REMESH_BLOCKS_SHARP_FEATURES = 2, } eRemeshBlocksMode; - struct Mesh *BKE_mesh_remesh_blocks_to_mesh_nomain(struct Mesh *mesh, - const char remesh_flag, - const char remesh_mode, - const float threshold, - const int hermite_num, - const float scale, - const int depth); + const char remesh_flag, + const char remesh_mode, + const float threshold, + const int hermite_num, + const float scale, + const int depth); #ifdef __cplusplus } diff --git a/source/blender/blenkernel/intern/mesh_remesh_blocks.c b/source/blender/blenkernel/intern/mesh_remesh_blocks.c index 0915d641303..91d7aed0292 100644 --- a/source/blender/blenkernel/intern/mesh_remesh_blocks.c +++ b/source/blender/blenkernel/intern/mesh_remesh_blocks.c @@ -28,9 +28,9 @@ #include "BLI_math_vector.h" #include "BLI_threads.h" -#include "DNA_modifier_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" #include "MEM_guardedalloc.h" diff --git a/source/blender/nodes/geometry/nodes/node_geo_remesh_blocks.cc b/source/blender/nodes/geometry/nodes/node_geo_remesh_blocks.cc index c949b58be46..63aa6225aaa 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_remesh_blocks.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_remesh_blocks.cc @@ -49,11 +49,14 @@ static void geo_node_remesh_blocks_exec(GeoNodeExecParams params) const float scale = params.extract_input<float>("Scale"); const float threshold = params.extract_input<float>("Threshold"); - if(geometry_set.has_mesh()){ + if (geometry_set.has_mesh()) { Mesh *input_mesh = geometry_set.get_mesh_for_write(); Mesh *output_mesh = BKE_mesh_remesh_blocks_to_mesh_nomain( input_mesh, flag, mode, threshold, hermite_num, scale, depth); + for(int i = 0; i < output_mesh->totpoly; i++){ + printf("flag: %i\n",output_mesh->mpoly[i].flag); + } BKE_mesh_copy_parameters_for_eval(output_mesh, input_mesh); BKE_mesh_calc_edges(input_mesh, true, false); output_mesh->runtime.cd_dirty_vert |= CD_MASK_NORMAL; _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
