Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_material_types.h
| Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
| typedef struct TexPaintSlot { | typedef struct TexPaintSlot { | ||||
| struct Image *ima; /* image to be painted on */ | struct Image *ima; /* image to be painted on */ | ||||
| char *uvname; /* customdata index for uv layer, MAX_NAME*/ | char *uvname; /* customdata index for uv layer, MAX_NAME*/ | ||||
| int valid; /* do we have a valid image and UV map */ | int valid; /* do we have a valid image and UV map */ | ||||
| int pad; | int pad; | ||||
| } TexPaintSlot; | } TexPaintSlot; | ||||
| typedef struct MaterialGPencilStyle { | |||||
| struct Image *sima; /* Texture image for strokes */ | |||||
| struct Image *ima; /* Texture image for filling */ | |||||
| float stroke_rgba[4]; /* color for paint and strokes (alpha included) */ | |||||
| float fill_rgba[4]; /* color that should be used for drawing "fills" for strokes (alpha included) */ | |||||
| float mix_rgba[4]; /* secondary color used for gradients and other stuff */ | |||||
| short flag; /* settings */ | |||||
| short index; /* custom index for passes */ | |||||
| short stroke_style; /* style for drawing strokes (used to select shader type) */ | |||||
| short fill_style; /* style for filling areas (used to select shader type) */ | |||||
| float mix_factor; /* factor used to define shader behavior (several uses) */ | |||||
campbellbarton: Name differently
`MaterialGPencilStyle` | |||||
| float gradient_angle; /* angle used for gradients orientation */ | |||||
| float gradient_radius; /* radius for radial gradients */ | |||||
| float pattern_gridsize; /* cheesboard size */ | |||||
| float gradient_scale[2]; /* uv coordinates scale */ | |||||
| float gradient_shift[2]; /* factor to shift filling in 2d space */ | |||||
| float texture_angle; /* angle used for texture orientation */ | |||||
| float texture_scale[2]; /* texture scale (separated of uv scale) */ | |||||
| float texture_offset[2]; /* factor to shift texture in 2d space */ | |||||
| float texture_opacity; /* texture opacity */ | |||||
| float texture_pixsize; /* pixel size for uv along the stroke */ | |||||
| int mode; /* drawing mode (line or dots) */ | |||||
| int gradient_type; /* type of gradient */ | |||||
| char pad[4]; | |||||
| } MaterialGPencilStyle; | |||||
| /* MaterialGPencilStyle->flag */ | |||||
| typedef enum eMaterialGPencilStyle_Flag { | |||||
| /* Fill Texture is a pattern */ | |||||
| GP_STYLE_FILL_PATTERN = (1 << 0), | |||||
| /* don't display color */ | |||||
Not Done Inline ActionsMeaning of g_ and t_ is unclear: gradient & texture_ ? campbellbarton: Meaning of `g_` and `t_` is unclear: `gradient` & `texture_` ? | |||||
| GP_STYLE_COLOR_HIDE = (1 << 1), | |||||
| /* protected from further editing */ | |||||
| GP_STYLE_COLOR_LOCKED = (1 << 2), | |||||
| /* do onion skinning */ | |||||
| GP_STYLE_COLOR_ONIONSKIN = (1 << 3), | |||||
| /* clamp texture */ | |||||
| GP_STYLE_COLOR_TEX_CLAMP = (1 << 4), | |||||
| /* mix texture */ | |||||
| GP_STYLE_COLOR_TEX_MIX = (1 << 5), | |||||
| /* Flip fill colors */ | |||||
| GP_STYLE_COLOR_FLIP_FILL = (1 << 6), | |||||
| /* Stroke Texture is a pattern */ | |||||
| GP_STYLE_STROKE_PATTERN = (1 << 7) | |||||
| } eMaterialGPencilStyle_Flag; | |||||
| typedef enum eMaterialGPencilStyle_Mode { | |||||
| GP_STYLE_MODE_LINE = 0, /* line */ | |||||
| GP_STYLE_MODE_DOTS = 1, /* dots */ | |||||
| GP_STYLE_MODE_BOX = 2, /* rectangles */ | |||||
| } eMaterialGPencilStyle_Mode; | |||||
| typedef struct Material { | typedef struct Material { | ||||
| ID id; | ID id; | ||||
| struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ | struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ | ||||
| short flag, pad1[7]; | short flag, pad1[7]; | ||||
| /* Colors from Blender Internal that we are still using. */ | /* Colors from Blender Internal that we are still using. */ | ||||
| float r, g, b; | float r, g, b; | ||||
| Show All 37 Lines | typedef struct Material { | ||||
| char pad3[5]; | char pad3[5]; | ||||
| /* Cached slots for texture painting, must be refreshed in | /* Cached slots for texture painting, must be refreshed in | ||||
| * refresh_texpaint_image_cache before using. */ | * refresh_texpaint_image_cache before using. */ | ||||
| struct TexPaintSlot *texpaintslot; | struct TexPaintSlot *texpaintslot; | ||||
| /* Runtime cache for GLSL materials. */ | /* Runtime cache for GLSL materials. */ | ||||
| ListBase gpumaterial; | ListBase gpumaterial; | ||||
| /* grease pencil color */ | |||||
Not Done Inline Actionsgp_style campbellbarton: `gp_style` | |||||
| struct MaterialGPencilStyle *gp_style; | |||||
| } Material; | } Material; | ||||
| /* **************** MATERIAL ********************* */ | /* **************** MATERIAL ********************* */ | ||||
| /* maximum number of materials per material array. | /* maximum number of materials per material array. | ||||
| * (on object, mesh, lamp, etc.). limited by | * (on object, mesh, lamp, etc.). limited by | ||||
| * short mat_nr in verts, faces. | * short mat_nr in verts, faces. | ||||
| * -1 because for active material we store the index + 1 */ | * -1 because for active material we store the index + 1 */ | ||||
| ▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | |||||
| /* blend_shadow */ | /* blend_shadow */ | ||||
| enum { | enum { | ||||
| MA_BS_NONE = 0, | MA_BS_NONE = 0, | ||||
| MA_BS_SOLID, | MA_BS_SOLID, | ||||
| MA_BS_CLIP, | MA_BS_CLIP, | ||||
| MA_BS_HASHED, | MA_BS_HASHED, | ||||
| }; | }; | ||||
| /* Grease Pencil Stroke styles */ | |||||
| enum { | |||||
| GP_STYLE_STROKE_STYLE_SOLID = 0, | |||||
| GP_STYLE_STROKE_STYLE_TEXTURE | |||||
| }; | |||||
| /* Grease Pencil Fill styles */ | |||||
| enum { | |||||
| GP_STYLE_FILL_STYLE_SOLID = 0, | |||||
| GP_STYLE_FILL_STYLE_GRADIENT, | |||||
| GP_STYLE_FILL_STYLE_CHESSBOARD, | |||||
| GP_STYLE_FILL_STYLE_TEXTURE | |||||
| }; | |||||
Not Done Inline ActionsUse GP_STYLE_ prefix. campbellbarton: Use `GP_STYLE_` prefix. | |||||
| /* Grease Pencil Gradient Types */ | |||||
| enum { | |||||
| GP_STYLE_GRADIENT_LINEAR = 0, | |||||
| GP_STYLE_GRADIENT_RADIAL | |||||
| }; | |||||
| #endif | #endif | ||||
Name differently
MaterialGPencilStyle