The function of the pronoun "se" in the following sentence
Me di cuenta de que "se" me habia olvidado ponerme los pantalones. Me di cuenta de que (I realized that) me habia olvidado (I had forgotten) ponerme los pantalones (to put on my pants). What is the function of "se"?
I may be wrong but it looks to me like the "se", along with the "me", is turning "olvidar" into a pronominal verb. I am not sure as to how it affects the sentence without the "se", other than without it, the second sentence may not portray the same meaning.
"Se" is used like this, apparently to distance the idiot who did, forgot, broke whatever from the reality of having done it. This is how I understand it.
The classic case is "I dropped it" = "lo cayé" but spoken as "se me lo cayó" = "it fell from me" or "well sir/ma'am, it just dropped out of my hand".
As an exercise, consider and transform "se me lo quebró" along similar lines.