Commit graph

67 commits

Author SHA1 Message Date
marauder2k7 c025ea86b4 more cleanups
cleanup the type removing the refactor tag
materialManager restored to its original state
2025-03-27 08:59:50 +00:00
marauder2k7 3b70689abc clean out old macros 2025-03-26 21:16:43 +00:00
marauder2k7 7af992970a Update ImageAsset.cpp
update getAssetIdByFilename to also check the imageFile of the asset
This helps match filenames for assets created privately such as probe bakes and targets
2025-03-26 18:51:44 +00:00
marauder2k7 d86962d1fd requirements for postfx
update to handle posteffects with image_asset_refactor
2025-03-26 14:31:11 +00:00
marauder2k7 16d219769f set preview image
set the image asset preview image for namedTargets
2025-03-26 10:12:14 +00:00
marauder2k7 bab7878ca6 give named target a fallback
we need to give named target a fallback image so references are kept when a named target is not ready.
2025-03-26 09:12:06 +00:00
marauder2k7 6c2b4f8979 null handling 2025-03-25 19:14:05 +00:00
marauder2k7 987ff90467 named target functionality 2025-03-25 18:22:26 +00:00
marauder2k7 eb746a1142 console spam
moved error printout in guiType guiControlProfile incLoadCount inside a check to make sure the profile has a bitmap asset set.

remove older typeImageAssetId from group and variable inspector classes
2025-01-23 22:13:49 +00:00
marauder2k7 4d893f51cf gui image asset refactor
bitmap button popup ctrl ex
2025-01-23 22:13:21 +00:00
marauder2k7 fa8110ce8f all DECLARE_IMAGEASSET refactored 2025-01-23 22:12:55 +00:00
marauder2k7 24b374f545 cloud layer example 2025-01-23 22:12:54 +00:00
marauder2k7 eca0820134 init commit
start of attempt 3
2025-01-23 22:12:52 +00:00
Brian Roberts 69fa4b389f
Merge pull request #1340 from marauder2k9-torque/ImageAsset-NamedTexTarget
NamedTexTargets as ImageAssets
2024-12-23 03:12:22 -06:00
marauder2k7 7b73ce7a2f Update ImageAsset.cpp 2024-12-14 16:26:02 +00:00
marauder2k7 1edfbcf447 fixes for reload and flush 2024-12-14 13:37:23 +00:00
marauder2k7 f6dc694bd4 fully working 2024-12-14 01:18:46 +00:00
marauder2k7 85463c85ac named targets for image assets
image assets can now be bound to a named texture target
if used in a material the target needs to exist before the material is initialized
2024-12-13 00:26:39 +00:00
Areloch ae8eca48e1 Implementation of Subscenes, SceneGroups and Gamemodes
Standardizes Gamemodes to be an actual class with data and utility functions that can be parsed
Adds inspector field handling for selecting gamemodes
Updated Scene class to work with Gamemodes for the gamemode field
Updates editor suite elements to be able to create SubScenes, SceneGroups and Gamemodes
Adds ability to convert SimGroup to SubScene
Updates BaseUI's chooselevel menu to have gamemode selection and filters shown levels based on selected gamemode
2024-09-01 16:39:00 -05:00
AzaezelX 00bdc913b0 onAssetRefresh(); already chains. no need to call that again 2024-04-06 17:14:56 -05:00
marauder2k7 7874c0ae27 Merge remote-tracking branch 'upstream/development' into virtuals-override 2024-03-19 19:11:24 +00:00
marauder2k7 efbe5e90f5 virtuals removed
virtuals removed and replaced with override where necessary, clang-tidy to the rescue.
2024-03-18 18:13:00 +00:00
AzaezelX bfc921da22 reload chain execution
for imageassets and materialassets, check any other assets using them, and uppon completion of reloading, kick off the using assets reload as well in serial
2024-03-17 21:30:19 -05:00
Areloch 1e21cc678f Fixes the handling of imageAssets for array'd field types, as well as fixing the editor behavior of guiBitmapCtrl so the imageAssets correctly update the fields upon editing 2024-02-04 14:45:19 -06:00
AzaezelX 1cf754dbca asset load refactor
genral load method, now returns loadedstate across the board
2023-11-12 16:33:17 -06:00
AzaezelX 0303cadcc0 imageasset entries can be blank
don't spam the console. and definitely don't try and load it
2023-10-31 12:00:35 -05:00
AzaezelX a8d640e311 clean up redundant loads, shift first load to getResource methods for sound and shape.
still need to properly sort image
2023-10-09 14:41:14 -05:00
AzaezelX b710a309bd asset load flow work
add reloading state to asset tracking,
convert most asset.isnull() checks on over to skipping out unless the errcode is ::Ok, or ::UsingFallback
add more errstriongcodes to hook up
skip load<type> execution if the asset loaded state is ::Ok
2023-10-08 13:19:43 -05:00
AzaezelX f5a34308f9 add a docsURL; macro to link a given set of script config vars to git or similar storage urls via clicking on the inspector 2023-01-27 01:13:15 -06:00
Areloch 74ac45e877 Fixed Edit button tooltip for Shape Asset field
Disabled Edit button on image asset field as there's no current image editor
Fixed positioning of edit buttons to align with preview
Fixed horizontal sizing for the edit control so it keeps to the width of the field
Fixed handling on the preview display so if an invalid asset is input, it clears the preview display to help indicate it's invalid
Disabled the MaterialSlot handling for TSStatics until it can be further refined
2022-12-08 23:45:56 -06:00
Areloch 739a111fc2 Re-added accidentally deleted line that removed the preview tooltip 2022-12-08 20:15:20 -06:00
Areloch 6162c5da05 Updates the behavior and layout of the ImageAsset, MaterialAsset and ShapeAsset inspector field types to be clearer, with previews and obvious edit buttons
Also fixes drag-n-drop behavior from the AB into the image and shape fields to ensure they update as expected.
2022-12-08 20:00:55 -06:00
Areloch cd82186231 Fixes setter issue for image/shape/material custom inspector fields where it was not correctly passing through the changed value from the Asset Browser select
Swapped the water's disableTrueReflections variable to be enableTrueReflections for simplicity and consistency(also fixed a persistent typo)
Swapped disableVerticalSync to be enableVerticalSync for simplicity and consistency
Swapped disableParallaxMapping to be enableParallaxMapping for simplicity and consistency
Fix click detection on slider mode entries for guiGameSettingsCtrl so the click position correctly matches the percentage
Fixed problem where postFX initialization would always exec default.postfxpreset.tscript, even if a level's got it's own preset, which can cause problems
Fixed range field type behavior so that editing the values applies in real time, and also consistently applies between slider and text field
2022-08-30 01:29:39 -05:00
Areloch ded99cd8cb * Fixes handling for Image, Material and Shape Assets' inspector fields so they properly work with non-object targeted inspectors, such as the PostFXEditor
* Updated PostFXEditor scripts to handle refreshing properly when certainl field types(assetId fields) are changed
* Adjusted display handling of slider values on guiGameSettingsCtrl to show 0.x decimal format instead of 0.xxxxx
* Fixed pad length of item names in guiTreeView for items that are marked to avoid console spam
* Fixed local offseting for popupMenus so scaled/offset window position doesn't cause the popup menu to offset from mouse click position(courtesy OTHG_Mars)
* Fix issue with terrain where, due to default value save validation, the global scope for the terrain collision list would be whiped when saving, causing players to fall through terrain. Moved to per-terrain convexLists
* Fixed issue with the core camera model mesh and updated references so camera bookmarks display properly
* Fixed console spam during asset browser initialization where it would try and expand the directory tree even though the dir tree isn't populated yet
* Fixed handling of Open File Location RMB menu action to properly deal with script and datablock types
* Removed unusuable "Create ___" asset type prompts from the RMB menus for the AB to avoid confusion
* Improved slider offset positioning for various popup sliders on editor toolbars
* Anchored the visibility popup menu to the button for more consistent formatting and better feel
* Shifted various visibility toggles from 'in place' on the menu buttons to functions, allowing it to also properly mark the menu entries as checked or not, improving usability
2022-08-26 15:25:17 -05:00
AzaezelX 4a7104e5ea fix TORQUE_TOOLS = off compilation 2022-06-13 12:38:08 -05:00
JeffR 70a9666cc3 Removes erroneous assignment of loaded state onto fallback assets when we fail to find an assetId by filename for image and shape assets
Fixed handling of TSStatics' materialSlot fields, where if the field has been changed, it properly loads the modified field and ensures the reskin action happens correctly.
Changed text on some context popup menu to better indicate the action Views loose files, not imports them
Makes the Loose File Viewer skip cached.dts files.
2022-05-25 00:12:12 -05:00
AzaezelX 0136af477f getAssetIdByFilename loaded state fix
getAssetIdByFilename should set the <type>Asset->mLoadedState = AssetErrCode::BadFileReference; so we know we're using a fallback
2022-04-10 17:29:55 -05:00
JeffR 630285def6 Shifts handling of material and terrain material definitions to be written into the asset definition taml file instead of having an extra loose file
Also updates importers to correctly handle this change
Adds ability for taml XML serialization to properly assign array'd fields
Adds 'inheritFrom' field to simobjects for when objects with parent objects are serialized
AssetBase how inherits from SimGroup so it can have objects like material definitions embedded in them for save/load in the taml definition file
Updated loading/handling logic in terrain material asset to be more similar to regular material assets
2022-01-30 11:50:16 -06:00
Areloch a5944aff19 Adjusted callback handling of asset inspector fields when invoking AB to select asset for more consistent behavior and better handling of updating the objects and inspector
Added logic to forcefully acquire newly imported asset definition to better try and ensure it's loaded immediately after import
Added logic to asset importer so if a file is not found for an importing material asset, if populate maps is on, then it will try and find a matching image asset in the destination module
Added logic to tsStatic to better handle fields being updated via the editor, forcing updates and refreshes of the shape and materialSlots
Fixed handling of guiBitmapButtonCtrl so it will update the bitmap used when edited via the Gui Editor
Updated image ref to the hudFill image asset for the console GUI
Cleaned up names for the default camera model/material
Defaulted import config to utilize the Prune action instead of rename for more predictable default behavior
Added icons next to AB's preview slider bar for additional visual feedback of slider intent
Added missing checkbox to asset import window and cleaned up scaling behavior
Fixed handling of drag-n-drop behavior in GUI editor so it doesn't block further interaction
Added logic for drag-n-drop of image assets to GUI Editor so it will create a GuiBitmapCtrl with the image
Added handling for drag-n-drop import of folders of assets to AB/Asset Import
Added missing asset import config option to indicate if config supported import of sound assets
Added logic when opening asset import config editor, where if there is a default import config set in the settings, it will open that one by default
Hid the collision section of the import config editor, as those options are currently unutilized
Improved behavior for Create New Folder window in the AB, now always pushing to the front, and also selecting the text by default, so the user can just start typing the new name
Also added return and escape key accelerators to Create New Folder window for better UX
Fixed display of editor windows, adding a distinct blue color to highlighted windows' title bar and fixing display of minimize/maximize/window/close buttons
Moved GUIEditor's onControlDropped function to the AB script to match placement of sibling world editor function
Fixed issue with material editor where the ORM Config map slot was getting the normal map instead of the correct ORM map
2021-11-26 16:40:15 -06:00
Areloch eb24b63be4 Shifts utilization of gui elements in editors that point to 'normal' image assets to utilize generated previews instead.
This reduces console spam about mismatched texture profiles and improves stability.
2021-11-14 21:39:51 -06:00
Robert MacGregor 2d55fcf1bc * BugFix: Invert the corrections made in ImageAsset and ScriptAsset to be correct. 2021-10-07 13:16:55 -04:00
Robert MacGregor 74cc60508b * BugFix: More cleanup of MSVC compiler warnings. 2021-10-07 01:10:00 -04:00
Areloch ec85e9021c Misc Quality of Life and Bug fixes
Added handling for if preview images on image assets fails to generate, will fallback to using the full image
Added handling for double clicking or drag-n-dropping terrain assets to create them
Improved handling of field labels in variable inspector by making the stringtable be case sensitive.
Added editor settings for handling of asset double click behavior. Can now select between Edit Asset and Spawn Asset. Support is asset type dependent.
Added editor setting for auto-importing loose files when navigating to a folder. If on and the user has flagged to also enable auto-import generally, will auto import all unaffiliated loose files in as assets.
Added editor setting for default module to use when creating new assets. Updated various tooling logic so when creating a new material, if this and the 'Always Prompt Module Target' setting is off, it will fill in the target module and target asset path info based on the default module.
Fixed issue with editors that use managedData scripts where if the path didn't exist, the script file wouldn't be made.
Fixed display issue in terrain editor where if you clear the detail map, the normal/macro/orm maps would disable, but not also clear.
Fixed handling of cleared maps in terrain editor so it no longer fills empty maps in with the no image image.
Fixed handling of creating new material where it would fill in the diffuse with a no texture image as the default.
Fixed issue where canceling out of creating a module would still prompt to create the common default folders.
Fixed issue where the Select Module window couldn't be closed via the cancel or x buttons.
Based on feedback, reduced default size of the Text Pad window.
Fixed issue where the Drop At menu list wouldn't correctly display which item was marked after it was changed.
Fixed spawning shape asset handling so it uses whatever the editor's Drop At setting is.
Improved themeing of regular bitmap buttons in the editor.
Based on feedback, flipped layout of Target Module and Target Path in the Create New Asset window.
Improved handling of setting up the Target Path for when creating new assets. If a path is not set, and the user has a Default Module, it will default the path to that module.
2021-08-28 18:51:27 -05:00
Brian Roberts 0a150e342f
Merge pull request #545 from Areloch/AssetFileCaseSensitivityFix
Enforces filename string case sensitivity for assets' internal filenames
2021-08-23 19:22:22 -05:00
Areloch cfe122f714 Enforces filename string case sensitivity for assets' internal filenames, which avoids the stringtable messing with the case preventing file name case sensitivity issues. 2021-08-21 23:12:37 -05:00
Jeff Hutchinson 37dc8626f5 MacOS fixes
This fixes an issue where Con::getVariable can't be used in the global scope before the console system is initialized. I'm honestly surprised this error didn't happen on any other platform.
2021-08-21 20:48:26 -04:00
Areloch c76c5f7ee1 Removed unneeded duplicate of blank sky skybox
Fixed various inspector field editor button icons
Fixed drag-n-drop apply logic for material assets
Fixed up some convex shape editor material references
Fixed tools overlay gui profile opaqueness flag
Fixed uvEditor image asset binding/lookups
Fixed decal editor preview display
Fixed shape editor would you like to save your changes prompt
Added additional sanity check for bad material reference in tsMesh
Fixed saving of terrain asset when working in editor default level
2021-08-06 01:06:36 -05:00
AzaezelX 36b31ae19d zip support followup 2021-07-22 21:27: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 f0068c2435 Updates macromagic to properly set up for init'ing when image assets are set in material and terrain materials 2020-10-10 22:48:13 -05:00