mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Merge branch 'PostFXReorgAndUpdate' of https://github.com/Areloch/Torque3D into Preview4_0
This commit is contained in:
commit
b05d5fd3bd
181 changed files with 2487 additions and 1458 deletions
|
|
@ -34,6 +34,11 @@ void Scene::initPersistFields()
|
|||
addGroup("Gameplay");
|
||||
addField("gameModeName", TypeString, Offset(mGameModeName, Scene), "The name of the gamemode that this scene utilizes");
|
||||
endGroup("Gameplay");
|
||||
|
||||
addGroup("PostFX");
|
||||
addProtectedField("EditPostEffects", TypeBool, Offset(mEditPostFX, Scene),
|
||||
&Scene::_editPostEffects, &defaultProtectedGetFn, "Edit Scene's default Post Effects", AbstractClassRep::FieldFlags::FIELD_ComponentInspectors);
|
||||
endGroup("PostFX");
|
||||
}
|
||||
|
||||
bool Scene::onAdd()
|
||||
|
|
@ -88,6 +93,18 @@ void Scene::onPostAdd()
|
|||
Con::executef(this, "onPostAdd");
|
||||
}
|
||||
|
||||
bool Scene::_editPostEffects(void* object, const char* index, const char* data)
|
||||
{
|
||||
Scene* scene = static_cast<Scene*>(object);
|
||||
|
||||
#ifdef TORQUE_TOOLS
|
||||
if(Con::isFunction("editScenePostEffects"))
|
||||
Con::executef("editScenePostEffects", scene);
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Scene::addObject(SimObject* object)
|
||||
{
|
||||
//Child scene
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ class Scene : public NetObject, public virtual ITickable
|
|||
|
||||
bool mIsDirty;
|
||||
|
||||
bool mEditPostFX;
|
||||
|
||||
StringTableEntry mGameModeName;
|
||||
|
||||
protected:
|
||||
|
|
@ -48,6 +50,8 @@ public:
|
|||
|
||||
static void initPersistFields();
|
||||
|
||||
static bool _editPostEffects(void* object, const char* index, const char* data);
|
||||
|
||||
virtual bool onAdd();
|
||||
virtual void onRemove();
|
||||
virtual void onPostAdd();
|
||||
|
|
|
|||
|
|
@ -361,13 +361,27 @@ void LevelAsset::unloadDependencies()
|
|||
}
|
||||
}
|
||||
|
||||
DefineEngineMethod(LevelAsset, getLevelFile, const char*, (),,
|
||||
DefineEngineMethod(LevelAsset, getLevelPath, const char*, (),,
|
||||
"Creates a new script asset using the targetFilePath.\n"
|
||||
"@return The bool result of calling exec")
|
||||
{
|
||||
return object->getLevelPath();
|
||||
}
|
||||
|
||||
DefineEngineMethod(LevelAsset, getPostFXPresetPath, const char*, (), ,
|
||||
"Creates a new script asset using the targetFilePath.\n"
|
||||
"@return The bool result of calling exec")
|
||||
{
|
||||
return object->getPostFXPresetPath();
|
||||
}
|
||||
|
||||
DefineEngineMethod(LevelAsset, getDecalsPath, const char*, (), ,
|
||||
"Creates a new script asset using the targetFilePath.\n"
|
||||
"@return The bool result of calling exec")
|
||||
{
|
||||
return object->getDecalsPath();
|
||||
}
|
||||
|
||||
DefineEngineMethod(LevelAsset, loadDependencies, void, (), ,
|
||||
"Initiates the loading of asset dependencies for this level.")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue