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>2013-06-20 17:27:48 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-06-20 17:27:48 +0400
commitf35264706a403a666e7f3077c4b807bd1aaa3765 (patch)
tree0da658570dec1e9a97c6c109076b666e448ce44c /source/blender/blenkernel/intern/mesh.c
parent70212510438fdb1494892b8f75b59cd018b47d5b (diff)
Construct orco UV layer for curve when applying constructive modifier
Also construct orco uv layer when converting curve to a mesh. This makes it possible to preserve automatically generated coordinates ("use uv for mapping" option) when using constructive modifiers or converting curve to the mesh. With cycles nothing special is needed to preserve texture mapping after such operations, in blender internal you'll need to change texture mapping from Generated to UV. This feature is useful on it's own and also would help in potential switch 3d viewport to always use DM to draw objects, which would help making drawing more thread-safe.
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r--source/blender/blenkernel/intern/mesh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 7d728aad9cd..aeb1538ccf0 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -1636,7 +1636,10 @@ void BKE_mesh_from_nurbs_displist(Object *ob, ListBase *dispbase, const bool use
void BKE_mesh_from_nurbs(Object *ob)
{
- BKE_mesh_from_nurbs_displist(ob, &ob->disp, false);
+ Curve *cu = (Curve *) ob->data;
+ bool use_orco_uv = (cu->flag & CU_UV_ORCO) != 0;
+
+ BKE_mesh_from_nurbs_displist(ob, &ob->disp, use_orco_uv);
}
typedef struct EdgeLink {