Skip to content

Blender add-on for auto mesh separation and copying objects to UE as blueprints

Notifications You must be signed in to change notification settings

joric/paste_to_ue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 

Repository files navigation

Paste to UE

Blender plugin to copy objects position (and transformations) from Blender to Unreal Engine as blueprints

Installation

Download the latest release from the releases section, install it as blender plugin.

Usage

All actions are available from the tool panel (press N, select "Paste to UE" tab).

Auto Mesh Separation

Experimental function, splits mesh into templates and instances with a single button. Depends on a Blender's built-in function "split by loose parts" that changes topology so it may be unreliable (e.g. rotation may be off). "Match Templates" is usually more accurate.

Match Templates

Prepare templates, select all related objects (the largest will be cloud, the rest will be the templates), press "Create Instances" from the tool panel (or press Ctrl+Shift+D). It will find and create template instances with matching scaling/rotation.

Object matching algorithm currently uses weighted distance between the points. Adjust delta to large value if objects don't match the templates (e.g. set to 1). If it doesn't fix it, try separating the large mesh into smaller meshes by template type and match single templates.

Video

Copy Transforms

Select objects, press Ctrl+Shift+C to copy objects data. You also can click "Copy to Clipboard" in the tool panel. Clipboard Format:

eli,eal=unreal.EditorLevelLibrary,unreal.EditorAssetLibrary
load=lambda bp:eal.load_blueprint_class(eal.load_asset(bp).get_outer().get_full_name())
add=lambda bp,v,r:eli.spawn_actor_from_class(load(bp),unreal.Vector(*v),unreal.Rotator(*r))
add("/Game/Items/BP_Item",(1,1,1),(2,2,2))
add("/Game/Items/BP_Coin",(1,1,1),(2,2,2)).set_actor_scale3d(unreal.Vector{3,3,3}) # optional
# ...

Paste clipboard to the UE5 "Python" window (not REPL), it allows multiline text. You can also specify blueprint and scale in the toolbar (use with caution, scale is taken from the scene). You can also apply scale for all selected objects in UE without moving them by changing scale value in properties.

References

About

Blender add-on for auto mesh separation and copying objects to UE as blueprints

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages