Fixed light selection checks.
This commit is contained in:
+16
-5
@@ -146,10 +146,21 @@ public:
|
||||
{
|
||||
if (Selected)
|
||||
{
|
||||
if (IsPointLight())
|
||||
switch (mLightType)
|
||||
{
|
||||
case lcLightType::Point:
|
||||
mState |= LC_LIGHT_POSITION_SELECTED;
|
||||
else
|
||||
mState |= LC_LIGHT_SELECTION_MASK;
|
||||
break;
|
||||
|
||||
case lcLightType::Spot:
|
||||
case lcLightType::Directional:
|
||||
mState |= LC_LIGHT_POSITION_SELECTED | LC_LIGHT_TARGET_SELECTED;
|
||||
break;
|
||||
|
||||
case lcLightType::Area:
|
||||
mState |= LC_LIGHT_POSITION_SELECTED | LC_LIGHT_TARGET_SELECTED | LC_LIGHT_UPVECTOR_SELECTED;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
mState &= ~(LC_LIGHT_SELECTION_MASK | LC_LIGHT_FOCUS_MASK);
|
||||
@@ -179,7 +190,7 @@ public:
|
||||
case LC_LIGHT_SECTION_UPVECTOR:
|
||||
if (Selected)
|
||||
{
|
||||
if (!IsPointLight())
|
||||
if (IsAreaLight())
|
||||
mState |= LC_LIGHT_UPVECTOR_SELECTED;
|
||||
}
|
||||
else
|
||||
@@ -237,7 +248,7 @@ public:
|
||||
case LC_LIGHT_SECTION_UPVECTOR:
|
||||
if (Focused)
|
||||
{
|
||||
if (!IsPointLight())
|
||||
if (IsAreaLight())
|
||||
mState |= LC_LIGHT_UPVECTOR_SELECTED | LC_LIGHT_UPVECTOR_FOCUSED;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user