36 : relations_buf_(selection_type,
"relations_buf_"),
37 points_buf_(selection_type,
"points_buf_")
48 relations_buf_.clear();
65 Object *ob = ob_ref.object;
66 const float4 &relation_color = res.theme.colors.wire;
67 const float4 &constraint_color = res.theme.colors.grid_axis_z;
70 const float3 &parent_pos = ob->
runtime->parent_display_origin;
72 relations_buf_.append(ob->object_to_world().location(), parent_pos, relation_color);
81 relations_buf_.append(hmd->
object->object_to_world().location(), center, relation_color);
83 points_buf_.append(center, relation_color);
94 relations_buf_.append(hmd->
object->object_to_world().location(), center, relation_color);
96 points_buf_.append(center, relation_color);
105 relations_buf_.append(rbc_ob1->object_to_world().location(),
106 ob->object_to_world().location(),
110 relations_buf_.append(rbc_ob2->object_to_world().location(),
111 ob->object_to_world().location(),
139 relations_buf_.append(camob->object_to_world().location(),
140 ob->object_to_world().location(),
146 ListBase targets = {
nullptr,
nullptr};
148 if ((constraint->ui_expand_flag & (1 << 0)) &&
156 bool has_target =
false;
169 target_pos = target->matrix[3];
176 relations_buf_.append(
177 target_pos, ob->object_to_world().location(), constraint_color);
200 res.select_bind(ps_);
205 state.clipping_plane_count);
206 sub_pass.
shader_set(res.shaders->extra_wire.get());
207 relations_buf_.end_sync(sub_pass);
213 state.clipping_plane_count);
214 sub_pass.
shader_set(res.shaders->extra_loose_points.get());
215 points_buf_.end_sync(sub_pass);
226 manager.submit(ps_,
view);
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
void BKE_constraint_custom_object_space_init(struct bConstraintOb *cob, struct bConstraint *con)
const bConstraintTypeInfo * BKE_constraint_typeinfo_get(struct bConstraint *con)
struct bConstraintOb * BKE_constraints_make_evalob(struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, void *subdata, short datatype)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
float DEG_get_ctime(const Depsgraph *graph)
@ CONSTRAINT_TAR_CUSTOM_SPACE
@ CONSTRAINT_TYPE_FOLLOWTRACK
@ CONSTRAINT_TYPE_OBJECTSOLVER
@ CONSTRAINT_OBTYPE_OBJECT
@ eGpencilModifierType_Hook
Types and defines for representing Rigid Body entities.
void GPU_framebuffer_bind(blender::gpu::FrameBuffer *fb)
BMesh const char void * data
void shader_set(gpu::Shader *shader)
void state_set(DRWState state, int clip_plane_count=0)
detail::PassBase< command::DrawCommandBuf > Sub
void begin_sync(Resources &res, const State &state) final
void draw_line(Framebuffer &framebuffer, Manager &manager, View &view) final
void object_sync(Manager &, const ObjectRef &ob_ref, Resources &res, const State &state) final
Relations(SelectionType selection_type)
void end_sync(Resources &res, const State &state) final
int DRW_object_visibility_in_active_context(const Object *ob)
#define DRW_CLIPPING_UBO_SLOT
#define OVERLAY_GLOBALS_SLOT
@ DRW_STATE_DEPTH_LESS_EQUAL
void MEM_freeN(void *vmemh)
select::SelectionType SelectionType
static bool is_from_dupli_or_set(const Object *ob)
detail::Pass< command::DrawCommandBuf > PassSimple
VecBase< T, 3 > transform_point(const CartesianBasis &basis, const VecBase< T, 3 > &v)
VecBase< float, 4 > float4
ListBaseWrapperTemplate< ListBase, T > ListBaseWrapper
VecBase< float, 3 > float3
ObjectRuntimeHandle * runtime
ListBase greasepencil_modifiers
struct RigidBodyCon * rigidbody_constraint
float space_obj_world_matrix[4][4]
bool(* get_target_matrix)(struct Depsgraph *depsgraph, struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime)