Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / Selection sets in display layers
  RSS 2.0 ATOM  

Selection sets in display layers
Rate this thread
 
51862
 
Permlink of this thread  
avatar
  • Lyrik
  • Posted: 31 January 2011 02:23 AM
  • Total Posts: 12
  • Joined: 05 October 2010 06:15 AM

Hello,

I’d like to use selection sets for meshes separeted by display layers. In simple scene this code works quite well. If I load the FBX file to MAX, it works also OK.

KFbxSelectionSetsel KFbxSelectionSet::Create(pSdkManager"selection1");
 
KFbxSelectionNodesnode KFbxSelectionNode::Create(pSdkManager"selnode1");
snode->SetSelectionObject(lCube);
snode->mPolygonIndexArray.Add(2);
snode->mPolygonIndexArray.Add(3);
snode->mPolygonIndexArray.Add(4);

sel->AddMember(snode);
pScene->AddMember(sel);

But if I use this approach to a scene with more display layers, layers disappear, all meshes are in a default display layer and I see no selection sets in Max. If I disable the

pScene->AddMember(sel);

line, layers are OK but there are no selection sets in Max. I even tried to add the selections as members of corresponding display layers, but result was exactly the same. So what should be actualy a selection set member of? And is it even possible to have a single scene with meshes in various display layers and selection sets for the meshes?

Thank you.



Replies: 1
/img/forum/dark/default_avatar.png

Finally it works. It was my fault in memory management. Sorry for that

Author: Lyrik

Replied: 01 February 2011 01:29 AM