Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-08-01 19:31:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-08-01 19:43:03 +0300
commit86270b60dbeab29b4dc7dd9b596bcf0d533639d0 (patch)
tree925fc9160014a5e8ed30b2d044cd51aefb41ce50 /source/blender/blenkernel/intern/subdiv_eval.c
parent5b3b0ed54f20fedcd4d5324c17f3d5ea39f6274f (diff)
Subsurf: Evaluate all UV layers
Before that it was only first UV layer which was properly evaluated, the rest were ignored. Now all layers are being properly handled.
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_eval.c')
-rw-r--r--source/blender/blenkernel/intern/subdiv_eval.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_eval.c b/source/blender/blenkernel/intern/subdiv_eval.c
index 0f928331724..fa9488f15b6 100644
--- a/source/blender/blenkernel/intern/subdiv_eval.c
+++ b/source/blender/blenkernel/intern/subdiv_eval.c
@@ -122,10 +122,11 @@ static void set_face_varying_data_from_uv(Subdiv *subdiv,
vertex_index < num_face_vertices;
vertex_index++, mluv++)
{
- evaluator->setFaceVaryingData(evaluator,
- mluv->uv,
- uv_indicies[vertex_index],
- 1);
+ evaluator->setFaceVaryingData(evaluator,
+ layer_index,
+ mluv->uv,
+ uv_indicies[vertex_index],
+ 1);
}
}
}
@@ -147,11 +148,6 @@ void BKE_subdiv_eval_update_from_mesh(Subdiv *subdiv, const Mesh *mesh)
const MLoopUV *mloopuv = CustomData_get_layer_n(
&mesh->ldata, CD_MLOOPUV, layer_index);
set_face_varying_data_from_uv(subdiv, mloopuv, layer_index);
- /* NOTE: Currently evaluator can only handle single face varying layer.
- * This is a limitation of C-API and some underlying helper classes from
- * our side which will get fixed.
- */
- break;
}
/* Update evaluator to the new coarse geometry. */
BKE_subdiv_stats_begin(&subdiv->stats, SUBDIV_STATS_EVALUATOR_REFINE);
@@ -223,12 +219,14 @@ void BKE_subdiv_eval_limit_point_and_short_normal(
void BKE_subdiv_eval_face_varying(
Subdiv *subdiv,
+ const int face_varying_channel,
const int ptex_face_index,
const float u, const float v,
float face_varying[2])
{
#ifdef WITH_OPENSUBDIV
subdiv->evaluator->evaluateFaceVarying(subdiv->evaluator,
+ face_varying_channel,
ptex_face_index,
u, v,
face_varying);