assetNamingInfo

Synopsis

string assetNamingInfo(string assetName, namingAttributeSelector)

Parameters

Returns

A string list with group names or material names, separated with ";" (also after the last entry).

This function returns names of groups or materials as a string list, depending on the specified namingAttributeSelector.

The order of groups or materials in the string list corresponds to the order given by the indexed component split for groups and materials. In other words, the index of an entry in the string list corresponds to the component index.

Related

Example


Group Split
const asset = "Orange_Tree_Model_0.obj"
const mat = assetNamingInfo(asset, m) 
		
Ex1 --> i(asset)
        comp(m) { listIndex(mat, "Bark") : Trunk. |
                  all                    = Foliage }
			
Ex2 --> i(asset)
        comp(m) { all : [ case listItem(mat, comp.index) == "Bark" : Trunk. 
                          else                                     : Foliage ] }
						  
Ex3 --> i(asset)
        comp(m) { all : [ case material.name == "Bark" : Trunk. 
                          else                         : Foliage ] }

Foliage --> set(material.opacity, 0.2)
        

The component split is used to extract the material with name "Bark". This can be achieved in three different ways. For the used asset the material name list is mat="Foliage;Foliage__leafcard;Bark;".

Copyright ©2008-2018 Esri R&D Center Zurich. All rights reserved.