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>2010-06-26 02:45:42 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-06-26 02:45:42 +0400
commitee61785384b9fa351d57b0803ab1ab44c8498016 (patch)
tree205be39142a6cca2205b2cdd1eb05e56ad7904aa /source/blender/makesdna
parent4d141cf80821fa0dc9533f24583fbf7e53eab5b4 (diff)
A step toward a new user-friendly GUI for manipulating line style parameters.
This commit is just meant to give the new GUI framework a concrete shape. There is no usefulness in newly introduced elements at the moment. Freestyle options in render layers now include a pull-down menu named Control Mode that allows you to choose either the Python Scripting or Parameter Editor mode. The Python Scripting mode is the conventional way of controlling Freestyle by directly using style modules written in Python. The Parameter Editor is a new control mode that is intended to be used by everyone without relying on Python programming. In the Parameter Editor mode, you can specify multiple line sets for each render layer. A line set defines feature edge selection criteria, as well as a line style for drawing the selected feature edges using specific line stylization parameters. Line style is a new datablock type, meaning that a line style can be shared by multiple line sets (possibly those in different render layers in different scenes). Much more additions are anticipated in subsequent commits to implement UI controls for specifying feature edge selection criteria and line stylization parameters.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_ID.h1
-rw-r--r--source/blender/makesdna/DNA_freestyle_types.h36
2 files changed, 34 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 7c3641db379..b8b35c6ba10 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -186,6 +186,7 @@ typedef struct PreviewImage {
#define ID_PA MAKE_ID2('P', 'A') /* ParticleSettings */
#define ID_GD MAKE_ID2('G', 'D') /* GreasePencil */
#define ID_WM MAKE_ID2('W', 'M') /* WindowManager */
+#define ID_LS MAKE_ID2('L', 'S') /* FreestyleLineStyle */
/* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
#define ID_SEQ MAKE_ID2('S', 'Q')
diff --git a/source/blender/makesdna/DNA_freestyle_types.h b/source/blender/makesdna/DNA_freestyle_types.h
index c49a47fc22a..8444f6bd29a 100644
--- a/source/blender/makesdna/DNA_freestyle_types.h
+++ b/source/blender/makesdna/DNA_freestyle_types.h
@@ -2,11 +2,39 @@
#define DNA_FREESTYLE_TYPES_H
#include "DNA_listBase.h"
+#include "DNA_ID.h"
+/* FreestyleConfig::flags */
#define FREESTYLE_SUGGESTIVE_CONTOURS_FLAG 1
#define FREESTYLE_RIDGES_AND_VALLEYS_FLAG 2
#define FREESTYLE_MATERIAL_BOUNDARIES_FLAG 4
+/* FreestyleConfig::mode */
+#define FREESTYLE_CONTROL_SCRIPT_MODE 1
+#define FREESTYLE_CONTROL_EDITOR_MODE 2
+
+/* FreestyleLineSet::flags */
+#define FREESTYLE_LINESET_CURRENT 1
+#define FREESTYLE_LINESET_ENABLED 2
+
+typedef struct FreestyleLineStyle {
+ ID id;
+
+} FreestyleLineStyle;
+
+typedef struct FreestyleLineSet {
+ struct FreestyleLineSet *next, *prev;
+
+ char name[32]; /* line set name */
+ int flags;
+ int pad;
+
+ FreestyleLineStyle *linestyle; /* line style */
+
+ ListBase objects; /* target objects on which stylized lines are drawn */
+
+} FreestyleLineSet;
+
typedef struct FreestyleModuleConfig {
struct FreestyleModuleConfig *next, *prev;
@@ -19,14 +47,16 @@ typedef struct FreestyleModuleConfig {
typedef struct FreestyleConfig {
ListBase modules;
- int flags;
+ int mode; /* scripting, editor */
+ int flags; /* suggestive contours, ridges/valleys, material boundaries */
float sphere_radius;
float dkr_epsilon;
float crease_angle;
+ int pad;
-} FreestyleConfig;
-
+ ListBase linesets;
+} FreestyleConfig;
#endif