[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31540] trunk/blender: - move more active properties into their collections:

Dan Eicher dan at trollwerks.org
Tue Aug 24 21:44:43 CEST 2010


On Tue, Aug 24, 2010 at 11:55 AM, Dalai Felinto <dfelinto at gmail.com> wrote:

> Hi Campbell,
> what is the criteria to return or not the created object from a new()
> function?
> Or the real question: can bpy.data.textures.new() return the texture as
> well?
>
> I wonder if to return the created object is something reserved to
> Direct Data while Lib Data * should be retrieved differently.
>
> Cheers,
> Dalai
>
>
bpy.data.textures.new() should already return the texture;

Tex *rna_Main_textures_new(Main *bmain, char* name)
{
    Tex *tex= add_texture(name);
    tex->id.us--;
    return tex;
}


More information about the Bf-committers mailing list