Where does TXB cache its 'Object Library
by Josh Butterworth · in Torque X 2D · 10/30/2007 (10:40 am) · 4 replies
As someone trying to work in multiple txscene files it's really annoying to me that the materials & animations I create for each file are cached by TXB, so If I want to make a new scene with new assets I have to manually delete all the existing materials/animations/effects from the library otherwise I end up with a lot of bloat on the file itself.
I know people have asked for a way to delete many objects out of TXB at once, but Im thinking any phyiscal change to the program is still a while away.
So does anyone know where this cache is stored and whether or not I can delete it manually? All I want to be able to do Is load a scene and ONLY SEE the materials that are defined in that scene file.
I know people have asked for a way to delete many objects out of TXB at once, but Im thinking any phyiscal change to the program is still a while away.
So does anyone know where this cache is stored and whether or not I can delete it manually? All I want to be able to do Is load a scene and ONLY SEE the materials that are defined in that scene file.
#2
www.envygames.com/public/XnaSceneSwitching.zip
John K.
10/30/2007 (11:17 am)
Okay, I threw together this cheap proof of concept. This uses the Starter Game template with one additional graphic (a black and white version of the GG logo). All this program does is loads a scene, level1.txscene when the game starts. Then, after 5 seconds, it loads level2.txscene and plays it. Both level files have completely different graphics and animation files. I can't see anything wrong, but I might be missing something. You can download the code from here...www.envygames.com/public/XnaSceneSwitching.zip
John K.
#3
So, to quickly remove the materials, open up the .txscene file in a text editor and hand delete whatever you don't want. It should be pretty obvious what's what in the file.
10/30/2007 (12:21 pm)
They are stored in the .txscene file. The reasoning behind that was since most of the time levels share graphics, materials don't have to be recreated for every level. Some sort of import option would probably work better.So, to quickly remove the materials, open up the .txscene file in a text editor and hand delete whatever you don't want. It should be pretty obvious what's what in the file.
#4
Im talking about the objects that remain in the TXB object libary (the box on the right) when you open different scenes...if you save the new scene they then place themself in the new file and give you a whole load of materials you have no intention of using.
Example:
Load TXB, it automatically opens Level1
Level1 has materials L1A, L1B, L1C in it's xml, these are correctly placed in the TXB object library.
Open Level2 txscene file
I still have L1A, L1B, etc, etc, plus all the new scenes materials
When I save Level2, I now have Level1s materials in my Level2 txscene.
I want to be able to delete whatever file keeps that list of materials/etc persistant between loading scenes, It must be in a file somewhere because restarting TXB doesn't make any difference.
10/30/2007 (1:41 pm)
Sorry, maybe i haven't made it clear, this is a problem with TXB not TX. I've got my scenes loading and unloading properly ingame.Im talking about the objects that remain in the TXB object libary (the box on the right) when you open different scenes...if you save the new scene they then place themself in the new file and give you a whole load of materials you have no intention of using.
Example:
Load TXB, it automatically opens Level1
Level1 has materials L1A, L1B, L1C in it's xml, these are correctly placed in the TXB object library.
Open Level2 txscene file
I still have L1A, L1B, etc, etc, plus all the new scenes materials
When I save Level2, I now have Level1s materials in my Level2 txscene.
I want to be able to delete whatever file keeps that list of materials/etc persistant between loading scenes, It must be in a file somewhere because restarting TXB doesn't make any difference.
Associate John Kanalakis
EnvyGames
John K.