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:
authorYimingWu <xp8110@outlook.com>2021-06-29 15:47:55 +0300
committerYimingWu <xp8110@outlook.com>2021-06-29 15:47:55 +0300
commitd1e0059eac99654624edee2a2390a3e2fdc4c7cb (patch)
tree3983e4f1b78fa3bd85e5cb16a0a010e4e3351815 /source/blender/makesdna
parent5d5cf5308129f1632cd6e303df52dadf63026675 (diff)
LineArt: Filtering intersection lines using mask numbers
Mask value works just like transparency mask. You are able to select intersection lines inside a collection or, between collections. Reviewed By: Sebastian Parborg (zeddb) Differential Revision: https://developer.blender.org/D11309
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_collection_types.h13
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h12
-rw-r--r--source/blender/makesdna/intern/dna_rename_defs.h2
3 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_collection_types.h b/source/blender/makesdna/DNA_collection_types.h
index aa91699ae40..1defa8b782b 100644
--- a/source/blender/makesdna/DNA_collection_types.h
+++ b/source/blender/makesdna/DNA_collection_types.h
@@ -46,9 +46,6 @@ typedef struct CollectionChild {
struct Collection *collection;
} CollectionChild;
-/**
- * \warning while the values seem to be flags, they aren't treated as flags.
- */
enum eCollectionLineArt_Usage {
COLLECTION_LRT_INCLUDE = 0,
COLLECTION_LRT_OCCLUSION_ONLY = (1 << 0),
@@ -57,6 +54,10 @@ enum eCollectionLineArt_Usage {
COLLECTION_LRT_NO_INTERSECTION = (1 << 3),
};
+enum eCollectionLineArt_Flags {
+ COLLECTION_LRT_USE_INTERSECTION_MASK = (1 << 0),
+};
+
typedef struct Collection {
ID id;
@@ -74,8 +75,10 @@ typedef struct Collection {
/* Runtime-only, always cleared on file load. */
short tag;
- /** Line Art engine specific */
- short lineart_usage;
+ short lineart_usage; /* eCollectionLineArt_Usage */
+ unsigned char lineart_flags; /* eCollectionLineArt_Flags */
+ unsigned char lineart_intersection_mask;
+ char _pad[6];
int16_t color_tag;
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 0bd7e500044..40e4c65c4b8 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -883,11 +883,14 @@ typedef enum eLineArtGPencilModifierFlags {
LRT_GPENCIL_USE_CACHE = (1 << 4),
} eLineArtGPencilModifierFlags;
-typedef enum eLineartGpencilMaterialMaskFlags {
+typedef enum eLineartGpencilMaskSwitches {
LRT_GPENCIL_MATERIAL_MASK_ENABLE = (1 << 0),
/** When set, material mask bit comparisons are done with bit wise "AND" instead of "OR". */
LRT_GPENCIL_MATERIAL_MASK_MATCH = (1 << 1),
-} eLineartGpencilMaterialMaskFlags;
+ LRT_GPENCIL_INTERSECTION_MATCH = (1 << 2),
+} eLineartGpencilMaskSwitches;
+
+struct LineartCache;
struct LineartCache;
@@ -918,8 +921,11 @@ typedef struct LineartGpencilModifierData {
float opacity;
short thickness;
- unsigned char material_mask_flags; /* eLineartGpencilMaterialMaskFlags */
+ unsigned char mask_switches; /* eLineartGpencilMaskSwitches */
unsigned char material_mask_bits;
+ unsigned char intersection_mask;
+
+ char _pad[7];
/** `0..1` range for cosine angle */
float crease_threshold;
diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h
index 57abf708f60..735be0c10bf 100644
--- a/source/blender/makesdna/intern/dna_rename_defs.h
+++ b/source/blender/makesdna/intern/dna_rename_defs.h
@@ -134,6 +134,6 @@ DNA_STRUCT_RENAME_ELEM(RigidBodyWorld, steps_per_second, substeps_per_frame)
* global_areas. See D9442. */
DNA_STRUCT_RENAME_ELEM(wmWindow, global_area_map, global_areas)
DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, line_types, edge_types)
-DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, transparency_flags, material_mask_flags)
+DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, transparency_flags, mask_switches)
DNA_STRUCT_RENAME_ELEM(LineartGpencilModifierData, transparency_mask, material_mask_bits)
DNA_STRUCT_RENAME_ELEM(MaterialLineArt, transparency_mask, material_mask_bits)