[Closed] Xref scene ignore on/off
How can I get this ignore on off with a short key , is it posibol witch script?
Or if it is posibol that only is on when it renders scene but off in viewport.
I can start xrefscene with this code:
actionMan.executeAction 0 “40368”
fn nn_xRefsTogLight lightStatus=
(
refCnt = xrefs.getXRefFileCount()
for i = 1 to refCnt do (
aXref=xrefs.getXRefFile i
aXref.ignoreLights = execute(lightStatus)
)
)
–Ignore Lights true
nn_xRefsTogLight “true”
–Ignore Lights false
nn_xRefsTogLight “false”
fn nn_xRefsTogLight lightStatus=
(
refCnt = xrefs.getXRefFileCount()
for i = 1 to refCnt do (
aXref=xrefs.getXRefFile i
aXref.ignoreLights = lightStatus
)
)
–Ignore Lights true
nn_xRefsTogLight true
–Ignore Lights false
nn_xRefsTogLight false
Thanx, I am not that good on script and wonder how to do macro from that code:
macroScript XrefLIght
category:“My Interface”
toolTip:“Toggle Xref Light”
(
fn nn_xRefsTogLight lightStatus=
(
refCnt = xrefs.getXRefFileCount()
for i = 1 to refCnt do (
aXref=xrefs.getXRefFile i
aXref.ignoreLights = lightStatus
)
)
–Ignore Lights true
nn_xRefsTogLight true
–Ignore Lights false
nn_xRefsTogLight false
)
Someting is missing in last 4 rows I think but I dont know what to change there
some “if” maybe?
How do I write this in right way:
if nn_xRefsTogLight == true
then nn_xRefsTogLight false
else
nn_xRefsTogLight true