Reload / update deformer plugin in a scene

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  11 November 2012
How would one exactly set up the workflow with the pre-link and post-link bat files? Keep getting errors while setting it up.

Thanks in advance.
  11 November 2012
And the errors are...?


1. Put commandPort.exe, pre-link3.bat, and post-build3.bat in windows path or where the .sln of your project resides.
2. Add to your maya's userSetup.mel


3. Put vs_build_events.mel in your mel script path.
4. In VS, set under your project property pages>conf prop> build events> pre-link event> command line:
pre-link3.bat <plugin_file_name_without_extension> <node_name_of_deformer>

Since my project name is the same as the .mll and the deformer I simply set:
pre-link3.bat $(TargetName) $(TargetName)

and the build events> post-link event> command line to:
post-build3.bat <plugin_file_name> <node_name_of_deformer> <VS_out_dir_of_mll> <your_plugins_dir> <mel_command_to_create_deformer> 

I use:
post-build3.bat $(TargetName)$(TargetExt) $(TargetName) $(OutDir) "\prj\plug-ins\" "deformer -type" 
  11 November 2012
Awesome! I got it to work.

My node is working fine, but when I use this while Maya is open the following code returns the MS::kNotImplemented. Even though before recompiling it the node actually works. Happens every time.

 if (dataBlock.inputValue(aInCurve).type() != MFnData::kNurbsCurve) stat = MS::kNotImplemented;

So before I can actually start using this I'll have to figure out why it is doing this. Nevertheless learned something awesome new about Visual Studio and the commandPort.


  11 November 2012
The mel code should reconnect all the accessories to the deformer, but in your case something didn't connect right. I'll need some more information on the deformer type and what/how do you connect to it. Also, you should simply check the connections in the connection editor from the accessories to the deformer, and test inside the plugin if these connections are valid (it's your plugin, right?).

commandPort is not limited to VS. It's an external interface to maya, and any app can connect to it.
  11 November 2012
I checked all the connections and they were all fine. Even tried reconnecting it or connecting it to a new node. It's derived from MPxNode and I changed the deformer -type code to createNode.

I had probably some other thing that was giving me the problems beside just this script.

I'll let you know once I figure out what it was. Currently developing without this sweet functionality. hehe.

It also reconnected these connections (according to the nodeCon.tmp file):

I'm not entirely sure what that's about?

Last edited by BigRoyNL : 11 November 2012 at 01:37 PM.
  11 November 2012
I'm sorry that I can't assist you better. Since it's only a small utility that I use at home (and not in mass production), I'm not really sure about its quirks and limitations in other situations besides mine .

If this really interests you (I won't be offended if not ), then I suggest you would start eliminating chunks of code from the plugin, until it would be bare-bones, and then it would be easier to debug the problem.

The temp file shows the connections that the plugin had. I'm not sure what they are in your case (your plugin, right?).
  11 November 2012
Did you try, perhaps, to comment the code in the mel script that restores the connections, and then connect the deformer with your standard script?
This should be the first test, and after you make this work, your should compare the connections the mel script it trying to make with the ones your script makes.

Actually the whole process here is not that complicated. The connections are saved, the deformer is deleted, a new deformer is created, and the connections are remade for the new deformer. You should try to make this process manually and see where it fails.
  11 November 2012
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 11:51 AM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.