Closed jmeli496 closed 6 years ago
Try using the method getSceneObjectByName
GVRSceneObject obj = context.getAssetLoader().loadModel("model.fbx"); obj.getSceneObjectByName("name");
Thank you very much. It worked. I guess my problem was that each child of the root object contains one more child which is the node I am trying to find. I have one more question though. Why are those empty nodes (that only contains another single node) even present? Are they useful in any way?
Nevertheless, Thank You! You saved my day.
@jmeli496 I believe those extra nodes are introduced by assimp - the asset import library we use to read in FBXs (https://github.com/assimp/assimp).
@jmeli496 Do you have other questions? Can we close this issue if not?
I have a model created in Blender consisting of multiple named nodes (e.g "Top_Part", "Glass", "Whatever01"). I am exporting this model to FBX and then loading it to
GVRSceneObject
usingAssetLoader.loadModel
. I would like to be able to access specific node by its name (which was set in the Blender). I tried using theGVRSceneObject.getName()
(in combination with iterating through all the children) to achieve this but it returns an empty string.Is it possible to obtain a specific node by its name?
Thanks for the help.