|
24 | 24 | bl_info = {
|
25 | 25 | "name": "three.js format",
|
26 | 26 | "author": "mrdoob, kikko, alteredq, remoe, pxf",
|
27 |
| - "version": (1, 0, 2), |
| 27 | + "version": (1, 1, 0), |
28 | 28 | "blender": (2, 5, 7),
|
29 | 29 | "api": 35622,
|
30 | 30 | "location": "File > Import-Export",
|
@@ -183,6 +183,10 @@ def save_settings_export(properties):
|
183 | 183 | "option_lights" : properties.option_lights,
|
184 | 184 | "option_cameras" : properties.option_cameras,
|
185 | 185 |
|
| 186 | + "option_animation" : properties.option_animation, |
| 187 | + "option_frame_step" : properties.option_frame_step, |
| 188 | + "option_all_meshes" : properties.option_all_meshes, |
| 189 | + |
186 | 190 | "option_flip_yz" : properties.option_flip_yz,
|
187 | 191 |
|
188 | 192 | "option_materials" : properties.option_materials,
|
@@ -235,6 +239,10 @@ def restore_settings_export(properties):
|
235 | 239 | properties.option_lights = settings.get("option_lights", False)
|
236 | 240 | properties.option_cameras = settings.get("option_cameras", False)
|
237 | 241 |
|
| 242 | + properties.option_animation = settings.get("option_animation", False) |
| 243 | + properties.option_frame_step = settings.get("option_frame_step", 1) |
| 244 | + properties.option_all_meshes = settings.get("option_all_meshes", True) |
| 245 | + |
238 | 246 | # ################################################################
|
239 | 247 | # Exporter
|
240 | 248 | # ################################################################
|
@@ -268,13 +276,17 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
|
268 | 276 | option_flip_yz = BoolProperty(name = "Flip YZ", description = "Flip YZ", default = True)
|
269 | 277 |
|
270 | 278 | option_export_scene = BoolProperty(name = "Scene", description = "Export scene", default = False)
|
271 |
| - option_embed_meshes = BoolProperty(name = "Embed", description = "Embed meshes", default = True) |
| 279 | + option_embed_meshes = BoolProperty(name = "Embed meshes", description = "Embed meshes", default = True) |
272 | 280 | option_copy_textures = BoolProperty(name = "Copy textures", description = "Copy textures", default = False)
|
273 | 281 | option_url_base_html = BoolProperty(name = "HTML as url base", description = "Use HTML as url base ", default = False)
|
274 | 282 |
|
275 | 283 | option_lights = BoolProperty(name = "Lights", description = "Export default scene lights", default = False)
|
276 | 284 | option_cameras = BoolProperty(name = "Cameras", description = "Export default scene cameras", default = False)
|
277 | 285 |
|
| 286 | + option_animation = BoolProperty(name = "Animation", description = "Export animation (morphs)", default = False) |
| 287 | + option_frame_step = IntProperty(name = "Frame step", description = "Animation frame step", min = 1, max = 1000, soft_min = 1, soft_max = 1000, default = 1) |
| 288 | + option_all_meshes = BoolProperty(name = "All meshes", description = "All meshes (merged)", default = True) |
| 289 | + |
278 | 290 | def invoke(self, context, event):
|
279 | 291 | restore_settings_export(self.properties)
|
280 | 292 | return ExportHelper.invoke(self, context, event)
|
@@ -346,17 +358,36 @@ def draw(self, context):
|
346 | 358 | layout.separator()
|
347 | 359 |
|
348 | 360 | row = layout.row()
|
349 |
| - row.label(text="Beta:") |
| 361 | + row.label(text="--------- Experimental ---------") |
| 362 | + layout.separator() |
| 363 | + |
| 364 | + row = layout.row() |
| 365 | + row.label(text="Scene:") |
350 | 366 |
|
351 | 367 | row = layout.row()
|
352 | 368 | row.prop(self.properties, "option_export_scene")
|
| 369 | + row.prop(self.properties, "option_embed_meshes") |
353 | 370 |
|
354 | 371 | row = layout.row()
|
355 | 372 | row.prop(self.properties, "option_lights")
|
356 | 373 | row.prop(self.properties, "option_cameras")
|
| 374 | + layout.separator() |
| 375 | + |
| 376 | + row = layout.row() |
| 377 | + row.label(text="Animation:") |
| 378 | + |
| 379 | + row = layout.row() |
| 380 | + row.prop(self.properties, "option_animation") |
| 381 | + row.prop(self.properties, "option_frame_step") |
| 382 | + layout.separator() |
| 383 | + |
| 384 | + row = layout.row() |
| 385 | + row.label(text="Settings:") |
| 386 | + |
| 387 | + row = layout.row() |
| 388 | + row.prop(self.properties, "option_all_meshes") |
357 | 389 |
|
358 | 390 | row = layout.row()
|
359 |
| - row.prop(self.properties, "option_embed_meshes") |
360 | 391 | row.prop(self.properties, "option_copy_textures")
|
361 | 392 |
|
362 | 393 | row = layout.row()
|
|
0 commit comments