Gary Coleman loved trains almost as much as he loved his wife ... TMZ has learned the former child actor originally planned to leave almost all his worldly possessions to three model train stores ... assuming Shannon was dead.
In the 2006 will, Gary made Shannon the beneficiary of most of his property -- including clothing, jewelry, art, boats, and other recreational vehicles. But if Shannon predeceased Gary or died within 90 days of his death, all his stuff was supposed to go to Allied Model Trains, The Original Whistle Stop, and The Train Shack in L.A.
But even if Shannon outlived Gary, she wasn't getting her hands on his enormous model train collection -- under the '06 will, Gary doled out all of his trains to the stores he loved.
As TMZ first reported, Shannon just filed docs claiming she's the rightful heir to everything ... based on a somewhat mysterious 2007 handwritten addendum -- which would cut the train stores off in their tracks from getting anything.