提交 ed92022b 编写于 作者: A alteredq

Updated Blender 2.58 exporter with recent changes from 2.57 exporter.

(normal maps, textures packed in blend file, copy textures, urlBaseType, texture params)

Also fixed broken reload handling and bumped up version number.
上级 70a6000d
......@@ -20,13 +20,11 @@
# Init
# ################################################################
# To support reload properly, try to access a package var,
# if it's there, reload everything
bl_info = {
"name": "three.js format",
"author": "mrdoob, kikko, alteredq, remoe",
"version": (1, 0),
"author": "mrdoob, kikko, alteredq, remoe, pxf",
"version": (1, 0, 2),
"blender": (2, 5, 7),
"api": 35622,
"location": "File > Import-Export",
......@@ -36,6 +34,11 @@ bl_info = {
"tracker_url": "https://github.com/mrdoob/three.js/issues",
"category": "Import-Export"}
# To support reload properly, try to access a package var,
# if it's there, reload everything
import bpy
if "bpy" in locals():
import imp
if "export_threejs" in locals():
......@@ -43,7 +46,6 @@ if "bpy" in locals():
if "import_threejs" in locals():
imp.reload(import_threejs)
import bpy
from bpy.props import *
from bpy_extras.io_utils import ExportHelper, ImportHelper
......@@ -175,7 +177,9 @@ def save_settings_export(properties):
settings = {
"option_export_scene" : properties.option_export_scene,
"option_embed_meshes" : properties.option_embed_meshes,
"option_url_base_html" : properties.option_url_base_html,
"option_copy_textures" : properties.option_copy_textures,
"option_lights" : properties.option_lights,
"option_cameras" : properties.option_cameras,
......@@ -225,6 +229,8 @@ def restore_settings_export(properties):
properties.option_export_scene = settings.get("option_export_scene", False)
properties.option_embed_meshes = settings.get("option_embed_meshes", True)
properties.option_url_base_html = settings.get("option_url_base_html", False)
properties.option_copy_textures = settings.get("option_copy_textures", False)
properties.option_lights = settings.get("option_lights", False)
properties.option_cameras = settings.get("option_cameras", False)
......@@ -263,7 +269,9 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
option_export_scene = BoolProperty(name = "Scene", description = "Export scene", default = False)
option_embed_meshes = BoolProperty(name = "Embed", description = "Embed meshes", default = True)
option_copy_textures = BoolProperty(name = "Copy textures", description = "Copy textures", default = False)
option_url_base_html = BoolProperty(name = "HTML as url base", description = "Use HTML as url base ", default = False)
option_lights = BoolProperty(name = "Lights", description = "Export default scene lights", default = False)
option_cameras = BoolProperty(name = "Cameras", description = "Export default scene cameras", default = False)
......@@ -284,6 +292,7 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
save_settings_export(self.properties)
filepath = self.filepath
import io_mesh_threejs.export_threejs
return io_mesh_threejs.export_threejs.save(self, context, **self.properties)
......@@ -341,11 +350,18 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
row = layout.row()
row.prop(self.properties, "option_export_scene")
row = layout.row()
row.prop(self.properties, "option_lights")
row.prop(self.properties, "option_cameras")
row = layout.row()
row.prop(self.properties, "option_embed_meshes")
row.prop(self.properties, "option_copy_textures")
row = layout.row()
row.prop(self.properties, "option_url_base_html")
layout.separator()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册