Cycles: svn merge -r41467:41531 ^/trunk/blender
[blender.git] / source / blender / editors / space_view3d / view3d_draw.c
index aa69e7121e0d35aec6fba55236aa7100a671b229..a8cb436a942802af0b2152fffc7e69df76d437ed 100644 (file)
@@ -2190,11 +2190,18 @@ CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d)
 {
        CustomDataMask mask= 0;
 
-       if((v3d->drawtype == OB_TEXTURE) || ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) {
+       if(ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) || ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) {
                mask |= CD_MASK_MTFACE | CD_MASK_MCOL;
 
-               if(scene->gm.matmode == GAME_MAT_GLSL)
-                       mask |= CD_MASK_ORCO;
+               if(scene_use_new_shading_nodes(scene)) {
+                       /* todo: use orco in textured draw mode */
+                       if(v3d->drawtype == OB_MATERIAL)
+                               mask |= CD_MASK_ORCO;
+               }
+               else {
+                       if(scene->gm.matmode == GAME_MAT_GLSL)
+                               mask |= CD_MASK_ORCO;
+               }
        }
 
        return mask;