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:
Diffstat (limited to 'intern/cycles/app/cycles_xml.cpp')
-rw-r--r--intern/cycles/app/cycles_xml.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 55a2a30b9a8..df187f046e5 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -703,15 +703,14 @@ static void xml_read_mesh(const XMLReadState& state, pugi::xml_node node)
}
/* finalize subd mesh */
- sdmesh.link_boundary();
-
- /* subdivide */
- DiagSplit dsplit;
- //dsplit.camera = state.scene->camera;
- //dsplit.dicing_rate = 5.0f;
- dsplit.dicing_rate = state.dicing_rate;
- xml_read_float(&dsplit.dicing_rate, node, "dicing_rate");
- sdmesh.tessellate(&dsplit, false, mesh, shader, smooth);
+ sdmesh.finish();
+
+ /* parameters */
+ SubdParams sdparams(mesh, shader, smooth);
+ xml_read_float(&sdparams.dicing_rate, node, "dicing_rate");
+
+ DiagSplit dsplit(sdparams);;
+ sdmesh.tessellate(&dsplit);
}
else {
/* create vertices */
@@ -789,12 +788,11 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node)
mesh->used_shaders.push_back(state.shader);
/* split */
- DiagSplit dsplit;
- //dsplit.camera = state.scene->camera;
- //dsplit.dicing_rate = 5.0f;
- dsplit.dicing_rate = state.dicing_rate;
- xml_read_float(&dsplit.dicing_rate, node, "dicing_rate");
- dsplit.split_quad(mesh, patch, state.shader, state.smooth);
+ SubdParams sdparams(mesh, state.shader, state.smooth);
+ xml_read_float(&sdparams.dicing_rate, node, "dicing_rate");
+
+ DiagSplit dsplit(sdparams);
+ dsplit.split_quad(patch);
delete patch;