Thanks Dan,
I was investigating another bug [1] and was mislead into using
bpy.ops.texture.new() instead :)

[1] - 
https://projects.blender.org/tracker/index.php?func=detail&aid=23488&group_id=9&atid=498

--
Dalai

2010/8/24 Dan Eicher <[email protected]>:
> On Tue, Aug 24, 2010 at 11:55 AM, Dalai Felinto <[email protected]> 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;
> }
> _______________________________________________
> Bf-committers mailing list
> [email protected]
> http://lists.blender.org/mailman/listinfo/bf-committers
>
_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to