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:
authorDalai Felinto <dfelinto@gmail.com>2017-02-14 18:33:13 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-02-14 20:21:47 +0300
commit7e3d2a8baaca06965ee6a244ef124bc33c92b693 (patch)
tree8d55158df280c41cab13a0c23620c1e08b0b19ed /source/blender/editors/render/render_preview.c
parenta76d45cf721db03a88583b660fa2926aefd5fdd8 (diff)
Sorted BaseLegacy > Base convertions
Including bring back UV Edit show other objects
Diffstat (limited to 'source/blender/editors/render/render_preview.c')
-rw-r--r--source/blender/editors/render/render_preview.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index cb54f0efd85..b4c92ef0f9a 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -69,6 +69,7 @@
#include "BKE_image.h"
#include "BKE_icons.h"
#include "BKE_lamp.h"
+#include "BKE_layer.h"
#include "BKE_library.h"
#include "BKE_library_remap.h"
#include "BKE_main.h"
@@ -358,29 +359,33 @@ static Scene *preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_ty
/* this only works in a specific case where the preview.blend contains
* an object starting with 'c' which has a material linked to it (not the obdata)
* and that material has a fake shadow texture in the active texture slot */
- for (base = sce->base.first; base; base = base->next) {
- if (base->object->id.name[2] == 'c') {
- Material *shadmat = give_current_material(base->object, base->object->actcol);
+ FOREACH_SCENE_OBJECT(sce, ob)
+ {
+ if (ob->id.name[2] == 'c') {
+ Material *shadmat = give_current_material(ob, ob->actcol);
if (shadmat) {
if (mat->mode2 & MA_CASTSHADOW) shadmat->septex = 0;
else shadmat->septex |= 1;
}
}
}
+ FOREACH_SCENE_OBJECT_END
/* turn off bounce lights for volume,
* doesn't make much visual difference and slows it down too */
- for (base = sce->base.first; base; base = base->next) {
- if (base->object->type == OB_LAMP) {
+ FOREACH_SCENE_OBJECT(sce, ob)
+ {
+ if (ob->type == OB_LAMP) {
/* if doesn't match 'Lamp.002' --> main key light */
- if (!STREQ(base->object->id.name + 2, "Lamp.002")) {
+ if (!STREQ(ob->id.name + 2, "Lamp.002")) {
if (mat->material_type == MA_TYPE_VOLUME)
- base->object->restrictflag |= OB_RESTRICT_RENDER;
+ ob->restrictflag |= OB_RESTRICT_RENDER;
else
- base->object->restrictflag &= ~OB_RESTRICT_RENDER;
+ ob->restrictflag &= ~OB_RESTRICT_RENDER;
}
}
}
+ FOREACH_SCENE_OBJECT_END
}
else {
/* use current scene world to light sphere */