You can mask the pistons and seals before you paint. Or, if you want to rebuild the caliper you can use air pressure to remove the pistons, replace the seals, and then reinstall the pistons if they are not scored. I think most guys do not remove the pistons.