Python + MXS

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 09 September 2012   #301
Hi, i found a bug inside Py3dsMax, when i hide a Dialog/Window or Max Window the Dialog disapears and I can't call it back as if it had been closed.

Here is an exemple of a code wich gives me problems:

class window(blurdev.gui.Window):
def __init__( self, parent = None ):
super(window, self).__init__(parent)
self.setWindowTitle('Windowtest')
win = window()
win.show()

Could you please help me solving this problem ?
__________________
vimeo
 
Old 11 November 2012   #302
Is it possible to get a 2013 build up there?
 
Old 03 March 2013   #303
Same problem as col-one. The dialog disappears when 3ds Max is minimized.
This is some sample code from the blur help pages (http://code.google.com/p/blur-dev/wiki/PyQt):


  from blurdev.gui import Dialog
  
  class HelloWorldDialog(Dialog):
      def __init__( self, parent = None ):
          Dialog.__init__( self, parent )
          
          self.setWindowTitle('Hello, World')
  
  import blurdev
  blurdev.launch(HelloWorldDialog)
  


How do I prevent the dialog from disappearing? Please anyone...
__________________
www.cbuelter.de
 
Old 06 June 2013   #304
What is the current state of python in 3ds max?

judging form this thread and others it looks like interest has waned , and blur has stopped supporting py3dsmax for more recent version of max.

Is anyone using python in 3dsmax 2013 or 2014?
Or has python died in 3dsmax?
 
Old 06 June 2013   #305
Originally Posted by Mambo4: What is the current state of python in 3ds max?

judging form this thread and others it looks like interest has waned , and blur has stopped supporting py3dsmax for more recent version of max.

Is anyone using python in 3dsmax 2013 or 2014?
Or has python died in 3dsmax?


http://labs.autodesk.com/utilities/sciviz

Project Sci-Viz provides a Python engine and API for 3ds Max that enable Max users to run ePMV and autoPack from within 3ds Max 2013. The Sci-Viz plug-in is available only for 3ds Max 2013 64-bit and requires a 64-bit version of Python 2.6.6.
 
Old 06 June 2013   #306
Hi there !

For reply to my post and solve the probleme about disapear qt window, we found the solution.

After spent lot of time to read the already existing blur script, we found something:

We must use our own migrate Qt max window, for do this we need import QtWinMigrate from classic PyQt and GetWindowHandle from Py3dsMax. Here an example:


  from PyQt4 import QtGui, QtCore, QtWinMigrate
  from Py3dsMax import GetWindowHandle
  
  class window(QtGui.QMainWindow):
  	def __init__ (self, parent= QtWinMigrate.QWinWidget(GetWindowHandle())):
  		super(window, self).__init__(parent)
  		self.setWindowIcon(QtGui.QIcon(iconPath))
  		self.setWindowTitle( 'maxWindow' )
 
 class testWin(window):
 	def __init__(self, parent = None):
 		super(testWin, self).__init__(parent)
 		self.setWindowTitle('testQtmaxWindow')
 
 win = testWin()
 win.show()
    
__________________
vimeo

Last edited by col-one : 06 June 2013 at 05:35 AM.
 
Old 07 July 2013   #307
thanks for your post col-one, it is working for me. However there are other solutions, which confuse me. It seems that simply adding this:

  self.setAttribute(QtCore.Qt.WA_DeleteOnClose, False)
  

somewhere in the constructor of my Dialog/Window/Whatever prevents it from disappearing when 3ds Max is minimized. I found this comment in the treegruntdialog.py that states the same:

 # protect the memory
  from PyQt4.QtCore import Qt
  inst.setAttribute(Qt.WA_DeleteOnClose, False)
  

Can anyone try and verify?
__________________
www.cbuelter.de

Last edited by butterbr0t : 07 July 2013 at 09:35 PM.
 
Old 05 May 2014   #308
I've compiled PyZmq and P4Python for Max and Maya 2015.

You can get them here: https://github.com/arturleao/YCDIVFX_MaxPlus in the Externals folder.
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 09 September 2014   #309
hi am new for python and its integration into max
am just trying to deal with
I started with binding sip for max and installing PYQT
but its seam that am doing something wrong because i get a fetal error massage in my command prompt
so i want to ask
- do s i have to change the python version from 2.7 to 3 ?
- dos it effect the max bridge if i installed other version of the python on same machine ?
- installing the pyqt must be in the max python folder or into the main folder (( C:\python27 for example)) ?
thanks in advance
 
Old 09 September 2014   #310
You shouldn't have to do any of this.

For example, 3dsmax 2015 is provided with python 2.7 (c:\program files\autodesk\3dsmax 2015\python).

Then for using Qt, it would start with :

from PySide import QtGui


Check the help file, section "using pyside"

You speak about a command line prompt error, be more precise on what you're trying to do.
 
Old 09 September 2014   #311
ok
I did installed PYQT 4.8.6 64 bit
to the python folder site package
with insuring that i had the right registry keys as christopher said at this :
https://area.autodesk.com/blogs/chris/pyqt-ui-in-3ds-max-2014-extension
and when I executed the demoPyVersionTool.py
I get this result

Quote: 3ds Max 2014 path environment variable C:\Program Files\Autodesk\3ds Max 2014\;C:\Program Files\Autodesk\3ds Max 2014\python\Lib\site-packages\;C:\Program Files\Python\;C:\Program Files\Python\Lib\site-packages;C:\Program Files\Python\Lib\site-packages\PyQt5;
MaxPlus module False
PyQt QT version 4.8.6
PyQt module True
PyQt version 4.11.2
PySide module False
Python prefix C:\Program Files\Autodesk\3ds Max 2014\python
Python version 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
os module True
sys module True
#success


thanks MrPingouin ur pointing was helpfull

Last edited by SHRIF : 09 September 2014 at 08:53 AM.
 
Old 04 April 2016   #312
Get camera position on frame

Hey,

Im new at 3dsmax but i have several python projects running.
I think about to get the camera position and export it with python.

I would like to get something like this:
30,30,30
25,30,30
20,30,30

Each line on frame.

I read a lot at the APi-Page and looked into pythondemos, but I
only find demos that are creating objects.

the camera is in the scene and this is moving.

Starting python with the mxscript is working, but
how to I get the camera and how do I get the position
of it to write it down into a file.

for loop:
- Get Camera.Position
- Set next frame


Thanks a lot!
 
Old 05 May 2016   #313
Max 2017 Pyside

Hi everyone

I was wondering if one could access the rollout control or an equivalent within pyside in max 2017 ?

Thanks
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:06 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.