Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Call function in one plugin from other plugin.

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
bibinlukose
881 Views, 7 Replies

Call function in one plugin from other plugin.

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..

7 REPLIES 7
Message 2 of 8
istan
in reply to: bibinlukose

yes is possible. the magic word is "function publishing".

Message 3 of 8
bibinlukose
in reply to: istan

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);

Message 4 of 8
istan
in reply to: bibinlukose

I used core function publishing between my own plugins.
Message 5 of 8
bibinlukose
in reply to: istan

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.

Message 6 of 8
istan
in reply to: bibinlukose

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!

Message 7 of 8
SoumyaBasheer
in reply to: bibinlukose

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);
}

Message 8 of 8
bibinlukose
in reply to: SoumyaBasheer

This worked for me too.

Thank You very much SoumyaBasheer 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report