Jump to content

Object id and name - babylon.js exporter


ian
 Share

Recommended Posts

Hi Ian! This is a Blender question, not a BJS question... but what the heck.  http://blender.stackexchange.com/questions/46795/is-there-a-quick-way-to-copy-the-object-name-to-the-mesh-data-name

That might help... especially the little video.  Perhaps do some tests - export a few things, examine the .babylon file, then import into BJS and compare again.  Viewing the .babylon file after Blender export... will give quick knowledge, I think.  Be well.

Link to comment
Share on other sites

@ian: @Wingnut gives you one answer about changing the names of your objects/meshes in Blender. There are other ways. But is that the answer you are looking for?

You write

Quote

Name and id are same

Something like this from a .babylon file of mine:

"name":"Base_figure1:Body","id":"Base_figure1:Body"

Both "name" and "id" are the same. I have no idea why they are the same - but it seems to have been this way since I started using BJS. Don't think I have ever used the "id" in anything I have ever built.

Do you have specific reasons for wanting them to be different?

cheers, gryff :)

Link to comment
Share on other sites

@ian -

I don't know if this answers your question, but we give a name to elements in babylon.js so that we can later call them by name in BJS operations and functions. Without providing a unique name (even if it is the same name as the original element you are loading), then many functions in BJS wouldn't recognize the name of any element such as a mesh or material without providing a unique name identifying a loaded element in your babylon scene. 

I hope this answers your question.

DB

Link to comment
Share on other sites

In the case of Blender, there is really only a name.  But other producers do have this "77e03ea9-e95a-46a9-b16a-0262102546fc" kind of stuff for id.  Just so you can code in BJS using either scene.getxxxByName() or scene.getxxxByID() methods, the Blender producer just populates both name & id with the same values.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...