69 return (
raw & 0x80000000u) != 0;
74 return (
raw & 0x7FFFFFFFu);
95 return first.has_inverted_handedness();
114class ResourceHandle {
121 ResourceHandle(
uint index,
bool inverted_handedness) : index_(index, inverted_handedness) {}
128 return index_.raw != 0;
133 return index_.has_inverted_handedness();
138 return index_.resource_index();
152class ResourceHandleRange {
165 return index_.first.raw != 0;
170 return index_.has_inverted_handedness();
196 return index_.first.raw;
202 return index_.first.resource_index();
210 friend DupliCacheManager;
216 Object *
const dupli_parent_ =
nullptr;
229 Object *dupli_parent =
nullptr,
236 return dupli_parent_ !=
nullptr;
241 return (dupli_parent_ ? dupli_parent_ :
object) == active_object;
255 if (dupli_parent_ ==
nullptr) {
260 return dupli_object_->random_id * (1.0f / (
float)0xFFFFFFFF);
276 object, dupli_object_, dupli_parent_, attr.
name, r_value);
283 return dupli_parent_ ? dupli_parent_->light_linking :
object->light_linking;
297 int flags = get_flags(*
object->runtime);
299 flags |= get_flags(*dupli_parent_->runtime);
319 if (dupli_parent_ && dupli_object_) {
321 Collection *collection = dupli_parent_->instance_collection;
322 if (collection !=
nullptr) {
325 dupli_mat = dupli_parent_->object_to_world() * dupli_mat;
328 dupli_mat =
object->object_to_world() *
math::invert(dupli_object_->ob->object_to_world());
337 return dupli_object_->preview_instance_index;
345 return dupli_object_->preview_base_geometry;
357 if (!dupli_parent_ || active_object != dupli_parent_) {
366 if (dupli_parent_->sculpt && (dupli_parent_->sculpt->mode_type ==
OB_MODE_SCULPT)) {
376 switch (dupli_parent_->type) {
419 Object *parent_ =
nullptr;
434 parent_ = ob_ref.dupli_parent_;
437 id_[
i] = dupli->persistent_id[
i];
438 if (id_[
i] == std::numeric_limits<int>::max()) {
458 if (hash_value_ != k.hash_value_) {
464 if (parent_ != k.parent_) {
467 if (sub_key_ != k.sub_key_) {
472 if (id_[
i] != k.id_[
i]) {
475 if (id_[
i] == std::numeric_limits<int>::max()) {
@ CTX_MODE_EDIT_POINTCLOUD
@ CTX_MODE_EDIT_GREASE_PENCIL
bool BKE_object_dupli_find_rgba_attribute(const Object *ob, const DupliObject *dupli, const Object *dupli_parent, const char *name, float r_value[4])
constexpr int MAX_DUPLI_RECUR
#define BLI_assert_unreachable()
BLI_INLINE unsigned int BLI_hash_string(const char *str)
BLI_INLINE unsigned int BLI_hash_int_2d(unsigned int kx, unsigned int ky)
#define SET_FLAG_FROM_TEST(value, test, flag)
T * DEG_get_original(T *id)
Object groups, one object can be in many groups at once.
#define OB_MODE_ALL_PAINT
#define OB_MODE_ALL_PAINT_GPENCIL
struct ObjectRuntimeHandle ObjectRuntimeHandle
unsigned long long int uint64_t
constexpr IndexRange index_range() const
bool operator==(const ObjectKey &k) const
ObjectKey(const ObjectRef &ob_ref, int sub_key=0)
bool parent_is_in_edit_paint_mode(const Object *active_object, eObjectMode ob_mode, eContextObjectMode ctx_mode) const
bool find_rgba_attribute(const GPUUniformAttr &attr, float r_value[4]) const
LightLinking * light_linking() const
bool is_active(const Object *active_object) const
int recalc_flags(uint64_t last_update) const
ObjectRef(Object *ob, Object *dupli_parent=nullptr, DupliObject *dupli_object=nullptr)
int preview_instance_index() const
float4x4 particles_matrix() const
const blender::bke::GeometrySet * preview_base_geometry() const
IndexRange index_range() const
ResourceHandleRange(ResourceHandle handle)
uint resource_index() const
bool has_inverted_handedness() const
ResourceHandleRange()=default
bool has_inverted_handedness() const
uint resource_index() const
friend class ResourceHandleRange
bool DRW_object_is_in_edit_mode(const Object *ob)
CartesianBasis invert(const CartesianBasis &basis)
MatBase< float, 4, 4 > float4x4
VecBase< float, 4 > float4
uint64_t get_default_hash(const T &v, const Args &...args)
VecBase< float, 3 > float3
static MatBase identity()
ResourceIndexRange()=default
ResourceIndexRange(ResourceIndex index)
ResourceIndexRange(ResourceIndex index, uint len)
bool has_inverted_handedness() const
IndexRange index_range() const
ResourceIndex(uint index, bool inverted_handedness)
bool has_inverted_handedness() const
uint resource_index() const