Fix T59500: Weight Smoothing Not Working
authorPhilipp Oeser <info@graphics-engineer.com>
Tue, 18 Dec 2018 10:19:57 +0000 (11:19 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Wed, 19 Dec 2018 10:51:49 +0000 (11:51 +0100)
Reviewers: brecht, dfelinto

Maniphest Tasks: T59500

Differential Revision: https://developer.blender.org/D4094

source/blender/editors/object/object_vgroup.c

index 599ab0d7301d4713f70cd4bb5cd0cde1413ac923..036689509e99c046d9fc5b334932a1688fb70fc7 100644 (file)
@@ -3124,9 +3124,11 @@ static int vertex_group_smooth_exec(bContext *C, wmOperator *op)
        eVGroupSelect subset_type  = RNA_enum_get(op->ptr, "group_select_mode");
        const float fac_expand = RNA_float_get(op->ptr, "expand");
        ViewLayer *view_layer = CTX_data_view_layer(C);
+       Object *ob_ctx = ED_object_context(C);
 
        uint objects_len = 0;
-       Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, CTX_wm_view3d(C), &objects_len);
+       Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(view_layer, CTX_wm_view3d(C), &objects_len,
+                                                                                ob_ctx->mode);
        for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
                Object *ob = objects[ob_index];