Skip to content

Commit

Permalink
Disable setting color range in particle emitter (#903)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Sep 8, 2023
1 parent 6fa1fc1 commit 59417ba
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions ogre2/src/Ogre2ParticleEmitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ void Ogre2ParticleEmitter::SetColorRange(
const gz::math::Color &_colorStart,
const gz::math::Color &_colorEnd)
{
// see https://github.com/gazebosim/gz-rendering/issues/902
gzwarn << "ParticleEmitter SetColorRange is currently disabled." << std::endl;
return;

// Color interpolator affector.
if (!this->dataPtr->colorInterpolatorAffector)
{
Expand Down
8 changes: 5 additions & 3 deletions test/common_test/ParticleEmitter_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ using namespace gz;
using namespace rendering;

/// \brief The test fixture.
class ParticleEmitterTest : public CommonRenderingTest
class ParticleEmitterTest : public CommonRenderingTest
{
/// \brief A directory under test/ with some textures.
protected: const std::string TEST_MEDIA_PATH =
Expand Down Expand Up @@ -124,8 +124,10 @@ TEST_F(ParticleEmitterTest, ParticleEmitter)
EXPECT_EQ(expectedMaterial, particleEmitter->Material());
EXPECT_DOUBLE_EQ(expectedMinVel, particleEmitter->MinVelocity());
EXPECT_DOUBLE_EQ(expectedMaxVel, particleEmitter->MaxVelocity());
EXPECT_EQ(expectedColorStart, particleEmitter->ColorStart());
EXPECT_EQ(expectedColorEnd, particleEmitter->ColorEnd());
// ColorRange test is currently disabled, see
// https://github.com/gazebosim/gz-rendering/issues/902
// EXPECT_EQ(expectedColorStart, particleEmitter->ColorStart());
// EXPECT_EQ(expectedColorEnd, particleEmitter->ColorEnd());
EXPECT_DOUBLE_EQ(expectedScaleRate, particleEmitter->ScaleRate());
EXPECT_EQ(expectedColorRangeImage, particleEmitter->ColorRangeImage());
EXPECT_FLOAT_EQ(expectedScatterRatio,
Expand Down

0 comments on commit 59417ba

Please sign in to comment.