Posted by: | antoine | |
Data created: | 18 August 2010 |
Hi Marsel, I'm trying to access to the skinning information of a mesh with a skin modifier. I'm trying to do it that way: IIDerivedObject theObj = (IIDerivedObject)node.ObjectRef; but I don't know what to pass as parameter to the GetInterface method... I_SKIN obviously does not work... From what I found by searching on google, in C++ it would be : theModifier->GetInterface(I_SKIN) But this doesn't work with max.net... Thanks by advance, any help will be greatly appreciated. Antoine. | |||||||||||||||||
20 August 2010
#2304 | |||||||||||||||||
Hi Antoine, Sorry for the late reply, somehow I didn't get email notification for this thread. Basically, you have to look up the value for your interface constant inside 3dsmax SDK doc first. For example, it says:
So I_SKIN is 0x00010000. Then you pass this constant to GetInterface: IISkin iskin = (IISkin)theModifier.GetInterface((InterfaceID)0x00010000); I do not think that IISkin is being up-cast is current release, however, so this might return null. If thats the case I will add the upcasting for the next build so that this works for you. Marsel Khadiyev (Software Developer, EPHERE Inc.) | |||||||||||||||||
21 August 2010
#2309 | |||||||||||||||||
Hi Marsel, Thanks for your help, now I understand better how GetInterface works ! And you are right, IISkin is not up-cast. Please include that in your next release
Thanks again, Antoine.
| |||||||||||||||||
12 November 2010
#2543 | |||||||||||||||||
Hi Marsel, By any chance, have you added the upcasting of IISkin in 1.2.7 ? Thx, Antoine
| |||||||||||||||||
15 November 2010
#2561 | |||||||||||||||||
Hi Antoine, Yes, all of the interfaces mentioned previously in this thread should now be upcastable in 1.2.7 Marsel Khadiyev (Software Developer, EPHERE Inc.) | |||||||||||||||||
11 February 2012
#3035 | |||||||||||||||||
Hi! Don't know whats going on, but it's still not working for me... The code i'm using: IObject obj = node.ObjectRef; object iface = modifier.GetInterface((InterfaceID)0x00010000); The GetInterface method always returns null, no matter what id i try. But 0x00010000 is ISkin, isn't it? Btw the "Name" property of "modifier" is "Skin", so it is indeed the skin modifier, it just appears to be unable to return its interface... Thanks in advance. |