From a109248103214c521b186f97b39ff797f8e21c03 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 16 Mar 2016 07:32:52 -0700 Subject: [PATCH] Disable exporting texture file links. These links are not needed by non-render engines like minetest that use other methods for texturing the model, and causes irrlicht to throw 'file not found' errors during loading. The default options in this version are set to work with minetest. --- B3DExport.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/B3DExport.py b/B3DExport.py index 45d5514..e6135cd 100644 --- a/B3DExport.py +++ b/B3DExport.py @@ -300,7 +300,7 @@ def write_texs(objects=[]): img = getUVTextures(data)[iuvlayer].data[face.index].image - if img: + if img and b3d_parameters.get("export-textures"): if img.filepath in trimmed_paths: img_name = trimmed_paths[img.filepath] @@ -1446,11 +1446,12 @@ class B3D_Export_Operator(bpy.types.Operator): selected = bpy.props.BoolProperty(name="Export Selected Only", default=False) vnormals = bpy.props.BoolProperty(name="Export Vertex Normals", default=True) - vcolors = bpy.props.BoolProperty(name="Export Vertex Colors", default=True) + vcolors = bpy.props.BoolProperty(name="Export Vertex Colors", default=False) cameras = bpy.props.BoolProperty(name="Export Cameras", default=False) lights = bpy.props.BoolProperty(name="Export Lights", default=False) mipmap = bpy.props.BoolProperty(name="Mipmap", default=False) localsp = bpy.props.BoolProperty(name="Use Local Space Coords", default=False) + textures = bpy.props.BoolProperty(name="Export links to texture files", default=False) overwrite_without_asking = bpy.props.BoolProperty(name="Overwrite without asking", default=False) @@ -1480,6 +1481,7 @@ class B3D_Export_Operator(bpy.types.Operator): b3d_parameters["lights" ] = self.lights b3d_parameters["mipmap" ] = self.mipmap b3d_parameters["local-space" ] = self.localsp + b3d_parameters["export-textures"] = self.textures the_scene = context.scene