0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

callbacksコマンドメモ

Last updated at Posted at 2024-04-19

キャプチャ.PNG

右クリックメニューのcallbacksにフック

mel
global proc dagMenuItemDelete(string $object){ // 標準のMayaフック addRMBBakingMenuItemsの引数を持つプロシージャ
    string $popupMenuName = `setParent -q -m`;
    string $popupMenuItemList[] = `popupMenu -q -ia $popupMenuName`;
    
    // ラジアル位置の指定の無いmenuItemを削除
    for($popupMenuItemName in $popupMenuItemList){
        $popupMenuItemName = $popupMenuName + "|" + $popupMenuItemName;
        string $menuItemRp = `menuItem -q -rp $popupMenuItemName`;
        if($menuItemRp == ""){
            deleteUI -mi $popupMenuItemName;
        }
    }
}
callbacks -addCallback "dagMenuItemDelete" -hook addRMBBakingMenuItems -owner "kohaku";
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?