From 31e62492564b32309ce5100ae40a6664b38d7baa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 30 Mar 2017 12:39:51 +1100 Subject: Mirror Modifier: Add offsets for mirrored UVs The mirror modifier now has two fields that specify a -1 to 1 offset for the U and V axes when mirroring their coordinates. D1844 by @circuitfox --- source/blender/makesrna/intern/rna_modifier.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source/blender/makesrna/intern') diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 36cf909b299..1a8dd05a7b5 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -1526,6 +1526,20 @@ static void rna_def_modifier_mirror(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Mirror V", "Mirror the V texture coordinate around the 0.5 point"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "mirror_offset_u", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "uv_offset[0]"); + RNA_def_property_range(prop, -1, 1); + RNA_def_property_ui_range(prop, -1, 1, 2, 4); + RNA_def_property_ui_text(prop, "U Offset", "Amount to offset mirrored UVs from the 0.5 point on the U axis"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "mirror_offset_v", PROP_FLOAT, PROP_FACTOR); + RNA_def_property_float_sdna(prop, NULL, "uv_offset[1]"); + RNA_def_property_range(prop, -1, 1); + RNA_def_property_ui_range(prop, -1, 1, 2, 4); + RNA_def_property_ui_text(prop, "V Offset", "Amount to offset mirrored UVs from the 0.5 point on the V axis"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); + prop = RNA_def_property(srna, "merge_threshold", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "tolerance"); RNA_def_property_range(prop, 0, FLT_MAX); -- cgit v1.2.3