Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/space_view3d.c
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "GPU_compositing.h" | #include "GPU_compositing.h" | ||||
| #include "GPU_framebuffer.h" | #include "GPU_framebuffer.h" | ||||
| #include "GPU_material.h" | #include "GPU_material.h" | ||||
| #include "BIF_gl.h" | #include "BIF_gl.h" | ||||
| #include "VP_engine_API.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "RE_engine.h" | #include "RE_engine.h" | ||||
| #include "RE_pipeline.h" | #include "RE_pipeline.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| ▲ Show 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | if (scene) { | ||||
| v3d->camera = scene->camera; | v3d->camera = scene->camera; | ||||
| } | } | ||||
| v3d->scenelock = true; | v3d->scenelock = true; | ||||
| v3d->grid = 1.0f; | v3d->grid = 1.0f; | ||||
| v3d->gridlines = 16; | v3d->gridlines = 16; | ||||
| v3d->gridsubdiv = 10; | v3d->gridsubdiv = 10; | ||||
| v3d->drawtype = OB_SOLID; | v3d->drawtype = OB_SOLID; | ||||
| v3d->viewport_engine = VP_engine_create(ViewportEngineTypes.first); | |||||
| v3d->gridflag = V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_FLOOR; | v3d->gridflag = V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_FLOOR; | ||||
| v3d->flag = V3D_SELECT_OUTLINE; | v3d->flag = V3D_SELECT_OUTLINE; | ||||
| v3d->flag2 = V3D_SHOW_RECONSTRUCTION | V3D_SHOW_GPENCIL; | v3d->flag2 = V3D_SHOW_RECONSTRUCTION | V3D_SHOW_GPENCIL; | ||||
| v3d->lens = 35.0f; | v3d->lens = 35.0f; | ||||
| v3d->near = 0.01f; | v3d->near = 0.01f; | ||||
| v3d->far = 1000.0f; | v3d->far = 1000.0f; | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| /* not spacelink itself */ | /* not spacelink itself */ | ||||
| static void view3d_free(SpaceLink *sl) | static void view3d_free(SpaceLink *sl) | ||||
| { | { | ||||
| View3D *vd = (View3D *) sl; | View3D *vd = (View3D *) sl; | ||||
| BGpic *bgpic; | BGpic *bgpic; | ||||
| VP_engine_free(vd->viewport_engine); | |||||
| for (bgpic = vd->bgpicbase.first; bgpic; bgpic = bgpic->next) { | for (bgpic = vd->bgpicbase.first; bgpic; bgpic = bgpic->next) { | ||||
| if (bgpic->source == V3D_BGPIC_IMAGE) { | if (bgpic->source == V3D_BGPIC_IMAGE) { | ||||
| id_us_min((ID *)bgpic->ima); | id_us_min((ID *)bgpic->ima); | ||||
| } | } | ||||
| else if (bgpic->source == V3D_BGPIC_MOVIE) { | else if (bgpic->source == V3D_BGPIC_MOVIE) { | ||||
| id_us_min((ID *)bgpic->clip); | id_us_min((ID *)bgpic->clip); | ||||
| } | } | ||||
| } | } | ||||
| Show All 40 Lines | static SpaceLink *view3d_duplicate(SpaceLink *sl) | ||||
| if (v3dn->drawtype == OB_RENDER) | if (v3dn->drawtype == OB_RENDER) | ||||
| v3dn->drawtype = OB_SOLID; | v3dn->drawtype = OB_SOLID; | ||||
| /* copy or clear inside new stuff */ | /* copy or clear inside new stuff */ | ||||
| v3dn->defmaterial = NULL; | v3dn->defmaterial = NULL; | ||||
| v3dn->viewport_engine = MEM_dupallocN(v3do->viewport_engine); | |||||
| BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase); | BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase); | ||||
| for (bgpic = v3dn->bgpicbase.first; bgpic; bgpic = bgpic->next) { | for (bgpic = v3dn->bgpicbase.first; bgpic; bgpic = bgpic->next) { | ||||
| if (bgpic->source == V3D_BGPIC_IMAGE) { | if (bgpic->source == V3D_BGPIC_IMAGE) { | ||||
| id_us_plus((ID *)bgpic->ima); | id_us_plus((ID *)bgpic->ima); | ||||
| } | } | ||||
| else if (bgpic->source == V3D_BGPIC_MOVIE) { | else if (bgpic->source == V3D_BGPIC_MOVIE) { | ||||
| id_us_plus((ID *)bgpic->clip); | id_us_plus((ID *)bgpic->clip); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,081 Lines • Show Last 20 Lines | |||||