31 if (a.
type !=
b.type) {
37 if (a.
flag !=
b.flag) {
101 View3D *v3d = context->v3d;
138 if (new_clip_state != old_clip_state) {
167 if (
shading != previous_shading) {
194 bool is_playback = context->is_playback();
195 bool is_navigating = context->is_navigating();
200 if (is_playback || is_navigating) {
205 int _samples_len =
U.viewport_aa;
207 _samples_len =
scene->display.viewport_aa;
209 else if (context->is_scene_render()) {
210 _samples_len =
scene->display.render_aa;
212 if (is_navigating || is_playback) {
214 _samples_len =
min_ii(_samples_len, 1);
218 _samples_len =
max_ii(_samples_len, 1);
256 return &mesh->
runtime->edit_mesh->bm->ldata;
266 return &mesh->
runtime->edit_mesh->bm->vdata;
276 const bool is_active = (ob == draw_ctx->
obact);
286 const auto has_color = [&]() {
299 const auto has_uv = [&]() {
335 if (is_vertpaint_mode && has_color()) {
338 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)
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
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)
#define IMAGEPAINT_MODE_IMAGE
@ IMAGEPAINT_INTERP_LINEAR
@ V3D_SHADING_TEXTURE_COLOR
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_MATERIAL_COLOR
@ V3D_SHADING_OBJECT_COLOR
@ V3D_SHADING_DEPTH_OF_FIELD
@ V3D_SHADING_OBJECT_OUTLINE
@ V3D_SHADING_BACKFACE_CULLING
#define RV3D_LOCK_FLAGS(rv3d)
@ V3D_SHADING_CAVITY_BOTH
@ V3D_SHADING_CAVITY_SSAO
@ V3D_SHADING_CAVITY_CURVATURE
#define RV3D_CLIPPING_ENABLED(v3d, rv3d)
T & DRW_object_get_data_for_drawing(const Object &object)
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 float4x4 persmat(int view_id=0) const
static View & default_get()
bool DRW_object_use_hide_faces(const Object *ob)
pbvh::Tree * pbvh_get(Object &object)
bool operator!=(const CameraData &a, const CameraData &b)
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)
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
VecBase< int32_t, 2 > int2
VecBase< float, 3 > float3
bool is_image_render() const
bool is_scene_render() const
MeshRuntimeHandle * runtime
struct ToolSettings * toolsettings
float curvature_ridge_factor
float background_color[3]
float cavity_ridge_factor
float object_outline_color[3]
float cavity_valley_factor
float curvature_valley_factor
bool use_per_material_batches
MaterialTexture image_paint_override
eV3DShadingColorType color_type
bool show_missing_texture
ObjectState(const DRWContext *draw_ctx, const SceneState &scene_state, const SceneResources &resources, Object *ob)
MaterialTexture missing_texture
eLightingType lighting_type
bool reset_taa_next_sample
void init(const DRWContext *context, bool scene_updated, Object *camera_ob=nullptr)
float4x4 view_projection_matrix
Vector< float4 > clip_planes
Material material_override
eContextObjectMode object_mode