Yup, putting on a sweater is a more complex task which requires deliberate planning and coordination, it requires more cognitive control as opposed to tossing your shirt which is a simple reflexive behavior. Sleepwalkers can perform highly coordinated and complex behaviors as it does not happen during REM sleep where your body is paralyzed, but sleepwalking is a distinct phenomenon, plus when you are not sleepwalking, the brain's control over motor functions is very limited.
Not everything is lost though, you can potentially learn it through repetition, you just have to do this in a half-awake state or in a state close to sleep. Do it often enough, and theoretically you may be able to perform the task during non-REM sleep.