Explorar o código

Exposes the SceneObjectTypeMasks as an enum type, allowing it to be utilized in inspectors.
Updated Trigger triggeredBy field to utilize new enum type for editing
Updated MaterialDefinition's animFlags field to utilize appropriate enum type for editing
Fixed image reference in bitmask inspectorField type to use correct image asset name

Areloch hai 1 ano
pai
achega
b77911bdcd

+ 1 - 2
Engine/source/T3D/trigger.cpp

@@ -38,7 +38,6 @@
 #include "T3D/physics/physicsBody.h"
 #include "T3D/physics/physicsCollision.h"
 
-
 bool Trigger::smRenderTriggers = false;
 
 //-----------------------------------------------------------------------------
@@ -381,7 +380,7 @@ void Trigger::initPersistFields()
 
    addField("TripOnce", TypeBool, Offset(mTripOnce, Trigger),"Do we trigger callacks just the once?");
    addField("TripCondition", TypeRealString, Offset(mTripCondition, Trigger),"evaluation condition to trip callbacks (true/false)");
-   addField("TrippedBy", TypeS32, Offset(mTrippedBy, Trigger), "typemask filter");
+   addField("TrippedBy", TypeGameTypeMasksType, Offset(mTrippedBy, Trigger), "typemask filter");
    addProtectedField("enterCommand", TypeCommand, Offset(mEnterCommand, Trigger), &setEnterCmd, &defaultProtectedGetFn,
       "The command to execute when an object enters this trigger. Object id stored in %%obj. Maximum 1023 characters." );
    addProtectedField("leaveCommand", TypeCommand, Offset(mLeaveCommand, Trigger), &setLeaveCmd, &defaultProtectedGetFn,

+ 29 - 0
Engine/source/console/simObject.cpp

@@ -44,6 +44,35 @@
 
 #include "sim/netObject.h"
 
+ImplementBitfieldType(GameTypeMasksType,
+   "The type of animation effect to apply to this material.\n"
+   "@ingroup GFX\n\n")
+{ SceneObjectTypes::StaticObjectType, "StaticObjectType", "Static Objects.\n" },
+{ SceneObjectTypes::EnvironmentObjectType, "EnvironmentObjectType" , "Objects considered part of the background or environment of a level.\n" },
+{ SceneObjectTypes::TerrainObjectType, "TerrainObjectType" , "Terrain Objects.\n" },
+{ SceneObjectTypes::WaterObjectType, "WaterObjectType", "Water Objects.\n" },
+{ SceneObjectTypes::TriggerObjectType, "TriggerObjectType", "Interactive Trigger Objects.\n" },
+{ SceneObjectTypes::MarkerObjectType, "MarkerObjectType", "Marker Objects, utilized primarily for tooling.\n" },
+{ SceneObjectTypes::GameBaseObjectType, "GameBaseObjectType", "Any Gamebase-based Objects. Objects generally associated to gameplay functionality.\n" },
+{ SceneObjectTypes::ShapeBaseObjectType, "ShapeBaseObjectType", "Any Gamebase-based Objects. Objects generally associated to gameplay functionality.\n" },
+{ SceneObjectTypes::CameraObjectType, "CameraObjectType", "Camera Objects.\n" },
+{ SceneObjectTypes::StaticShapeObjectType, "StaticShapeObjectType", "Static Shape Objects. Distinct from StaticObjectType in that Static Shapes have additional functionality and behaviors.\n" },
+{ SceneObjectTypes::DynamicShapeObjectType, "DynamicShapeObjectType", "Any sort of Dynamic Object.\n" },
+{ SceneObjectTypes::PlayerObjectType, "PlayerObjectType", "Player Objects.\n" },
+{ SceneObjectTypes::ItemObjectType, "ItemObjectType", "Item Objects.\n" },
+{ SceneObjectTypes::VehicleObjectType, "VehicleObjectType", "Any sort of Vehicle Object.\n" },
+{ SceneObjectTypes::VehicleBlockerObjectType, "VehicleBlockerObjectType", "\n" },
+{ SceneObjectTypes::ProjectileObjectType, "ProjectileObjectType", "Projectiles.\n" },
+{ SceneObjectTypes::ExplosionObjectType, "ExplosionObjectType", "Explosion and Effects.\n" },
+{ SceneObjectTypes::CorpseObjectType, "CorpseObjectType", "Corpses of controlled objects.\n" },
+{ SceneObjectTypes::DebrisObjectType, "DebrisObjectType", "Debris or debris-like things such as shell casings.\n" },
+{ SceneObjectTypes::PhysicalZoneObjectType, "PhysicalZoneObjectType", "Physical Zones. Distinct from triggers in that they have physics forces applications.\n" },
+{ SceneObjectTypes::LightObjectType, "LightObjectType", "Lights.\n" },
+{ SceneObjectTypes::PathShapeObjectType, "PathShapeObjectType", "Path-following Objects.\n" },
+{ SceneObjectTypes::TurretObjectType, "TurretObjectType", "Turret Objects.\n" },
+
+EndImplementBitfieldType;
+
 IMPLEMENT_CONOBJECT( SimObject );
 
 // See full description in the new CHM manual

+ 3 - 0
Engine/source/console/simObject.h

@@ -40,6 +40,7 @@
 #ifndef _TAML_CALLBACKS_H_
 #include "persistence/taml/tamlCallbacks.h"
 #endif
+#include "T3D/objectTypes.h"
 
 class Stream;
 class LightManager;
@@ -1009,6 +1010,8 @@ public:
    virtual void reloadReset() { }
 };
 
+typedef SceneObjectTypes GameTypeMasksType;
+DefineBitfieldType(GameTypeMasksType);
 
 /// Smart SimObject pointer.
 ///

+ 2 - 2
Engine/source/gui/editor/guiInspectorTypes.cpp

@@ -1459,7 +1459,7 @@ void GuiInspectorTypeBitMask32::consoleInit()
    Parent::consoleInit();
 
    // Set this to be the inspector type for all bitfield console types.
-   
+
    for( ConsoleBaseType* type = ConsoleBaseType::getListHead(); type != NULL; type = type->getListNext() )
       if( type->getTypeInfo() && type->getTypeInfo()->isBitfield() )
          type->setInspectorFieldType( "GuiInspectorTypeBitMask32" );
@@ -1583,7 +1583,7 @@ GuiControl* GuiInspectorTypeBitMask32Helper::constructEditControl()
    mButton->setField( "Command", szBuffer );
    mButton->setField( "buttonType", "ToggleButton" );
    mButton->setDataField( StringTable->insert("Profile"), NULL, "GuiInspectorButtonProfile" );
-   mButton->setBitmap(StringTable->insert("ToolsModule:arrowBtn_image") );
+   mButton->setBitmap(StringTable->insert("ToolsModule:arrowBtn_n_image") );
    mButton->setStateOn( true );
    mButton->setExtent( 16, 16 );
    mButton->registerObject();

+ 8 - 2
Engine/source/materials/materialDefinition.cpp

@@ -77,7 +77,13 @@ ImplementBitfieldType(MaterialAnimType,
 { Material::Rotate, "Rotate" , "Rotate the material around a point.\n" },
 { Material::Wave, "Wave" , "Warps the material with an animation using Sin, Triangle or Square mathematics.\n" },
 { Material::Scale, "Scale", "Scales the material larger and smaller with a pulsing effect.\n" },
-{ Material::Sequence, "Sequence", "Enables the material to have multiple frames of animation in its imagemap.\n" }
+{ Material::Sequence, "Sequence", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceA", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceB", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceC", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceD", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceE", "Enables the material to have multiple frames of animation in its imagemap.\n" },
+{ Material::Sequence, "SequenceF", "Enables the material to have multiple frames of animation in its imagemap.\n" }
 EndImplementBitfieldType;
 
 ImplementEnumType(MaterialBlendOp,
@@ -357,7 +363,7 @@ void Material::initPersistFields()
    endGroup("Lighting Properties");
 
    addGroup("Animation Properties");
-      addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES,
+      addField("animFlags", TypeMaterialAnimType, Offset(mAnimFlags, Material), MAX_STAGES,
          "The types of animation to play on this material.");
 
       addField("scrollDir", TypePoint2F, Offset(mScrollDir, Material), MAX_STAGES,