Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2014-07-17 17:20:22 +0400
committerHoward Trickey <howard.trickey@gmail.com>2014-07-17 17:20:22 +0400
commit70453c578dcdce5577015e1cd7be99d1b810215d (patch)
treea0e4a6a3e82b8dd9012ca9a6b8ce70ef011e9139 /source/blender/bmesh/operators
parent737cb8cf7c6e52ed7eef159b06df247be7d3406f (diff)
Fix T34664: bevel face material can be set in tool and modifier.
Now the bevel tool, modifier, and internal operator have a material slot # parameter that the user can set. If left at default of -1, behavior is as current -- bevel face material is taken from the closest original face (this may be ambiguous). If material slot is >= 0, it gives the material slot index number for the material to use.
Diffstat (limited to 'source/blender/bmesh/operators')
-rw-r--r--source/blender/bmesh/operators/bmo_bevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c
index 07a2e674863..213a0830e63 100644
--- a/source/blender/bmesh/operators/bmo_bevel.c
+++ b/source/blender/bmesh/operators/bmo_bevel.c
@@ -40,6 +40,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
const int seg = BMO_slot_int_get(op->slots_in, "segments");
const bool vonly = BMO_slot_bool_get(op->slots_in, "vertex_only");
const float profile = BMO_slot_float_get(op->slots_in, "profile");
+ const int material = BMO_slot_int_get(op->slots_in, "material");
if (offset > 0) {
BMOIter siter;
@@ -60,7 +61,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
}
}
- BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, false, NULL, -1);
+ BM_mesh_bevel(bm, offset, offset_type, seg, profile, vonly, false, false, NULL, -1, material);
BMO_slot_buffer_from_enabled_hflag(bm, op, op->slots_out, "faces.out", BM_FACE, BM_ELEM_TAG);
}