Controllers should have a non unique name

I was wondering how one would store multiple animations in a JME file. The simplest way I could come up with was using multiple controllers, one set for each animation. However if one uses this method there must be a way to tell a controller what animation it is for. The method must be one that would be simple for both the Programmers and Artists for large projects. The Simplest method I could come up with is giving each controller a non unique name, and then reclusively enabling, disabling controllers based on there name.

Err, you mean a unique name, right? If the name was not unique it does not make sense to identify the controllers based on their name, does it?

I mean not unique, this would allows all controllers in a model that are needed for an animation to have the same name. The name would be unique for the animation not for the controller.

You mean like a "grouping id" right?

llama said:

You mean like a "grouping id" right?


yes

Any one oppose this addition? If not how should I put it on the todo list?

I have not fully understood what you are aiming for, but I assume your goal is to synchronize multiple Controllers? I am using a different approach for that, and it's working quite nice for me. Some time next week, JointController and SpatialTransformer will get getCurFrame() and setCurFrame() methods, which can then be used to synchronize several Controllers in some kind of "MasterController". That way, you wouldn't have to build some mechanism iterating over all controllers and checking for their "grouping id"; grouping would simply be done by adding the Controllers to the MasterController.

hevee said:

I have not fully understood what you are aiming for, but I assume your goal is to synchronize multiple Controllers?


No, it is for storing multiple animations inside a model. Each animation would have it's own name. This would allow both the programmer and the artest to simply store and load animations. This has nothing to do with synchronize the animations once they are started, only what controllers to use.

You can just subclass the controller class you use

kman said:

You can just subclass the controller class you use


That wont allow you to store the controller in the .jme file. This is something that many games will need, jme should handle it in some way.

Will this happen?

I'm going to make the .jme writer more flexible to allow subclassing (e.g. physics). So, yes, this will be possible. The question is when… (which might not be answered "soon")

I was in middle of re-writing the importer and came up with a new system. Do you want to colaberate?

Well, in the thread about rewriting the jme binary writer it seemed we had some differences in the requirements for the .jme format / different intentions… but as soon as I consider to start working on it I’ll post there or PM you, yes.

I hate to bump a thread but this is something that needs to be handled.



Edit:  Issue 211

Posting a link to an issue you created is far better than bumping IMHO :slight_smile: