Sign in to follow this  
alexoy

Issues with instances created in Blender

Recommended Posts

Anybody, please? :) 

@Deltakosh, how to use instances if there are no tags for them? If there is a code in BJS that copies parent's tags into instances - something in the middle is not working

Share this post


Link to post
Share on other sites
On 3/23/2018 at 3:23 PM, JCPalmer said:

@alexoy, checking in Blender, duplicates share a data directory.  The exporter custom properties are in the data directory, as shown on the data tab, so there may only be a single version.  Blender's sharing of data precludes unique tags, so there will be no exporter changes for this.  The "2" in the picture, shows 2 meshes sharing the same data, just like materials and everything else in Blender:

tags2.jpg.2cf1def0e7b9f37c0d766ed189fda844.jpg

I would recommend to use your mesh name to hold your tags.  Something like the format of 'mymesh:tag1,tag2'.  Then have a loop to transfer:
 


for (var i = 0, len = scene.meshes.length; i < len; i++){
    var name = scene.meshes[i].name;
     if (name.startsWith('myMesh:')) {
          scene.meshes[i].tags = name.substr(7);
     }
}

 

@Deltakosh,  Duplicate objects in Blender result in sharing everything except a name, so unique tags for instances are not possible.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.