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>2012-12-20 11:57:26 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-12-20 11:57:26 +0400
commita462d69bbf771e49d2fa49589608c375376b42ed (patch)
tree60d85d4131399a0a39dbc582e30a7144b14edc18 /source/blender/makesdna
parentd433cd65f7127d60e17d05a824290423ad226eae (diff)
Another big patch set by Bastien Montagne, thanks a lot!
* Made Freestyle optional (turned on by default). * Fix for missing bpath.c updates in the previous merge of trunk changes.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/CMakeLists.txt4
-rw-r--r--source/blender/makesdna/DNA_ID.h4
-rw-r--r--source/blender/makesdna/DNA_action_types.h2
-rw-r--r--source/blender/makesdna/DNA_material_types.h2
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_scene_types.h12
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h2
-rw-r--r--source/blender/makesdna/SConscript6
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt3
-rw-r--r--source/blender/makesdna/intern/SConscript3
-rw-r--r--source/blender/makesdna/intern/makesdna.c4
12 files changed, 46 insertions, 2 deletions
diff --git a/source/blender/makesdna/CMakeLists.txt b/source/blender/makesdna/CMakeLists.txt
index 638d618d785..c60907060f7 100644
--- a/source/blender/makesdna/CMakeLists.txt
+++ b/source/blender/makesdna/CMakeLists.txt
@@ -23,4 +23,8 @@
#
# ***** END GPL LICENSE BLOCK *****
+if(WITH_FREESTYLE)
+ add_definitions(-DWITH_FREESTYLE)
+endif()
+
add_subdirectory(intern)
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 476ee4fa369..7b2773a8205 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -207,7 +207,9 @@ typedef struct PreviewImage {
#define ID_WM MAKE_ID2('W', 'M') /* WindowManager */
#define ID_MC MAKE_ID2('M', 'C') /* MovieClip */
#define ID_MSK MAKE_ID2('M', 'S') /* Mask */
-#define ID_LS MAKE_ID2('L', 'S') /* FreestyleLineStyle */
+/* #ifdef WITH_FREESTYLE */
+# define ID_LS MAKE_ID2('L', 'S') /* FreestyleLineStyle */
+/* #endif */
/* NOTE! Fake IDs, needed for g.sipo->blocktype or outliner */
#define ID_SEQ MAKE_ID2('S', 'Q')
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 94d8ed00cf7..3f6e6c59137 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -556,7 +556,9 @@ typedef enum eDopeSheet_FilterFlag {
ADS_FILTER_NONTREE = (1 << 19),
ADS_FILTER_NOTEX = (1 << 20),
ADS_FILTER_NOSPK = (1 << 21),
+/* #ifdef WITH_FREESTYLE */
ADS_FILTER_NOLINESTYLE = (1 << 22),
+/* #endif */
/* NLA-specific filters */
ADS_FILTER_NLA_NOACT = (1 << 25), /* if the AnimData block has no NLA data, don't include to just show Action-line */
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 11b93b5fefe..919aa092616 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -177,8 +177,10 @@ typedef struct Material {
short shadowonly_flag; /* "shadowsonly" type */
short index; /* custom index for render passes */
+/* #ifdef WITH_FREESTYLE */
short vcol_alpha;
short pad4[3];
+/* #endif */
ListBase gpumaterial; /* runtime */
} Material;
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 058be2e2046..4f47ed76d50 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -192,8 +192,10 @@ typedef struct TFace {
/* debug only option */
#define ME_DRAWEXTRA_INDICES (1 << 13)
+/* #ifdef WITH_FREESTYLE */
#define ME_DRAW_FREESTYLE_EDGE (1 << 14)
#define ME_DRAW_FREESTYLE_FACE (1 << 15)
+/* #endif */
/* Subsurf Type */
#define ME_CC_SUBSURF 0
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index bdb1568c73f..af1981ae07d 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -290,7 +290,9 @@ typedef struct MVertSkin {
#define ME_LOOSEEDGE (1<<7)
/* #define ME_SEAM_LAST (1<<8) */ /* UNUSED */
#define ME_SHARP (1<<9) /* only reason this flag remains a 'short' */
+/* #ifdef WITH_FREESTYLE */
#define ME_FREESTYLE_EDGE (1<<10)
+/* #endif */
/* puno = vertexnormal (mface) */
#define ME_PROJXY 16
@@ -307,7 +309,9 @@ typedef struct MVertSkin {
/* flag (mface) */
#define ME_SMOOTH 1
#define ME_FACE_SEL 2
+/* #ifdef WITH_FREESTYLE */
#define ME_FREESTYLE_FACE 4
+/* #endif */
/* flag ME_HIDE==16 is used here too */
#define ME_POLY_LOOP_PREV(mloop, mp, i) (&(mloop)[(mp)->loopstart + (((i) + (mp)->totloop - 1) % (mp)->totloop)])
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index a2eb54bde99..26a41054281 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -45,7 +45,9 @@ extern "C" {
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
#include "DNA_ID.h"
+/* #ifdef WITH_FREESTYLE */
#include "DNA_freestyle_types.h"
+/* #endif */
struct Object;
struct Brush;
@@ -189,7 +191,9 @@ typedef struct SceneRenderLayer {
int samples;
int pad;
+/* #ifdef WITH_FREESTYLE */
struct FreestyleConfig freestyleConfig;
+/* #endif */
} SceneRenderLayer;
/* srl->layflag */
@@ -199,7 +203,9 @@ typedef struct SceneRenderLayer {
#define SCE_LAY_EDGE 8
#define SCE_LAY_SKY 16
#define SCE_LAY_STRAND 32
+/* #ifdef WITH_FREESTYLE */
#define SCE_LAY_FRS 64
+/* #endif */
/* flags between 64 and 0x8000 are set to 1 already, for future options */
#define SCE_LAY_ALL_Z 0x8000
@@ -540,9 +546,11 @@ typedef struct RenderData {
float pad2;
struct Text *dometext DNA_DEPRECATED; // XXX deprecated since 2.5
+/* #ifdef WITH_FREESTYLE */
/* Freestyle line thickness options */
int line_thickness_mode;
float unit_line_thickness; /* in pixels */
+/* #endif */
/* render engine */
char engine[32];
@@ -1325,9 +1333,11 @@ typedef struct Scene {
/* simplify_flag */
#define R_SIMPLE_NO_TRIANGULATE 1
+/* #ifdef WITH_FREESTYLE */
/* line_thickness_mode */
#define R_LINE_THICKNESS_ABSOLUTE 1
#define R_LINE_THICKNESS_RELATIVE 2
+/* #endif */
/* sequencer seq_prev_type seq_rend_type */
@@ -1523,7 +1533,9 @@ typedef enum SculptFlags {
#define EDGE_MODE_TAG_SHARP 2
#define EDGE_MODE_TAG_CREASE 3
#define EDGE_MODE_TAG_BEVEL 4
+/* #ifdef WITH_FREESTYLE */
#define EDGE_MODE_TAG_FREESTYLE 5
+/* #endif */
/* toolsettings->gpencil_flags */
#define GP_TOOL_FLAG_PAINTSESSIONS_ON (1<<0)
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 2f082afb189..83d9ed6bf7c 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -225,7 +225,9 @@ typedef struct ThemeSpace {
char bone_solid[4], bone_pose[4], bone_pose_active[4];
char strip[4], strip_select[4];
char cframe[4];
+/* #ifdef WITH_FREESTYLE */
char freestyle_edge_mark[4], freestyle_face_mark[4];
+/* #endif */
char nurb_uline[4], nurb_vline[4];
char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4], lastsel_point[4];
diff --git a/source/blender/makesdna/SConscript b/source/blender/makesdna/SConscript
index a6520a6c03e..d4eabb03b13 100644
--- a/source/blender/makesdna/SConscript
+++ b/source/blender/makesdna/SConscript
@@ -28,10 +28,14 @@
Import ('env')
objs = []
+defs = []
o = SConscript('intern/SConscript')
objs += o
incs = '#/intern/guardedalloc .'
-env.BlenderLib ( 'bf_dna', objs, Split(incs), [], libtype=['core','player'], priority = [215,200] )
+if env['WITH_BF_FREESTYLE']:
+ defs.append('WITH_FREESTYLE')
+
+env.BlenderLib ( 'bf_dna', objs, Split(incs), defs, libtype=['core','player'], priority = [215,200] )
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 1dd1d7e8f87..0632564b998 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -34,6 +34,9 @@ blender_include_dirs(
..
)
+if(WITH_FREESTYLE)
+ add_definitions(-DWITH_FREESTYLE)
+endif()
# -----------------------------------------------------------------------------
# Build makesdna executable
diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript
index add9611866d..8fd5b67c44b 100644
--- a/source/blender/makesdna/intern/SConscript
+++ b/source/blender/makesdna/intern/SConscript
@@ -39,6 +39,9 @@ root_build_dir=normpath(env['BF_BUILDDIR'])
source_files = ['makesdna.c']
header_files = env.Glob('../*.h')
+if env['WITH_BF_FREESTYLE']:
+ defines.append('WITH_FREESTYLE')
+
makesdna_tool = env.Clone()
dna = env.Clone()
makesdna_tool.Append(CCFLAGS = '-DBASE_HEADER="\\"source/blender/makesdna/\\"" ')
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 12df9def368..b04052a98ef 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -133,8 +133,10 @@ static const char *includefiles[] = {
"DNA_tracking_types.h",
"DNA_dynamicpaint_types.h",
"DNA_mask_types.h",
+/* #ifdef WITH_FREESTYLE */
"DNA_freestyle_types.h",
"DNA_linestyle_types.h",
+/* #endif */
/* empty string to indicate end of includefiles */
""
@@ -1264,6 +1266,8 @@ int main(int argc, char **argv)
#include "DNA_tracking_types.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_mask_types.h"
+/* #ifdef WITH_FREESTYLE */
#include "DNA_freestyle_types.h"
#include "DNA_linestyle_types.h"
+/* #endif */
/* end of list */