mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +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
|
|
@ -252,151 +252,249 @@ void Material::initPersistFields()
|
|||
|
||||
addArray("Stages", MAX_STAGES);
|
||||
|
||||
addField("diffuseColor", TypeColorF, Offset(mDiffuse, Material), MAX_STAGES,
|
||||
"This color is multiplied against the diffuse texture color. If no diffuse texture "
|
||||
"is present this is the material color.");
|
||||
addGroup("Basic Texture Maps");
|
||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(DiffuseMap, MAX_STAGES, Material, "Albedo");
|
||||
addField("diffuseColor", TypeColorF, Offset(mDiffuse, Material), MAX_STAGES,
|
||||
"This color is multiplied against the diffuse texture color. If no diffuse texture "
|
||||
"is present this is the material color.");
|
||||
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
||||
"Enable sRGB for the diffuse color texture map.");
|
||||
|
||||
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");
|
||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(NormalMap, MAX_STAGES, Material, "NormalMap");
|
||||
endGroup("Basic Texture Maps");
|
||||
|
||||
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
||||
"Enable sRGB for the diffuse color texture map.");
|
||||
addGroup("Light Influence Maps");
|
||||
addField("roughness", TypeF32, Offset(mRoughness, Material), MAX_STAGES,
|
||||
"The degree of roughness when not using a ORMConfigMap.");
|
||||
|
||||
addField("detailScale", TypePoint2F, Offset(mDetailScale, Material), MAX_STAGES,
|
||||
"The scale factor for the detail map.");
|
||||
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
|
||||
"The degree of Metalness when not using a ORMConfigMap.");
|
||||
|
||||
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.");
|
||||
addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES,
|
||||
"Treat Roughness as Roughness");
|
||||
|
||||
addField("roughness", TypeF32, Offset(mRoughness, Material), MAX_STAGES,
|
||||
"The degree of roughness when not using a ORMConfigMap.");
|
||||
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.");
|
||||
|
||||
addField("metalness", TypeF32, Offset(mMetalness, Material), MAX_STAGES,
|
||||
"The degree of Metalness when not using a ORMConfigMap.");
|
||||
INITPERSISTFIELD_IMAGEASSET_ARRAY(ORMConfigMap, MAX_STAGES, Material, "AO|Roughness|metalness map");
|
||||
addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES,
|
||||
"Substance Designer Workaround.");
|
||||
|
||||
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
|
||||
"glow mask multiplier");
|
||||
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)");
|
||||
|
||||
addProtectedField("accuEnabled", TYPEID< bool >(), Offset(mAccuEnabled, Material),
|
||||
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture.");
|
||||
addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES,
|
||||
"glow mask multiplier");
|
||||
endGroup("Light Influence Maps");
|
||||
|
||||
addField("accuScale", TypeF32, Offset(mAccuScale, Material), MAX_STAGES,
|
||||
"The scale that is applied to the accu map texture. You can use this to fit the texture to smaller or larger objects.");
|
||||
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.");
|
||||
|
||||
addField("accuDirection", TypeF32, Offset(mAccuDirection, Material), MAX_STAGES,
|
||||
"The direction of the accumulation. Chose whether you want the accu map to go from top to bottom (ie. snow) or upwards (ie. mold).");
|
||||
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.");
|
||||
|
||||
addField("accuStrength", TypeF32, Offset(mAccuStrength, Material), MAX_STAGES,
|
||||
"The strength of the accu map. This changes the transparency of the accu map texture. Make it subtle or add more contrast.");
|
||||
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),
|
||||
&_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture.");
|
||||
|
||||
addField("accuCoverage", TypeF32, Offset(mAccuCoverage, Material), MAX_STAGES,
|
||||
"The coverage ratio of the accu map texture. Use this to make the entire shape pick up some of the accu map texture or none at all.");
|
||||
addField("accuScale", TypeF32, Offset(mAccuScale, Material), MAX_STAGES,
|
||||
"The scale that is applied to the accu map texture. You can use this to fit the texture to smaller or larger objects.");
|
||||
|
||||
addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES,
|
||||
"Changes specularity to this value where the accumulated material is present.");
|
||||
addField("accuDirection", TypeF32, Offset(mAccuDirection, Material), MAX_STAGES,
|
||||
"The direction of the accumulation. Chose whether you want the accu map to go from top to bottom (ie. snow) or upwards (ie. mold).");
|
||||
|
||||
addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES,
|
||||
"Substance Designer Workaround.");
|
||||
addField("accuStrength", TypeF32, Offset(mAccuStrength, Material), MAX_STAGES,
|
||||
"The strength of the accu map. This changes the transparency of the accu map texture. Make it subtle or add more contrast.");
|
||||
|
||||
addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES,
|
||||
"Treat Roughness as Roughness");
|
||||
addField("accuCoverage", TypeF32, Offset(mAccuCoverage, Material), MAX_STAGES,
|
||||
"The coverage ratio of the accu map texture. Use this to make the entire shape pick up some of the accu map texture or none at all.");
|
||||
|
||||
addField("roughnessChan", TypeF32, Offset(mRoughnessChan, Material), MAX_STAGES,
|
||||
"The input channel roughness maps use.");
|
||||
addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES,
|
||||
"Changes specularity to this value where the accumulated material is present.");
|
||||
endGroup("Accumulation Properties");
|
||||
|
||||
addGroup("Lighting Properties");
|
||||
addField("receiveShadows", TypeBool, Offset(mReceiveShadows, Material), MAX_STAGES,
|
||||
"Shadows being cast onto the material.");
|
||||
addField("ignoreLighting", TypeBool, Offset(mIgnoreLighting, Material), MAX_STAGES,
|
||||
"Enables emissive lighting for the material.");
|
||||
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
|
||||
"Enables rendering as glowing.");
|
||||
addField("parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
|
||||
"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.");
|
||||
|
||||
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("useAnisotropic", TypeBool, Offset(mUseAnisotropic, Material), MAX_STAGES,
|
||||
"Use anisotropic filtering for the textures of this stage.");
|
||||
|
||||
addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES,
|
||||
"Enables rendering as glowing.");
|
||||
addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES,
|
||||
"If true the vertex color is used for lighting.");
|
||||
addField("vertColor", TypeBool, Offset(mVertColor, Material), MAX_STAGES,
|
||||
"If enabled, vertex colors are premultiplied with diffuse colors.");
|
||||
|
||||
addField("parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES,
|
||||
"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.");
|
||||
addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES,
|
||||
"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,
|
||||
"The color used for the subsurface scattering approximation.");
|
||||
addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES,
|
||||
"The 0 to 1 rolloff factor used in the subsurface scattering approximation.");
|
||||
endGroup("Lighting Properties");
|
||||
|
||||
addField("useAnisotropic", TypeBool, Offset(mUseAnisotropic, Material), MAX_STAGES,
|
||||
"Use anisotropic filtering for the textures of this stage.");
|
||||
addGroup("Animation Properties");
|
||||
addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES,
|
||||
"The types of animation to play on this material.");
|
||||
|
||||
addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES,
|
||||
"If true the vertex color is used for lighting.");
|
||||
addField("scrollDir", TypePoint2F, Offset(mScrollDir, Material), MAX_STAGES,
|
||||
"The scroll direction in UV space when scroll animation is enabled.");
|
||||
|
||||
addField("vertColor", TypeBool, Offset(mVertColor, Material), MAX_STAGES,
|
||||
"If enabled, vertex colors are premultiplied with diffuse colors.");
|
||||
addField("scrollSpeed", TypeF32, Offset(mScrollSpeed, Material), MAX_STAGES,
|
||||
"The speed to scroll the texture in UVs per second when scroll animation is enabled.");
|
||||
|
||||
addField("minnaertConstant", TypeF32, Offset(mMinnaertConstant, Material), MAX_STAGES,
|
||||
"The Minnaert shading constant value. Must be greater than 0 to enable the effect.");
|
||||
addField("rotSpeed", TypeF32, Offset(mRotSpeed, Material), MAX_STAGES,
|
||||
"The speed to rotate the texture in degrees per second when rotation animation is enabled.");
|
||||
|
||||
addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES,
|
||||
"Enables the subsurface scattering approximation.");
|
||||
addField("rotPivotOffset", TypePoint2F, Offset(mRotPivotOffset, Material), MAX_STAGES,
|
||||
"The piviot position in UV coordinates to center the rotation animation.");
|
||||
|
||||
addField("subSurfaceColor", TypeColorF, Offset(mSubSurfaceColor, Material), MAX_STAGES,
|
||||
"The color used for the subsurface scattering approximation.");
|
||||
addField("waveType", TYPEID< WaveType >(), Offset(mWaveType, Material), MAX_STAGES,
|
||||
"The type of wave animation to perform when wave animation is enabled.");
|
||||
|
||||
addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES,
|
||||
"The 0 to 1 rolloff factor used in the subsurface scattering approximation.");
|
||||
addField("waveFreq", TypeF32, Offset(mWaveFreq, Material), MAX_STAGES,
|
||||
"The wave frequency when wave animation is enabled.");
|
||||
|
||||
addField("receiveShadows", TypeBool, Offset(mReceiveShadows, Material), MAX_STAGES,
|
||||
"Shadows being cast onto the material.");
|
||||
addField("waveAmp", TypeF32, Offset(mWaveAmp, Material), MAX_STAGES,
|
||||
"The wave amplitude when wave animation is enabled.");
|
||||
|
||||
addField("ignoreLighting", TypeBool, Offset(mIgnoreLighting, Material), MAX_STAGES,
|
||||
"Enables emissive lighting for the material.");
|
||||
addField("sequenceFramePerSec", TypeF32, Offset(mSeqFramePerSec, Material), MAX_STAGES,
|
||||
"The number of frames per second for frame based sequence animations if greater than zero.");
|
||||
|
||||
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("sequenceSegmentSize", TypeF32, Offset(mSeqSegSize, Material), MAX_STAGES,
|
||||
"The size of each frame in UV units for sequence animations.");
|
||||
|
||||
addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES,
|
||||
"The types of animation to play on this material.");
|
||||
// Texture atlasing
|
||||
addField("cellIndex", TypePoint2I, Offset(mCellIndex, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("cellLayout", TypePoint2I, Offset(mCellLayout, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("cellSize", TypeS32, Offset(mCellSize, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
endGroup("Animation Properties");
|
||||
|
||||
addField("scrollDir", TypePoint2F, Offset(mScrollDir, Material), MAX_STAGES,
|
||||
"The scroll direction in UV space when scroll animation is enabled.");
|
||||
endArray("Stages");
|
||||
|
||||
addField("scrollSpeed", TypeF32, Offset(mScrollSpeed, Material), MAX_STAGES,
|
||||
"The speed to scroll the texture in UVs per second when scroll animation is enabled.");
|
||||
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),
|
||||
"If set to false the lighting system will not cast shadows from this material.");
|
||||
|
||||
addField("rotSpeed", TypeF32, Offset(mRotSpeed, Material), MAX_STAGES,
|
||||
"The speed to rotate the texture in degrees per second when rotation animation is enabled.");
|
||||
addField("planarReflection", TypeBool, Offset(mPlanarReflection, Material), "@internal");
|
||||
|
||||
addField("rotPivotOffset", TypePoint2F, Offset(mRotPivotOffset, Material), MAX_STAGES,
|
||||
"The piviot position in UV coordinates to center the rotation animation.");
|
||||
addField("translucent", TypeBool, Offset(mTranslucent, Material),
|
||||
"If true this material is translucent blended.");
|
||||
|
||||
addField("waveType", TYPEID< WaveType >(), Offset(mWaveType, Material), MAX_STAGES,
|
||||
"The type of wave animation to perform when wave animation is enabled.");
|
||||
addField("translucentBlendOp", TYPEID< BlendOp >(), Offset(mTranslucentBlendOp, Material),
|
||||
"The type of blend operation to use when the material is translucent.");
|
||||
|
||||
addField("waveFreq", TypeF32, Offset(mWaveFreq, Material), MAX_STAGES,
|
||||
"The wave frequency when wave animation is enabled.");
|
||||
addField("translucentZWrite", TypeBool, Offset(mTranslucentZWrite, Material),
|
||||
"If enabled and the material is translucent it will write into the depth buffer.");
|
||||
|
||||
addField("waveAmp", TypeF32, Offset(mWaveAmp, Material), MAX_STAGES,
|
||||
"The wave amplitude when wave animation is enabled.");
|
||||
addField("alphaTest", TypeBool, Offset(mAlphaTest, Material),
|
||||
"Enables alpha test when rendering the material.\n@see alphaRef\n");
|
||||
|
||||
addField("sequenceFramePerSec", TypeF32, Offset(mSeqFramePerSec, Material), MAX_STAGES,
|
||||
"The number of frames per second for frame based sequence animations if greater than zero.");
|
||||
addField("alphaRef", TypeS32, Offset(mAlphaRef, Material),
|
||||
"The alpha reference value for alpha testing. Must be between 0 to 255.\n@see alphaTest\n");
|
||||
|
||||
addField("sequenceSegmentSize", TypeF32, Offset(mSeqSegSize, Material), MAX_STAGES,
|
||||
"The size of each frame in UV units for sequence animations.");
|
||||
addField("cubemap", TypeRealString, Offset(mCubemapName, Material),
|
||||
"The name of a CubemapData for environment mapping.");
|
||||
|
||||
// Texture atlasing
|
||||
addField("cellIndex", TypePoint2I, Offset(mCellIndex, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("cellLayout", TypePoint2I, Offset(mCellLayout, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("cellSize", TypeS32, Offset(mCellSize, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES,
|
||||
"@internal");
|
||||
addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material),
|
||||
"Enables the material to use the dynamic cubemap from the ShapeBase object its applied to.");
|
||||
endGroup("Advanced Properties (All Layers)");
|
||||
|
||||
addGroup("Behavioral (All Layers)");
|
||||
addField("showFootprints", TypeBool, Offset(mShowFootprints, Material),
|
||||
"Whether to show player footprint decals on this material.\n\n"
|
||||
"@see PlayerData::decalData");
|
||||
|
||||
addField("showDust", TypeBool, Offset(mShowDust, Material),
|
||||
"Whether to emit dust particles from a shape moving over the material. This is, for example, used by "
|
||||
"vehicles or players to decide whether to show dust trails.");
|
||||
|
||||
addField("effectColor", TypeColorF, Offset(mEffectColor, Material), NUM_EFFECT_COLOR_STAGES,
|
||||
"If #showDust is true, this is the set of colors to use for the ParticleData of the dust "
|
||||
"emitter.\n\n"
|
||||
"@see ParticleData::colors");
|
||||
|
||||
addField("footstepSoundId", TypeS32, Offset(mFootstepSoundId, Material),
|
||||
"What sound to play from the PlayerData sound list when the player walks over the material. -1 (default) to not play any sound.\n"
|
||||
"\n"
|
||||
"The IDs are:\n\n"
|
||||
"- 0: PlayerData::FootSoftSound\n"
|
||||
"- 1: PlayerData::FootHardSound\n"
|
||||
"- 2: PlayerData::FootMetalSound\n"
|
||||
"- 3: PlayerData::FootSnowSound\n"
|
||||
"- 4: PlayerData::FootShallowSound\n"
|
||||
"- 5: PlayerData::FootWadingSound\n"
|
||||
"- 6: PlayerData::FootUnderwaterSound\n"
|
||||
"- 7: PlayerData::FootBubblesSound\n"
|
||||
"- 8: PlayerData::movingBubblesSound\n"
|
||||
"- 9: PlayerData::waterBreathSound\n"
|
||||
"- 10: PlayerData::impactSoftSound\n"
|
||||
"- 11: PlayerData::impactHardSound\n"
|
||||
"- 12: PlayerData::impactMetalSound\n"
|
||||
"- 13: PlayerData::impactSnowSound\n"
|
||||
"- 14: PlayerData::impactWaterEasy\n"
|
||||
"- 15: PlayerData::impactWaterMedium\n"
|
||||
"- 16: PlayerData::impactWaterHard\n"
|
||||
"- 17: PlayerData::exitingWater\n");
|
||||
|
||||
INITPERSISTFIELD_SOUNDASSET(CustomFootstepSound, Material,
|
||||
"The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is "
|
||||
"useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment.\n\n"
|
||||
"@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too.");
|
||||
addField("impactSoundId", TypeS32, Offset(mImpactSoundId, Material),
|
||||
"What sound to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater "
|
||||
"than PlayerData::groundImpactMinSpeed.\n\n"
|
||||
"For a list of IDs, see #footstepSoundId");
|
||||
addField("ImpactFXIndex", TypeS32, Offset(mImpactFXIndex, Material),
|
||||
"What FX to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater "
|
||||
"than PlayerData::groundImpactMinSpeed.\n\n"
|
||||
"For a list of IDs, see #impactFXId");
|
||||
INITPERSISTFIELD_SOUNDASSET(CustomImpactSound, Material,
|
||||
"The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. "
|
||||
"If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials "
|
||||
"without having to rely on the PlayerData sound assignment.\n\n"
|
||||
"@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too.");
|
||||
|
||||
//Deactivate these for the moment as they are not used.
|
||||
|
||||
#if 0
|
||||
addField("friction", TypeF32, Offset(mFriction, Material));
|
||||
addField("directSoundOcclusion", TypeF32, Offset(mDirectSoundOcclusion, Material));
|
||||
addField("reverbSoundOcclusion", TypeF32, Offset(mReverbSoundOcclusion, Material));
|
||||
#endif
|
||||
endGroup("Behavioral (All Layers)");
|
||||
|
||||
// For backwards compatibility.
|
||||
//
|
||||
|
|
@ -419,100 +517,6 @@ void Material::initPersistFields()
|
|||
defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES,
|
||||
"For backwards compatibility.\n@see diffuseColor\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||
|
||||
endArray("Stages");
|
||||
|
||||
addField("castShadows", TypeBool, Offset(mCastShadows, Material),
|
||||
"If set to false the lighting system will not cast shadows from this material.");
|
||||
|
||||
addField("planarReflection", TypeBool, Offset(mPlanarReflection, Material), "@internal");
|
||||
|
||||
addField("translucent", TypeBool, Offset(mTranslucent, Material),
|
||||
"If true this material is translucent blended.");
|
||||
|
||||
addField("translucentBlendOp", TYPEID< BlendOp >(), Offset(mTranslucentBlendOp, Material),
|
||||
"The type of blend operation to use when the material is translucent.");
|
||||
|
||||
addField("translucentZWrite", TypeBool, Offset(mTranslucentZWrite, Material),
|
||||
"If enabled and the material is translucent it will write into the depth buffer.");
|
||||
|
||||
addField("alphaTest", TypeBool, Offset(mAlphaTest, Material),
|
||||
"Enables alpha test when rendering the material.\n@see alphaRef\n");
|
||||
|
||||
addField("alphaRef", TypeS32, Offset(mAlphaRef, Material),
|
||||
"The alpha reference value for alpha testing. Must be between 0 to 255.\n@see alphaTest\n");
|
||||
|
||||
addField("cubemap", TypeRealString, Offset(mCubemapName, Material),
|
||||
"The name of a CubemapData for environment mapping.");
|
||||
|
||||
addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material),
|
||||
"Enables the material to use the dynamic cubemap from the ShapeBase object its applied to.");
|
||||
|
||||
addGroup("Behavioral");
|
||||
|
||||
addField("showFootprints", TypeBool, Offset(mShowFootprints, Material),
|
||||
"Whether to show player footprint decals on this material.\n\n"
|
||||
"@see PlayerData::decalData");
|
||||
|
||||
addField("showDust", TypeBool, Offset(mShowDust, Material),
|
||||
"Whether to emit dust particles from a shape moving over the material. This is, for example, used by "
|
||||
"vehicles or players to decide whether to show dust trails.");
|
||||
|
||||
addField("effectColor", TypeColorF, Offset(mEffectColor, Material), NUM_EFFECT_COLOR_STAGES,
|
||||
"If #showDust is true, this is the set of colors to use for the ParticleData of the dust "
|
||||
"emitter.\n\n"
|
||||
"@see ParticleData::colors");
|
||||
|
||||
addField("footstepSoundId", TypeS32, Offset(mFootstepSoundId, Material),
|
||||
"What sound to play from the PlayerData sound list when the player walks over the material. -1 (default) to not play any sound.\n"
|
||||
"\n"
|
||||
"The IDs are:\n\n"
|
||||
"- 0: PlayerData::FootSoftSound\n"
|
||||
"- 1: PlayerData::FootHardSound\n"
|
||||
"- 2: PlayerData::FootMetalSound\n"
|
||||
"- 3: PlayerData::FootSnowSound\n"
|
||||
"- 4: PlayerData::FootShallowSound\n"
|
||||
"- 5: PlayerData::FootWadingSound\n"
|
||||
"- 6: PlayerData::FootUnderwaterSound\n"
|
||||
"- 7: PlayerData::FootBubblesSound\n"
|
||||
"- 8: PlayerData::movingBubblesSound\n"
|
||||
"- 9: PlayerData::waterBreathSound\n"
|
||||
"- 10: PlayerData::impactSoftSound\n"
|
||||
"- 11: PlayerData::impactHardSound\n"
|
||||
"- 12: PlayerData::impactMetalSound\n"
|
||||
"- 13: PlayerData::impactSnowSound\n"
|
||||
"- 14: PlayerData::impactWaterEasy\n"
|
||||
"- 15: PlayerData::impactWaterMedium\n"
|
||||
"- 16: PlayerData::impactWaterHard\n"
|
||||
"- 17: PlayerData::exitingWater\n");
|
||||
|
||||
INITPERSISTFIELD_SOUNDASSET(CustomFootstepSound, Material,
|
||||
"The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is "
|
||||
"useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment.\n\n"
|
||||
"@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too.");
|
||||
addField("impactSoundId", TypeS32, Offset(mImpactSoundId, Material),
|
||||
"What sound to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater "
|
||||
"than PlayerData::groundImpactMinSpeed.\n\n"
|
||||
"For a list of IDs, see #footstepSoundId");
|
||||
addField("ImpactFXIndex", TypeS32, Offset(mImpactFXIndex, Material),
|
||||
"What FX to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater "
|
||||
"than PlayerData::groundImpactMinSpeed.\n\n"
|
||||
"For a list of IDs, see #impactFXId");
|
||||
INITPERSISTFIELD_SOUNDASSET(CustomImpactSound, Material,
|
||||
"The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. "
|
||||
"If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials "
|
||||
"without having to rely on the PlayerData sound assignment.\n\n"
|
||||
"@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too.");
|
||||
|
||||
//Deactivate these for the moment as they are not used.
|
||||
|
||||
#if 0
|
||||
addField("friction", TypeF32, Offset(mFriction, Material));
|
||||
addField("directSoundOcclusion", TypeF32, Offset(mDirectSoundOcclusion, Material));
|
||||
addField("reverbSoundOcclusion", TypeF32, Offset(mReverbSoundOcclusion, Material));
|
||||
#endif
|
||||
|
||||
endGroup("Behavioral");
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue