Cleanup: Reduce indentation
Since the if statement is just a NULL check, returning early is simpler and makes reading the rest of the funtion easier.
This commit is contained in:
parent
aa64fd69e7
commit
57fe65b17e
@ -82,7 +82,10 @@ static void get_instanced_data__collection(
|
||||
bke::PersistentCollectionHandle collection_handle =
|
||||
params.get_input<bke::PersistentCollectionHandle>("Collection");
|
||||
Collection *collection = params.handle_map().lookup(collection_handle);
|
||||
if (collection != nullptr) {
|
||||
if (collection == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
const bool use_whole_collection = node.custom2 == 0;
|
||||
if (use_whole_collection) {
|
||||
InstancedData instance;
|
||||
@ -118,7 +121,6 @@ static void get_instanced_data__collection(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static Array<std::optional<InstancedData>> get_instanced_data(const GeoNodeExecParams ¶ms,
|
||||
|
Loading…
x
Reference in New Issue
Block a user