29 if (grease_pencil_ !=
nullptr) {
39 if (grease_pencil_ !=
nullptr) {
43 grease_pencil_ =
nullptr;
49 return grease_pencil_ !=
nullptr;
56 grease_pencil_ = grease_pencil;
57 ownership_ = ownership;
64 grease_pencil_ =
nullptr;
70 return grease_pencil_;
80 return grease_pencil_;
85 return grease_pencil_ ==
nullptr;
115 [](
const void *owner) ->
int {
117 return grease_pencil.layers().size();
143 if (owner ==
nullptr) {
149 return int(grease_pencil.layers().size());
161 if (owner ==
nullptr) {
192std::optional<AttributeAccessor> GreasePencilComponent::attributes()
const
197std::optional<MutableAttributeAccessor> GreasePencilComponent::attributes_for_write()
Low-level operations for grease pencil.
GreasePencil * BKE_grease_pencil_copy_for_eval(const GreasePencil *grease_pencil_src)
void BKE_id_free(Main *bmain, void *idv)
bool has_grease_pencil() const
const GreasePencil * get() const
bool owns_direct_data() const override
GreasePencil * get_for_write()
GeometryComponentPtr copy() const override
void ensure_owns_direct_data() override
bool is_empty() const final
void replace(GreasePencil *grease_pencil, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
AttributeAccessorFunctions accessor_functions_for_providers()
static ComponentAttributeProviders create_attribute_providers_for_grease_pencil()
ImplicitSharingPtr< GeometryComponent > GeometryComponentPtr
static GVArray adapt_grease_pencil_attribute_domain(const GreasePencil &, const GVArray &varray, const AttrDomain from, const AttrDomain to)
static const AttributeAccessorFunctions & get_grease_pencil_accessor_functions_ref()
static AttributeAccessorFunctions get_grease_pencil_accessor_functions()
GVArray(* adapt_domain)(const void *owner, const GVArray &varray, AttrDomain from_domain, AttrDomain to_domain)
bool(* domain_supported)(const void *owner, AttrDomain domain)
int(* domain_size)(const void *owner, AttrDomain domain)