[Bf-committers] De-referencing materials in mesh, bug?

Ton Roosendaal ton at blender.org
Mon May 2 16:03:09 CEST 2005


Hi,

The bugtracker is something I check all the time, no reason for cross  
posting!
And its not a bug even... see tracker reply.

-Ton-

On 2 May, 2005, at 9:54, Campbell Barton wrote:

>  Hi, I recently noticed an interesting thing.
>  When a mesh has no users then its looses the reference to its  
> materials.
>
>  The result is that a mesh with no users cant have any materials. This  
> is an interesting problem. If you think about it :).
>
>  This is a bug since making DATA have no users shouldent modify the  
> data its self, especialy loose data.
>
>  Its actually causing a bug in a plugin Im writing. since all meshs  
> need materials for exporting, and I only want to import an object once  
> from an extarnal library.
>  So objects that are created from a mesh with no users immediatly  
> loose all materials.
>
>  On the flip side, keeping a mesh with no users links to materials  
> will make a material have links when it would look like it shouldent,.  
> and also twice as many save/opens to dereference the material.
>
>  the F betton to make it have a fake user is okay, but dosent solve  
> the problem, only a workaround and isnt accsessable from python.
>
>  WHats the Best solution?
>
>
>  Keep the meshes reference to the material, but still remove one user  
> from the material.
>
>  If the mesh is used later on, then bump up the users of materials.   
> else they will both be de-allocated at once. so the mesh will never  
> reference a materail that isnt there.
>
>  - Cam
>
>  BUG REPORT
> https://projects.blender.org/tracker/index.php? 
> func=detail&aid=2509&group_id=9&atid=125
>  _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list