Pārlūkot izejas kodu

Added shapeFile field to TSForestItemData convert setting
Fixed modulePath not setting in some cases for project importer
Fixed not assigning drop and splash textures in precipitation
Fixed stringtable insert for sfxProfile

Areloch 4 gadi atpakaļ
vecāks
revīzija
52c83d19e1

+ 4 - 0
Engine/source/T3D/fx/precipitation.cpp

@@ -629,6 +629,8 @@ void Precipitation::initMaterials()
 
    if(pd->mDrop.isNull())
       Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->getDrop());
+   else
+      mDropHandle = pd->mDrop;
 
    if ( dStrlen(pd->mDropShaderName) > 0 )
    {
@@ -650,6 +652,8 @@ void Precipitation::initMaterials()
 
    if (pd->mSplash.isNull())
       Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->getSplash());
+   else
+      mSplashHandle = pd->mSplash;
 
    if ( dStrlen(pd->mSplashShaderName) > 0 )
    {

+ 1 - 1
Engine/source/sfx/sfxProfile.cpp

@@ -90,7 +90,7 @@ SFXProfile::SFXProfile()
 
 SFXProfile::SFXProfile( SFXDescription* desc, const String& filename, bool preload )
    : Parent( desc ),
-     mFilename( filename ),
+     mFilename( StringTable->insert(filename.c_str()) ),
      mPreload( preload )
 {
 }

+ 10 - 6
Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript

@@ -205,11 +205,6 @@ function T3Dpre4ProjectImporter::beginMaterialFilesImport(%this)
       %currentPage-->processingText.setText("Processing material script file: " @ %file);
       Canvas.repaint();
       
-      if(%file $= "data/FPSGameplay/art/terrains/materials.tscript")
-      {
-         %agafdgadfgsdfg = true;  
-      }
-      
       if ( $ProjectImporter::fileObject.openForRead( %file ) ) 
       {
          echo("Legacy Project Importer - Beginning process of file: " @ %file);
@@ -426,6 +421,9 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this)
             if(strIsMatchExpr("*new*(*)*", %line))
             {
                %className = findObjectClass(%line, "new");
+               
+               %objectClassStack.push_back(%className);
+               
                %objectName = findObjectName(%line, "new");
                
                if(%objectName !$= "")
@@ -482,6 +480,9 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this)
             else if(strIsMatchExpr("*singleton*(*)*", %line))
             {
                %className = findObjectClass(%line, "singleton");
+               
+               %objectClassStack.push_back(%className);
+               
                %objectName = findObjectName(%line, "singleton");
                
                if(%objectName !$= "")
@@ -507,6 +508,9 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this)
             else if(strIsMatchExpr("*datablock*(*)*", %line))
             {
                %className = findObjectClass(%line, "datablock");
+               
+               %objectClassStack.push_back(%className);
+               
                %objectName = findObjectName(%line, "datablock");
                
                if(%objectName !$= "")
@@ -721,7 +725,7 @@ T3Dpre4ProjectImporter::genProcessor("GroundCover", "material materialAsset shap
 T3Dpre4ProjectImporter::genProcessor("GroundPlane", "material materialAsset");
 T3Dpre4ProjectImporter::genProcessor("LevelInfo", "accuTexture accuTextureAsset");
 T3Dpre4ProjectImporter::genProcessor("TSStatic", "shape shapeAsset shapeName shapeAsset");
-T3Dpre4ProjectImporter::genProcessor("TSForestItemData", "shape shapeAsset shapeName shapeAsset");
+T3Dpre4ProjectImporter::genProcessor("TSForestItemData", "shape shapeAsset shapeName shapeAsset shapeFile shapeAsset");
 //==============================================================================
 // Levels
 //==============================================================================

+ 3 - 0
Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript

@@ -246,8 +246,11 @@ function ProjectImportWizardPage4::openPage(%this)
    ProjectImportWindow-->backButton.setHidden(true);
    ProjectImportWindow-->nextButton.setActive(false);
       
+   if(!$ProjectImporter::useExistingModule)
    $ProjectImporter::moduleName = ProjectImportWizardPage3-->newModuleName.getText();
       
+   $ProjectImporter::modulePath = "data/" @ $ProjectImporter::moduleName;
+      
    if(!$ProjectImporter::useExistingModule)
       $ProjectImporter::importTool.setupModule();