Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'materials_library_vx/save_categories.py')
-rw-r--r--materials_library_vx/save_categories.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/materials_library_vx/save_categories.py b/materials_library_vx/save_categories.py
new file mode 100644
index 00000000..7f90fcdf
--- /dev/null
+++ b/materials_library_vx/save_categories.py
@@ -0,0 +1,19 @@
+
+print(30*"+")
+import bpy
+if not hasattr(bpy.context.scene, "matlib_categories"):
+ class EmptyProps(bpy.types.PropertyGroup):
+ pass
+ bpy.utils.register_class(EmptyProps)
+ bpy.types.Scene.matlib_categories = bpy.props.CollectionProperty(type=EmptyProps)
+cats = bpy.context.scene.matlib_categories
+for cat in cats:
+ cats.remove(0)
+
+cat = cats.add()
+cat.name = "Colors"
+cat = cats.add()
+cat.name = "Nature"
+cat = cats.add()
+cat.name = "Woods"
+bpy.ops.wm.save_mainfile(filepath="D:\\Blender Foundation\\Blender\\2.73\\scripts\\addons\\matlib\\Otherlib.blend", check_existing=False, compress=True) \ No newline at end of file