Skip to content

Commit

Permalink
Fix POV spot tightness not being exported.
Browse files Browse the repository at this point in the history
  • Loading branch information
leozide committed Oct 3, 2024
1 parent da803dc commit 6603de2
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions common/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2188,30 +2188,13 @@ bool Project::ExportPOVRay(const QString& FileName)
Power = Light->GetPOVRayPower();
FadeDistance = Light->GetPOVRayFadeDistance();
FadePower = Light->GetPOVRayFadePower();

switch (LightType)
{
case lcLightType::Point:
break;

case lcLightType::Spot:
SpotFalloff = Light->GetSpotConeAngle() / 2.0f;
SpotRadius = SpotFalloff - Light->GetSpotPenumbraAngle();
break;

case lcLightType::Directional:
break;

case lcLightType::Area:
AreaCircle = (Light->GetAreaShape() == lcLightAreaShape::Disk || Light->GetAreaShape() == lcLightAreaShape::Ellipse) ? 1 : 0;
AreaX = lcVector3(Light->GetWorldMatrix()[0]) * Light->GetAreaSizeX();
AreaY = lcVector3(Light->GetWorldMatrix()[1]) * Light->GetAreaSizeY();
AreaGrid = lcVector2i(Light->GetAreaPOVRayGridX(), Light->GetAreaPOVRayGridY());
break;

case lcLightType::Count:
break;
}
SpotFalloff = Light->GetSpotConeAngle() / 2.0f;
SpotRadius = SpotFalloff - Light->GetSpotPenumbraAngle();
SpotTightness = Light->GetSpotPOVRayTightness();
AreaCircle = (Light->GetAreaShape() == lcLightAreaShape::Disk || Light->GetAreaShape() == lcLightAreaShape::Ellipse) ? 1 : 0;
AreaX = lcVector3(Light->GetWorldMatrix()[0]) * Light->GetAreaSizeX();
AreaY = lcVector3(Light->GetWorldMatrix()[1]) * Light->GetAreaSizeY();
AreaGrid = lcVector2i(Light->GetAreaPOVRayGridX(), Light->GetAreaPOVRayGridY());

sprintf(Line,"#ifndef (Skip%s)\n WriteLight(%i, %i, <%g, %g, %g>, <%g, %g, %g>, <%g, %g, %g>, %g, %g, %g, %g, %g, %g, %i, <%g, %g, %g>, <%g, %g, %g>, %i, %i)\n#end\n\n",
LightName.toLatin1().constData(),
Expand Down

0 comments on commit 6603de2

Please sign in to comment.