individual inset was missing relative option.
This commit is contained in:
@@ -1512,6 +1512,7 @@ static BMOpDefine bmo_inset_individual_def = {
|
||||
{"depth", BMO_OP_SLOT_FLT},
|
||||
{"use_even_offset", BMO_OP_SLOT_BOOL},
|
||||
{"use_interpolate", BMO_OP_SLOT_BOOL},
|
||||
{"use_relative_offset", BMO_OP_SLOT_BOOL},
|
||||
{{'\0'}},
|
||||
},
|
||||
/* slots_out */
|
||||
|
||||
@@ -76,6 +76,7 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
|
||||
const float thickness = BMO_slot_float_get(op->slots_in, "thickness");
|
||||
const float depth = BMO_slot_float_get(op->slots_in, "depth");
|
||||
const bool use_even_offset = BMO_slot_bool_get(op->slots_in, "use_even_offset");
|
||||
const bool use_relative_offset = BMO_slot_bool_get(op->slots_in, "use_relative_offset");
|
||||
const bool use_interpolate = BMO_slot_bool_get(op->slots_in, "use_interpolate");
|
||||
|
||||
/* Only tag faces in slot */
|
||||
@@ -146,6 +147,10 @@ void bmo_inset_individual_exec(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
/* Modify vertices and their normals */
|
||||
if (use_relative_offset) {
|
||||
mul_v3_fl(tvec, (BM_edge_calc_length(l_iter->e) + BM_edge_calc_length(l_iter->prev->e)) / 2.0f);
|
||||
}
|
||||
|
||||
madd_v3_v3fl(v_new_co, tvec, thickness);
|
||||
|
||||
/* Set normal, add depth and write new vertex position*/
|
||||
|
||||
@@ -208,8 +208,10 @@ static bool edbm_inset_calc(wmOperator *op)
|
||||
|
||||
if (use_individual) {
|
||||
EDBM_op_init(em, &bmop, op,
|
||||
"inset_individual faces=%hf thickness=%f depth=%f use_even_offset=%b use_interpolate=%b",
|
||||
BM_ELEM_SELECT, thickness, depth, use_even_offset, use_interpolate);
|
||||
"inset_individual faces=%hf use_even_offset=%b use_relative_offset=%b"
|
||||
"use_interpolate=%b thickness=%f depth=%f",
|
||||
BM_ELEM_SELECT, use_even_offset, use_relative_offset, use_interpolate,
|
||||
thickness, depth);
|
||||
}
|
||||
else {
|
||||
EDBM_op_init(em, &bmop, op,
|
||||
|
||||
Reference in New Issue
Block a user