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:
authorNicholas Bishop <nicholasbishop@gmail.com>2008-07-12 07:30:49 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2008-07-12 07:30:49 +0400
commita8262c64a89a54e197511a8d7bf6df9eb8b257b9 (patch)
tree4e12042e8dffc618c81407b4a12cc7764b08823f /source/blender/src
parent4422ab412273778d4fd819b268c12ece9b0d200f (diff)
* Turned off multires updates if mode isn't sculptmode
* Changed displacement matrices so that edges of faces deform more smoothly * Force a displacement update on leaving sculptmode
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/sculptmode.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source/blender/src/sculptmode.c b/source/blender/src/sculptmode.c
index 29102631bdf..7b55893fa40 100644
--- a/source/blender/src/sculptmode.c
+++ b/source/blender/src/sculptmode.c
@@ -65,6 +65,7 @@
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
+#include "BKE_multires.h"
#include "BKE_sculpt.h"
#include "BKE_texture.h"
#include "BKE_utildefines.h"
@@ -112,13 +113,6 @@
*
*/
-/* Used by vertex_users to store face indices in a list */
-typedef struct IndexNode {
- struct IndexNode* next,* prev;
- int Index;
-} IndexNode;
-
-
/* ActiveData stores an Index into the mvert array of Mesh, plus Fade, which
stores how far the vertex is from the brush center, scaled to the range [0,1]. */
typedef struct ActiveData {
@@ -234,7 +228,7 @@ void calc_vertex_users()
/* Find the users */
for(i=0; i<ss->totface; ++i){
for(j=0; j<(ss->mface[i].v4?4:3); ++j, ++node) {
- node->Index=i;
+ node->index=i;
BLI_addtail(&ss->vertex_users[((unsigned int*)(&ss->mface[i]))[j]], node);
}
}
@@ -525,7 +519,7 @@ vec3f neighbor_average(SculptSession *ss, const int vert)
}
while(node){
- f= &ss->mface[node->Index];
+ f= &ss->mface[node->index];
if(f->v4) {
skip= (f->v1==vert?2:
@@ -1114,8 +1108,8 @@ void update_damaged_vert(ListBase *lb, BrushAction *a)
while(face){
float *fn = NULL;
if(ss->face_normals)
- fn = &ss->face_normals[face->Index*3];
- add_face_normal(&norm, ss->mvert, &ss->mface[face->Index], fn);
+ fn = &ss->face_normals[face->index*3];
+ add_face_normal(&norm, ss->mvert, &ss->mface[face->index], fn);
face= face->next;
}
Normalize(&norm.x);
@@ -1863,13 +1857,16 @@ void sculpt_undo_push(const short brush_type)
void set_sculptmode(void)
{
if(G.f & G_SCULPTMODE) {
- Mesh *me= get_mesh(OBACT);
+ Object *ob = OBACT;
+ Mesh *me= get_mesh(ob);
+
+ multires_force_update(ob);
G.f &= ~G_SCULPTMODE;
sculptsession_free(G.scene);
if(me && me->pv)
- mesh_pmv_off(OBACT, me);
+ mesh_pmv_off(ob, me);
}
else {
G.f |= G_SCULPTMODE;