Commit graph

47 commits

Author SHA1 Message Date
AzaezelX cd6e027d1f nother specifier wrapper 2021-08-09 22:31:58 -05:00
Areloch 2f5f585aaf Fixed logic for parsing registerDatablock paths to trim script extensions during import conversion
Fixed creation of materialAsset from AB to properly generate companion script file
Fixed logic in project import that if we import in a legacy module script, we get rid of the newly generated one in favor of the old one
2021-08-07 02:36:38 -05:00
Areloch 88ae8a9665 Added getShapeConstructorFilePath console function on shapeAsset
Fixed typo in import config settings for DuplicateAutoResolution
Converted TSShapeConstructor to utilize assets
Updated shape editor to work with assetified constructors
Converted guiBitmapButtonCtrl to use assets
2021-08-02 04:20:27 -05:00
Areloch abf5a09bc3 Removed duplicate checkbox image
Added asset import conflict resolution option to prepend folder name
Cleanups of Project Importer and fixed importing of material and terrain materials, specifically, fallbacks in the event they are unnamed to utilize the mapTo and internalName fields, respectively
Fixed typos in guiTerrainMaterialDlg
Added AssetBrowser button to GuiEditor
Improved FileObject's PeekLine function to be able to peek forward further via an optional lineOffset argument
2021-07-28 09:26:13 -05:00
Areloch 5525f8ecdd Converts all game, gui editor, and system classes to utilize assets
Processed core, tools and default modules to utilize assets
Converted all console types that were string based, such as TypeImageFilename to utilize const char*/the string table, which avoids a lot of type swapping shenanigans and avoids string corruption
Removed unneeded MainEditor mockup module
Removed some unused/duplicate image assets from the tools
2021-07-19 01:07:08 -05:00
Areloch 4d40e3cab5
Merge pull request #449 from OTHGMars/Zip_Test2
Loading from zipped game directories.
2021-07-17 11:03:19 -05:00
AzaezelX ab1661a851 add additional chars to the flatfile->asset->objectID name santization chain 2021-04-06 15:17:06 -05:00
Brian Roberts a8e2ec6df4
Merge pull request #475 from Areloch/importAssetSuffixes
Adds import config settings for forcefully adding configurable suffixes for shapes, materials and images
2021-03-14 01:12:29 -06:00
Areloch a0c8a77043 Adds import config settings for forcefully adding configurable suffixes for shapes, materials and images 2021-02-27 02:43:37 -06:00
Areloch 9a10d52e0b Added logic to correctly associate constructor script file for shape asset to asset as an assetfile 2021-02-21 02:21:50 -06:00
Lukas Aldershaab 099dd4f1f3 Parametrize script extension, default to 'tscript' 2021-01-19 21:32:31 +01:00
OTHGMars 8148bdfcdd ModuleManager and AssetManager updated for T3D mount system.
Platform file calls replaced with Torque::FS calls when scanning for or loading files.
2021-01-11 05:03:00 -05:00
Areloch 8585278fe4 Adds autoimport logic for materials if the materialDefinition already exists
Adds some additional utility functions to AssetImporter for easier access to setup
Corrects handling for legacy field names with meshRoad
2021-01-05 00:58:18 -06:00
Brian Roberts 7dc6fc8abf
Merge pull request #415 from Areloch/GroundPlaneAssetify
Converts GroundPlane to utilize assets
2020-12-19 02:35:32 -06:00
Brian Roberts 78a836e433
Merge pull request #409 from Azaezel/alpha40_assetPipeCleanups
asset pipe cleanups
2020-12-19 02:34:57 -06:00
Areloch 3821ddd15a Merge branch 'GroundPlaneAssetify' of https://github.com/Areloch/Torque3D into Preview4_0 2020-12-18 14:12:54 -06:00
Areloch 8f60d03830 Adjusts Asset Importer logic when looking up and saving out a newly created ShapeConstructor so that it doesn't duplicate a definition it one already exists.
Adds _ORM and -ORM suffixes for PBR-ORM map import rule
Tweaks naming convention for IgnoreNode/Meshes and ImportNode/Meshes to be clearer via the prefix 'Always'
Fixes a token typo in suffix parsing, and adds \t to token deliniation for all suffix parsing to asset importer
2020-12-18 00:55:01 -06:00
AzaezelX f95a78d2e8 misc asset pipeline cleanups
AssetImporter::validateAsset make sure the modelDef looked for is valid
AssetImporter::importShapeAsset had a stray +"_"+embeded in it when it came to stitching togeather filenames and extentions
2020-12-14 13:32:45 -06:00
Areloch e8564680e4 Better handling for finding modules by file path. Mainly used in asset importer 2020-12-02 23:57:17 -06:00
Areloch 388a700a53 Implements material asset handling for GroundPlane object
Adds handling for finding material asset akin to shape and image assets
Updates the material asset inspector field to follow the current standard
Updates prototyping material assets to correctly have materialDefinitionName assigned
Fixed material asset import step to properly assign materialDefinitionName
Fixed typo in material editor icon name
Added logic to editAsset function call so it can also parse assetIds
Changed DefaultEditorLevel to utilize FloorGray material
Adds proper NoMaterial asset for fallback purposes
2020-11-01 23:32:34 -06:00
Areloch f4f60e1ae7 Improves default suffix handling for asset importer on image assets under a material asset 2020-10-16 17:03:30 -05:00
Brian Roberts d50f1f0b81
Merge pull request #342 from lukaspj/fix/replace-dstrcmp
Replace uses of dStrCmp with new String::compare
2020-10-03 17:01:12 -05:00
Lukas Aldershaab 197a62f6ea Convert dStrcmp to String::compare for more cases 2020-10-04 00:00:01 +02:00
AzaezelX 0c7811bd1a shift pbrconfig to ORM 2020-09-30 13:51:12 -05:00
Areloch 7405453123 Fixes issue where it would try and load a SIS file even if it doesnt exist
Fixed warning about use of invalid function 'setEnabled' instead of 'setActive'
Fixed formatting of a schedule call in ExmapleGameMode
Fixed EditorOpenMission logic to correctly get and use levelAsset
Removed unneeded continues from menuInputButtons' refresh()
Updated settings.xml to have sorted order for future consistency
2020-08-26 13:40:04 -05:00
Brian Roberts 5544951b5d
Merge pull request #302 from Areloch/soundAndAnimationAssetImport
Integrates sound and shapeAnimation assets into the importer
2020-08-25 00:23:05 -05:00
Areloch 1942535923 Integrates sound and shapeAnimation assets into the importer
Added drag-n-drop spawn action for soundAssets
2020-08-24 20:24:50 -05:00
Areloch d06c99a088 Adds function to get material definition by mapTo usage
Re-enables logic for looking up existing material(generally just for in-place autoimport) and creates the material asset off of that. Also adds logic to look up the mapTo if it exists if the material name lookup fails.
Adds initial pass at re-enabling the sis file support for shape importing. In the event the UseManualShapeConfigRules setting is disabled(which it is by default) it will try and find the matching sis file and apply the rules from that to the config. Once the processing/import is done on the shape, the cached values of the main config are restored again.
Adds initial fbx.sis file. Needs to have the fields standardized to the config names.
2020-08-24 04:41:17 -05:00
Areloch 686975c8ee shifts getImageFilename to getImagePath on ImageAsset
Adjusts references to utilize getImagePath to ensure things using the image asset gets the proper full path
Adjusts image import logic to import finding associated images
Adds logic so if a roughness map is imported, the generated material asset has the invertSmoothness flag on.
2020-08-13 01:35:24 -05:00
Areloch 69bfbb0978 Adds functions to get the full path for level and shape asset files
Updated choose level UI to use getLevelPath function so it works again
Added a check for mis.dso for choose level UI as well in case it was compiled
Updated open asset in shape editor logic to use getShapeFile so it works again
Fixed on-exit crash after drag-n-drop importing of assets into the AB by properly using the import config object as a pointered object
Added sanity check when inspecting a TSStatic, if there isn't a materials inspector group for whatever reason to prevent a crash
Added filter logic so if in select mode for a specific asset type, it won't show datablocks, prefabs or other loosefiles
Removed unneeded setting of AB's current address path when creating a new terrain material asset
Added logic for forcing field validation in the create a new asset window. This fixes a problem where if you'd typed in a field but didn't hit enter and then immediately hit the done button, the typed string wasn't used.
2020-08-12 13:11:13 -05:00
Brian Roberts d1a79ae5eb
Merge pull request #280 from Areloch/YetMoreMiscAssetFixes
Even more misc asset fixes
2020-08-09 14:09:29 -05:00
Areloch 79ecc2f4a0 Updates the rest of the asset types to utilize separate expanded path variables to avoid breaking assetDef saving
Fixes select mode for the Asset Browser to properly filter to the selecting type
Fixes the imageType in the asset import window inspector to properly set to the importing image asset's discovered type if valid
Fixes AssetBrowser asset selection return so it returns back a valid assetId
Fixes TerrainMaterial save crash by ensuring we fill in the diffuseMapAsset
Removes saving of TerrainMaterial being saved to a generic script file if one isn't found for an existing TerrainMaterialAssets
2020-08-09 01:32:27 -05:00
Brian Roberts 641c75b721
Merge pull request #279 from Areloch/MoreABAndImporterFixes
More various Asset Browser and importer fixes
2020-08-08 15:12:01 -05:00
Areloch d01341708e Removes extra assetImportConfigs file
Fixes name handling when finding associated image files on materials
Makes parseImageSuffix return back the case-correct suffix given the image's filename
Fixes import session reset logic to not have infinite looping happen when activated if files are in the session still(used mainly when import config is changed)
Makes sure materials are not processed if they are found in the import config's ignoreMaterials list
Makes sure active import config is properly on importer when it's changed in the Import window
Tweaked asset browser folder filtering logic so it always rejects .git folders from displaying, and also made the core, tools, cache and shaderCache filtering behavior consistent
Fixed navigation of root-level folders if double-clicking on them through the main window
Ensured import session is reset after an import happens so no extra files are left over in the importer's list
2020-08-08 13:01:50 -05:00
AzaezelX 284ad3e083 from @OTHGMars: AssetImporter type and path for material look-ups.
(and fix for pbrconfig<map> entry)
2020-08-08 00:54:06 -05:00
Areloch 813762c722 Separated ShapeAsset's fileName for the loose file name and the fully processed file path to avoid potential save-out problems
Fixed autoAssetImport so it properly cleared any prior import session objects
Added beginning and ending comment line signfiers to make import logging easier to spot in console
Fixed variable used when doing the actual import on assets where it would use the top-level asset import objects and not the children array, causing a crash
Fixed the Make Selected A Mesh logic to work with the creation of a new shapeAsset
Added secondary handling to generate a prefab of the original selection for preservation purposes
Added optional input for makeSelectedPrefab to not delete the original selection(useful for the preservational prefab mentioned above)
Adjusted font color for NA text edit fields to make it more legible
Changed the non-working reloadDatabase button in assetBrowser to instead open the Asset Editing editor settings page.
2020-08-07 00:24:26 -05:00
Areloch fc225a7f0b Adds a default value to the lodType of the asset importer to prevent utilizing an un initialized value 2020-07-29 15:42:28 -05:00
Bloodknight f52ae7f1b3 Fix GCC9 complaints 2020-07-22 14:29:54 +01:00
Areloch 7818b1ba49 Correct to make the getModuleFromPath function static again. 2020-07-11 21:57:40 -05:00
Areloch a3d6afc197 Corrects lookup/in-place auto import logic for ImageAssets
Fixed sizing issue for material asset ptr fields
Fixed type of comment in Particle Asset
Hooked GLSL and HLSL shader files to be proper asset loose files for PostEffectAsset
Adjusted some default values for default ImportConfig
Corrected field type of multiple fields  for the importConfig
Corrected loading of PopulateMaterialMaps config setting from config file
Corrected field types of multiple fields for AssetImportObjects
Exposed several utility fields for the Importer to script
Added ability to create an AssetImportObject in script and add it to the Importer's current session
Ensured stable naming behavior(replacing spaces, -, and . in names with _
Improved getAssetTypeByFile logical lookup so it doesn't accidentally grab cached.dts files
Added ability to hard reset an import session, wiping all inbound files for a full reset
Added ability to process DTS files to shape import so it can parse out content such as materials for associated asset imports
Added better handling for shape materials that are just colors
Added callback hook-in so if the importer doesn't have a defined function for importing a given asset type, it'll try calling down into the editor
Stabilized imageAsset processing logic when generating a material for it
Improved imageType lookup/processing logic in Importer
Improved logic for binding in associated image files to materialAssets
Improved logic for processing shapes to get related materials and images, ensuring better likelyhood of finding and associating related assets
Cleaned up validation logic
Added ability to properly look up the editor's default import config if it's set to be used for autoimport
Improved handling of originalFilePath logic, so if it's an in-place import, it doesn't bother populating the field
Set default UP axis value on shape importing to ensure better default behavior
2020-07-11 16:20:10 -05:00
Areloch 7b1c083839 Adjusts importer logic of assets to fill spaces in the names as underscores to avoid issues. 2020-06-26 23:28:53 -05:00
Areloch 4ce558f042 Reworks the terrain loader code to work with the assets.
Fixes the terrain asset creation, makes the loading logic go through the asset auto-import behavior when a filename or assetid is bound that is not found.
Corrects terrain material binding to properly save and load
Makes the terrain asset inspector fields work as expected.
2020-06-25 23:33:01 -05:00
Areloch 6a5661ddc7 Corrected some path-slash wrongness 2020-05-17 15:27:16 -05:00
Areloch 9b7b09dce8 Adjusts the ShapeAsset autoImport invoke logic to actually use the C++-side autoImport logic
Changed originalImportingAssets to originalImportingFiles in the AssetImporter for naming clarity
Made autoImportFile properly return the assetId that was made
Additional logging in the AssetImporter
Adjusted the asset registration logic to support reimports, which merely refreshes the assetID
Added logic to shape asset importing to be able to import in an existing companion constructor cs file
Tweaked the TSStatic setShapeName logic so it will properly set fields depending on if the assetID was correctly set, or if we have the noShape fallback in use
2020-05-17 01:38:17 -05:00
Areloch 4978538490 Includes required support functions for ImageAsset 2020-05-11 02:30:58 -05:00
Areloch 3e36dbb06f Finished out primary comment documentation and initPersistField hook-ins 2020-05-11 02:08:07 -05:00
Areloch fb31f9d1e5 Implements the Asset Importer integrated into the engine, avoiding the need for calldowns into the tool suite to import assets 2020-05-10 03:48:08 -05:00