When exporting solid mesh objects (closed meshes) using Blenders idtech (Quake) *.map exporter the following error occurs;
AttributeError: 'MeshTexturePoly' object has no attribute 'use_twoside'Cause
Primarily the "use_twoside" error occurs most often when attempting to export objects that are 'modelled' in the sense that they contain concave structures
, i.e. elements that would otherwise require an inset, recess or other 'inner' structure as part of the whole (or are otherwise complex shapes not ordinarily possible with brush volumes).
A secondary cause for the "use_twoside" errors occurs when exporting mesh objects that have missing faces - these produce invalid structures forcing a halt in the script at their discovery.
Image above shows a small area with a depression bordered by two tiers of steps - this forms a convex shape that typically causes the 'use_twoside' error.Solution
To ensure proper export of models to brush volumes to the *.map format, objects must only be comprised convex surfaces/structures only; they cannot contain 'insets', 'recesses' or other 'inward' oriented elements else the export process cannot determine the elements volume (especially when constructing using close meshes). Meshes that do contain such structures need to be broken down into convex volumes with all opening closed (closed meshes).
The image shown above show the corrected version of the same mesh in the first and how is has been broken down into a series of solid (closed) simple blocks
Alternatively, where the error occurs due to missing faces/open meshes gaps and openings should be closed and repaired for export.Video
The below short video shows the model from the above in 'native' and 'fixed' format in Blender, and the result in GTKRadiant (1.4). Using the settings mentioned, i.e. "Brush Thickness:8
" (should be a 'power of two
' measurement - applies equally to volumes units as it does to textures) and "Scale:1
" ensure exported volumes are correctly sized relative to the editor.
Additional ResourcesMaking BSP maps in BlenderExporting models as maps (2.49)