lohaart.blogg.se

Maya mel print selection
Maya mel print selection













maya mel print selection maya mel print selection

SaveShelf Custom "/home/drake/maya/8.5-圆4/prefs/shelves/shelf_Custom"

maya mel print selection

PolySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -cuv 2 -ch 1 # NameError: name 'sphere' is not defined 4 None Testing of Python: print "ooxx from python" Testing of MEL: print "ooxx from mel.print" Id = mo.MCommandMessage.addCommandOutputCallback(callback, None) Just register a CommandOutput callback and everytime there is a message, this callback would be invoked.įor Mel’s print and Maya command output: def callback(nativeMsg, messageType, data): For Mel’s print and Maya’s command messages, we need to use CommandMessage.CommandOutputCallback in Maya API.stdout, the default standard output (terminal) to redirect Python’s print. There are 3 types of messages: 1) msgs by Maya itself, 2) msgs from Mel’s print and 3) msgs from Python’s print.All Maya messages have to be correctly redirected to the console. Maya is invoked from a terminal/console as a GUI mode.Actually, there is a likely hot topic ” forcing a custom node’s attribute to compute every dep graph update” in Python Inside Maya group but let’s just skip it and figure out some hacking way to redirect all messages to console/terminal. Well, IMHO, there should be some way to do that Dependency node’s evaluation in standalone mode but we didn’t know that yet. “Some scripts/nodes need GUI’s redrawing to make it re-calculate values, such that we need Maya in GUI mode.”, replied by Timothy. If this was the case, why did we need the GUI? How about invoking Maya as standalone mode and in that way, we all output messages were naturally redirected to console! But it turns to to make sense when you are going to make use of scripts to automatically handle lots of Maya scenes (ex, 100 animation shots, each has more than one Maya scene files!). Because you have already opened a Maya GUI, all you have to do can be done within that GUI though. My first reaction was “What a weird and kinda stupid question?” ‘cause it seems to be non sense to have a GUI mode Maya redirect its message to console. How could we redirect all Maya messages into console or terminal while Maya is invoked in GUI mode? For example, one Python script when invoked inside Maya would output a list of filtered and managed nodes in one Maya scene and after that, we can apply some other programs/scripts on nodes by this message. It seems work well but sometimes, he needs to get output messages from Maya for debugging and other scripts. But there are so many tasks and Maya scene files! He has spent some time preparing several scripts (Mel or Python, but most of them are Python) for that task. Recently, Timothy and I were talking about some interesting about message in Maya.įor daily tasks in Digimax, Timothy has to handle a mass of Maya scene files in batch way such that he can make it on schedule.















Maya mel print selection