ob.getChilren() often requested for 2.4x api, notice this is only 1 line of python.

This commit is contained in:
Campbell Barton 2009-10-28 09:39:16 +00:00
parent 29cae6de75
commit 64455004e0
3 changed files with 6 additions and 0 deletions

@ -0,0 +1,4 @@
import bpy
class_obj = bpy.types.Object
class_obj.getChildren = lambda ob: [child for child in bpy.data.objects if child.parent == ob]

@ -0,0 +1 @@
import bpy_ext.Object

@ -200,6 +200,7 @@ static void bpy_init_modules( void )
bpy_import_test("bpy_ops"); /* adds its self to bpy.ops */
bpy_import_test("bpy_sys"); /* adds its self to bpy.sys */
bpy_import_test("bpy_ext"); /* extensions to our existing types */
}
/* stand alone utility modules not related to blender directly */