forked from bartvdbraak/blender
ob.getChilren() often requested for 2.4x api, notice this is only 1 line of python.
This commit is contained in:
parent
29cae6de75
commit
64455004e0
4
release/scripts/modules/bpy_ext/Object.py
Normal file
4
release/scripts/modules/bpy_ext/Object.py
Normal file
@ -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]
|
1
release/scripts/modules/bpy_ext/__init__.py
Normal file
1
release/scripts/modules/bpy_ext/__init__.py
Normal file
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user