maya 2020 drag and drop custom action

maya 2020 drag and drop custom action

Craig_Lamorte
Advocate Advocate
1,977 Views
2 Replies
Message 1 of 3

maya 2020 drag and drop custom action

Craig_Lamorte
Advocate
Advocate

Hi,

 

i had found something online for a custom drag and drop action (in performfiledropaction.mel) that gave the option import, open, or reference.  This worked in 2017, however when i try it in 2020 it does not work on open.  If i choose open it saves whatever scene I have open back to whatever file i tried to drag and drop.  Something must have changed with how maya opens files.  Cannot figure out how to fix this, this is the open code

else if ($response == $open)
{
	global string $gv_operationMode;
	string $save_gv_operationMode = $gv_operationMode;
	$gv_operationMode = "Open";
	int $result = performFileAction ($theFile, 1, "");
	$gv_operationMode = $save_gv_operationMode;
	return ($result);
}

 

 

0 Likes
Accepted solutions (1)
1,978 Views
2 Replies
Replies (2)
Message 2 of 3

Craig_Lamorte
Advocate
Advocate
Accepted solution

well i just replaced it with a file -open -f $file; and it works fine now

0 Likes
Message 3 of 3

antikozzz
Observer
Observer

hey guys I'm a noob, what exactly do I have to override to make the script work ?

0 Likes