提交 8a8dd0d9 编写于 作者: A alteredq

Changed mesh JS class name generator in Blender exporter to use cross-platform path parsing.

Old version was generating broken class names on Windows (full path was included).
上级 31644e17
......@@ -25,6 +25,7 @@ This script exports the selected object for the three.js engine.
import bpy
import os
import os.path
def save(operator, context, filepath="", use_modifiers=True, use_normals=True, use_uv_coords=True, use_colors=True):
......@@ -39,8 +40,8 @@ def save(operator, context, filepath="", use_modifiers=True, use_normals=True, u
if not filepath.lower().endswith('.js'):
filepath += '.js'
classname = filepath.split('/')[-1].replace('.js','')
classname = os.path.basename(filepath).split(".")[0]
if not obj:
raise Exception("Error, Select 1 active object")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册