Skip to content

Commit 5edbe41

Browse files
committed
0_5_0
1 parent d6af8bc commit 5edbe41

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Blender Unreal Engine Exporter.
1010
- Option to Create Icon (Useful for toolbar items/etc)
1111
- Option to Copy Textures Folder
1212
- Option to override preferences (Useful for a per project setup, see "Overriding Preferences" below)
13-
- Option to create blender_addon_ue_data.json for UE Plugin https://github.com/DigiKrafting/ue_plugin_blender (* ALPHA)
13+
- Option to create a "{fbx_file_name}.bjd" for the UE Plugin https://github.com/DigiKrafting/ue_plugin_blender (* ALPHA)
1414

1515
# Required Blender Version
1616

__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"name": "DKS UE",
2121
"description": "Export to UE",
2222
"author": "DigiKrafting.Studio",
23-
"version": (0, 4, 0),
23+
"version": (0, 5, 0),
2424
"blender": (2, 80, 0),
2525
"location": "Info Toolbar, File -> Export",
2626
"wiki_url": "https://github.com/DigiKrafting/blender_addon_ue/wiki",
@@ -113,7 +113,7 @@ def draw(self, context):
113113
box.prop(self, 'option_copy_textures')
114114
box=layout.box()
115115
box.prop(self, 'option_ue_json')
116-
box.label(text='Creates blender_addon_ue_data.json for UE Plugin.',icon='INFO')
116+
box.label(text='Creates a "{fbx_file_name}.bjd" for the UE Plugin.',icon='INFO')
117117

118118
class dks_ue_menu(bpy.types.Menu):
119119

dks_ue.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def dks_ue_get_file_name():
5252

5353
return bpy.path.basename(bpy.context.blend_data.filepath).replace('.blend','')
5454

55-
def dks_ue_filename(self, context):
55+
def dks_ue_filename():
5656

5757
_object_name = dks_ue_get_file_name()
5858
_export_path = dks_ue_get_export_path()
@@ -89,7 +89,7 @@ def screenshot(self, context):
8989

9090
def dks_ue_fbx_export(self, context):
9191

92-
_export_file = dks_ue_filename(self, context)
92+
_export_file = dks_ue_filename()
9393

9494
bpy.ops.export_scene.fbx(filepath=_export_file, use_selection=False, check_existing=False, axis_forward='Y', axis_up='Z', filter_glob="*.fbx", global_scale=1.0, apply_unit_scale=True, bake_space_transform=False, object_types={'EMPTY','MESH','ARMATURE'}, use_mesh_modifiers=True, mesh_smooth_type='EDGE', use_mesh_edges=False, use_tspace=False, use_custom_props=False, add_leaf_bones=False, primary_bone_axis='Y', secondary_bone_axis='X', use_armature_deform_only=False, bake_anim=True, bake_anim_use_all_bones=True, bake_anim_use_nla_strips=False, bake_anim_use_all_actions=True, bake_anim_force_startend_keying=True, bake_anim_step=1.0, bake_anim_simplify_factor=1.0, embed_textures=False, batch_mode='OFF', use_batch_own_dir=True, use_metadata=True)
9595

@@ -219,6 +219,12 @@ def execute(self, context):
219219

220220
blender_data = {}
221221
blender_data['path']=dks_ue_get_export_sub().replace("\\","/")
222+
blender_data['options'] = {}
223+
224+
blender_data['options']['ImportMaterials']=True;
225+
blender_data['options']['ImportAnimations']=True;
226+
blender_data['options']['CreatePhysicsAsset']=True;
227+
222228
blender_data['materials'] = []
223229

224230
_objects = bpy.context.scene.objects
@@ -264,7 +270,7 @@ def execute(self, context):
264270
blender_data['materials'].append(_material_data)
265271

266272
json_data = json.dumps(blender_data, sort_keys=False, indent=3)
267-
json_data_filename = dks_ue_get_export_path()+'blender_addon_ue_data.json'
273+
json_data_filename = dks_ue_filename().replace(".fbx",".bjd")
268274

269275
with open(json_data_filename, 'w') as f:
270276
json.dump(blender_data, f)

0 commit comments

Comments
 (0)