Do Maya has signal to tell object's transform being changed?

43 views
Skip to first unread message

em.l...@gmail.com

unread,
May 14, 2019, 12:42:50 PM5/14/19
to Python Programming for Autodesk Maya
Hi everybody, it would be awesome if Maya could tell us if a transform's node being modified or not. I want to connect that's signal to PyQT gui and handle the data.

Is that possible? Thanks

Alberto Sierra Lozano

unread,
May 14, 2019, 1:02:52 PM5/14/19
to Python Programming for Autodesk Maya
Hello!

Have you checked the Event system from the Maya API?


Hope it helps!

Lucid Production

unread,
May 14, 2019, 1:28:35 PM5/14/19
to python_in...@googlegroups.com
Hi Alberto
I don't have much experience with MayaAPI but is Maya's EventSystem equal to Mel's ScriptJob? ScriptJob store in preference of user's machine, so i don't really like it much

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/da5367e0-6553-475f-9b6f-51e8d6a8384a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

Robert White

unread,
May 14, 2019, 2:12:49 PM5/14/19
to Python Programming for Autodesk Maya
scritpJob is built on top of the MMessage event system that is exposed through the API. So it is capable of doing everything that a scriptJob is, plus has access to some more granular events.
Nothing is stored in userPrefs though, you have to setup the events for each session.


On Tuesday, May 14, 2019 at 12:28:35 PM UTC-5, Lucid Production wrote:
Hi Alberto
I don't have much experience with MayaAPI but is Maya's EventSystem equal to Mel's ScriptJob? ScriptJob store in preference of user's machine, so i don't really like it much

On Wed, May 15, 2019 at 12:02 AM Alberto Sierra Lozano <alberto.s...@gmail.com> wrote:
Hello!

Have you checked the Event system from the Maya API?


Hope it helps!

El martes, 14 de mayo de 2019, 18:42:50 (UTC+2), em....@gmail.com escribió:
Hi everybody, it would be awesome if Maya could tell us if a transform's node being modified or not. I want to connect that's signal to PyQT gui and handle the data.

Is that possible? Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.

Lucid Production

unread,
May 14, 2019, 2:29:27 PM5/14/19
to python_in...@googlegroups.com
I just take a look at MMessage class and there a lot of stuffs inside. But it's a great point to start.
Thank a lot, Robert :)

On Wed, May 15, 2019 at 1:12 AM Robert White <robert....@gmail.com> wrote:
scritpJob is built on top of the MMessage event system that is exposed through the API. So it is capable of doing everything that a scriptJob is, plus has access to some more granular events.
Nothing is stored in userPrefs though, you have to setup the events for each session.


On Tuesday, May 14, 2019 at 12:28:35 PM UTC-5, Lucid Production wrote:
Hi Alberto
I don't have much experience with MayaAPI but is Maya's EventSystem equal to Mel's ScriptJob? ScriptJob store in preference of user's machine, so i don't really like it much

On Wed, May 15, 2019 at 12:02 AM Alberto Sierra Lozano <alberto.s...@gmail.com> wrote:
Hello!

Have you checked the Event system from the Maya API?


Hope it helps!

El martes, 14 de mayo de 2019, 18:42:50 (UTC+2), em....@gmail.com escribió:
Hi everybody, it would be awesome if Maya could tell us if a transform's node being modified or not. I want to connect that's signal to PyQT gui and handle the data.

Is that possible? Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/b4d9622a-fa69-4888-991a-798cd97902a1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Alberto Sierra

unread,
May 14, 2019, 2:59:26 PM5/14/19
to python_in...@googlegroups.com

I think that The link that I sent you in the previous post is the one that you should use. Isn’t it?

Let me know if you need some more help!

Thanks 

Sent from my iPhone
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAHDMw%2BtpG77PM9PUkH%2BRS8ZnzAZOfEUBewN615qX4VQVvuxpZw%40mail.gmail.com.

Michael Boon

unread,
May 14, 2019, 7:59:40 PM5/14/19
to Python Programming for Autodesk Maya
I don't think MPolyMessage will help here. I haven't done this myself but I think the type of message you need is
OpenMaya.MNodeMessage.addAttributeChangedCallback (
)

I'd be interested to know how you end up solving it.


On Wednesday, 15 May 2019 04:59:26 UTC+10, Alberto Sierra Lozano wrote:

I think that The link that I sent you in the previous post is the one that you should use. Isn’t it?

Let me know if you need some more help!

Thanks 

Sent from my iPhone

On 14 May 2019, at 20:29, Lucid Production <em....@gmail.com> wrote:

I just take a look at MMessage class and there a lot of stuffs inside. But it's a great point to start.
Thank a lot, Robert :)

On Wed, May 15, 2019 at 1:12 AM Robert White <robert...@gmail.com> wrote:
scritpJob is built on top of the MMessage event system that is exposed through the API. So it is capable of doing everything that a scriptJob is, plus has access to some more granular events.
Nothing is stored in userPrefs though, you have to setup the events for each session.


On Tuesday, May 14, 2019 at 12:28:35 PM UTC-5, Lucid Production wrote:
Hi Alberto
I don't have much experience with MayaAPI but is Maya's EventSystem equal to Mel's ScriptJob? ScriptJob store in preference of user's machine, so i don't really like it much

On Wed, May 15, 2019 at 12:02 AM Alberto Sierra Lozano <alberto.s...@gmail.com> wrote:
Hello!

Have you checked the Event system from the Maya API?


Hope it helps!

El martes, 14 de mayo de 2019, 18:42:50 (UTC+2), em....@gmail.com escribió:
Hi everybody, it would be awesome if Maya could tell us if a transform's node being modified or not. I want to connect that's signal to PyQT gui and handle the data.

Is that possible? Thanks

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
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+unsub...@googlegroups.com.

Alberto Sierra

unread,
May 15, 2019, 3:38:12 AM5/15/19
to python_in...@googlegroups.com
Yep, that’s true. I thought that it was talking about Meshes, and not transform. Sorry about that. Btw, what do you mean with “a transform being modified”? An attribute changed?

Sent from my iPhone
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/78ab89ca-79d4-46ac-97e8-a243a25de296%40googlegroups.com.

Lucid Production

unread,
May 15, 2019, 4:24:23 AM5/15/19
to python_in...@googlegroups.com
Hi Alberto, the link you sent me earlier is about MeshComponent, signal when a mesh's component being modified, but as long as there such a MessageClass like that in mayaAPI, then i know i can dive more into it :)

And yes, i think an attribute's changed is more correct way to talk about it. I want to get notify whenever worldMatrix's attribute of an object(the transform node of a mesh for example) is being changed(By translate, rotate or move). I catch that signal, then handle it in my gui.

To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAHDMw%2BtpG77PM9PUkH%2BRS8ZnzAZOfEUBewN615qX4VQVvuxpZw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/78ab89ca-79d4-46ac-97e8-a243a25de296%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/723FABAD-1D31-4E26-B032-571EC81B0204%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

Lucid Production

unread,
May 15, 2019, 4:52:27 AM5/15/19
to python_in...@googlegroups.com
I think  MDagMessage.addWorldMatrixModifiedCallback is the one i'm looking for. Then i can connect it to PySide's instance and call functions of GUI.

Alberto Sierra Lozano

unread,
May 15, 2019, 5:05:10 AM5/15/19
to Python Programming for Autodesk Maya
Just a recommendation. What i usually do, is to remove the callback in the closeEvent.

Something like:

def closeEvent(self, event):
    om.MMesage.removeCallback(self._my_callback_id)
    super(MyClassName, self).closeEvent(event)

Hope it helps!

El miércoles, 15 de mayo de 2019, 10:52:27 (UTC+2), Lucid Production escribió:
I think  MDagMessage.addWorldMatrixModifiedCallback is the one i'm looking for. Then i can connect it to PySide's instance and call functions of GUI.


On Wed, May 15, 2019 at 3:24 PM Lucid Production <em....@gmail.com> wrote:
Hi Alberto, the link you sent me earlier is about MeshComponent, signal when a mesh's component being modified, but as long as there such a MessageClass like that in mayaAPI, then i know i can dive more into it :)

And yes, i think an attribute's changed is more correct way to talk about it. I want to get notify whenever worldMatrix's attribute of an object(the transform node of a mesh for example) is being changed(By translate, rotate or move). I catch that signal, then handle it in my gui.

To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
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+unsub...@googlegroups.com.

--
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+unsub...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

Lucid Production

unread,
May 15, 2019, 5:08:28 AM5/15/19
to python_in...@googlegroups.com
Thank Alberto, this closeEvent from PyQt, right? There are also a fews event from SceneMessage i think i can take advantage as well 


To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
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_m...@googlegroups.com.

--
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_m...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574


--

Tuan Nguyen (Mr) - Team Coordinator

EM.Lucid - Animation Studio
Website  : https://emlucid.wixsite.com/lucidproduction
Tel         : +84 974858574

--
You received this message because you are subscribed to a topic in the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python_inside_maya/n0fjcjQAyWk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/8eca4717-a7e9-4fc6-ad94-a424eb0a13e2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages