CaWE complains about not found materials in copied game

Issue #82 resolved
Anonymous created an issue

When using a vanilla SVN 353 version of CaFU, freshly compiled on Gentoo Linux x86_64, CaWE complains that it cannot find any materials in a newly created game. However, the new game was simply created by (recursively!) copying the Games/VSWM directory to Games/Foobar. The exact message is:

WARNING: No materials found in directory Games/Foobar/Materials We can continue, but the materials will NOT work. Something is wrong that really should be fixed!

The same happens when copying the DeathMatch directory to a "Foobar" directory. However, both DeathMatch and VSWM work fine in CaWE. The command line output when running CaWE is:

Warning: Failed to open ZIP archive Games/VSWM/Textures/TechDemo.zip Warning: Failed to open ZIP archive Games/VSWM/Textures/SkyDomes.zip File Games/Foobar/Materials/Labyrinths.cmat, material "StatusFrameMaterial": duplicate definition (ignored). File Games/Foobar/Materials/Labyrinths.cmat, material "Textures/laby_wall_01": duplicate definition (ignored). File Games/Foobar/Materials/Labyrinths.cmat, material "Textures/laby_end_01": duplicate definition (ignored). File Games/Foobar/Materials/Fonts.cmat, material "Fonts/Arial": duplicate definition (ignored). File Games/Foobar/Materials/Fonts.cmat, material "Fonts/FixedWidth": duplicate definition (ignored). File Games/Foobar/Materials/Fonts.cmat, material "Hud/Ready": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_black": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_blue": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_cyan": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_green": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_magenta": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_orange": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_red": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_white": duplicate definition (ignored). File Games/Foobar/Materials/generic.cmat, material "Textures/generic/_yellow": duplicate definition (ignored). File Games/Foobar/Materials/Splash.cmat, material "MainSplashLogo": duplicate definition (ignored). File Games/Foobar/Materials/Splash.cmat, material "LoadingBar_Left": duplicate definition (ignored). File Games/Foobar/Materials/Splash.cmat, material "LoadingBar_Right": duplicate definition (ignored). File Games/Foobar/Materials/Splash.cmat, material "LoadingBar_Center0": duplicate definition (ignored). File Games/Foobar/Materials/Splash.cmat, material "LoadingBar_Center1": duplicate definition (ignored). Warning: Failed to open ZIP archive Games/Foobar/Textures/TechDemo.zip Warning: Failed to open ZIP archive Games/Foobar/Textures/SkyDomes.zip File Games/DeathMatch/Materials/Fonts.cmat, material "Fonts/Arial": duplicate definition (ignored). File Games/DeathMatch/Materials/Fonts.cmat, material "Fonts/FixedWidth": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_black": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_blue": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_cyan": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_green": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_magenta": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_orange": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_red": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_white": duplicate definition (ignored). File Games/DeathMatch/Materials/generic.cmat, material "Textures/generic/_yellow": duplicate definition (ignored). File Games/DeathMatch/Materials/Splash.cmat, material "MainSplashLogo": duplicate definition (ignored). File Games/DeathMatch/Materials/Splash.cmat, material "LoadingBar_Left": duplicate definition (ignored). File Games/DeathMatch/Materials/Splash.cmat, material "LoadingBar_Right": duplicate definition (ignored). File Games/DeathMatch/Materials/Splash.cmat, material "LoadingBar_Center0": duplicate definition (ignored). File Games/DeathMatch/Materials/Splash.cmat, material "LoadingBar_Center1": duplicate definition (ignored). Warning: Failed to open ZIP archive Games/DeathMatch/Textures/TechDemo.zip Registering archive "Games/DeathMatch/Textures/SkyDomes.zip".

Scanning cwd for all available renderers... Scanning Libs/build/linux2/g++/release/MaterialSystem for all available renderers... Libs/build/linux2/g++/release/MaterialSystem/libRendererNull.so ... SUCCESS - but excluded from auto-selection (Pref# 1). Libs/build/linux2/g++/release/MaterialSystem/libRendererOpenGL12.so ... SUCCESS - first supported renderer (Pref# 1000). Libs/build/linux2/g++/release/MaterialSystem/libRendererARBprogs.so ... SUCCESS - higher preference renderer (Pref# 2200). Libs/build/linux2/g++/release/MaterialSystem/libRendererCgNV2X.so ... libCg.so: cannot open shared object file: No such file or directory, FAILED - could not load the library at Libs/build/linux2/g++/release/MaterialSystem/libRendererCgNV2X.so. Libs/build/linux2/g++/release/MaterialSystem/libRendererCgARB1.so ... libCg.so: cannot open shared object file: No such file or directory, FAILED - could not load the library at Libs/build/linux2/g++/release/MaterialSystem/libRendererCgARB1.so. Reloading previously auto-selected renderer Libs/build/linux2/g++/release/MaterialSystem/libRendererARBprogs.so ...

Comments (6)

  1. Carsten Fuchs

    Ok, I can see this here (also on Windows), many thanks for reporting this!

    It's a complex problem whose solution requires to finally retire the global `MaterialManagerI` instance in favor of material managers that are local to models (already implemented), GUIs (to be done) and CaWE's game configurations (to be done, their material managers would keep the materials used for the ''maps'' in this game (config)).

    I raise the priority of this ticket to "high" as I intend to address this quickly, and as it agrees well with the current work regarding the (otherwise unrelated) Model Editor.

    Work-around

    In a sense, the problem is triggered by the presence of duplicate material names as created by copying the entire game folder.

    Thus, a quick and dirty work-around is to temporarily move other game directories (like `DeathMatch` or `VSWM`) elsewhere, i.e. outside of directory `Games`. This removes the occurrence of material definitions with duplicate names and thus avoids the problem until the proper fix is in place.

  2. Carsten Fuchs

    (In [359]) Changed GUIs to have their own local material manager, rather than keeping materials in and getting them from the global material manager instance.

    This prepares both #77 and #82, and is analogous to the recently updated material handling in `cmdl` model files: Having all files and data related to a single GUI grouped closely together, both on the file system as well as regarding program data structures, both improves clarity and flexibility.

    References #77 and #82.

  3. Carsten Fuchs

    (In [360]) CaWE: Updated the editors `EditorMatManT` class (a part of each game config), to keep it's own `MaterialManagerImplT` instance, rather than registering all materials, no matter the game (config), into the global instance.

    Besides the organizational improvement (*), this fixes #82.

    regarding (*): - Only editor-specific materials (such as selection highlights and overlays) are now left in the global material manager, - materials for maps are kept in the above addressed material manager in `EditorMatManT` in the game config, - materials for GUIs are kept in GUIs, - materials for models are kept in models.

  4. Log in to comment