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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-09-20 03:24:14 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-09-20 03:24:14 +0400
commit5582d9fac13123397297db54a0478a63a1b75194 (patch)
tree242143a9ab8e411858f0c2a67ebc28447a821721 /source/blender
parent81702789d15668f22b1cd173361b3f20fb1fea34 (diff)
Rearranged the organization of chaining options in line styles.
New there are only two chaining types: plain and sketchy. Both chaining types have the "same object" option. With this option enabled, only feature edges of the same object are chained. The sketchy chaining also has the "rounds" option to specify the number of rounds in a sketchy multiple touch. Also removed a temporary workaround (implemented by means of a custom chaining rule) for infinite straight lines, which has resulted in much cleaner strokes.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c7
4 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 167f440ffd0..faf4b11f489 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -69,7 +69,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->r = linestyle->g = linestyle->b = 0.0;
linestyle->alpha = 1.0;
linestyle->thickness = 1.0;
- linestyle->chaining = LS_CHAINING_NATURAL;
+ linestyle->chaining = LS_CHAINING_PLAIN;
linestyle->rounds = 3;
linestyle->min_length = 0.0f;
linestyle->max_length = 10000.0f;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index febd5398788..132db3c3577 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -12281,7 +12281,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
if (linestyle->chaining == 0)
- linestyle->chaining= LS_CHAINING_NATURAL;
+ linestyle->chaining= LS_CHAINING_PLAIN;
if (linestyle->rounds == 0)
linestyle->rounds= 3;
}
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index d3536da2336..6d1b60f1d83 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -323,9 +323,8 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
#define LS_MAX_2D_LENGTH 32
/* FreestyleLineStyle::chaining */
-#define LS_CHAINING_NATURAL 1
-#define LS_CHAINING_SKETCHY_TOPOLOGY_PRESERVED 2
-#define LS_CHAINING_SKETCHY_TOPOLOGY_BROKEN 3
+#define LS_CHAINING_PLAIN 1
+#define LS_CHAINING_SKETCHY 2
/* FreestyleLineStyle::caps */
#define LS_CAPS_BUTT 1
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 415379b39d1..608d5c295a4 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -675,9 +675,8 @@ static void rna_def_linestyle(BlenderRNA *brna)
{LS_PANEL_MISC, "MISC", 0, "Misc", "Show the panel for miscellaneous options."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem chaining_items[] = {
- {LS_CHAINING_NATURAL, "NATURAL", 0, "Natural", "Natural chaining."},
- {LS_CHAINING_SKETCHY_TOPOLOGY_PRESERVED, "SKETCHY_TOPOLOGY_PRESERVED", 0, "Sketchy: Topology Preserved", "Natural chaining with a sketchy multiple touch."},
- {LS_CHAINING_SKETCHY_TOPOLOGY_BROKEN, "SKETCHY_TOPOLOGY_BROKEN", 0, "Sketchy: Topology Broken", "Sketchy chaining with a broken topology of objects."},
+ {LS_CHAINING_PLAIN, "PLAIN", 0, "Plain", "Plain chaining."},
+ {LS_CHAINING_SKETCHY, "SKETCHY", 0, "Sketchy", "Sketchy chaining with a multiple touch."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem cap_items[] = {
{LS_CAPS_BUTT, "BUTT", 0, "Butt", "Butt cap (flat)."},
@@ -737,7 +736,7 @@ static void rna_def_linestyle(BlenderRNA *brna)
prop= RNA_def_property(srna, "rounds", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "rounds");
RNA_def_property_range(prop, 1, 1000);
- RNA_def_property_ui_text(prop, "Rounds", "Number of rounds in a sketch multiple touch.");
+ RNA_def_property_ui_text(prop, "Rounds", "Number of rounds in a sketchy multiple touch.");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "geometry_modifiers", PROP_COLLECTION, PROP_NONE);