Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
commitcd972535027a73ba70069051fe9038b6a8b5696a (patch)
treeb50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/editors/render/render_shading.c
parentaca76ddb502cbf0ee7888c3356f9f35240919410 (diff)
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r--source/blender/editors/render/render_shading.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 16bdaae2bf5..41aace4e0a7 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -735,12 +735,12 @@ 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;
short act;
int type= RNA_enum_get(op->ptr, "type");
+ struct AnimData *adt= BKE_animdata_from_id(id);
give_active_mtex(id, &mtex_ar, &act);
@@ -750,9 +750,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
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);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act-1, -1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
if(GS(id->name)==ID_MA) {
Material *ma= (Material *)id;
@@ -772,9 +772,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
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);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act+1, -1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
if(GS(id->name)==ID_MA) {
Material *ma= (Material *)id;