153 *op->
ptr, active_type, buffer);
157 bool changed =
false;
158 for (
Object *
object : objects) {
172 if (&type != &dst_type && !conversions.
is_convertible(type, dst_type)) {
178 const GPointer dst_value(dst_type, dst_buffer);
202 update.calc_looptris =
false;
203 update.calc_normals =
false;
204 update.is_destructive =
false;
272 ot->name =
"Set Attribute";
273 ot->description =
"Set values of the active attribute for selected elements";
274 ot->idname =
"MESH_OT_attribute_set";
std::optional< blender::StringRefNull > BKE_attributes_active_name_get(AttributeOwner &owner)
struct CustomDataLayer * BKE_attribute_search_for_write(AttributeOwner &owner, blender::StringRef name, eCustomDataMask type, AttrDomainMask domain_mask)
blender::bke::AttrDomain BKE_attribute_domain(const AttributeOwner &owner, const struct CustomDataLayer *layer)
Scene * CTX_data_scene(const bContext *C)
View3D * CTX_wm_view3d(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
blender::Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
#define BLI_assert_unreachable()
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define BLI_SCOPED_DEFER(function_to_defer)
#define POINTER_OFFSET(v, ofs)
Object is a sort of wrapper for general info.
void EDBM_update(Mesh *mesh, const EDBMUpdate_Params *params)
Mesh * ED_mesh_context(bContext *C)
bool ED_operator_editmesh(bContext *C)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
BMIterType
BMesh Iterators.
BMElem * BM_mesh_active_elem_get(BMesh *bm)
static AttributeOwner from_id(ID *id)
static const CPPType & get()
void destruct(void *ptr) const
void copy_assign(const void *src, void *dst) const
const CPPType * type() 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
void MESH_OT_attribute_set(wmOperatorType *ot)
const DataTypeConversions & get_implicit_type_conversions()
std::optional< AttrType > custom_data_type_to_attr_type(eCustomDataType data_type)
const CPPType * custom_data_type_to_cpp_type(eCustomDataType type)
const CPPType & attribute_type_to_cpp_type(AttrType type)
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)
static void mesh_set_attribute_ui(bContext *C, wmOperator *op)
static wmOperatorStatus mesh_set_attribute_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus mesh_set_attribute_exec(bContext *C, wmOperator *op)
static void bmesh_loop_layer_selected_values_set(BMEditMesh &em, const GPointer value, const int offset)
static void bmesh_vert_edge_face_layer_selected_values_set(BMesh &bm, const BMIterType iter_type, const GPointer value, const int offset)
static char domain_to_htype(const bke::AttrDomain domain)
static bool mesh_active_attribute_poll(bContext *C)
static void update(bNodeTree *ntree)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
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)
wmOperatorStatus WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *)