Skip to content

Commit

Permalink
Merge branch 'Dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier150 committed Feb 2, 2023
2 parents edf98e8 + 5e00044 commit dfcb158
Show file tree
Hide file tree
Showing 45 changed files with 3,967 additions and 949 deletions.
31 changes: 31 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
blender-for-unrealengine.zip
**.blend1
**.blend2
**.blend3
**.blend4
**.blend5
**.blend6
**.blend7
**.blend8
**.blend9
**.blend10
**.blend11
**.blend12
**.blend13
**.blend14
**.blend15
**.blend16
**.blend17
**.blend18
**.blend19
**.blend20
**.blend21
**.blend22
**.blend23
**.blend24
**.blend25
**.blend26
**.blend27
**.blend28
**.blend29
**.blend30
**.blend31
**.blend32
.vscode/
ExportedFbx/
23 changes: 23 additions & 0 deletions Release log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -420,3 +420,26 @@ It is now possible to force the duration of an animation according to the scene
- Fixed: NLA export ignore animated influence on actions.
- Fixed: Import script doesn't work with Unreal Engine 5.
- Fixed: Export doesn't work with animation from Proxy Since Blender 3.2.2

== Rev 0.4.0 ==

- UI updated
- Full addon refactoring.
- New: Ability to specify skeleton asset for SkeletalMesh (Thanks Salireths!)
- New: Ability to specify which module (plugin) to import to (Thanks Salireths!)
- New: SkeletalMesh now support Armature from constraint.
- New Support for Export UV From Geometry Node.
- Fix axis flippings on camera animation can be disabled.
- Correct Extrem UV Scale option moved from addon pref to object settings.
- Add support NearClippingPlane in camera export.
- Fixed: Vertex Colors refactored into generic Color Attributes and not supported by the addon.
- Fixed: Vertex color would always be replaced. (Thanks ScrapIO!)
- Fixed: Mesh LODs would not have their vertex color information imported. (Thanks ScrapIO!)
- Fixed: Skeleton detection use the wrong prefix.
- Fixed: Copy Cine Cameras return Regular Cameras.
- Fixed: Crashes when pasting via the "Copy Regular Cameras"
- Fixed: Convert to collision work only if parent is a Mesh.
- Fixed: StaticSocketsAdd90X option break non uniform scale sockets.
- Fixed: Collection staic mesh don't use Sub Folder Name.
- Fixed: Sockets transform are not apply on Collection staic mesh.
- Fixed: Some collections keep hidden during export and exported file is wrong.
111 changes: 61 additions & 50 deletions blender-for-unrealengine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,66 +30,60 @@
[email protected]
'''

import os
import bpy
import fnmatch
import time
import addon_utils

from . import bps
from . import bbpl

from . import bfu_ui_utils
from . import bfu_addon_pref
from . import bfu_export_logs
from . import bfu_ui
from . import bfu_check_potential_error
from .export import bfu_export_asset
from . import bfu_write_text
from . import bfu_basics
from . import bfu_utils

if "bpy" in locals():
import importlib
if "bfu_addon_pref" in locals():
importlib.reload(bfu_addon_pref)
if "bfu_ui" in locals():
importlib.reload(bfu_ui)
if "bfu_export_asset" in locals():
importlib.reload(bfu_export_asset)
if "bfu_write_text" in locals():
importlib.reload(bfu_write_text)
if "bfu_basics" in locals():
importlib.reload(bfu_basics)
if "bfu_utils" in locals():
importlib.reload(bfu_utils)
import importlib
if "bps" in locals():
importlib.reload(bps)
if "bbpl" in locals():
importlib.reload(bbpl)
if "bfu_ui_utils" in locals():
importlib.reload(bfu_ui_utils)
if "bfu_addon_pref" in locals():
importlib.reload(bfu_addon_pref)
if "bfu_export_logs" in locals():
importlib.reload(bfu_export_logs)
if "bfu_ui" in locals():
importlib.reload(bfu_ui)
if "bfu_check_potential_error" in locals():
importlib.reload(bfu_check_potential_error)
if "bfu_export_asset" in locals():
importlib.reload(bfu_export_asset)
if "bfu_write_text" in locals():
importlib.reload(bfu_write_text)
if "bfu_basics" in locals():
importlib.reload(bfu_basics)
if "bfu_utils" in locals():
importlib.reload(bfu_utils)

bl_info = {
'name': 'Blender for UnrealEngine',
'description': "This add-ons allows to easily export several "
"objects at the same time for use in unreal engine 4.",
'author': 'Loux Xavier (BleuRaven)',
'version': (0, 3, 1),
'version': (0, 4, 0),
'blender': (2, 80, 0),
'location': 'View3D > UI > Unreal Engine 4',
'location': 'View3D > UI > Unreal Engine',
'description': "This add-ons allows to easily export several "
"objects at the same time for use in unreal engine 4.",
'warning': '',
"wiki_url": "https://github.com/xavier150/Blender-For-UnrealEngine-Addons/wiki",
'tracker_url': 'https://github.com/xavier150/Blender-For-UnrealEngine-Addons/issues',
'support': 'COMMUNITY',
'category': 'Import-Export'}


class BFU_OT_UnrealPotentialError(bpy.types.PropertyGroup):
type: bpy.props.IntProperty(default=0) # 0:Info, 1:Warning, 2:Error
object: bpy.props.PointerProperty(type=bpy.types.Object)
###
selectObjectButton: bpy.props.BoolProperty(default=True)
selectVertexButton: bpy.props.BoolProperty(default=False)
selectPoseBoneButton: bpy.props.BoolProperty(default=False)
###
selectOption: bpy.props.StringProperty(default="None") # 0:VertexWithZeroWeight
itemName: bpy.props.StringProperty(default="None")
text: bpy.props.StringProperty(default="Unknown")
correctRef: bpy.props.StringProperty(default="None")
correctlabel: bpy.props.StringProperty(default="Fix it !")
correctDesc: bpy.props.StringProperty(default="Correct target error")
docsOcticon: bpy.props.StringProperty(default="None")


class BFU_CachedAction(bpy.types.PropertyGroup):
name: bpy.props.StringProperty()

Expand All @@ -115,6 +109,7 @@ def register():
bpy.types.Scene.bfu_object_material_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_object_vertex_color_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_object_light_map_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_object_uv_map_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_anim_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_anim_advanced_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_skeleton_properties_expanded = bpy.props.BoolProperty()
Expand All @@ -129,21 +124,37 @@ def register():
bpy.types.Scene.bfu_export_process_properties_expanded = bpy.props.BoolProperty()
bpy.types.Scene.bfu_script_tool_expanded = bpy.props.BoolProperty()

bpy.types.Scene.bfu_active_object_tab = bpy.props.EnumProperty(
bpy.types.Scene.bfu_active_tab = bpy.props.EnumProperty(
items=(
('PROP', 'Object', 'Object Tab'),
('ANIM', 'Animations', 'Animations Tab'),
('SCENE', 'Scene', 'Scene anf global Tab')
))
('OBJECT', 'Object', 'Object tab.'),
('SCENE', 'Scene', 'Scene and world tab.')
)
)

bpy.utils.register_class(BFU_OT_UnrealPotentialError)
bpy.types.Scene.potentialErrorList = bpy.props.CollectionProperty(type=BFU_OT_UnrealPotentialError)
bpy.types.Scene.bfu_active_object_tab = bpy.props.EnumProperty(
items=(
('GENERAL', 'General', 'General object tab.'),
('ANIM', 'Animations', 'Animations tab.'),
('MISC', 'Misc', 'Misc tab.'),
('ALL', 'All', 'All tabs.')
)
)

bpy.types.Scene.bfu_active_scene_tab = bpy.props.EnumProperty(
items=(
('GENERAL', 'Scene', 'General scene tab'),
('ALL', 'All', 'All tabs.')
)
)

for cls in classes:
register_class(cls)

bfu_ui_utils.register()
bfu_addon_pref.register()
bfu_export_logs.register()
bfu_ui.register()
bfu_check_potential_error.register()


def unregister():
Expand All @@ -169,11 +180,11 @@ def unregister():

del bpy.types.Scene.bfu_active_object_tab

bpy.utils.unregister_class(BFU_OT_UnrealPotentialError)
del bpy.types.Scene.potentialErrorList

for cls in classes:
for cls in reversed(classes):
unregister_class(cls)

bfu_ui_utils.unregister()
bfu_addon_pref.unregister()
bfu_export_logs.unregister()
bfu_ui.unregister()
bfu_check_potential_error.unregister()
46 changes: 46 additions & 0 deletions blender-for-unrealengine/bbpl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ====================== BEGIN GPL LICENSE BLOCK ============================
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# All rights reserved.
#
# ======================= END GPL LICENSE BLOCK =============================

# ----------------------------------------------
# BBPL -> BleuRaven Blender Python Library
# xavierloux.com
# ----------------------------------------------

from . import basics
from . import utils
from . import rig_utils
from . import rig_bone_visual
from . import skin_utils
from . import anim_utils
from . import ui_utils

import importlib
if "basics" in locals():
importlib.reload(basics)
if "utils" in locals():
importlib.reload(utils)
if "rig_utils" in locals():
importlib.reload(rig_utils)
if "rig_bone_visual" in locals():
importlib.reload(rig_bone_visual)
if "skin_utils" in locals():
importlib.reload(skin_utils)
if "anim_utils" in locals():
importlib.reload(anim_utils)
if "ui_utils" in locals():
importlib.reload(ui_utils)
Loading

0 comments on commit dfcb158

Please sign in to comment.