diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-23 23:52:03 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-23 23:52:27 +0300 |
commit | 0c0db92d7aabb486be5cfd4d5c6e2e1ed3f56dbc (patch) | |
tree | e597008ada2bd52b09d4d16c1356cc30d7326eac /source/blender/makesrna | |
parent | 36630b7e854ba69520aab9be411361589eb3ce83 (diff) |
Sculpt Tiling Feature
Adds 3D-Tiling options to the sculpt tool. This is very similar to the
symmetry options in the sense that it replicates the strokes. For tiling
this replication happens with a linear offset to fill the whole object
along one or more axis.
This allows to create geometry that can be tiled seamless. One use case
is the creation of tileable textures by sculpting high resolution
geometry and then rendering it with an orthographic camera to create
maps for diffuse, normal, etc
Notes:
Patch by Tilman Blumhagen with minor changes (move tile flags to paint
symmetry flags).
After some feedback from artists, leaving tiling value to constant
offset, though I suspect that some method that uses the object
bounding box dynamically might be good to have too. It can
be added later though :)
Thanks a lot for the patch!
Patch: D1426
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 7b30aa84cfb..3ec9944900a 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -443,6 +443,28 @@ static void rna_def_paint(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Cavity Mask", "Mask painting according to mesh geometry cavity"); RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + prop = RNA_def_property(srna, "tile_offset", PROP_FLOAT, PROP_XYZ); + RNA_def_property_float_sdna(prop, NULL, "tile_offset"); + RNA_def_property_array(prop, 3); + RNA_def_property_range(prop, 0.01, FLT_MAX); + RNA_def_property_ui_range(prop, 0.01, 100, 1 * 100, 2); + RNA_def_property_ui_text(prop, "Tiling offset for the X Axis", + "Stride at which tiled strokes are copied"); + + prop = RNA_def_property(srna, "tile_x", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_TILE_X); + RNA_def_property_ui_text(prop, "Tile X", "Tile along X axis"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "tile_y", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_TILE_Y); + RNA_def_property_ui_text(prop, "Tile Y", "Tile along Y axis"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); + + prop = RNA_def_property(srna, "tile_z", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "symmetry_flags", PAINT_TILE_Z); + RNA_def_property_ui_text(prop, "Tile Z", "Tile along Z axis"); + RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); } static void rna_def_sculpt(BlenderRNA *brna) |