mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Updates the initPersistFields for ParticleData and Material to be properly organized with order and group to reflect how they're expected in the editors
This commit is contained in:
parent
e630ab859a
commit
b161e72e7f
2 changed files with 296 additions and 281 deletions
|
|
@ -148,31 +148,47 @@ FRangeValidator spinRandFValidator(-1000.f, 1000.f);
|
||||||
void ParticleData::initPersistFields()
|
void ParticleData::initPersistFields()
|
||||||
{
|
{
|
||||||
docsURL;
|
docsURL;
|
||||||
addFieldV( "dragCoefficient", TYPEID< F32 >(), Offset(dragCoefficient, ParticleData), &dragCoefFValidator,
|
addGroup("Basic");
|
||||||
"Particle physics drag amount." );
|
addProtectedField("textureName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData), _setTextureData, defaultProtectedGetFn,
|
||||||
addField( "windCoefficient", TYPEID< F32 >(), Offset(windCoefficient, ParticleData),
|
"Texture file to use for this particle.", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
"Strength of wind on the particles." );
|
addField("animTexName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData),
|
||||||
addFieldV( "gravityCoefficient", TYPEID< F32 >(), Offset(gravityCoefficient, ParticleData), &gravCoefFValidator,
|
"@brief Texture file to use for this particle if animateTexture is true.\n\n"
|
||||||
"Strength of gravity on the particles." );
|
"Deprecated. Use textureName instead.", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
addFieldV( "inheritedVelFactor", TYPEID< F32 >(), Offset(inheritedVelFactor, ParticleData), &CommonValidators::NormalizedFloat,
|
INITPERSISTFIELD_IMAGEASSET(Texture, ParticleData, "Texture to use for this particle.");
|
||||||
"Amount of emitter velocity to add to particle initial velocity." );
|
addField("useInvAlpha", TYPEID< bool >(), Offset(useInvAlpha, ParticleData),
|
||||||
addField( "constantAcceleration", TYPEID< F32 >(), Offset(constantAcceleration, ParticleData),
|
|
||||||
"Constant acceleration to apply to this particle." );
|
|
||||||
addField( "lifetimeMS", TYPEID< S32 >(), Offset(lifetimeMS, ParticleData),
|
|
||||||
"Time in milliseconds before this particle is destroyed." );
|
|
||||||
addField( "lifetimeVarianceMS", TYPEID< S32 >(), Offset(lifetimeVarianceMS, ParticleData),
|
|
||||||
"Variance in lifetime of particle, from 0 - lifetimeMS." );
|
|
||||||
addField( "spinSpeed", TYPEID< F32 >(), Offset(spinSpeed, ParticleData),
|
|
||||||
"Speed at which to spin the particle." );
|
|
||||||
addFieldV( "spinRandomMin", TYPEID< F32 >(), Offset(spinRandomMin, ParticleData), &spinRandFValidator,
|
|
||||||
"Minimum allowed spin speed of this particle, between -1000 and spinRandomMax." );
|
|
||||||
addFieldV( "spinRandomMax", TYPEID< F32 >(), Offset(spinRandomMax, ParticleData), &spinRandFValidator,
|
|
||||||
"Maximum allowed spin speed of this particle, between spinRandomMin and 1000." );
|
|
||||||
addField( "useInvAlpha", TYPEID< bool >(), Offset(useInvAlpha, ParticleData),
|
|
||||||
"@brief Controls how particles blend with the scene.\n\n"
|
"@brief Controls how particles blend with the scene.\n\n"
|
||||||
"If true, particles blend like ParticleBlendStyle NORMAL, if false, "
|
"If true, particles blend like ParticleBlendStyle NORMAL, if false, "
|
||||||
"blend like ParticleBlendStyle ADDITIVE.\n"
|
"blend like ParticleBlendStyle ADDITIVE.\n"
|
||||||
"@note If ParticleEmitterData::blendStyle is set, it will override this value." );
|
"@note If ParticleEmitterData::blendStyle is set, it will override this value.");
|
||||||
|
addField("lifetimeMS", TYPEID< S32 >(), Offset(lifetimeMS, ParticleData),
|
||||||
|
"Time in milliseconds before this particle is destroyed.");
|
||||||
|
addField("lifetimeVarianceMS", TYPEID< S32 >(), Offset(lifetimeVarianceMS, ParticleData),
|
||||||
|
"Variance in lifetime of particle, from 0 - lifetimeMS.");
|
||||||
|
endGroup("Basic");
|
||||||
|
|
||||||
|
addGroup("Motion");
|
||||||
|
addFieldV("dragCoefficient", TYPEID< F32 >(), Offset(dragCoefficient, ParticleData), &dragCoefFValidator,
|
||||||
|
"Particle physics drag amount.");
|
||||||
|
addField("windCoefficient", TYPEID< F32 >(), Offset(windCoefficient, ParticleData),
|
||||||
|
"Strength of wind on the particles.");
|
||||||
|
addFieldV("gravityCoefficient", TYPEID< F32 >(), Offset(gravityCoefficient, ParticleData), &gravCoefFValidator,
|
||||||
|
"Strength of gravity on the particles.");
|
||||||
|
addFieldV("inheritedVelFactor", TYPEID< F32 >(), Offset(inheritedVelFactor, ParticleData), &CommonValidators::NormalizedFloat,
|
||||||
|
"Amount of emitter velocity to add to particle initial velocity.");
|
||||||
|
addField("constantAcceleration", TYPEID< F32 >(), Offset(constantAcceleration, ParticleData),
|
||||||
|
"Constant acceleration to apply to this particle.");
|
||||||
|
endGroup("Motion");
|
||||||
|
|
||||||
|
addGroup("Spin");
|
||||||
|
addField("spinSpeed", TYPEID< F32 >(), Offset(spinSpeed, ParticleData),
|
||||||
|
"Speed at which to spin the particle.");
|
||||||
|
addFieldV("spinRandomMin", TYPEID< F32 >(), Offset(spinRandomMin, ParticleData), &spinRandFValidator,
|
||||||
|
"Minimum allowed spin speed of this particle, between -1000 and spinRandomMax.");
|
||||||
|
addFieldV("spinRandomMax", TYPEID< F32 >(), Offset(spinRandomMax, ParticleData), &spinRandFValidator,
|
||||||
|
"Maximum allowed spin speed of this particle, between spinRandomMin and 1000.");
|
||||||
|
endGroup("Spin");
|
||||||
|
|
||||||
|
addGroup("Animation");
|
||||||
addField( "animateTexture", TYPEID< bool >(), Offset(animateTexture, ParticleData),
|
addField( "animateTexture", TYPEID< bool >(), Offset(animateTexture, ParticleData),
|
||||||
"If true, allow the particle texture to be an animated sprite." );
|
"If true, allow the particle texture to be an animated sprite." );
|
||||||
addField( "framesPerSec", TYPEID< S32 >(), Offset(framesPerSec, ParticleData),
|
addField( "framesPerSec", TYPEID< S32 >(), Offset(framesPerSec, ParticleData),
|
||||||
|
|
@ -203,16 +219,14 @@ void ParticleData::initPersistFields()
|
||||||
"@tsexample\n"
|
"@tsexample\n"
|
||||||
"animTexFrames = \"0-16 20 19 18 17 31-21\";\n"
|
"animTexFrames = \"0-16 20 19 18 17 31-21\";\n"
|
||||||
"@endtsexample\n" );
|
"@endtsexample\n" );
|
||||||
|
endGroup("Animation");
|
||||||
addProtectedField( "textureName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData), _setTextureData, defaultProtectedGetFn,
|
|
||||||
"Texture file to use for this particle.", AbstractClassRep::FIELD_HideInInspectors );
|
|
||||||
addField( "animTexName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData),
|
|
||||||
"@brief Texture file to use for this particle if animateTexture is true.\n\n"
|
|
||||||
"Deprecated. Use textureName instead.", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
INITPERSISTFIELD_IMAGEASSET(Texture, ParticleData, "Texture to use for this particle.");
|
|
||||||
|
|
||||||
|
|
||||||
// Interpolation variables
|
// Interpolation variables
|
||||||
|
addGroup("Over Time");
|
||||||
|
addProtectedField("times", TYPEID< F32 >(), Offset(times, ParticleData), &protectedSetTimes,
|
||||||
|
&defaultProtectedGetFn, PDC_NUM_KEYS,
|
||||||
|
"@brief Time keys used with the colors and sizes keyframes.\n\n"
|
||||||
|
"Values are from 0.0 (particle creation) to 1.0 (end of lifespace).");
|
||||||
addField( "colors", TYPEID< LinearColorF >(), Offset(colors, ParticleData), PDC_NUM_KEYS,
|
addField( "colors", TYPEID< LinearColorF >(), Offset(colors, ParticleData), PDC_NUM_KEYS,
|
||||||
"@brief Particle RGBA color keyframe values.\n\n"
|
"@brief Particle RGBA color keyframe values.\n\n"
|
||||||
"The particle color will linearly interpolate between the color/time keys "
|
"The particle color will linearly interpolate between the color/time keys "
|
||||||
|
|
@ -222,10 +236,7 @@ void ParticleData::initPersistFields()
|
||||||
"@brief Particle size keyframe values.\n\n"
|
"@brief Particle size keyframe values.\n\n"
|
||||||
"The particle size will linearly interpolate between the size/time keys "
|
"The particle size will linearly interpolate between the size/time keys "
|
||||||
"over the lifetime of the particle." );
|
"over the lifetime of the particle." );
|
||||||
addProtectedField( "times", TYPEID< F32 >(), Offset(times, ParticleData), &protectedSetTimes,
|
endGroup("Over Time");
|
||||||
&defaultProtectedGetFn, PDC_NUM_KEYS,
|
|
||||||
"@brief Time keys used with the colors and sizes keyframes.\n\n"
|
|
||||||
"Values are from 0.0 (particle creation) to 1.0 (end of lifespace)." );
|
|
||||||
|
|
||||||
addGroup("AFX");
|
addGroup("AFX");
|
||||||
addProtectedField("textureExtName", TypeFilename, Offset(mTextureExtName, ParticleData), _setTextureExtData, &defaultProtectedGetFn, "", AbstractClassRep::FIELD_HideInInspectors);
|
addProtectedField("textureExtName", TypeFilename, Offset(mTextureExtName, ParticleData), _setTextureExtData, &defaultProtectedGetFn, "", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
|
|
||||||
|
|
@ -252,41 +252,62 @@ void Material::initPersistFields()
|
||||||
|
|
||||||
addArray("Stages", MAX_STAGES);
|
addArray("Stages", MAX_STAGES);
|
||||||
|
|
||||||
|
addGroup("Basic Texture Maps");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(DiffuseMap, MAX_STAGES, Material, "Albedo");
|
||||||
addField("diffuseColor", TypeColorF, Offset(mDiffuse, Material), MAX_STAGES,
|
addField("diffuseColor", TypeColorF, Offset(mDiffuse, Material), MAX_STAGES,
|
||||||
"This color is multiplied against the diffuse texture color. If no diffuse texture "
|
"This color is multiplied against the diffuse texture color. If no diffuse texture "
|
||||||
"is present this is the material color.");
|
"is present this is the material color.");
|
||||||
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(DiffuseMap, MAX_STAGES, Material, "Albedo");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(OverlayMap, MAX_STAGES, Material, "Overlay");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(LightMap, MAX_STAGES, Material, "LightMap");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(ToneMap, MAX_STAGES, Material, "ToneMap");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(DetailMap, MAX_STAGES, Material, "DetailMap");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(NormalMap, MAX_STAGES, Material, "NormalMap");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(ORMConfigMap, MAX_STAGES, Material, "AO|Roughness|metalness map");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(RoughMap, MAX_STAGES, Material, "RoughMap (also needs MetalMap)");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(AOMap, MAX_STAGES, Material, "AOMap");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(MetalMap, MAX_STAGES, Material, "MetalMap (also needs RoughMap)");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(GlowMap, MAX_STAGES, Material, "GlowMap (needs Albedo)");
|
|
||||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(DetailNormalMap, MAX_STAGES, Material, "DetailNormalMap");
|
|
||||||
|
|
||||||
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
||||||
"Enable sRGB for the diffuse color texture map.");
|
"Enable sRGB for the diffuse color texture map.");
|
||||||
|
|
||||||
addField("detailScale", TypePoint2F, Offset(mDetailScale, Material), MAX_STAGES,
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(NormalMap, MAX_STAGES, Material, "NormalMap");
|
||||||
"The scale factor for the detail map.");
|
endGroup("Basic Texture Maps");
|
||||||
|
|
||||||
addField("detailNormalMapStrength", TypeF32, Offset(mDetailNormalMapStrength, Material), MAX_STAGES,
|
|
||||||
"Used to scale the strength of the detail normal map when blended with the base normal map.");
|
|
||||||
|
|
||||||
|
addGroup("Light Influence Maps");
|
||||||
addField("roughness", TypeF32, Offset(mRoughness, Material), MAX_STAGES,
|
addField("roughness", TypeF32, Offset(mRoughness, Material), MAX_STAGES,
|
||||||
"The degree of roughness when not using a ORMConfigMap.");
|
"The degree of roughness when not using a ORMConfigMap.");
|
||||||
|
|
||||||
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
|
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
|
||||||
"The degree of Metalness when not using a ORMConfigMap.");
|
"The degree of Metalness when not using a ORMConfigMap.");
|
||||||
|
|
||||||
|
addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES,
|
||||||
|
"Treat Roughness as Roughness");
|
||||||
|
|
||||||
|
addField("AOChan", TypeF32, Offset(mAOChan, Material), MAX_STAGES,
|
||||||
|
"The input channel AO maps use.");
|
||||||
|
addField("roughnessChan", TypeF32, Offset(mRoughnessChan, Material), MAX_STAGES,
|
||||||
|
"The input channel roughness maps use.");
|
||||||
|
addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES,
|
||||||
|
"The input channel metalness maps use.");
|
||||||
|
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(ORMConfigMap, MAX_STAGES, Material, "AO|Roughness|metalness map");
|
||||||
|
addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES,
|
||||||
|
"Substance Designer Workaround.");
|
||||||
|
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(AOMap, MAX_STAGES, Material, "AOMap");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(RoughMap, MAX_STAGES, Material, "RoughMap (also needs MetalMap)");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(MetalMap, MAX_STAGES, Material, "MetalMap (also needs RoughMap)");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(GlowMap, MAX_STAGES, Material, "GlowMap (needs Albedo)");
|
||||||
|
|
||||||
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
|
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
|
||||||
"glow mask multiplier");
|
"glow mask multiplier");
|
||||||
|
endGroup("Light Influence Maps");
|
||||||
|
|
||||||
|
addGroup("Advanced Texture Maps");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(DetailMap, MAX_STAGES, Material, "DetailMap");
|
||||||
|
addField("detailScale", TypePoint2F, Offset(mDetailScale, Material), MAX_STAGES,
|
||||||
|
"The scale factor for the detail map.");
|
||||||
|
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(DetailNormalMap, MAX_STAGES, Material, "DetailNormalMap");
|
||||||
|
addField("detailNormalMapStrength", TypeF32, Offset(mDetailNormalMapStrength, Material), MAX_STAGES,
|
||||||
|
"Used to scale the strength of the detail normal map when blended with the base normal map.");
|
||||||
|
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(OverlayMap, MAX_STAGES, Material, "Overlay");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(LightMap, MAX_STAGES, Material, "LightMap");
|
||||||
|
INITPERSISTFIELD_IMAGEASSET_ARRAY(ToneMap, MAX_STAGES, Material, "ToneMap");
|
||||||
|
endGroup("Advanced Texture Maps");
|
||||||
|
|
||||||
|
addGroup("Accumulation Properties");
|
||||||
addProtectedField("accuEnabled", TYPEID< bool >(), Offset(mAccuEnabled, Material),
|
addProtectedField("accuEnabled", TYPEID< bool >(), Offset(mAccuEnabled, Material),
|
||||||
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture.");
|
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture.");
|
||||||
|
|
||||||
|
|
@ -304,24 +325,15 @@ void Material::initPersistFields()
|
||||||
|
|
||||||
addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES,
|
addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES,
|
||||||
"Changes specularity to this value where the accumulated material is present.");
|
"Changes specularity to this value where the accumulated material is present.");
|
||||||
|
endGroup("Accumulation Properties");
|
||||||
|
|
||||||
addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES,
|
addGroup("Lighting Properties");
|
||||||
"Substance Designer Workaround.");
|
addField("receiveShadows", TypeBool, Offset(mReceiveShadows, Material), MAX_STAGES,
|
||||||
|
"Shadows being cast onto the material.");
|
||||||
addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES,
|
addField("ignoreLighting", TypeBool, Offset(mIgnoreLighting, Material), MAX_STAGES,
|
||||||
"Treat Roughness as Roughness");
|
"Enables emissive lighting for the material.");
|
||||||
|
|
||||||
addField("roughnessChan", TypeF32, Offset(mRoughnessChan, Material), MAX_STAGES,
|
|
||||||
"The input channel roughness maps use.");
|
|
||||||
|
|
||||||
addField("AOChan", TypeF32, Offset(mAOChan, Material), MAX_STAGES,
|
|
||||||
"The input channel AO maps use.");
|
|
||||||
addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES,
|
|
||||||
"The input channel metalness maps use.");
|
|
||||||
|
|
||||||
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
|
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
|
||||||
"Enables rendering as glowing.");
|
"Enables rendering as glowing.");
|
||||||
|
|
||||||
addField("parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
|
addField("parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
|
||||||
"Enables parallax mapping and defines the scale factor for the parallax effect. Typically "
|
"Enables parallax mapping and defines the scale factor for the parallax effect. Typically "
|
||||||
"this value is less than 0.4 else the effect breaks down.");
|
"this value is less than 0.4 else the effect breaks down.");
|
||||||
|
|
@ -331,33 +343,20 @@ void Material::initPersistFields()
|
||||||
|
|
||||||
addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES,
|
addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES,
|
||||||
"If true the vertex color is used for lighting.");
|
"If true the vertex color is used for lighting.");
|
||||||
|
|
||||||
addField("vertColor", TypeBool, Offset(mVertColor, Material), MAX_STAGES,
|
addField("vertColor", TypeBool, Offset(mVertColor, Material), MAX_STAGES,
|
||||||
"If enabled, vertex colors are premultiplied with diffuse colors.");
|
"If enabled, vertex colors are premultiplied with diffuse colors.");
|
||||||
|
|
||||||
addField("minnaertConstant", TypeF32, Offset(mMinnaertConstant, Material), MAX_STAGES,
|
|
||||||
"The Minnaert shading constant value. Must be greater than 0 to enable the effect.");
|
|
||||||
|
|
||||||
addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES,
|
addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES,
|
||||||
"Enables the subsurface scattering approximation.");
|
"Enables the subsurface scattering approximation.");
|
||||||
|
addField("minnaertConstant", TypeF32, Offset(mMinnaertConstant, Material), MAX_STAGES,
|
||||||
|
"The Minnaert shading constant value. Must be greater than 0 to enable the effect.");
|
||||||
addField("subSurfaceColor", TypeColorF, Offset(mSubSurfaceColor, Material), MAX_STAGES,
|
addField("subSurfaceColor", TypeColorF, Offset(mSubSurfaceColor, Material), MAX_STAGES,
|
||||||
"The color used for the subsurface scattering approximation.");
|
"The color used for the subsurface scattering approximation.");
|
||||||
|
|
||||||
addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES,
|
addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES,
|
||||||
"The 0 to 1 rolloff factor used in the subsurface scattering approximation.");
|
"The 0 to 1 rolloff factor used in the subsurface scattering approximation.");
|
||||||
|
endGroup("Lighting Properties");
|
||||||
|
|
||||||
addField("receiveShadows", TypeBool, Offset(mReceiveShadows, Material), MAX_STAGES,
|
addGroup("Animation Properties");
|
||||||
"Shadows being cast onto the material.");
|
|
||||||
|
|
||||||
addField("ignoreLighting", TypeBool, Offset(mIgnoreLighting, Material), MAX_STAGES,
|
|
||||||
"Enables emissive lighting for the material.");
|
|
||||||
|
|
||||||
addField("doubleSided", TypeBool, Offset(mDoubleSided, Material),
|
|
||||||
"Disables backface culling casing surfaces to be double sided. "
|
|
||||||
"Note that the lighting on the backside will be a mirror of the front "
|
|
||||||
"side of the surface.");
|
|
||||||
|
|
||||||
addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES,
|
addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES,
|
||||||
"The types of animation to play on this material.");
|
"The types of animation to play on this material.");
|
||||||
|
|
||||||
|
|
@ -397,30 +396,15 @@ void Material::initPersistFields()
|
||||||
"@internal");
|
"@internal");
|
||||||
addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES,
|
addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES,
|
||||||
"@internal");
|
"@internal");
|
||||||
|
endGroup("Animation Properties");
|
||||||
// For backwards compatibility.
|
|
||||||
//
|
|
||||||
// They point at the new 'map' fields, but reads always return
|
|
||||||
// an empty string and writes only apply if the value is not empty.
|
|
||||||
//
|
|
||||||
addProtectedField("baseTex", TypeImageFilename, Offset(mDiffuseMapName, Material),
|
|
||||||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
|
||||||
"For backwards compatibility.\n@see diffuseMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
addProtectedField("detailTex", TypeImageFilename, Offset(mDetailMapName, Material),
|
|
||||||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
|
||||||
"For backwards compatibility.\n@see detailMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
addProtectedField("overlayTex", TypeImageFilename, Offset(mOverlayMapName, Material),
|
|
||||||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
|
||||||
"For backwards compatibility.\n@see overlayMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
addProtectedField("bumpTex", TypeImageFilename, Offset(mNormalMapName, Material),
|
|
||||||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
|
||||||
"For backwards compatibility.\n@see normalMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
addProtectedField("colorMultiply", TypeColorF, Offset(mDiffuse, Material),
|
|
||||||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
|
||||||
"For backwards compatibility.\n@see diffuseColor\n", AbstractClassRep::FIELD_HideInInspectors);
|
|
||||||
|
|
||||||
endArray("Stages");
|
endArray("Stages");
|
||||||
|
|
||||||
|
addGroup("Advanced Properties (All Layers)");
|
||||||
|
addField("doubleSided", TypeBool, Offset(mDoubleSided, Material),
|
||||||
|
"Disables backface culling casing surfaces to be double sided. "
|
||||||
|
"Note that the lighting on the backside will be a mirror of the front "
|
||||||
|
"side of the surface.");
|
||||||
addField("castShadows", TypeBool, Offset(mCastShadows, Material),
|
addField("castShadows", TypeBool, Offset(mCastShadows, Material),
|
||||||
"If set to false the lighting system will not cast shadows from this material.");
|
"If set to false the lighting system will not cast shadows from this material.");
|
||||||
|
|
||||||
|
|
@ -446,9 +430,9 @@ void Material::initPersistFields()
|
||||||
|
|
||||||
addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material),
|
addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material),
|
||||||
"Enables the material to use the dynamic cubemap from the ShapeBase object its applied to.");
|
"Enables the material to use the dynamic cubemap from the ShapeBase object its applied to.");
|
||||||
|
endGroup("Advanced Properties (All Layers)");
|
||||||
|
|
||||||
addGroup("Behavioral");
|
addGroup("Behavioral (All Layers)");
|
||||||
|
|
||||||
addField("showFootprints", TypeBool, Offset(mShowFootprints, Material),
|
addField("showFootprints", TypeBool, Offset(mShowFootprints, Material),
|
||||||
"Whether to show player footprint decals on this material.\n\n"
|
"Whether to show player footprint decals on this material.\n\n"
|
||||||
"@see PlayerData::decalData");
|
"@see PlayerData::decalData");
|
||||||
|
|
@ -505,13 +489,33 @@ void Material::initPersistFields()
|
||||||
|
|
||||||
//Deactivate these for the moment as they are not used.
|
//Deactivate these for the moment as they are not used.
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
addField("friction", TypeF32, Offset(mFriction, Material));
|
addField("friction", TypeF32, Offset(mFriction, Material));
|
||||||
addField("directSoundOcclusion", TypeF32, Offset(mDirectSoundOcclusion, Material));
|
addField("directSoundOcclusion", TypeF32, Offset(mDirectSoundOcclusion, Material));
|
||||||
addField("reverbSoundOcclusion", TypeF32, Offset(mReverbSoundOcclusion, Material));
|
addField("reverbSoundOcclusion", TypeF32, Offset(mReverbSoundOcclusion, Material));
|
||||||
#endif
|
#endif
|
||||||
|
endGroup("Behavioral (All Layers)");
|
||||||
|
|
||||||
endGroup("Behavioral");
|
// For backwards compatibility.
|
||||||
|
//
|
||||||
|
// They point at the new 'map' fields, but reads always return
|
||||||
|
// an empty string and writes only apply if the value is not empty.
|
||||||
|
//
|
||||||
|
addProtectedField("baseTex", TypeImageFilename, Offset(mDiffuseMapName, Material),
|
||||||
|
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||||
|
"For backwards compatibility.\n@see diffuseMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
addProtectedField("detailTex", TypeImageFilename, Offset(mDetailMapName, Material),
|
||||||
|
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||||
|
"For backwards compatibility.\n@see detailMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
addProtectedField("overlayTex", TypeImageFilename, Offset(mOverlayMapName, Material),
|
||||||
|
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||||
|
"For backwards compatibility.\n@see overlayMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
addProtectedField("bumpTex", TypeImageFilename, Offset(mNormalMapName, Material),
|
||||||
|
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||||
|
"For backwards compatibility.\n@see normalMap\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
addProtectedField("colorMultiply", TypeColorF, Offset(mDiffuse, Material),
|
||||||
|
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||||
|
"For backwards compatibility.\n@see diffuseColor\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||||
|
|
||||||
Parent::initPersistFields();
|
Parent::initPersistFields();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue