Hello CE Community,
I'm looking for a way to override randomized textures. It would be nice to have the ability to change the textures with a drop-down menu in the inspector.
Thanks.
Yes, that is correct. The @File annotation allows you to open a file chooser.
Annotations—ArcGIS CityEngine Resources | Documentation
I think you are trying to activate browse tool.
I use the texture folder wildcard method:
attr wall_tex = getWallTexture getWallTexture = listRandom(_getWallTexture) _getWallTexture = fileSearch("/FolderDestination*" + "*.*") <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Then over in the inspector you should be able to access the "browse" to override your texture:
I also think you can activate the browse by simply adding the "@File" before your attribute rule (?).
Just use a stochastic rule in your attribute. This will randomize on seed generation and then give you the ability to change it. Something like the code below should work.
@Enum("texA.jpg","texA.jpg","texC.jpg","texD.jpg") attr Texture = 25%: "texA.jpg" 25%: "texB.jpg" 25%: "texC.jpg" else: "texD.jpg"<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.