Skip to content

Commit

Permalink
Merge pull request #8032 from jorgenfb/blender_exporter_compact_json
Browse files Browse the repository at this point in the history
Adds blender exporter option to toggle compact separators output
  • Loading branch information
mrdoob committed Feb 7, 2016
2 parents ffc405b + bc784fd commit 61c9727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion utils/exporters/blender/addons/io_three/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def restore_export_settings(properties, settings):
constants.INDEX_TYPE,
constants.EXPORT_OPTIONS[constants.INDEX_TYPE])
## }

## Materials {
properties.option_materials = settings.get(
constants.MATERIALS,
Expand Down
3 changes: 2 additions & 1 deletion utils/exporters/blender/addons/io_three/exporter/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ def dump(filepath, data, options=None):

indent = options.get(constants.INDENT, True)
indent = 4 if indent else None
compact_separators = (',', ':')
logger.info("Dumping to JSON")
func = lambda x, y: _json.json.dump(x, y, indent=indent)
func = lambda x, y: _json.json.dump(x, y, indent=indent, separators=compact_separators)
mode = 'w'

logger.info("Writing to %s", filepath)
Expand Down

0 comments on commit 61c9727

Please sign in to comment.