Skip to content

Commit

Permalink
Implement Spot Light Shadows (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
datacrystals committed Jun 12, 2022
1 parent 8ce35ba commit 6091619
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ bool ERS_CLASS_PythonInterpreterIntegration::ExecutePointLightScript(std::string
PointLightModule.attr("PointLightColorB") = PointLight->Color.b;

PointLightModule.attr("PointLightIntensity") = PointLight->Intensity;
PointLightModule.attr("PointLightMaxDistance") = PointLight->MaxDistance;


// Get Local Dict
Expand Down Expand Up @@ -289,6 +290,13 @@ bool ERS_CLASS_PythonInterpreterIntegration::ExecutePointLightScript(std::string
ErrorMessageString->push_back("PointLight Intensity CAST_ERROR");
}

try {
PointLight->Intensity = PointLightModule.attr("PointLightMaxDistance").cast<float>();
} catch (pybind11::cast_error const&) {
ErrorMessageString->push_back("PointLight MaxDistance CAST_ERROR");
}


// Return Status
return true;

Expand Down

0 comments on commit 6091619

Please sign in to comment.