Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_view.c
| Show First 20 Lines • Show All 1,299 Lines • ▼ Show 20 Lines | for (base = FIRSTBASE; base; base = base->next) { | ||||
| base->object->lay = base->lay; | base->object->lay = base->lay; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return ok; | return ok; | ||||
| } | } | ||||
| static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmain, ScrArea *sa, const int smooth_viewtx) | static void restore_localviewdata(wmWindowManager *wm, wmWindow *win, Main *bmain, Scene *scene, ScrArea *sa, const int smooth_viewtx) | ||||
| { | { | ||||
| const bool free = true; | const bool free = true; | ||||
| ARegion *ar; | ARegion *ar; | ||||
| View3D *v3d = sa->spacedata.first; | View3D *v3d = sa->spacedata.first; | ||||
| Object *camera_old, *camera_new; | Object *camera_old, *camera_new; | ||||
| if (v3d->localvd == NULL) return; | if (v3d->localvd == NULL) return; | ||||
| Show All 33 Lines | if (ar->regiontype == RGN_TYPE_WINDOW) { | ||||
| smooth_viewtx); | smooth_viewtx); | ||||
| if (free) { | if (free) { | ||||
| MEM_freeN(rv3d->localvd); | MEM_freeN(rv3d->localvd); | ||||
| rv3d->localvd = NULL; | rv3d->localvd = NULL; | ||||
| } | } | ||||
| } | } | ||||
| ED_view3d_shade_update(bmain, v3d, sa); | ED_view3d_shade_update(bmain, scene, v3d, sa); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static bool view3d_localview_exit( | static bool view3d_localview_exit( | ||||
| wmWindowManager *wm, wmWindow *win, | wmWindowManager *wm, wmWindow *win, | ||||
| Main *bmain, Scene *scene, ScrArea *sa, const int smooth_viewtx) | Main *bmain, Scene *scene, ScrArea *sa, const int smooth_viewtx) | ||||
| { | { | ||||
| View3D *v3d = sa->spacedata.first; | View3D *v3d = sa->spacedata.first; | ||||
| struct Base *base; | struct Base *base; | ||||
| unsigned int locallay; | unsigned int locallay; | ||||
| if (v3d->localvd) { | if (v3d->localvd) { | ||||
| locallay = v3d->lay & 0xFF000000; | locallay = v3d->lay & 0xFF000000; | ||||
| restore_localviewdata(wm, win, bmain, sa, smooth_viewtx); | restore_localviewdata(wm, win, bmain, scene, sa, smooth_viewtx); | ||||
| /* for when in other window the layers have changed */ | /* for when in other window the layers have changed */ | ||||
| if (v3d->scenelock) v3d->lay = scene->lay; | if (v3d->scenelock) v3d->lay = scene->lay; | ||||
| for (base = FIRSTBASE; base; base = base->next) { | for (base = FIRSTBASE; base; base = base->next) { | ||||
| if (base->lay & locallay) { | if (base->lay & locallay) { | ||||
| base->lay -= locallay; | base->lay -= locallay; | ||||
| if (base->lay == 0) base->lay = v3d->layact; | if (base->lay == 0) base->lay = v3d->layact; | ||||
| ▲ Show 20 Lines • Show All 361 Lines • Show Last 20 Lines | |||||