"Lesson 1: Sample utility plug-in" problems

"Lesson 1: Sample utility plug-in" problems

Anonymous
Not applicable
1,391 Views
8 Replies
Message 1 of 9

"Lesson 1: Sample utility plug-in" problems

Anonymous
Not applicable

I have created a visual studio project using the wizard, added the line

 

ip->PushPrompt(_M("Hello World from Lesson 1. Called from BeginEditParams()"));

 

to the BeginEditParams function, and built the .dlu (in my case UtilityPluginTest.dlu). I've placed the .dlu file in "C:\Program Files\Autodesk\3ds Max 2018\Plugins". 3dsMax finds the plugin if I go into the Plug-in Manager:1.png

 

What I don't understand is what the tutorial mean by "...when the UtilitySample plug-in is selected from the utility plug-in list"

 

What is the "utility plug-in list" and where do I find it? If I go to the Utilities tab I don't find my plug-in. I don't find it if I press "More..." either.

 2.png

 

Could someone enlighten me how I can run this BeginEditParams method of my plugin? Where do I find my plugin? I've followed the tutorial 100%.

 

Thanks

0 Likes
1,392 Views
8 Replies
Replies (8)
Message 2 of 9

istan
Advisor
Advisor

If you cannot find it under "More" on the "Utilities" tab sheet (and you have not already assigned it to a button), then something is wrong in your code. A utility plugin must be listed there! e.g.: is ClassDesc2 using the right IDs?

0 Likes
Message 3 of 9

istan
Advisor
Advisor

There is a mistake: I meant no the "More" button but the "button assignment" page!

0 Likes
Message 4 of 9

Anonymous
Not applicable

Thanks for the answer!

 

How do I know if the ClassDesc2 is using the correct IDs?

 

Right now I have the following code (generated by the Wizard in Visual Studio):

 

class UtilityPluginTestClassDesc : public ClassDesc2 
{
public:
	virtual int IsPublic() 							{ return TRUE; }
	virtual void* Create(BOOL /*loading = FALSE*/) 	{ return UtilityPluginTest::GetInstance(); }
	virtual const TCHAR *	ClassName() 			{ return GetString(IDS_CLASS_NAME); }
	virtual SClass_ID SuperClassID() 				{ return UTILITY_CLASS_ID; }
	virtual Class_ID ClassID() 						{ return UtilityPluginTest_CLASS_ID; }
	virtual const TCHAR* Category() 				{ return GetString(IDS_CATEGORY); }

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

where 

#define UtilityPluginTest_CLASS_ID	Class_ID(0x56c0d04e, 0x5d65207b)

 

Maybe the wizard is doing something wrong? 

0 Likes
Message 5 of 9

istan
Advisor
Advisor

did you check the appearance on the "button assignment" page ?

0 Likes
Message 6 of 9

drew_avis
Autodesk
Autodesk

Can you post a screenshot of the list of utility plugins you get when you click the "More" button?

 

Drew



Drew Avis
Content Experience Designer
0 Likes
Message 7 of 9

istan
Advisor
Advisor

Hey Drew,

AFAIR on the <More> button it will only show, when its a "MAX STANDARD" and the Category() is empty..

0 Likes
Message 8 of 9

drew_avis
Autodesk
Autodesk

No, any category should work, I just tried the Lesson1 sample with a category "Learning Path" and it showed up.  But in the original screenshot there's no description in the Plug-in Manager.  Is IDS_LIBDESCRIPTION defined in the string table?  And does the DllEntry.cpp have something like:

// This function returns a string that describes the DLL and where the user
// could purchase the DLL if they don't have it.
__declspec( dllexport ) const TCHAR* LibDescription()
{
	return GetString(IDS_LIBDESCRIPTION);
}

Drew



Drew Avis
Content Experience Designer
0 Likes
Message 9 of 9

istan
Advisor
Advisor

Well.. I just checked again. In my case, the plugin does not show up under "More" but only under Button assignment. I have the description and everything else also filled out properly. I was always wondering, but did not care about, since my users work with the button assignment anyway. Therefore I commented, if the plugin will not be listed under "More", it still could show up somewhere else.

0 Likes