KatsBits Community

Game Editing => Textures & 2D content => Topic started by: ACDmvmkr on January 13, 2014, 02:19:55 AM

Title: Removal of old materials?
Post by: ACDmvmkr on January 13, 2014, 02:19:55 AM
How do I delete old and obsolete materials from my Blender file?

I have tediously gone through my file and deleted all objects using them, yet they still keep stubbornly hanging on through Blender quit, exit and reload, even though they have no fake users or real users that I can find. I go through the materials list and it keeps showing them as having 1 user left, but I can't figure out how to find and eliminate that user. (Using the SEARCH in the Outliner won't find the material, even though it appears in the drop down list.)

(https://www.katsbits.com/community/proxy.php?request=http%3A%2F%2Ffarm4.staticflickr.com%2F3680%2F11919030965_05df24c279_c.jpg&hash=ad7863f59607fef819d355eb1f647d183e636cf7)

My list of materials in that file is so honking huge that it overruns the page and I can't access the ones that I want because they run off page.

....And....

even as I eliminate them, the list just gets shorter top to bottom instead of freeing up the left to right space to show within the margins....

(https://www.katsbits.com/community/proxy.php?request=http%3A%2F%2Ffarm8.staticflickr.com%2F7368%2F11919891166_f08b5a3022_c.jpg&hash=4477c37838b08cb5e314cd6dc9f040773c86d5eb)

- How do I get them all to list on page?,

and

- If I can't do that, how do I get rid of those ones I don't want anymore?
Can't I go to a list and just delete them???

thx
Title: Re: Removal of old materials?
Post by: kat on January 13, 2014, 04:01:11 AM
When you have really stubborn datalinks like that the only way to remove them is to create a clean file and Append the necessary data in; doing so specifically forces Blender to use data directly linked or associated with any Object/s being brought in, leaving the 'junk' untouched (double-check your link in "Outliner > View > Opps Schematic" view to make sure beforehand though).

The problem stems for the way Blender works with datablocks, basically you're not creating 'Objects' as you would in other applications, but blocks of data, this means that same block can be referenced multiple times without the need to create individualised blocks (as would be needed if each 'instance' was a datablock in it's own right - this is one of the reasons Blender is good with "instancing"). The downside to that is what you're finding, the blocks, being legitimate 'entities' in their own right, are very stubborn, and because they can't be accessed directly in the same way as other Objects, can't be managed easily when associated data no longer has links - in the pre 2.50 versions of Blender this was a really really big problem (as you know) and quite awkward to sort out in situations as you've described.

And yes, when the list of items gets that extensive, you usually have to remove a lot of references before seeing any discernible change, if you have too many it will basically go off the page rather than 'scroll' (as might otherwise be expected).

By the way... holy mackerel! That's the first time I've ever seen that many materials in a file! Speaking of which, if your project is getting really complicated, as indicated, you might want to think about using "Append > Link".. this will allow you to create separate files containing materials you 'link' in to your main project. That way you can make changes to the materials without necessarily altering the main file. Worth thinking about looking at what you've posted above.