Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_view3d_types.h
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | typedef struct BGpic { | ||||
| short view; | short view; | ||||
| short flag; | short flag; | ||||
| short source; | short source; | ||||
| char pad[6]; | char pad[6]; | ||||
| } BGpic; | } BGpic; | ||||
| /* ********************************* */ | /* ********************************* */ | ||||
| /* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! | |||||
| * (ONLY ADD NEW ITEMS AT THE END) | |||||
| */ | |||||
| /* DisplayLayerData->subtype */ | |||||
| typedef enum DrawingSupportType { | |||||
| eDrawingSupportType_None = 0, | |||||
Severin: Convention would be to use completely capitalized names, not camel case (https://wiki.blender. | |||||
| eDrawingSupportType_GridAxes = 1, | |||||
| eDrawingSupportType_BackgroundImages = 2, | |||||
| eDrawingSupportType_GreasePencil = 3, | |||||
| eDrawingSupportType_MotionTracking = 4, | |||||
| } DrawingSupportType; | |||||
| typedef enum SceneElementsType { | |||||
| eSceneElementsType_None = 0, | |||||
| eSceneElementsType_Solid = 1, | |||||
| eSceneElementsType_Helper = 2, | |||||
| eSceneElementsType_Volumetric = 3, | |||||
| eSceneElementsType_HairParticles = 4, | |||||
| } SceneElementsType; | |||||
| typedef enum ScreenEffectsType { | |||||
| eScreenEffectsType_None = 0, | |||||
| eScreenEffectsType_DepthOfField = 1, | |||||
| eScreenEffectsType_Reflections = 2, | |||||
| } ScreenEffectsType; | |||||
| /* DisplayLayerData->type */ | |||||
| typedef enum DisplayLayerType { | |||||
| eDisplayLayerType_None = 0, | |||||
| eDisplayLayerType_DrawingSupport = 1, | |||||
| eDisplayLayerType_SceneElements = 2, | |||||
| eDisplayLayerType_ScreenEffects = 3, | |||||
| } DisplayLayerType; | |||||
| typedef struct DisplayLayerData { | |||||
| int type; | |||||
| int subtype; | |||||
| short flag; | |||||
| short pad2[3]; | |||||
| char name[64]; /* MAX_NAME */ | |||||
| } DisplayLayerData; | |||||
| typedef struct DisplayLayer { | |||||
| struct DisplayLayer *next, *prev; | |||||
| DisplayLayerData display; | |||||
| } DisplayLayer; | |||||
| typedef struct GridAxesDisplayLayer { | |||||
| struct DisplayLayer *next, *prev; | |||||
| DisplayLayerData display; | |||||
SeverinUnsubmitted Not Done Inline ActionsCould be replaced with single DisplayLayer member, that way you don't need DisplayLayerData, it can all be in DisplayLayer then. Severin: Could be replaced with single `DisplayLayer` member, that way you don't need `DisplayLayerData`… | |||||
| float grid; | |||||
| float pad; | |||||
| short gridlines; | |||||
| short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ | |||||
| char gridflag; | |||||
| char pad2[3]; | |||||
| } GridAxesDisplayLayer; | |||||
| /* DisplayLayerData->flag */ | |||||
| enum { | |||||
| V3D_DISPLAYLAYER_HIDE = (1 << 1), | |||||
| }; | |||||
| /* ********************************* */ | |||||
| typedef struct RegionView3D { | typedef struct RegionView3D { | ||||
| float winmat[4][4]; /* GL_PROJECTION matrix */ | float winmat[4][4]; /* GL_PROJECTION matrix */ | ||||
| float viewmat[4][4]; /* GL_MODELVIEW matrix */ | float viewmat[4][4]; /* GL_MODELVIEW matrix */ | ||||
| float viewinv[4][4]; /* inverse of viewmat */ | float viewinv[4][4]; /* inverse of viewmat */ | ||||
| float persmat[4][4]; /* viewmat*winmat */ | float persmat[4][4]; /* viewmat*winmat */ | ||||
| float persinv[4][4]; /* inverse of persmat */ | float persinv[4][4]; /* inverse of persmat */ | ||||
| float viewcamtexcofac[4]; /* offset/scale for camera glsl texcoords */ | float viewcamtexcofac[4]; /* offset/scale for camera glsl texcoords */ | ||||
| ▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | typedef struct View3D { | ||||
| /** | /** | ||||
| * The drawing mode for the 3d display. Set to OB_BOUNDBOX, OB_WIRE, OB_SOLID, | * The drawing mode for the 3d display. Set to OB_BOUNDBOX, OB_WIRE, OB_SOLID, | ||||
| * OB_TEXTURE, OB_MATERIAL or OB_RENDER */ | * OB_TEXTURE, OB_MATERIAL or OB_RENDER */ | ||||
| short drawtype; | short drawtype; | ||||
| short ob_centre_cursor; /* optional bool for 3d cursor to define center */ | short ob_centre_cursor; /* optional bool for 3d cursor to define center */ | ||||
| short scenelock, around; | short scenelock, around; | ||||
| short flag, flag2; | short flag, flag2; | ||||
| float lens, grid; | float lens; | ||||
| float grid DNA_DEPRECATED; | |||||
| float near, far; | float near, far; | ||||
| float ofs[3] DNA_DEPRECATED; /* XXX deprecated */ | float ofs[3] DNA_DEPRECATED; /* XXX deprecated */ | ||||
| float cursor[3]; | float cursor[3]; | ||||
| short matcap_icon; /* icon id */ | short matcap_icon; /* icon id */ | ||||
| short gridlines; | short gridlines DNA_DEPRECATED; | ||||
| short gridsubdiv; /* Number of subdivisions in the grid between each highlighted grid line */ | short gridsubdiv DNA_DEPRECATED; /* Number of subdivisions in the grid between each highlighted grid line */ | ||||
| char gridflag; | char gridflag DNA_DEPRECATED; | ||||
| /* transform manipulator info */ | /* transform manipulator info */ | ||||
| char twtype, twmode, twflag; | char twtype, twmode, twflag; | ||||
| short flag3; | short flag3; | ||||
| /* afterdraw, for xray & transparent */ | /* afterdraw, for xray & transparent */ | ||||
| struct ListBase afterdraw_transp; | struct ListBase afterdraw_transp; | ||||
| Show All 24 Lines | typedef struct View3D { | ||||
| /* multiview - stereo 3d */ | /* multiview - stereo 3d */ | ||||
| short stereo3d_flag; | short stereo3d_flag; | ||||
| char stereo3d_camera; | char stereo3d_camera; | ||||
| char pad4; | char pad4; | ||||
| float stereo3d_convergence_factor; | float stereo3d_convergence_factor; | ||||
| float stereo3d_volume_alpha; | float stereo3d_volume_alpha; | ||||
| float stereo3d_convergence_alpha; | float stereo3d_convergence_alpha; | ||||
| /* display layers */ | |||||
| ListBase drawing_support, scene_elements, screen_effects; | |||||
| int active_drawing_support; | |||||
| int active_scene_elements; | |||||
| int active_screen_effects; | |||||
| int pad2[2]; | |||||
SeverinUnsubmitted Not Done Inline ActionsWould suggest to move this into an own struct to avoid View3D from becoming too messy and to add some more context to what members belong to. Severin: Would suggest to move this into an own struct to avoid `View3D` from becoming too messy and to… | |||||
| /* Previous viewport draw type. | /* Previous viewport draw type. | ||||
| * Runtime-only, set in the rendered viewport toggle operator. | * Runtime-only, set in the rendered viewport toggle operator. | ||||
| */ | */ | ||||
| short prev_drawtype; | short prev_drawtype; | ||||
| short pad1; | short pad1; | ||||
| float pad2; | |||||
| } View3D; | } View3D; | ||||
| /* View3D->stereo_flag (short) */ | /* View3D->stereo_flag (short) */ | ||||
| #define V3D_S3D_DISPCAMERAS (1 << 0) | #define V3D_S3D_DISPCAMERAS (1 << 0) | ||||
| #define V3D_S3D_DISPPLANE (1 << 1) | #define V3D_S3D_DISPPLANE (1 << 1) | ||||
| #define V3D_S3D_DISPVOLUME (1 << 2) | #define V3D_S3D_DISPVOLUME (1 << 2) | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
| #define V3D_RENDER_BORDER (1 << 11) | #define V3D_RENDER_BORDER (1 << 11) | ||||
| #define V3D_SOLID_MATCAP (1 << 12) /* user flag */ | #define V3D_SOLID_MATCAP (1 << 12) /* user flag */ | ||||
| #define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */ | #define V3D_SHOW_SOLID_MATCAP (1 << 13) /* runtime flag */ | ||||
| #define V3D_OCCLUDE_WIRE (1 << 14) | #define V3D_OCCLUDE_WIRE (1 << 14) | ||||
| #define V3D_SHADELESS_TEX (1 << 15) | #define V3D_SHADELESS_TEX (1 << 15) | ||||
| /* View3d->flag3 (short) */ | /* View3d->flag3 (short) */ | ||||
| #define V3D_SHOW_WORLD (1 << 0) | enum { | ||||
| V3D_SHOW_WORLD = (1 << 0), | |||||
| V3D_SHOW_ALL_LAYERS = (1 << 1), | |||||
| }; | |||||
| /* View3d->tmp_compat_flag */ | /* View3d->tmp_compat_flag */ | ||||
| enum { | enum { | ||||
| V3D_NEW_VIEWPORT = (1 << 0), | V3D_NEW_VIEWPORT = (1 << 0), | ||||
| }; | }; | ||||
| /* View3D->around */ | /* View3D->around */ | ||||
| enum { | enum { | ||||
| /* center of the bounding box */ | /* center of the bounding box */ | ||||
| V3D_AROUND_CENTER_BOUNDS = 0, | V3D_AROUND_CENTER_BOUNDS = 0, | ||||
| /* center from the sum of all points divided by the total */ | /* center from the sum of all points divided by the total */ | ||||
| V3D_AROUND_CENTER_MEAN = 3, | V3D_AROUND_CENTER_MEAN = 3, | ||||
| ▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines | |||||
Convention would be to use completely capitalized names, not camel case (https://wiki.blender.org/index.php/Dev:Doc/Code_Style#Macros.2C_Enums.2C_Inline_functions).