Storing MotionPaths in Nodes/SceneGraph

So I have the following “problem”:
I want to serialize one/multiple MotionPath’s to a .j3o file (but not by using a seperate file/exporter).

Usually it works like this:
A MotionPath is a Savable (which could be exported). It is then added to a MotionEvent which infact implements Control.

My Intention is to allow MotionPaths to be added onto the SceneGraph of a .j3o file to allow the use of a container (because in most use-cases you have two paths per file: The Path itself and the Path for the “LookAt” Object)

You would then access them like so:

Node n = getAssetManager().loadSpatial(...);
MotionPath = (MotionPath)n.getChild("MotionPath1");

Now it’s obvious that this would require an (invalid) core change, so I thought since MotionPath implements Savable I could pass it as userData, right?

The big picture is this: I want to add Motion Paths to the SDK and as such I’d love to simply extend what’s currently there. In order to save such a UserDataNode I’d need a different class than Node (to have the SceneExplorer/Properties Window behave differently).

For this, I’d simply extend Node (which is discouraged, I know) :stuck_out_tongue:
The Question is simply: When I Override the clone() and export methods, will I be able to serialize it completely as a Node and not as a “MotionPathNode”?

However maybe someone can come up with another good idea?

I don’t understand why you want to treat controls like nodes.

Not actually Controls but their Savables.
Because Motion Path has no Name, Id, nothing, I wanted to add it as Userdata to a Node to be easily loaded from Code.

The thinking is you might want the same MotionPath for multiple MotionEvents and/or want to build those MotionEvents (Controls) during the Game and not already in SceneComposer.

But maybe that’s the wrong approach and I should simply add them under Motion Events (and then I wouldn’t have any serialization problems at all, since the controls variables get serialized)

That’s the intended way.
MotionPath is either part of a cinematic attached to a motionEvent, either attached as a control to a spatial.
In both cases it will be serialized if you save the parent structure.