6 Commits

Author SHA1 Message Date
Colin Basnett
ecfd9897b1 Moved files to named subfolder for easier packaging 2024-02-28 18:50:12 -08:00
Colin Basnett
a3e350e96e Fix for rare error if vertex colors were somehow not active 2024-02-28 18:49:00 -08:00
Colin Basnett
7b417ae425 Incremented version to 2.0.0 and the minimum version to 4.0.0 2023-11-10 23:29:45 -08:00
Colin Basnett
c59f16ed5e Removed deprecated call to calc_normals_split 2023-11-10 23:28:30 -08:00
Colin Basnett
51be4b8ee9 Removed zip file committed in error 2022-08-15 21:53:24 -07:00
Colin Basnett
94b3554f2f Fixed multi-object export texture corruption error
This fixes the bug where exporting 3 or more objects would result in
one or more objects have corrupted texture coordinates
2022-08-15 21:39:13 -07:00
5 changed files with 12 additions and 11 deletions

View File

@@ -2,8 +2,8 @@ bl_info = {
'name': 'ASCII Scene Export (ASE)',
'description': 'Export ASE (ASCII Scene Export) files',
'author': 'Colin Basnett (Darklight Games)',
'version': (1, 2, 0),
'blender': (2, 90, 0),
'version': (2, 0, 0),
'blender': (4, 0, 0),
'location': 'File > Import-Export',
'warning': 'This add-on is under development.',
'wiki_url': 'https://github.com/DarklightGames/io_scene_ase/wiki',

View File

@@ -80,7 +80,7 @@ class ASEBuilder(object):
material_indices.append(material_index)
mesh_data.calc_loop_triangles()
mesh_data.calc_normals_split()
poly_groups, groups = mesh_data.calc_smooth_groups(use_bitflags=False)
# Faces
@@ -133,12 +133,13 @@ class ASEBuilder(object):
# Vertex Colors
if len(mesh_data.vertex_colors) > 0:
vertex_colors = mesh_data.vertex_colors.active.data
for color in map(lambda x: x.color, vertex_colors):
geometry_object.vertex_colors.append(tuple(color[0:3]))
if mesh_data.vertex_colors.active is not None:
vertex_colors = mesh_data.vertex_colors.active.data
for color in map(lambda x: x.color, vertex_colors):
geometry_object.vertex_colors.append(tuple(color[0:3]))
# Update data offsets for next iteration
geometry_object.texture_vertex_offset = len(mesh_data.loops)
geometry_object.texture_vertex_offset += len(mesh_data.loops)
geometry_object.vertex_offset = len(geometry_object.vertices)
if len(ase.geometry_objects) == 0:

View File

@@ -1,11 +1,11 @@
import bpy
import bpy_extras
from bpy.props import StringProperty, FloatProperty, EnumProperty, BoolProperty
from bpy_extras.io_utils import ExportHelper
from bpy.props import StringProperty, EnumProperty, BoolProperty
from bpy.types import Operator
from .builder import *
from .writer import *
class ASE_OT_ExportOperator(bpy.types.Operator, bpy_extras.io_utils.ExportHelper):
class ASE_OT_ExportOperator(Operator, ExportHelper):
bl_idname = 'io_scene_ase.ase_export' # important since its how bpy.ops.import_test.some_data is constructed
bl_label = 'Export ASE'
bl_space_type = 'PROPERTIES'