![]() |
Replace Image Layer bs by direct scene.bs script - Printable Version +- Phoenix Garden (https://roysforum.com) +-- Forum: Community (https://roysforum.com/forum-103.html) +--- Forum: Raistin Kane - Research Center (https://roysforum.com/forum-158.html) +--- Thread: Replace Image Layer bs by direct scene.bs script (/thread-722.html) |
Replace Image Layer bs by direct scene.bs script - Richter Belmont - 07-24-2024 If you took a look at the game hair script, you must know that they need some additional script for working with the hair color slider. The first one beeing a AppReplaceImage in the Ac*.bs Code: AppReplaceImage . {[/color] Here the TextureName is the Object.Name of a Texture2D object. The LayerFile is a .bs file placed in the same folder as the texture image and will contain script looking like this. Code: [/color] However, there is some good chance that you were not aware that this AppReplaceImage and Layer bs can be replaced by script writed directly in your scene file. So let take a look at the object type hierarchy. Group Layer Node use TransformLayer Node as parameter. (It can also use Image Layer as parameter...) TransformLayer node use ImageLayer node as parameter. ImageLayer node use FileObject node as parameter. Group Layer --> TransformLayer --> ImageLayer --> FileObject So here what look like the Layer.bs script when beeing writed in a scene file. Code: [/color] As for the AppReplaceImage we will simply write an additional parameter in our Texture2D instead of using it. Code: Texture2D :local_19 . {[/color] |