unreal has no attribute StaticMeshEditorSubsystem

Hi everyone!
This is my first post. Very happy to have joined the community…

I’m trying to do some batch asset conversion with the command-line (commandlet)
I’m doing some actors merging where, at some point, i am calling:

> unreal.StaticMeshEditorSubsystem.merge_static_mesh_actors(<actors>, <merge_options>)

to perform the merge

This works fine with the UI, but not but with the command-line!

i get the error that: module ‘unreal’ has no attribute ‘StaticMeshEditorSubsystem’, which it does with the UI…

It’s the same python version.
Is there a plug-in I have to enable for my project? But it’s the same project that i created with the UI and that I am now opening with the command-line. So if it had the module in the first place, it should still have it.

Or is actor merging not availiable in cmd-line. But… everything else is ( so far…) :wink:

Thanks a lot for your help

1 Like

Try unreal.EditorLevelLibrary. merge_static_mesh_actors()

I tried. But it threw a warning that the function was deprecated and didn’t seem to do it

DeprecationWarning: EditorLevelLibrary: Function 'merge_static_mesh_actors' on 'EditorLevelLibrary' is deprecated: The Editor Scripting Utilities Plugin is deprecated - Use the function in Static Mesh Editor Subsystem

What unreal version are you using?

What is the command line you are running?

I am using 5.3.2

the command is :
UnrealEditor-Cmd.exe “myproject.uproject” -run=pythonscript -script=“myscript.py”
(commandlet, no UI)

Does it work if you don’t use the commandlet way, as in

unrealeditor-cmd.exe "myproject.uproject" -ExecutePythonScript="myscript.py"

Yes it works .
My bad, i didn’t explain correctly, in the above, i was always in command line: non-graphical=commandlet, UI = no commandlet

----> Hence my initial question. If the module becomes missing, does it mean that it is not available in commandlet? Did i forget to add a plug-in ?

It’s unclear to me what part of the API is available in commandlet vs full UI. I was able to do everything that i wanted so far with the commandlet ( loading asset, spawning actors)!

1 Like

I’ve tried to export unreal modules in cmd mode and ui mode
and this is the difference:

Interesting find !
The question is : why is there this difference?
I don’t think it has to do with the choice of plugins loaded cos that’s the same in graphical and non- graphical. Maybe it’s because it’s using graphical functionalities

Yes you are right, it turns out that the missing modules have #IF WITH_EDITOR in their functions.

Hello,
in unreal 5.3.2 on the “DataPrep Editing Operator” BP,
i have the same issue I used an old “Merge Static Mesh Actors” deprecated
unreal tell me to use the new one, but if I try to get the “Static Mesh Editor SubSystem” I doesn’t exist

Thank you for your help
Daniel