Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw_legacy.c
| Show First 20 Lines • Show All 873 Lines • ▼ Show 20 Lines | void ED_view3d_draw_depth_gpencil( | ||||
| ED_gpencil_draw_view3d(NULL, scene, view_layer, depsgraph, v3d, ar, true); | ED_gpencil_draw_view3d(NULL, scene, view_layer, depsgraph, v3d, ar, true); | ||||
| GPU_depth_test(false); | GPU_depth_test(false); | ||||
| } | } | ||||
| /* *********************** customdata **************** */ | /* *********************** customdata **************** */ | ||||
| CustomDataMask ED_view3d_datamask(const bContext *C, const Scene *UNUSED(scene), const View3D *v3d) | void ED_view3d_datamask( | ||||
| const bContext *C, const Scene *UNUSED(scene), const View3D *v3d, CustomData_MeshMasks *r_cddata_masks) | |||||
| { | { | ||||
| CustomDataMask mask = 0; | |||||
| const int drawtype = view3d_effective_drawtype(v3d); | const int drawtype = view3d_effective_drawtype(v3d); | ||||
| if (ELEM(drawtype, OB_TEXTURE, OB_MATERIAL)) { | if (ELEM(drawtype, OB_TEXTURE, OB_MATERIAL)) { | ||||
| mask |= CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL; | r_cddata_masks->lmask |= CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL; | ||||
| if (drawtype == OB_MATERIAL) | if (drawtype == OB_MATERIAL) | ||||
| mask |= CD_MASK_ORCO; | r_cddata_masks->vmask |= CD_MASK_ORCO; | ||||
| } | } | ||||
| if ((CTX_data_mode_enum(C) == CTX_MODE_EDIT_MESH) && | if ((CTX_data_mode_enum(C) == CTX_MODE_EDIT_MESH) && | ||||
| (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_WEIGHT)) | (v3d->overlay.edit_flag & V3D_OVERLAY_EDIT_WEIGHT)) | ||||
| { | { | ||||
| mask |= CD_MASK_MDEFORMVERT; | r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; | ||||
| } | } | ||||
| return mask; | |||||
| } | } | ||||
| /* goes over all modes and view3d settings */ | /* goes over all modes and view3d settings */ | ||||
| CustomDataMask ED_view3d_screen_datamask(const bContext *C, const Scene *scene, const bScreen *screen) | void ED_view3d_screen_datamask( | ||||
| const bContext *C, const Scene *scene, const bScreen *screen, CustomData_MeshMasks *r_cddata_masks) | |||||
| { | { | ||||
| CustomDataMask mask = CD_MASK_BAREMESH; | CustomData_MeshMasks_update(r_cddata_masks, &CD_MASK_BAREMESH); | ||||
| /* check if we need tfaces & mcols due to view mode */ | /* check if we need tfaces & mcols due to view mode */ | ||||
| for (const ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | for (const ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { | ||||
| if (sa->spacetype == SPACE_VIEW3D) { | if (sa->spacetype == SPACE_VIEW3D) { | ||||
| mask |= ED_view3d_datamask(C, scene, sa->spacedata.first); | ED_view3d_datamask(C, scene, sa->spacedata.first, r_cddata_masks); | ||||
| } | } | ||||
| } | } | ||||
| return mask; | |||||
| } | } | ||||
| /** | /** | ||||
| * Store values from #RegionView3D, set when drawing. | * Store values from #RegionView3D, set when drawing. | ||||
| * This is needed when we draw with to a viewport using a different matrix (offscreen drawing for example). | * This is needed when we draw with to a viewport using a different matrix (offscreen drawing for example). | ||||
| * | * | ||||
| * Values set by #ED_view3d_update_viewmat should be handled here. | * Values set by #ED_view3d_update_viewmat should be handled here. | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines | |||||