Blender
V3.3
|
#include "DRW_render.h"
#include "BKE_image.h"
#include "DNA_mesh_types.h"
#include "DEG_depsgraph_query.h"
#include "overlay_private.h"
Go to the source code of this file.
Functions | |
static bool | paint_object_is_rendered_transparent (View3D *v3d, Object *ob) |
void | OVERLAY_paint_init (OVERLAY_Data *vedata) |
void | OVERLAY_paint_cache_init (OVERLAY_Data *vedata) |
void | OVERLAY_paint_texture_cache_populate (OVERLAY_Data *vedata, Object *ob) |
void | OVERLAY_paint_vertex_cache_populate (OVERLAY_Data *vedata, Object *ob) |
void | OVERLAY_paint_weight_cache_populate (OVERLAY_Data *vedata, Object *ob) |
void | OVERLAY_paint_draw (OVERLAY_Data *vedata) |
void OVERLAY_paint_cache_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 64 of file overlay_paint.c.
References OVERLAY_PrivateData::alpha_blending, Image::alpha_mode, BKE_image_get_gpu_texture(), BLI_assert, DRW_Global::block_ubo, OVERLAY_PrivateData::clipping_state, copy_v3_fl3(), OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_MESH, CTX_MODE_PAINT_TEXTURE, CTX_MODE_PAINT_VERTEX, CTX_MODE_PAINT_WEIGHT, CTX_MODE_POSE, DRW_context_state_get(), DRW_PASS_CREATE, DRW_shgroup_create(), DRW_shgroup_state_enable(), DRW_shgroup_uniform_block, DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_float_copy(), DRW_shgroup_uniform_texture(), DRW_shgroup_uniform_vec3_copy(), DRW_shgroup_uniform_vec4_copy(), DRW_STATE_BLEND_ALPHA, DRW_STATE_BLEND_MUL, DRW_STATE_DEPTH_EQUAL, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, ImagePaintSettings::flag, G_draw, IMA_ALPHA_PREMUL, IMAGEPAINT_PROJECT_LAYER_STENCIL, IMAGEPAINT_PROJECT_LAYER_STENCIL_INV, ToolSettings::imapaint, normalize_v3(), NULL, OB_WIRE, usdtokens::opacity(), OVERLAY_PrivateData::overlay, OVERLAY_shader_depth_only(), OVERLAY_shader_paint_face(), OVERLAY_shader_paint_point(), OVERLAY_shader_paint_texture(), OVERLAY_shader_paint_vertcol(), OVERLAY_shader_paint_weight(), OVERLAY_shader_paint_wire(), OVERLAY_PassList::paint_color_ps, OVERLAY_PrivateData::paint_depth_grp, OVERLAY_PassList::paint_depth_ps, OVERLAY_PrivateData::paint_face_grp, OVERLAY_PassList::paint_overlay_ps, OVERLAY_PrivateData::paint_point_grp, OVERLAY_PrivateData::paint_surf_grp, OVERLAY_PrivateData::paint_wire_grp, OVERLAY_PrivateData::paint_wire_selected_grp, OVERLAY_PrivateData::painting, OVERLAY_StorageList::pd, OVERLAY_Data::psl, DRWContextState::scene, sh, View3D::shading, state, ImagePaintSettings::stencil, ImagePaintSettings::stencil_col, OVERLAY_Data::stl, tex, View3DOverlay::texture_paint_mode_opacity, Scene::toolsettings, View3DShading::type, DRWContextState::v3d, V3D_OVERLAY_WPAINT_CONTOURS, View3DOverlay::vertex_paint_mode_opacity, View3DOverlay::weight_paint_mode_opacity, DRW_Global::weight_ramp, and View3DOverlay::wpaint_flag.
Referenced by OVERLAY_cache_init().
void OVERLAY_paint_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 252 of file overlay_paint.c.
References DRW_draw_pass(), DRW_state_is_fbo(), OVERLAY_Data::fbl, GPU_framebuffer_bind(), OVERLAY_PrivateData::in_front, OVERLAY_FramebufferList::overlay_default_fb, OVERLAY_FramebufferList::overlay_in_front_fb, OVERLAY_PassList::paint_color_ps, OVERLAY_PassList::paint_depth_ps, OVERLAY_PassList::paint_overlay_ps, OVERLAY_PrivateData::painting, OVERLAY_StorageList::pd, OVERLAY_Data::psl, and OVERLAY_Data::stl.
Referenced by OVERLAY_draw_scene().
void OVERLAY_paint_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 52 of file overlay_paint.c.
References OVERLAY_PrivateData::alpha_blending, DRW_context_state_get(), Object::dtx, OVERLAY_PrivateData::in_front, OB_DRAW_IN_FRONT, DRWContextState::obact, paint_object_is_rendered_transparent(), OVERLAY_PrivateData::painting, OVERLAY_StorageList::pd, OVERLAY_Data::stl, OVERLAY_PrivateData::use_in_front, and DRWContextState::v3d.
Referenced by OVERLAY_engine_init().
void OVERLAY_paint_texture_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 190 of file overlay_paint.c.
References Object::data, DEG_get_original_object(), DRW_cache_mesh_surface_get(), DRW_cache_mesh_surface_texpaint_single_get(), DRW_shgroup_call, Mesh::editflag, GPUBatch, ME_EDIT_PAINT_FACE_SEL, NULL, OVERLAY_PrivateData::paint_face_grp, OVERLAY_PrivateData::paint_surf_grp, OVERLAY_StorageList::pd, and OVERLAY_Data::stl.
Referenced by OVERLAY_cache_populate().
void OVERLAY_paint_vertex_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 209 of file overlay_paint.c.
References OVERLAY_PrivateData::ctx_mode, CTX_MODE_EDIT_MESH, Object::data, DEG_get_original_object(), DRW_cache_mesh_all_verts_get(), DRW_cache_mesh_surface_edges_get(), DRW_cache_mesh_surface_get(), DRW_cache_mesh_surface_weights_get(), DRW_shgroup_call, Mesh::editflag, ELEM, GPUBatch, ME_EDIT_PAINT_FACE_SEL, ME_EDIT_PAINT_VERT_SEL, Object::mode, NULL, OB_MODE_EDIT, OB_MODE_WEIGHT_PAINT, OVERLAY_PrivateData::overlay, OVERLAY_PrivateData::paint_depth_grp, OVERLAY_PrivateData::paint_face_grp, View3DOverlay::paint_flag, OVERLAY_PrivateData::paint_point_grp, OVERLAY_PrivateData::paint_surf_grp, OVERLAY_PrivateData::paint_wire_grp, OVERLAY_PrivateData::paint_wire_selected_grp, OVERLAY_StorageList::pd, OVERLAY_Data::stl, and V3D_OVERLAY_PAINT_WIRE.
Referenced by OVERLAY_cache_populate(), and OVERLAY_paint_weight_cache_populate().
void OVERLAY_paint_weight_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 247 of file overlay_paint.c.
References OVERLAY_paint_vertex_cache_populate().
Referenced by OVERLAY_cache_populate().
Definition at line 19 of file overlay_paint.c.
References Material::a, BKE_object_material_get_eval(), Object::color, View3DShading::color_type, Object::data, Object::dt, ELEM, View3DShading::flag, OB_BOUNDBOX, OB_MESH, OB_SOLID, OB_WIRE, View3D::shading, Mesh::totcol, Object::type, View3DShading::type, V3D_SHADING_MATERIAL_COLOR, V3D_SHADING_OBJECT_COLOR, and V3D_SHADING_XRAY.
Referenced by OVERLAY_paint_init().