diff options
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 1 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_freestyle_types.h | 62 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_material_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/intern/makesdna.c | 2 |
5 files changed, 72 insertions, 1 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 new file mode 100644 index 00000000000..8444f6bd29a --- /dev/null +++ b/source/blender/makesdna/DNA_freestyle_types.h @@ -0,0 +1,62 @@ +#ifndef DNA_FREESTYLE_TYPES_H +#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; + + char module_path[256]; + short is_displayed; + short pad[3]; + +} FreestyleModuleConfig; + +typedef struct FreestyleConfig { + ListBase modules; + + int mode; /* scripting, editor */ + int flags; /* suggestive contours, ridges/valleys, material boundaries */ + float sphere_radius; + float dkr_epsilon; + float crease_angle; + int pad; + + ListBase linesets; + +} FreestyleConfig; + +#endif + diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index f8eb6e76693..9d87f618ec4 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -158,7 +158,7 @@ typedef struct Material { short sss_flag, sss_preset; int mapto_textured; /* render-time cache to optimise texture lookups */ - int pad4; + short vcol_alpha, pad4; ListBase gpumaterial; /* runtime */ } Material; diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index e6688060b22..62e8727e1d4 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -40,6 +40,7 @@ extern "C" { #include "DNA_vec_types.h" #include "DNA_listBase.h" #include "DNA_ID.h" +#include "DNA_freestyle_types.h" struct Object; struct World; @@ -161,6 +162,9 @@ typedef struct SceneRenderLayer { int passflag; /* pass_xor has to be after passflag */ int pass_xor; + + struct FreestyleConfig freestyleConfig; + } SceneRenderLayer; /* srl->layflag */ @@ -170,6 +174,7 @@ typedef struct SceneRenderLayer { #define SCE_LAY_EDGE 8 #define SCE_LAY_SKY 16 #define SCE_LAY_STRAND 32 +#define SCE_LAY_FRS 64 /* flags between 32 and 0x8000 are set to 1 already, for future options */ #define SCE_LAY_ALL_Z 0x8000 @@ -845,6 +850,7 @@ typedef struct Scene { #define R_NO_OVERWRITE 0x400000 /* skip existing files */ #define R_TOUCH 0x800000 /* touch files before rendering */ #define R_SIMPLIFY 0x1000000 +#define R_EDGE_FRS 0x2000000 /* R_EDGE for Freestyle */ /* seq_flag */ #define R_SEQ_GL_PREV 1 diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index fc5307000e3..ba038869027 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -129,6 +129,7 @@ char *includefiles[] = { "DNA_anim_types.h", "DNA_boid_types.h", "DNA_smoke_types.h", + "DNA_freestyle_types.h", // empty string to indicate end of includefiles "" @@ -1173,4 +1174,5 @@ int main(int argc, char ** argv) #include "DNA_anim_types.h" #include "DNA_boid_types.h" #include "DNA_smoke_types.h" +#include "DNA_freestyle_types.h" /* end of list */ |