Commit: 997eb77fd4ab69252c2c8bb03a9b348878faaf24 Author: Iliya Katueshenock Date: Mon Dec 26 14:49:20 2022 -0500 Branches: master https://developer.blender.org/rB997eb77fd4ab69252c2c8bb03a9b348878faaf24
Fix T103453: Don't allow call Attribute Convert operator in edit mode Don't allow calling Attribute Convert operator in edit mode. Right now BMesh does not support attribute operations. Differential Revision: https://developer.blender.org/D16864 =================================================================== M source/blender/editors/geometry/geometry_attributes.cc =================================================================== diff --git a/source/blender/editors/geometry/geometry_attributes.cc b/source/blender/editors/geometry/geometry_attributes.cc index 1ffc047fe2c..696397bd12a 100644 --- a/source/blender/editors/geometry/geometry_attributes.cc +++ b/source/blender/editors/geometry/geometry_attributes.cc @@ -599,15 +599,22 @@ static bool geometry_color_attribute_convert_poll(bContext *C) return false; } + if (CTX_data_edit_object(C) != nullptr) { + CTX_wm_operator_poll_msg_set(C, "Operation is not allowed in edit mode"); + return false; + } + Object *ob = ED_object_context(C); ID *id = static_cast<ID *>(ob->data); if (GS(id->name) != ID_ME) { return false; } + CustomDataLayer *layer = BKE_id_attributes_active_color_get(id); if (layer == nullptr) { return false; } + return true; } _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
