Przeglądaj źródła

Removes option to enable/disable compact separators. Now it's always enabled.

Jørgen Borgesen 9 lat temu
rodzic
commit
bc784fd2b2

+ 0 - 13
utils/exporters/blender/addons/io_three/__init__.py

@@ -374,10 +374,6 @@ def restore_export_settings(properties, settings):
         constants.INDENT,
         constants.INDENT,
         constants.EXPORT_OPTIONS[constants.INDENT])
         constants.EXPORT_OPTIONS[constants.INDENT])
 
 
-    properties.option_compact_separators = settings.get(
-        constants.COMPACT_SEPARATORS,
-        constants.EXPORT_OPTIONS[constants.COMPACT_SEPARATORS])
-
     properties.option_copy_textures = settings.get(
     properties.option_copy_textures = settings.get(
         constants.COPY_TEXTURES,
         constants.COPY_TEXTURES,
         constants.EXPORT_OPTIONS[constants.COPY_TEXTURES])
         constants.EXPORT_OPTIONS[constants.COPY_TEXTURES])
@@ -471,7 +467,6 @@ def set_settings(properties):
         constants.LOGGING: properties.option_logging,
         constants.LOGGING: properties.option_logging,
         constants.COMPRESSION: properties.option_compression,
         constants.COMPRESSION: properties.option_compression,
         constants.INDENT: properties.option_indent,
         constants.INDENT: properties.option_indent,
-        constants.COMPACT_SEPARATORS: properties.option_compact_separators,
         constants.COPY_TEXTURES: properties.option_copy_textures,
         constants.COPY_TEXTURES: properties.option_copy_textures,
         constants.TEXTURE_FOLDER: properties.option_texture_folder,
         constants.TEXTURE_FOLDER: properties.option_texture_folder,
 
 
@@ -735,11 +730,6 @@ class ExportThree(bpy.types.Operator, ExportHelper):
         description="Disable this to reduce the file size",
         description="Disable this to reduce the file size",
         default=constants.EXPORT_OPTIONS[constants.INDENT])
         default=constants.EXPORT_OPTIONS[constants.INDENT])
 
 
-    option_compact_separators = BoolProperty(
-        name="Compact JSON separators",
-        description="Enable this to reduce the file size",
-        default=constants.EXPORT_OPTIONS[constants.COMPACT_SEPARATORS])
-
     option_compression = EnumProperty(
     option_compression = EnumProperty(
         name="",
         name="",
         description="Compression options",
         description="Compression options",
@@ -953,9 +943,6 @@ class ExportThree(bpy.types.Operator, ExportHelper):
 
 
         row = layout.row()
         row = layout.row()
         row.prop(self.properties, 'option_indent')
         row.prop(self.properties, 'option_indent')
-
-        row = layout.row()
-        row.prop(self.properties, 'option_compact_separators')
         ## }
         ## }
 
 
         ## Operators {
         ## Operators {

+ 1 - 3
utils/exporters/blender/addons/io_three/constants.py

@@ -54,7 +54,6 @@ NUMERIC = {
 JSON = 'json'
 JSON = 'json'
 EXTENSION = '.%s' % JSON
 EXTENSION = '.%s' % JSON
 INDENT = 'indent'
 INDENT = 'indent'
-COMPACT_SEPARATORS = 'compactSeparators'
 
 
 
 
 MATERIALS = 'materials'
 MATERIALS = 'materials'
@@ -163,8 +162,7 @@ EXPORT_OPTIONS = {
     EMBED_ANIMATION: True,
     EMBED_ANIMATION: True,
     GEOMETRY_TYPE: GEOMETRY,
     GEOMETRY_TYPE: GEOMETRY,
     INFLUENCES_PER_VERTEX: 2,
     INFLUENCES_PER_VERTEX: 2,
-    INDENT: True,
-    COMPACT_SEPARATORS: False
+    INDENT: True
 }
 }
 
 
 
 

+ 1 - 2
utils/exporters/blender/addons/io_three/exporter/io.py

@@ -67,8 +67,7 @@ def dump(filepath, data, options=None):
 
 
         indent = options.get(constants.INDENT, True)
         indent = options.get(constants.INDENT, True)
         indent = 4 if indent else None
         indent = 4 if indent else None
-        compact_separators = options.get(constants.COMPACT_SEPARATORS, False)
-        compact_separators = (',', ':') if compact_separators else None
+        compact_separators = (',', ':')
         logger.info("Dumping to JSON")
         logger.info("Dumping to JSON")
         func = lambda x, y: _json.json.dump(x, y, indent=indent, separators=compact_separators)
         func = lambda x, y: _json.json.dump(x, y, indent=indent, separators=compact_separators)
         mode = 'w'
         mode = 'w'