~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/editors/util/crazyspace.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
187
187
        em->bm->elem_index_dirty |= BM_VERT;
188
188
 
189
189
        MEM_freeN(vert_table);
190
 
#if 0
191
 
        BMEditVert *eve, *prev;
192
 
        BMEditFace *efa;
193
 
        BMIter iter;
194
 
        float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4;
195
 
        intptr_t index = 0;
196
 
 
197
 
        /* two abused locations in vertices */
198
 
        for (eve = em->verts.first; eve; eve = eve->next, index++) {
199
 
                eve->tmp.p = NULL;
200
 
                eve->prev = (EditVert *)index;
201
 
        }
202
 
 
203
 
        /* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */
204
 
        for (efa = em->faces.first; efa; efa = efa->next) {
205
 
 
206
 
                /* retrieve mapped coordinates */
207
 
                v1 = mappedcos + 3 * (intptr_t)(efa->v1->prev);
208
 
                v2 = mappedcos + 3 * (intptr_t)(efa->v2->prev);
209
 
                v3 = mappedcos + 3 * (intptr_t)(efa->v3->prev);
210
 
 
211
 
                co1 = (origcos) ? origcos + 3 * (intptr_t)(efa->v1->prev) : efa->v1->co;
212
 
                co2 = (origcos) ? origcos + 3 * (intptr_t)(efa->v2->prev) : efa->v2->co;
213
 
                co3 = (origcos) ? origcos + 3 * (intptr_t)(efa->v3->prev) : efa->v3->co;
214
 
 
215
 
                if (efa->v2->tmp.p == NULL && efa->v2->f1) {
216
 
                        set_crazy_vertex_quat(quats, co2, co3, co1, v2, v3, v1);
217
 
                        efa->v2->tmp.p = (void *)quats;
218
 
                        quats += 4;
219
 
                }
220
 
 
221
 
                if (efa->v4) {
222
 
                        v4 = mappedcos + 3 * (intptr_t)(efa->v4->prev);
223
 
                        co4 = (origcos) ? origcos + 3 * (intptr_t)(efa->v4->prev) : efa->v4->co;
224
 
 
225
 
                        if (efa->v1->tmp.p == NULL && efa->v1->f1) {
226
 
                                set_crazy_vertex_quat(quats, co1, co2, co4, v1, v2, v4);
227
 
                                efa->v1->tmp.p = (void *)quats;
228
 
                                quats += 4;
229
 
                        }
230
 
                        if (efa->v3->tmp.p == NULL && efa->v3->f1) {
231
 
                                set_crazy_vertex_quat(quats, co3, co4, co2, v3, v4, v2);
232
 
                                efa->v3->tmp.p = (void *)quats;
233
 
                                quats += 4;
234
 
                        }
235
 
                        if (efa->v4->tmp.p == NULL && efa->v4->f1) {
236
 
                                set_crazy_vertex_quat(quats, co4, co1, co3, v4, v1, v3);
237
 
                                efa->v4->tmp.p = (void *)quats;
238
 
                                quats += 4;
239
 
                        }
240
 
                }
241
 
                else {
242
 
                        if (efa->v1->tmp.p == NULL && efa->v1->f1) {
243
 
                                set_crazy_vertex_quat(quats, co1, co2, co3, v1, v2, v3);
244
 
                                efa->v1->tmp.p = (void *)quats;
245
 
                                quats += 4;
246
 
                        }
247
 
                        if (efa->v3->tmp.p == NULL && efa->v3->f1) {
248
 
                                set_crazy_vertex_quat(quats, co3, co1, co2, v3, v1, v2);
249
 
                                efa->v3->tmp.p = (void *)quats;
250
 
                                quats += 4;
251
 
                        }
252
 
                }
253
 
        }
254
 
 
255
 
        /* restore abused prev pointer */
256
 
        for (prev = NULL, eve = em->verts.first; eve; prev = eve, eve = eve->next)
257
 
                eve->prev = prev;
258
 
#endif
259
190
}
260
191
 
261
192
/* BMESH_TODO - use MPolys over MFace's */
457
388
                                if (mti->deformMatrices && !deformed)
458
389
                                        continue;
459
390
 
460
 
                                mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0, 0);
 
391
                                mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0);
461
392
                                deformed = 1;
462
393
                        }
463
394
                }
478
409
                MEM_freeN(quats);
479
410
        }
480
411
 
481
 
        if (!*deformmats) {
 
412
        if (*deformmats == NULL) {
482
413
                int a, numVerts;
483
414
                Mesh *me = (Mesh *)ob->data;
484
415