Browse Source

Merge pull request #144 from Azaezel/alpha40_editedCallback

adds an onInspectPostApply(%objectInsatnceID) callback
Areloch 5 years ago
parent
commit
a7b7f755a3
2 changed files with 3 additions and 2 deletions
  1. 2 1
      Engine/source/scene/sceneObject.cpp
  2. 1 1
      Engine/source/scene/sceneObject.h

+ 2 - 1
Engine/source/scene/sceneObject.cpp

@@ -93,6 +93,7 @@ ConsoleDocClass( SceneObject,
    "@ingroup gameObjects\n"
 );
 
+IMPLEMENT_CALLBACK(SceneObject, onInspectPostApply, void, (SceneObject* obj), (obj),"Generic callback for when an object is edited");
 #ifdef TORQUE_TOOLS
 extern bool gEditingMission;
 #endif
@@ -376,7 +377,7 @@ void SceneObject::inspectPostApply()
 {
    if( isServerObject() )
       setMaskBits( MountedMask );
-
+   onInspectPostApply_callback(this);
    Parent::inspectPostApply();
 }
 

+ 1 - 1
Engine/source/scene/sceneObject.h

@@ -794,7 +794,7 @@ class SceneObject : public NetObject, private SceneContainer::Link, public Proce
       static bool _setGameObject(void* object, const char* index, const char* data);
 
       DECLARE_CONOBJECT( SceneObject );
-
+	  DECLARE_CALLBACK(void, onInspectPostApply, (SceneObject* obj));
    private:
 
       SceneObject( const SceneObject& ); ///< @deprecated disallowed