Author Topic: TextureManager getNames truncates filenames after 3DS import from Blender  (Read 223 times)

Offline rbj

  • byte
  • *
  • Posts: 4
    • View Profile
Hi all!

I am importing *.3ds files from Blender to JPCT-AE
Using the code below to get the textures names I see that the textures can not be loaded because the filenames are truncated:
-> Texture file not found: alienmat1.jp
-> Texture file not found: flagtexture.
These should be alienmat1.jpg and flagtexture.jpg
The names are truncated at 12 characters (old DOS 8.3 file names?)

Code:
        private void checkTextures() {
            int texCnt = TextureManager.getInstance().getTextureCount();
            Log.d(TAG, ">> Have " + texCnt + " textures");
            if (texCnt > 0) {
                Set<String> texNames = TextureManager.getInstance().getNames();
                Iterator itr = texNames.iterator();
                while (itr.hasNext()) {
                    String tex = itr.next().toString();
                    Log.d(TAG, "Texture " + tex);
                    try {
                        TextureManager.getInstance().replaceTexture(tex, new Texture(mContext.getAssets().open(tex.toLowerCase())));
                    } catch (java.io.FileNotFoundException e ) {
                        Log.d(TAG,"-> Texture file not found: "+tex);
                    } catch (java.io.IOException e) {
                        e.printStackTrace();
                    }
                }
            }
        }

Why? Anyone also experiencing this?

Robert

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11968
    • View Profile
    • http://www.jpct.net
Re: TextureManager getNames truncates filenames after 3DS import from Blender
« Reply #1 on: February 05, 2019, 07:54:00 am »
The 3ds format does that, not the importer.

Offline rbj

  • byte
  • *
  • Posts: 4
    • View Profile
Re: TextureManager getNames truncates filenames after 3DS import from Blender
« Reply #2 on: February 05, 2019, 10:45:56 am »
AH, good to know, thanks.

From what I read the DAE/Collada import is not supported for jpct-ae, right?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11968
    • View Profile
    • http://www.jpct.net
Re: TextureManager getNames truncates filenames after 3DS import from Blender
« Reply #3 on: February 05, 2019, 02:51:37 pm »
No, not out of the box.