Maya drag and drop scene file behavior

Maya drag and drop scene file behavior

Anonymous
Not applicable
3,250 Views
3 Replies
Message 1 of 4

Maya drag and drop scene file behavior

Anonymous
Not applicable

If I drag a scene file and drop it into maya, it does a file import.  Is there a way to change this so it does a file open instead?  Ideally I could control this with an option within the maya session.

 

We are running maya 2018 (and for now 2016) on Windows.

 

Thanks!

Accepted solutions (1)
3,251 Views
3 Replies
Replies (3)
Message 2 of 4

zhong_wu
Autodesk Support
Autodesk Support
Accepted solution

I did a quick searched and I did not find an easy way as you expected to customize the drop/drop operation to open file instead of import, but if you are interested in C++ code, I found Maya provided a callback way to help you hook into Maya’s drag-and-drop mechanism. 

 

The classes MExternalDropCallback/MExternalDropData were introduced in Maya 2013, check here:

MExternalDropCallback - This class will be used to register callbacks to gain access to Maya's drag-and-drop information when dropping external objects into Maya. You can replace or augment this drop behavior for external drag-and-drop operations.

MExternalDropData - This class represents the data carried within a drag-and-drop operation when dragging from an external application. This class is used by MExternalDropCallback.

 

There is also an example at http://help.autodesk.com/view/MAYAUL/2018/ENU/?guid=__cpp_ref_external_drop_callback_2external_drop_...  to demonstrate how this is supposed to use. I think that might be something you are interested, but requires more C++ skills.


John Wu
Developer Technical Services
Autodesk Developer Network


Message 3 of 4

Anonymous
Not applicable

Hi John,

 

Thanks for you answer, this sounds perfect!  I am conversant with c++, but I'm just getting started with the maya API.  I will give this method a try.

0 Likes
Message 4 of 4

stezzaboy
Enthusiast
Enthusiast

I was just searching for why I can't drag and drop a scene into the viewport to open it, just doesn't allow it.

Any ideas why?
Maya 2019.