30 View3D *v3d = context->v3d;
57 shading = is_render_mode ? scene->display.shading : v3d->
shading;
67 if (new_clip_state != old_clip_state) {
81 shading.xray_alpha = 0.0f;
87 shading.xray_alpha = 1.0f;
96 shading.flag != previous_shading.
flag)
106 if (
World *
w = scene->world) {
115 rv3d->
rflag &= ~RV3D_GPULIGHT_UPDATE;
132 if (is_playback || is_navigating) {
137 int _samples_len =
U.viewport_aa;
139 _samples_len = scene->display.viewport_aa;
142 _samples_len = scene->display.render_aa;
144 if (is_navigating || is_playback) {
146 _samples_len =
min_ii(_samples_len, 1);
150 _samples_len =
max_ii(_samples_len, 1);
186 BLI_assert(mesh->runtime->edit_mesh !=
nullptr);
187 BLI_assert(mesh->runtime->edit_mesh->bm !=
nullptr);
188 return &mesh->runtime->edit_mesh->bm->ldata;
190 return &mesh->corner_data;
196 BLI_assert(mesh->runtime->edit_mesh !=
nullptr);
197 BLI_assert(mesh->runtime->edit_mesh->bm !=
nullptr);
198 return &mesh->runtime->edit_mesh->bm->vdata;
200 return &mesh->vert_data;
208 const bool is_active = (ob == draw_ctx->
obact);
217 bool has_color =
false;
260 if (is_vertpaint_mode && has_color) {
263 else if (is_texpaint_mode && has_uv) {
Camera data-block and utility functions.
enum eContextObjectMode CTX_data_mode_enum_ex(const Object *obedit, const Object *ob, eObjectMode object_mode)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
General operations, lookup, etc. for blender objects.
bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const RegionView3D *rv3d)
A BVH for high poly meshes.
MINLINE int min_ii(int a, int b)
MINLINE int max_ii(int a, int b)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
@ IMAGEPAINT_INTERP_LINEAR
#define IMAGEPAINT_MODE_IMAGE
@ V3D_SHADING_TEXTURE_COLOR
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_MATERIAL_COLOR
@ V3D_SHADING_OBJECT_COLOR
#define RV3D_LOCK_FLAGS(rv3d)
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
@ V3D_SHADING_DEPTH_OF_FIELD
@ V3D_SHADING_OBJECT_OUTLINE
@ V3D_SHADING_BACKFACE_CULLING
@ V3D_SHADING_CAVITY_BOTH
@ V3D_SHADING_CAVITY_SSAO
@ V3D_SHADING_CAVITY_CURVATURE
eV3DShadingColorType ED_paint_shading_color_override(bContext *C, const PaintModeSettings *settings, Object &ob, eV3DShadingColorType orig_color_type)
#define SHADING_XRAY_ALPHA(shading)
#define SHADING_XRAY_ENABLED(shading)
@ GPU_SAMPLER_EXTEND_MODE_REPEAT
@ GPU_SAMPLER_FILTERING_LINEAR
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
const float * DRW_viewport_size_get()
bool DRW_object_use_hide_faces(const Object *ob)
bool DRW_state_is_image_render()
bool DRW_state_is_scene_render()
const DRWContextState * DRW_context_state_get()
bool DRW_state_is_navigating()
bool DRW_state_is_playback()
void DRW_view_persmat_get(const DRWView *view, float mat[4][4], bool inverse)
pbvh::Tree * pbvh_get(Object &object)
static const CustomData * get_loop_custom_data(const Mesh *mesh)
static const CustomData * get_vert_custom_data(const Mesh *mesh)
static eLightingType lighting_type_from_v3d_lighting(char lighting)
bool assign_if_different(T &old_value, T new_value)
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
GPUSamplerExtendMode extend_yz
GPUSamplerExtendMode extend_x
void set_filtering_flag_from_test(GPUSamplerFiltering filtering_flags, bool test)
struct ToolSettings * toolsettings
GPUSamplerState sampler_state
bool use_per_material_batches
MaterialTexture image_paint_override
ObjectState(const SceneState &scene_state, const SceneResources &resources, Object *ob)
eV3DShadingColorType color_type
bool show_missing_texture
MaterialTexture missing_texture
void init(Object *camera_ob=nullptr)
eLightingType lighting_type
bool reset_taa_next_sample
float4x4 view_projection_matrix
Vector< float4 > clip_planes
Material material_override
eContextObjectMode object_mode