N2
ところだった ②
Almost, nearly (something bad); was just about to / in the middle of
絵の具をつけてしまうところだった。
I nearly got paint on it.
Explanation
「ところだった ②」 has 2 uses
1Almost, nearly (but it was avoided)
Dictionary form + ところだった: something bad very nearly happened but was avoided at the last moment. Often with 「危うく、もう少しで」: 「危うく車にひかれるところだった」 (I was almost hit by a car).
絵の具をつけてしまうところだった。
I nearly got paint on it.
危なかった。危うくあの人をひくところだった。
That was close. I nearly ran that person over.
2Was just about to / was in the middle of
「る/ている/たところだった」 just describes a past point in time: you were about to do it, in the middle of it, or had just done it, often followed by 「のに、が」 for an interruption: 「出かけるところだったが、雨が降ってきた」 (I was just about to go out when it started raining), 「お風呂に入っているところだった」 (I was in the bath at the time).
今から家を出るところだったのに、いきなり雨が降ってきたから雨が止むまで待つ。
I was just about to leave the house, but it suddenly started raining, so I'm going to wait until the rain stops.
もうすぐ犯人が自白するところだったのに、お前が余計なことを言うから...。
The killer was just about to confess, but you went off on a tangent...