| 86 | } |
| 87 | |
| 88 | void ParticleDef::copyFrom(const Ptr& other) |
| 89 | { |
| 90 | ensureParsed(); |
| 91 | |
| 92 | { |
| 93 | // Suppress signals until we're done copying |
| 94 | util::ScopedBoolLock changeLock(_blockChangedSignal); |
| 95 | |
| 96 | setDepthHack(other->getDepthHack()); |
| 97 | |
| 98 | _stages.clear(); |
| 99 | |
| 100 | // Copy each stage |
| 101 | for (std::size_t i = 0; i < other->getNumStages(); ++i) |
| 102 | { |
| 103 | auto stage = std::make_shared<StageDef>(); |
| 104 | stage->copyFrom(other->getStage(i)); |
| 105 | |
| 106 | appendStage(stage); |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | // We've changed all the stages, so emit the changed signal now (#4411) |
| 111 | onParticleChanged(); |
| 112 | } |
| 113 | |
| 114 | bool ParticleDef::isEqualTo(const Ptr& other) |
| 115 | { |
nothing calls this directly
no test coverage detected