[Bf-blender-cvs] [5a43406e1ba] master: Cleanup: move DNA comments before struct members

Campbell Barton noreply at git.blender.org
Mon Jan 7 14:43:28 CET 2019


Commit: 5a43406e1bad973a8cb32702b4fdb588068a6dcd
Author: Campbell Barton
Date:   Mon Jan 7 22:19:13 2019 +1100
Branches: master
https://developer.blender.org/rB5a43406e1bad973a8cb32702b4fdb588068a6dcd

Cleanup: move DNA comments before struct members

Needed for clang-format in some cases, see: T53211

===================================================================

M	source/blender/makesdna/DNA_ID.h
M	source/blender/makesdna/DNA_action_types.h
M	source/blender/makesdna/DNA_anim_types.h
M	source/blender/makesdna/DNA_armature_types.h
M	source/blender/makesdna/DNA_brush_types.h
M	source/blender/makesdna/DNA_cachefile_types.h
M	source/blender/makesdna/DNA_camera_types.h
M	source/blender/makesdna/DNA_cloth_types.h
M	source/blender/makesdna/DNA_collection_types.h
M	source/blender/makesdna/DNA_color_types.h
M	source/blender/makesdna/DNA_constraint_types.h
M	source/blender/makesdna/DNA_curve_types.h
M	source/blender/makesdna/DNA_customdata_types.h
M	source/blender/makesdna/DNA_dynamicpaint_types.h
M	source/blender/makesdna/DNA_effect_types.h
M	source/blender/makesdna/DNA_fileglobal_types.h
M	source/blender/makesdna/DNA_freestyle_types.h
M	source/blender/makesdna/DNA_genfile.h
M	source/blender/makesdna/DNA_gpencil_modifier_types.h
M	source/blender/makesdna/DNA_gpencil_types.h
M	source/blender/makesdna/DNA_gpu_types.h
M	source/blender/makesdna/DNA_image_types.h
M	source/blender/makesdna/DNA_ipo_types.h
M	source/blender/makesdna/DNA_key_types.h
M	source/blender/makesdna/DNA_lamp_types.h
M	source/blender/makesdna/DNA_lattice_types.h
M	source/blender/makesdna/DNA_layer_types.h
M	source/blender/makesdna/DNA_lightprobe_types.h
M	source/blender/makesdna/DNA_linestyle_types.h
M	source/blender/makesdna/DNA_mask_types.h
M	source/blender/makesdna/DNA_material_types.h
M	source/blender/makesdna/DNA_mesh_types.h
M	source/blender/makesdna/DNA_meshdata_types.h
M	source/blender/makesdna/DNA_meta_types.h
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesdna/DNA_movieclip_types.h
M	source/blender/makesdna/DNA_nla_types.h
M	source/blender/makesdna/DNA_node_types.h
M	source/blender/makesdna/DNA_object_fluidsim_types.h
M	source/blender/makesdna/DNA_object_force_types.h
M	source/blender/makesdna/DNA_object_types.h
M	source/blender/makesdna/DNA_outliner_types.h
M	source/blender/makesdna/DNA_particle_types.h
M	source/blender/makesdna/DNA_rigidbody_types.h
M	source/blender/makesdna/DNA_scene_types.h
M	source/blender/makesdna/DNA_screen_types.h
M	source/blender/makesdna/DNA_sdna_types.h
M	source/blender/makesdna/DNA_sequence_types.h
M	source/blender/makesdna/DNA_shader_fx_types.h
M	source/blender/makesdna/DNA_smoke_types.h
M	source/blender/makesdna/DNA_sound_types.h
M	source/blender/makesdna/DNA_space_types.h
M	source/blender/makesdna/DNA_speaker_types.h
M	source/blender/makesdna/DNA_text_types.h
M	source/blender/makesdna/DNA_texture_types.h
M	source/blender/makesdna/DNA_tracking_types.h
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesdna/DNA_vfont_types.h
M	source/blender/makesdna/DNA_view2d_types.h
M	source/blender/makesdna/DNA_view3d_types.h
M	source/blender/makesdna/DNA_windowmanager_types.h
M	source/blender/makesdna/DNA_workspace_types.h
M	source/blender/makesdna/DNA_world_types.h

===================================================================

diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 28ba5c95020..d373a1542c6 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -69,19 +69,22 @@ typedef struct DrawDataList {
 typedef struct IDPropertyData {
 	void *pointer;
 	ListBase group;
-	int val, val2;  /* note, we actually fit a double into these two ints */
+	/** Note, we actually fit a double into these two ints. */
+	int val, val2;
 } IDPropertyData;
 
 typedef struct IDProperty {
 	struct IDProperty *next, *prev;
 	char type, subtype;
 	short flag;
-	char name[64];  /* MAX_IDPROP_NAME */
+	/** MAX_IDPROP_NAME. */
+	char name[64];
 
 	/* saved is used to indicate if this struct has been saved yet.
 	 * seemed like a good idea as a pad var was needed anyway :) */
 	int saved;
-	IDPropertyData data;  /* note, alignment for 64 bits */
+	/** Note, alignment for 64 bits. */
+	IDPropertyData data;
 
 	/* array length, also (this is important!) string length + 1.
 	 * the idea is to be able to reuse array realloc functions on strings.*/
@@ -187,20 +190,26 @@ enum {
 	IDOVERRIDESTATIC_FLAG_LOCKED        =   1 << 1,  /* User cannot change that override operation. */
 };
 
-/* A single overridden property, contain all operations on this one. */
+/** A single overridden property, contain all operations on this one. */
 typedef struct IDOverrideStaticProperty {
 	struct IDOverrideStaticProperty *next, *prev;
 
-	/* Path from ID to overridden property. *Does not* include indices/names for final arrays/collections items. */
+	/**
+	 * Path from ID to overridden property.
+	 * *Does not* include indices/names for final arrays/collections items.
+	 */
 	char *rna_path;
 
-	ListBase operations;  /* List of overriding operations (IDOverridePropertyOperation) applied to this property. */
+	/** List of overriding operations (IDOverridePropertyOperation) applied to this property. */
+	ListBase operations;
 } IDOverrideStaticProperty;
 
 /* Main container for all overriding data info of a data-block. */
 typedef struct IDOverrideStatic {
-	struct ID *reference;  /* Reference linked ID which this one overrides. */
-	ListBase properties;  /* List of IDOverrideProperty structs. */
+	/** Reference linked ID which this one overrides. */
+	struct ID *reference;
+	/** List of IDOverrideProperty structs. */
+	ListBase properties;
 
 	short flag;
 	short pad[3];
@@ -230,9 +239,11 @@ typedef struct ID {
 	void *next, *prev;
 	struct ID *newid;
 	struct Library *lib;
-	char name[66]; /* MAX_ID_NAME */
+	/** MAX_ID_NAME. */
+	char name[66];
 	/**
-	 * LIB_... flags report on status of the datablock this ID belongs to (persistent, saved to and read from .blend).
+	 * LIB_... flags report on status of the datablock this ID belongs to
+	 * (persistent, saved to and read from .blend).
 	 */
 	short flag;
 	/**
@@ -245,9 +256,11 @@ typedef struct ID {
 	int pad;
 	IDProperty *properties;
 
-	IDOverrideStatic *override_static;  /* Reference linked ID which this one overrides. */
+	/** Reference linked ID which this one overrides. */
+	IDOverrideStatic *override_static;
 
-	/* Only set for datablocks which are coming from copy-on-write, points to
+	/**
+	 * Only set for datablocks which are coming from copy-on-write, points to
 	 * the original version of it.
 	 */
 	struct ID *orig_id;
@@ -262,21 +275,27 @@ typedef struct ID {
 typedef struct Library {
 	ID id;
 	struct FileData *filedata;
-	char name[1024];  /* path name used for reading, can be relative and edited in the outliner */
+	/** Path name used for reading, can be relative and edited in the outliner. */
+	char name[1024];
 
-	/* absolute filepath, this is only for convenience, 'name' is the real path used on file read but in
+	/**
+	 * Absolute filepath, this is only for convenience,
+	 * 'name' is the real path used on file read but in
 	 * some cases its useful to access the absolute one.
 	 * This is set on file read.
-	 * Use BKE_library_filepath_set() rather than setting 'name' directly and it will be kept in sync - campbell */
+	 * Use BKE_library_filepath_set() rather than setting 'name'
+	 * directly and it will be kept in sync - campbell */
 	char filepath[1024];
 
-	struct Library *parent;	/* set for indirectly linked libs, used in the outliner and while reading */
+	/** Set for indirectly linked libs, used in the outliner and while reading. */
+	struct Library *parent;
 
 	struct PackedFile *packedfile;
 
 	/* Temp data needed by read/write code. */
 	int temp_index;
-	short versionfile, subversionfile;  /* see BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions */
+	/** See BLENDER_VERSION, BLENDER_SUBVERSION, needed for do_versions. */
+	short versionfile, subversionfile;
 } Library;
 
 enum eIconSizes {
@@ -309,9 +328,11 @@ typedef struct PreviewImage {
 
 	/* Runtime-only data. */
 	struct GPUTexture *gputexture[2];
-	int icon_id;  /* Used by previews outside of ID context. */
+	/** Used by previews outside of ID context. */
+	int icon_id;
 
-	short tag;  /* Runtime data. */
+	/** Runtime data. */
+	short tag;
 	char pad[2];
 } PreviewImage;
 
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index 538604f46d0..d257874544d 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -54,8 +54,10 @@ struct GHash;
 
 /* Data point for motion path (mpv) */
 typedef struct bMotionPathVert {
-	float co[3];                /* coordinates of point in 3D-space */
-	int flag;                   /* quick settings */
+	/** Coordinates of point in 3D-space. */
+	float co[3];
+	/** Quick settings. */
+	int flag;
 } bMotionPathVert;
 
 /* bMotionPathVert->flag */
@@ -71,15 +73,22 @@ typedef enum eMotionPathVert_Flag {
  * - for elements providing transforms (i.e. Objects or PoseChannels)
  */
 typedef struct bMotionPath {
-	bMotionPathVert *points;    /* path samples */
-	int length;                 /* the number of cached verts */
-
-	int start_frame;            /* for drawing paths, the start frame number */
-	int end_frame;              /* for drawing paths, the end frame number */
-
-	float color[3];	            /* optional custom color */
-	int line_thickness;         /* line thickness */
-	int flag;                   /* baking settings - eMotionPath_Flag */
+	/** Path samples. */
+	bMotionPathVert *points;
+	/** The number of cached verts. */
+	int length;
+
+	/** For drawing paths, the start frame number. */
+	int start_frame;
+	/** For drawing paths, the end frame number. */
+	int end_frame;
+
+	/** Optional custom color. */
+	float color[3];
+	/** Line thickness. */
+	int line_thickness;
+	/** Baking settings - eMotionPath_Flag. */
+	int flag;
 
 	/* Used for drawing. */
 	struct GPUVertBuf *points_vbo;
@@ -106,26 +115,38 @@ typedef enum eMotionPath_Flag {
 /* Animation Visualization Settings (avs) */
 typedef struct bAnimVizSettings {
 	/* Onion-Skinning Settings ----------------- */
-	int ghost_sf, ghost_ef;         /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */
-	int ghost_bc, ghost_ac;         /* number of frames before/after current frame to show */
+	/** Start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE). */
+	int ghost_sf, ghost_ef;
+	/** Number of frames befo.re/after current frame to show */
+	int ghost_bc, ghost_ac;
 
-	short ghost_type;               /* eOnionSkin_Types */
-	short ghost_step;               /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */
+	/** EOnionSkin_Types. */
+	short ghost_type;
+	/** Number of frames between each ghost shown (not for GHOST_TYPE_KEYS). */
+	short ghost_step;
 
-	short ghost_flag;               /* eOnionSkin_Flag */
+	/** EOnionSkin_Flag. */
+	short ghost_flag;
 
 	/* General Settings ------------------------ */
-	short recalc;                   /* eAnimViz_RecalcFlags */
+	/** EAnimViz_RecalcFlags. */
+	short recalc;
 
 	/* Motion Path Settings ------------------- */
-	short path_type;                /* eMotionPath_Types */
-	short path_step;                /* number of frames between points indicated on the paths */
-
-	short path_viewflag;            /* eMotionPaths_ViewFlag */
-	short path_bakeflag;            /* eMotionPaths_BakeFlag */
-
-	int path_sf, path_ef;           /* start and end frames of path-calculation range */
-	int path_bc, path_ac;           /* number of frames before/after current frame to show */
+	/** EMotionPath_Types. */
+	short path_type;
+	/** Number of frames between points indicated on the paths. */
+	short path_step;
+
+	/** EMotionPaths_ViewFlag. */
+	short path_viewflag;
+	/** EMotionPaths_BakeFlag. */
+	short path_bakeflag;
+
+	/** Start and end frames of path-calculation range. */
+	int path_sf, path_ef;
+	/** Number of frames before/after current frame to show. */
+	int path_bc, path_ac;
 } bAnimVizSettings;
 
 
@@ -228,83 +249,129 @@ typedef struct bPoseChannelRuntime {
 typedef struct bPoseChannel {
 	struct bPoseChannel *next, *prev;
 
-	IDProperty          *prop;      /* User-Defined Properties on this PoseChannel */
+	/** User-Defined Properties on this PoseChannel. */
+	IDProperty          *prop;
 
-	ListBase constraints;           /* Constraints that act on this PoseChannel */
-	char name[64];                  /* need to match bone name length: MAXBONENAME */
+	/** Constraints that act on this PoseChannel. */
+	ListBase constraints;
+	/** Need to match bone name length: MAXBONENAME. */
+	char name[64];
 
-	short flag;                     /* dynamic, for detecting transform changes */
-	short ikflag;                   /* settings for IK bones */
-	short protectflag;              /* protect channels from being transformed */
-	short agrp_index;               /* index of action-group this bone belongs to (0 = default/no group) */
-	char constflag;                 /* for quick detecting which constraints affect this channel */
-	char selectflag;                /* copy of bone flag, so you can work with library armatures, not for runtime use */
+	/** Dynamic, for detecting transform changes. */
+	short flag;
+	/** Settings for IK bones. */
+	short ikflag;
+	/** Protect channels from being transformed. */
+	sh

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list