bugfix [#20639] BF25_SVN_25888 and below - OBJ and 3DS import fails
authorCampbell Barton <ideasman42@gmail.com>
Sun, 17 Jan 2010 20:06:34 +0000 (20:06 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 17 Jan 2010 20:06:34 +0000 (20:06 +0000)
commitc7dfa96aeac0940b093efed9b818e0c0d3c9feba
tree23d24587f9c83a8d69315b44d47781cfcd5c7064
parent55756719fbebf4ffdf0485de58532c73f84ecaac
bugfix [#20639] BF25_SVN_25888 and below - OBJ and 3DS import fails

blender supports type changing for textures in a way that python doesnt.
add a new general function.

Example usage:
 tex = bpy.data.textures.new("Foo")
 tex.type = 'IMAGE'
 tex = tex.recast_type()

Macro to give the number of users accounting for fake user.
 ID_REAL_USERS(id)
Use this so you can remove a datablock if it has a fake users as well as apply transformations to it in the 3D view.

Move api function bpy.data.add_texture() --> bpy.data.textures.new()/remove()
12 files changed:
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
source/blender/blenkernel/BKE_deform.h
source/blender/editors/object/object_transform.c
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_texture.c
source/blender/python/intern/bpy_rna.c