I’ve created two simple objects in a blender and I’ve exported them to fbx in one file and later to c3b/c3t using fbx-convert.
Now I’m trying to get access to each object individually, but i cant:(
Here is the link for my object:
object.zip (5.9 KB)
auto houseSprite = (Sprite3D*)rootNode->getChildByName("Sprite3D_1");
//houseSprite->setVisible(false); //This part works fine, so i found sprite correctly
CCLOG("Meshes number: %d", houseSprite->getMeshCount()); // Meshes number: 0 // I think here is the problem
// according to lines in .c3t file
// "meshes": [ { ... , "parts": [ { "id": "Roof_part1", ...
// "nodes": [ { "id": "Roof", ...
auto house = houseSprite->getMeshByName("House_part1");
auto roof = houseSprite->getMeshByName("Roof_part1");
// next part of code doesn't work.
if (house != NULL)
house->setVisible(false);
if(roof != NULL)
roof->setVisible(false);
Please help me how to create one object with two meshes.