supertuxkart / stk-blender

Blender 2.80 exporter
MIT License
23 stars 19 forks source link

Checklines, runlines, and laplines: The Activate field's pull-down fills it out with Blender Object names, not checkline group names #19

Closed thelabcat closed 1 year ago

thelabcat commented 2 years ago

I believe there is a bug (or at least a bad programming design) in how the Activate field is filled out by its pull-down (for checkline, runline, and lapline objects). The Activate field is meant to be filled out with a checkline group name. The pull-down displays a list of Blender Object names of all checkline objects, along with their checkline group names.

The problem is that clicking an option in this list does not fill out the Activate field with a object's checkline group name, but rather the option's Blender Object name. If the Blender Object name of a checkline object is not the same as its checkline group name, this results in track faliure. In the case of a track with multiple routes, parallel checkline objects (that is, checkline objects that are part of the same group because they are on different routes) must have different Blender Object names than eachother (because Blender objects cannot have the same Blender Object name), and thus only one such parallel checkline object can have the same Blender Object name as its checkline group name.

While this flaw does not ultimately prevent the addon (or even the drop-down) from functioning at all, it does place an unnecessary burden on the user, if they use the drop-down picker, to make sure they always make the Blender Object name of checkline objects to be the same as their checkline groups, and when multiple routes make this impossible, to always pick only the object in a checkline group with the same Blender Object name as its checkline group. A better design would be to have the drop-down fill out the Activate field with, not the object's Blender Object name, but rather the name of the checkline group it is a part of, since this is the data that the Activate field is meant to be filled out with, and not something that may or may not be synonymous with the name of the checkline group.