Andrey Zimin Posted January 29, 2018 Share Posted January 29, 2018 Hi friends. Let's say I created a sphere and want to her to bind some parameters. I remember that mesh there is a special data. Tell me exactly how to do it! I think there is some official method to add your data Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 29, 2018 Share Posted January 29, 2018 Hi Andrey! I think most use node.metadata. It is on node, so it is on mesh, camera, and lights. I think it is included in serializations and parsings, so it can be added in modelers, too... and will export fine. I have heard that some people put a json object in that property, which can carry a ton of data. Andrey Zimin 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 29, 2018 Share Posted January 29, 2018 sphere.userData = {}; sphere.userData.whatever = sphere.userData['whatever'] = 'yup...'; use the ['variable-name'] for safety and so you can be more specific on naming. Andrey Zimin 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted January 30, 2018 Share Posted January 30, 2018 Hey @Pryme8... when 'userData' is added (to a mesh, cam, or light) in Blender... via Blender Custom Properties, does it export/import correctly? Will sphere.userData exist on mesh/cam/light... after import in BJS scene? Anyone know? http://www.html5gamedevs.com/topic/4961-user-data-in-mesh-object/?do=findComment&comment=33230 (the above is old post, so I'm not sure if still pertinent) http://doc.babylonjs.com/how_to/how_to_start I see 'userData' mentioned there, twice. *shrug* I think I am behind on my reading/learning. Info welcome. Quote Link to comment Share on other sites More sharing options...
Arte Posted January 30, 2018 Share Posted January 30, 2018 Hi All, Babylon js using ***.metadata not ***.userData Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 30, 2018 Share Posted January 30, 2018 if you are using the serialize it should not matter... it should turn it into a string regardless and propagate it back when you de-serialize it. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 30, 2018 Share Posted January 30, 2018 1 hour ago, Wingnut said: Hey @Pryme8... when 'userData' is added (to a mesh, cam, or light) in Blender... via Blender Custom Properties, does it export/import correctly? Will sphere.userData exist on mesh/cam/light... after import in BJS scene? Anyone know? That I don't know, I don't use Blender and never will. (c4d for the win) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.