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>2012-01-03 06:16:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-03 06:16:52 +0400
commitc0eec8f379bb0c265e7bf2ad74397c22836bae3c (patch)
tree6502b4e6eaf44a848bebe6406aacd825738877d9 /source/blender/editors/render/render_shading.c
parent68c4368001db49bd3daab96352ca3b4fb7d04e1c (diff)
parent84437bb5e9342e67f448e26adb0c4b0811f3ef5c (diff)
svn merge ^/trunk/blender -r43062:43085
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r--source/blender/editors/render/render_shading.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index ba73bbdf31e..a9025b8cdfc 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -74,6 +74,7 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_object.h"
#include "ED_curve.h"
#include "ED_mesh.h"
#include "ED_node.h"
@@ -92,7 +93,7 @@
static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob= ED_object_context(C);
if(!ob)
return OPERATOR_CANCELLED;
@@ -121,7 +122,7 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot)
static int material_slot_remove_exec(bContext *C, wmOperator *op)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob= ED_object_context(C);
if(!ob)
return OPERATOR_CANCELLED;
@@ -157,7 +158,7 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot)
static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob= ED_object_context(C);
if(!ob)
return OPERATOR_CANCELLED;
@@ -219,7 +220,7 @@ void OBJECT_OT_material_slot_assign(wmOperatorType *ot)
static int material_slot_de_select(bContext *C, int select)
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob= ED_object_context(C);
if(!ob)
return OPERATOR_CANCELLED;
@@ -322,7 +323,7 @@ void OBJECT_OT_material_slot_deselect(wmOperatorType *ot)
static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ Object *ob= ED_object_context(C);
Material ***matar;
if(!ob || !(matar= give_matarar(ob)))