Finally, I fix the problem, honestly, 3dsmax needs better documentation.
Just writing the solution if this is the case for someone else.
All the code is perfectly correct but in order to apply there is one class that should be called that is optional but not work without it. Also, no error if you not calling it. ( a bit funny )
first, in public classDesc2 i add the "public IMaterialBrowserEntryInfo"
class Lux_AddClassDesc : public ClassDesc2, public IMaterialBrowserEntryInfo
hen inside the class add.
FPInterface* GetInterface(Interface_ID id) {
if (IMATERIAL_BROWSER_ENTRY_INFO_INTERFACE == id) {
return static_cast<IMaterialBrowserEntryInfo*>(this);
}
return ClassDesc2::GetInterface(id);
}
All other part is exactly the same.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…