Changeset View
Changeset View
Standalone View
Standalone View
source/blender/bmesh/intern/bmesh_mesh_conv.c
| Context not available. | |||||
| CustomData_set_layer_name(&bm->ldata, CD_MLOOPUV, i, bm->pdata.layers[li].name); | CustomData_set_layer_name(&bm->ldata, CD_MLOOPUV, i, bm->pdata.layers[li].name); | ||||
| } | } | ||||
| if ((params->active_shapekey != 0) && (me->key != NULL)) { | if ((params->active_shapekey >= 0) && (me->key != NULL)) { | ||||
| actkey = BLI_findlink(&me->key->block, params->active_shapekey - 1); | actkey = BLI_findlink(&me->key->block, params->active_shapekey); | ||||
| } | } | ||||
| else { | else { | ||||
| actkey = NULL; | actkey = NULL; | ||||
| Context not available. | |||||
| const int cd_shape_keyindex_offset = CustomData_get_offset(&bm->vdata, CD_SHAPE_KEYINDEX); | const int cd_shape_keyindex_offset = CustomData_get_offset(&bm->vdata, CD_SHAPE_KEYINDEX); | ||||
| KeyBlock *currkey; | KeyBlock *currkey; | ||||
| KeyBlock *actkey = BLI_findlink(&me->key->block, bm->shapenr - 1); | KeyBlock *actkey = BLI_findlink(&me->key->block, bm->shapenr); | ||||
| float (*ofs)[3] = NULL; | float (*ofs)[3] = NULL; | ||||
| Context not available. | |||||
| * bmesh and the mesh are out of sync */ | * bmesh and the mesh are out of sync */ | ||||
| (oldverts != NULL)) /* not used here, but 'oldverts' is used later for applying 'ofs' */ | (oldverts != NULL)) /* not used here, but 'oldverts' is used later for applying 'ofs' */ | ||||
| { | { | ||||
| const bool act_is_basis = BKE_keyblock_is_basis(me->key, bm->shapenr - 1); | const bool act_is_basis = BKE_keyblock_is_basis(me->key, bm->shapenr); | ||||
| /* active key is a base */ | /* active key is a base */ | ||||
| if (act_is_basis && (cd_shape_keyindex_offset != -1)) { | if (act_is_basis && (cd_shape_keyindex_offset != -1)) { | ||||
| Context not available. | |||||
| } | } | ||||
| for (currkey = me->key->block.first; currkey; currkey = currkey->next) { | for (currkey = me->key->block.first; currkey; currkey = currkey->next) { | ||||
| const bool apply_offset = (ofs && (currkey != actkey) && (bm->shapenr - 1 == currkey->relative)); | const bool apply_offset = (ofs && (currkey != actkey) && (bm->shapenr == currkey->relative)); | ||||
| int cd_shape_offset; | int cd_shape_offset; | ||||
| int keyi; | int keyi; | ||||
| float (*ofs_pt)[3] = ofs; | float (*ofs_pt)[3] = ofs; | ||||
| Context not available. | |||||