Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_shapekey.c
| Context not available. | |||||
| if ((kb = BKE_object_shapekey_insert(ob, NULL, from_mix))) { | if ((kb = BKE_object_shapekey_insert(ob, NULL, from_mix))) { | ||||
| Key *key = BKE_key_from_object(ob); | Key *key = BKE_key_from_object(ob); | ||||
| /* for absolute shape keys, new keys may not be added last */ | /* for absolute shape keys, new keys may not be added last */ | ||||
| ob->shapenr = BLI_findindex(&key->block, kb) + 1; | ob->shapenr = BLI_findindex(&key->block, kb); | ||||
| WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); | WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); | ||||
| } | } | ||||
| Context not available. | |||||
| return false; | return false; | ||||
| } | } | ||||
| kb = BLI_findlink(&key->block, ob->shapenr - 1); | kb = BLI_findlink(&key->block, ob->shapenr); | ||||
| if (kb) { | if (kb) { | ||||
| return BKE_object_shapekey_remove(bmain, ob, kb); | return BKE_object_shapekey_remove(bmain, ob, kb); | ||||
| } | } | ||||
| Context not available. | |||||
| if (key == NULL) | if (key == NULL) | ||||
| return 0; | return 0; | ||||
| kb = BLI_findlink(&key->block, ob->shapenr - 1); | kb = BLI_findlink(&key->block, ob->shapenr); | ||||
| if (kb) { | if (kb) { | ||||
| char *tag_elem = MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror"); | char *tag_elem = MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror"); | ||||
| Context not available. | |||||
| Key *key = BKE_key_from_object(ob); | Key *key = BKE_key_from_object(ob); | ||||
| const int type = RNA_enum_get(op->ptr, "type"); | const int type = RNA_enum_get(op->ptr, "type"); | ||||
| const int totkey = key->totkey; | const int totkey = key->totkey; | ||||
| const int act_index = ob->shapenr - 1; | const int act_index = ob->shapenr; | ||||
| int new_index; | int new_index; | ||||
| switch (type) { | switch (type) { | ||||
| Context not available. | |||||