20
20
# Init
21
21
# ################################################################
22
22
23
- # To support reload properly, try to access a package var,
24
- # if it's there, reload everything
25
23
26
24
bl_info = {
27
25
"name" : "three.js format" ,
28
- "author" : "mrdoob, kikko, alteredq, remoe" ,
29
- "version" : (1 , 0 ),
26
+ "author" : "mrdoob, kikko, alteredq, remoe, pxf " ,
27
+ "version" : (1 , 0 , 2 ),
30
28
"blender" : (2 , 5 , 7 ),
31
29
"api" : 35622 ,
32
30
"location" : "File > Import-Export" ,
36
34
"tracker_url" : "https://github.com/mrdoob/three.js/issues" ,
37
35
"category" : "Import-Export" }
38
36
37
+ # To support reload properly, try to access a package var,
38
+ # if it's there, reload everything
39
+
40
+ import bpy
41
+
39
42
if "bpy" in locals ():
40
43
import imp
41
44
if "export_threejs" in locals ():
42
45
imp .reload (export_threejs )
43
46
if "import_threejs" in locals ():
44
47
imp .reload (import_threejs )
45
48
46
- import bpy
47
49
from bpy .props import *
48
50
from bpy_extras .io_utils import ExportHelper , ImportHelper
49
51
@@ -175,7 +177,9 @@ def save_settings_export(properties):
175
177
settings = {
176
178
"option_export_scene" : properties .option_export_scene ,
177
179
"option_embed_meshes" : properties .option_embed_meshes ,
178
-
180
+ "option_url_base_html" : properties .option_url_base_html ,
181
+ "option_copy_textures" : properties .option_copy_textures ,
182
+
179
183
"option_lights" : properties .option_lights ,
180
184
"option_cameras" : properties .option_cameras ,
181
185
@@ -225,6 +229,8 @@ def restore_settings_export(properties):
225
229
226
230
properties .option_export_scene = settings .get ("option_export_scene" , False )
227
231
properties .option_embed_meshes = settings .get ("option_embed_meshes" , True )
232
+ properties .option_url_base_html = settings .get ("option_url_base_html" , False )
233
+ properties .option_copy_textures = settings .get ("option_copy_textures" , False )
228
234
229
235
properties .option_lights = settings .get ("option_lights" , False )
230
236
properties .option_cameras = settings .get ("option_cameras" , False )
@@ -263,7 +269,9 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
263
269
264
270
option_export_scene = BoolProperty (name = "Scene" , description = "Export scene" , default = False )
265
271
option_embed_meshes = BoolProperty (name = "Embed" , description = "Embed meshes" , default = True )
266
-
272
+ option_copy_textures = BoolProperty (name = "Copy textures" , description = "Copy textures" , default = False )
273
+ option_url_base_html = BoolProperty (name = "HTML as url base" , description = "Use HTML as url base " , default = False )
274
+
267
275
option_lights = BoolProperty (name = "Lights" , description = "Export default scene lights" , default = False )
268
276
option_cameras = BoolProperty (name = "Cameras" , description = "Export default scene cameras" , default = False )
269
277
@@ -284,6 +292,7 @@ def execute(self, context):
284
292
save_settings_export (self .properties )
285
293
286
294
filepath = self .filepath
295
+
287
296
import io_mesh_threejs .export_threejs
288
297
return io_mesh_threejs .export_threejs .save (self , context , ** self .properties )
289
298
@@ -341,11 +350,18 @@ def draw(self, context):
341
350
342
351
row = layout .row ()
343
352
row .prop (self .properties , "option_export_scene" )
353
+
354
+ row = layout .row ()
344
355
row .prop (self .properties , "option_lights" )
345
356
row .prop (self .properties , "option_cameras" )
346
357
347
358
row = layout .row ()
348
359
row .prop (self .properties , "option_embed_meshes" )
360
+ row .prop (self .properties , "option_copy_textures" )
361
+
362
+ row = layout .row ()
363
+ row .prop (self .properties , "option_url_base_html" )
364
+
349
365
layout .separator ()
350
366
351
367
0 commit comments