hi @Anonymous
we can create a custom keyboard shortcut pretty much for any thing in Maya !!
you can use this script to do that :
watch the video attachment "importImageByKeyboardShortcut.mp4"
//import image to the viewPort that the hovered cursor mouse
string $cam=`getPanel -underPointer `;
string $activCamName="";
switch($cam){
case "modelPanel4":
$activCamName = "perspShape";
break;
case "modelPanel1":
$activCamName = "topShape";
break;
case "modelPanel2":
$activCamName = "sideShape";
break;
case "modelPanel3":
$activCamName = "frontShape";
break;
}
importImagePlane { $activCamName };
Or you can use this :
watch the video attachment "importImageByKeyboardShortcut.mp4"
//import image to the viewPort not for the viewPort cameras
string $impImg_1[] =`imagePlane -width 10 -height 10 -maintainRatio 1 -lookThrough persp`;
string $imgShape_2[] = `listRelatives -s $impImg_1`;
string $ipUi_[] = `fileDialog2 -fm 1 -caption "Select an image for the Image plane"`;
setAttr -type "string" ($imgShape_2[0]+".imageName") $ipUi_[0];
pleas let me know if you need me to explain any part of the scrips
I hope that help 💙🤍.