Jump to content

batch viewport_mask using script


photo

Recommended Posts

Posted

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?

Posted

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:

Posted (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 by Priyank.Jain2
Build understanding for viewport mask for material and node.
×
×
  • Create New...