|
@@ -39,8 +39,8 @@ logging.basicConfig(
|
|
bl_info = {
|
|
bl_info = {
|
|
'name': "Three.js Format",
|
|
'name': "Three.js Format",
|
|
'author': "repsac, mrdoob, yomotsu, mpk, jpweeks, rkusa, tschw",
|
|
'author': "repsac, mrdoob, yomotsu, mpk, jpweeks, rkusa, tschw",
|
|
- 'version': (1, 4, 0),
|
|
|
|
- 'blender': (2, 73, 0),
|
|
|
|
|
|
+ 'version': (1, 5, 0),
|
|
|
|
+ 'blender': (2, 74, 0),
|
|
'location': "File > Export",
|
|
'location': "File > Export",
|
|
'description': "Export Three.js formatted JSON files.",
|
|
'description': "Export Three.js formatted JSON files.",
|
|
'warning': "Importer not included.",
|
|
'warning': "Importer not included.",
|
|
@@ -322,7 +322,7 @@ def restore_export_settings(properties, settings):
|
|
constants.INDEX_TYPE,
|
|
constants.INDEX_TYPE,
|
|
constants.EXPORT_OPTIONS[constants.INDEX_TYPE])
|
|
constants.EXPORT_OPTIONS[constants.INDEX_TYPE])
|
|
## }
|
|
## }
|
|
-
|
|
|
|
|
|
+
|
|
## Materials {
|
|
## Materials {
|
|
properties.option_materials = settings.get(
|
|
properties.option_materials = settings.get(
|
|
constants.MATERIALS,
|
|
constants.MATERIALS,
|
|
@@ -414,10 +414,18 @@ def restore_export_settings(properties, settings):
|
|
constants.MORPH_TARGETS,
|
|
constants.MORPH_TARGETS,
|
|
constants.EXPORT_OPTIONS[constants.MORPH_TARGETS])
|
|
constants.EXPORT_OPTIONS[constants.MORPH_TARGETS])
|
|
|
|
|
|
|
|
+ properties.option_blend_shape = settings.get(
|
|
|
|
+ constants.BLEND_SHAPES,
|
|
|
|
+ constants.EXPORT_OPTIONS[constants.BLEND_SHAPES])
|
|
|
|
+
|
|
properties.option_animation_skeletal = settings.get(
|
|
properties.option_animation_skeletal = settings.get(
|
|
constants.ANIMATION,
|
|
constants.ANIMATION,
|
|
constants.EXPORT_OPTIONS[constants.ANIMATION])
|
|
constants.EXPORT_OPTIONS[constants.ANIMATION])
|
|
|
|
|
|
|
|
+ properties.option_keyframes = settings.get(
|
|
|
|
+ constants.KEYFRAMES,
|
|
|
|
+ constants.EXPORT_OPTIONS[constants.KEYFRAMES])
|
|
|
|
+
|
|
properties.option_frame_step = settings.get(
|
|
properties.option_frame_step = settings.get(
|
|
constants.FRAME_STEP,
|
|
constants.FRAME_STEP,
|
|
constants.EXPORT_OPTIONS[constants.FRAME_STEP])
|
|
constants.EXPORT_OPTIONS[constants.FRAME_STEP])
|
|
@@ -470,7 +478,9 @@ def set_settings(properties):
|
|
constants.HIERARCHY: properties.option_hierarchy,
|
|
constants.HIERARCHY: properties.option_hierarchy,
|
|
|
|
|
|
constants.MORPH_TARGETS: properties.option_animation_morph,
|
|
constants.MORPH_TARGETS: properties.option_animation_morph,
|
|
|
|
+ constants.BLEND_SHAPES: properties.option_blend_shape,
|
|
constants.ANIMATION: properties.option_animation_skeletal,
|
|
constants.ANIMATION: properties.option_animation_skeletal,
|
|
|
|
+ constants.KEYFRAMES: properties.option_keyframes,
|
|
constants.FRAME_STEP: properties.option_frame_step,
|
|
constants.FRAME_STEP: properties.option_frame_step,
|
|
constants.FRAME_INDEX_AS_TIME: properties.option_frame_index_as_time,
|
|
constants.FRAME_INDEX_AS_TIME: properties.option_frame_index_as_time,
|
|
constants.INFLUENCES_PER_VERTEX: properties.option_influences
|
|
constants.INFLUENCES_PER_VERTEX: properties.option_influences
|
|
@@ -684,12 +694,22 @@ class ExportThree(bpy.types.Operator, ExportHelper):
|
|
description="Export animation (morphs)",
|
|
description="Export animation (morphs)",
|
|
default=constants.EXPORT_OPTIONS[constants.MORPH_TARGETS])
|
|
default=constants.EXPORT_OPTIONS[constants.MORPH_TARGETS])
|
|
|
|
|
|
|
|
+ option_blend_shape = BoolProperty(
|
|
|
|
+ name="Blend Shape animation",
|
|
|
|
+ description="Export Blend Shapes",
|
|
|
|
+ default=constants.EXPORT_OPTIONS[constants.BLEND_SHAPES])
|
|
|
|
+
|
|
option_animation_skeletal = EnumProperty(
|
|
option_animation_skeletal = EnumProperty(
|
|
name="",
|
|
name="",
|
|
description="Export animation (skeletal)",
|
|
description="Export animation (skeletal)",
|
|
items=animation_options(),
|
|
items=animation_options(),
|
|
default=constants.OFF)
|
|
default=constants.OFF)
|
|
|
|
|
|
|
|
+ option_keyframes = BoolProperty(
|
|
|
|
+ name="Keyframe animation",
|
|
|
|
+ description="Export animation (keyframes)",
|
|
|
|
+ default=constants.EXPORT_OPTIONS[constants.KEYFRAMES])
|
|
|
|
+
|
|
option_frame_index_as_time = BoolProperty(
|
|
option_frame_index_as_time = BoolProperty(
|
|
name="Frame index as time",
|
|
name="Frame index as time",
|
|
description="Use (original) frame index as frame time",
|
|
description="Use (original) frame index as frame time",
|
|
@@ -804,6 +824,7 @@ class ExportThree(bpy.types.Operator, ExportHelper):
|
|
|
|
|
|
row = layout.row()
|
|
row = layout.row()
|
|
row.prop(self.properties, 'option_index_type')
|
|
row.prop(self.properties, 'option_index_type')
|
|
|
|
+
|
|
## }
|
|
## }
|
|
|
|
|
|
layout.separator()
|
|
layout.separator()
|
|
@@ -831,12 +852,21 @@ class ExportThree(bpy.types.Operator, ExportHelper):
|
|
row = layout.row()
|
|
row = layout.row()
|
|
row.prop(self.properties, 'option_animation_morph')
|
|
row.prop(self.properties, 'option_animation_morph')
|
|
|
|
|
|
|
|
+ row = layout.row()
|
|
|
|
+ row.prop(self.properties, 'option_blend_shape')
|
|
|
|
+
|
|
row = layout.row()
|
|
row = layout.row()
|
|
row.label(text="Skeletal animations:")
|
|
row.label(text="Skeletal animations:")
|
|
|
|
|
|
row = layout.row()
|
|
row = layout.row()
|
|
row.prop(self.properties, 'option_animation_skeletal')
|
|
row.prop(self.properties, 'option_animation_skeletal')
|
|
|
|
|
|
|
|
+ row = layout.row()
|
|
|
|
+ row.label(text="Keyframe animations:")
|
|
|
|
+
|
|
|
|
+ row = layout.row()
|
|
|
|
+ row.prop(self.properties, 'option_keyframes')
|
|
|
|
+
|
|
layout.row()
|
|
layout.row()
|
|
row = layout.row()
|
|
row = layout.row()
|
|
row.prop(self.properties, 'option_influences')
|
|
row.prop(self.properties, 'option_influences')
|