max plugin about ClassDesc2's Category()

Started by
0 comments, last by S1CA 17 years, 8 months ago
ClassDesc2's Category()'s string(IDS_CATEGORY)will appear in max's which dialog or window? class maxProject0812ClassDesc : public ClassDesc2 { public: int IsPublic() { return TRUE; } void * Create(BOOL loading = FALSE) { return new maxProject0812(); } const TCHAR * ClassName() { return GetString(IDS_CLASS_NAME); } SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; } Class_ID ClassID() { return maxProject0812_CLASS_ID; } const TCHAR* Category() { return GetString(IDS_CATEGORY); } const TCHAR* InternalName() { return _T("maxProject0812"); } // returns fixed parsable name (scripter-visible name) HINSTANCE HInstance() { return hInstance; } // returns owning module handle };
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
Advertisement
Quote:Original post by akira32
ClassDesc2's Category()'s string(IDS_CATEGORY)will appear in max's which dialog or window?

class maxProject0812ClassDesc : public ClassDesc2 {
public:
int IsPublic() { return TRUE; }
void * Create(BOOL loading = FALSE) { return new maxProject0812(); }
const TCHAR * ClassName() { return GetString(IDS_CLASS_NAME); }
SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
Class_ID ClassID() { return maxProject0812_CLASS_ID; }
const TCHAR* Category() { return GetString(IDS_CATEGORY); }

const TCHAR* InternalName() { return _T("maxProject0812"); } // returns fixed parsable name (scripter-visible name)
HINSTANCE HInstance() { return hInstance; } // returns owning module handle


};


This is the DirectX forum. 3DS Max plugin development discussion probably belongs on the 3DS Max developer forums:

http://sparks.discreet.com/

Quote:
The category is selected in the bottom-most drop down list in the create branch of the command panel. If this is set to be an existing category (i.e. "Standard Primitives", "Particle Systems", etc.) then the plug-in will appear in that category. Developers should NOT add to the categories provided by 3ds max (see the note below). If the category doesn't yet exist then it is created. If the plug-in does not need to appear in the list, it may simply return a null string as in _T(""). Category() is also used for modifiers to classify them in the button sets dialog.

Important Note: The 3ds max architecture has a limit of 12 plug-ins per category in the Create branch. To prevent a problem with too many plug-ins per category, developers should ALWAYS create a new Category for their plug-ins, rather than using one of the existing ones used by the standard 3ds max plug-ins. Note that versions of 3ds max prior to release 1.2 would crash if there were more than 12 buttons per category.



Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

This topic is closed to new replies.

Advertisement