Maya 2017 executeDeferred running twice???

69 views
Skip to first unread message

Benjam901

unread,
Jun 13, 2017, 5:33:54 AM6/13/17
to Python Programming for Autodesk Maya
Hello all,

I am having a little trouble this morning with my userSetup script for the tools here at work.

So I leave work yesterday, everything is fine, toolbar is being loaded fine. Come in this morning to find a shiny new Maya update, download and install and boom my toolbar is loading twice.

After running some tests turns out that the mayautils.executeDeferred(function) call is running twice. 

Has anyone else experienced such things today I am struggling to find the root cause at the moment.

Cheers,

Ben

Benjam901

unread,
Jun 13, 2017, 5:45:28 AM6/13/17
to Python Programming for Autodesk Maya
It was Maya update 4 btw :)

Justin Israel

unread,
Jun 13, 2017, 8:33:37 AM6/13/17
to Python Programming for Autodesk Maya

So if you simplify it to a single call to executeDeferred(), in the script editor, you will see it run your target function twice? It isn't a case of running your own code containing the executeDeferred call, twice?

Justin


--
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/bd2b55cd-be91-4b38-a0ae-99e6e0bc9098%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Benjam901

unread,
Jun 13, 2017, 8:50:58 AM6/13/17
to Python Programming for Autodesk Maya
I tested this train of thought by adding a small print function into the default system documents/maya/2017/scripts folder. It only ran once. Issue is where it is running from twice I do not know. I have searched the entire repo for both runUserSetup (which is my main function) and executeDeferred and they are both only present in the user setup file.

Some people here are on yesterdays Maya version and everything is totally ok with them, I must investigate further. Is there anything in the Maya ENV variables that I could be accidentally triggering twice?


On Tuesday, 13 June 2017 14:33:37 UTC+2, Justin Israel wrote:

So if you simplify it to a single call to executeDeferred(), in the script editor, you will see it run your target function twice? It isn't a case of running your own code containing the executeDeferred call, twice?

Justin


On Tue, Jun 13, 2017, 9:45 PM Benjam901 <benandr...@gmail.com> wrote:
It was Maya update 4 btw :)


On Tuesday, 13 June 2017 11:33:54 UTC+2, Benjam901 wrote:
Hello all,

I am having a little trouble this morning with my userSetup script for the tools here at work.

So I leave work yesterday, everything is fine, toolbar is being loaded fine. Come in this morning to find a shiny new Maya update, download and install and boom my toolbar is loading twice.

After running some tests turns out that the mayautils.executeDeferred(function) call is running twice. 

Has anyone else experienced such things today I am struggling to find the root cause at the moment.

Cheers,

Ben

--
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.

Ben Hearn

unread,
Jun 13, 2017, 10:45:33 AM6/13/17
to python_in...@googlegroups.com
ExecuteDeferred inside the script editor only fires once so it seems to be ok. I can work around the problem by setting an isUSerSetupComplete flag and returning if True but this is not a solution just a workaround. It is a very odd issue to have right now

On 13 June 2017 at 14:50, Benjam901 <benandr...@gmail.com> wrote:
I tested this train of thought by adding a small print function into the default system documents/maya/2017/scripts folder. It only ran once. Issue is where it is running from twice I do not know. I have searched the entire repo for both runUserSetup (which is my main function) and executeDeferred and they are both only present in the user setup file.

Some people here are on yesterdays Maya version and everything is totally ok with them, I must investigate further. Is there anything in the Maya ENV variables that I could be accidentally triggering twice?

On Tuesday, 13 June 2017 14:33:37 UTC+2, Justin Israel wrote:

So if you simplify it to a single call to executeDeferred(), in the script editor, you will see it run your target function twice? It isn't a case of running your own code containing the executeDeferred call, twice?

Justin


On Tue, Jun 13, 2017, 9:45 PM Benjam901 <benandr...@gmail.com> wrote:
It was Maya update 4 btw :)


On Tuesday, 13 June 2017 11:33:54 UTC+2, Benjam901 wrote:
Hello all,

I am having a little trouble this morning with my userSetup script for the tools here at work.

So I leave work yesterday, everything is fine, toolbar is being loaded fine. Come in this morning to find a shiny new Maya update, download and install and boom my toolbar is loading twice.

After running some tests turns out that the mayautils.executeDeferred(function) call is running twice. 

Has anyone else experienced such things today I am struggling to find the root cause at the moment.

Cheers,

Ben

--
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+unsubscribe@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/PlY9aobjWgA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a4c837a0-96a6-46ca-811b-c1720f1b544c%40googlegroups.com.

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



--

Tel - +46 76245 92 90 (Sweden)

Michael Boon

unread,
Jun 13, 2017, 10:12:34 PM6/13/17
to Python Programming for Autodesk Maya
There are some changes to workspaceControl commands in the new update that might have side-effects like that, so perhaps that's what you're seeing. In your case, perhaps your toolbar is being loaded once by something in your prefs (ie, Maya saved it to your prefs) and a second time by your userSetup script.


On Wednesday, 14 June 2017 00:45:33 UTC+10, Benjam901 wrote:
ExecuteDeferred inside the script editor only fires once so it seems to be ok. I can work around the problem by setting an isUSerSetupComplete flag and returning if True but this is not a solution just a workaround. It is a very odd issue to have right now
On 13 June 2017 at 14:50, Benjam901 <benandr...@gmail.com> wrote:
I tested this train of thought by adding a small print function into the default system documents/maya/2017/scripts folder. It only ran once. Issue is where it is running from twice I do not know. I have searched the entire repo for both runUserSetup (which is my main function) and executeDeferred and they are both only present in the user setup file.

Some people here are on yesterdays Maya version and everything is totally ok with them, I must investigate further. Is there anything in the Maya ENV variables that I could be accidentally triggering twice?

On Tuesday, 13 June 2017 14:33:37 UTC+2, Justin Israel wrote:

So if you simplify it to a single call to executeDeferred(), in the script editor, you will see it run your target function twice? It isn't a case of running your own code containing the executeDeferred call, twice?

Justin


On Tue, Jun 13, 2017, 9:45 PM Benjam901 <benandr...@gmail.com> wrote:
It was Maya update 4 btw :)


On Tuesday, 13 June 2017 11:33:54 UTC+2, Benjam901 wrote:
Hello all,

I am having a little trouble this morning with my userSetup script for the tools here at work.

So I leave work yesterday, everything is fine, toolbar is being loaded fine. Come in this morning to find a shiny new Maya update, download and install and boom my toolbar is loading twice.

After running some tests turns out that the mayautils.executeDeferred(function) call is running twice. 

Has anyone else experienced such things today I am struggling to find the root cause at the moment.

Cheers,

Ben

--
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/PlY9aobjWgA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a4c837a0-96a6-46ca-811b-c1720f1b544c%40googlegroups.com.

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