~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/intern/object_deform.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        GHash *gh;
74
74
        int i, step1 = 1;
75
75
        //int defbase_tot = BLI_countlist(&ob->defbase);
 
76
        VirtualModifierData virtualModifierData;
76
77
 
77
78
        if (ob->defbase.first == NULL) {
78
79
                return NULL;
79
80
        }
80
81
 
81
 
        gh = BLI_ghash_str_new("BKE_objdef_validmap_get gh");
 
82
        gh = BLI_ghash_str_new_ex("BKE_objdef_validmap_get gh", defbase_tot);
82
83
 
83
84
        /* add all names to a hash table */
84
85
        for (dg = ob->defbase.first; dg; dg = dg->next) {
88
89
        BLI_assert(BLI_ghash_size(gh) == defbase_tot);
89
90
 
90
91
        /* now loop through the armature modifiers and identify deform bones */
91
 
        for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob) : md->next) {
 
92
        for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob, &virtualModifierData) : md->next) {
92
93
                if (!(md->mode & (eModifierMode_Realtime | eModifierMode_Virtual)))
93
94
                        continue;
94
95
 
100
101
                                bPoseChannel *chan;
101
102
 
102
103
                                for (chan = pose->chanbase.first; chan; chan = chan->next) {
 
104
                                        void **val_p;
103
105
                                        if (chan->bone->flag & BONE_NO_DEFORM)
104
106
                                                continue;
105
107
 
106
 
                                        if (BLI_ghash_remove(gh, chan->name, NULL, NULL)) {
107
 
                                                BLI_ghash_insert(gh, chan->name, SET_INT_IN_POINTER(1));
 
108
                                        val_p = BLI_ghash_lookup_p(gh, chan->name);
 
109
                                        if (val_p) {
 
110
                                                *val_p = SET_INT_IN_POINTER(1);
108
111
                                        }
109
112
                                }
110
113
                        }