[Bf-blender-cvs] [d72595a5943] master: Cleanup: Remove unecessary padding from small DNA structs
Hans Goudey
noreply at git.blender.org
Wed Feb 10 03:27:06 CET 2021
Commit: d72595a5943e8c81bb8c901d3ec8cc52b553da22
Author: Hans Goudey
Date: Tue Feb 9 20:26:58 2021 -0600
Branches: master
https://developer.blender.org/rBd72595a5943e8c81bb8c901d3ec8cc52b553da22
Cleanup: Remove unecessary padding from small DNA structs
After {rBa0867f05a48e2017a}, it is no longer necessary to pad
structs with 1 and 2 byte sizes. Most of these are geometry node
structs, where we've been avoiding using `node.custom1`.
I only found two others, the freestyle flags in custom data DNA.
Differential Revision: https://developer.blender.org/D10335
===================================================================
M source/blender/makesdna/DNA_meshdata_types.h
M source/blender/makesdna/DNA_node_types.h
===================================================================
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 780115a31be..f9af7a011e0 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -414,7 +414,6 @@ typedef struct OrigSpaceLoop {
typedef struct FreestyleEdge {
char flag;
- char _pad[3];
} FreestyleEdge;
/** #FreestyleEdge.flag */
@@ -424,7 +423,6 @@ enum {
typedef struct FreestyleFace {
char flag;
- char _pad[3];
} FreestyleFace;
/** #FreestyleFace.flag */
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 61b0b469426..c5d2384b1aa 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -551,7 +551,6 @@ typedef struct bNodeSocketValueFloat {
typedef struct bNodeSocketValueBoolean {
char value;
- char _pad[3];
} bNodeSocketValueBoolean;
typedef struct bNodeSocketValueVector {
@@ -831,7 +830,6 @@ typedef struct NodeColorspill {
typedef struct NodeDilateErode {
char falloff;
- char _pad[7];
} NodeDilateErode;
typedef struct NodeMask {
@@ -840,7 +838,6 @@ typedef struct NodeMask {
typedef struct NodeSetAlpha {
char mode;
- char _pad[7];
} NodeSetAlpha;
typedef struct NodeTexBase {
@@ -997,7 +994,6 @@ typedef struct NodeTrackPosData {
typedef struct NodeTranslateData {
char wrap_axis;
char relative;
- char _pad[6];
} NodeTranslateData;
typedef struct NodePlaneTrackDeformData {
@@ -1076,7 +1072,6 @@ typedef struct NodeCryptomatte {
typedef struct NodeDenoise {
char hdr;
- char _pad[7];
} NodeDenoise;
typedef struct NodeAttributeCompare {
@@ -1098,8 +1093,6 @@ typedef struct NodeAttributeMath {
uint8_t input_type_a;
uint8_t input_type_b;
uint8_t input_type_c;
-
- char _pad[4];
} NodeAttributeMath;
typedef struct NodeAttributeMix {
@@ -1120,8 +1113,6 @@ typedef struct NodeAttributeVectorMath {
uint8_t input_type_a;
uint8_t input_type_b;
uint8_t input_type_c;
-
- char _pad[4];
} NodeAttributeVectorMath;
typedef struct NodeAttributeColorRamp {
@@ -1159,22 +1150,16 @@ typedef struct NodeGeometryAlignRotationToVector {
typedef struct NodeGeometryPointScale {
/* GeometryNodeAttributeInputMode */
uint8_t input_type;
-
- char _pad[7];
} NodeGeometryPointScale;
typedef struct NodeGeometryPointTranslate {
/* GeometryNodeAttributeInputMode */
uint8_t input_type;
-
- char _pad[7];
} NodeGeometryPointTranslate;
typedef struct NodeGeometryObjectInfo {
/* GeometryNodeTransformSpace. */
uint8_t transform_space;
-
- char _pad[7];
} NodeGeometryObjectInfo;
typedef struct NodeGeometryPointInstance {
@@ -1182,8 +1167,6 @@ typedef struct NodeGeometryPointInstance {
uint8_t instance_type;
/* GeometryNodePointInstanceFlag. */
uint8_t flag;
-
- char _pad[6];
} NodeGeometryPointInstance;
typedef struct NodeGeometryPointsToVolume {
@@ -1191,29 +1174,21 @@ typedef struct NodeGeometryPointsToVolume {
uint8_t resolution_mode;
/* GeometryNodeAttributeInputMode */
uint8_t input_type_radius;
-
- char _pad[6];
} NodeGeometryPointsToVolume;
typedef struct NodeGeometryCollectionInfo {
/* GeometryNodeTransformSpace. */
uint8_t transform_space;
-
- char _pad[7];
} NodeGeometryCollectionInfo;
typedef struct NodeGeometryAttributeProximity {
/* GeometryNodeAttributeProximityTargetGeometryElement. */
uint8_t target_geometry_element;
-
- char _pad[7];
} NodeGeometryAttributeProximity;
typedef struct NodeGeometryVolumeToMesh {
/* VolumeToMeshResolutionMode */
uint8_t resolution_mode;
-
- char _pad[7];
} NodeGeometryVolumeToMesh;
typedef struct NodeAttributeCombineXYZ {
More information about the Bf-blender-cvs
mailing list