47 const ID &object_data = *
static_cast<const ID *
>(
object->data);
84 params.add_uninitialized_single_output({type, validated_buffer, 1});
85 mf::ContextBuilder context;
106 *op->
ptr, active_type, buffer);
121 if (&type != &dst_type && !conversions.
is_convertible(type, dst_type)) {
129 const GPointer dst_value(type, dst_buffer);
174 using T =
decltype(dummy);
177 selection.
foreach_index([&](
const int i) { mixer.mix_in(0, values_typed[
i]); });
193 Curves &curves_id = *
static_cast<Curves *
>(
object->data);
207 ot->name =
"Set Attribute";
208 ot->description =
"Set values of the active attribute for selected elements";
209 ot->idname =
"CURVES_OT_attribute_set";
std::optional< blender::StringRefNull > BKE_attributes_active_name_get(AttributeOwner &owner)
Object * CTX_data_active_object(const bContext *C)
#define BLI_assert_unreachable()
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define BLI_SCOPED_DEFER(function_to_defer)
void DEG_id_tag_update(ID *id, unsigned int flags)
Object is a sort of wrapper for general info.
static AttributeOwner from_id(ID *id)
static const CPPType & get()
void fill_assign_indices(const void *value, void *dst, const IndexMask &mask) const
void destruct(void *ptr) const
void copy_assign(const void *src, void *dst) const
const CPPType & type() const
const CPPType & type() const
VArray< T > typed() const
AttributeValidator lookup_validator(const StringRef attribute_id) const
GAttributeReader lookup(const StringRef attribute_id) const
std::optional< AttributeMetaData > lookup_meta_data(StringRef attribute_id) const
AttributeAccessor attributes() const
void convert_to_uninitialized(const CPPType &from_type, const CPPType &to_type, const void *from_value, void *to_value) const
bool is_convertible(const CPPType &from_type, const CPPType &to_type) const
GSpanAttributeWriter lookup_for_write_span(StringRef attribute_id)
virtual void call(const IndexMask &mask, Params params, Context context) const =0
void foreach_index(Fn &&fn) const
void convert_to_static_type(const CPPType &cpp_type, const Func &func)
typename DefaultMixerStruct< T >::type DefaultMixer
const DataTypeConversions & get_implicit_type_conversions()
AttrType cpp_type_to_attribute_type(const CPPType &type)
const CPPType & attribute_type_to_cpp_type(AttrType type)
static IndexMask retrieve_selected_elements(const Curves &curves_id, const bke::AttrDomain domain, IndexMaskMemory &memory)
IndexMask retrieve_selected_curves(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
VectorSet< Curves * > get_unique_editable_curves(const bContext &C)
static void validate_value(const bke::AttributeAccessor attributes, const StringRef name, const CPPType &type, void *buffer)
bool editable_curves_in_edit_mode_poll(bContext *C)
static bool active_attribute_poll(bContext *C)
static void set_attribute_ui(bContext *C, wmOperator *op)
static wmOperatorStatus set_attribute_exec(bContext *C, wmOperator *op)
void CURVES_OT_attribute_set(wmOperatorType *ot)
static wmOperatorStatus set_attribute_invoke(bContext *C, wmOperator *op, const wmEvent *event)
IndexMask retrieve_selected_points(const bke::CurvesGeometry &curves, IndexMaskMemory &memory)
PropertyRNA * rna_property_for_type(PointerRNA &ptr, const bke::AttrType type)
GPointer rna_property_for_attribute_type_retrieve_value(PointerRNA &ptr, const bke::AttrType type, void *buffer)
StringRefNull rna_property_name_for_type(const bke::AttrType type)
void register_rna_properties_for_attribute_types(StructRNA &srna)
void rna_property_for_attribute_type_set_value(PointerRNA &ptr, PropertyRNA &prop, const GPointer value)
bool attribute_set_poll(bContext &C, const ID &object_data)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
const fn::multi_function::MultiFunction * function
void use_property_decorate_set(bool is_sep)
uiLayout & column(bool align)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
wmOperatorStatus WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *)