The rule says, that you can not have an object after an intransitive verb. But this sentence, in my opinion, doesn't sound wrong? "Smiling was what the baby was doing."
But is it grammatically correct?
The rule says, that you can not have an object after an intransitive verb. But this sentence, in my opinion, doesn't sound wrong? "Smiling was what the baby was doing."
But is it grammatically correct?
In your example, you have restated the original idea not by changing its voice, but by converting the verb smile into a verbal noun (traditionally called a "gerund") that is the subject of the main clause of the new sentence. Thus the example is grammatical, although quite awkward and unlikely to be uttered. It's the same pattern as if you said
Cocaine was what the baby was doing.
His income tax return was what the baby was doing.
Seventy miles per hour was what the baby was doing.
If smile were transitive, you'd be able to use the passive voice to say something like The mother was smiled by the baby. But you can't, because it isn't.