Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/space_view3d.c
| Show All 37 Lines | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_depsgraph.h" | |||||
| #include "BKE_icons.h" | #include "BKE_icons.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "ED_space_api.h" | #include "ED_space_api.h" | ||||
| ▲ Show 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | #endif | ||||
| if (rv3d->render_engine->re) | if (rv3d->render_engine->re) | ||||
| RE_Database_Free(rv3d->render_engine->re); | RE_Database_Free(rv3d->render_engine->re); | ||||
| RE_engine_free(rv3d->render_engine); | RE_engine_free(rv3d->render_engine); | ||||
| rv3d->render_engine = NULL; | rv3d->render_engine = NULL; | ||||
| } | } | ||||
| } | } | ||||
| void ED_view3d_shade_update(Main *bmain, View3D *v3d, ScrArea *sa) | void ED_view3d_shade_update(Main *bmain, Scene *scene, View3D *v3d, ScrArea *sa) | ||||
| { | { | ||||
| wmWindowManager *wm = bmain->wm.first; | wmWindowManager *wm = bmain->wm.first; | ||||
| if (v3d->drawtype != OB_RENDER) { | if (v3d->drawtype != OB_RENDER) { | ||||
| ARegion *ar; | ARegion *ar; | ||||
| for (ar = sa->regionbase.first; ar; ar = ar->next) { | for (ar = sa->regionbase.first; ar; ar = ar->next) { | ||||
| if (ar->regiondata) | if (ar->regiondata) | ||||
| view3d_stop_render_preview(wm, ar); | view3d_stop_render_preview(wm, ar); | ||||
| } | } | ||||
| } | } | ||||
| else if (scene->obedit != NULL && scene->obedit->type == OB_MESH) { | |||||
| /* Tag mesh to load edit data. */ | |||||
| DAG_id_tag_update(scene->obedit->data, 0); | |||||
| } | |||||
| } | } | ||||
| /* ******************** default callbacks for view3d space ***************** */ | /* ******************** default callbacks for view3d space ***************** */ | ||||
| static SpaceLink *view3d_new(const bContext *C) | static SpaceLink *view3d_new(const bContext *C) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ARegion *ar; | ARegion *ar; | ||||
| ▲ Show 20 Lines • Show All 1,111 Lines • Show Last 20 Lines | |||||