diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-07 14:19:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-07 16:43:00 +0300 |
commit | 5a43406e1bad973a8cb32702b4fdb588068a6dcd (patch) | |
tree | b47ac75f429b586950dab5300669c373023efab8 /source/blender/makesdna/DNA_userdef_types.h | |
parent | 0215caeac2ad013fa03e2799049f5358d951ebfa (diff) |
Cleanup: move DNA comments before struct members
Needed for clang-format in some cases, see: T53211
Diffstat (limited to 'source/blender/makesdna/DNA_userdef_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 340 |
1 files changed, 227 insertions, 113 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 41b8308c8f8..48e1d24f495 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -68,23 +68,35 @@ typedef enum eUIFont_ID { /* first font is the default (index 0), others optional */ typedef struct uiFont { struct uiFont *next, *prev; - char filename[1024];/* 1024 = FILE_MAX */ - short blf_id; /* from blfont lib */ - short uifont_id; /* own id (eUIFont_ID) */ - short r_to_l; /* fonts that read from left to right */ + /** 1024 = FILE_MAX. */ + char filename[1024]; + /** From blfont lib. */ + short blf_id; + /** Own id (eUIFont_ID). */ + short uifont_id; + /** Fonts that read from left to right. */ + short r_to_l; short pad; } uiFont; /* this state defines appearance of text */ typedef struct uiFontStyle { - short uifont_id; /* saved in file, 0 is default */ - short points; /* actual size depends on 'global' dpi */ - short kerning; /* unfitted or default kerning value. */ - short italic, bold; /* style hint */ - short shadow; /* value is amount of pixels blur */ - short shadx, shady; /* shadow offset in pixels */ - float shadowalpha; /* total alpha */ - float shadowcolor; /* 1 value, typically white or black anyway */ + /** Saved in file, 0 is default. */ + short uifont_id; + /** Actual size depends on 'global' dpi. */ + short points; + /** Unfitted or default kerning value. */ + short kerning; + /** Style hint. */ + short italic, bold; + /** Value is amount of pixels blur. */ + short shadow; + /** Shadow offset in pixels. */ + short shadx, shady; + /** Total alpha. */ + float shadowalpha; + /** 1 value, typically white or black anyway. */ + float shadowcolor; } uiFontStyle; /* this is fed to the layout engine and widget code */ @@ -92,7 +104,8 @@ typedef struct uiFontStyle { typedef struct uiStyle { struct uiStyle *next, *prev; - char name[64]; /* MAX_STYLE_NAME */ + /** MAX_STYLE_NAME. */ + char name[64]; uiFontStyle paneltitle; uiFontStyle grouplabel; @@ -101,8 +114,10 @@ typedef struct uiStyle { float panelzoom; - short minlabelchars; /* in characters */ - short minwidgetchars; /* in characters */ + /** In characters. */ + short minlabelchars; + /** In characters. */ + short minwidgetchars; short columnspace; short templatespace; @@ -166,7 +181,8 @@ typedef struct ThemeUI { uiWidgetStateColors wcol_state; - uiPanelColors panel; /* deprecated, but we keep it for do_versions (2.66.1) */ + /** Deprecated, but we keep it for do_versions (2.66.1). */ + uiPanelColors panel; char widget_emboss[4]; @@ -193,11 +209,16 @@ typedef struct ThemeUI { char gizmo_b[4]; /* Icon Colors. */ - char icon_collection[4]; /* Collection items */ - char icon_object[4]; /* Object items */ - char icon_object_data[4]; /* Object data items */ - char icon_modifier[4]; /* Modifier and constraint items */ - char icon_shading[4]; /* Shading related items */ + /** Collection items. */ + char icon_collection[4]; + /** Object items. */ + char icon_object[4]; + /** Object data items. */ + char icon_object_data[4]; + /** Modifier and constraint items. */ + char icon_modifier[4]; + /** Shading related items. */ + char icon_shading[4]; } ThemeUI; /* try to put them all in one, if needed a special struct can be created as well @@ -206,13 +227,16 @@ typedef struct ThemeUI { typedef struct ThemeSpace { /* main window colors */ char back[4]; - char title[4]; /* panel title */ + /** Panel title. */ + char title[4]; char text[4]; char text_hi[4]; /* header colors */ - char header[4]; /* region background */ - char header_title[4]; /* unused */ + /** Region background. */ + char header[4]; + /** Unused. */ + char header_title[4]; char header_text[4]; char header_text_hi[4]; @@ -223,20 +247,26 @@ typedef struct ThemeSpace { char tab_outline[4]; /* button/tool regions */ - char button[4]; /* region background */ - char button_title[4]; /* panel title */ + /** Region background. */ + char button[4]; + /** Panel title. */ + char button_title[4]; char button_text[4]; char button_text_hi[4]; /* listview regions */ - char list[4]; /* region background */ - char list_title[4]; /* panel title */ + /** Region background. */ + char list[4]; + /** Panel title. */ + char list_title[4]; char list_text[4]; char list_text_hi[4]; /* navigation bar regions */ - char navigation_bar[4]; /* region background */ - char execution_buts[4]; /* region background */ + /** Region background. */ + char navigation_bar[4]; + /** Region background. */ + char execution_buts[4]; /* float panel */ /* char panel[4]; unused */ @@ -263,8 +293,10 @@ typedef struct ThemeSpace { char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4]; char edge[4], edge_select[4]; char edge_seam[4], edge_sharp[4], edge_facesel[4], edge_crease[4], edge_bevel[4]; - char face[4], face_select[4]; /* solid faces */ - char face_dot[4]; /* selected color */ + /** Solid faces. */ + char face[4], face_select[4]; + /** selected color. */ + char face_dot[4]; char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4]; char normal[4]; char vertex_normal[4]; @@ -281,9 +313,12 @@ typedef struct ThemeSpace { char handle_free[4], handle_auto[4], handle_vect[4], handle_align[4], handle_auto_clamped[4]; char handle_sel_free[4], handle_sel_auto[4], handle_sel_vect[4], handle_sel_align[4], handle_sel_auto_clamped[4]; - char ds_channel[4], ds_subchannel[4], ds_ipoline[4]; /* dopesheet */ - char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4]; /* keytypes */ - char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4]; /* keytypes */ + /** Dopesheet. */ + char ds_channel[4], ds_subchannel[4], ds_ipoline[4]; + /** Keytypes. */ + char keytype_keyframe[4], keytype_extreme[4], keytype_breakdown[4], keytype_jitter[4], keytype_movehold[4]; + /** Keytypes. */ + char keytype_keyframe_select[4], keytype_extreme_select[4], keytype_breakdown_select[4], keytype_jitter_select[4], keytype_movehold_select[4]; char keyborder[4], keyborder_select[4]; char pad[4]; @@ -304,10 +339,12 @@ typedef struct ThemeSpace { char nodeclass_shader[4], nodeclass_script[4]; char nodeclass_pattern[4], nodeclass_layout[4]; - char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; /* for sequence editor */ + /** For sequence editor. */ + char movie[4], movieclip[4], mask[4], image[4], scene[4], audio[4]; char effect[4], transition[4], meta[4], text_strip[4]; - float keyframe_scale_fac; /* for dopesheet - scale factor for size of keyframes (i.e. height of channels) */ + /** For dopesheet - scale factor for size of keyframes (i.e. height of channels). */ + float keyframe_scale_fac; char editmesh_active[4]; @@ -335,26 +372,39 @@ typedef struct ThemeSpace { char preview_stitch_unstitchable[4]; char preview_stitch_active[4]; - char uv_shadow[4]; /* two uses, for uvs with modifier applied on mesh and uvs during painting */ - char uv_others[4]; /* uvs of other objects */ + /** Two uses, for uvs with modifier applied on mesh and uvs during painting. */ + char uv_shadow[4]; + /** Uvs of other objects. */ + char uv_others[4]; - char match[4]; /* outliner - filter match */ - char selected_highlight[4]; /* outliner - selected item */ + /** Outliner - filter match. */ + char match[4]; + /** Outliner - selected item. */ + char selected_highlight[4]; - char skin_root[4]; /* Skin modifier root color */ + /** Skin modifier root color. */ + char skin_root[4]; /* NLA */ - char anim_active[4]; /* Active Action + Summary Channel */ - char anim_non_active[4]; /* Active Action = NULL */ - char anim_preview_range[4]; /* Preview range overlay */ + /** Active Action + Summary Channel. */ + char anim_active[4]; + /** Active Action = NULL. */ + char anim_non_active[4]; + /** Preview range overlay. */ + char anim_preview_range[4]; char anim_pad[4]; - char nla_tweaking[4]; /* NLA 'Tweaking' action/strip */ - char nla_tweakdupli[4]; /* NLA - warning color for duplicate instances of tweaking strip */ + /** NLA 'Tweaking' action/strip. */ + char nla_tweaking[4]; + /** NLA - warning color for duplicate instances of tweaking strip. */ + char nla_tweakdupli[4]; - char nla_transition[4], nla_transition_sel[4]; /* NLA "Transition" strips */ - char nla_meta[4], nla_meta_sel[4]; /* NLA "Meta" strips */ - char nla_sound[4], nla_sound_sel[4]; /* NLA "Sound" strips */ + /** NLA "Transition" strips. */ + char nla_transition[4], nla_transition_sel[4]; + /** NLA "Meta" strips. */ + char nla_meta[4], nla_meta_sel[4]; + /** NLA "Sound" strips. */ + char nla_sound[4], nla_sound_sel[4]; /* info */ char info_selected[4], info_selected_text[4]; @@ -377,7 +427,8 @@ typedef struct ThemeWireColor { char select[4]; char active[4]; - short flag; /* eWireColor_Flags */ + /** EWireColor_Flags. */ + short flag; short pad; } ThemeWireColor; @@ -428,12 +479,14 @@ typedef struct bTheme { typedef struct bAddon { struct bAddon *next, *prev; char module[64]; - IDProperty *prop; /* User-Defined Properties on this Addon (for storing preferences) */ + /** User-Defined Properties on this Addon (for storing preferences). */ + IDProperty *prop; } bAddon; typedef struct bPathCompare { struct bPathCompare *next, *prev; - char path[768]; /* FILE_MAXDIR */ + /** FILE_MAXDIR. */ + char path[768]; char flag, pad[7]; } bPathCompare; @@ -490,12 +543,14 @@ typedef struct SolidLight { } SolidLight; typedef struct WalkNavigation { - float mouse_speed; /* speed factor for look around */ + /** Speed factor for look around. */ + float mouse_speed; float walk_speed; float walk_speed_factor; float view_height; float jump_height; - float teleport_time; /* duration to use for teleporting */ + /** Duration to use for teleporting. */ + float teleport_time; short flag; short pad[3]; } WalkNavigation; @@ -504,32 +559,43 @@ typedef struct UserDef { /* UserDef has separate do-version handling, and can be read from other files */ int versionfile, subversionfile; - int flag; /* eUserPref_Flag */ - int dupflag; /* eDupli_ID_Flags */ + /** EUserPref_Flag. */ + int flag; + /** EDupli_ID_Flags. */ + int dupflag; int savetime; - char tempdir[768]; /* FILE_MAXDIR length */ + /** FILE_MAXDIR length. */ + char tempdir[768]; char fontdir[768]; - char renderdir[1024]; /* FILE_MAX length */ + /** FILE_MAX length. */ + char renderdir[1024]; /* EXR cache path */ - char render_cachedir[768]; /* 768 = FILE_MAXDIR */ + /** 768 = FILE_MAXDIR. */ + char render_cachedir[768]; char textudir[768]; char pythondir[768]; char sounddir[768]; char i18ndir[768]; - char image_editor[1024]; /* 1024 = FILE_MAX */ - char anim_player[1024]; /* 1024 = FILE_MAX */ + /** 1024 = FILE_MAX. */ + char image_editor[1024]; + /** 1024 = FILE_MAX. */ + char anim_player[1024]; int anim_player_preset; - short v2d_min_gridsize; /* minimum spacing between gridlines in View2D grids */ - short timecode_style; /* eTimecodeStyles, style of timecode display */ + /** Minimum spacing between gridlines in View2D grids. */ + short v2d_min_gridsize; + /** ETimecodeStyles, style of timecode display. */ + short timecode_style; short versions; short dbl_click_time; short pad; short wheellinescroll; - int uiflag; /* eUserpref_UI_Flag */ - int uiflag2; /* eUserpref_UI_Flag2 */ + /** EUserpref_UI_Flag. */ + int uiflag; + /** EUserpref_UI_Flag2. */ + int uiflag2; /* Experimental flag for app-templates to make changes to behavior * which are outside the scope of typical preferences. */ short app_flag; @@ -544,17 +610,26 @@ typedef struct UserDef { int audioformat; int audiochannels; - float ui_scale; /* setting for UI scale */ - int ui_line_width; /* setting for UI line width */ - int dpi; /* runtime, full DPI divided by pixelsize */ - float dpi_fac; /* runtime, multiplier to scale UI elements based on DPI */ - float pixelsize; /* runtime, line width and point size based on DPI */ - int virtual_pixel; /* deprecated, for forward compatibility */ - - int scrollback; /* console scrollback limit */ - char node_margin; /* node insert offset (aka auto-offset) margin, but might be useful for later stuff as well */ + /** Setting for UI scale. */ + float ui_scale; + /** Setting for UI line width. */ + int ui_line_width; + /** Runtime, full DPI divided by pixelsize. */ + int dpi; + /** Runtime, multiplier to scale UI elements based on DPI. */ + float dpi_fac; + /** Runtime, line width and point size based on DPI. */ + float pixelsize; + /** Deprecated, for forward compatibility. */ + int virtual_pixel; + + /** Console scrollback limit. */ + int scrollback; + /** Node insert offset (aka auto-offset) margin, but might be useful for later stuff as well. */ + char node_margin; char pad2[5]; - short transopts; /* eUserpref_Translation_Flags */ + /** EUserpref_Translation_Flags. */ + short transopts; short menuthreshold1, menuthreshold2; /* startup template */ @@ -564,10 +639,12 @@ typedef struct UserDef { struct ListBase uifonts; struct ListBase uistyles; struct ListBase user_keymaps; - struct ListBase user_keyconfig_prefs; /* wmKeyConfigPref. */ + /** #wmKeyConfigPref. */ + struct ListBase user_keyconfig_prefs; struct ListBase addons; struct ListBase autoexec_paths; - struct ListBase user_menus; /* bUserMenu */ + /** #bUserMenu. */ + struct ListBase user_menus; char keyconfigstr[64]; @@ -576,9 +653,11 @@ typedef struct UserDef { int undomemory; float gpu_viewport_quality; short gp_manhattendist, gp_euclideandist, gp_eraser; - short gp_settings; /* eGP_UserdefSettings */ + /** #eGP_UserdefSettings. */ + short gp_settings; short tb_leftmouse, tb_rightmouse; - /* struct SolidLight light[3] DNA_DEPRECATED; */ /* Was using non-aligned struct! */ + /* Was using non-aligned struct! */ + /* struct SolidLight light[3] DNA_DEPRECATED; */ struct SolidLight light_param[4]; float light_ambient[3], pad7; short gizmo_flag, gizmo_size; @@ -588,61 +667,85 @@ typedef struct UserDef { short dragthreshold; int memcachelimit; int prefetchframes; - float pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */ + /** Control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use. */ + float pad_rot_angle; short _pad0; short obcenter_dia; - short rvisize; /* rotating view icon size */ - short rvibright; /* rotating view icon brightness */ - short recent_files; /* maximum number of recently used files to remember */ - short smooth_viewtx; /* milliseconds to spend spinning the view */ + /** Rotating view icon size. */ + short rvisize; + /** Rotating view icon brightness. */ + short rvibright; + /** Maximum number of recently used files to remember . */ + short recent_files; + /** Milliseconds to spend spinning the view. */ + short smooth_viewtx; short glreslimit; short curssize; - short color_picker_type; /* eColorPicker_Types */ - char ipo_new; /* interpolation mode for newly added F-Curves */ - char keyhandles_new; /* handle types for newly added keyframes */ + /** #eColorPicker_Types. */ + short color_picker_type; + /** Interpolation mode for newly added F-Curves. */ + char ipo_new; + /** Handle types for newly added keyframes. */ + char keyhandles_new; char gpu_select_method; char gpu_select_pick_deph; char pad0; - char view_frame_type; /* eZoomFrame_Mode */ + /** #eZoomFrame_Mode. */ + char view_frame_type; - int view_frame_keyframes; /* number of keyframes to zoom around current frame */ - float view_frame_seconds; /* seconds to zoom around current frame */ + /** Number of keyframes to zoom around current frame. */ + int view_frame_keyframes; + /** Seconds to zoom around current frame. */ + float view_frame_seconds; char _pad1[4]; - short widget_unit; /* private, defaults to 20 for 72 DPI setting */ + /** Private, defaults to 20 for 72 DPI setting. */ + short widget_unit; short anisotropic_filter; short use_16bit_textures, use_gpu_mipmap; - float pressure_threshold_max; /* raw tablet pressure that maps to 100% */ - float pressure_softness; /* curve non-linearity parameter */ + /** Raw tablet pressure that maps to 100%. */ + float pressure_threshold_max; + /** Curve non-linearity parameter. */ + float pressure_softness; - float ndof_sensitivity; /* overall sensitivity of 3D mouse */ + /** Overall sensitivity of 3D mouse. */ + float ndof_sensitivity; float ndof_orbit_sensitivity; - float ndof_deadzone; /* deadzone of 3D mouse */ - int ndof_flag; /* eNdof_Flag, flags for 3D mouse */ + /** Deadzone of 3D mouse. */ + float ndof_deadzone; + /** #eNdof_Flag, flags for 3D mouse. */ + int ndof_flag; - short ogl_multisamples; /* eMultiSample_Type, amount of samples for OpenGL FSA, if zero no FSA */ + /** #eMultiSample_Type, amount of samples for OpenGL FSA, if zero no FSA. */ + short ogl_multisamples; /* eImageDrawMethod, Method to be used to draw the images (AUTO, GLSL, Textures or DrawPixels) */ short image_draw_method; float glalphaclip; - short autokey_mode; /* eAutokey_Mode, autokeying mode */ - short autokey_flag; /* flags for autokeying */ + /** #eAutokey_Mode, autokeying mode. */ + short autokey_mode; + /** Flags for autokeying. */ + short autokey_flag; - short text_render, pad9; /* options for text rendering */ + /** Options for text rendering. */ + short text_render, pad9; - struct ColorBand coba_weight; /* from texture.h */ + /** From texture.h. */ + struct ColorBand coba_weight; float sculpt_paint_overlay_col[3]; - float gpencil_new_layer_col[4]; /* default color for newly created Grease Pencil layers */ + /** Default color for newly created Grease Pencil layers. */ + float gpencil_new_layer_col[4]; short tweak_threshold; char navigation_mode, pad10; - char author[80]; /* author name for file formats supporting it */ + /** Author name for file formats supporting it. */ + char author[80]; char font_path_ui[1024]; char font_path_ui_mono[1024]; @@ -650,26 +753,37 @@ typedef struct UserDef { int compute_device_type; int compute_device_id; - float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */ + /** Opacity of inactive F-Curves in F-Curve Editor. */ + float fcu_inactive_alpha; - short pie_interaction_type; /* if keeping a pie menu spawn button pressed after this time, it turns into - * a drag/release pie menu */ - short pie_initial_timeout; /* direction in the pie menu will always be calculated from the initial position - * within this time limit */ + /** + * If keeping a pie menu spawn button pressed after this time, + * it turns into a drag/release pie menu. + */ + short pie_interaction_type; + /** + * Direction in the pie menu will always be calculated from the + * initial position within this time limit. + */ + short pie_initial_timeout; short pie_animation_timeout; short pie_menu_confirm; - short pie_menu_radius; /* pie menu radius */ - short pie_menu_threshold; /* pie menu distance from center before a direction is set */ + /** Pie menu radius. */ + short pie_menu_radius; + /** Pie menu distance from center before a direction is set. */ + short pie_menu_threshold; struct WalkNavigation walk_navigation; short opensubdiv_compute_type; - short gpencil_multisamples; /* eMultiSample_Type, amount of samples for Grease Pencil */ + /** #eMultiSample_Type, amount of samples for Grease Pencil. */ + short gpencil_multisamples; char pad5[4]; } UserDef; -extern UserDef U; /* from blenkernel blender.c */ +/* from blenkernel blender.c */ +extern UserDef U; /* ***************** USERDEF ****************** */ |