armory3d / armory

3D Engine with Blender Integration
https://armory3d.org/engine
zlib License
3.08k stars 319 forks source link

get object child returning an object that is not a child #2962

Open t3du opened 1 year ago

t3du commented 1 year ago

Hi, the Get Object Child is inconsistent with the Get Object Children. Because the Get Object Child for the same name object returns the object even though is not a child. The Get Object Children does not do that, it only returns the children. image https://github.com/armory3d/iron/blob/8bf6b8fbf80bef6f12183413d1c23e2b9ccdeb5b/Sources/iron/object/Object.hx#L111

If it is right this way then that is needed in the documentation. Otherwise we need to adjust the code. Because get children does not do that so its misleading.

i open this issue to further discuss the options.