Download

Can you spawn Box brush in the editor script?

I can’t seem to find it. If anyone here knows how I might spawn one using editor scripting I’d appreciate it!.
Thanks

Think you will have to make a function in cpp that you expose to blueprints for that. Otherwise take a look at unreal.Brush, unreal.BrushBuilder and unreal.BrushComponent, then see if you can’t set it for unreal.Volume ( using python names but you should find in blueprint also )

Thank you. I will have a look for those but I’ve never delved into cpp so wouldn’t really know where to start for that one. Guessed I was just looking for the wrong node or something

the same thing ( spawn brush, but can’t change its shape

brush = unreal.Brush()
brush_location = unreal.Vector(0, 0, 0)
brush_rotation = unreal.Rotator(0, 0 ,0)
unreal.EditorLevelLibrary.spawn_actor_from_object(brush, brush_location, brush_rotation)

in the unreal.Brush, unreal.BrushShape and unreal.BrushComponent there are no shape property or method, but exists BrushBuilder
and this BrushBuilder has “get_editor_property”, but not “set_editor_property”
#LogPython: Error: Exception: Brush: Property ‘BrushBuilder’ for attribute ‘brush_builder’ on ‘Brush’ is read-only and cannot be set

maybe someone knows how to change brush shape using python?