diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2017-06-24 23:16:32 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2017-06-24 23:16:47 +0300 |
commit | ddabe465b55980a642b917d11cfc1ec2a27300a5 (patch) | |
tree | 7ab0d023527df09b0c153bd974f37b49608142f2 /source/blender/collada/DocumentExporter.cpp | |
parent | a2a301bdb96387b5b70ef82e5e9329ce1b5b5c75 (diff) |
collada: export UV Textures as materials. Note: the reimport of the exported collada files will have materials assigned instead of UV Face Textures! This is expected behavior
Diffstat (limited to 'source/blender/collada/DocumentExporter.cpp')
-rw-r--r-- | source/blender/collada/DocumentExporter.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp index bd32e989ae3..634071bc90f 100644 --- a/source/blender/collada/DocumentExporter.cpp +++ b/source/blender/collada/DocumentExporter.cpp @@ -138,7 +138,8 @@ extern bool bc_has_object_type(LinkNode *export_set, short obtype); char *bc_CustomData_get_layer_name(const struct CustomData *data, int type, int n) { int layer_index = CustomData_get_layer_index(data, type); - if (layer_index < 0) return NULL; + if (layer_index < 0) + return NULL; return data->layers[layer_index + n].name; } @@ -147,9 +148,10 @@ char *bc_CustomData_get_active_layer_name(const CustomData *data, int type) { /* get the layer index of the active layer of type */ int layer_index = CustomData_get_active_layer_index(data, type); - if (layer_index < 0) return NULL; + if (layer_index < 1) + return NULL; - return data->layers[layer_index].name; + return bc_CustomData_get_layer_name(data, type, layer_index-1); } DocumentExporter::DocumentExporter(const ExportSettings *export_settings) : export_settings(export_settings) { |