Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_internal.c
| Show First 20 Lines • Show All 791 Lines • ▼ Show 20 Lines | static void clean_viewport_memory(Main *bmain, Scene *scene) | ||||
| Object *object; | Object *object; | ||||
| Scene *sce_iter; | Scene *sce_iter; | ||||
| Base *base; | Base *base; | ||||
| for (object = bmain->object.first; object; object = object->id.next) { | for (object = bmain->object.first; object; object = object->id.next) { | ||||
| object->id.tag |= LIB_TAG_DOIT; | object->id.tag |= LIB_TAG_DOIT; | ||||
| } | } | ||||
| for (SETLOOPER(scene, sce_iter, base)) { | for (SETLOOPER(scene, NULL, sce_iter, base)) { | ||||
| if ((base->flag & BASE_VISIBLED) == 0) { | if ((base->flag & BASE_VISIBLED) == 0) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| if (RE_allow_render_generic_object(base->object)) { | if (RE_allow_render_generic_object(base->object)) { | ||||
| base->object->id.tag &= ~LIB_TAG_DOIT; | base->object->id.tag &= ~LIB_TAG_DOIT; | ||||
| } | } | ||||
| } | } | ||||
| for (SETLOOPER(scene, sce_iter, base)) { | for (SETLOOPER(scene, NULL, sce_iter, base)) { | ||||
| object = base->object; | object = base->object; | ||||
| if ((object->id.tag & LIB_TAG_DOIT) == 0) { | if ((object->id.tag & LIB_TAG_DOIT) == 0) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| object->id.tag &= ~LIB_TAG_DOIT; | object->id.tag &= ~LIB_TAG_DOIT; | ||||
| BKE_object_free_derived_caches(object); | BKE_object_free_derived_caches(object); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 882 Lines • Show Last 20 Lines | |||||