diff options
-rw-r--r-- | source/blender/blenkernel/intern/shrinkwrap.c | 7 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 75a955a09a9..48d9a4e0dee 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -378,9 +378,6 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) normal_projection_project_vertex(0, tmp_co, tmp_no, &local2aux, auxData.tree, &hit, auxData.raycast_callback, &auxData); normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, tmp_no, &calc->local2target, treeData.tree, &hit, treeData.raycast_callback, &treeData); - - if(hit.index != -1) - madd_v3_v3v3fl(hit.co, hit.co, tmp_no, -calc->keepDist); } //Project over negative direction of axis @@ -393,14 +390,12 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc) normal_projection_project_vertex(0, tmp_co, inv_no, &local2aux, auxData.tree, &hit, auxData.raycast_callback, &auxData); normal_projection_project_vertex(calc->smd->shrinkOpts, tmp_co, inv_no, &calc->local2target, treeData.tree, &hit, treeData.raycast_callback, &treeData); - - if(hit.index != -1) - madd_v3_v3v3fl(hit.co, hit.co, tmp_no, calc->keepDist); } if(hit.index != -1) { + madd_v3_v3v3fl(hit.co, hit.co, tmp_no, calc->keepDist); interp_v3_v3v3(co, co, hit.co, weight); } } diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 33a6856db73..15da48a82d4 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1900,11 +1900,11 @@ static void rna_def_modifier_shrinkwrap(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ShrinkwrapModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - + prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "keepDist"); - RNA_def_property_range(prop, 0, FLT_MAX); - RNA_def_property_ui_range(prop, 0, 100, 1, 2); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, -100, 100, 1, 2); RNA_def_property_ui_text(prop, "Offset", "Distance to keep from the target"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); |