Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable setting particle emitter color range #903

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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