Hello everyone,

I am trying to create a Python script in Mari 5.0 to activate a node in the 
Node Graph window by its name and refresh the Node Properties UI for that 
node. I've attempted to do this by simulating a double-click event on the 
node, but I have been struggling to find the correct way to convert the 
node's position in the Node Graph coordinate system to the QWidget 
coordinate system.

Here's what I've tried so far:

1. Finding the node in the Node Graph using its name.
2. Setting the node as selected using node.setSelected(True).
3. Calculating the node position using node.nodeGraphPosition().
4. Converting the node position to the QWidget coordinate system using 
various mapFrom* methods (e.g., mapFromParent, mapFromGlobal).
5. Creating a QMouseEvent MouseButtonDblClick event with the converted 
position.
6. Sending the event to the Node Graph view using QApplication.sendEvent().

Unfortunately, none of the methods I've tried have worked so far. I believe 
the main issue is with the coordinate conversion step. I would greatly 
appreciate any help or suggestions on how to properly convert the node 
position and successfully activate the node and refresh the Node Properties 
UI.

Thank you in advance for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/0cf5547a-3262-4744-8743-ec63df829004n%40googlegroups.com.

Reply via email to