Render element active or not ?

Hi,
I can activate or deactivate render elements but I don't know how to check if render elements is active or not.
Anybody can help ? Thanks.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

(
	elementMgr = maxOps.GetCurRenderElementMgr()	
	numOfElements = elementMgr.NumRenderElements()
	if numOfElements != 0 then
	(
		for index = 0 to (numOfElements - 1) do
		(
			element = elementMgr.getRenderElement index		
			active = element.enabled
			format "element: % active: %\n" 	element	active	
		)
	)
)
titane357's picture

Hi Miauu, thanks for helping

Hi Miauu, thanks for helping ! :-)
My apologies, I wasn't precise enough in my question...
In fact it is the render element MANAGER that I have in mind.
I made a check button "CELEMENTS":
---------------------------------------------------------------------
on CELEMENTS changed theState do
(
if CELEMENTS.checked==1 do
(
local reMgr = maxOps.getCurRenderElementMgr()
reMgr.SetElementsActive true
)
if CELEMENTS.checked==0 do
(
local reMgr = maxOps.getCurRenderElementMgr()
reMgr.SetElementsActive false
)
---------------------------------------------------------------------
I want to update its state checking if render element MANAGER is active or not...

AttachmentSize
rem.jpg 72.32 KB
miauu's picture

.

(
	elementMgr = maxOps.GetCurRenderElementMgr()		
	res = elementMgr.GetElementsActive()
	format "Active: % \n" res
)
titane357's picture

yesssss !!! Thank you very

yesssss !!! Thank you very much, works fine ! :-)

miauu's picture

.

I am glad to help. :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.