Everything related to SDK.
User avatar
By egmehl
#379659
I'm trying to make a python script that will list out various material properties, especially bitmap paths. I started with this script: http://support.nextlimit.com/download/a ... .py?api=v2 but am getting a lot of bugs, probably because it was made for v2? (I'm on v3).

It looks like the documentation is maybe not updated? I'm getting attribute errors when doing any getColor (on the base material for the bump or on reflectance materials for color, etc). I'm not real experienced working with Python bindings from c++, could anybody give an example of how to get material properties with the latest SDK?

Getting / setting bitmap paths is what I'm ultimately after so I can make cross-platform (Windows to Linux) rendering easier.

Here's the error I get with the getColor method:
Code: Select all
Traceback (most recent call last):
  File "/nexus/brain/material_parameters.py", line 144, in <module>
    material_parameters();
  File "/nexus/brain/material_parameters.py", line 65, in material_parameters
    map = refl.getColor('color');
  File "/usr/lib/python2.7/dist-packages/pymaxwell.py", line 1496, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, Creflectance, name)
  File "/usr/lib/python2.7/dist-packages/pymaxwell.py", line 55, in _swig_getattr
    raise AttributeError(name)
AttributeError: getColor
User avatar
By Brany
#379662
Online documentation is out of date for C++/Python API, sorry!

The python examples included with the installation are updated, take a look at C:\Program Files\Next Limit\Maxwell 3\scripts\python\material_parameters.py

...and 3 Days later, 82.528 Views !!! ...NL, every[…]

Hello dear customers, We have just released a new[…]

grass generator extension

Just downloaded MWR5 for Rhino 6 and want to use g[…]

Hello everyone, I have a new bug with the latest M[…]