diff options
author | Matt Ebb <matt@mke3.net> | 2010-03-16 10:44:57 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-03-16 10:44:57 +0300 |
commit | dc5945e7f0f5d7e85f9ff1dfbb5f762f45cf3509 (patch) | |
tree | 583df6597ca1ba7c1f66c768515e105bfe5a227a /source/blender/editors | |
parent | ea4a987fd424de77465f1a2cd95a655ccf42fd31 (diff) |
Fix [#21165] Moved textures don't move the animation curves
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/armature/editarmature.c | 2 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 13 |
2 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 3f26a146c53..b4666923a03 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5540,7 +5540,7 @@ void ED_armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep) // TODO: should we be using the database wide version instead (since drivers may break) if (ob->adt) { /* posechannels only... */ - BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname); + BKE_animdata_fix_paths_rename(&ob->id, ob->adt, "pose.bones", oldname, newname, 0, 0, 1); } } } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 91655855a61..d7f3436713c 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -697,6 +697,7 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot) static int texture_slot_move(bContext *C, wmOperator *op) { ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; + Material *ma = (Material *)id; if(id) { MTex **mtex_ar, *mtexswap; @@ -710,6 +711,10 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtexswap = mtex_ar[act]; mtex_ar[act] = mtex_ar[act-1]; mtex_ar[act-1] = mtexswap; + + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act-1, -1, 0); + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act-1, 0); + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0); if(GS(id->name)==ID_MA) { Material *ma= (Material *)id; @@ -719,7 +724,7 @@ static int texture_slot_move(bContext *C, wmOperator *op) ma->septex &= ~(1<<(act-1)); ma->septex |= mtexuse >> 1; } - + set_active_mtex(id, act-1); } } @@ -728,6 +733,10 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtexswap = mtex_ar[act]; mtex_ar[act] = mtex_ar[act+1]; mtex_ar[act+1] = mtexswap; + + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act+1, -1, 0); + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act+1, 0); + BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0); if(GS(id->name)==ID_MA) { Material *ma= (Material *)id; @@ -737,7 +746,7 @@ static int texture_slot_move(bContext *C, wmOperator *op) ma->septex &= ~(1<<(act+1)); ma->septex |= mtexuse << 1; } - + set_active_mtex(id, act+1); } } |