Potential Solution to DS 4.20 Breaking Certain Products
![algovincian](https://farnsworth-prod.uc.r.appspot.com/forums/uploads/userpics/244/nARKTD206Y8PK.png)
DS 4.20, and the version of Iray in it, is creating a major fork in the road for PAs and the content they create because of changes to the way Iray handles emission and cutout opacities.
I think there's a way to address this issue without updates breaking support for users running pre 4.20 versions of DS, or creating a second version of products that supports 4.20 and requiring users to select which to install/use.
I've done some preliminary testing on using Post Load Data Items to determine what version of DS is running, and then set parameters accordingly. This would allow for a single version of assets/single set of files to support both pre and post 4.20 versions of DS. It would also be transparent to users and require them to do nothing.
The basic idea is to add a Post Load Data Item that gets saved with user facing DUF files. This Post Load Data Item points to a script that gets executed when the asset is loaded. The script would first find out what version of DS is running, and then set parameters for the asset accordingly.
The Post Load Data Item can be added in several different ways:
1. From the Scene tab hamburger menu, select Edit->Element Data
2. Edit uncompressed DUFs with a text editor to add the node:extra data chunk that gets saved in DUF files
3. Via scripting
The script that runs on loading determines whether the user is running a pre 4.20 or post 4.20 version of DS by testing whether App.version64 >= whatever the encoded # is for DS 4.20. It then sets the necessary material parameters accordingly, etc.
I think this approach would work, and also may prove useful when DS 5.x gets released.
- Greg