Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blank object names policy? (Model filters mainly) #158

Open
m-7761 opened this issue Apr 12, 2021 · 0 comments
Open

Blank object names policy? (Model filters mainly) #158

m-7761 opened this issue Apr 12, 2021 · 0 comments

Comments

@m-7761
Copy link

m-7761 commented Apr 12, 2021

I'm trying to standardize the APIs that take names. Some allow empty names, some don't. I've made the ones that set names to uniformly not allow them. The filters use the creation APIs instead, which allow this in case the model files have blank names.

I'm trying to set the blank name to a dummy name. I'm not sure if this will break filters vis-a-vis if they try to search for the objects by their file names after creating them, or in terms of "round tripping" files (i.e. importing/exporting to same file name.)

I'm not sure if the dummy name should be verbose (e.g. "name ungiven") but I've set it to be "_" in the meantime. The reason I'm concerned about this is my drop-down lists interpret blank items as menu separators and I don't want to have to do processing on every getXName call.

It seems like from a UI perspective throwing out blank strings is a source of headaches that should be avoided. Note, the OBJ loader seems to use a blank string for the first group it creates. After this it starts appending 2, 3, 4, etc. to the end of group names. I've changed to append 1 to the first group if its name is blank. I don't know if that's best practice for this loader. I don't know why OBJ files exported from Blender have blank group names in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant