Simple Material Manager (addon)

You can try this:
https://github.com/zebus3d/varios_blender/blob/master/simple_material_manager_addon_and_textures_v00.py

EDITED: Still has some problems, I will have to review the code… :frowning:

Well, I think it works correctly… :slight_smile:
https://github.com/zebus3d/varios_blender/blob/master/simple_material_manager_addon_and_textures_v00.py


I’ve this error when I try to activate the addon
‘_RestrictData’ object has no attribute ‘scenes’
I don’t know which blender version you have, but it seems that in th e up to date version you can use bpy.context or bpy.data.** when you register the addon, I think it come from that.
Thanks for your work about texture anyway.

What version are you using?. I use the 2.65.

could put in the blender console this:
bpy.ops.wm.addon_enable(module=“you_name_script.py”)
and copy me the full error message?

Thanks.

I use the llast svn:

Traceback (most recent call last):
File “/home/kgeogeo/blender-svn/build_linux/bin/2.65/scripts/modules/addon_utils.py”, line 269, in enable
mod = import(module_name)
File “/home/kgeogeo/.config/blender/2.65/scripts/addons/simple_material_manager_addon_and_textures_v00.py”, line 41, in <module>
mySceneProperties(bpy.context.scene)
AttributeError: ‘_RestrictContext’ object has no attribute ‘scene’
reloading addon: simple_material_manager_addon_and_textures_v00 1360664925.5397058 1360665166.9476957 /home/kgeogeo/.config/blender/2.65/scripts/addons/simple_material_manager_addon_and_textures_v00.py

Apparently they have changed the api. I have more time I will try to update it. Thanks.

You can try this new version of my addon: https://github.com/zebus3d/simple_material_manager
I think it all works. Notify if you find bugs. Thanks.

I personally prefer to do first would manage the materials, and then remove unused materials with include textures.

Remember: if no objects are selected, actions act on all objects. And “include textures”, should only act with the button “Remove all materials” and “Remove unused materials”…

does not work with blender 268. can you please fix it? :frowning:

Hello,

Thanks so much for creating this tool. When I try to turn it on in the ADDON manager I get the following errors (blender version 2.68a):

Traceback (most recent call last):
File “C:\programs\blender-2.68a-windows64\2.68\scripts\modules\addon_utils.py”, line 294, in enable
mod = import(module_name)
File “C:\programs\blender-2.68a-windows64\2.68\scripts\addons\simple_material_manager-master_init_.py”, line 79, in <module>
from obtenertexturas import Texturas
ImportError: No module named ‘obtenertexturas’

Traceback (most recent call last):
File “C:\programs\blender-2.68a-windows64\2.68\scripts\modules\addon_utils.py”, line 294, in enable
mod = import(module_name)
File “C:\Users\Jay\AppData\Roaming\Blender Foundation\Blender\2.68\scripts\addons\simple_material_manager_addon.py”, line 39, in <module>
mySceneProperties(bpy.context.scene)
AttributeError: ‘_RestrictContext’ object has no attribute ‘scene’

doesnt work in any way you try it on 2.69

Thanks for the addon, it’s very useful here!

While it runs on 2.69 on linux it might not run on win due to line in init.py


for i in range(len(rutas_scripts)):
    rutas_addons.append(str(rutas_scripts[i])+"/addons")

I’m not able to test it currently on windows however


for i in range(len(rutas_scripts)):
    rutas_addons.append(str(rutas_scripts[i])+barra+"addons") 

might correct this.

This addon deletes all my meshes.

1 - Respect fake user
2 - Remove all materials
3 - Single material
4 - Save and restart file. All meshes are gone, other objects are still there.

This addon is currently broken.
Do not use it until a new update.
Sorry and apologize for any inconvenience.

any update to this addon really useful

Can someone update the scripts to the new version?

That why Blender is unfamous. Addons don`t work in newest versions!!!

Looks like a great tool, it wont load for me. :frowning:

Hello ofuscado, I just came across this addon and would really like to use it. However you have warned here that it is broken.
Can you tell me if you have any plans in your schedule to revisit this?
Thank you.

If you copy the script into a Text window, and Run it, it seems to work okay in 2.71.

I suspect it hasn’t been set up properly to be an Addon (the way the ‘Respect’ property is attempted to be set per-scene, specifically), but if you really need the functionality, it does seem to work as-is.


This should work as an Addon now… but it loses the ‘Respect’ flag between sessions (and possibly between scenes). It’s amazingly tricky to try to work out how to store “global” data for a Panel that triggers multiple Operators (as opposed to properties within a single Operator, which is easy X).

simple_material_manager_addon.py.zip (3.33 KB)