30 EmptyInstanceBuf axes_buf = {selection_type_,
"object_axes"};
31 EmptyInstanceBuf xform_origins_buf = {selection_type_,
"xform_origins"};
42 xform_origins_buf.clear();
54 Object *ob = ob_ref.object;
55 if (is_from_dupli_or_set(ob)) {
59 const bool use_display_axis = (ob->
dtx &
OB_AXIS) != 0;
61 (
state.scene->toolsettings->transform_flag &
65 ob ==
state.object_active &&
67 (
state.scene->toolsettings->transform_flag &
69 if (!use_display_axis && !use_xform_origins_axis && !use_xform_sculpt_pivot_axis) {
72 float4x4 target = ob->object_to_world();
74 if (use_xform_sculpt_pivot_axis) {
78 target = target * local_pivot_orientation;
82 if (use_xform_origins_axis || use_xform_sculpt_pivot_axis) {
83 data.color_ =
float4(0.15f, 0.15f, 0.15f, 0.7f);
87 axes_buf.append(
data, res.select_id(ob_ref));
98 ps_.shader_set(res.shaders->extra_shape.get());
101 res.select_bind(ps_);
103 axes_buf.end_sync(ps_, res.shapes.arrows.get());
108 xform_origins_buf.end_sync(xform_origins_ps, res.shapes.arrows.get());
118 manager.submit(ps_, view);
void state_set(DRWState state, int clip_plane_count=0)
detail::PassBase< command::DrawCommandBuf > Sub
Axes(const SelectionType selection_type)
void draw_line(Framebuffer &framebuffer, Manager &manager, View &view) final
void end_sync(Resources &res, const State &state) final
void object_sync(Manager &, const ObjectRef &ob_ref, Resources &res, const State &state) final
void begin_sync(Resources &, const State &state) final
#define DRW_CLIPPING_UBO_SLOT
#define OVERLAY_GLOBALS_SLOT
select::SelectionType SelectionType
detail::Pass< command::DrawCommandBuf > PassSimple
QuaternionBase< float > Quaternion
MatT from_loc_rot(const typename MatT::loc_type &location, const RotationT &rotation)
void GPU_framebuffer_bind(gpu::FrameBuffer *fb)
BMesh const char void * data
@ DRW_STATE_DEPTH_LESS_EQUAL
eObject_DrawExtraFlag dtx
bke::ObjectRuntime * runtime
SculptSession * sculpt_session
static const ID select_invalid_id()