ExportSelected

70 views
Skip to first unread message

Rémi Deletrain

unread,
Apr 8, 2019, 11:21:14 AM4/8/19
to Python Programming for Autodesk Maya
Hi everyone,

I try to export a selected parts of rig in new ma file.

For exemple:
    - I have a Manipulator.
    - This manipulator is connected to pairBlend in rotate and translate.
    - This pairBlend is connected to a joint in rotate and translate.
    - I disconnect pairBlend to the Joint.
    - I select my manipulator.
    - I export selected node.

And in a new scene I have manipulator but not a pairblend node.
That means maya doesn't export a dependencyNode without output connection.

It's possible to force export selected node with all connected node ?

Thank you for your help.

Rémi Deletrain

unread,
Apr 17, 2019, 11:09:51 AM4/17/19
to Python Programming for Autodesk Maya
Nobody have solution ? ...

Marcus Ottosson

unread,
Apr 17, 2019, 11:24:45 AM4/17/19
to python_in...@googlegroups.com

You can call cmds.listHistory on a given node to get a history, then pass the results to cmds.exportSelected with history=False. But that’s what the history flag is meant to do anyway, it might not be any different; however this way you can explicitly include nodes that get exported. Any two nodes with a connection will have their connection maintained on export.


On Wed, 17 Apr 2019 at 16:09, Rémi Deletrain <remi.de...@gmail.com> wrote:
Nobody have solution ? ...

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0a7c323f-03fc-437a-b0a5-528d7a47a757%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rémi Deletrain

unread,
May 2, 2019, 3:25:42 AM5/2/19
to Python Programming for Autodesk Maya
Hi Marcus,

Any two nodes with a connection will have their connection maintained on export.

This is a problem. In process I disconnect output of pairBlend and after I export selected nodes.
But at this moment pairBlend node doesn't have output connection and exportSelected don't take this node even thought it has input connection.
For fix this problem I found solution for select this node too but it's possible that at terme cause me a problem... I'm not shure...

fruit...@gmail.com

unread,
May 6, 2019, 8:35:51 AM5/6/19
to Python Programming for Autodesk Maya
that's odd.. I'm currently facing the exact same issue, and everytime I maintain my output connection but doesn't export the joint, it fails (as expected), but as soon as I remove this connection pairBlend->joint, it works like a charm
Another option to avoid working with selection (I find selection-based code super easy to break) could be to put everything in a set and export the content of that set. Eitherway, seems like you have to do maya's job by selecting your nodes prior to exporting... Again, surprising, as it's working fine on my side. Did you try on another maya ? After resetting your prefs ?

Rémi Deletrain

unread,
May 7, 2019, 10:01:25 AM5/7/19
to Python Programming for Autodesk Maya
Hi Fruit...,

Yes I try  with other maya version.
In this moment I have few crash with Maya2018 and attributes connect / disconnect. So I try export selected too with maya SP's.
Reset the proferences does not change anything.

I think I keep ma solution for retrieve node and add to selected and export it
Reply all
Reply to author
Forward
0 new messages