29 bool enabled_ =
false;
36 const bool do_edit_mesh_fade_geom = !
state.xray_enabled &&
38 enabled_ =
state.v3d && (do_edit_mesh_fade_geom ||
state.do_pose_fade_geom) &&
39 (selection_type_ == SelectionType::DISABLED);
49 state.clipping_plane_count);
59 mesh_fade_geometry_ps_ = ⊂
63 if (
state.do_pose_fade_geom) {
64 const float alpha =
state.overlay.xray_alpha_bone;
67 auto &sub = ps_.sub(
"fade_geometry.active");
68 sub.push_constant(
"ucolor",
color);
69 armature_fade_geometry_active_ps_ = ⊂
73 auto &sub = ps_.sub(
"fade_geometry");
74 sub.push_constant(
"ucolor",
color);
75 armature_fade_geometry_other_ps_ = ⊂
88 const bool draw_fade = draw_surface && overlay_should_fade_object(ob,
state.object_active);
98 if (use_sculpt_pbvh) {
102 sub.draw(
batch.batch, handle);
113 if (draw_bone_selection) {
117 is_driven_by_active_armature(ob_ref.
object,
state) ?
118 *armature_fade_geometry_active_ps_ :
119 *armature_fade_geometry_other_ps_);
121 else if (draw_fade) {
122 fade_sync(manager, ob_ref,
state, *mesh_fade_geometry_ps_);
135 if (!active_object || !ob) {
143 if ((active_object->
mode & ob->
mode) != 0) {
150 static bool is_driven_by_active_armature(
Object *ob,
const State &
state)
158 if (ob_mesh_deform) {
160 return is_driven_by_active_armature(ob_mesh_deform,
state);
Object * BKE_modifiers_is_deformed_by_meshdeform(Object *ob)
Object * BKE_modifiers_is_deformed_by_armature(Object *ob)
bool BKE_sculptsession_use_pbvh_draw(const Object *ob, const RegionView3D *rv3d)
MINLINE void srgb_to_linearrgb_v4(float linear[4], const float srgb[4])
@ V3D_SHADING_BACKGROUND_THEME
@ V3D_OVERLAY_FADE_INACTIVE
void GPU_framebuffer_bind(GPUFrameBuffer *framebuffer)
ResourceHandle unique_handle(const ObjectRef &ref)
ResourceHandle resource_handle_for_sculpt(const ObjectRef &ref)
void submit(PassSimple &pass, View &view)
void push_constant(const char *name, const float &data)
detail::PassBase< command::DrawMultiBuf > Sub
static bool is_pose_mode(const Object *armature_ob, const State &state)
void object_sync(Manager &manager, const ObjectRef &ob_ref, const State &state)
void begin_sync(Resources &res, const State &state)
Fade(const SelectionType selection_type_)
void draw(Framebuffer &framebuffer, Manager &manager, View &view)
blender::gpu::Batch * DRW_cache_object_surface_get(Object *ob)
bool DRW_object_is_renderable(const Object *ob)
bool DRW_state_is_image_render()
@ DRW_STATE_DEPTH_LESS_EQUAL
struct @157336070235062372277311340362362342103123126032::@262166344314164341202215145112231240022370055142 batch
select::SelectionType SelectionType
detail::Pass< command::DrawMultiBuf > PassMain
Vector< SculptBatch > sculpt_batches_get(const Object *ob, SculptBatchFeature features)
VecBase< float, 4 > float4
static bool overlay_should_fade_object(Object *ob, Object *active_object)
float4 background_color_get(const State &state)