~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/modifiers/intern/MOD_build.c

  • Committer: Reinhard Tartler
  • Date: 2014-05-31 01:50:05 UTC
  • mfrom: (14.2.27 sid)
  • Revision ID: siretart@tauware.de-20140531015005-ml6druahuj82nsav
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
static void copyData(ModifierData *md, ModifierData *target)
64
64
{
 
65
#if 0
65
66
        BuildModifierData *bmd = (BuildModifierData *) md;
66
67
        BuildModifierData *tbmd = (BuildModifierData *) target;
67
 
 
68
 
        tbmd->start = bmd->start;
69
 
        tbmd->length = bmd->length;
70
 
        tbmd->randomize = bmd->randomize;
71
 
        tbmd->seed = bmd->seed;
 
68
#endif
 
69
        modifier_copyData_generic(md, target);
72
70
}
73
71
 
74
72
static bool dependsOnTime(ModifierData *UNUSED(md))
121
119
 
122
120
        frac = (BKE_scene_frame_get(md->scene) - bmd->start) / bmd->length;
123
121
        CLAMP(frac, 0.0f, 1.0f);
124
 
 
 
122
        
 
123
        if (bmd->flag & MOD_BUILD_FLAG_REVERSE) {
 
124
                frac = 1.0f - frac;
 
125
        }
 
126
        
125
127
        numFaces_dst = numPoly_src * frac;
126
128
        numEdges_dst = numEdge_src * frac;
127
129
 
131
133
                MLoop *ml, *mloop;
132
134
                MEdge *medge;
133
135
                
134
 
                if (bmd->randomize) {
 
136
                if (bmd->flag & MOD_BUILD_FLAG_RANDOMIZE) {
135
137
                        BLI_array_randomize(faceMap, sizeof(*faceMap),
136
138
                                            numPoly_src, bmd->seed);
137
139
                }
176
178
        else if (numEdges_dst) {
177
179
                MEdge *medge, *me;
178
180
 
179
 
                if (bmd->randomize)
 
181
                if (bmd->flag & MOD_BUILD_FLAG_RANDOMIZE)
180
182
                        BLI_array_randomize(edgeMap, sizeof(*edgeMap),
181
183
                                            numEdge_src, bmd->seed);
182
184
 
209
211
        else {
210
212
                int numVerts = numVert_src * frac;
211
213
 
212
 
                if (bmd->randomize) {
 
214
                if (bmd->flag & MOD_BUILD_FLAG_RANDOMIZE) {
213
215
                        BLI_array_randomize(vertMap, sizeof(*vertMap),
214
216
                                            numVert_src, bmd->seed);
215
217
                }