diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-24 04:34:05 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-24 04:34:05 +0300 |
commit | 28e049cb3e32f41d294c3ad019b509dae80de83e (patch) | |
tree | 657211408c52600746f8aaf5a3b9ca7d1e54bad2 /source | |
parent | 20940c562d24eaf23d2b3d9edfd29afece4d727e (diff) |
== Multires ==
Fixed bug #5799, Multires mesh modifications get reset by rendering
This bug can cause some nasty data loss (was introduces with my commit for using orco with multires.) Fixed by making sure to do multires_update_levels before applying modifiers.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_bad_level_calls.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/bad_level_call_stubs/stubs.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bad_level_calls.h b/source/blender/blenkernel/BKE_bad_level_calls.h index 5c71fb6cf31..3c1a1c74821 100644 --- a/source/blender/blenkernel/BKE_bad_level_calls.h +++ b/source/blender/blenkernel/BKE_bad_level_calls.h @@ -202,6 +202,7 @@ struct MultiresLevel; struct MultiresLevel *multires_level_n(struct Multires *mr, int n); void multires_free(struct Multires *mr); void multires_set_level(void *ob, void *me_v); +void multires_update_levels(struct Mesh *me); void multires_calc_level_maps(struct MultiresLevel *lvl); struct Multires *multires_copy(struct Multires *orig); /* sculptmode.c */ diff --git a/source/blender/blenkernel/bad_level_call_stubs/stubs.c b/source/blender/blenkernel/bad_level_call_stubs/stubs.c index fc01086a48c..fb1d0e6215f 100644 --- a/source/blender/blenkernel/bad_level_call_stubs/stubs.c +++ b/source/blender/blenkernel/bad_level_call_stubs/stubs.c @@ -295,6 +295,7 @@ void post_server_add(void) {} struct MultiresLevel *multires_level_n(struct Multires *mr, int n) {return NULL;} void multires_free(struct Multires *mr) {} void multires_set_level(void *ob, void *me_v) {} +void multires_update_levels(struct Mesh *me) {} void multires_calc_level_maps(struct MultiresLevel *lvl) {} struct Multires *multires_copy(struct Multires *orig) {return NULL;} void sculptmode_init(struct Scene *sce) {} diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 62c1a5f613f..d2921cd9ea7 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2221,6 +2221,9 @@ float *multires_render_pin(Object *ob, Mesh *me, int *orig_lvl) if(me->mr) { MultiresLevel *lvl= NULL; int i; + + /* Make sure all mesh edits are properly stored in the multires data*/ + multires_update_levels(me); /* Copy the highest level of multires verts */ *orig_lvl= me->mr->current; |