mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-23 08:33:50 +00:00
Parametrize script extension, default to 'tscript'
This commit is contained in:
parent
b8b62292bd
commit
099dd4f1f3
542 changed files with 774 additions and 783 deletions
|
|
@ -2630,7 +2630,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
StringTableEntry assetName = StringTable->insert(assetItem->assetName.c_str());
|
||||
|
||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||
String scriptName = assetItem->assetName + ".cs";
|
||||
String scriptName = assetItem->assetName + "." TORQUE_SCRIPT_EXTENSION;
|
||||
String scriptPath = targetPath + "/" + scriptName;
|
||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
||||
|
||||
|
|
@ -2717,7 +2717,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem)
|
|||
|
||||
//Now write the script file containing our material out
|
||||
//There's 2 ways to do this. If we're in-place importing an existing asset, we can see if the definition existed already, like in an old
|
||||
//materials.cs file. if it does, we can just find the object by name, and save it out to our new file
|
||||
//materials.tscript file. if it does, we can just find the object by name, and save it out to our new file
|
||||
//If not, we'll just generate one
|
||||
Material* existingMat = MATMGR->getMaterialDefinitionByName(assetName);
|
||||
|
||||
|
|
@ -2878,10 +2878,10 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem)
|
|||
|
||||
String shapeFileName = assetItem->filePath.getFileName() + "." + assetItem->filePath.getExtension();
|
||||
String assetPath = targetPath + "/" + shapeFileName;
|
||||
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + ".cs";
|
||||
String constructorPath = targetPath + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||
String tamlPath = targetPath + "/" + assetName + ".asset.taml";
|
||||
String originalPath = assetItem->filePath.getFullPath().c_str();
|
||||
String originalConstructorPath = assetItem->filePath.getPath() + "/" + assetItem->filePath.getFileName() + ".cs";
|
||||
String originalConstructorPath = assetItem->filePath.getPath() + "/" + assetItem->filePath.getFileName() + "." TORQUE_SCRIPT_EXTENSION;
|
||||
|
||||
char qualifiedFromFile[2048];
|
||||
char qualifiedToFile[2048];
|
||||
|
|
|
|||
|
|
@ -87,13 +87,13 @@ GFXImplementVertexFormat( GFXVertexFoliage )
|
|||
//
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Put this in /example/common/editor/EditorGui.cs in [function Creator::init( %this )]
|
||||
// Put this in /example/common/editor/EditorGui.tscript in [function Creator::init( %this )]
|
||||
//
|
||||
// %Environment_Item[8] = "fxFoliageReplicator"; <-- ADD THIS.
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Put this in /example/common/client/missionDownload.cs in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||
// Put this in /example/common/client/missionDownload.tscript in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||
// after codeline 'onPhase2Complete();'.
|
||||
//
|
||||
// StartFoliageReplication();
|
||||
|
|
|
|||
|
|
@ -37,14 +37,14 @@
|
|||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Put this in /example/common/editor/editor.cs in function [Editor::create()] (around line 66).
|
||||
// Put this in /example/common/editor/editor.tscript in function [Editor::create()] (around line 66).
|
||||
//
|
||||
// // Ignore Replicated fxStatic Instances.
|
||||
// EWorldEditor.ignoreObjClass("fxShapeReplicatedStatic");
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Put this in /example/common/editor/EditorGui.cs in [function Creator::init( %this )]
|
||||
// Put this in /example/common/editor/EditorGui.tscript in [function Creator::init( %this )]
|
||||
//
|
||||
// %Environment_Item[8] = "fxShapeReplicator"; <-- ADD THIS.
|
||||
//
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
//
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Put this in /example/common/client/missionDownload.cs in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||
// Put this in /example/common/client/missionDownload.tscript in [function clientCmdMissionStartPhase3(%seq,%missionName)] (line 65)
|
||||
// after codeline 'onPhase2Complete();'.
|
||||
//
|
||||
// StartClientReplication();
|
||||
|
|
|
|||
|
|
@ -62,8 +62,8 @@ struct AuthInfo;
|
|||
|
||||
// To disable datablock caching, remove or comment out the AFX_CAP_DATABLOCK_CACHE define below.
|
||||
// Also, at a minimum, the following script preferences should be set to false:
|
||||
// $pref::Client::EnableDatablockCache = false; (in arcane.fx/client/defaults.cs)
|
||||
// $Pref::Server::EnableDatablockCache = false; (in arcane.fx/server/defaults.cs)
|
||||
// $pref::Client::EnableDatablockCache = false; (in arcane.fx/client/defaults.tscript)
|
||||
// $Pref::Server::EnableDatablockCache = false; (in arcane.fx/server/defaults.tscript)
|
||||
// Alternatively, all script code marked with "DATABLOCK CACHE CODE" can be removed or
|
||||
// commented out.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ ConsoleDocClass( LightFlareData,
|
|||
"as a 2D sprite in screenspace.\n\n"
|
||||
|
||||
"@tsexample\n"
|
||||
"// example from Full Template, core/art/datablocks/lights.cs\n"
|
||||
"// example from Full Template, core/art/datablocks/lights." TORQUE_SCRIPT_EXTENSION "\n"
|
||||
"datablock LightFlareData( LightFlareExample0 )\n"
|
||||
"{\n"
|
||||
" overallScale = 2.0;\n"
|
||||
|
|
@ -676,4 +676,4 @@ DefineEngineMethod( LightFlareData, apply, void, (),,
|
|||
)
|
||||
{
|
||||
object->inspectPostApply();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue