Hm. Don't hold your breath, but this
is related to a project I've been working on off and on: making a framework to allow for easier animation of decorative weapons.
In the meantime, though, I'd suggest dropping the 'animation' portion and using decorative weapons that simply respond to the state of the ship. For example, a deco hull panel that covers a turret slot and, if a weapon is installed in that slot, replaces itself with an empty image. (Or perhaps the other way around would work better?)
Pair that with a built-in hullmod that adds cargo space if the weapon slot is empty, or perhaps reduces cargo space if the weapon is present, and you should have a good start on something that feels like it can be outfitted as a q-ship... if, perhaps, along similar lines to phase ships, where maybe it was stealthy at some point in the past, but modern sensor upgrades have overcome that.
See the
decolib mod for an example of how to make weapon visibility changes that will be properly reflected in all screens (except the main map, but details of ships aren't really visible at that scale.) And then thank Alex for adding in the WeaponEffectPluginWithInit interface and its init method.