Priyank.Jain2 Posted October 11, 2017 Posted October 11, 2017 I have created multiple WidgetSpriteViewport and want to set viewport_mask to number of objects (meshes and terrain) so that those can be viewed in multiple viewports. In editor mode I am able to set viewport_mask using tools>>batch, but can we do same thing using Unigine script? Also I tried using material.setViewportMask() for the material that all those meshes are using but it is not making any effect. Am I missing something?
silent Posted October 11, 2017 Posted October 11, 2017 Hi Priyank, Editor is written with a help of UnigineScript, so you can easily check how this function is working looking at the source file (editor_tools.h in this case). Probably you need to set up viewport mask on Node itself, not the material. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Priyank.Jain2 Posted October 11, 2017 Author Posted October 11, 2017 (edited) Thanks Silent, I checked that, Its also iterating over all the nodes and their surfaces and calling setViewportMask() for them. But is there any way I can get list of nodes that are sharing same material? Edited October 11, 2017 by Priyank.Jain2 Build understanding for viewport mask for material and node.
silent Posted October 11, 2017 Posted October 11, 2017 Hi Priyank, Just iterate over all the nodes and add them to separate array if they have the same material specified. I'm afraid, there is no other way to do this. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts