rename getMeshNames to getChildEntities
This commit is contained in:
@@ -597,9 +597,10 @@ abstract class FilamentController {
|
|||||||
FilamentEntity parent, String childName);
|
FilamentEntity parent, String childName);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Lists all child meshes under the given entity.
|
/// List all child entities under the given entity.
|
||||||
///
|
///
|
||||||
Future<List<String>> getMeshNames(FilamentEntity entity, {bool async = true});
|
Future<List<String>> getChildEntities(FilamentEntity entity,
|
||||||
|
{bool renderableOnly = true});
|
||||||
|
|
||||||
///
|
///
|
||||||
/// If [recording] is set to true, each frame the framebuffer/texture will be written to /tmp/output_*.png.
|
/// If [recording] is set to true, each frame the framebuffer/texture will be written to /tmp/output_*.png.
|
||||||
|
|||||||
@@ -1436,12 +1436,13 @@ class FilamentControllerFFI extends FilamentController {
|
|||||||
return childEntity;
|
return childEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<String>> getMeshNames(FilamentEntity entity,
|
@override
|
||||||
{bool async = false}) async {
|
Future<List<String>> getChildEntities(FilamentEntity entity,
|
||||||
var count = get_entity_count(_sceneManager!, entity, true);
|
{bool renderableOnly = false}) async {
|
||||||
|
var count = get_entity_count(_sceneManager!, entity, renderableOnly);
|
||||||
var names = <String>[];
|
var names = <String>[];
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i < count; i++) {
|
||||||
var name = get_entity_name_at(_sceneManager!, entity, i, true);
|
var name = get_entity_name_at(_sceneManager!, entity, i, renderableOnly);
|
||||||
if (name == nullptr) {
|
if (name == nullptr) {
|
||||||
throw Exception("Failed to find mesh at index $i");
|
throw Exception("Failed to find mesh at index $i");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user