appleseedhq / appleseed-max

appleseed plugin for Autodesk® 3ds Max®
https://appleseedhq.net/
MIT License
33 stars 16 forks source link

Enable updating OSL plugin parameters by calculating parameter IDs based on name hash #289

Closed usakhelo closed 4 years ago

usakhelo commented 5 years ago

Hi, This PR changes OSL plugin parameter IDs from arbitrary numbers to 15 bit parameter name hash. This will enable adding and potentially removing parameters from OSL shaders. PR includes python script that helps finding new parameter names whose hashes will not conflict with existing parameters. Please note that I needed to hash values to start from 200 so that there's no collision with obsolete parameter IDs.

Thanks for review, Sergo.