I have a utility plugin. Is it possible to call a function in some other plugin from the current utility plugin using 3ds max sdk?
If possible, How can it be done?
What type of plugin should be created?
Thanks in advance..
Solved! Go to Solution.
Solved by SoumyaBasheer. Go to Solution.
Thanks Istan.
I created an interface in a public header file.
Its implementation is done in an implementation file.
How can I call the published functions from other plugins?
How can I get the edmeshCD in the following code snippet from max sdk documentation?
EMFaceOps* efi = GetEMFaceOpsInterface(edmeshCD);
//...
efi->Extrude(mesh, faces, 10.0);
I used FP_CORE flag to make it core interface. But it returned null when I called GetCoreInterface with my interface id. I called it from my another plugin which includes the public header file.
Is published function only accessible through Max Script? Is it possible through C++ code. I am using C++ and max sdk 2013.
Of course C++ plugin communication works with FP! As a side effect, you can then also access via MXS. You have to assure that your plugin, you want to access to, is loaded already!
Yes.It is possible.
Using function publishing we can expose the functions of one plugin to another using FpInterface.
In Fp_Basic.h replace the
inline class IFP_Basic* GetFP_basic()
{
return (IFP_Basic*) GetCOREInterface(FP_BASIC_INTERFACE);
}
with
inline class IFP_Basic* GetFP_basic()
{
return (IFP_Basic*)GetInterface(GUP_CLASS_ID,fp_basics_CLASS_ID,FP_BASIC_INTERFACE);
}