diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
commit | f7cb86df3a9ceccc4d649e42735732a608169157 (patch) | |
tree | 558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/blender/editors/mesh/editface.c | |
parent | 74f9e98c828c17910405092785633373d4ae88e8 (diff) |
2.5
Think global, act local!
The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.
Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
meant for permanent, but it can probably stick there until we
cleaned the anim system and depsgraph to cope better with
timing issues.
- Game engine G.scene should become an argument for staring it.
Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
is too tightly wrapped to do it easily.
Diffstat (limited to 'source/blender/editors/mesh/editface.c')
-rw-r--r-- | source/blender/editors/mesh/editface.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 61bfc8b8a0f..a572013e849 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -623,11 +623,13 @@ MTFace *get_active_mtface(EditMesh *em, EditFace **act_efa, MCol **mcol, int slo return NULL; } -void make_tfaces(Mesh *me) +static void make_tfaces(Object *ob) { + Mesh *me= ob->data; + if(!me->mtface) { if(me->mr) { - multires_add_layer(me, &me->mr->fdata, CD_MTFACE, + multires_add_layer(ob, &me->mr->fdata, CD_MTFACE, CustomData_number_of_layers(&me->fdata, CD_MTFACE)); } else { @@ -1312,7 +1314,7 @@ void set_texturepaint(Scene *scene) /* toggle */ G.f |= G_TEXTUREPAINT; if(me->mtface==NULL) - make_tfaces(me); + make_tfaces(ob); brush_check_exists(&scene->toolsettings->imapaint.brush); GPU_paint_set_mipmap(0); @@ -1373,9 +1375,9 @@ static void texpaint_tri_weights(Object *ob, float *v1, float *v2, float *v3, fl } /* compute uv coordinates of mouse in face */ -void texpaint_pick_uv(Object *ob, Mesh *mesh, unsigned int faceindex, short *xy, float *uv) +void texpaint_pick_uv(Scene *scene, Object *ob, Mesh *mesh, unsigned int faceindex, short *xy, float *uv) { - DerivedMesh *dm = mesh_get_derived_final(ob, CD_MASK_BAREMESH); + DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); int *index = dm->getFaceDataArray(dm, CD_ORIGINDEX); MTFace *tface = dm->getFaceDataArray(dm, CD_MTFACE), *tf; int numfaces = dm->getNumFaces(dm), a; |