Everything related to SDK.
User avatar
By seghier
i download pyqt5 for python 2.7 ; i don't know why python 2.7 show the errors but other versions just crash without any information.
and the errors :
ok = scene.readMXS(self.edit_input_file.text(), Cmaxwell.SKIP_OBJECTS);
TypeError: in method 'Cmaxwell_readMXS', argument 2 of type 'char const *'

ok = scene.readMXS(mxsList);
TypeError: in method 'Cmaxwell_readMXS', argument 2 of type 'char const *'
User avatar
By seghier
problem solved ; with pyqt5 and python2.7 readMxs and writeMxs must add str()
but with pyqt5 and python 3.5 always problem in readMxs() ; even i use str()

scene.readMXS(mxsList) >> [python 2.7 / pyqt4] work
scene.readMXS(str(mxsList)) >> [python 2.7 / pyqt5] work
scene.readMXS(mxsList) or scene.readMXS(str(mxsList)) >> [python 3.5 / pyqt5] crash
User avatar
By seghier
when i run the script from terminal i got this error :

Warning: Warning in Method = readMXS
error = Path is NULL or Empty
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "maxwell_toolv6.py", line 1842, in openMxmSorA
File "maxwell_toolv6.py", line 1870, in MXMopenMxs
ok = scene.readMXS(str(mxsList)) { or ok = scene.readMXS(mxsList)}
SystemError: <built-in function Cmaxwell_readMXS> returned a result with an error set
User avatar
By Brany
can you print the value of str(mxsList)? If it is a list, you must select one of the paths, readMXS does not admit a list of MXS paths ;)
User avatar
By seghier
everytime when i solve problem i find another !
with pyqt5 and python 3.5 some lines need new arrangement and that solve the problem of readMXS()
and now the problem with render parameter ; i used str(Re) but don't work
nn = self.engine_choice.currentIndex()
Code: Select all
if nn == 0:  # CPU production
                Re = 'RS1'
            elif nn == 1:  # CPU draft
                Re = 'RS0'
            elif nn == 2:  # GPU
                Re = 'RSC'
            scene.setRenderParameter('SAMPLING LEVEL', sl)
            scene.setRenderParameter('STOP TIME', st)
            scene.setRenderParameter('DO NOT SAVE MXI FILE', self.check_mxi.isChecked()==False and 1)
            scene.setRenderParameter('DO NOT SAVE IMAGE FILE', self.check_img.isChecked()==False and 1)
            scene.setRenderParameter('DENOISE ENABLED', self.enable_denoiser.isChecked() and 1)
            scene.setRenderParameter('DENOISE SHADOW', self.den_shad.isChecked() and 1)
            scene.setRenderParameter('DENOISE GPU', self.use_gpu.isChecked() and 1)
            scene.setRenderParameter('DO MOTION BLUR', self.motion_blur.isChecked() and 1)
            scene.setRenderParameter('DO DISPLACEMENT', self.displacement.isChecked() and 1)
            scene.setRenderParameter('DO DISPERSION', self.dispersion.isChecked() and 1)
            scene.setRenderParameter('ENGINE', Re)
and the error message :
Traceback (most recent call last):
File "maxwell_toolv6.py", line 791, in render
File "maxwell_toolv6.py", line 935, in rendering
scene.setRenderParameter('ENGINE', Re)
SystemError: <built-in function Cmaxwell_setRenderParameter> returned a result with an error set
User avatar
By Brany
I found what is happening. This methods expects "bytes" instead of a "str", so you have to call it his way in Python 3.x:
Code: Select all
scene.setRenderParameter('ENGINE', b'RS0')
with that "b" before the text string.
User avatar
By seghier
thanks again ; it work fine :)
the error message disappear and there is a new one, i fix it by change MAXWELL3_ROOT to MAXWELL4_ROOT.
this __init__.py is : pymaxwell4.py from : "C:\Program Files\Next Limit\Maxwell Render 4\python\pymaxwell4\python3.5"
MAXWELL3_ROOT environment variable not found!
Traceback (most recent call last):
File "maxwell_toolv6.py", line 847, in render
File "maxwell_toolv6.py", line 1003, in rendering
File "C:\Python35\lib\site-packages\pymaxwell\__init__.py", line 127, in runMaxwell
UnboundLocalError: local variable 'mwroot' referenced before assignment
Maxwell Showreel 2021

That’s so good, we’ll done :D

I use the newest version of Rhino Mac (7.12) and M[…]

Maxwell 5.2 Rhino mac - Tutorial

I have a question: Is there a tutorial about how […]

Fully working plugin for C4D

Did the 5.2.2 Update resolve the problems?