CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
reply share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 09-19-2012, 10:38 AM   #301
col-one
New Member
portfolio
col
arles, France
 
Join Date: Apr 2012
Posts: 12
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-27-2012, 11:18 PM   #302
Tollman
Frequenter
 
Tollman's Avatar
portfolio
Jonas Borgman
FX Artist
Ubisoft Massive
Malmö, Sweden
 
Join Date: Feb 2008
Posts: 193
Is it possible to get a 2013 build up there?
 
Old 03-13-2013, 06:15 PM   #303
butterbr0t
Scout
Christoph Bülter
Germany
 
Join Date: Dec 2004
Posts: 40
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):

Code:
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-24-2013, 08:35 PM   #304
Mambo4
not a jedi yet
 
Mambo4's Avatar
portfolio
Logan Bender
Game Technical Artist
Greater Seattle, USA
 
Join Date: Nov 2010
Posts: 432
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-24-2013, 08:41 PM   #305
gandhics
Expert
 
gandhics's Avatar
Changsoo Eun
VFX Artist
FuseFX
USA
 
Join Date: Sep 2002
Posts: 834
Quote:
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-25-2013, 05:27 AM   #306
col-one
New Member
portfolio
col
arles, France
 
Join Date: Apr 2012
Posts: 12
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:

Code:
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-25-2013 at 05:35 AM.
 
Old 07-03-2013, 08:07 PM   #307
butterbr0t
Scout
Christoph Bülter
Germany
 
Join Date: Dec 2004
Posts: 40
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:
Code:
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:
Code:
# 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-03-2013 at 09:35 PM.
 
Old 05-20-2014, 01:52 PM   #308
Kameleon
Lord of the posts
 
Kameleon's Avatar
portfolio
Artur Leao
Co-Founder / Project Manager
You can do it! VFX
Porto, Portugal
 
Join Date: Sep 2004
Posts: 1,019
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-06-2014, 12:10 PM   #309
SHRIF
Expert
 
SHRIF's Avatar
portfolio
Shrif Azmy
3D generalist & VFX
Joe media house
giza, Egypt
 
Join Date: Feb 2007
Posts: 345
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-22-2014, 09:49 AM   #310
MrPingouin
Veteran
 
MrPingouin's Avatar
Laurent Chea
Paris, France
 
Join Date: Aug 2005
Posts: 65
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 :

Code:
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-23-2014, 07:19 AM   #311
SHRIF
Expert
 
SHRIF's Avatar
portfolio
Shrif Azmy
3D generalist & VFX
Joe media house
giza, Egypt
 
Join Date: Feb 2007
Posts: 345
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-24-2014 at 08:53 AM.
 
Old 04-08-2016, 12:05 PM   #312
mymane
Explorer
portfolio
 
Join Date: Apr 2016
Posts: 2
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-11-2016, 09:48 PM   #313
SugaRi
Explorer
portfolio
Clément Plantec
toulouse, France
 
Join Date: Jan 2013
Posts: 4
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 09:15 PM.


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