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

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
{
99
99
        bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose, bonename);
100
100
        if (pchan) {
101
 
                mult_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
 
101
                mul_m4_m4m4(mat, ob->obmat, pchan->pose_mat);
102
102
        }
103
103
        else {
104
104
                copy_m4_m4(mat, ob->obmat);
105
105
        }
106
106
}
107
107
 
108
 
#define OMP_LIMIT 1000
 
108
#ifdef _OPENMP
 
109
#  define OMP_LIMIT 1000
 
110
#endif
 
111
 
109
112
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
110
113
                                  DerivedMesh *dm,
111
114
                                  ModifierApplyFlag UNUSED(flag))
139
142
        matrix_from_obj_pchan(mat_dst, umd->object_dst, umd->bone_dst);
140
143
 
141
144
        invert_m4_m4(imat_dst, mat_dst);
142
 
        mult_m4_m4m4(warp_mat, imat_dst, mat_src);
 
145
        mul_m4_m4m4(warp_mat, imat_dst, mat_src);
143
146
 
144
147
        /* apply warp */
145
148
        if (!is_zero_v2(umd->center)) {
152
155
 
153
156
                invert_m4_m4(imat_cent, mat_cent);
154
157
 
155
 
                mult_m4_m4m4(warp_mat, warp_mat, imat_cent);
156
 
                mult_m4_m4m4(warp_mat, mat_cent, warp_mat);
 
158
                mul_m4_m4m4(warp_mat, warp_mat, imat_cent);
 
159
                mul_m4_m4m4(warp_mat, mat_cent, warp_mat);
157
160
        }
158
161
 
159
162
        /* make sure we're using an existing layer */
201
204
        return dm;
202
205
}
203
206
 
204
 
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
205
 
                                    struct BMEditMesh *UNUSED(editData),
206
 
                                    DerivedMesh *derivedData)
207
 
{
208
 
        return applyModifier(md, ob, derivedData, MOD_APPLY_USECACHE);
209
 
}
210
 
 
211
207
static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData)
212
208
{
213
209
        UVWarpModifierData *umd = (UVWarpModifierData *) md;
254
250
        /* deformVertsEM */     NULL,
255
251
        /* deformMatricesEM */  NULL,
256
252
        /* applyModifier */     applyModifier,
257
 
        /* applyModifierEM */   applyModifierEM,
 
253
        /* applyModifierEM */   NULL,
258
254
        /* initData */          initData,
259
255
        /* requiredDataMask */  requiredDataMask,
260
256
        /* freeData */          NULL,