[Maya-Python] Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
Hey folks I am running Maya 2014 os windows 8.1 64 bits. I have dowloaded python PIL from this URL and have installed the folder with the files in ...maya2014/python/Lib/site-packages/ Here is my script : impo

Re: [Maya-Python] Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
On Tue, Mar 3, 2015 at 5:13 PM, francois bonnard > wrote: > >> Hey folks >> >> I am running Maya 2014 os windows 8.1 64 bits. >> >> I have dowloaded python PIL from this URL >> <https://mistermatti.wordpress.com/2014/02/04/maya-2014-with-pyt

Re: [Maya-Python] Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
> > > I got this message : # Error: line 1: unindent does not match any outer > indentation level # > I guess I made a wrong indent somewhere ? import os import maya.cmds as cmds from PIL import Image #change the path here path = "/Users/francesco/Desktop/selectionMaya" #list the items in t

[Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
cmds.connectAttr('%s.outColor' %file_node, '%s.color' %shader) cmds.select(mesh) cmds.hyperShade( assign=shader) Le mardi 3 mars 2015 17:13:41 UTC+1, francois bonnard a écrit : > > Hey folks > > I am running Maya 2014 os windows 8.1 64 bits. > &g

[Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
I wonder if i need to install also python 2.6 on my computer ? Le mardi 3 mars 2015 17:45:07 UTC+1, francois bonnard a écrit : > > better : cannot open# Error: line 1: NameError: file line > 18: name 'img' is not defined # > > with this code > > import os > i

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
> > is a Mac one. > > maybe it should be “C://something" > > > On 03 Mar 2015, at 16:56, francois bonnard wrote: > > I wonder if i need to install also python 2.6 on my computer ? > > Le mardi 3 mars 2015 17:45:07 UTC+1, francois bonnard a écrit : >> >&g

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
Stop me if i am wrong, but i guess i need to install last version of python and setup a variable in a maya.env file ? 2015-03-03 18:03 GMT+01:00 francois bonnard : > Nope. If I point on an non existing file, here is the msg : > > # Error: line 1: WindowsError: file line 10: 3 # >

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-03 Thread francois bonnard
e that was never defined. > > On Wed, 4 Mar 2015 6:18 AM francois bonnard wrote: > >> Stop me if i am wrong, but i guess i need to install last version of >> python and setup a variable in a maya.env file ? >> >> 2015-03-03 18:03 GMT+01:00 francois bonnard : >

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread francois bonnard
th this script I got : a.jpg b.jpg c.JPG d.JPG e.JPG f.JPG g.JPG h.jpg i.jpg j.jpg k.JPG l.JPG m.JPG n.JPG If I replace "print texture" with "print os.path.isfile(texture)" I got 14 times "false" I am lost, guys ! 2015-03-03 20:19 GMT+01:00 francois bonnard : > Th

Re: [Maya-Python] Re: Maya 2014 - Python - PIL library issue

2015-03-04 Thread francois bonnard
the trick was : path = "C:/Users/francesco/Desktop/selectionMaya" myFile = "C:/Users/francesco/Desktop/selectionMaya/" dir = os.listdir(path) junk = [".mayaSwatches", ".DS_Store", ".picasa.ini"] for texture in dir: if texture not in junk: img = Image.open(os.path.join(myFile,texture)) Thank

[Maya-Python] Installing Pillow for Maya 2016 / Python 3.6

2016-09-17 Thread francois bonnard
Key guys I am looking for a way to install Pillow for Python 3.6 on Windows 10. There is a package to download on gitHub, but no exe files (just a basic tutorial on how to build it, which is a bit above my competencies) Any hep ? Thanks Fransua -- You received this message because you ar

[Maya-Python] Re: Installing Pillow for Maya 2016 / Python 3.6

2016-09-19 Thread francois bonnard
I have stepped back to Python 2.7.12 with Pillow installed with pip. It worked with the Idle provide with Python, but in Maya : ImportError: file line 5: No module named PIL # Le samedi 17 septembre 2016 09:29:20 UTC+2, francois bonnard a écrit : > > Key guys > > I am looking

[Maya-Python] Re: Installing Pillow for Maya 2016 / Python 3.6

2016-09-19 Thread francois bonnard
ns you can't just reuse the same C-extensions between > the two versions. > Usually you need to rebuild the library against the version(s) of Maya > that you're planning to support. > > On Monday, September 19, 2016 at 9:42:18 AM UTC-5, francois bonnard wrote: >> &

[Maya-Python] Maya Mash - repromeshShape - confusing connections results with python

2018-11-01 Thread francois . bonnard
Hello I got one mash network composed with a single plane with a texture Here is my code : name='MASH2_ReproMeshShape' list_connectedNode_attribute = cmds.listConnections(name,p=True) list_connections= cmds.listConnections(name,c=True) print len(list_source) for i in range(0,len(list_source)

[Maya-Python] Re: Maya Mash - repromeshShape - confusing connections results with python

2018-11-01 Thread francois . bonnard
Little mistake The right code is : name='MASH2_ReproMeshShape' list_connectedNode_attribute = cmds.listConnections(name,p=True) print len(list_connectedNode_attribute) for i in range(0,len(list_connectedNode_attribute)): print list_connections[i] list_connections= cmds.listConnections(n

[Maya-Python] What is the correct syntax for a python call in the "pre-render frame mel "?

2018-11-02 Thread francois . bonnard
I thought it was something like : python ("import switchTexture switchTexture.switch()") assuming that my python file was switchTexture.py and inside this file, it starts with : def switch(): But I got Error: line 1: invalid syntax Warning: line 0: Pre-Render MEL script failed... -- You re

Re: [Maya-Python] What is the correct syntax for a python call in the "pre-render frame mel "?

2018-11-03 Thread Francois Bonnard
that's it ! Le ven. 2 nov. 2018 à 22:04, Justin Israel a écrit : > > > On Sat, Nov 3, 2018, 9:28 AM wrote: > >> I thought it was something like : >> >> python ("import switchTexture switchTexture.switch()") >> >> assuming that my python file was switchTexture.py and inside this file, >> it star

[Maya-Python] How to link polyNormalPerVertex with a locator orientation ?

2018-11-29 Thread francois . bonnard
Hello there I got the normals vertex with: cmds.select( ** my vertex **, r=True ) resultNormalVertex=cmds.polyNormalPerVertex( query=True, xyz=True ) Result -> [0.9876886606216431, 0.0, -0.15643233060836792] which I guess is a vector. I create a locator at the same vertex position, but wou

[Maya-Python] Is it possible to install new modules in python to be used inside maya ?

2019-01-31 Thread francois bonnard
My env system is windows 10 If yes where can I find a tuto / process for that ? Thanks for your help folks F -- 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

Re: [Maya-Python] Is it possible to install new modules in python to be used inside maya ?

2019-01-31 Thread francois bonnard
; install it for all local machines. Because of that, I’ve found the >> PYTHONPATH approach much more flexible, if more of a pain (as you have to >> manually install pretty much everything you want, which with things like >> numpy/scipy is a hassle). The upside is, a lot of time