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:
authorAntonioya <blendergit@gmail.com>2018-10-28 20:08:24 +0300
committerAntonioya <blendergit@gmail.com>2018-10-28 20:20:50 +0300
commit39bc44ffc59ef1ad96893ce838c3a3484d072f44 (patch)
tree9a807126c06dd097be6ecda3968ffbcb12bf7bba /source/blender/makesdna
parent9bcdb19a3e0270a0e8727290111e4a1d6e15a944 (diff)
GP: Refactor Instance modifier and rename to Array
The old name Instance was logic when the modifier created new object instances, but now works equal to mesh Array modifier, so the old name was not logic and must be Array. Also added a Object to use as offset similar to mesh Array modifier.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 65c75c151cd..191588a9d36 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -40,7 +40,7 @@ typedef enum GpencilModifierType {
eGpencilModifierType_Subdiv = 2,
eGpencilModifierType_Thick = 3,
eGpencilModifierType_Tint = 4,
- eGpencilModifierType_Instance = 5,
+ eGpencilModifierType_Array = 5,
eGpencilModifierType_Build = 6,
eGpencilModifierType_Opacity = 7,
eGpencilModifierType_Color = 8,
@@ -235,9 +235,10 @@ typedef enum eOpacityGpencil_Flag {
GP_OPACITY_INVERT_LAYERPASS = (1 << 4),
} eOpacityGpencil_Flag;
-typedef struct InstanceGpencilModifierData {
+typedef struct ArrayGpencilModifierData {
GpencilModifierData modifier;
- int count[3]; /* number of elements in array */
+ struct Object *object;
+ int count; /* number of elements in array */
int flag; /* several flags */
float offset[3]; /* Location increments */
float shift[3]; /* shift increment */
@@ -246,22 +247,22 @@ typedef struct InstanceGpencilModifierData {
float rot[3]; /* Rotation changes */
float scale[3]; /* Scale changes */
float rnd[20]; /* (first element is the index) random values */
- int lock_axis; /* lock shift to one axis */
+ char pad_[4];
int pass_index; /* custom index for passes */
char layername[64]; /* layer name */
int mat_rpl; /* material replace (0 keep default) */
int layer_pass; /* custom index for passes */
-} InstanceGpencilModifierData;
-
-typedef enum eInstanceGpencil_Flag {
- GP_INSTANCE_RANDOM_SIZE = (1 << 0),
- GP_INSTANCE_RANDOM_ROT = (1 << 1),
- GP_INSTANCE_INVERT_LAYER = (1 << 2),
- GP_INSTANCE_INVERT_PASS = (1 << 3),
- GP_INSTANCE_KEEP_ONTOP = (1 << 4),
- GP_INSTANCE_INVERT_LAYERPASS = (1 << 5),
-} eInstanceGpencil_Flag;
+} ArrayGpencilModifierData;
+
+typedef enum eArrayGpencil_Flag {
+ GP_ARRAY_RANDOM_SIZE = (1 << 0),
+ GP_ARRAY_RANDOM_ROT = (1 << 1),
+ GP_ARRAY_INVERT_LAYER = (1 << 2),
+ GP_ARRAY_INVERT_PASS = (1 << 3),
+ GP_ARRAY_KEEP_ONTOP = (1 << 4),
+ GP_ARRAY_INVERT_LAYERPASS = (1 << 5),
+} eArrayGpencil_Flag;
typedef struct BuildGpencilModifierData {
GpencilModifierData modifier;