View Full Version : Render Globals problems

02-22-2013, 06:16 AM
Hello, I'm trying to "pythonice" some Render Globals presets, most of the parameters are easy to access/edit, but I can't read the state of some properties (searched global classes, this forum, etc). The problem is that they are "toggle" buttons, and the command to set their state works as a "toggle" too, so ...

Here are the problematic properties (Render Globals):

Soft Filter (Camera Tab)
Use Bumps (Global Illum Tab)
Noise Reduction (Render Tab)
Shadow Maps Global (Render Tab)
Volumetric Lights Global (Render Tab)

They are stored in .lws, but I can't find the global or command that read the state of this properties.

Anyone have some ideas to fix this?

Thanks in advance !

02-22-2013, 11:56 PM
I believe soft filter can be accessed via pcore.LWSceneInfo.filter. For more info in the LW11.5 SDK look at: LightWave 11-5 Python SDK/globalsceneinfo.html

filter → int

Current Soft Filter setting. A value of zero (0) indicates no filter, while a value of one (1) indicate Soft Filter is enabled.

bit 0:
0=no filter
1=soft filter
bits 1-5: indicate reconstruction filter:

For Use Bumps - LightWave 11-5 Python SDK/globalobjinfo.html :
lwsdk.LWOBJF_BUMPENABLE (rev.6+)
This flag indicates that bump displacement is enabled for the object.

The others are probably also in there, but from a quick glance there are 2.

02-23-2013, 05:03 AM
Thanks for the info xchrisx !

Finally find one, that's the code to call 'Use bumps':
lwsdk.LWSceneInfo().radiosityFlags & lwsdk.LWRDFLG_USE_BUMPS
returns '0' or '-2147483648'

About Soft Filter, it's little confusing. If you call lwsdk.LWSceneInfo().filter, it returns the values for 'Reconstruction Filter', that's ok.
But I need to call the state of the toggle button 'Soft Filter', in cameras Tab of Render Globals (just left of Adaptive sampling).
And still no idea where to find it, I read almost all globals :P

Thanks again for help !!!