Merge pull request #469 from est77/master

Fixed cannot create materials bug.
minor code tweak.
Merge branch 'master' of github.com:appleseedhq/appleseed