ah thanks... that mel wrapper looks like it will help with getting the
values directly from qt using the #1. Is there any documentation about this
notation?

with the other question, i connected the dial to a slider for example, and
this works fine except there appears to be no way to run any command when
the value changes, since none of the maya controls can trigger commands in
response to changes caused by code.




On Sun, Jul 4, 2010 at 9:28 PM, John Creson <[email protected]> wrote:

> actually(refering to the original question), check out the Tips and
> tricks for scripters new to Python section under python in the 2011
> docs...
>
> You can use the createMelWrapper function to register a Python
> function as a MEL procedure. Then, when the MEL procedure is invoked,
> it calls the Python function, passing any arguments it receives and
> returning the function's result.
>
> For more information regarding this function, refer to the melutils.py file
> in:
>
> C:\Program Files\Autodesk\Maya2011\Python\lib\site-packages\maya\mel
>
> You are right in understanding that if you use PyQt, you will need to
> make that llibrary available to all computers that are to use your
> scripts.
>
> The next is a possible off base suggestion:  Maybe your unsupported
> dial can control another supported widget that works in Maya as you
> wish.
>
>
> On Sun, Jul 4, 2010 at 10:37 PM, Jamie Macdougall <[email protected]>
> wrote:
> >
> > Yeah but so messy! I'm currently using a function to query the values of
> the
> > widgets, but this is even more long winded!
> > It's weird, Qt designer combined with loadUI seems like a very powerful
> and
> > fast way to build custom tools, and there is almost no documentation on
> how
> > to use it.
> >
> >
> > Another question...
> > Is there any way to make unsupported widgets like the dial trigger
> commands
> > in Maya?
> > so for example making the dial control the width of a cube dynamically...
> > with the signal/slots they can be connected to supported widgets no
> > problems, but this will not trigger any of the valueChanged type
> commands.
> >
> >
> >
> > Or should I just bite the bullet and go the whole pyQt route? and if I
> do,
> > will that need to be compiled on all the workstation that use the pyqt
> > scripts?
> >
> >
> >
> >
> >
> >
> > On Sun, Jul 4, 2010 at 7:10 PM, John Creson <[email protected]>
> wrote:
> >>
> >> You might want to make a short mel procedure that turns around and
> >> passes the value correctly into a python function.
> >>
> >>
> >>
> >> On Sun, Jul 4, 2010 at 8:43 PM, Jamie Macdougall <[email protected]>
> >> wrote:
> >> > Hi...
> >> >
> >> > Pound one (#1) puts the current widgets value into a dynamic property
> in
> >> > Qt
> >> > Designer
> >> > eg.
> >> >
> >> > property
> >> > -command
> >> >
> >> > value
> >> > someMel #1
> >> >
> >> > but this #1 symbol only seems to work for mel.
> >> >
> >> > Is there an equivalent for python? the pound symbol gives a syntax
> error
> >> > when the command is python.
> >> >
> >> > property
> >> > +enterCommand
> >> >
> >> > value
> >> > "somePython( #1 )"
> >> >
> >> > I've been searching for hours without luck.
> >> >
> >> > --
> >> > http://groups.google.com/group/python_inside_maya
> >>
> >> --
> >> http://groups.google.com/group/python_inside_maya
> >
> > --
> > http://groups.google.com/group/python_inside_maya
>
> --
> http://groups.google.com/group/python_inside_maya
>

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to