  We give an interpretation of the Omega deformed B-model that leads naturally
to the generalized holomorphic anomaly equations. Direct integration of the
latter calculates topological amplitudes of four dimensional rigid N=2 theories
explicitly in general Omega-backgrounds in terms of modular forms. These
amplitudes encode the refined BPS spectrum as well as new gravitational
couplings in the effective action of N=2 supersymmetric theories. The rigid N=2
field theories we focus on are the conformal rank one N=2 Seiberg-Witten
theories. The failure of holomorphicity is milder in the conformal cases, but
fixing the holomorphic ambiguity is only possible upon mass deformation. Our
formalism applies irrespectively of whether a Lagrangian formulation exists. In
the class of rigid N=2 theories arising from compactifications on local
Calabi-Yau manifolds, we consider the theory of local P2. We calculate motivic
Donaldson-Thomas invariants for this geometry and make predictions for
generalized Gromov-Witten invariants at the orbifold point.
