Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/io/export_ply.py')
-rw-r--r--release/scripts/io/export_ply.py19
1 files changed, 8 insertions, 11 deletions
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py
index d8f9b690c9f..d0712d820fd 100644
--- a/release/scripts/io/export_ply.py
+++ b/release/scripts/io/export_ply.py
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
@@ -42,7 +42,7 @@ Only one mesh can be exported at a time.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Vector rounding se we can use as keys
#
# Updated on Aug 11, 2008 by Campbell Barton
@@ -127,23 +127,20 @@ def write(filename, scene, ob, \
vertexColors = False
if faceUV:
- active_uv_layer = None
- for lay in mesh.uv_textures:
- if lay.active:
- active_uv_layer = lay.data
- break
+ active_uv_layer = mesh.active_uv_texture
if not active_uv_layer:
EXPORT_UV = False
faceUV = None
+ else:
+ active_uv_layer = active_uv_layer.data
if vertexColors:
- active_col_layer = None
- for lay in mesh.vertex_colors:
- if lay.active:
- active_col_layer = lay.data
+ active_col_layer = mesh.active_vertex_color
if not active_col_layer:
EXPORT_COLORS = False
vertexColors = None
+ else:
+ active_col_layer = active_col_layer.data
# incase
color = uvcoord = uvcoord_key = normal = normal_key = None