Commit graph

64 commits

Author SHA1 Message Date
JeffR 0fa8b97f91 Reimplements ability to utilize direct file load alongside ImageAsset fields when utilizing the ImageAsset macros
Updates Asset Browser generated preview images to not utilize full assets, but just the preview image files themselves
2025-05-27 17:12:03 -05:00
marauder2k7 6870a040e2 purge assets and clear image
image asset was missing a clear, passing a null value should clear the image asset and set it to null on materials.
2025-05-14 00:57:38 +01:00
marauder2k7 aa3f07e339 update macro
Added get##name##File to macro that will check to make sure the asset is not null before getting the image file.
2025-05-14 00:30:47 +01:00
marauder2k7 f86497434e is named target
clear out texHandles on teardown of imageAssets.
2025-05-12 22:17:01 +01:00
marauder2k7 73ad92b757 review notes from Az
Should render fallback for namedTarget if namedTarget fails
Add safety around namedtarget getTexture to stop assert
Missing assets should revert to fallback image and print a warning to console
Remove REFACTOR tag from all macros.
2025-03-30 11:22:42 +01:00
marauder2k7 b707b2e2b7 final rev
add safeties to getters
getTextureBitmap/ functions to return member variable that is collected when the image is set
2025-03-28 15:32:16 +00:00
marauder2k7 bfe2401ebb get image metadata
adds ability to get image metadata without loading the texture
since we are using the getOwned parameter correctly now new assets must have the full path to the image file when being created
when the asset becomes owned again the image file path will be updated.
2025-03-28 11:14:21 +00:00
marauder2k7 db8c565416 ID10T issue
we dont want both fileChanged and resourcechanged.... causes issues
2025-03-27 19:34:11 +00:00
marauder2k7 fc30d178af fix asset refresh on materialAssets 2025-03-27 18:33:37 +00:00
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 086db03bbc Update ImageAsset.h 2025-03-26 15:42:26 +00:00
marauder2k7 f59ccc3f99 Update ImageAsset.h 2025-03-26 15:41:53 +00:00
marauder2k7 465c79f39d Update ImageAsset.h
update macros to share target functionality
add extra check to see if image asset exists.
2025-03-26 15:07:07 +00:00
marauder2k7 d86962d1fd requirements for postfx
update to handle posteffects with image_asset_refactor
2025-03-26 14:31:11 +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 b2fe48ab8d more merge conflicts
fixed more merge conflicts (afxZodiac and MaterialDefinition)
Updated cubemapdata to use refactor asset
added new part to image_asset macro to create a private asset if the file exists.

updated reflectionProbe errors to actual function name where the error occurs.
2025-03-24 21:50:04 +00:00
marauder2k7 d87655bb3a merge dev 2025-01-23 22:16:33 +00:00
marauder2k7 58119a4f82 more material def 2025-01-23 22:15:47 +00:00
marauder2k7 cebfdbc5ec material definition
changing the beast over to the refactor
2025-01-23 22:15:29 +00:00
marauder2k7 4d980e5406 various cleanups and fixes
basicClouds refactored
null dereference fixes in guiMenuBar
2025-01-23 22:14:05 +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
marauder2k7 f5f50723ed final cleanup 2024-12-14 14:47:46 +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
AzaezelX 3ace31c68c crashfix work for hot-editing shape assets tied to tsstatics 2024-04-06 14:48:22 -05: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 1cf754dbca asset load refactor
genral load method, now returns loadedstate across the board
2023-11-12 16:33:17 -06: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 04f4a5fcf4 dedicated server nulltexturemanager work
also supress warning for imageassets not loading a texture in nulldevice, and early out of _determineFeatures shadergen methods under the same conditions
2022-10-01 12:44:45 -05:00
AzaezelX e211f502e8 better handle old style references to named texture targets 2021-11-04 15:44:43 -05:00
AzaezelX e45b959d7d correct imageassetarrays having a singular texture profile as oposed to a type per.
while that certainly works for most cases it falls apart when dealing with postfx where it's an unnamed array of variable types of inputs.
shifted the profile assignment to #define INIT_IMAGEASSET_ARRAY(name, profile, index) so there's still a really obvious point where you can see the default setting, even if it's not in the more desireable OG definition spot
for postfx in particular, given we can swap that, provided an example of how to do just that
2021-11-03 12:30:52 -05:00
AzaezelX 98a079a797 code duplication prune. should aid in stability 2021-10-03 02:56:26 -05:00
AzaezelX 2630b4ada6 corrected and simplified the is<foo>Valid method macro injections 2021-09-28 18:50:35 -05:00
AzaezelX 776741770d boolean is<thing>valid chjecks for assets. tests wether it's non-empty and reporting zero flaws 2021-09-28 18:16:14 -05:00
AzaezelX ad0c141189 use _set<assetname> for all network recipts of shapes, sounds, images and materials to ensure we at least try and fill that out whichever way is ghosted to us 2021-09-27 21:12:27 -05:00
AzaezelX 3d488bbbf0 macro cleanup 2021-09-09 13:29:31 -05:00
AzaezelX ee3ef531e2 ironically, overly paranoid checks were tripping warnings 2021-08-29 18:32:44 -05:00
AzaezelX bdf6bd5c69 account for the possiblity of _set##name(StringTableEntry _in entries somehow getting punted nulls 2021-08-29 17:41:20 -05:00
Areloch 3e131f5b8e Added changes missed via merge failures.
Removed some unused files/references that were causing errors, related to issues #502 & #512
2021-07-20 20:05:49 -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
AzaezelX 5de19404d9 mac compile fixes
1) `/` not `\` for includes
2) had to clean up a few extra ## bits that work fine winside, but trip up macs (only needed when stitching, had 5 spots where that was pointless)
2020-11-06 02:11:13 -06:00
AzaezelX 4250e1d1b4 simplification of the Class::_set<slotname>Asset methods, (as well as early outting before dAtoi(index) hurt itself if index was invalid)
also since I was in there, fixed isrgb accidently being flipped on by default
2020-10-12 04:43:47 -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