PDA

View Full Version : Python in 11.5 setFlt error



iain_r
02-14-2013, 10:29 AM
Hi,

I'm trying to set the colour of a surface and have used "surface_funcs.setFlt(surface, lwsdk.SURF_COLR, [cred, cgreen, cblue])". However I get the following error

"Traceback (most recent call last):
File "C:\LightWave64Bit11.5\support\plugins\scripts\Pyth on\Modeler\CommandSequence\make_cubes.py", line 67, in process
surface_funcs.setFlt(surface, lwsdk.SURF_COLR, [cred, cgreen, cblue])
File "pcore.py", line 8820, in <lambda>
File "pcore.py", line 55, in _swig_getattr
AttributeError: setFlt"

From previous post this was apparently resolved. Has this been overlooked again. I've also tested this in 11.0 and got the same result.

Regards

Iain.

clintonman
03-07-2013, 09:28 PM
The setFlt doesn't work in 11.0 It worked in 11.1 or .2 but it doesn't work for 11.5 again. So it looks like it's broken again. :(

iain_r
03-08-2013, 03:50 AM
Hi, I've raised this as a bug, Just have to wait and see when it gets fixed.
Regards
Iain

clintonman
03-08-2013, 05:35 AM
I found it. Use set_float instead of setFlt.

#surface_funcs.setFlt(surface, lwsdk.SURF_COLR, new_color)
surface_funcs.set_float(surface, lwsdk.SURF_COLR, new_color)

iain_r
03-08-2013, 06:57 AM
Thanks, I'll try that.