70 if (
mesh ==
nullptr) {
73 if (!
mesh->runtime->edit_mesh) {
104 const short selectmode,
159 *op->
ptr, active_type, buffer);
163 bool changed =
false;
164 for (
Object *
object : objects) {
175 if (&type != &dst_type && !conversions.
is_convertible(type, dst_type)) {
181 const GPointer dst_value(dst_type, dst_buffer);
271 ot->
name =
"Set Attribute";
272 ot->
description =
"Set values of the active attribute for selected elements";
273 ot->
idname =
"MESH_OT_attribute_set";
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define BLI_SCOPED_DEFER(function_to_defer)
Object is a sort of wrapper for general info.
#define BLI_assert_unreachable()
#define POINTER_OFFSET(v, ofs)
#define BM_elem_flag_test(ele, hflag)
#define BM_ITER_ELEM(ele, iter, data, itype)
#define BM_ITER_MESH(ele, iter, bm, itype)
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
const DataTypeConversions & get_implicit_type_conversions()
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(BMesh &bm, const short selectmode, 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)
std::optional< StringRefNull > BKE_attributes_active_name_get(AttributeOwner &owner)
BMesh * BKE_editmesh_bmesh_get_for_write(Mesh *mesh)
void EDBM_update(Mesh *mesh, const EDBMUpdate_Params *params)
ViewLayer * CTX_data_view_layer(const bContext *C)
bool ED_operator_editmesh(bContext *C)
void MESH_OT_attribute_set(wmOperatorType *ot)
wmOperatorStatus WM_operator_props_popup(bContext *C, wmOperator *op, const wmEvent *)
BMDataLayerLookup BM_data_layer_lookup(const BMesh &bm, const StringRef name)
BMEditMesh * BKE_editmesh_from_object(Object *ob)
Return the BMEditMesh for a given object.
Mesh * ED_mesh_context(bContext *C)
Main * CTX_data_main(const bContext *C)
BMElem * BM_mesh_active_elem_get(BMesh *bm)
Vector< Object * > BKE_view_layer_array_from_objects_in_edit_mode_unique_data(const Main &bmain, const Scene *scene, ViewLayer *view_layer, const View3D *v3d)
Scene * CTX_data_scene(const bContext *C)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
View3D * CTX_wm_view3d(const bContext *C)
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
Layout & column(bool align)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) ui(bContext *C, wmOperator *op)
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT