Blender exporter bugfixes + Gravitium v1
This commit is contained in:
parent
8736d3f4b7
commit
75d718f880
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
AssetSources/Meshes/STM_VolcanicRocks.blend (Stored with Git LFS)
BIN
AssetSources/Meshes/STM_VolcanicRocks.blend (Stored with Git LFS)
Binary file not shown.
BIN
AssetSources/Meshes/STM_VolcanicRocks_01.fbx (Stored with Git LFS)
BIN
AssetSources/Meshes/STM_VolcanicRocks_01.fbx (Stored with Git LFS)
Binary file not shown.
BIN
AssetSources/Meshes/STM_VolcanicRocks_02.fbx (Stored with Git LFS)
BIN
AssetSources/Meshes/STM_VolcanicRocks_02.fbx (Stored with Git LFS)
Binary file not shown.
|
@ -11,7 +11,7 @@ bl_info = \
|
||||||
"blender": (4, 2, 0),
|
"blender": (4, 2, 0),
|
||||||
"location": "View 3D > Object Mode > Unreal Exporter",
|
"location": "View 3D > Object Mode > Unreal Exporter",
|
||||||
"description":
|
"description":
|
||||||
"Bartch exporter for Unreal Engine",
|
"Batch exporter for Unreal Engine",
|
||||||
"warning": "",
|
"warning": "",
|
||||||
"wiki_url": "",
|
"wiki_url": "",
|
||||||
"tracker_url": "",
|
"tracker_url": "",
|
||||||
|
@ -87,28 +87,23 @@ class OBJECT_OT_CombineExport(bpy.types.Operator):
|
||||||
|
|
||||||
def invoke(self, context, event):
|
def invoke(self, context, event):
|
||||||
CombineExport(context.scene.ue_exporter.path)
|
CombineExport(context.scene.ue_exporter.path)
|
||||||
self.report({'INFO'}, 'Exported')
|
self.report({'INFO'}, 'Did nothing (yet)')
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
def SeparateExport(exportFolder):
|
def SeparateExport(exportFolder):
|
||||||
#collection_collision_export = bpy.ops.collection.create("Collision.Export")
|
|
||||||
collection_collision_export = bpy.data.collections.new("Collision.Export")
|
collection_collision_export = bpy.data.collections.new("Collision.Export")
|
||||||
bpy.context.scene.collection.children.link(collection_collision_export)
|
bpy.context.scene.collection.children.link(collection_collision_export)
|
||||||
objects = bpy.data.collections[bpy.context.scene.ue_exporter.source_collection].all_objects
|
objects = bpy.data.collections[bpy.context.scene.ue_exporter.source_collection].all_objects
|
||||||
#for some absurd logic it works only if objects comes from the selection, no time to explain...
|
|
||||||
#for object in objects:
|
|
||||||
# object.select_set(True)
|
|
||||||
#objects = bpy.context.selected_objects
|
|
||||||
bpy.ops.object.select_all(action='DESELECT')
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
for object in list(objects):
|
for object in list(objects):
|
||||||
if object.type not in ['MESH']:
|
if object.type not in ['MESH']:
|
||||||
continue
|
continue
|
||||||
|
if (('UCX_' + object.name) in bpy.data.objects):
|
||||||
collision = bpy.data.objects['UCX_' + object.name]
|
collision = bpy.data.objects['UCX_' + object.name]
|
||||||
export_collision = collision.copy()
|
export_collision = collision.copy()
|
||||||
export_collision.data = collision.data.copy()
|
export_collision.data = collision.data.copy()
|
||||||
export_collision.animation_data_clear()
|
export_collision.animation_data_clear()
|
||||||
bpy.context.collection.objects.link(export_collision)
|
bpy.context.collection.objects.link(export_collision)
|
||||||
#bpy.data.collections['Collision.Export'].objects.link(export_collision)
|
|
||||||
collection_collision_export.objects.link(export_collision)
|
collection_collision_export.objects.link(export_collision)
|
||||||
export_collision.select_set(True)
|
export_collision.select_set(True)
|
||||||
bpy.context.view_layer.objects.active = export_collision
|
bpy.context.view_layer.objects.active = export_collision
|
||||||
|
@ -125,27 +120,8 @@ def SeparateExport(exportFolder):
|
||||||
bpy.data.collections.remove(collection_collision_export)
|
bpy.data.collections.remove(collection_collision_export)
|
||||||
|
|
||||||
def CombineExport(exportFolder):
|
def CombineExport(exportFolder):
|
||||||
objects = bpy.data.collections[bpy.context.scene.ue_exporter.source_collection].all_objects
|
return
|
||||||
#for some absurd logic it works only if objects comes from the selection, no time to explain...
|
#TBD
|
||||||
for object in objects:
|
|
||||||
object.select_set(True)
|
|
||||||
bpy.ops.object.select_all(action='DESELECT')
|
|
||||||
isOrigin = bpy.context.scene.ue_exporter.local_origin
|
|
||||||
origLocs = []
|
|
||||||
|
|
||||||
for object in objects:
|
|
||||||
object.select_set(True)
|
|
||||||
if isOrigin:
|
|
||||||
origLocs.append(object.location.copy())
|
|
||||||
object.location = (0.0,0.0,0.0)
|
|
||||||
object.name = object.name
|
|
||||||
|
|
||||||
exportName = exportFolder + bpy.context.active_object.name + '.fbx'
|
|
||||||
bpy.ops.export_scene.fbx(filepath=exportName, use_selection=True, mesh_smooth_type='FACE')
|
|
||||||
|
|
||||||
for object in objects:
|
|
||||||
if isOrigin:
|
|
||||||
object.location = origLocs.pop(0)
|
|
||||||
|
|
||||||
classes = (
|
classes = (
|
||||||
VIEW3D_PT_PanelExportAll,
|
VIEW3D_PT_PanelExportAll,
|
||||||
|
|
File diff suppressed because one or more lines are too long
BIN
Content/Abilities/Gravity/BP_GravityObject_Component.uasset (Stored with Git LFS)
BIN
Content/Abilities/Gravity/BP_GravityObject_Component.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/Abilities/Gravity/BP_GravityObject_Component_Character.uasset (Stored with Git LFS)
BIN
Content/Abilities/Gravity/BP_GravityObject_Component_Character.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/LevelDesign/LevelElements/Gravitium/BP_Gravitium_Box.uasset (Stored with Git LFS)
Normal file
BIN
Content/LevelDesign/LevelElements/Gravitium/BP_Gravitium_Box.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/LevelDesign/LevelElements/Gravitium/BP_Gravitum_Rock.uasset (Stored with Git LFS)
Normal file
BIN
Content/LevelDesign/LevelElements/Gravitium/BP_Gravitum_Rock.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/LevelDesign/LevelElements/Gravity/BP_GravityField.uasset (Stored with Git LFS)
BIN
Content/LevelDesign/LevelElements/Gravity/BP_GravityField.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/LevelDesign/LevelElements/Gravity/BP_GravityField_Box.uasset (Stored with Git LFS)
BIN
Content/LevelDesign/LevelElements/Gravity/BP_GravityField_Box.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/Maps/Gym/Gym_Environment.umap (Stored with Git LFS)
BIN
Content/Maps/Gym/Gym_Environment.umap (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
Content/Maps/Gym/Gym_Template.umap (Stored with Git LFS)
BIN
Content/Maps/Gym/Gym_Template.umap (Stored with Git LFS)
Binary file not shown.
Loading…
Reference in New Issue