On Sun, 21 Jun 2015 3:11 PM Crest Christopher
<[email protected] <mailto:[email protected]>>
wrote:
I'm surprised no one thought of this, they thought of
clearing the output window, not feeding the results else
where, well now the idea is out there.
I don't understand what you mean by no one thinking of this. You
would need to have a specific application of where to route it,
and this isn't the first time the question has been asked about
controlling the output. You can search the history on the topic.
Are you looking to write a specific Sublime plugin that dumps
Maya's output into a tabbed document view?
Justin Israel wrote:
On Sun, 21 Jun 2015 1:06 PM Crest Christopher
<[email protected]
<mailto:[email protected]>> wrote:
Taking a step back, what is going on behind the
scenes with the code you posted ?
1) Create an instance of Qt's QTextEdit class
2) Define a function that matches the proper spec
required for the CommandMessage callback. This function
will receive the message that would go to the script
editor, so that we can direct it elsewhere. In this case
I am just appending it to my own QTextEdit widget.
3) Connect the callback to Maya so it will get called.
Justin Israel wrote:
On Sun, 21 Jun 2015 12:13 PM Crest Christopher
<[email protected]
<mailto:[email protected]>> wrote:
If I wanted to send it to Sublime text 2, I
simply change the output=QtGui.Sublime, so I
can give it a shot ?
Software doesn't work like that. You can't just
make an object in Qt and say
"output=QtGui.Sublime", and expect Qt to know
that it should go out and find a SublimeText2
process, and then tell it to accept text for it
to show in its own view.
In order to get external text flowing into
Sublime, you would need to create a plugin that
opens a socket for Maya to connect to and feed it
data. Or you would need to have Maya log to a
file, which you then have Sublime poll for updates.
Either way, you would have a bit of work to do
beyond just the callback in Maya. That was just a
way to get the hook installed.
Justin Israel wrote:
I don't have a tool to recommend, but
there are a number of ways to hook into
both the logger and the script editor for
different goals. One way is to set up a
callback so that you can tee the output
and direct it into something else:
import maya.OpenMaya as om from PySide
import QtGui # Some alternate target to
receive # Script Editor output OUTPUT =
QtGui.QTextEdit() OUTPUT.show()
OUTPUT.raise_() def callback(msg, *args):
OUTPUT.append(msg.strip()) # Start the
callback cbk_id =
om.MCommandMessage.addCommandOutputFilterCallback(callback)
# Stop the callback
#om.MCommandMessage.removeCallback(cbk_id)
Hopefully that does what you want?
On Sat, Jun 20, 2015 at 12:46 PM
Christopher. <[email protected]
<mailto:[email protected]>> wrote:
Can we not feed what the output
window produces into another output
window with line numbers and such for
easier debugging and cutting and
pasting ? Maybe I'm the only one that
finds the native output window a
little like finding my way though the
Amazonian rain forest.
Anyone know of such a tool in
existence I would be so happy, if
anyone cares about my happiness, that
is !
--
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
[email protected]
<mailto:[email protected]>.
To view this discussion on the web
visit
https://groups.google.com/d/msgid/python_inside_maya/f9b1ce8d-ba72-4ae1-ab7c-ecbc4c2d08ef%40googlegroups.com
<https://groups.google.com/d/msgid/python_inside_maya/f9b1ce8d-ba72-4ae1-ab7c-ecbc4c2d08ef%40googlegroups.com?utm_medium=email&utm_source=footer>.
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/J3RhFyC-pPY/unsubscribe.
To unsubscribe from this group and all
its topics, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0dftbCGz9EgYB7KozM_F-MSm4%2B77bbmKCcFHowWpNOfw%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0dftbCGz9EgYB7KozM_F-MSm4%2B77bbmKCcFHowWpNOfw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/558601BE.40302%40gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/558601BE.40302%40gmail.com?utm_medium=email&utm_source=footer>.
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/J3RhFyC-pPY/unsubscribe.
To unsubscribe from this group and all its
topics, send an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA26fot2t-BytS-d_ikk57J4XmhMxgSodyLKnRrpdkDO3w%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA26fot2t-BytS-d_ikk57J4XmhMxgSodyLKnRrpdkDO3w%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/55860E22.6010102%40gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/55860E22.6010102%40gmail.com?utm_medium=email&utm_source=footer>.
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/J3RhFyC-pPY/unsubscribe.
To unsubscribe from this group and all its topics, send
an email to
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0AXWx0-J8Px7ZXR%3DW%3D6-cr1zMGevkod%3Dzrmc7k2jqEew%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0AXWx0-J8Px7ZXR%3DW%3D6-cr1zMGevkod%3Dzrmc7k2jqEew%40mail.gmail.com?utm_medium=email&utm_source=footer>.
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
[email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/55862B72.9050203%40gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/55862B72.9050203%40gmail.com?utm_medium=email&utm_source=footer>.
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/J3RhFyC-pPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email
to [email protected]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA04_dd97kC7Rg9tjBfsN1xTz60vUiFKvNJRspT-TW0HYA%40mail.gmail.com
<https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA04_dd97kC7Rg9tjBfsN1xTz60vUiFKvNJRspT-TW0HYA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.