Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/space_view3d.c
| Show First 20 Lines • Show All 530 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static void view3d_main_region_exit(wmWindowManager *wm, ARegion *ar) | static void view3d_main_region_exit(wmWindowManager *wm, ARegion *ar) | ||||
| { | { | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| ED_view3d_stop_render_preview(wm, ar); | ED_view3d_stop_render_preview(wm, ar); | ||||
| if (rv3d->gpuoffscreen) { | |||||
| GPU_offscreen_free(rv3d->gpuoffscreen); | |||||
| rv3d->gpuoffscreen = NULL; | |||||
| } | |||||
| } | } | ||||
| static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) | static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) | ||||
| { | { | ||||
| return WM_drag_ID(drag, ID_OB) != NULL; | return WM_drag_ID(drag, ID_OB) != NULL; | ||||
| } | } | ||||
| static bool view3d_collection_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) | static bool view3d_collection_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event), const char **UNUSED(tooltip)) | ||||
| ▲ Show 20 Lines • Show All 172 Lines • ▼ Show 20 Lines | if (rv3d) { | ||||
| if (rv3d->depths) { | if (rv3d->depths) { | ||||
| if (rv3d->depths->depths) MEM_freeN(rv3d->depths->depths); | if (rv3d->depths->depths) MEM_freeN(rv3d->depths->depths); | ||||
| MEM_freeN(rv3d->depths); | MEM_freeN(rv3d->depths); | ||||
| } | } | ||||
| if (rv3d->sms) { | if (rv3d->sms) { | ||||
| MEM_freeN(rv3d->sms); | MEM_freeN(rv3d->sms); | ||||
| } | } | ||||
| if (rv3d->gpuoffscreen) { | |||||
| GPU_offscreen_free(rv3d->gpuoffscreen); | |||||
| } | |||||
| MEM_freeN(rv3d); | MEM_freeN(rv3d); | ||||
| ar->regiondata = NULL; | ar->regiondata = NULL; | ||||
| } | } | ||||
| } | } | ||||
| /* copy regiondata */ | /* copy regiondata */ | ||||
| static void *view3d_main_region_duplicate(void *poin) | static void *view3d_main_region_duplicate(void *poin) | ||||
| { | { | ||||
| if (poin) { | if (poin) { | ||||
| RegionView3D *rv3d = poin, *new; | RegionView3D *rv3d = poin, *new; | ||||
| new = MEM_dupallocN(rv3d); | new = MEM_dupallocN(rv3d); | ||||
| if (rv3d->localvd) | if (rv3d->localvd) | ||||
| new->localvd = MEM_dupallocN(rv3d->localvd); | new->localvd = MEM_dupallocN(rv3d->localvd); | ||||
| if (rv3d->clipbb) | if (rv3d->clipbb) | ||||
| new->clipbb = MEM_dupallocN(rv3d->clipbb); | new->clipbb = MEM_dupallocN(rv3d->clipbb); | ||||
| new->depths = NULL; | new->depths = NULL; | ||||
| new->gpuoffscreen = NULL; | |||||
| new->render_engine = NULL; | new->render_engine = NULL; | ||||
| new->sms = NULL; | new->sms = NULL; | ||||
| new->smooth_timer = NULL; | new->smooth_timer = NULL; | ||||
| return new; | return new; | ||||
| } | } | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 767 Lines • Show Last 20 Lines | |||||