Re: [Maya-Python] Display QQmlApplicationEngine

2018-07-30 Thread Ruchit Bhatt
I did few test with QQMLAPPLICATIONENGINE outside Maya & everything works fine. 
Problem with Maya is, If I use
app = QApplication(sys.argv)

Maya give a error
# Error: RuntimeError: A QApplication instance already exists. #

I have no idea how to show QQmlApplicationEngine window in Maya..Many people 
use QQuickView.show() but I found QQmlApplicationEngine is more powerful than 
QQuickView.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/27876642-e29c-4aa7-b323-7d17fc80ec62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Display QQmlApplicationEngine

2018-07-30 Thread Ruchit Bhatt
How to run & display QQmlApplicationEngine in Maya using PySide2?
Here is my code

class Ball(QObject):
def __init__(self):
QObject.__init__(self)

@Slot(int) 
def add(arg1):
mc.polySphere(r=arg1)


engine = QQmlApplicationEngine()
ball = Ball()
engine.rootContext().setContextProperty("ball", ball)
engine.load(QUrl.fromLocalFile("E:/code/QML/sphere.qml"))


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/d1a58266-9ab4-4ce9-ad4e-463a8e850d5b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Multiprocessing Returns New Maya Instance

2018-07-18 Thread Ruchit Bhatt

On Wednesday, July 18, 2018 at 1:45:39 PM UTC+5:30, Justin Israel wrote:
>
>
> If you don't need to send stdin to your process, no need to create a pipe. 
> And you should use communicate to avoid a deadlock of your child process 
> produces lots of stdout and stderr. 
>
> Thanks for this tips, i was not aware of it.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/8c616319-daa7-43d0-a38f-aada7591d013%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Multiprocessing Returns New Maya Instance

2018-07-18 Thread Ruchit Bhatt
I tried your example & its working fine. Thanks

*In script Editor*
import subprocess
import cPickle

mayapy_path = r'C:/Program Files/Autodesk/Maya201x/bin/mayapy.exe'
script_path = r'E:/multi_test.py'

proc_obj = subprocess.Popen(mayapy_path + ' ' + script_path + ' -po', stdin=
subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = cPickle.load(proc_obj.stdout)
print result

*multi_test.py*
import multiprocessing
from time import time
import cPickle
import sys

## Simple func to eat up cpu power.
def whileFunc(z):
while z < 10:
z += 1 
return z

if __name__ == "__main__":
## Get current time 
currtime = time()

## How often to run (just a test value)
N = 1
## Just a list with 1s 
myList = [1]*N

nrOfProcessors = multiprocessing.cpu_count() 

## Set our pool of processors 
po = multiprocessing.Pool(nrOfProcessors)

## create the threads 
res = po.map_async(whileFunc, myList)

## If we pass a -po flag, pickle the output and write it out
if '-po' in sys.argv[1:]:
results = len(res.get())
cPickle.dump(results, sys.stdout, -1)
sys.stdout.flush()
sys.exit(0)

print 'This value below should be a 1000:'
print len(res.get())
print 'time elapsed:', time() - currtime


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/2f4122d0-ff64-4ba9-8bfa-71e7bad7f0f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Multiprocessing Returns New Maya Instance

2018-07-17 Thread Ruchit Bhatt
This way ?
>
> import platform
>
> import multiprocessing
>
> if platform.system() == 'Windows':
> multiprocessing.set_executable("C:/Program
> Files/Autodesk/Maya201x/bin/mayapy.exe")
> elif platform.system() == 'Linux':
> multiprocessing.set_executable('/usr/Autodesk/maya201x/bin/mayapy')
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/cacf4c80-cacc-4593-857a-509782ba7a87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Multiprocessing Returns New Maya Instance

2018-07-17 Thread Ruchit Bhatt
Hi,
I tried multiprocessing module in maya python with basic example and every 
time it returns new maya instance plus 

object of multiprocessing.Queue() returns nothing on object.get()
is python interpreter is not a separate process in Maya ?
please share efficient example on how to deal with multiprocessing in Maya.
Thank you

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ca05daed-3c24-43de-829c-9ca8aa2f7725%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MayaPy Cython Import Error

2017-12-01 Thread Ruchit Bhatt
Using below code i am able to convert *.py to *.pyd. And script editor are 
also importing properly. Now tell me how to extract *.egg ? so that i can 
use cython without
sys.path.append...Will do more test with PyQt/Pyside. I hope it will work 
fine. 
Thank you

import sys
sys.path.append("C:\Program 
Files\Autodesk\Maya2017\Python\Lib\site-packages\Cython-0.27.3-py2.7-win-amd64.egg"
)

import cython
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext

setup(
cmdclass = {'build_ext': build_ext},
ext_modules = [
Extension("randomNumber", ["randomNumber.pyx"]),
Extension("additionNumber", ["additionNumber.pyx"]),
]
)


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/e01ff811-0261-4925-8d6c-01594892067a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MayaPy Cython Import Error

2017-12-01 Thread Ruchit Bhatt
copying build\lib.win-amd64-2.7\cython.py -> build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\pyximport
copying build\lib.win-amd64-2.7\pyximport\pyxbuild.py -> 
build\bdist.win-amd64\egg\pyximport
copying build\lib.win-amd64-2.7\pyximport\pyximport.py -> 
build\bdist.win-amd64\egg\pyximport
copying build\lib.win-amd64-2.7\pyximport\__init__.py -> 
build\bdist.win-amd64\egg\pyximport
byte-compiling build\bdist.win-amd64\egg\Cython\Build\BuildExecutable.py to 
BuildExecutable.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Cythonize.py to 
Cythonize.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Dependencies.py to 
Dependencies.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Distutils.py to 
Distutils.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Inline.py to 
Inline.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\IpythonMagic.py to 
IpythonMagic.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Tests\TestInline.py 
to TestInline.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Build\Tests\TestIpythonMagic.py to 
TestIpythonMagic.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Build\Tests\TestStripLiterals.py to 
TestStripLiterals.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\Tests\__init__.py to 
__init__.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Build\__init__.py to 
__init__.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\CodeWriter.py to 
CodeWriter.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\AnalysedTreeTransforms.py to 
AnalysedTreeTransforms.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Annotate.py to 
Annotate.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\AutoDocTransforms.py to 
AutoDocTransforms.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Buffer.py to 
Buffer.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Builtin.py to 
Builtin.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\CmdLine.py to 
CmdLine.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Code.py to Code.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\CodeGeneration.py 
to CodeGeneration.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\CythonScope.py to 
CythonScope.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\DebugFlags.py to 
DebugFlags.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Errors.py to 
Errors.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\ExprNodes.py to 
ExprNodes.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\FlowControl.py to 
FlowControl.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\FusedNode.py to 
FusedNode.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Future.py to 
Future.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Interpreter.py to 
Interpreter.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Lexicon.py to 
Lexicon.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Main.py to Main.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\MemoryView.py to 
MemoryView.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\ModuleNode.py to 
ModuleNode.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Naming.py to 
Naming.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Nodes.py to 
Nodes.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Optimize.py to 
Optimize.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Options.py to 
Options.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\ParseTreeTransforms.py to 
ParseTreeTransforms.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Parsing.py to 
Parsing.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Pipeline.py to 
Pipeline.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\PyrexTypes.py to 
PyrexTypes.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Pythran.py to 
Pythran.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Scanning.py to 
Scanning.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\StringEncoding.py 
to StringEncoding.pyc
byte-compiling build\bdist.win-amd64\egg\Cython\Compiler\Symtab.py to 
Symtab.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestBuffer.py to 
TestBuffer.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestCmdLine.py to 
TestCmdLine.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestFlowControl.py to 
TestFlowControl.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestGrammar.py to 
TestGrammar.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestMemView.py to 
TestMemView.pyc
byte-compiling 
build\bdist.win-amd64\egg\Cython\Compiler\Tests\TestParseTreeTransforms.py 
to TestParseTreeTransforms.pyc
byte-compiling 

Re: [Maya-Python] MayaPy Cython Import Error

2017-12-01 Thread Ruchit Bhatt


*Quick Hack >>>For Include *
   C:\Program 
Files\Autodesk\Maya2017\bin\python27.zip\distutils\sysconfig.py
   under get_python_inc function 
elif os.name == "nt":
return "C:/Program Files/Autodesk/Maya2017/include/python2.7/"

*>>>For Lib*
   made folder C:\Program Files\Autodesk\Maya2017\Python\libs and 
copied "*python27.lib*" in that

and then


D:\Tech\Cython-0.27.3>"C:\Program Files\Autodesk\Maya2017\bin\mayapy" setup.py 
install


Unable to find pgen, not compiling formal grammar.
running install
install_dir C:\Program Files\Autodesk\Maya2017\Python\Lib\site-packages\
running bdist_egg
running egg_info
writing Cython.egg-info\PKG-INFO
writing top-level names to Cython.egg-info\top_level.txt
writing dependency_links to Cython.egg-info\dependency_links.txt
writing entry points to Cython.egg-info\entry_points.txt
reading manifest file 'Cython.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '2to3-fixers.txt'
warning: no files found matching 'Doc\*'
warning: no files found matching '*.pyx' under directory 
'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 
'Cython\Debugger\Tests'
warning: no files found matching '*.pxd' under directory 'Cython\Utility'
writing manifest file 'Cython.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
creating build\bdist.win-amd64
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\Cython
creating build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\BuildExecutable.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\Cythonize.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\Dependencies.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\Distutils.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\Inline.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\Build\IpythonMagic.py -> 
build\bdist.win-amd64\egg\Cython\Build
creating build\bdist.win-amd64\egg\Cython\Build\Tests
copying build\lib.win-amd64-2.7\Cython\Build\Tests\TestInline.py -> 
build\bdist.win-amd64\egg\Cython\Build\Tests
copying build\lib.win-amd64-2.7\Cython\Build\Tests\TestIpythonMagic.py -> 
build\bdist.win-amd64\egg\Cython\Build\Tests
copying build\lib.win-amd64-2.7\Cython\Build\Tests\TestStripLiterals.py -> 
build\bdist.win-amd64\egg\Cython\Build\Tests
copying build\lib.win-amd64-2.7\Cython\Build\Tests\__init__.py -> 
build\bdist.win-amd64\egg\Cython\Build\Tests
copying build\lib.win-amd64-2.7\Cython\Build\__init__.py -> 
build\bdist.win-amd64\egg\Cython\Build
copying build\lib.win-amd64-2.7\Cython\CodeWriter.py -> 
build\bdist.win-amd64\egg\Cython
creating build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\AnalysedTreeTransforms.py 
-> build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Annotate.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\AutoDocTransforms.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Buffer.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Builtin.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\CmdLine.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Code.pxd -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Code.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Code.pyd -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\CodeGeneration.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\CythonScope.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\DebugFlags.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Errors.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\ExprNodes.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\FlowControl.pxd -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\FlowControl.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\FlowControl.pyd -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\FusedNode.py -> 
build\bdist.win-amd64\egg\Cython\Compiler
copying build\lib.win-amd64-2.7\Cython\Compiler\Future.py -> 

Re: [Maya-Python] MayaPy Cython Import Error

2017-12-01 Thread Ruchit Bhatt
From...https://pypi.python.org/pypi/Cython/

i got source-code(Cython-0.27.3.tar.gz).
After that i tried to build for mayapy, And i got this error.





May be environment variable missing or something need to tweak in source 
..Any idea how to fix this ??


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/5b084cf2-4d9a-4de6-9d22-02dac4b41391%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] MayaPy Cython Import Error

2017-11-29 Thread Ruchit Bhatt


On Thursday, November 30, 2017 at 10:53:44 AM UTC+5:30, Justin Israel wrote:
>
>
>
> It appears that it isn't finding cython in the PYTHONPATH when you are 
> running mayapy. Can you manually confirm the install location of cython? 
> Can you also try something like this (sorry if the syntax is wrong. I dont 
> use windows):
>
> mayapy -c "import cython; print cython"
>
> Presumably if it could find cython on your PYTHONPATH, then it should 
> compile an extension which could then be imported within Maya.
>  
>













I think it's weird  

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/9219a24d-7145-4a78-9311-649ad36abaf3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] MayaPy Cython Import Error

2017-11-29 Thread Ruchit Bhatt
Hi,
How to convert python module to *.pyd using cython ?

I am using Maya 2017 Up 4, And in that i installed cython with below step

> C:\Program Files\Autodesk\Maya2017\bin>mayapy ez_setup.py
> C:\Program Files\Autodesk\Maya2017\bin>mayapy get-pip.py
> C:\Program Files\Autodesk\Maya2017\Python\Scripts>pip install setuptools 
> --upgrade
> C:\Program Files\Autodesk\Maya2017\Python\Scripts>pip install cython
>
>
After that i followed this link Hello Cython in Maya 



*Setup.py*

  ]

*Terminal Error*



*But works fine in script editor*



So how to compile *.py to *.pyd for maya  and make a use in scriptEditor ?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/c95137c2-5202-41a1-95d2-c7c1384f9a5e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: Access Maya UI in Qt way using Python API

2017-09-25 Thread Ruchit Bhatt
First hack with node editor

See this 
Maya Align Nodes (PySide) 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/3e200299-6d49-4ec4-9b3d-7f55581223d5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: Access Maya UI in Qt way using Python API

2017-09-21 Thread Ruchit Bhatt
@Alok Gandhi

I tried that example (working fine), And based on that i also tried below 
lines












This one also working fine, but tell me one thing. Why sceneEditor widget 
is missing under list of "*referenceEditorPanel1referenceEditorPanel*" 
children ??

how to query that list ??


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/de4faf22-d5c9-45b2-a129-18a9bcd6f647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: Access Maya UI in Qt way using Python API

2017-09-09 Thread Ruchit Bhatt
@Mahendra Gangaiwar
Thnx
dict((w.objectName(), w) for w in QtWidgets.QApplication.allWidgets())
dict((w.objectName(), w) for w in QtWidgets.QApplication.allWindows())


is super useful to get objectName of all instance.But


mm.eval('GraphEditor')
 Ge = QtWidgets.QApplication.activeWindow()
 print Ge.windowTitle()
 Ge.setWindowOpacity(0.5)


This is still not working  (print Ge.windowTitle()   #Result Script Editor)




Let's take one more example, in ReferenceEditor if i want to select 
*item02*(i.e 
Test03RN Test03.ma) & *item03*(i.e Test04RN Test04.ma)  inside 
*refEdEditorPane. 
*How can i do that via PySide  ??


*Before*
























*After*



-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/7554380e-aec4-445c-bfc8-7fff04a3d9ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Access Maya UI in Qt way using Python API

2017-09-06 Thread Ruchit Bhatt
See this basic test

import maya.cmds as mc
import maya.mel as mm
import maya.OpenMayaUI as omUI
from PySide import QtGui, QtCore
from shiboken import wrapInstance

mm.eval('GraphEditor')


def getGraphEdtr():
graphEdtrPtr = omUI.MQtUtil.findLayout(
"graphEditor1Window|TearOffPane|graphEditor1")
return wrapInstance(long(graphEdtrPtr), QtGui.QWidget)

graphEdtr = getGraphEdtr()
graphEdtr.setWindowOpacity(0.4)


No idea why its not working 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ccf3f5ba-c641-485a-8aa3-65a9a6a7a3d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Access Maya UI in Qt way using Python API

2017-09-06 Thread Ruchit Bhatt
@Simon 
I know how PyQt/Pyside works, What i want to know is "How to modify 
pre-exist Maya UI element ?". 

for instance
*Add custom action in QMenu of nodeEditor, GraphEditor,etc.
*Trigger QDialog on middle click to any node inside node editor.
*Set X & Y position of selected node inside node editor.
*Custom drop down menu in shelf.
*Modify font style in outliner.

using wrapInstance can i do this ??

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/c5f10ffe-f112-4860-af12-71338ceb05ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] QStyledItemDelegate Draw/Call

2017-08-12 Thread Ruchit Bhatt
Justin, QListWidget.setItemWidget is indeed useful. Thank you for pointing 
me towards it. Pls check the attached image which is a successful 
implementation on this technique. 
On a different thought, i would still like to implement a modelView based 
workflow in order to benefit from managing data dynamically, any thoughts 
on that?




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/82c57211-4245-47de-89a7-70d8420dd2e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] QStyledItemDelegate Draw/Call

2017-08-11 Thread Ruchit Bhatt


Hi,

need help to draw custom styled delegate for list view





















How to inject QPushButton, QRect, QLabel, etc. in QStyledItemDelegate 
paint() and how to trigger external function on delegate interaction.? 


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ce941c89-d711-4cd3-85f5-cee989f94697%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] PyQt Table Header Align

2017-06-07 Thread Ruchit Bhatt
@Justin
Using info from given link, i m able to rotate header but size of header is 
still not proper.
Any idea how to fix that?? 
see attach file for code.

Thank you

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f68cc74e-1b97-432e-89ab-55fef0536182%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# -*- coding: utf-8 -*-
from PyQt4 import QtCore, QtGui

try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s

try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)


class customHorizontalHeader(QtGui.QHeaderView):
def __init__(self,orientation=QtCore.Qt.Horizontal, parent=None):
super(customHorizontalHeader, self).__init__(orientation, parent)
self.setResizeMode(0)
def paintSection(self, painter, rect, logicalIndex):
self.matrix = QtGui.QMatrix()
#self.matrix.translate(rect.x(),rect.y())
self.matrix.rotate(-90)
painter.setWorldMatrix(self.matrix)
rect.moveCenter(QtCore.QPoint(-rect.center().y(), rect.center().x()))
painter.drawText(rect, QtCore.Qt.AlignCenter, self.model().headerData(logicalIndex, QtCore.Qt.Horizontal).toString())


class Ui_MainWindow(object):
def __init__(self, *args, **kwargs):
super(Ui_MainWindow, self).__init__(*args, **kwargs)
self.model = QtGui.QStandardItemModel()
self.model.setHorizontalHeaderLabels(['Name', 'Age', 'Sex', 'Add', 'HelloWorld'])
self.model.setVerticalHeaderLabels(['V1','V2','V3','V4','V5'])
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(611, 547)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.junkTableView = QtGui.QTableView(self.centralwidget)
self.junkTableView.setObjectName(_fromUtf8("junkTableView"))
self.junkTableView.setModel(self.model)
self.myHeader = customHorizontalHeader()
self.myHeader.setResizeMode(3)
self.junkTableView.setHorizontalHeader(self.myHeader)
self.verticalLayout.addWidget(self.junkTableView)
MainWindow.setCentralWidget(self.centralwidget)

self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)

def retranslateUi(self, MainWindow):
MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))


if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())



Re: [Maya-Python] PyQt Table Header Align

2017-06-03 Thread Ruchit Bhatt
Qt Alignment has option like
AlignLeft, AlignRight, AlignHCenter, AlignJustify, AlignAbsolute, AlignTop, 
AlignBottom, AlignVCenter, AlignCenter

still no idea about how to rotate, 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/ff31c581-f0e6-4956-8a7e-716cd4b193eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] PyQt Table Header Align

2017-06-02 Thread Ruchit Bhatt


Hi,
How to align column header in tableView or tableWidget vertically like in 
Maya weight editor ??


See this





-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/54f921d9-1a99-49e6-8c0b-6c8b638f8cd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] MTOA vector3 metadata

2017-05-12 Thread Ruchit Bhatt
HI,
how can i export vector3 variables as metadata in MTOA ??


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/697284df-a92a-4df7-9663-b6332b4789ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Sliding QStackedWidget

2017-05-08 Thread Ruchit Bhatt
How to slide  QStackedWidget page with QEasingCurve ??
>From one page to another with smooth animCurve.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/505ca8f3-6d61-4526-bc35-0d24972feaa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Photoshop/Gimp to PyQt

2017-04-30 Thread Ruchit Bhatt
Oh i thought, it will export layer style detail as stylesheet. export to 
*.png is useless.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/df25622e-39c4-49ae-b334-ac7c54394b6c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Photoshop/Gimp to PyQt

2017-04-29 Thread Ruchit Bhatt
I saw some youtube videos on styling QT via Photoshop/Gimp and it looks 
mind boggling.
I want to know that is it possible to do same using current Maya PySide 2 
version ???  If you following this method then please share your workflow 
here.

Links
Styling Qt Quick Controls 2 with Photoshop 

Photoshop to QML exporter 
GimpExport 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/74b19b9e-4ea1-44a0-bac2-5cfe9bfc8c9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Exclude QFileSystemModel.setNameFilters

2016-12-06 Thread Ruchit Bhatt
Basically i am looking for list of files with their path,

def fileListFn(self, srcRow, srcParent):
idx = self.sourceModel().index(srcRow, 0, srcParent)
filePath = self.sourceModel().filePath(idx)
if os.path.isfile(filePath):
print filePath

Issue with above function is, 
it returns same value multiple times and to print  all files you will need 
to expand all

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f6a21762-a6f1-4715-b920-34c51c502f73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Re: Exclude QFileSystemModel.setNameFilters

2016-12-05 Thread Ruchit Bhatt
I tried 

print self.proxyModel.rowCount()  #works fine but its not  recursive

and
   
 print self.proxyModel.rowCount(parent=QtCore.QModelIndex())#Gives error


how you are able to use parent outside class ??

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/cb3a247a-df03-4a17-826a-987085855d3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Exclude QFileSystemModel.setNameFilters

2016-12-05 Thread Ruchit Bhatt

>
> @Marcus & Justin
>
Thnx for help, filter part is working fine now .
Need help for one more thing, how to get list of all files recursively 
after filter done??

i tried rowCount method with proxy class but nothing works ??
 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/98c937f3-4cac-463e-a62e-bb37999e5d72%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Exclude QFileSystemModel.setNameFilters

2016-12-01 Thread Ruchit Bhatt
@Justin 

Instead of 
name = idx.data()

for exc in self._excludes: 
if name.endswith(exc):
return False

Below one is simple & perfect in my case, wht do you think ??
fileType = self.sourceModel().fileInfo(idx).suffix()
for exc in self._excludes: 
if exc == fileType:
return False


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/a56baa41-72fc-4be7-9cb6-6c38d0e175dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Maya-Python] Exclude QFileSystemModel.setNameFilters

2016-11-30 Thread Ruchit Bhatt

>
> @Marcus...Tell me, below code is going in right direction or not ??

Thank you

class customProxyModel(QtGui.QSortFilterProxyModel):
def __init__(self, parent=None):
super(customProxyModel, self).__init__(parent)
self._includes = {'fileName':[], 'fileType':[], 'fileSize':[], 
'fileDate':[]}
self._excludes = {'fileName':[], 'fileType':[], 'fileSize':[], 
'fileDate':[]}

def add_exclusion(self, role, value):
self._add_rule(self._excludes, role, value)
def remove_exclusion(self, role, value=None):
self._remove_rule(self._excludes, role, value)
def set_exclusion(self, rules):
self._set_rules(self._excludes, rules)
def clear_exclusion(self):
self._clear_group(self._excludes)

def add_inclusion(self, role, value):
self._add_rule(self._includes, role, value)
def add_inclusion(self, role, value):
self._remove_rule(self._includes, role, value)
def set_inclusion(self, rules):
self._set_rules(self._includes, rules)
def clear_inclusion(self):
self._clear_group(self._includes)

def _add_rule(self, group, role, value):
group[role].append(value)
self.invalidate()
def _remove_rule(self, group, role, value):
group[role].remove(value)
self.invalidate()
def _set_rules(self, group, rules):
group.clear()
for rule in rules:
self._add_rule(group, *rule)
self.invalidate()
def _clear_group(self, group):
group.clear()
self.invalidate()

def filterAcceptsRow(self, srcRow, srcParent):
idx = self.sourceModel().index(srcRow, 0, srcParent)
filePath = self.sourceModel().filePath(idx)
fileDate = self.sourceModel().fileInfo(idx).lastModified()
fileSize = self.sourceModel().fileInfo(idx).size()
fileLongName = idx.data()

for exc in self._excludes:
if fileLongName.endswith(exc):
return False

for fileKey, fileValue in self._excludes.items():
for value in fileValue:
if fileKey == 'fileName':
if fileLongName.endswith(fileLongName.endswith(value)):
return False
elif fileKey == 'fileType':
if fileLongName.endswith(fileLongName.endswith(value)):
return False
elif fileKey == 'fileSize':
if fileLongName.endswith(fileLongName.endswith(value)):
return False
elif fileKey == 'fileDate':
if fileLongName.endswith(fileLongName.endswith(value)):
return False


for fileKey, fileValue in self._includes.items():
for value in fileValue:
if fileKey == 'fileName':
if fileLongName.endswith(fileLongName.endswith(value)):
return True
elif fileKey == 'fileType':
if fileLongName.endswith(fileLongName.endswith(value)):
return True
elif fileKey == 'fileSize':
if fileLongName.endswith(fileLongName.endswith(value)):
return True
elif fileKey == 'fileDate':
if fileLongName.endswith(fileLongName.endswith(value)):
return True
return True

 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/c8a7956d-d833-460f-b997-8a04a7930adf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: Exclude QFileSystemModel.setNameFilters

2016-11-08 Thread Ruchit Bhatt





thnx for reply, will chck your code and here is snapshot of UI. On click to 
export button all files in treeview will be pack in *.tar file.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/547efa98-9b4e-44bf-9f5c-488acfe974a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Exclude QFileSystemModel.setNameFilters

2016-11-07 Thread Ruchit Bhatt
Hi,
if i run below lines, QFileSystemModel will keep files with extension 
xml,txt & mel.
But i want invert of this..(i.e i want to remove xml, txt & mel from 
QFileSystemModel)
So tell me how to do this ??

self.dirModel.setNameFilters(['*.xml', '*.txt', '*.mel'])
self.dirModel.setNameFilterDisables(False)





-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/f2730d5e-9cdf-4041-b9dd-8c2bfa984efd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] PyQt/PySide 3D-Coordinates To Direction Button

2016-04-20 Thread Ruchit Bhatt
Hi,
In PyQt/PySide how can i make spherical joystick kind of button ?? like 
zbrush light direction UI
I have polygon arrow model at origin, And i want to control direction of 
arrow using this kind of button.

I think Spherical Coordinates system will be useful to create this.
i.e
x=ρsinϕcosθ
(8)
y=ρsinϕsinθ
(9)
z=ρcosϕ

ρ=x2+y2+z2−−√
(11)
tanθ=yx
(12)
cosϕ=zx2+y2+z2−−√














Give me your inputs
Thank you

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/96102822-49da-4f45-ba90-fed1143f54df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] How To Set PerParticle Attribute Using MFnField

2016-03-20 Thread Ruchit Bhatt
Hi,
How can i set perParticle attribute using MFnField ??
for example, set lifespanPP, radiusPP, etc. to certain value if particle 
enter or leave volume.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/bcb4ee7a-e47c-4534-b7a2-8c4c40c03091%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] Re: PyGame Installation

2016-02-17 Thread Ruchit Bhatt
Hi,
is it possible to install any python package through script editor using 
easy_install setuptools??


https://pypi.python.org/pypi/setuptools


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/749c6556-2a90-44e7-9454-53a57aa90b1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Maya-Python] PyGame Installation

2016-02-16 Thread Ruchit Bhatt
Hi, Need help to install PyGame module for Maya 2016 x64.

I downloaded 64bit PyGame Lib from Christoph Gohlke PY LIB 

site and i installed successfully in "C:\Python27" using "pip install 
*.whl" command.
After that i copied PyGame folder from "C:\Python27\Lib\site-packages" & 
paste in "C:\Program Files\Autodesk\Maya2016\Python\Lib\site-packages".

And then run import pygame in Maya script editor & got below error
# Error: ImportError: file C:\Program 
Files\Autodesk\Maya2016\Python\lib\site-packages\pygame\__init__.py line 
142: DLL load failed: The specified module could not be found. # 


it works fine in python shell, only problem is inside Maya.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/140997d6-291a-4d6e-a24b-b6549d5460ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.