Peter Vandewalle Posted September 5 Share Posted September 5 Hi all, I need to get a handle to the material that is connected to a (wall) component. When I use bRes, iMat = vs.GetComponentMaterial(hWall, iComponent) where hWall is the wall and iComponent is the component index, I get a boolean and a longint. That longint should be the material... I thought hMat = vs.GetResourceFromList(iRLMat, iMat) would return me a handle to the Material, but apparently the resource index needed here isn't the same as the material I get from the first call. Any ideas to get the material handle? Quote Link to comment
Pat Stanford Posted September 5 Share Posted September 5 I think you need to do vs.GetName(vs.Index2Name(iMat)) Quote Link to comment
Peter Vandewalle Posted September 5 Author Share Posted September 5 Thanks Pat, didn't remember that one 🧐 Quote Link to comment
Pat Stanford Posted September 5 Share Posted September 5 Yeah the functions that return indexes have to be handled differently than everything else. 1 Quote Link to comment
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.