Page 1 of 1

BG function called all the time???

Posted: Thu Dec 09, 2010 12:30 pm
by FlorianK
Hi guys,

when I turn on "Echo All Commands" in the Maya script editor this is called in an infinite loop:

Code: Select all

catchQuiet(`rfrkTimerFunc`);
// 0 // 
What's happening there and why are using an infinite loop in the background? I think this is by no means the way things should be implemented in software!

Re: BG function called all the time???

Posted: Thu Dec 09, 2010 6:00 pm
by Mihnea
What happens is that the Maya control that we use for the camera and magnitude curve attributes is broken. That function is a hack which works around their bug by explicitly copying some values around. Normally this would have been done in a value change event, but no such event is provided by Maya, so instead we run this command every second. It's not run continuously and it barely does any work, so it shouldn't impact the Maya performance in any way.

I also have lots of ideas about how software should be written, including that software shouldn't have bugs, but nobody seems to care what I think on that matter. As a result, everything has bugs, and occasionally we have to do horrible hacks like this one to work around those bugs.

Re: BG function called all the time???

Posted: Fri Dec 10, 2010 1:17 pm
by FlorianK
Hey, i didn't want to criticize you. All apologies. I was only wonering because it feels a bit uncanny when "Echo All commands" is turned on because one's looking for an error and then the output is filled with some "strange" notifications.