[Bf-blender-cvs] [010e24a95c9] blender2.8: OpenSubdiv: Remove UV coordinates from converter

Sergey Sharybin noreply at git.blender.org
Mon Jul 16 11:18:20 CEST 2018


Commit: 010e24a95c9e53f2c0bee2aa4cc8450e4346233d
Author: Sergey Sharybin
Date:   Mon Jul 16 11:12:02 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB010e24a95c9e53f2c0bee2aa4cc8450e4346233d

OpenSubdiv: Remove UV coordinates from converter

Converter only defines topology, not coordinates or (face)varying data.

===================================================================

M	intern/opensubdiv/opensubdiv_converter_capi.h
M	source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c

===================================================================

diff --git a/intern/opensubdiv/opensubdiv_converter_capi.h b/intern/opensubdiv/opensubdiv_converter_capi.h
index 1d76da4d76b..b16d6eb6c8f 100644
--- a/intern/opensubdiv/opensubdiv_converter_capi.h
+++ b/intern/opensubdiv/opensubdiv_converter_capi.h
@@ -127,9 +127,6 @@ typedef struct OpenSubdiv_Converter {
   // Get number of UV coordinates in the current layer (layer which was
   // specified in precalcUVLayer().
   int (*getNumUVCoordinates)(const struct OpenSubdiv_Converter* converter);
-  // Get cooridnates themselves.
-  void (*getUVCoordinates)(const struct OpenSubdiv_Converter* converter,
-                           float* uvs_coordinates);
   // For the given face index and its corner (known as loop in Blender)
   // get corrsponding UV coordinate index.
   int (*getFaceCornerUVIndex)(const struct OpenSubdiv_Converter* converter,
diff --git a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
index 219d77a6c52..649b7c7fa4c 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf_opensubdiv_converter.c
@@ -389,12 +389,6 @@ static int conv_dm_get_num_uvs(const OpenSubdiv_Converter *converter)
 	return storage->num_uvs;
 }
 
-static void conv_dm_get_uvs(const OpenSubdiv_Converter *converter, float *uvs)
-{
-	ConvDMStorage *storage = converter->user_data;
-	memcpy(uvs, storage->uvs, sizeof(float) * 2 * storage->num_uvs);
-}
-
 static int conv_dm_get_face_corner_uv_index(const OpenSubdiv_Converter *converter,
                                             int face,
                                             int corner)
@@ -459,7 +453,6 @@ void ccgSubSurf_converter_setup_from_derivedmesh(
 	converter->precalcUVLayer = conv_dm_precalc_uv_layer;
 	converter->finishUVLayer = conv_dm_finish_uv_layer;
 	converter->getNumUVCoordinates = conv_dm_get_num_uvs;
-	converter->getUVCoordinates = conv_dm_get_uvs;
 	converter->getFaceCornerUVIndex = conv_dm_get_face_corner_uv_index;
 
 	user_data = MEM_mallocN(sizeof(ConvDMStorage), __func__);
@@ -702,11 +695,6 @@ static int conv_ccg_get_num_uvs(const OpenSubdiv_Converter *UNUSED(converter))
 	return 0;
 }
 
-static void conv_ccg_get_uvs(const OpenSubdiv_Converter * UNUSED(converter),
-                      float *UNUSED(uvs))
-{
-}
-
 static int conv_ccg_get_face_corner_uv_index(const OpenSubdiv_Converter *UNUSED(converter),
                                              int UNUSED(face),
                                              int UNUSED(corner_))
@@ -744,7 +732,6 @@ void ccgSubSurf_converter_setup_from_ccg(CCGSubSurf *ss,
 	converter->precalcUVLayer = conv_ccg_precalc_uv_layer;
 	converter->finishUVLayer = conv_ccg_finish_uv_layer;
 	converter->getNumUVCoordinates = conv_ccg_get_num_uvs;
-	converter->getUVCoordinates = conv_ccg_get_uvs;
 	converter->getFaceCornerUVIndex = conv_ccg_get_face_corner_uv_index;
 
 	converter->freeUserData = NULL;



More information about the Bf-blender-cvs mailing list