[SOLVED] How to set custom bindings to model scripts in JmeConvert?

Hi

From a quick glance at the JmeConver source code, I could not find how to set custom bindings into model scripts so they are globally available to all scripts. Is this currently supported?

It depends on how you want to use it. I assume you are embedding this into your own application or something?

It’s the ModelScript that sets the bindings. But I guess even then it would take some odd coding to make it work. Probably there is a missing API.

If you can explain how you intend to use it that would help.

Yes.

I want to be able to access an AppState from scripts.

for example, accessing IconGeneratorState to generate an icon from the model.

The other way is to make the Application class statically available using singleton but I think using bindings is a better approach.

Yes, it is.

1 Like

Ok, thanks. I fixed this in my fork of JmeConver.

Also, a PR is submitted in case someone wants to take a look.

Regards