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:
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_collection_types.h46
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h8
-rw-r--r--source/blender/makesdna/DNA_gpencil_types.h2
-rw-r--r--source/blender/makesdna/DNA_lanpr_types.h138
-rw-r--r--source/blender/makesdna/DNA_material_types.h1
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h16
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h44
-rw-r--r--source/blender/makesdna/DNA_object_types.h13
-rw-r--r--source/blender/makesdna/DNA_scene_types.h76
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
-rw-r--r--source/blender/makesdna/intern/makesdna.c2
11 files changed, 336 insertions, 12 deletions
diff --git a/source/blender/makesdna/DNA_collection_types.h b/source/blender/makesdna/DNA_collection_types.h
index af543864536..4b1a86cd7b1 100644
--- a/source/blender/makesdna/DNA_collection_types.h
+++ b/source/blender/makesdna/DNA_collection_types.h
@@ -43,6 +43,49 @@ typedef struct CollectionChild {
struct Collection *collection;
} CollectionChild;
+enum CollectionFeatureLine_Usage {
+ COLLECTION_FEATURE_LINE_INCLUDE = 0,
+ COLLECTION_FEATURE_LINE_OCCLUSION_ONLY = (1 << 0),
+ COLLECTION_FEATURE_LINE_EXCLUDE = (1 << 1),
+};
+
+typedef struct CollectionLANPR {
+ short usage;
+ short force; /* force objects with LANPR modifier follow the rule */
+
+ int types;
+
+ struct Object *target;
+ int replace;
+ int layer;
+ int material;
+ int use_multiple_levels;
+ int level_start;
+ int level_end;
+} CollectionLANPR;
+
+/* CollectionLANPR->types */
+enum CollectionFeatureLine_TypeFlag {
+ COLLECTION_FEATURE_LINE_NONE = (1 << 0),
+ COLLECTION_FEATURE_LINE_CONTOUR = (1 << 1),
+ COLLECTION_FEATURE_LINE_CREASE = (1 << 2),
+ COLLECTION_FEATURE_LINE_MARK = (1 << 3),
+ COLLECTION_FEATURE_LINE_MATERIAL = (1 << 4),
+ COLLECTION_FEATURE_LINE_INTERSECTION = (1 << 5),
+};
+
+#define COLLECTION_FEATURE_LINE_ALL \
+ (COLLECTION_FEATURE_LINE_CONTOUR | COLLECTION_FEATURE_LINE_CREASE | \
+ COLLECTION_FEATURE_LINE_MARK | COLLECTION_FEATURE_LINE_MATERIAL | \
+ COLLECTION_FEATURE_LINE_INTERSECTION)
+
+/* CollectionLANPR->mode */
+enum {
+ COLLECTION_LANPR_INCLUDE = 0,
+ COLLECTION_LANPR_OCCLUSION_ONLY = 1,
+ COLLECTION_LANPR_EXCLUDE = 2,
+};
+
typedef struct Collection {
ID id;
@@ -61,6 +104,9 @@ typedef struct Collection {
short tag;
char _pad[4];
+ /** LANPR engine specific */
+ CollectionLANPR lanpr;
+
/* Runtime. Cache of objects in this collection and all its
* children. This is created on demand when e.g. some physics
* simulation needs it, we don't want to have it for every
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index 9799489982d..415eb03e26d 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -139,8 +139,8 @@ typedef enum CustomDataType {
CD_PAINT_MASK = 34,
CD_GRID_PAINT_MASK = 35,
CD_MVERT_SKIN = 36,
- CD_FREESTYLE_EDGE = 37,
- CD_FREESTYLE_FACE = 38,
+ CD_LANPR_EDGE = 37,
+ CD_LANPR_FACE = 38,
CD_MLOOPTANGENT = 39,
CD_TESSLOOPNORMAL = 40,
CD_CUSTOMLOOPNORMAL = 41,
@@ -188,8 +188,8 @@ typedef enum CustomDataType {
#define CD_MASK_PAINT_MASK (1LL << CD_PAINT_MASK)
#define CD_MASK_GRID_PAINT_MASK (1LL << CD_GRID_PAINT_MASK)
#define CD_MASK_MVERT_SKIN (1LL << CD_MVERT_SKIN)
-#define CD_MASK_FREESTYLE_EDGE (1LL << CD_FREESTYLE_EDGE)
-#define CD_MASK_FREESTYLE_FACE (1LL << CD_FREESTYLE_FACE)
+#define CD_MASK_FREESTYLE_EDGE (1LL << CD_LANPR_EDGE)
+#define CD_MASK_FREESTYLE_FACE (1LL << CD_LANPR_FACE)
#define CD_MASK_MLOOPTANGENT (1LL << CD_MLOOPTANGENT)
#define CD_MASK_TESSLOOPNORMAL (1LL << CD_TESSLOOPNORMAL)
#define CD_MASK_CUSTOMLOOPNORMAL (1LL << CD_CUSTOMLOOPNORMAL)
diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h
index 2dffdf82688..9f058051c00 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -294,6 +294,8 @@ typedef enum eGPDframe_Flag {
GP_FRAME_PAINT = (1 << 0),
/* for editing in Action Editor */
GP_FRAME_SELECT = (1 << 1),
+ /* LANPR generation */
+ GP_FRAME_LANPR_CLEARED = (1 << 2),
} eGPDframe_Flag;
/* ***************************************** */
diff --git a/source/blender/makesdna/DNA_lanpr_types.h b/source/blender/makesdna/DNA_lanpr_types.h
new file mode 100644
index 00000000000..2ba468ba56c
--- /dev/null
+++ b/source/blender/makesdna/DNA_lanpr_types.h
@@ -0,0 +1,138 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2010 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef __DNA_LANPR_TYPES_H__
+#define __DNA_LANPR_TYPES_H__
+
+/** \file DNA_lanpr_types.h
+ * \ingroup DNA
+ */
+
+#include "DNA_listBase.h"
+#include "DNA_ID.h"
+#include "DNA_collection_types.h"
+
+struct Object;
+struct Material;
+struct Collection;
+
+typedef enum LANPR_TaperSettings {
+ LANPR_USE_DIFFERENT_TAPER = 0,
+ LANPR_USE_SAME_TAPER = 1,
+} LANPR_TaperSettings;
+
+typedef enum LANPR_NomalEffect {
+ /* Shouldn't have access to zero value. */
+ /* Enable/disable is another flag. */
+ LANPR_NORMAL_DIRECTIONAL = 1,
+ LANPR_NORMAL_POINT = 2,
+} LANPR_NomalEffect;
+
+typedef enum LANPR_ComponentMode {
+ LANPR_COMPONENT_MODE_ALL = 0,
+ LANPR_COMPONENT_MODE_OBJECT = 1,
+ LANPR_COMPONENT_MODE_MATERIAL = 2,
+ LANPR_COMPONENT_MODE_COLLECTION = 3,
+} LANPR_ComponentMode;
+
+typedef enum LANPR_ComponentUsage {
+ LANPR_COMPONENT_INCLUSIVE = 0,
+ LANPR_COMPONENT_EXCLUSIVE = 1,
+} LANPR_ComponentUsage;
+
+typedef enum LANPR_ComponentLogic {
+ LANPR_COMPONENT_LOGIG_OR = 0,
+ LANPR_COMPONENT_LOGIC_AND = 1,
+} LANPR_ComponentLogic;
+
+struct DRWShadingGroup;
+
+typedef struct LANPR_LineLayerComponent {
+ struct LANPR_LineLayerComponent *next, *prev;
+
+ struct Object *object_select;
+ struct Material *material_select;
+ struct Collection *collection_select;
+
+ int component_mode;
+ int what;
+
+} LANPR_LineLayerComponent;
+
+typedef struct LANPR_LineType {
+ int use;
+ float thickness;
+ float color[4];
+} LANPR_LineType;
+
+typedef enum LANPR_LineLayerFlags {
+ LANPR_LINE_LAYER_USE_SAME_STYLE = (1 << 0),
+ LANPR_LINE_LAYER_USE_MULTIPLE_LEVELS = (1 << 1),
+ LANPR_LINE_LAYER_NORMAL_ENABLED = (1 << 2),
+ LANPR_LINE_LAYER_NORMAL_INVERSE = (1 << 3),
+} LANPR_LineLayerFlags;
+
+typedef struct LANPR_LineLayer {
+ struct LANPR_LineLayer *next, *prev;
+
+ int flags;
+ int _pad1;
+ int level_start;
+ int level_end;
+
+ /** To be displayed on the list */
+ char name[64];
+
+ LANPR_LineType contour;
+ LANPR_LineType crease;
+ LANPR_LineType edge_mark;
+ LANPR_LineType material_separate;
+ LANPR_LineType intersection;
+
+ float thickness;
+
+ float color[4];
+
+ int normal_mode;
+ float normal_ramp_begin;
+ float normal_ramp_end;
+ float normal_thickness_start;
+ float normal_thickness_end;
+ struct Object *normal_control_object;
+
+ /** For component evaluation */
+ int logic_mode;
+ int _pad3;
+
+ ListBase components;
+
+ struct DRWShadingGroup *shgrp;
+ struct GPUBatch *batch;
+
+} LANPR_LineLayer;
+
+#endif
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 1d1ccef8846..3d309f3c22f 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -27,6 +27,7 @@
#include "DNA_defs.h"
#include "DNA_ID.h"
#include "DNA_listBase.h"
+#include "DNA_lanpr_types.h"
#ifndef MAX_MTEX
# define MAX_MTEX 18
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index f6a7a8a5f5b..50402bbdc87 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -363,24 +363,24 @@ typedef struct MVertSkin {
int flag;
} MVertSkin;
-typedef struct FreestyleEdge {
+typedef struct LanprEdge {
char flag;
char _pad[3];
-} FreestyleEdge;
+} LanprEdge;
-/* FreestyleEdge->flag */
+/* LanprEdge->flag */
enum {
- FREESTYLE_EDGE_MARK = 1,
+ LANPR_EDGE_MARK = 1,
};
-typedef struct FreestyleFace {
+typedef struct LanprFace {
char flag;
char _pad[3];
-} FreestyleFace;
+} LanprFace;
-/* FreestyleFace->flag */
+/* LanprFace->flag */
enum {
- FREESTYLE_FACE_MARK = 1,
+ LANPR_FACE_MARK = 1,
};
/* mvert->flag */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 5243dc1aecd..86d01fd7f54 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -86,6 +86,7 @@ typedef enum ModifierType {
eModifierType_MeshSequenceCache = 52,
eModifierType_SurfaceDeform = 53,
eModifierType_WeightedNormal = 54,
+ eModifierType_FeatureLine = 55,
NUM_MODIFIER_TYPES,
} ModifierType;
@@ -1944,4 +1945,47 @@ enum {
#define MOD_MESHSEQ_READ_ALL \
(MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR)
+enum {
+ MOD_MYBMESH_TRIANG = (1 << 0),
+ MOD_MYBMESH_FF_SPLIT = (1 << 1),
+ MOD_MYBMESH_CUSP_D = (1 << 2),
+ MOD_MYBMESH_CUSP_I = (1 << 3),
+ MOD_MYBMESH_FB_SPLIT = (1 << 4),
+ MOD_MYBMESH_RAD_I = (1 << 5),
+ MOD_MYBMESH_RAD_FLIP = (1 << 6),
+ MOD_MYBMESH_OPTI = (1 << 7),
+ MOD_MYBMESH_SEL = (1 << 8),
+};
+
+typedef struct FeatureLineModifierData {
+ ModifierData modifier;
+
+ char _pad[4];
+ int types; // eFeatureLine_TypeFlag
+
+ struct Object *target;
+ int replace;
+ int layer;
+ int material;
+
+ int use_multiple_levels;
+ int level_start;
+ int level_end;
+
+} FeatureLineModifierData;
+
+enum eFeatureLine_TypeFlag {
+ MOD_FEATURE_LINE_NONE = (1 << 0),
+ MOD_FEATURE_LINE_CONTOUR = (1 << 1),
+ MOD_FEATURE_LINE_CREASE = (1 << 2),
+ MOD_FEATURE_LINE_MARK = (1 << 3),
+ MOD_FEATURE_LINE_MATERIAL = (1 << 4),
+ MOD_FEATURE_LINE_INTERSECTION = (1 << 5),
+ MOD_FEATURE_LINE_MODIFIER_MARK = (1 << 6)
+};
+
+#define MOD_FEATURE_LINE_ALL \
+ (MOD_FEATURE_LINE_CONTOUR | MOD_FEATURE_LINE_CREASE | MOD_FEATURE_LINE_MARK | \
+ MOD_FEATURE_LINE_MATERIAL | MOD_FEATURE_LINE_MODIFIER_MARK | MOD_FEATURE_LINE_INTERSECTION)
+
#endif /* __DNA_MODIFIER_TYPES_H__ */
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index b4d65aa7ea9..f307fc8fc2d 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -186,6 +186,17 @@ typedef struct Object_Runtime {
void *_pad2; /* Padding is here for win32s unconventional struct alignment rules. */
} Object_Runtime;
+typedef struct ObjectLANPR {
+ int usage;
+ char _pad[4];
+} ObjectLANPR;
+
+enum ObjectFeatureLine_Usage {
+ OBJECT_FEATURE_LINE_INHERENT = 0,
+ OBJECT_FEATURE_LINE_OCCLUSION_ONLY = (1 << 0),
+ OBJECT_FEATURE_LINE_EXCLUDE = (1 << 1),
+};
+
typedef struct Object {
ID id;
/** Animation data (must be immediately after id for utilities to use it). */
@@ -396,6 +407,8 @@ typedef struct Object {
struct PreviewImage *preview;
+ ObjectLANPR lanpr;
+
/** Runtime evaluation data (keep last). */
Object_Runtime runtime;
} Object;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 5e96759bc90..89555458f8f 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1648,6 +1648,79 @@ typedef struct SceneEEVEE {
float light_threshold;
} SceneEEVEE;
+/* LANPR Global Config */
+
+struct LANPR_RenderBuffer;
+struct LANPR_LineLayer;
+
+typedef enum LANPR_MasterMode {
+ LANPR_MASTER_MODE_SOFTWARE = 0,
+ LANPR_MASTER_MODE_DPIX = 1,
+ LANPR_MASTER_MODE_SNAKE = 2,
+} LANPR_MasterMode;
+
+typedef enum LANPR_PostProcessingStatus {
+ LANPR_POST_PROCESSING_DISABLED = 0,
+ LANPR_POST_PROCESSING_ENABLED = 1,
+} LANPR_PostProcessingStatus;
+
+typedef enum LANPR_MainFlags {
+ LANPR_ENABLED = 0,
+ /* For LANPR->GP and viewport to update automatically. */
+ LANPR_AUTO_UPDATE = (1 << 0),
+ LANPR_SAME_TAPER = (1 << 2),
+ /* Edge split modifier will cause problems in LANPR. */
+ LANPR_DISABLE_EDGE_SPLITS = (1 << 3),
+ LANPR_USE_CHAINING = (1 << 4),
+ LANPR_USE_INTERSECTIONS = (1 << 5),
+ /* Overwrite existing strokes in this frame. */
+ LANPR_GPENCIL_OVERWRITE = (1 << 6),
+} LANPR_MainFlags;
+
+typedef struct SceneLANPR {
+
+ int flags;
+
+ int master_mode; /* LANPR_MasterMode */
+
+ float taper_left_distance;
+ float taper_left_strength;
+ float taper_right_distance;
+ float taper_right_strength;
+
+ /* shared */
+
+ float contour_fade; /* for dpix contour fading,reserved for future usage */
+ float crease_threshold; /* 0-1 range for cosine angle */
+ float crease_fade_threshold; /* for dpix crease fading */
+
+ float line_color[4];
+
+ float depth_width_influence;
+ float depth_width_curve;
+ float depth_alpha_influence;
+ float depth_alpha_curve;
+
+ int gpu_cache_size; /* enum! */
+ int _pad;
+
+ int enable_chain_connection;
+
+ /* offline render */
+ ListBase line_layers;
+ struct LANPR_LineLayer *active_layer;
+
+ float chaining_geometry_threshold;
+ float chaining_image_threshold;
+} SceneLANPR;
+
+enum {
+ LANPR_GPU_CACHE_SIZE_512 = 0,
+ LANPR_GPU_CACHE_SIZE_1K = 1, /* default */
+ LANPR_GPU_CACHE_SIZE_2K = 2,
+ LANPR_GPU_CACHE_SIZE_4K = 3,
+};
+
/* *************************************************************** */
/* Scene ID-Block */
@@ -1778,6 +1851,9 @@ typedef struct Scene {
struct SceneDisplay display;
struct SceneEEVEE eevee;
+
+ /* LANPR stuff */
+ struct SceneLANPR lanpr;
} Scene;
/* **************** RENDERDATA ********************* */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index f212346f547..2740d27e1af 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -195,6 +195,8 @@ typedef enum eSpaceButtons_Context {
BCONTEXT_TOOL = 14,
BCONTEXT_SHADERFX = 15,
BCONTEXT_OUTPUT = 16,
+ BCONTEXT_COLLECTION = 17,
+ BCONTEXT_LANPR = 18,
/* always as last... */
BCONTEXT_TOT,
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index 80d37d89f14..c688699cc76 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -84,6 +84,7 @@ static const char *includefiles[] = {
"DNA_mesh_types.h",
"DNA_meshdata_types.h",
"DNA_modifier_types.h",
+ "DNA_lanpr_types.h",
"DNA_lattice_types.h",
"DNA_object_types.h",
"DNA_object_force_types.h",
@@ -1543,6 +1544,7 @@ int main(int argc, char **argv)
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
+#include "DNA_lanpr_types.h"
#include "DNA_lattice_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force_types.h"