Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 41d0f66

Browse files
committed
Included changes from branch by @crobi, which correctly exported the rotation for bones. His old branch was made before the newest exporter which supported multiple animations. This exporter merges the two branches together.
1 parent f507261 commit 41d0f66

File tree

3 files changed

+236
-90
lines changed

3 files changed

+236
-90
lines changed

utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/__init__.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"name": "three.js format",
2626
"author": "mrdoob, kikko, alteredq, remoe, pxf, n3tfr34k",
2727
"version": (1, 4, 0),
28-
"blender": (2, 65, 0),
28+
"blender": (2, 6, 6),
29+
"api": 35622,
2930
"location": "File > Import-Export",
3031
"description": "Import-Export three.js meshes",
3132
"warning": "",
@@ -201,6 +202,7 @@ def save_settings_export(properties):
201202

202203
"option_animation_morph" : properties.option_animation_morph,
203204
"option_animation_skeletal" : properties.option_animation_skeletal,
205+
"option_frame_index_as_time" : properties.option_frame_index_as_time,
204206

205207
"option_frame_step" : properties.option_frame_step,
206208
"option_all_meshes" : properties.option_all_meshes,
@@ -220,7 +222,7 @@ def save_settings_export(properties):
220222
"option_vertices_truncate" : properties.option_vertices_truncate,
221223
"option_scale" : properties.option_scale,
222224

223-
"align_model" : properties.align_model
225+
"align_model" : properties.align_model,
224226
}
225227

226228
fname = get_settings_fullpath()
@@ -263,6 +265,7 @@ def restore_settings_export(properties):
263265

264266
properties.option_animation_morph = settings.get("option_animation_morph", False)
265267
properties.option_animation_skeletal = settings.get("option_animation_skeletal", False)
268+
properties.option_frame_index_as_time = settings.get("option_frame_index_as_time", False)
266269

267270
properties.option_frame_step = settings.get("option_frame_step", 1)
268271
properties.option_all_meshes = settings.get("option_all_meshes", True)
@@ -311,6 +314,7 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
311314

312315
option_animation_morph = BoolProperty(name = "Morph animation", description = "Export animation (morphs)", default = False)
313316
option_animation_skeletal = BoolProperty(name = "Skeletal animation", description = "Export animation (skeletal)", default = False)
317+
option_frame_index_as_time = BoolProperty(name = "Frame index as time", description = "Use (original) frame index as frame time", default = False)
314318

315319
option_frame_step = IntProperty(name = "Frame step", description = "Animation frame step", min = 1, max = 1000, soft_min = 1, soft_max = 1000, default = 1)
316320
option_all_meshes = BoolProperty(name = "All meshes", description = "All meshes (merged)", default = True)
@@ -321,7 +325,7 @@ def invoke(self, context, event):
321325

322326
@classmethod
323327
def poll(cls, context):
324-
return context.active_object is not None
328+
return context.active_object != None
325329

326330
def execute(self, context):
327331
print("Selected: " + context.active_object.name)
@@ -410,6 +414,8 @@ def draw(self, context):
410414
row = layout.row()
411415
row.prop(self.properties, "option_animation_skeletal")
412416
row = layout.row()
417+
row.prop(self.properties, "option_frame_index_as_time")
418+
row = layout.row()
413419
row.prop(self.properties, "option_frame_step")
414420
layout.separator()
415421

@@ -450,4 +456,4 @@ def unregister():
450456
bpy.types.INFO_MT_file_import.remove(menu_func_import)
451457

452458
if __name__ == "__main__":
453-
register()
459+
register()

0 commit comments

Comments
 (0)