Is it possible to use the file names as object names when importing models in Blender?

Hi!

I’m wondering if there is a way to use the file name as the object name of an imported model. This would be useful as I have larger batches of models that have an ID number as part of the file name. When importing these models in batches, it would be really useful to use the file name as the object name to better keep track of faulty models based on the ID. The actual objects when imported currently do not include the ID in the name.

See image example below for how the current process will name an example model, and what the “desired” process would result in:

Welcome :tada:

the nameing of objects is usually done in the specific file format… also: if there are multiple objects should it be named filename_objectname … ?? (so i guess this would only work if there is only one object… and so there are extra checks/tests to be doen for this…)

So you have the change this in the python code for the and GLB/TF Python-addon… .../scripts/addons/io_scene_gltf2/ (or better fork one with a new name…)

here also seems to be some importers on GitHub… maybe someoen has already such an option ??

Official (? maybe newer features) importer from KhronosGroup:

Another importer:

Yes, a “filename_objectname” naming convention would work in cases where there are multiple objects. As long as the name of the file is incldued in the object name in one way or another any naming convetion would work.

Will look into the options avaible in the importers you linked.

Thank you for the reply!