Jump to content

OPmenu issue


Recommended Posts

Hi Guys,

First post since I joined odforce.

I am trying to make a tool which could create filecache node on the right click of a null node.
The moment I hover my cursor on the "mdu" option, before clicking it's creating filecache node.

Its a submenu option, so I think I am missing some thing important.

<?xml version="1.0" encoding="UTF-8"?>

        <actionItem id = "create.rop.node">
node = kwargs['node']        
result = 'Create Rop Node'
sel = hou.selectedNodes()[0]
if sel.type().name() == 'null':
    selName = sel.name().split("_")
    joinName = "_".join(selName)
    nodeName = joinName.replace('OUT_',"")
    if selName[0] == 'OUT':
        nodePath = sel.path()
        node = hou.node(nodePath)
        raise hou.Error("Invalid Node name")
    print sel.name() + " is not valid for cache"
    result = u"\u2713 " + result
return result
            <expression>kwargs["node"].type().category().name() in ("Sop")</expression>



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...