From 1b33b01eb1fbafdb594182f887d5951907e1a5f6 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sat, 28 Jan 2023 16:12:05 -0600 Subject: [PATCH] add "docsURL" filter to assignFieldsFrom to prevent it from triggering opening web pages when inheriting values --- Engine/source/T3D/fx/particle.cpp | 1 + Engine/source/T3D/fx/particleEmitter.cpp | 1 + Engine/source/T3D/item.cpp | 1 + Engine/source/T3D/player.cpp | 1 + Engine/source/T3D/shapeBase.cpp | 1 + Engine/source/T3D/trigger.cpp | 1 + Engine/source/T3D/turret/aiTurretShape.cpp | 1 + Engine/source/T3D/turret/turretShape.cpp | 1 + Engine/source/afx/ce/afxParticleEmitter.cpp | 1 + Engine/source/console/consoleObject.cpp | 1 + Engine/source/console/simObject.cpp | 4 ++++ Engine/source/gfx/sim/gfxStateBlockData.cpp | 1 + Engine/source/gui/core/guiTypes.cpp | 1 + Engine/source/materials/shaderData.cpp | 1 + Engine/source/sfx/sfxDescription.cpp | 1 + 15 files changed, 18 insertions(+) diff --git a/Engine/source/T3D/fx/particle.cpp b/Engine/source/T3D/fx/particle.cpp index f1ed926fd..0826e22be 100644 --- a/Engine/source/T3D/fx/particle.cpp +++ b/Engine/source/T3D/fx/particle.cpp @@ -147,6 +147,7 @@ FRangeValidator spinRandFValidator(-1000.f, 1000.f); //----------------------------------------------------------------------------- void ParticleData::initPersistFields() { + docsURL; addFieldV( "dragCoefficient", TYPEID< F32 >(), Offset(dragCoefficient, ParticleData), &dragCoefFValidator, "Particle physics drag amount." ); addField( "windCoefficient", TYPEID< F32 >(), Offset(windCoefficient, ParticleData), diff --git a/Engine/source/T3D/fx/particleEmitter.cpp b/Engine/source/T3D/fx/particleEmitter.cpp index 9a600a094..a512e893c 100644 --- a/Engine/source/T3D/fx/particleEmitter.cpp +++ b/Engine/source/T3D/fx/particleEmitter.cpp @@ -207,6 +207,7 @@ FRangeValidator phiFValidator(0.f, 360.f); //----------------------------------------------------------------------------- void ParticleEmitterData::initPersistFields() { + docsURL; addGroup( "ParticleEmitterData" ); addFieldV("ejectionPeriodMS", TYPEID< S32 >(), Offset(ejectionPeriodMS, ParticleEmitterData), &ejectPeriodIValidator, diff --git a/Engine/source/T3D/item.cpp b/Engine/source/T3D/item.cpp index 9466a62d8..605275b2d 100644 --- a/Engine/source/T3D/item.cpp +++ b/Engine/source/T3D/item.cpp @@ -137,6 +137,7 @@ EndImplementEnumType; void ItemData::initPersistFields() { + docsURL; Parent::initPersistFields(); addGroup("Physics"); addField("friction", TypeF32, Offset(friction, ItemData), "A floating-point value specifying how much velocity is lost to impact and sliding friction."); diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 0a50cc4ab..7d5c4be99 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -704,6 +704,7 @@ bool PlayerData::isJumpAction(U32 action) void PlayerData::initPersistFields() { + docsURL; Parent::initPersistFields(); addField( "pickupRadius", TypeF32, Offset(pickupRadius, PlayerData), diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index c3437cb09..f23f38a91 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -534,6 +534,7 @@ bool ShapeBaseData::_setMass( void* object, const char* index, const char* data void ShapeBaseData::initPersistFields() { + docsURL; addGroup( "Shapes" ); INITPERSISTFIELD_SHAPEASSET(Shape, ShapeBaseData, "The source shape asset."); addField("computeCRC", TypeBool, Offset(computeCRC, ShapeBaseData), diff --git a/Engine/source/T3D/trigger.cpp b/Engine/source/T3D/trigger.cpp index 7021d66af..4bde2c683 100644 --- a/Engine/source/T3D/trigger.cpp +++ b/Engine/source/T3D/trigger.cpp @@ -98,6 +98,7 @@ bool TriggerData::onAdd() void TriggerData::initPersistFields() { + docsURL; addGroup("Callbacks"); addField( "tickPeriodMS", TypeS32, Offset( tickPeriodMS, TriggerData ), diff --git a/Engine/source/T3D/turret/aiTurretShape.cpp b/Engine/source/T3D/turret/aiTurretShape.cpp index 0c39fb77f..dd54807a6 100644 --- a/Engine/source/T3D/turret/aiTurretShape.cpp +++ b/Engine/source/T3D/turret/aiTurretShape.cpp @@ -124,6 +124,7 @@ AITurretShapeData::AITurretShapeData() void AITurretShapeData::initPersistFields() { + docsURL; Parent::initPersistFields(); addGroup("AI Steering"); addField("maxScanHeading", TypeF32, Offset(maxScanHeading, AITurretShapeData), diff --git a/Engine/source/T3D/turret/turretShape.cpp b/Engine/source/T3D/turret/turretShape.cpp index 2032810ff..52cd198e6 100644 --- a/Engine/source/T3D/turret/turretShape.cpp +++ b/Engine/source/T3D/turret/turretShape.cpp @@ -131,6 +131,7 @@ TurretShapeData::TurretShapeData() void TurretShapeData::initPersistFields() { + docsURL; Parent::initPersistFields(); addGroup("Steering"); addField("zRotOnly", TypeBool, Offset(zRotOnly, TurretShapeData), diff --git a/Engine/source/afx/ce/afxParticleEmitter.cpp b/Engine/source/afx/ce/afxParticleEmitter.cpp index cb6023b96..afb4488cd 100644 --- a/Engine/source/afx/ce/afxParticleEmitter.cpp +++ b/Engine/source/afx/ce/afxParticleEmitter.cpp @@ -70,6 +70,7 @@ afxParticleEmitterData::afxParticleEmitterData(const afxParticleEmitterData& oth void afxParticleEmitterData::initPersistFields() { + docsURL; addField("fadeVelocity", TypeBool, Offset(fade_velocity, afxParticleEmitterData), "If true, the initial velocity of emitted particles is multiplied by the fade amount " "of the containing effect wrapper. As the effect fades-in and out, so does the " diff --git a/Engine/source/console/consoleObject.cpp b/Engine/source/console/consoleObject.cpp index c4b44c71f..96ea82c2f 100644 --- a/Engine/source/console/consoleObject.cpp +++ b/Engine/source/console/consoleObject.cpp @@ -681,6 +681,7 @@ bool ConsoleObject::removeField(const char* in_pFieldname) //-------------------------------------- void ConsoleObject::initPersistFields() { + docsURL; } //-------------------------------------- diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index e84177f2c..42f2f5c07 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -152,6 +152,7 @@ bool SimObject::processArguments(S32 argc, ConsoleValue *argv) void SimObject::initPersistFields() { + docsURL; addGroup( "Ungrouped" ); addProtectedField( "name", TypeName, Offset(mObjectName, SimObject), &setProtectedName, &defaultProtectedGetFn, @@ -913,6 +914,9 @@ void SimObject::assignFieldsFrom(SimObject *parent) { const AbstractClassRep::Field* f = &list[i]; + if (f->pFieldname == StringTable->insert("docsURL")) + continue; + // Skip the special field types. if ( f->type >= AbstractClassRep::ARCFirstCustomField ) continue; diff --git a/Engine/source/gfx/sim/gfxStateBlockData.cpp b/Engine/source/gfx/sim/gfxStateBlockData.cpp index ca9937c4b..9b015559d 100644 --- a/Engine/source/gfx/sim/gfxStateBlockData.cpp +++ b/Engine/source/gfx/sim/gfxStateBlockData.cpp @@ -65,6 +65,7 @@ GFXStateBlockData::GFXStateBlockData() void GFXStateBlockData::initPersistFields() { + docsURL; addGroup( "Alpha Blending" ); addField( "blendDefined", TypeBool, Offset(mState.blendDefined, GFXStateBlockData), diff --git a/Engine/source/gui/core/guiTypes.cpp b/Engine/source/gui/core/guiTypes.cpp index 65d8ddfc0..4bbb3d8d0 100644 --- a/Engine/source/gui/core/guiTypes.cpp +++ b/Engine/source/gui/core/guiTypes.cpp @@ -350,6 +350,7 @@ GuiControlProfile::~GuiControlProfile() void GuiControlProfile::initPersistFields() { + docsURL; addGroup( "Behavior" ); addField( "tab", TypeBool, Offset(mTabable, GuiControlProfile)); diff --git a/Engine/source/materials/shaderData.cpp b/Engine/source/materials/shaderData.cpp index d8f4befaf..8d8e8d103 100644 --- a/Engine/source/materials/shaderData.cpp +++ b/Engine/source/materials/shaderData.cpp @@ -71,6 +71,7 @@ ShaderData::ShaderData() void ShaderData::initPersistFields() { + docsURL; addField("DXVertexShaderFile", TypeStringFilename, Offset(mDXVertexShaderName, ShaderData), "@brief %Path to the DirectX vertex shader file to use for this ShaderData.\n\n" "It must contain only one program and no pixel shader, just the vertex shader." diff --git a/Engine/source/sfx/sfxDescription.cpp b/Engine/source/sfx/sfxDescription.cpp index 8cd93b6b2..09e08be5c 100644 --- a/Engine/source/sfx/sfxDescription.cpp +++ b/Engine/source/sfx/sfxDescription.cpp @@ -213,6 +213,7 @@ SFXDescription::SFXDescription(const SFXDescription& other, bool temp_clone) void SFXDescription::initPersistFields() { + docsURL; addGroup( "Playback" ); addField( "sourceGroup", TypeSFXSourceName, Offset( mSourceGroup, SFXDescription ),