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>2010-05-13 23:23:52 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2010-05-13 23:23:52 +0400
commitd8856352164d1118f46eae59a60bf1c0abb36516 (patch)
treef747f6faf4554ff6aa83574af5bd7759392b55dc /source/blender/modifiers
parentdffa42e636124032fcbadabc912a55b03afca973 (diff)
Fix #22137: Shrink wrap modifer with curves, projection bug
Always pack DispList into one block for deformation modifiers and create DerivedMesh for all curve objects passed to get_dm. This would fix problems with modifiers when they're creating dm for additional information (as it's made in shrinkwrap for normals). Small additional code cleanup in curve_calc_modifiers_post().
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_util.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 7cae7f634c7..24b907dcfa8 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -117,30 +117,6 @@ DerivedMesh *get_cddm(struct Scene *scene, Object *ob, struct EditMesh *em, Deri
return dm;
}
-
-static int is_last_displist(Object *ob)
-{
- Curve *cu = ob->data;
- static int curvecount=0, totcurve=0;
-
- if(curvecount == 0){
- DispList *dl;
-
- totcurve = 0;
- for(dl=cu->disp.first; dl; dl=dl->next)
- totcurve++;
- }
-
- curvecount++;
-
- if(curvecount == totcurve){
- curvecount = 0;
- return 1;
- }
-
- return 0;
-}
-
/* returns a derived mesh if dm == NULL, for deforming modifiers that need it */
DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int orco)
{
@@ -160,9 +136,7 @@ DerivedMesh *get_dm(struct Scene *scene, Object *ob, struct EditMesh *em, Derive
DM_add_vert_layer(dm, CD_ORCO, CD_ASSIGN, get_mesh_orco_verts(ob));
}
else if(ELEM3(ob->type,OB_FONT,OB_CURVE,OB_SURF)) {
- if(is_last_displist(ob)) {
- dm= CDDM_from_curve(ob);
- }
+ dm= CDDM_from_curve(ob);
}
return dm;