mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
inspector cleanups
clustering work for datablocks for both consistent scanning for object parameters, as well as an eye towards orgainizing things to make reviewing what variations of components we'll be needing down the line clearer
This commit is contained in:
parent
23895e365a
commit
f07c8745b2
27 changed files with 692 additions and 700 deletions
|
|
@ -166,8 +166,6 @@ static ShapeBaseImageData::StateData gDefaultStateData;
|
|||
|
||||
ShapeBaseImageData::ShapeBaseImageData()
|
||||
{
|
||||
emap = false;
|
||||
|
||||
mountPoint = 0;
|
||||
mountOffset.identity();
|
||||
eyeOffset.identity();
|
||||
|
|
@ -631,92 +629,108 @@ S32 ShapeBaseImageData::lookupState(const char* name)
|
|||
|
||||
void ShapeBaseImageData::initPersistFields()
|
||||
{
|
||||
addField( "emap", TypeBool, Offset(emap, ShapeBaseImageData),
|
||||
"@brief Whether to enable environment mapping on this Image.\n\n" );
|
||||
|
||||
INITPERSISTFIELD_SHAPEASSET_ARRAY(Shape, MaxShapes, ShapeBaseImageData, "The shape asset to use for this image in the third person")
|
||||
|
||||
addGroup("Shapes");
|
||||
INITPERSISTFIELD_SHAPEASSET_ARRAY(Shape, MaxShapes, ShapeBaseImageData, "The shape asset to use for this image in the third person")
|
||||
//addProtectedField("shapeFileFP", TypeShapeFilename, Offset(mShapeName[1], ShapeBaseImageData), _setShapeData, defaultProtectedGetFn, "deprecated alias for ShapeFPFile/Asset", AbstractClassRep::FIELD_HideInInspectors);
|
||||
addField("casing", TYPEID< DebrisData >(), Offset(casing, ShapeBaseImageData),
|
||||
"@brief DebrisData datablock to use for ejected casings.\n\n"
|
||||
"@see stateEjectShell");
|
||||
addField("shellExitDir", TypePoint3F, Offset(shellExitDir, ShapeBaseImageData),
|
||||
"@brief Vector direction to eject shell casings.\n\n"
|
||||
"@see casing");
|
||||
addField("shellExitVariance", TypeF32, Offset(shellExitVariance, ShapeBaseImageData),
|
||||
"@brief Variance (in degrees) from the shellExitDir vector to eject casings.\n\n"
|
||||
"@see shellExitDir");
|
||||
addField("shellVelocity", TypeF32, Offset(shellVelocity, ShapeBaseImageData),
|
||||
"@brief Speed at which to eject casings.\n\n"
|
||||
"@see casing");
|
||||
addField("computeCRC", TypeBool, Offset(computeCRC, ShapeBaseImageData),
|
||||
"If true, verify that the CRC of the client's Image matches the server's "
|
||||
"CRC for the Image when loaded by the client.");
|
||||
endGroup("Shapes");
|
||||
|
||||
addField( "imageAnimPrefix", TypeCaseString, Offset(imageAnimPrefix, ShapeBaseImageData),
|
||||
"@brief Passed along to the mounting shape to modify animation sequences played in third person. [optional]\n\n" );
|
||||
addField( "imageAnimPrefixFP", TypeCaseString, Offset(imageAnimPrefixFP, ShapeBaseImageData),
|
||||
"@brief Passed along to the mounting shape to modify animation sequences played in first person. [optional]\n\n" );
|
||||
|
||||
addField( "animateAllShapes", TypeBool, Offset(animateAllShapes, ShapeBaseImageData),
|
||||
"@brief Indicates that all shapes should be animated in sync.\n\n"
|
||||
"When multiple shapes are defined for this image datablock, each of them are automatically "
|
||||
"animated in step with each other. This allows for easy switching between between shapes "
|
||||
"when some other condition changes, such as going from first person to third person, and "
|
||||
"keeping their look consistent. If you know that you'll never switch between shapes on the "
|
||||
"fly, such as players only being allowed in a first person view, then you could set this to "
|
||||
"false to save some calculations.\n\n"
|
||||
"There are other circumstances internal to the engine that determine that only the current shape "
|
||||
"should be animated rather than all defined shapes. In those cases, this property is ignored.\n\n"
|
||||
"@note This property is only important if you have more than one shape defined, such as shapeFileFP.\n\n"
|
||||
"@see shapeFileFP\n");
|
||||
|
||||
addField( "animateOnServer", TypeBool, Offset(animateOnServer, ShapeBaseImageData),
|
||||
"@brief Indicates that the image should be animated on the server.\n\n"
|
||||
"In most cases you'll want this set if you're using useEyeNode. You may also want to "
|
||||
"set this if the muzzlePoint is animated while it shoots. You can set this "
|
||||
"to false even if these previous cases are true if the image's shape is set "
|
||||
"up in the correct position and orientation in the 'root' pose and none of "
|
||||
"the nodes are animated at key times, such as the muzzlePoint essentially "
|
||||
"remaining at the same position at the start of the fire state (it could "
|
||||
"animate just fine after the projectile is away as the muzzle vector is only "
|
||||
"calculated at the start of the state).\n\n"
|
||||
"You'll also want to set this to true if you're animating the camera using the "
|
||||
"image's 'eye' node -- unless the movement is very subtle and doesn't need to "
|
||||
"be reflected on the server.\n\n"
|
||||
"@note Setting this to true causes up to four animation threads to be advanced on the server "
|
||||
"for each instance in use, although for most images only one or two are actually defined.\n\n"
|
||||
"@see useEyeNode\n");
|
||||
|
||||
addField( "scriptAnimTransitionTime", TypeF32, Offset(scriptAnimTransitionTime, ShapeBaseImageData),
|
||||
"@brief The amount of time to transition between the previous sequence and new sequence when the script prefix has changed.\n\n"
|
||||
"When setImageScriptAnimPrefix() is used on a ShapeBase that has this image mounted, the image "
|
||||
"will attempt to switch to the new animation sequence based on the given script prefix. This is "
|
||||
"the amount of time it takes to transition from the previously playing animation sequence to"
|
||||
"the new script prefix-based animation sequence.\n"
|
||||
"@see ShapeBase::setImageScriptAnimPrefix()");
|
||||
addGroup("Animation");
|
||||
addField( "imageAnimPrefix", TypeCaseString, Offset(imageAnimPrefix, ShapeBaseImageData),
|
||||
"@brief Passed along to the mounting shape to modify animation sequences played in third person. [optional]\n\n" );
|
||||
addField( "imageAnimPrefixFP", TypeCaseString, Offset(imageAnimPrefixFP, ShapeBaseImageData),
|
||||
"@brief Passed along to the mounting shape to modify animation sequences played in first person. [optional]\n\n" );
|
||||
addField( "animateAllShapes", TypeBool, Offset(animateAllShapes, ShapeBaseImageData),
|
||||
"@brief Indicates that all shapes should be animated in sync.\n\n"
|
||||
"When multiple shapes are defined for this image datablock, each of them are automatically "
|
||||
"animated in step with each other. This allows for easy switching between between shapes "
|
||||
"when some other condition changes, such as going from first person to third person, and "
|
||||
"keeping their look consistent. If you know that you'll never switch between shapes on the "
|
||||
"fly, such as players only being allowed in a first person view, then you could set this to "
|
||||
"false to save some calculations.\n\n"
|
||||
"There are other circumstances internal to the engine that determine that only the current shape "
|
||||
"should be animated rather than all defined shapes. In those cases, this property is ignored.\n\n"
|
||||
"@note This property is only important if you have more than one shape defined, such as shapeFileFP.\n\n"
|
||||
"@see shapeFileFP\n");
|
||||
addField( "animateOnServer", TypeBool, Offset(animateOnServer, ShapeBaseImageData),
|
||||
"@brief Indicates that the image should be animated on the server.\n\n"
|
||||
"In most cases you'll want this set if you're using useEyeNode. You may also want to "
|
||||
"set this if the muzzlePoint is animated while it shoots. You can set this "
|
||||
"to false even if these previous cases are true if the image's shape is set "
|
||||
"up in the correct position and orientation in the 'root' pose and none of "
|
||||
"the nodes are animated at key times, such as the muzzlePoint essentially "
|
||||
"remaining at the same position at the start of the fire state (it could "
|
||||
"animate just fine after the projectile is away as the muzzle vector is only "
|
||||
"calculated at the start of the state).\n\n"
|
||||
"You'll also want to set this to true if you're animating the camera using the "
|
||||
"image's 'eye' node -- unless the movement is very subtle and doesn't need to "
|
||||
"be reflected on the server.\n\n"
|
||||
"@note Setting this to true causes up to four animation threads to be advanced on the server "
|
||||
"for each instance in use, although for most images only one or two are actually defined.\n\n"
|
||||
"@see useEyeNode\n");
|
||||
addField( "scriptAnimTransitionTime", TypeF32, Offset(scriptAnimTransitionTime, ShapeBaseImageData),
|
||||
"@brief The amount of time to transition between the previous sequence and new sequence when the script prefix has changed.\n\n"
|
||||
"When setImageScriptAnimPrefix() is used on a ShapeBase that has this image mounted, the image "
|
||||
"will attempt to switch to the new animation sequence based on the given script prefix. This is "
|
||||
"the amount of time it takes to transition from the previously playing animation sequence to"
|
||||
"the new script prefix-based animation sequence.\n"
|
||||
"@see ShapeBase::setImageScriptAnimPrefix()");
|
||||
addGroup("Animation");
|
||||
|
||||
addField( "projectile", TYPEID< ProjectileData >(), Offset(projectile, ShapeBaseImageData),
|
||||
"@brief The projectile fired by this Image\n\n" );
|
||||
|
||||
addField( "cloakable", TypeBool, Offset(cloakable, ShapeBaseImageData),
|
||||
"@brief Whether this Image can be cloaked.\n\n"
|
||||
"Currently unused." );
|
||||
addField("usesEnergy", TypeBool, Offset(usesEnergy, ShapeBaseImageData),
|
||||
"@brief Flag indicating whether this Image uses energy instead of ammo. The energy level comes from the ShapeBase object we're mounted to.\n\n"
|
||||
"@see ShapeBase::setEnergyLevel()");
|
||||
addField("minEnergy", TypeF32, Offset(minEnergy, ShapeBaseImageData),
|
||||
"@brief Minimum Image energy for it to be operable.\n\n"
|
||||
"@see usesEnergy");
|
||||
|
||||
addGroup("Mounting");
|
||||
addField( "mountPoint", TypeS32, Offset(mountPoint, ShapeBaseImageData),
|
||||
"@brief Mount node # to mount this Image to.\n\n"
|
||||
"This should correspond to a mount# node on the ShapeBase derived object we are mounting to." );
|
||||
|
||||
addField( "offset", TypeMatrixPosition, Offset(mountOffset, ShapeBaseImageData),
|
||||
"@brief \"X Y Z\" translation offset from this Image's <i>mountPoint</i> node to "
|
||||
"attach to.\n\n"
|
||||
"Defaults to \"0 0 0\". ie. attach this Image's "
|
||||
"<i>mountPoint</i> node to the ShapeBase model's mount# node without any offset.\n"
|
||||
"@see rotation");
|
||||
|
||||
addField( "rotation", TypeMatrixRotation, Offset(mountOffset, ShapeBaseImageData),
|
||||
"@brief \"X Y Z ANGLE\" rotation offset from this Image's <i>mountPoint</i> node "
|
||||
"to attach to.\n\n"
|
||||
"Defaults to \"0 0 0\". ie. attach this Image's "
|
||||
"<i>mountPoint</i> node to the ShapeBase model's mount# node without any additional rotation.\n"
|
||||
"@see offset");
|
||||
endGroup("Mounting");
|
||||
|
||||
addGroup("Camera");
|
||||
addField( "eyeOffset", TypeMatrixPosition, Offset(eyeOffset, ShapeBaseImageData),
|
||||
"@brief \"X Y Z\" translation offset from the ShapeBase model's eye node.\n\n"
|
||||
"When in first person view, this is the offset from the eye node to place the gun. This "
|
||||
"gives the gun a fixed point in space, typical of a lot of FPS games.\n"
|
||||
"@see eyeRotation");
|
||||
|
||||
addField( "eyeRotation", TypeMatrixRotation, Offset(eyeOffset, ShapeBaseImageData),
|
||||
"@brief \"X Y Z ANGLE\" rotation offset from the ShapeBase model's eye node.\n\n"
|
||||
"When in first person view, this is the rotation from the eye node to place the gun.\n"
|
||||
"@see eyeOffset");
|
||||
|
||||
addField( "useEyeNode", TypeBool, Offset(useEyeNode, ShapeBaseImageData),
|
||||
"@brief Mount image using image's eyeMount node and place the camera at the image's eye node (or "
|
||||
"at the eyeMount node if the eye node is missing).\n\n"
|
||||
|
|
@ -728,92 +742,62 @@ void ShapeBaseImageData::initPersistFields()
|
|||
"@note Read about the animateOnServer field as you may want to set it to true if you're using useEyeNode.\n\n"
|
||||
"@see eyeOffset\n\n"
|
||||
"@see animateOnServer\n\n");
|
||||
addField("firstPerson", TypeBool, Offset(firstPerson, ShapeBaseImageData),
|
||||
"@brief Set to true to render the image in first person.");
|
||||
endGroup("Camera");
|
||||
|
||||
addGroup("Camera Shake");
|
||||
addField( "shakeCamera", TypeBool, Offset(shakeCamera, ShapeBaseImageData),
|
||||
"@brief Flag indicating whether the camera should shake when this Image fires.\n\n" );
|
||||
addField( "camShakeFreq", TypePoint3F, Offset(camShakeFreq, ShapeBaseImageData),
|
||||
"@brief Frequency of the camera shaking effect.\n\n"
|
||||
"@see shakeCamera" );
|
||||
addField( "camShakeAmp", TypePoint3F, Offset(camShakeAmp, ShapeBaseImageData),
|
||||
"@brief Amplitude of the camera shaking effect.\n\n"
|
||||
"@see shakeCamera" );
|
||||
addField( "camShakeDuration", TypeF32, Offset(camShakeDuration, ShapeBaseImageData),
|
||||
"Duration (in seconds) to shake the camera." );
|
||||
addField( "camShakeRadius", TypeF32, Offset(camShakeRadius, ShapeBaseImageData),
|
||||
"Radial distance that a camera's position must be within relative to the "
|
||||
"center of the explosion to be shaken." );
|
||||
addField( "camShakeFalloff", TypeF32, Offset(camShakeFalloff, ShapeBaseImageData),
|
||||
"Falloff value for the camera shake." );
|
||||
endGroup("Camera Shake");
|
||||
|
||||
addGroup("Physics");
|
||||
addField( "correctMuzzleVector", TypeBool, Offset(correctMuzzleVector, ShapeBaseImageData),
|
||||
"@brief Flag to adjust the aiming vector to the eye's LOS point when in 1st person view.\n\n"
|
||||
"@see ShapeBase::getMuzzleVector()" );
|
||||
|
||||
addField( "correctMuzzleVectorTP", TypeBool, Offset(correctMuzzleVectorTP, ShapeBaseImageData),
|
||||
"@brief Flag to adjust the aiming vector to the camera's LOS point when in 3rd person view.\n\n"
|
||||
"@see ShapeBase::getMuzzleVector()" );
|
||||
|
||||
addField( "firstPerson", TypeBool, Offset(firstPerson, ShapeBaseImageData),
|
||||
"@brief Set to true to render the image in first person." );
|
||||
|
||||
addField( "mass", TypeF32, Offset(mass, ShapeBaseImageData),
|
||||
"@brief Mass of this Image.\n\n"
|
||||
"This is added to the total mass of the ShapeBase object." );
|
||||
|
||||
addField( "usesEnergy", TypeBool, Offset(usesEnergy,ShapeBaseImageData),
|
||||
"@brief Flag indicating whether this Image uses energy instead of ammo. The energy level comes from the ShapeBase object we're mounted to.\n\n"
|
||||
"@see ShapeBase::setEnergyLevel()");
|
||||
|
||||
addField( "minEnergy", TypeF32, Offset(minEnergy, ShapeBaseImageData),
|
||||
"@brief Minimum Image energy for it to be operable.\n\n"
|
||||
"@see usesEnergy");
|
||||
|
||||
addField( "accuFire", TypeBool, Offset(accuFire, ShapeBaseImageData),
|
||||
"@brief Flag to control whether the Image's aim is automatically converged with "
|
||||
"the crosshair.\n\n"
|
||||
"Currently unused." );
|
||||
endGroup("Physics");
|
||||
|
||||
addField( "lightType", TYPEID< ShapeBaseImageData::LightType >(), Offset(lightType, ShapeBaseImageData),
|
||||
"@brief The type of light this Image emits.\n\n"
|
||||
"@see ShapeBaseImageLightType");
|
||||
|
||||
addField( "lightColor", TypeColorF, Offset(lightColor, ShapeBaseImageData),
|
||||
"@brief The color of light this Image emits.\n\n"
|
||||
"@see lightType");
|
||||
|
||||
addField( "lightDuration", TypeS32, Offset(lightDuration, ShapeBaseImageData),
|
||||
"@brief Duration in SimTime of Pulsing and WeaponFire type lights.\n\n"
|
||||
"@see lightType");
|
||||
|
||||
addField( "lightRadius", TypeF32, Offset(lightRadius, ShapeBaseImageData),
|
||||
"@brief Radius of the light this Image emits.\n\n"
|
||||
"@see lightType");
|
||||
|
||||
addField( "lightBrightness", TypeF32, Offset(lightBrightness, ShapeBaseImageData),
|
||||
"@brief Brightness of the light this Image emits.\n\n"
|
||||
"Only valid for WeaponFireLight."
|
||||
"@see lightType");
|
||||
|
||||
addField( "shakeCamera", TypeBool, Offset(shakeCamera, ShapeBaseImageData),
|
||||
"@brief Flag indicating whether the camera should shake when this Image fires.\n\n" );
|
||||
|
||||
addField( "camShakeFreq", TypePoint3F, Offset(camShakeFreq, ShapeBaseImageData),
|
||||
"@brief Frequency of the camera shaking effect.\n\n"
|
||||
"@see shakeCamera" );
|
||||
|
||||
addField( "camShakeAmp", TypePoint3F, Offset(camShakeAmp, ShapeBaseImageData),
|
||||
"@brief Amplitude of the camera shaking effect.\n\n"
|
||||
"@see shakeCamera" );
|
||||
|
||||
addField( "camShakeDuration", TypeF32, Offset(camShakeDuration, ShapeBaseImageData),
|
||||
"Duration (in seconds) to shake the camera." );
|
||||
|
||||
addField( "camShakeRadius", TypeF32, Offset(camShakeRadius, ShapeBaseImageData),
|
||||
"Radial distance that a camera's position must be within relative to the "
|
||||
"center of the explosion to be shaken." );
|
||||
|
||||
addField( "camShakeFalloff", TypeF32, Offset(camShakeFalloff, ShapeBaseImageData),
|
||||
"Falloff value for the camera shake." );
|
||||
|
||||
addField( "casing", TYPEID< DebrisData >(), Offset(casing, ShapeBaseImageData),
|
||||
"@brief DebrisData datablock to use for ejected casings.\n\n"
|
||||
"@see stateEjectShell" );
|
||||
|
||||
addField( "shellExitDir", TypePoint3F, Offset(shellExitDir, ShapeBaseImageData),
|
||||
"@brief Vector direction to eject shell casings.\n\n"
|
||||
"@see casing");
|
||||
|
||||
addField( "shellExitVariance", TypeF32, Offset(shellExitVariance, ShapeBaseImageData),
|
||||
"@brief Variance (in degrees) from the shellExitDir vector to eject casings.\n\n"
|
||||
"@see shellExitDir");
|
||||
|
||||
addField( "shellVelocity", TypeF32, Offset(shellVelocity, ShapeBaseImageData),
|
||||
"@brief Speed at which to eject casings.\n\n"
|
||||
"@see casing");
|
||||
addGroup("Light Emitter");
|
||||
addField( "lightType", TYPEID< ShapeBaseImageData::LightType >(), Offset(lightType, ShapeBaseImageData),
|
||||
"@brief The type of light this Image emits.\n\n"
|
||||
"@see ShapeBaseImageLightType");
|
||||
addField( "lightColor", TypeColorF, Offset(lightColor, ShapeBaseImageData),
|
||||
"@brief The color of light this Image emits.\n\n"
|
||||
"@see lightType");
|
||||
addField( "lightDuration", TypeS32, Offset(lightDuration, ShapeBaseImageData),
|
||||
"@brief Duration in SimTime of Pulsing and WeaponFire type lights.\n\n"
|
||||
"@see lightType");
|
||||
addField( "lightRadius", TypeF32, Offset(lightRadius, ShapeBaseImageData),
|
||||
"@brief Radius of the light this Image emits.\n\n"
|
||||
"@see lightType");
|
||||
addField( "lightBrightness", TypeF32, Offset(lightBrightness, ShapeBaseImageData),
|
||||
"@brief Brightness of the light this Image emits.\n\n"
|
||||
"Only valid for WeaponFireLight."
|
||||
"@see lightType");
|
||||
endGroup("Light Emitter");
|
||||
|
||||
// State arrays
|
||||
addArray( "States", MaxStates );
|
||||
|
|
@ -994,18 +978,17 @@ void ShapeBaseImageData::initPersistFields()
|
|||
|
||||
endArray( "States" );
|
||||
|
||||
addField( "computeCRC", TypeBool, Offset(computeCRC, ShapeBaseImageData),
|
||||
"If true, verify that the CRC of the client's Image matches the server's "
|
||||
"CRC for the Image when loaded by the client." );
|
||||
|
||||
addField( "maxConcurrentSounds", TypeS32, Offset(maxConcurrentSounds, ShapeBaseImageData),
|
||||
"@brief Maximum number of sounds this Image can play at a time.\n\n"
|
||||
"Any value <= 0 indicates that it can play an infinite number of sounds." );
|
||||
|
||||
addField( "useRemainderDT", TypeBool, Offset(useRemainderDT, ShapeBaseImageData),
|
||||
"@brief If true, allow multiple timeout transitions to occur within a single "
|
||||
"tick (useful if states have a very small timeout).\n\n" );
|
||||
addGroup("Sounds");
|
||||
addField( "maxConcurrentSounds", TypeS32, Offset(maxConcurrentSounds, ShapeBaseImageData),
|
||||
"@brief Maximum number of sounds this Image can play at a time.\n\n"
|
||||
"Any value <= 0 indicates that it can play an infinite number of sounds." );
|
||||
endGroup("Sounds");
|
||||
|
||||
addGroup("Animation");
|
||||
addField( "useRemainderDT", TypeBool, Offset(useRemainderDT, ShapeBaseImageData),
|
||||
"@brief If true, allow multiple timeout transitions to occur within a single "
|
||||
"tick (useful if states have a very small timeout).\n\n" );
|
||||
endGroup("Animation");
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue