LL_ProgRoll.LL_ProgText.Text = "Getting Light Information "
LL_ProgRoll.LL_ProgressBar.color = red
For i in 1 to LL_PL.count do
(
LightListerString += "If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_ON" + i as string + ".Checked = " + "LL_PL[" + i as string + "].on \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_Color" + i as string + ".Color = " + "LL_PL[" + i as string + "].Color \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_Mult" + i as string + ".Value = " + "LL_PL[" + i as string + "].Multiplier \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_Cast" + i as string + ".Checked = " + "LL_PL[" + i as string + "].baseobject.Castshadows \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_Shad" + i as string + ".Checked = " + "(Not LL_PL[" + i as string + "].Raytracedshadows) \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_Ray" + i as string + ".Checked = " + "(LL_PL[" + i as string + "].Raytracedshadows) \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then If LL_PL[" + i as string + "].raytracedshadows == false then (LL_PL[" + i as string + "].mapsize = GlobalLightListRoll.LL_MapSizeG.value) \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_MapSize" + i as string + ".Value = " + "(If LL_PL[" + i as string + "].raytracedshadows == false then (LL_PL[" + i as string + "].mapSize) Else (0)) \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_MapBias" + i as string + ".Value = " + "(If LL_PL[" + i as string + "].raytracedshadows == false then (LL_PL[" + i as string + "].mapBias) Else (GlobalLightListRoll.LL_MapBiasG.value)) \n " +
"If (Classof LL_PL[" + i as string + "]) != TargetObject then LightListRoll1" + ".LL_MapSize" + i as string + ".Enabled = (Not(LL_PL[" + i as string + "].raytracedshadows)) \n "
LL_ProgRoll.LL_ProgressBar.value = i * 100 /LL_PL.count
LL_ProgRoll.LL_ProgtextB.text = ("Light:" + LL_PL[i].name as string + " ")
LightListerString += "CheckButton LL_Modify" + i as string + " \"\"" + " ToolTip:\"Select and Modify\" Align:#Left Width:8 Across:14 offset:[-10,-2] Checked:LL_PL[" + i as string +"].IsSelected \n " +
"CheckBox LL_ON" + i as string + " \"\"" + " Align:#Left offset:[-45,0] Checked:LL_PL[" + i as string +"].on \n" +
"EditText LL_Name" + i as string + " \"\"" + " Align:#Left Width:50 offset:[-70,0] Text:LL_PL[" + i as string +"].name \n" +
"ColorPicker LL_Color" + i as string + " \"\"" + " Align:#Left Offset:[-60,-2] width:20 color:LL_PL[" + i as string +"].color \n" +
"Spinner LL_Mult" + i as string + " \"\" width:50 Align:#Left Offset:[-80,0] Range:[-50000,50000,LL_PL[" + i as string + "].multiplier] \n" +
"CheckBox LL_Cast" + i as string + " \"\" Align:#Left Offset:[-70,0] Checked:LL_PL[" + i as string + "].baseobject.castshadows \n " +
"DropDownList LL_Shad" + i as string + " \"\" Items:#(\"Shadow Maps\",\"Raytraced\") Align:#Left Width:95 offset:[-90,-2] Selection:(if LL_PL[" + i as string + "].RaytracedShadows == False then 1 else 2) \n" +
"Spinner LL_MapSize" + i as string + " \"\" Align:#Left Offset:[-35,0] Width:50 Range:[0,50000,(If LL_PL[" + i as string + "].raytracedShadows == False then (LL_PL[" + i as string + "].mapsize) Else (GlobalLightListRoll.LL_MapSizeG.value))] width:100 Type:#Integer Enabled:(Not LL_PL[" + i as string + "].RaytracedShadows) \n" +
"Spinner LL_MapBias" + i as string + " \"\" Align:#Left Offset:[-20,0] Width:40 Range:[0,50000,(If LL_PL[" + i as string + "].raytracedShadows == False then (LL_PL[" + i as string + "].mapbias) Else (LL_PL[" + i as string + "].bias))] width:100 Type:#Float \n" +
"Spinner LL_SampRng" + i as string + " \"\" Align:#Left Offset:[-20,0] Width:40 Range:[0,50000,(If LL_PL[" + i as string + "].raytracedShadows == False then (LL_PL[" + i as string + "].samplerange) Else (4))] width:100 Type:#Float Enabled:(Not LL_PL[" + i as string + "].RaytracedShadows)\n" +
"DropDownList LL_Decay" + i as string + " \"\" Items:#(\"None\",\"Inverse\", \"Inverse Square\") Align:#Left Width:68 offset:[-25,-2] Selection:LL_PL[" + i as string + "].AttenDecay \n" +
"Spinner LL_DStart" + i as string + " \"\" width:50 Align:#Left Offset:[-0,0] Range:[0,50000,LL_PL[" + i as string + "].DecayRadius] \n" +
"Spinner LL_AttenStart" + i as string + " \"\" width:50 Align:#Left Offset:[-0,0] Range:[0,50000,LL_PL[" + i as string + "].FarAttenStart] \n" +
"Spinner LL_AttenEnd" + i as string + " \"\" width:50 Align:#Left Offset:[0,0] Range:[0,50000,LL_PL[" + i as string + "].FarAttenEnd] \n"
LL_ProgRoll.LL_ProgressBar.value = i * 100 /LL_PL.count
LL_ProgRoll.LL_ProgtextB.text = ("Light:" + LL_PL[i].name as string + " ")
)
)
LL_ProgRoll.LL_ProgressBar.color = Green
LL_ProgRoll.LL_ProgText.Text = "Generating UI Control "
For i in 1 to LL_PL.count do
(
If (Classof LL_PL[i]) != TargetObject then
(
-- Button Changes
LightListerString += "On LL_Modify" + i as string + " Changed State do If State == True then(If SubObjectLevel == undefined then (Max Modify Mode); Select LL_PL[" + i as string + "])\n " +
"On LL_Color" + i as string + " changed color do (LL_PL[" + i as string + "].color = color) \n" +
"On LL_On" + i as string + " changed State do (LL_PL[" + i as string + "].On = State) \n" +
"On LL_Mult" + i as string + " changed value do (LL_PL[" + i as string + "].Multiplier = value) \n" +
"On LL_Cast" + i as string + " changed State do (LL_PL[" + i as string + "].baseobject.CastShadows = State) \n" +
"On LL_Decay" + i as string + " selected i do (LL_PL[" + i as string + "].AttenDecay = i) \n" +
"On LL_DStart" + i as string + " Changed value do (LL_PL[" + i as string + "].decayRadius = value) \n" +
"On LL_AttenStart" + i as string + " ButtonDown do (LL_AttenOn = LL_PL[" + i as string + "].ShowFarAtten; LL_PL[" + i as string + "].ShowFarAtten = True)\n"+
"On LL_AttenStart" + i as string + " ButtonUp do (If LL_AttenOn == False then LL_PL[" + i as string + "].ShowFarAtten = False) \n"+
"On LL_AttenStart" + i as string + " Changed value do (LL_PL[" + i as string + "].farAttenStart = value) \n" +
"On LL_AttenEnd" + i as string + " ButtonDown do (LL_AttenOn = LL_PL[" + i as string + "].ShowFarAtten; LL_PL[" + i as string + "].ShowFarAtten = True)\n"+
"On LL_AttenEnd" + i as string + " ButtonUp do (If LL_AttenOn == False then LL_PL[" + i as string + "].ShowFarAtten = False) \n"+
"On LL_AttenEnd" + i as string + " Changed value do (LL_PL[" + i as string + "].farAttenEnd = value) \n" +
"On LL_Shad" + i as string + " selected i do (If i == 1 then (LL_PL[" + i as string + "].RaytracedShadows = False; LL_MapSize" + i as string + ".enabled = True; LL_SampRng" + i as string + ".Enabled = True; LL_PL[" + i as string + "].mapBias = 1; LL_MapBias" + i as string + ".value = 1) Else (LL_PL[" + i as string + "].raytracedshadows = True; LL_MapSize" + i as string + ".enabled = False; LL_SampRng" + i as string + ".Enabled = False; LL_PL[" + i as string + "].Bias = .2; LL_MapBias" + i as string + ".value = .2)) \n"+
-- "On LL_Ray" + i as string + " changed State do (LL_Shad" + i as string + ".checked = Not State; LL_MapSize" + i as string + ".enabled = Not State; LL_PL[" + i as string + "].RaytracedShadows = State; (If ll_PL[" + i as string + "].raytracedshadows == True then (LL_MapBias" + i as string + ".value = LL_PL[" + i as string + "].bias))) \n" +
"On LL_MapSize" + i as string + " changed value do (LL_PL[" + i as string + "].mapSize = value) \n " +
"On LL_MapBias" + i as string + " changed value do (If LL_PL[" + i as string + "].RaytracedShadows == False then LL_PL[" + i as string + "].mapBias = value else LL_PL[" + i as string + "].Bias = value) \n" +
"On LL_SampRng" + i as string + " changed value do (Try (LL_PL[" + i as string + "].SampleRange = Value)Catch()) \n"
-- ("LightListRoll1" + ".LL_ShadowType" + i as string + ".items = LLShadTypes") +
LL_ProgRoll.LL_ProgressBar.value = i * 100 /LL_PL.count
LL_ProgRoll.LL_ProgtextB.text = ("Light:" + LL_PL[i].name as string + " ")
"If LL_Progress != undefined then CLoseRolloutFloater LL_Progress \n"
-- "registerViewWindow LightListFloater \n"
)
-- Start LightLister
If LL_Handle != undefined then Try (DeleteChangeHandeler LL_Handle) Catch ()
If LightListFloater != undefined then (Global LightListFloaterSize = LightListFloater.size)
-- Select Lights
Print "Light Lister Started"
If Lights != undefined then
(
If LL_SelectedOnly == True then
(
LL_PLPre = Lights as array
LL_PL = #()
For i in 1 to LL_PLPre.count do
(
If (Classof LL_PLPre[i]) == OmniLight or (Classof LL_PLPre[i]) == targetSpot or (Classof LL_PLPre[i]) == TargetDirectionallight or (Classof LL_PLPre[i]) == freeSpot or (Classof LL_PLPre[i]) == Directionallight then
(
if (Isgrouphead LL_PLPre[i]) == false and (LL_PLPre[i].isSelected) == True then (Append LL_PL LL_PLPre[i]) Else ()
)
)
)
Else
(
LL_PLPre = Lights as array
LL_PL = #()
For i in 1 to LL_PLPre.count do
(
If (Classof LL_PLPre[i]) == OmniLight or (Classof LL_PLPre[i]) == targetSpot or (Classof LL_PLPre[i]) == TargetDirectionallight or (Classof LL_PLPre[i]) == freeSpot or (Classof LL_PLPre[i]) == Directionallight then
(
if (Isgrouphead ll_PLPre[i]) == false then (Append LL_PL LL_PLPre[i]) Else ()
)
)
)
GenerateLightRollouts ()
-- Change Handeler
LL_Handle = When LL_PL Changes handleAt:#redrawViews do (If LightListFloater != undefined then (DeleteChangeHandler LL_Handle; CloseRolloutFloater LightListFloater))
fn LL_Update_Controls =
(
For i in 1 to LL_PL.count do
(
Try(
If LL_SelectedOnly != True then
(
Execute ("LightListRoll1.LL_Modify" + i as string + ".checked = LL_PL[" + i as string + "].isSelected")
)
)Catch()
)
If LL_SelectedOnly == True then
(
LL_PLPre = Lights as array
LL_PL = #()
For i in 1 to LL_PLPre.count do
(
If (Classof LL_PLPre[i]) == OmniLight or (Classof LL_PLPre[i]) == targetSpot or (Classof LL_PLPre[i]) == TargetDirectionallight or (Classof LL_PLPre[i]) == freeSpot or (Classof LL_PLPre[i]) == Directionallight then
(
if (Isgrouphead LL_PLPre[i]) == false and (LL_PLPre[i].isSelected) == True then (Append LL_PL LL_PLPre[i]) Else ()