20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.77k stars 754 forks source link

Listing Foliage instances #431

Open dronepiece opened 6 years ago

dronepiece commented 6 years ago

I'm trying to figure out if it's possible to get data from the Foliage painter actor. The data I would like to have is some sort of instance id, number of instances and the name of the staticmesh source.

From the docs I learnt how to add Foliage actors to the Foliage painter but I'm having problem finding a way to query them. Are there any functions available related to the AInstancedFoliageActor that I can use?

Thanks! /Erik

rdeioris commented 6 years ago

Hi, the foliage api has been extended (just pull latest code) to allow instances iteration:

https://github.com/20tab/UnrealEnginePython/blob/master/docs/Foliage_API.md#iterating-instances

dronepiece commented 6 years ago

Very cool, thank you! Looks like its just what I needed.