Hi ramtinsoltani, there is no interface for that yet, if it's not in the documentation then I'm afraid there's no support for it yet.
However, this doesn't actually limit you. Similar to your mentioned workaround, you can still make your own event sheet features interface for scripting.
- Create a family named
Solid
.
- Add all your objects with a Solid behavior to the new Family named
Solid
.
- If there are event conflicts, due to the Solid behavior already existing in an object, you can just use a dummy object to replace them temporarily while you move your object's Solid behavior to the
Solid
family.
- Create a function for each action, condition and expression of the Solid behavior.
- Or, you can edit the project file's JSON to replace the object's individual solid behavior to its family.
- Make sure each function has a UID number parameter.
- Make function parameters based on the arguments of an action, condition or expression.
Here is how it would look like:
All objects belonging to the Solid
family will be able to utilize the created functions.
const object1 = runtime.objects.Solid1.getFirstPickedInstance();
const object2 = runtime.objects.Solid2.getFirstPickedInstance();
const object3 = runtime.objects.Solid3.getFirstPickedInstance();
const object4 = runtime.objects.Solid4.getFirstPickedInstance();
runtime.callFunction("Set solid enabled", object1.uid, true);
runtime.callFunction("Set solid enabled", object2.uid, false);
runtime.callFunction("Set solid enabled", object3.uid, true);
runtime.callFunction("Set solid enabled", object4.uid, false);
runtime.callFunction("Set solid tags", object2.uid, "super-solid");
runtime.callFunction("Set solid tags", object4.uid, "weak-solid");
You can do this for all event sheet actions, conditions and expressions. For all plugins and behaviors, even for the system.
I hope that helps.