Cleanup: remove unused Material.pr_light

Also no need for 14 bytes of padding.
This commit is contained in:
Campbell Barton 2019-02-27 13:08:06 +11:00
parent 168d3fd528
commit f595d558f0
3 changed files with 8 additions and 16 deletions

View File

@ -135,7 +135,6 @@ void BKE_material_init(Material *ma)
ma->roughness = 0.25f;
ma->pr_light = 3; /* two lights, is bits */
ma->pr_type = MA_SPHERE;
ma->preview = NULL;

View File

@ -1178,14 +1178,6 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
if (bmain->versionfile <= 233) {
bScreen *sc;
Material *ma = bmain->mat.first;
/* Object *ob = bmain->object.first; */
while (ma) {
if (ma->pr_light == 0)
ma->pr_light = 3;
ma = ma->id.next;
}
for (sc = bmain->screen.first; sc; sc = sc->id.next) {
ScrArea *sa;

View File

@ -134,7 +134,8 @@ typedef struct Material {
/** Animation data (must be immediately after id for utilities to use it). */
struct AnimData *adt;
short flag, pad1[7];
short flag;
char _pad1[2];
/* Colors from Blender Internal that we are still using. */
float r, g, b, a;
@ -146,13 +147,13 @@ typedef struct Material {
float gloss_mir DNA_DEPRECATED;
float roughness;
float metallic;
float pad4;
char _pad0[2];
/* Ror buttons and render. */
/** For buttons and render. */
char pr_type, use_nodes;
short pr_light, pr_texture;
short pr_texture;
/* Index for render passes. */
/** Index for render passes. */
short index;
struct bNodeTree *nodetree;
@ -169,7 +170,7 @@ typedef struct Material {
short paint_active_slot;
short paint_clone_slot;
short tot_slots;
short pad2[3];
char _pad2[2];
/* Transparency. */
float alpha_threshold;
@ -177,7 +178,7 @@ typedef struct Material {
char blend_method;
char blend_shadow;
char blend_flag;
char pad3[5];
char _pad3[1];
/**
* Cached slots for texture painting, must be refreshed in