Skip to content

do not fail on missing image or model plugin, they can be optional

Thomas Debesse requested to merge illwieckz/netradiant:image_nofail into master

You know, a gamefile can reference many supported texture plugins with a string like that: texturetypes="tga jpg png pcx bmp dds webp crn". But what if one plugin providing support for one of those texture type is not compiled? Radiant aborts with a general module failure! The same happens with model plugins.

I recently imported iqm support from aaradiant but before that a perfectly valid AlienArena gamepack would have made NetRadiant aborting instead of just displaying a model placeholder.

Then I opened two merge requests, !100 (merged) for webp texture support and !104 (merged) for crn texture support. The only way to properly build against crn is to make a submodule, but the xonotic ./all script does not supports submodule and will probably not because “We had consciously decided against submodules” (see xonotic!46 (closed) ). But what if we make crn build optional? After all xonotic does not use it so does not need to build it! But with current code the unvanquished gamefile would crash netradiant even if the mapper is editing against the asset source repository full of png and whith no one crn…

So this patch just allows NetRadiant to not miserably panic on missing model and texture plugin. A message about the missing plugin is still printed on log though.

Edited by Thomas Debesse

Merge request reports