How can i import an image plane with python?

How can i import an image plane with python?

Anonymous
Not applicable
531 Views
0 Replies
Message 1 of 1

How can i import an image plane with python?

Anonymous
Not applicable
Hello,

I trying to create an import image plane in maya with python but i don't find it.
Can you help me please ?

First, i get my file :


cmds.fileBrowserDialog( m=0, fc=importImage, ft="image", an="Import_Image", om="Import")


Then i create my image plane :


def importImage( fileName, fileType):
'''Affichage de l'image pour une image plane'''
mel.eval('string $fileName=python("fileName")')
mel.eval('string $fileType=python("fileType")')
mel.eval('createImportedImagePlane { "cameraShape" } "$fileName" "$fileType"')
return 1
0 Likes
532 Views
0 Replies
Replies (0)