Cleanup: Remove unused MTex.texflag

This commit is contained in:
Campbell Barton 2019-01-29 08:52:56 +11:00
parent 097b1cd08a
commit 957b4547ae
Notes: blender-bot 2023-02-14 04:54:19 +01:00
Referenced by issue #61033, Extreme lag when modeling lowpoly with Subsurface on top
Referenced by issue #61032, Sculpting Tab resetting Bug
Referenced by issue #61020, No MMB zoom/pan in half of shader editor
Referenced by issue #61021, Dynamic Paint on Weights and Particle System doesn't work when using Density. Only Lengh.
Referenced by issue #60999, Duplifaced objects are not drawn in edit mode
Referenced by issue #61006, Bug: Extrude faces along normals + "Individual origins" pivot point
Referenced by issue #60991, Normal Map on Tangent Space makes some objects emissive
Referenced by issue #60984, Can't perform viewport navigation with left mouse button and active manipulator
Referenced by issue #60967, Grease Pencil pressure sensitivity issue with Adesso Cyber tablet T12
Referenced by issue #60971, Apply Visual Transform(ctrl+a) isn't working with constraints
Referenced by issue #60949, No device input in 2.8 3D viewport
Referenced by issue #60953, Normal Map Tangent Space stopped working with Object Texture Coordinate
Referenced by issue #60931, Workspaces are not working when nothing is selected (can cause crash)
Referenced by issue #58662, Crashes and freezes with hair and motion blur
Referenced by issue #58193, Blender 2.8 - Adding new collection from the Objects Menu, does not add the collection to the scene
5 changed files with 3 additions and 52 deletions

View File

@ -745,9 +745,6 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
elif tex.texture_coords == 'OBJECT':
col.prop(tex, "object", text="Object")
elif tex.texture_coords == 'ALONG_STROKE':
col.prop(tex, "use_tips", text="Use Tips")
col.separator()
if isinstance(idblock, FreestyleLineStyle):
@ -840,15 +837,10 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
col = flow.column()
col.prop(tex, "blend_type", text="Blend")
col.prop(tex, "use_rgb_to_intensity")
# color is used on gray-scale textures even when use_rgb_to_intensity is disabled.
# Color is used on gray-scale textures
col.prop(tex, "color", text="")
col = flow.column()
col.prop(tex, "invert", text="Negative")
col.prop(tex, "use_stencil")
class TextureColorsPoll:
@classmethod

View File

@ -307,7 +307,6 @@ void BKE_texture_mtex_default(MTex *mtex)
mtex->size[1] = 1.0;
mtex->size[2] = 1.0;
mtex->tex = NULL;
mtex->texflag = MTEX_3TAP_BUMP | MTEX_BUMP_OBJECTSPACE | MTEX_MAPTO_BOUNDS;
mtex->colormodel = 0;
mtex->r = 1.0;
mtex->g = 0.0;

View File

@ -65,7 +65,8 @@ typedef struct MTex {
char pad[2];
float ofs[3], size[3], rot, random_angle;
short texflag, colormodel, pmapto, pmaptoneg;
char _pad0[2];
short colormodel, pmapto, pmaptoneg;
short normapspace, which_output;
float r, g, b, k;
float def_var, rt;
@ -427,24 +428,6 @@ typedef struct ColorMapping {
#define PROJ_Y 2
#define PROJ_Z 3
/* texflag */
#define MTEX_RGBTOINT (1 << 0)
#define MTEX_STENCIL (1 << 1)
#define MTEX_NEGATIVE (1 << 2)
#define MTEX_ALPHAMIX (1 << 3)
#define MTEX_VIEWSPACE (1 << 4)
#define MTEX_DUPLI_MAPTO (1 << 5)
#define MTEX_OB_DUPLI_ORIG (1 << 6)
#define MTEX_COMPAT_BUMP (1 << 7)
#define MTEX_3TAP_BUMP (1 << 8)
#define MTEX_5TAP_BUMP (1 << 9)
#define MTEX_BUMP_OBJECTSPACE (1 << 10)
#define MTEX_BUMP_TEXTURESPACE (1 << 11)
/* #define MTEX_BUMP_FLIPPED (1 << 12) */ /* UNUSED */
#define MTEX_TIPS (1 << 12) /* should use with_freestyle flag? */
#define MTEX_BICUBIC_BUMP (1 << 13)
#define MTEX_MAPTO_BOUNDS (1 << 14)
/* blendtype */
#define MTEX_BLEND 0
#define MTEX_MUL 1

View File

@ -554,11 +554,6 @@ static void rna_def_linestyle_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Alpha", "The texture affects the alpha value");
RNA_def_property_update(prop, 0, "rna_LineStyle_update");
prop = RNA_def_property(srna, "use_tips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_TIPS);
RNA_def_property_ui_text(prop, "Use Tips", "Lower half of the texture is for tips of the stroke");
RNA_def_property_update(prop, 0, "rna_LineStyle_update");
prop = RNA_def_property(srna, "texture_coords", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "texco");
RNA_def_property_enum_items(prop, texco_items);

View File

@ -621,24 +621,6 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Blend Type", "Mode used to apply the texture");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop = RNA_def_property(srna, "use_stencil", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_STENCIL);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_ui_text(prop, "Stencil", "Use this texture as a blending value on the next texture");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop = RNA_def_property(srna, "invert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_NEGATIVE);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_ui_text(prop, "Negate", "Invert the values of the texture to reverse its effect");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop = RNA_def_property(srna, "use_rgb_to_intensity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_RGBTOINT);
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_ui_text(prop, "RGB to Intensity", "Convert texture RGB values to intensity (gray) values");
RNA_def_property_update(prop, 0, "rna_TextureSlot_update");
prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);