Toy Story 3 was an amazing movie, but a little disappointing from a LEGO perspective. We heard in advance that LEGO would be featured, and LEGO had a prominent role in one of the the trailers. But in the actual movie, there was precious little LEGO. Some minifigures were essentially extras in a few crowd scenes - walking around among other toys at Sunnyside when Woody and the gang arrived, and when Buzz was captured he was tied to a chair made of DUPLO. It seemed such a missed opportunity, because you could imagine LEGO being used in all sorts of ways.
There was a brief view of minifigures again in the Hawaiian Vacation short, but LEGO first played a true role in Toy Story of Terror. This is unsurprising, since the Halloween special was directed by noted AFOL Angus MacLane, who included a couple of LEGO references. The first was a glimpse of a LEGO set (the blue box) behind our heroes.
Second, and much more important, was the inclusion of a real LEGO character, the bunny seen on the far right here. Even though he didn't talk, this bunny took advantage of his LEGO-nature, rebuilding himself into a cube, a stairway, and a ladder to advance the action. In the end the bunny escapes the Sleep Well with Combat Carl and the other secondary characters, so maybe we'll see him again.