Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_preview.c
| Show First 20 Lines • Show All 298 Lines • ▼ Show 20 Lines | if (STREQ(lc->collection->id.name + 2, collection_name)) { | ||||
| lc->collection->flag &= ~COLLECTION_RESTRICT_RENDER; | lc->collection->flag &= ~COLLECTION_RESTRICT_RENDER; | ||||
| } | } | ||||
| else { | else { | ||||
| lc->collection->flag |= COLLECTION_RESTRICT_RENDER; | lc->collection->flag |= COLLECTION_RESTRICT_RENDER; | ||||
| } | } | ||||
| } | } | ||||
| /* Hide floor for icon renders. */ | /* Hide floor for icon renders. */ | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| if (STREQ(base->object->id.name + 2, "Floor")) { | if (STREQ(base->object->id.name + 2, "Floor")) { | ||||
| if (pr_method == PR_ICON_RENDER) { | if (pr_method == PR_ICON_RENDER) { | ||||
| base->object->restrictflag |= OB_RESTRICT_RENDER; | base->object->restrictflag |= OB_RESTRICT_RENDER; | ||||
| } | } | ||||
| else { | else { | ||||
| base->object->restrictflag &= ~OB_RESTRICT_RENDER; | base->object->restrictflag &= ~OB_RESTRICT_RENDER; | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Lines | if (id_type == ID_MA) { | ||||
| BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, true); | BKE_node_preview_init_tree(origmat->nodetree, sp->sizex, sp->sizey, true); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| sce->display.render_aa = SCE_DISPLAY_AA_OFF; | sce->display.render_aa = SCE_DISPLAY_AA_OFF; | ||||
| } | } | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| if (base->object->id.name[2] == 'p') { | if (base->object->id.name[2] == 'p') { | ||||
| /* copy over object color, in case material uses it */ | /* copy over object color, in case material uses it */ | ||||
| copy_v4_v4(base->object->color, sp->color); | copy_v4_v4(base->object->color, sp->color); | ||||
| if (OB_TYPE_SUPPORT_MATERIAL(base->object->type)) { | if (OB_TYPE_SUPPORT_MATERIAL(base->object->type)) { | ||||
| /* don't use BKE_object_material_assign, it changed mat->id.us, which shows in the UI | /* don't use BKE_object_material_assign, it changed mat->id.us, which shows in the UI | ||||
| */ | */ | ||||
| Material ***matar = BKE_object_material_array_p(base->object); | Material ***matar = BKE_object_material_array_p(base->object); | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | else if (id_type == ID_LA) { | ||||
| if (sce->world) { | if (sce->world) { | ||||
| /* Only use lighting from the light. */ | /* Only use lighting from the light. */ | ||||
| sce->world->use_nodes = false; | sce->world->use_nodes = false; | ||||
| sce->world->horr = 0.0f; | sce->world->horr = 0.0f; | ||||
| sce->world->horg = 0.0f; | sce->world->horg = 0.0f; | ||||
| sce->world->horb = 0.0f; | sce->world->horb = 0.0f; | ||||
| } | } | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| if (base->object->id.name[2] == 'p') { | if (base->object->id.name[2] == 'p') { | ||||
| if (base->object->type == OB_LAMP) { | if (base->object->type == OB_LAMP) { | ||||
| base->object->data = la; | base->object->data = la; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (la && la->nodetree && sp->pr_method == PR_NODE_RENDER) { | if (la && la->nodetree && sp->pr_method == PR_NODE_RENDER) { | ||||
| ▲ Show 20 Lines • Show All 960 Lines • Show Last 20 Lines | |||||