Particle Panel: minor bug fix (someone spot-check me?)

Greetings all!

I have a small bugfix to check in for the particle panel. While using the panel, we noticed that changes to the system’s position and hpr weren’t being saved to the resulting .ptf file. I believe I’ve isolated the cause to be that the change was applied to the Particles object’s nodePath instead of the ParticleEffect object; since serializing the ParticleEffect doesn’t appear to preserve node transforms on the Particles nodepaths, this information was getting lost.

I’m afraid I don’t have my handy copy of diff (now with patch features!) on this console, so I’ll have to give directions by hand. Go to the file direct/src/tkpanels/ParticlePanel.py. Find lines 1290 to 1293, which should look like so:

    def setSystemPos(self, pos):
        self.particles.nodePath.setPos(Vec3(pos[0], pos[1], pos[2]))
    def setSystemHpr(self, pos):
        self.particles.nodePath.setHpr(Vec3(pos[0], pos[1], pos[2]))

Replace with the following:

    def setSystemPos(self, pos):
        self.particleEffect.setPos(Vec3(pos[0], pos[1], pos[2]))
    def setSystemHpr(self, pos):
        self.particleEffect.setHpr(Vec3(pos[0], pos[1], pos[2]))

I haven’t holistically tested this change, so please let me know if anyone is aware of any horrendous consequences :wink:

Hopefully, people can make use of this change!

Take care,
Mark