[SCM] blender/upstream: Imported Upstream version 2.65a

mfv-guest at users.alioth.debian.org mfv-guest at users.alioth.debian.org
Thu Jan 10 15:31:24 UTC 2013


The following commit has been merged in the upstream branch:
commit 1314487badc70d0db78a01f1532583a079fe17a0
Author: Matteo F. Vescovi <mfv.debian at gmail.com>
Date:   Thu Jan 10 16:18:49 2013 +0100

    Imported Upstream version 2.65a

diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index 91b0549..ec66cff 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -33,6 +33,7 @@ set(INC_SYS
 
 set(SRC
 	FX/AUD_AccumulatorFactory.cpp
+	FX/AUD_BandpassCalculator.cpp
 	FX/AUD_BaseIIRFilterReader.cpp
 	FX/AUD_ButterworthCalculator.cpp
 	FX/AUD_ButterworthFactory.cpp
@@ -147,6 +148,7 @@ set(SRC
 	intern/AUD_StreamBufferFactory.h
 
 	FX/AUD_AccumulatorFactory.h
+	FX/AUD_BandpassCalculator.h
 	FX/AUD_BaseIIRFilterReader.h
 	FX/AUD_ButterworthCalculator.h
 	FX/AUD_ButterworthFactory.h
diff --git a/intern/cycles/blender/addon/enums.py b/intern/cycles/blender/addon/enums.py
index 82b4897..fa9801e 100644
--- a/intern/cycles/blender/addon/enums.py
+++ b/intern/cycles/blender/addon/enums.py
@@ -29,11 +29,6 @@ feature_set = (
     ('EXPERIMENTAL', "Experimental", "Use experimental and incomplete features that might be broken or change in the future"),
     )
 
-shading_systems = (
-    ('GPU_COMPATIBLE', "GPU Compatible", "Restricted shading system compatible with GPU rendering"),
-    ('OSL', "Open Shading Language", "Open Shading Language shading system that only runs on the CPU"),
-    )
-
 displacement_methods = (
     ('BUMP', "Bump", "Bump mapping to simulate the appearance of displacement"),
     ('TRUE', "True", "Use true displacement only, requires fine subdivision"),
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index 0b8ca6e..f6dbf6b 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -50,11 +50,9 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 items=enums.feature_set,
                 default='SUPPORTED',
                 )
-        cls.shading_system = EnumProperty(
-                name="Shading System",
-                description="Shading system to use for rendering",
-                items=enums.shading_systems,
-                default='GPU_COMPATIBLE',
+        cls.shading_system = BoolProperty(
+                name="Open Shading Language",
+                description="Use Open Shading Language (CPU rendering only)",
                 )
 
         cls.progressive = BoolProperty(
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index d0e8b50..e78026e 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -289,7 +289,7 @@ SceneParams BlenderSync::get_scene_params(BL::Scene b_scene, bool background)
 	BL::RenderSettings r = b_scene.render();
 	SceneParams params;
 	PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
-	int shadingsystem = RNA_enum_get(&cscene, "shading_system");
+	int shadingsystem = RNA_boolean_get(&cscene, "shading_system");
 
 	if(shadingsystem == 0)
 		params.shadingsystem = SceneParams::SVM;
@@ -414,7 +414,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine b_engine, BL::Use
 		params.progressive = true;
 
 	/* shading system - scene level needs full refresh */
-	int shadingsystem = RNA_enum_get(&cscene, "shading_system");
+	int shadingsystem = RNA_boolean_get(&cscene, "shading_system");
 
 	if(shadingsystem == 0)
 		params.shadingsystem = SessionParams::SVM;
diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index 45f653a..01bb78e 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -112,8 +112,8 @@ template<typename T> struct texture_image  {
 			return make_float4(0.0f, 0.0f, 0.0f, 0.0f);
 
 		int ix, iy, nix, niy;
-		float tx = frac(x*width, &ix);
-		float ty = frac(y*height, &iy);
+		float tx = frac(x*width - 0.5f, &ix);
+		float ty = frac(y*height - 0.5f, &iy);
 
 		if(periodic) {
 			ix = wrap_periodic(ix, width);
diff --git a/intern/cycles/render/graph.h b/intern/cycles/render/graph.h
index b791678..61b5bd8 100644
--- a/intern/cycles/render/graph.h
+++ b/intern/cycles/render/graph.h
@@ -183,6 +183,9 @@ public:
 	virtual void compile(SVMCompiler& compiler) = 0;
 	virtual void compile(OSLCompiler& compiler) = 0;
 
+	virtual bool has_surface_emission() { return false; }
+	virtual bool has_surface_transparent() { return false; }
+
 	vector<ShaderInput*> inputs;
 	vector<ShaderOutput*> outputs;
 
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 6773314..97c617f 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -26,7 +26,7 @@
 CCL_NAMESPACE_BEGIN
 
 class ImageManager;
-class Shadr;
+class Shader;
 
 /* Texture Mapping */
 
@@ -220,6 +220,8 @@ public:
 class TransparentBsdfNode : public BsdfNode {
 public:
 	SHADER_NODE_CLASS(TransparentBsdfNode)
+
+	bool has_surface_transparent() { return true; }
 };
 
 class VelvetBsdfNode : public BsdfNode {
@@ -255,6 +257,8 @@ class EmissionNode : public ShaderNode {
 public:
 	SHADER_NODE_CLASS(EmissionNode)
 
+	bool has_surface_emission() { return true; }
+
 	bool total_power;
 };
 
diff --git a/intern/cycles/render/osl.cpp b/intern/cycles/render/osl.cpp
index e4ee40d..894565a 100644
--- a/intern/cycles/render/osl.cpp
+++ b/intern/cycles/render/osl.cpp
@@ -76,12 +76,12 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
 
 		if(progress.get_cancel()) return;
 
-		if(shader->sample_as_light && shader->has_surface_emission)
-			scene->light_manager->need_update = true;
-
 		OSLCompiler compiler((void*)this, (void*)ss, scene->image_manager);
 		compiler.background = (shader == scene->shaders[scene->default_background]);
 		compiler.compile(og, shader);
+
+		if(shader->sample_as_light && shader->has_surface_emission)
+			scene->light_manager->need_update = true;
 	}
 
 	/* setup shader engine */
@@ -202,8 +202,14 @@ static string shader_filepath_hash(const string& filepath, uint64_t modified_tim
 
 const char *OSLShaderManager::shader_test_loaded(const string& hash)
 {
-	set<string>::iterator it = loaded_shaders.find(hash);
-	return (it == loaded_shaders.end())? NULL: it->c_str();
+	map<string, OSLShaderInfo>::iterator it = loaded_shaders.find(hash);
+	return (it == loaded_shaders.end())? NULL: it->first.c_str();
+}
+
+OSLShaderInfo *OSLShaderManager::shader_loaded_info(const string& hash)
+{
+	map<string, OSLShaderInfo>::iterator it = loaded_shaders.find(hash);
+	return (it == loaded_shaders.end())? NULL: &it->second;
 }
 
 const char *OSLShaderManager::shader_load_filepath(string filepath)
@@ -261,7 +267,8 @@ const char *OSLShaderManager::shader_load_filepath(string filepath)
 
 	if(!path_read_text(filepath, bytecode)) {
 		fprintf(stderr, "Cycles shader graph: failed to read file %s\n", filepath.c_str());
-		loaded_shaders.insert(bytecode_hash); /* to avoid repeat tries */
+		OSLShaderInfo info;
+		loaded_shaders[bytecode_hash] = info; /* to avoid repeat tries */
 		return NULL;
 	}
 
@@ -272,7 +279,13 @@ const char *OSLShaderManager::shader_load_bytecode(const string& hash, const str
 {
 	ss->LoadMemoryShader(hash.c_str(), bytecode.c_str());
 
-	return loaded_shaders.insert(hash).first->c_str();
+	/* this is a bit weak, but works */
+	OSLShaderInfo info;
+	info.has_surface_emission = (bytecode.find("\"emission\"") != string::npos);
+	info.has_surface_transparent = (bytecode.find("\"transparent\"") != string::npos);
+	loaded_shaders[hash] = info;
+
+	return loaded_shaders.find(hash)->first.c_str();
 }
 
 /* Graph Compiler */
@@ -443,6 +456,16 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath)
 			ss->ConnectShaders(id_from.c_str(), param_from.c_str(), id_to.c_str(), param_to.c_str());
 		}
 	}
+
+	/* test if we shader contains specific closures */
+	OSLShaderInfo *info = ((OSLShaderManager*)manager)->shader_loaded_info(name);
+
+	if(info) {
+		if(info->has_surface_emission)
+			current_shader->has_surface_emission = true;
+		if(info->has_surface_transparent)
+			current_shader->has_surface_transparent = true;
+	}
 }
 
 void OSLCompiler::parameter(const char *name, float f)
@@ -598,9 +621,9 @@ void OSLCompiler::generate_nodes(const set<ShaderNode*>& nodes)
 					node->compile(*this);
 					done.insert(node);
 
-					if(node->name == ustring("emission"))
+					if(node->has_surface_emission())
 						current_shader->has_surface_emission = true;
-					if(node->name == ustring("transparent"))
+					if(node->has_surface_transparent())
 						current_shader->has_surface_transparent = true;
 				}
 				else
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h
index 9b58745..3c599ca 100644
--- a/intern/cycles/render/osl.h
+++ b/intern/cycles/render/osl.h
@@ -45,6 +45,18 @@ class ShaderOutput;
 
 #ifdef WITH_OSL
 
+/* OSL Shader Info
+ * to auto detect closures in the shader for MIS and transparent shadows */
+
+struct OSLShaderInfo {
+	OSLShaderInfo()
+	: has_surface_emission(false), has_surface_transparent(false)
+	{}
+
+	bool has_surface_emission;
+	bool has_surface_transparent;
+};
+
 /* Shader Manage */
 
 class OSLShaderManager : public ShaderManager {
@@ -65,6 +77,7 @@ public:
 	const char *shader_test_loaded(const string& hash);
 	const char *shader_load_bytecode(const string& hash, const string& bytecode);
 	const char *shader_load_filepath(string filepath);
+	OSLShaderInfo *shader_loaded_info(const string& hash);
 
 protected:
 	void texture_system_init();
@@ -74,7 +87,7 @@ protected:
 	OSL::TextureSystem *ts;
 	OSLRenderServices *services;
 	OSL::ErrorHandler errhandler;
-	set<string> loaded_shaders;
+	map<string, OSLShaderInfo> loaded_shaders;
 };
 
 #endif
diff --git a/intern/cycles/render/svm.cpp b/intern/cycles/render/svm.cpp
index 4acd174..f7cb8f6 100644
--- a/intern/cycles/render/svm.cpp
+++ b/intern/cycles/render/svm.cpp
@@ -478,9 +478,9 @@ void SVMCompiler::generate_closure(ShaderNode *node, set<ShaderNode*>& done)
 		stack_clear_users(node, done);
 		stack_clear_temporary(node);
 
-		if(node->name == ustring("emission"))
+		if(node->has_surface_emission())
 			current_shader->has_surface_emission = true;
-		if(node->name == ustring("transparent"))
+		if(node->has_surface_transparent())
 			current_shader->has_surface_transparent = true;
 
 		/* end node is added outside of this */
@@ -538,9 +538,9 @@ void SVMCompiler::generate_multi_closure(ShaderNode *node, set<ShaderNode*>& don
 
 		mix_weight_offset = SVM_STACK_INVALID;
 
-		if(node->name == ustring("emission"))
+		if(node->has_surface_emission())
 			current_shader->has_surface_emission = true;
-		if(node->name == ustring("transparent"))
+		if(node->has_surface_transparent())
 			current_shader->has_surface_transparent = true;
 	}
 
diff --git a/intern/elbeem/intern/ntl_world.cpp b/intern/elbeem/intern/ntl_world.cpp
index dcc81db..9ae5135 100644
--- a/intern/elbeem/intern/ntl_world.cpp
+++ b/intern/elbeem/intern/ntl_world.cpp
@@ -420,7 +420,12 @@ int ntlWorld::advanceSims(int framenum)
 	// Was: double targetTime = mSimulationTime + (*mpSims)[mFirstSim]->getFrameTime(framenum); - DG
 	double totalTime = 0.0, targetTime = 0.0;
 	for(size_t i = 0; i < mSimFrameCnt; i++)
-		totalTime += (*mpSims)[mFirstSim]->getFrameTime(framenum);
+	{
+		/* We need an intermediate array "mSimFrameValue" because
+		otherwise if we don't start with starttime = 0, 
+		the sim gets out of sync - DG */
+		totalTime += (*mpSims)[mFirstSim]->getFrameTime(mSimFrameValue[i]);	
+	}
 	targetTime = totalTime + (*mpSims)[mFirstSim]->getFrameTime(framenum);
 
 	int gstate = 0;
@@ -468,6 +473,7 @@ int ntlWorld::advanceSims(int framenum)
 		sim->prepareVisualization();
 	}
 
+	mSimFrameValue.push_back(framenum);
 	mSimFrameCnt++;
 
 	return 0;
diff --git a/intern/elbeem/intern/ntl_world.h b/intern/elbeem/intern/ntl_world.h
index c207904..6cec098 100644
--- a/intern/elbeem/intern/ntl_world.h
+++ b/intern/elbeem/intern/ntl_world.h
@@ -118,6 +118,7 @@ class ntlWorld
 
 		/*! count no. of frame for correct sim time */
 		int mSimFrameCnt;
+		vector<int> mSimFrameValue;
 };
 
 
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm
index 7a5bb8a..0523b86 100644
--- a/intern/ghost/intern/GHOST_WindowCocoa.mm
+++ b/intern/ghost/intern/GHOST_WindowCocoa.mm
@@ -620,8 +620,11 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa()
 	
 	//Check for other blender opened windows and make the frontmost key
 	NSArray *windowsList = [NSApp orderedWindows];
-	if ([windowsList count]) {
-		[[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil];
+	for (int a = 0; a < [windowsList count]; a++) {
+		if (m_window != (CocoaWindow *)[windowsList objectAtIndex:a]) {
+			[[windowsList objectAtIndex:a] makeKeyWindow];
+			break;
+		}
 	}
 	[pool drain];
 }
diff --git a/intern/iksolver/extern/IK_solver.h b/intern/iksolver/extern/IK_solver.h
index a3f599e..4de9f14 100644
--- a/intern/iksolver/extern/IK_solver.h
+++ b/intern/iksolver/extern/IK_solver.h
@@ -163,7 +163,7 @@ float IK_SolverGetPoleAngle(IK_Solver *solver);
 
 int IK_Solve(IK_Solver *solver, float tolerance, int max_iterations);
 
-#define IK_STRETCH_STIFF_EPS 0.001f
+#define IK_STRETCH_STIFF_EPS 0.01f
 #define IK_STRETCH_STIFF_MIN 0.001f
 #define IK_STRETCH_STIFF_MAX 1e10
 
diff --git a/release/datafiles/startup.blend b/release/datafiles/startup.blend
index cdd43c7..aa7a679 100644
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
diff --git a/release/scripts/addons/io_scene_obj/export_obj.py b/release/scripts/addons/io_scene_obj/export_obj.py
index 75443c3..a0926cc 100644
--- a/release/scripts/addons/io_scene_obj/export_obj.py
+++ b/release/scripts/addons/io_scene_obj/export_obj.py
@@ -79,7 +79,7 @@ def write_mtl(scene, filepath, path_mode, copy_set, mtl_dict):
                 fw('Ni %.6f\n' % mat.ior)  # Refraction index
             else:
                 fw('Ni %.6f\n' % 1.0)
-            fw('d %.6f\n' % (1.0 - mat.alpha))  # Alpha (obj uses 'd' for dissolve)
+            fw('d %.6f\n' % mat.alpha)  # Alpha (obj uses 'd' for dissolve)
 
             # 0 to disable lighting, 1 for ambient & diffuse only (specular color set to black), 2 for full lighting.
             if mat.use_shadeless:
diff --git a/release/scripts/addons/io_scene_obj/import_obj.py b/release/scripts/addons/io_scene_obj/import_obj.py
index 2987362..f9d7543 100644
--- a/release/scripts/addons/io_scene_obj/import_obj.py
+++ b/release/scripts/addons/io_scene_obj/import_obj.py
@@ -74,6 +74,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
     assign colors and images to the materials from all referenced material libs
     """
     DIR = os.path.dirname(filepath)
+    context_material_vars = set()
 
     #==================================================================================#
     # This function sets textures defined in .mtl file                                 #
@@ -109,7 +110,8 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
                 texture.use_interpolation = True
                 texture.use_alpha = True
                 blender_material.use_transparency = True
-                blender_material.alpha = 0.0
+                if "alpha" not in context_material_vars:
+                    blender_material.alpha = 0.0
 
                 blender_material.game_settings.alpha_blend = 'ALPHA'
             else:
@@ -155,7 +157,8 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
             mtex.use_map_alpha = True
             blender_material.use_transparency = True
             blender_material.transparency_method = 'Z_TRANSPARENCY'
-            blender_material.alpha = 0.0
+            if "alpha" not in context_material_vars:
+                blender_material.alpha = 0.0
             # Todo, unset deffuse material alpha if it has an alpha channel
 
         elif type == 'refl':
@@ -200,6 +203,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
                 elif line.startswith(b'newmtl'):
                     context_material_name = line_value(line.split())
                     context_material = unique_materials.get(context_material_name)
+                    context_material_vars.clear()
 
                 elif context_material:
                     # we need to make a material to assign properties to it.
@@ -215,10 +219,12 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
                         context_material.specular_hardness = int((float_func(line_split[1]) * 0.51))
                     elif line_lower.startswith(b'ni'):  # Refraction index
                         context_material.raytrace_transparency.ior = max(1, min(float_func(line_split[1]), 3))  # between 1 and 3
+                        context_material_vars.add("ior")
                     elif line_lower.startswith(b'd'):  # dissolve (trancparency)
                         context_material.alpha = float_func(line_split[1])
                         context_material.use_transparency = True
                         context_material.transparency_method = 'Z_TRANSPARENCY'
+                        context_material_vars.add("alpha")
                     elif line_lower.startswith(b'tr'):  # trancelucency
                         context_material.translucency = float_func(line_split[1])
                     elif line_lower.startswith(b'tf'):
@@ -305,10 +311,12 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
                         if do_transparency:
                             context_material.use_transparency = True
                             context_material.transparency_method = 'RAYTRACE' if do_raytrace else 'Z_TRANSPARENCY'
-                            context_material.alpha = 0.0
+                            if "alpha" not in context_material_vars:
+                                context_material.alpha = 0.0
 
                         if do_glass:
-                            context_material.raytrace_transparency.ior = 1.5
+                            if "ior" not in context_material_vars:
+                                context_material.raytrace_transparency.ior = 1.5
 
                         if do_fresnel:
                             context_material.raytrace_mirror.fresnel = 1.0  # could be any value for 'ON'
@@ -1163,15 +1171,3 @@ def load(operator, context, filepath,
 
     print("finished importing: %r in %.4f sec." % (filepath, (time_new - time_main)))
     return {'FINISHED'}
-
-
-# NOTES (all line numbers refer to 2.4x import_obj.py, not this file)
-# check later: line 489
-# can convert now: edge flags, edges: lines 508-528
-# ngon (uses python module BPyMesh): 384-414
-# NEXT clamp size: get bound box with RNA
-# get back to l 140 (here)
-# search image in bpy.config.textureDir - load_image
-# replaced BPyImage.comprehensiveImageLoad with a simplified version that only checks additional directory specified, but doesn't search dirs recursively (obj_image_load)
-# bitmask won't work? - 132
-# uses bpy.sys.time()
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/Blocks.py b/release/scripts/addons_contrib/add_mesh_building_objects/Blocks.py
deleted file mode 100644
index 36ef5c0..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/Blocks.py
+++ /dev/null
@@ -1,1683 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you may redistribute it, and/or
-# modify it, under the terms of the GNU General Public License
-# as published by the Free Software Foundation - either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, write to:
-#
-#   the Free Software Foundation Inc.
-#   51 Franklin Street, Fifth Floor
-#   Boston, MA 02110-1301, USA
-#
-# or go online at: http://www.gnu.org/licenses/ to view license options.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-
-##
-#
-# Module notes:
-#
-# Grout needs to be implemented.
-# consider removing wedge crit for small "c" and "cl" values
-# wrap around for openings on radial stonework?
-# auto-clip wall edge to SMALL for radial and domes.
-# unregister doesn't release all references.
-# repeat for opening doesn't distribute evenly when radialized - see wrap around
-#   note above.
-# if opening width == indent*2 the edge blocks fail (row of blocks cross opening).
-# if openings overlap fills inverse with blocks - see h/v slots.
-# Negative grout width creates a pair of phantom blocks, seperated by grout
-#   width, inside the edges.
-# if block width variance is 0, and edging is on, right edge blocks create a "vertical seam".
-#
-##
-
-# <pep8-80 compliant>
-
-import bpy, time, math
-from random import random
-from math import fmod, sqrt, sin, cos, atan
-
-#A few constants
-SMALL = 0.000000000001
-NOTZERO = 0.01 # for values that must be != 0; see UI options/variables -
-# sort of a bug to be fixed.
-PI = math.pi
-
-#global variables
-
-#General masonry Settings
-settings = {'w': 1.2, 'wv': 0.3, 'h': .6, 'hv': 0.3, 'd': 0.3, 'dv': 0.1,
-            'g': 0.1, 'gv': 0.07, 'gd': 0.01, 'gdv': 0.0, 'b': 0, 'bv': 0,
-            'f': 0.0, 'fv': 0.0, 't': 0.0, 'sdv': 0.1, 'hwt': 0.5, 'aln':0,
-            'wm': 0.8, 'hm': 0.3, 'dm':0.1,
-            'woff':0.0, 'woffv':0.0, 'eoff':0.3, 'eoffv':0.0, 'rwhl':1,
-            'hb':0, 'ht':0, 'ge':0, 'physics':0}
-# 'w':width 'wv':widthVariation
-# 'h':height 'hv':heightVariation
-# 'd':depth 'dv':depthVariation
-# 'g':grout 'gv':groutVariation 'gd':groutDepth 'gdv':groutDepthVariation
-# 'b':bevel 'bv':bevelVariation
-# 'f':flawSize 'fv':flawSizeVariation 'ff':flawFraction
-# 't':taper
-# 'sdv':subdivision(distance or angle)
-# 'hwt':row height effect on block widths in the row (0=no effect,
-#     1=1:1 relationship, negative values allowed, 0.5 works well)
-# 'aln':alignment(0=none, 1=rows w/features, 2=features w/rows)
-#     (currently un-used)
-# 'wm':width minimum 'hm':height minimum 'dm':depth minimum
-# 'woff':row start offset(fraction of width)
-# 'woffv':width offset variation(fraction of width)
-# 'eoff':edge offset 'eoffv':edge offset variation
-# 'rwhl':row height lock(1 is all blocks in row have same height)
-# 'hb':bottom row height 'ht': top row height 'ge': grout the edges
-# 'physics': set up for physics
-
-# dims = area of wall (face)
-dims = {'s':0, 'e':PI*3/2, 'b':0.1, 't':12.3} # radial
-# 's':start x or theta 'e':end x or theta 'b':bottom z or r 't':top z or r
-# 'w' = e-s and h = t-b; calculated to optimize for various operations/usages
-#dims = {'s':-12, 'e':15, 'w':27, 'b':-15., 't':15., 'h':30}
-#dims = {'s':-bayDim/2, 'e':bayDim/2, 'b':-5., 't':10.} # bay settings?
-
-radialized = 0 # Radiating from one point - round/disc; instead of square
-slope = 0 # Warp/slope; curved over like a vaulted tunnel
-# 'bigblock': merge adjacent blocks into single large blocks
-bigBlock = 0 # Merge blocks
-
-# Gaps in blocks for various apertures.
-#openingSpecs = []
-openingSpecs = [{'w':0.5, 'h':0.5, 'x':0.8, 'z':2.7, 'rp':1, 'b':0.0,
-                 'v':0, 'vl':0, 't':0, 'tl':0}]
-# 'w': opening width, 'h': opening height,
-# 'x': horizontal position, 'z': vertical position,
-# 'rp': make multiple openings, with a spacing of x,
-# 'b': bevel the opening, inside only, like an arrow slit.
-# 'v': height of the top arch, 'vl':height of the bottom arch,
-# 't': thickness of the top arch, 'tl': thickness of the bottom arch
-
-# Add blocks to make platforms.
-shelfExt = 0
-#shelfSpecs = []
-shelfSpecs = {'w':0.5, 'h':0.5, 'd': 0.3, 'x':0.8, 'z':2.7}
-# 'w': block width, 'h': block height, 'd': block depth (shelf size; offset from wall)
-# 'x': horizontal start position, 'z': vertical start position
-
-# Add blocks to make steps.
-stepMod = 0
-stepSpecs = {'x':0.0, 'z':-10, 'w':10.0, 'h':10.0,
-    'v':0.7, 't':1.0, 'd':1.0 }
-# 'x': horizontal start position, 'z': vertical start position,
-# 'w': step area width, 'h': step area height,
-# 'v': riser height, 't': tread width, 'd': block depth (step size; offset from wall)
-
-
-    #easier way to get to the random function
-def rnd(): return random()
-
-    #random number from -0.5 to 0.5
-def rndc(): return (random() - 0.5)
-
-    #random number from -1.0 to 1.0
-def rndd(): return (random() - 0.5)*2.0
-
-
-#Opening Test suite
-#opening test function
-
-def test(TestN = 13):
-    dims = {'s':-29., 'e':29., 'b':-6., 't':TestN*7.5}
-    openingSpecs = []
-    for i in range(TestN):
-        x = (random() - 0.5) * 6
-        z = i*7.5
-        v = .2 + i*(3./TestN)
-        vl = 3.2 - i*(3./TestN)
-        t = 0.3 + random()
-        tl = 0.3 + random()
-        rn = random()*2
-        openingSpecs += [{'w':3.1 + rn, 'h':0.3 + rn, 'x':float(x),
-                          'z':float(z), 'rp':0, 'b':0.,
-                          'v':float(v), 'vl':float(vl),
-                          't':float(t), 'tl':float(tl)}]
-    return dims, openingSpecs
-
-#dims, openingSpecs = test(15)
-
-
-#For filling a linear space with divisions
-def fill(left, right, avedst, mindst=0.0, dev=0.0, pad=(0.0,0.0), num=0,
-         center=0):
-    __doc__ = """\
-    Fills a linear range with points and returns an ordered list of those points
-    including the end points.
-
-    left: the lower boundary
-    right: the upper boundary
-    avedst: the average distance between points
-    mindst: the minimum distance between points
-    dev: the maximum random deviation from avedst
-    pad: tends to move the points near the bounds right (positive) or
-        left (negative).
-        element 0 pads the lower bounds, element 1 pads the upper bounds
-    num: substitutes a numerical limit for the right limit.  fill will then make
-        a num+1 element list
-    center: flag to center the elements in the range, 0 == disabled
-        """
-
-    poslist = [left]
-    curpos = left+pad[0]
-
-    # Set offset by average spacing, then add blocks (fall through);
-    # if not at right edge.
-    if center:
-        curpos += ((right-left-mindst*2)%avedst)/2+mindst
-        if curpos-poslist[-1]<mindst: curpos = poslist[-1]+mindst+rnd()*dev/2
-
-        # clip to right edge.
-        if (right-curpos<mindst) or (right-curpos< mindst-pad[1]):
-            poslist.append(right)
-            return poslist
-
-        else: poslist.append(curpos)
-
-    #unused... for now.
-    if num:
-        idx = len(poslist)
-
-        while idx<num+1:
-            curpos += avedst+rndd()*dev
-            if curpos-poslist[-1]<mindst:
-                curpos = poslist[-1]+mindst+rnd()*dev/2
-            poslist.append(curpos)
-            idx += 1
-
-        return poslist
-
-    # make block edges
-    else:
-        while True: # loop for blocks
-            curpos += avedst+rndd()*dev
-            if curpos-poslist[-1]<mindst:
-                curpos = poslist[-1]+mindst+rnd()*dev/2
-            # close off edges at limit
-            if (right-curpos<mindst) or (right-curpos< mindst-pad[1]):
-                poslist.append(right)
-                return poslist
-
-            else: poslist.append(curpos)
-
-
-#For generating block geometry
-def MakeABlock(bounds, segsize, vll=0, Offsets=None, FaceExclude=[],
-               bevel=0, xBevScl=1):
-    __doc__ = """\
-    MakeABlock returns lists of points and faces to be made into a square
-            cornered block, subdivided along the length, with optional bevels.
-    bounds: a list of boundary positions:
-        0:left, 1:right, 2:bottom, 3:top, 4:back, 5:front
-    segsize: the maximum size before lengthwise subdivision occurs
-    vll: the number of vertexes already in the mesh. len(mesh.verts) should
-            give this number.
-    Offsets: list of coordinate delta values.
-        Offsets are lists, [x,y,z] in
-            [
-            0:left_bottom_back,
-            1:left_bottom_front,
-            2:left_top_back,
-            3:left_top_front,
-            4:right_bottom_back,
-            5:right_bottom_front,
-            6:right_top_back,
-            7:right_top_front,
-            ]
-    FaceExclude: list of faces to exclude from the faces list.  see bounds above for indices
-    xBevScl: how much to divide the end (+- x axis) bevel dimensions.  Set to current average radius to compensate for angular distortion on curved blocks
-    """
-
-    slices = fill(bounds[0], bounds[1], segsize, segsize, center=1)
-    points = []
-    faces = []
-
-    if Offsets == None:
-        points.append([slices[0],bounds[4],bounds[2]])
-        points.append([slices[0],bounds[5],bounds[2]])
-        points.append([slices[0],bounds[5],bounds[3]])
-        points.append([slices[0],bounds[4],bounds[3]])
-
-        for x in slices[1:-1]:
-            points.append([x,bounds[4],bounds[2]])
-            points.append([x,bounds[5],bounds[2]])
-            points.append([x,bounds[5],bounds[3]])
-            points.append([x,bounds[4],bounds[3]])
-
-        points.append([slices[-1],bounds[4],bounds[2]])
-        points.append([slices[-1],bounds[5],bounds[2]])
-        points.append([slices[-1],bounds[5],bounds[3]])
-        points.append([slices[-1],bounds[4],bounds[3]])
-
-    else:
-        points.append([slices[0]+Offsets[0][0],bounds[4]+Offsets[0][1],bounds[2]+Offsets[0][2]])
-        points.append([slices[0]+Offsets[1][0],bounds[5]+Offsets[1][1],bounds[2]+Offsets[1][2]])
-        points.append([slices[0]+Offsets[3][0],bounds[5]+Offsets[3][1],bounds[3]+Offsets[3][2]])
-        points.append([slices[0]+Offsets[2][0],bounds[4]+Offsets[2][1],bounds[3]+Offsets[2][2]])
-
-        for x in slices[1:-1]:
-            xwt = (x-bounds[0])/(bounds[1]-bounds[0])
-            points.append([x+Offsets[0][0]*(1-xwt)+Offsets[4][0]*xwt,bounds[4]+Offsets[0][1]*(1-xwt)+Offsets[4][1]*xwt,bounds[2]+Offsets[0][2]*(1-xwt)+Offsets[4][2]*xwt])
-            points.append([x+Offsets[1][0]*(1-xwt)+Offsets[5][0]*xwt,bounds[5]+Offsets[1][1]*(1-xwt)+Offsets[5][1]*xwt,bounds[2]+Offsets[1][2]*(1-xwt)+Offsets[5][2]*xwt])
-            points.append([x+Offsets[3][0]*(1-xwt)+Offsets[7][0]*xwt,bounds[5]+Offsets[3][1]*(1-xwt)+Offsets[7][1]*xwt,bounds[3]+Offsets[3][2]*(1-xwt)+Offsets[7][2]*xwt])
-            points.append([x+Offsets[2][0]*(1-xwt)+Offsets[6][0]*xwt,bounds[4]+Offsets[2][1]*(1-xwt)+Offsets[6][1]*xwt,bounds[3]+Offsets[2][2]*(1-xwt)+Offsets[6][2]*xwt])
-
-        points.append([slices[-1]+Offsets[4][0],bounds[4]+Offsets[4][1],bounds[2]+Offsets[4][2]])
-        points.append([slices[-1]+Offsets[5][0],bounds[5]+Offsets[5][1],bounds[2]+Offsets[5][2]])
-        points.append([slices[-1]+Offsets[7][0],bounds[5]+Offsets[7][1],bounds[3]+Offsets[7][2]])
-        points.append([slices[-1]+Offsets[6][0],bounds[4]+Offsets[6][1],bounds[3]+Offsets[6][2]])
-
-    faces.append([vll,vll+3,vll+2,vll+1])
-
-    for x in range(len(slices)-1):
-        faces.append([vll,vll+1,vll+5,vll+4])
-        vll+=1
-        faces.append([vll,vll+1,vll+5,vll+4])
-        vll+=1
-        faces.append([vll,vll+1,vll+5,vll+4])
-        vll+=1
-        faces.append([vll,vll-3,vll+1,vll+4])
-        vll+=1
-
-    faces.append([vll,vll+1,vll+2,vll+3])
-
-    return points, faces
-#
-#
-#
-
-#For generating Keystone Geometry
-def MakeAKeystone(xpos, width, zpos, ztop, zbtm, thick, bevel, vll=0, FaceExclude=[], xBevScl=1):
-    __doc__ = """\
-    MakeAKeystone returns lists of points and faces to be made into a square cornered keystone, with optional bevels.
-    xpos: x position of the centerline
-    width: x width of the keystone at the widest point (discounting bevels)
-    zpos: z position of the widest point
-    ztop: distance from zpos to the top
-    zbtm: distance from zpos to the bottom
-    thick: thickness
-    bevel: the amount to raise the back vertex to account for arch beveling
-    vll: the number of vertexes already in the mesh. len(mesh.verts) should give this number
-    faceExclude: list of faces to exclude from the faces list.  0:left, 1:right, 2:bottom, 3:top, 4:back, 5:front
-    xBevScl: how much to divide the end (+- x axis) bevel dimensions.  Set to current average radius to compensate for angular distortion on curved blocks
-    """
-
-    points = []
-    faces = []
-    faceinclude = [1 for x in range(6)]
-    for x in FaceExclude: faceinclude[x]=0
-    Top = zpos + ztop
-    Btm = zpos - zbtm
-    Wid = width/2.
-    Thk = thick/2.
-
-    # The front top point
-    points.append([xpos, Thk, Top])
-    # The front left point
-    points.append([xpos-Wid, Thk, zpos])
-    # The front bottom point
-    points.append([xpos, Thk, Btm])
-    # The front right point
-    points.append([xpos+Wid, Thk, zpos])
-
-    MirrorPoints = []
-    for i in points:
-        MirrorPoints.append([i[0],-i[1],i[2]])
-    points += MirrorPoints
-    points[6][2] += bevel
-
-    faces.append([3,2,1,0])
-    faces.append([4,5,6,7])
-    faces.append([4,7,3,0])
-    faces.append([5,4,0,1])
-    faces.append([6,5,1,2])
-    faces.append([7,6,2,3])
-    # Offset the vertex numbers by the number of verticies already in the list
-    for i in range(len(faces)):
-        for j in range(len(faces[i])): faces[i][j] += vll
-
-    return points, faces
-
-
-#for finding line/circle intercepts
-def circ(offs=0.,r=1.):
-    __doc__ = """\
-    offs is the distance perpendicular to the line to the center of the circle
-    r is the radius of the circle
-    circ returns the distance paralell to the line to the center of the circle at the intercept.
-    """
-    offs = abs(offs)
-    if offs > r: return None
-    elif offs == r: return 0.
-    else: return sqrt(r**2 - offs**2)
-
-
-#class openings in the wall
-class opening:
-    __doc__ = """\
-    This is the class for holding the data for the openings in the wall.
-    It has methods for returning the edges of the opening for any given position value,
-    as well as bevel settings and top and bottom positions.
-    It stores the 'style' of the opening, and all other pertinent information.
-    """
-    # x = 0. # x position of the opening
-    # z = 0. # x position of the opening
-    # w = 0. # width of the opening
-    # h = 0. # height of the opening
-    r = 0  # top radius of the arch (derived from 'v')
-    rl = 0 # lower radius of the arch (derived from 'vl')
-    rt = 0 # top arch thickness
-    rtl = 0# lower arch thickness
-    ts = 0 # Opening side thickness, if greater than average width, replaces it.
-    c = 0  # top arch corner position (for low arches), distance from the top of the straight sides
-    cl = 0 # lower arch corner position (for low arches), distance from the top of the straight sides
-    # form = 0 # arch type (unused for now)
-    # b = 0. # back face bevel distance, like an arrow slit
-    v = 0. # top arch height
-    vl = 0.# lower arch height
-    # variable "s" is used for "side" in the "edge" function.
-    # it is a signed int, multiplied by the width to get + or - of the center
-
-    def btm(self):
-        if self.vl <= self.w/2 : return self.z-self.h/2-self.vl-self.rtl
-        else: return self.z - sqrt((self.rl+self.rtl)**2 - (self.rl - self.w/2 )**2)  - self.h/2
-
-
-    def top(self):
-        if self.v <= self.w/2 : return self.z+self.h/2+self.v+self.rt
-        else: return sqrt((self.r+self.rt)**2 - (self.r - self.w/2 )**2) + self.z + self.h/2
-
-
-    #crits returns the critical split points, or discontinuities, used for making rows
-    def crits(self):
-        critlist = []
-        if self.vl>0: # for lower arch
-            # add the top point if it is pointed
-            #if self.vl >= self.w/2.: critlist.append(self.btm())
-            if self.vl < self.w/2.:#else: for low arches, with wedge blocks under them
-                #critlist.append(self.btm())
-                critlist.append(self.z-self.h/2 - self.cl)
-
-        if self.h>0: # if it has a height, append points at the top and bottom of the main square section
-            critlist += [self.z-self.h/2,self.z+self.h/2]
-        else:  # otherwise, append just one in the center
-            critlist.append(self.z)
-
-        if self.v>0:  # for the upper arch
-            if self.v < self.w/2.: # add the splits for the upper wedge blocks, if needed
-                critlist.append(self.z+self.h/2 + self.c)
-                #critlist.append(self.top())
-            #otherwise just add the top point, if it is pointed
-            #else: critlist.append(self.top())
-
-        return critlist
-
-
-    # get the side position of the opening.
-    # ht is the z position; s is the side: 1 for right, -1 for left
-    # if the height passed is above or below the opening, return None
-    #
-    def edgeS(self, ht, s):
-        # set the row radius: 1 for standard wall (flat)
-        if radialized:
-            if slope: r1 = abs(dims['t']*sin(ht*PI/(dims['t']*2)))
-            else: r1 = abs(ht)
-        else: r1 = 1
-
-        #Go through all the options, and return the correct value
-        if ht < self.btm(): #too low
-            return None
-        elif ht > self.top(): #too high
-            return None
-
-        # Check for circ returning None - prevent TypeError (script failure) with float.
-
-        # in this range, pass the lower arch info
-        elif ht <= self.z-self.h/2-self.cl:
-            if self.vl > self.w/2:
-                circVal = circ(ht-self.z+self.h/2,self.rl+self.rtl)
-                if circVal == None:
-                    return None
-                else: return self.x + s*(self.w/2.-self.rl+circVal)/r1
-            else:
-                circVal = circ(ht-self.z+self.h/2+self.vl-self.rl,self.rl+self.rtl)
-                if circVal == None:
-                    return None
-                else: return self.x + s*circVal/r1
-
-        #in this range, pass the top arch info
-        elif ht >= self.z+self.h/2+self.c:
-            if self.v > self.w/2:
-                circVal = circ(ht-self.z-self.h/2,self.r+self.rt)
-                if circVal == None:
-                    return None
-                else: return self.x + s*(self.w/2.-self.r+circVal)/r1
-            else:
-                circVal = circ(ht-(self.z+self.h/2+self.v-self.r),self.r+self.rt)
-                if circVal == None:
-                    return None
-                else: return self.x + s*circVal/r1
-
-        #in this range pass the lower corner edge info
-        elif ht <= self.z-self.h/2:
-            d = sqrt(self.rtl**2 - self.cl**2)
-            if self.cl > self.rtl/sqrt(2.): return self.x + s*(self.w/2 + (self.z - self.h/2 - ht)*d/self.cl)/r1
-            else: return self.x + s*( self.w/2 + d )/r1
-
-        #in this range pass the upper corner edge info
-        elif ht >= self.z+self.h/2:
-            d = sqrt(self.rt**2 - self.c**2)
-            if self.c > self.rt/sqrt(2.): return self.x + s*(self.w/2 + (ht - self.z - self.h/2 )*d/self.c)/r1
-            else: return self.x + s*( self.w/2 + d )/r1
-
-        #in this range, pass the middle info (straight sides)
-        else: return self.x + s*self.w/2/r1
-
-
-    # get the top or bottom of the opening
-    # ht is the x position; s is the side: 1 for top, -1 for bottom
-    #
-    def edgeV(self, ht, s):
-        dist = abs(self.x-ht)
-        def radialAdjust(dist, sideVal):
-            """take the distance and adjust for radial geometry, return dist.
-            """
-            if radialized:
-                if slope:
-                    dist = dist * abs(dims['t']*sin(sideVal*PI/(dims['t']*2)))
-                else:
-                    dist = dist * sideVal
-            return dist
-
-        if s > 0 :#and (dist <= self.edgeS(self.z+self.h/2+self.c,1)-self.x): #check top down
-            #hack for radialized masonry, import approx Z instead of self.top()
-            dist = radialAdjust(dist, self.top())
-
-            #no arch on top, flat
-            if not self.r: return self.z+self.h/2
-
-            #pointed arch on top
-            elif self.v > self.w/2:
-                circVal = circ(dist-self.w/2+self.r,self.r+self.rt)
-                if circVal == None:
-                    return None
-                else: return self.z+self.h/2+circVal
-
-            #domed arch on top
-            else:
-                circVal = circ(dist,self.r+self.rt)
-                if circVal == None:
-                    return None
-                else: return self.z+self.h/2+self.v-self.r+circVal
-
-        else:#and (dist <= self.edgeS(self.z-self.h/2-self.cl,1)-self.x): #check bottom up
-            #hack for radialized masonry, import approx Z instead of self.top()
-            dist = radialAdjust(dist, self.btm())
-
-            #no arch on bottom
-            if not self.rl: return self.z-self.h/2
-
-            #pointed arch on bottom
-            elif self.vl > self.w/2:
-                circVal = circ(dist-self.w/2+self.rl,self.rl+self.rtl)
-                if circVal == None:
-                    return None
-                else: return self.z-self.h/2-circVal
-
-            #old conditional? if (dist-self.w/2+self.rl)<=(self.rl+self.rtl):
-            #domed arch on bottom
-            else:
-                circVal = circ(dist,self.rl+self.rtl) # dist-self.w/2+self.rl
-                if circVal == None:
-                    return None
-                else: return self.z-self.h/2-self.vl+self.rl-circVal
-
-    # and this never happens - but, leave it as failsafe :)
-        print("got all the way out of the edgeV!  Not good!")
-        print("opening x = ", self.x, ", opening z = ", self.z)
-        return 0.0
-    #
-    def edgeBev(self, ht):
-        if ht > (self.z + self.h/2): return 0.0
-        if ht < (self.z - self.h/2): return 0.0
-        if radialized:
-            if slope: r1 = abs(dims['t']*sin(ht*PI/(dims['t']*2)))
-            else: r1 = abs(ht)
-        else: r1 = 1
-        bevel = self.b / r1
-        return bevel
-#
-##
-#
-
-    def __init__(self, xpos, zpos, width, height, archHeight=0, archThk=0,
-                 archHeightLower=0, archThkLower=0, bevel=0, edgeThk=0):
-        self.x = float(xpos)
-        self.z = float(zpos)
-        self.w = float(width)
-        self.h = float(height)
-        self.rt = archThk
-        self.rtl = archThkLower
-        self.v = archHeight
-        self.vl = archHeightLower
-        if self.w <= 0: self.w = SMALL
-
-        #find the upper arch radius
-        if archHeight >= width/2:
-            # just one arch, low long
-            self.r = (self.v**2)/self.w + self.w/4
-        elif archHeight <= 0:
-            # No arches
-            self.r = 0
-            self.v = 0
-        else:
-            # Two arches
-            self.r = (self.w**2)/(8*self.v) + self.v/2.
-            self.c = self.rt*cos(atan(self.w/(2*(self.r-self.v))))
-
-        #find the lower arch radius
-        if archHeightLower >= width/2:
-            self.rl = (self.vl**2)/self.w + self.w/4
-        elif archHeightLower <= 0:
-            self.rl = 0
-            self.vl = 0
-        else:
-            self.rl = (self.w**2)/(8*self.vl) + self.vl/2.
-            self.cl = self.rtl*cos(atan(self.w/(2*(self.rl-self.vl))))
-
-        #self.form = something?
-        self.b = float(bevel)
-        self.ts = edgeThk
-#
-#
-
-#class for the whole wall boundaries; a sub-class of "opening"
-class OpeningInv(opening):
-    #this is supposed to switch the sides of the opening
-    #so the wall will properly enclose the whole wall.
-    #We'll see if it works.
-
-    def edgeS(self, ht, s):
-        return opening.edgeS(self, ht, -s)
-
-    def edgeV(self, ht, s):
-        return opening.edgeV(self, ht, -s)
-
-#class rows in the wall
-class rowOb:
-    __doc__ = """\
-    This is the class for holding the data for individual rows of blocks.
-    each row is required to have some edge blocks, and can also have
-    intermediate sections of "normal" blocks.
-    """
-
-    #z = 0.
-    #h = 0.
-    radius = 1
-    EdgeOffset = 0.
-#    BlocksEdge = []
-#    RowSegments = []
-#    BlocksNorm = []
-
-    def FillBlocks(self):
-        # Set the radius variable, in the case of radial geometry
-        if radialized:
-            if slope: self.radius = dims['t']*(sin(self.z*PI/(dims['t']*2)))
-            else: self.radius = self.z
-
-        #initialize internal variables from global settings
-
-        SetH = settings['h']
-        SetHwt = settings['hwt']
-        SetWid = settings['w']
-        SetWidMin = settings['wm']
-        SetWidVar = settings['wv']
-        SetGrt = settings['g']
-        SetGrtVar = settings['gv']
-        SetRowHeightLink = settings['rwhl']
-        SetDepth = settings['d']
-        SetDepthVar = settings['dv']
-
-        #height weight, used for making shorter rows have narrower blocks, and vice-versa
-        hwt = ((self.h/SetH-1)*SetHwt+1)
-
-        # set variables for persistent values: loop optimization, readability, single ref for changes.
-
-        avgDist = hwt*SetWid/self.radius
-        minDist = SetWidMin/self.radius
-        deviation = hwt*SetWidVar/self.radius
-        grtOffset = SetGrt/(2*self.radius)
-
-        # init loop variables that may change...
-
-        grt = (SetGrt + rndc()*SetGrtVar)/(self.radius)
-        ThisBlockHeight = self.h+rndc()*(1-SetRowHeightLink)*SetGrtVar
-        ThisBlockDepth = rndd()*SetDepthVar+SetDepth
-
-        for segment in self.RowSegments:
-            divs = fill(segment[0]+grtOffset, segment[1]-grtOffset, avgDist, minDist, deviation)
-
-            #loop through the divisions, adding blocks for each one
-            for i in range(len(divs)-1):
-                ThisBlockx = (divs[i]+divs[i+1])/2
-                ThisBlockw = divs[i+1]-divs[i]-grt
-
-                self.BlocksNorm.append([ThisBlockx, self.z, ThisBlockw, ThisBlockHeight, ThisBlockDepth, None])
-
-                if SetDepthVar: # vary depth
-                    ThisBlockDepth = rndd()*SetDepthVar+SetDepth
-
-                if SetGrtVar: # vary grout
-                    grt = (SetGrt + rndc()*SetGrtVar)/(self.radius)
-                    ThisBlockHeight = self.h+rndc()*(1-SetRowHeightLink)*SetGrtVar
-
-
-    def __init__(self,centerheight,rowheight,edgeoffset = 0.):
-        self.z = float(centerheight)
-        self.h = float(rowheight)
-        self.EdgeOffset = float(edgeoffset)
-
-#THIS INITILIZATION IS IMPORTANT!  OTHERWISE ALL OBJECTS WILL HAVE THE SAME LISTS!
-        self.BlocksEdge = []
-        self.RowSegments = []
-        self.BlocksNorm = []
-
-#
-def arch(ra,rt,x,z, archStart, archEnd, bevel, bevAngle, vll):
-    __doc__ = """\
-    Makes a list of faces and vertexes for arches.
-    ra: the radius of the arch, to the center of the bricks
-    rt: the thickness of the arch
-    x: x center location of the circular arc, as if the arch opening were centered on x = 0
-    z: z center location of the arch
-    anglebeg: start angle of the arch, in radians, from vertical?
-    angleend: end angle of the arch, in radians, from vertical?
-    bevel: how much to bevel the inside of the arch.
-    vll: how long is the vertex list already?
-    """
-    avlist = []
-    aflist = []
-
-    #initialize internal variables for global settings
-#overkill?
-    SetH = settings['h']
-    SetHwt = settings['hwt']
-    SetWid = settings['w']
-    SetWidMin = settings['wm']
-    SetWidVar = settings['wv']
-    SetGrt = settings['g']
-    SetGrtVar = settings['gv']
-    SetRowHeightLink = settings['rwhl']
-    SetDepth = settings['d']
-    SetDepthVar = settings['dv']
-
-    # Init loop variables
-
-    def bevelEdgeOffset(offsets, bevel, side):
-        """
-        Take the block offsets and modify it for the correct bevel.
-
-        offsets = the offset list. See MakeABlock
-        bevel = how much to offset the edge
-        side = -1 for left (right side), 1 for right (left side)
-        """
-        left = (0,2,3)
-        right = (4,6,7)
-        if side == 1: pointsToAffect = right
-        else: pointsToAffect = left
-        for num in pointsToAffect:
-            offsets[num] = offsets[num][:]
-            offsets[num][0] += -bevel * side
-
-    ArchInner = ra-rt/2
-    ArchOuter = ra+rt/2-SetGrt + rndc()*SetGrtVar
-
-    DepthBack = -SetDepth/2-rndc()*SetDepthVar
-    DepthFront = SetDepth/2+rndc()*SetDepthVar
-
-    if radialized: subdivision = settings['sdv']
-    else: subdivision = 0.12
-
-    grt = (SetGrt + rndc()*SetGrtVar)/(2*ra) # init grout offset for loop
-    # set up the offsets, it will be the same for every block
-    offsets = ([[0]*2 + [bevel]] + [[0]*3]*3)*2
-
-    #make the divisions in the "length" of the arch
-    divs = fill(archStart, archEnd, settings['w']/ra, settings['wm']/ra, settings['wv']/ra)
-
-    for i in range(len(divs)-1):
-        if i == 0:
-            ThisOffset = offsets[:]
-            bevelEdgeOffset(ThisOffset, bevAngle, -1)
-        elif i == len(divs)-2:
-            ThisOffset = offsets[:]
-            bevelEdgeOffset(ThisOffset, bevAngle, 1)
-        else:
-            ThisOffset = offsets
-
-        geom = MakeABlock([divs[i]+grt, divs[i+1]-grt, ArchInner, ArchOuter, DepthBack, DepthFront],
-                          subdivision, len(avlist) + vll, ThisOffset, [], None, ra)
-
-        avlist += geom[0]
-        aflist += geom[1]
-
-        if SetDepthVar: # vary depth
-            DepthBack = -SetDepth/2-rndc()*SetDepthVar
-            DepthFront = SetDepth/2+rndc()*SetDepthVar
-
-        if SetGrtVar: # vary grout
-            grt = (settings['g'] + rndc()*SetGrtVar)/(2*ra)
-            ArchOuter = ra+rt/2-SetGrt + rndc()*SetGrtVar
-
-    for i,vert in enumerate(avlist):
-        v0 = vert[2]*sin(vert[0]) + x
-        v1 = vert[1]
-        v2 = vert[2]*cos(vert[0]) + z
-
-        if radialized==1:
-            if slope==1: r1 = dims['t']*(sin(v2*PI/(dims['t']*2)))
-            else: r1 = v2
-            v0 = v0/r1
-
-        avlist[i] = [v0,v1,v2]
-
-    return (avlist,aflist)
-
-#
-def sketch():
-    __doc__ = """\
-    The 'sketch' function creates a list of openings from the general specifications passed to it.
-    It takes curved and domed walls into account, placing the openings at the appropriate angular locations
-    """
-    boundlist = []
-    for x in openingSpecs:
-        if x['rp']:
-            if radialized: r1 = x['z']
-            else: r1 = 1
-
-            if x['x'] > (x['w'] + settings['wm']):spacing = x['x']/r1
-            else: spacing = (x['w'] + settings['wm'])/r1
-
-            minspacing = (x['w'] + settings['wm'])/r1
-
-            divs = fill(dims['s'],dims['e'],spacing,minspacing,center=1)
-
-            for posidx in range(len(divs)-2):
-                boundlist.append(opening(divs[posidx+1],x['z'],x['w'],x['h'],x['v'],x['t'],x['vl'],x['tl'],x['b']))
-
-        else: boundlist.append(opening(x['x'],x['z'],x['w'],x['h'],x['v'],x['t'],x['vl'],x['tl'],x['b']))
-        #check for overlaping edges?
-
-    return boundlist
-
-
-def wedgeBlocks(row, opening, leftPos, rightPos, edgeBinary, r1):
-    __doc__ = """\
-    Makes wedge blocks for the left and right sides, depending
-    example:
-    wedgeBlocks(row, LeftWedgeEdge, LNerEdge, LEB, r1)
-    wedgeBlocks(row, RNerEdge, RightWedgeEdge, REB, r1)
-    """
-    wedgeEdges = fill(leftPos, rightPos, settings['w']/r1, settings['wm']/r1,
-                      settings['wv']/r1)
-
-    for i in range(len(wedgeEdges)-1):
-        x = (wedgeEdges[i+1] + wedgeEdges[i])/2
-        grt = (settings['g'] + rndd()*settings['gv'])/r1
-        w = wedgeEdges[i+1] - wedgeEdges[i] - grt
-
-        ThisBlockDepth = rndd()*settings['dv']+settings['d']
-
-#edgeV may return "None" - causing TypeError for math op.
-#use 0 until wedgeBlocks operation worked out
-        edgeVal = opening.edgeV(x-w/2,edgeBinary)
-        if edgeVal == None: edgeVal = 0.0
-
-        LeftVertOffset =  -( row.z - (row.h/2)*edgeBinary - edgeVal )
-
-#edgeV may return "None" - causing TypeError for math op.
-#use 0 until wedgeBlocks operation worked out
-        edgeVal = opening.edgeV(x+w/2,edgeBinary)
-        if edgeVal == None: edgeVal = 0.0
-
-        RightVertOffset = -( row.z - (row.h/2)*edgeBinary - edgeVal )
-
-        #Wedges are on top = off, blank, off, blank
-        #Wedges are on btm = blank, off, blank, off
-        ThisBlockOffsets = [[0,0,LeftVertOffset]]*2 + [[0]*3]*2 + [[0,0,RightVertOffset]]*2
-
-        # Instert or append "blank" for top or bottom wedges.
-        if edgeBinary == 1: ThisBlockOffsets = ThisBlockOffsets + [[0]*3]*2
-        else: ThisBlockOffsets = [[0]*3]*2 + ThisBlockOffsets
-
-        row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,ThisBlockOffsets])
-
-    return None
-
-def bevelBlockOffsets(offsets, bevel, side):
-    """
-    Take the block offsets and modify it for the correct bevel.
-
-    offsets = the offset list. See MakeABlock
-    bevel = how much to offset the edge
-    side = -1 for left (right side), 1 for right (left side)
-    """
-#    left = (4,6)
-#    right = (0,2)
-    if side == 1: pointsToAffect = (0,2) # right
-    else: pointsToAffect = (4,6) # left
-    for num in pointsToAffect:
-        offsets[num] = offsets[num][:]
-        offsets[num][0] += bevel * side
-
-def rowProcessing(row, Thesketch, WallBoundaries):
-    __doc__ = """\
-    Take row and opening data and process a single row, adding edge and fill blocks to the row data.
-    """
-    #set end blocks
-    #check for openings, record top and bottom of row for right and left of each
-    #if both top and bottom intersect create blocks on each edge, appropriate to the size of the overlap
-    #if only one side intersects, run fill to get edge positions, but this should never happen
-    #
-
-    if radialized:#this checks for radial stonework, and sets the row radius if required
-        if slope: r1 = abs(dims['t']*sin(row.z*PI/(dims['t']*2)))
-        else: r1 = abs(row.z)
-    else: r1 = 1
-
-    # set the edge grout thickness, especially with radial stonework in mind
-    edgrt = settings['ge']*(settings['g']/2 + rndc()*settings['gv'])/(2*r1)
-
-    # Sets up a list of  intersections of top of row with openings,
-    #from left to right [left edge of opening, right edge of opening, etc...]
-    #initially just the left and right edge of the wall
-    edgetop = [[dims['s']+row.EdgeOffset/r1+edgrt,WallBoundaries], [dims['e']+row.EdgeOffset/r1-edgrt,WallBoundaries]]
-    # Same as edgetop, but for the bottms of the rows
-    edgebtm = [[dims['s']+row.EdgeOffset/r1+edgrt,WallBoundaries], [dims['e']+row.EdgeOffset/r1-edgrt,WallBoundaries]]
-
-    # set up some useful values for the top and bottom of the rows.
-    rowTop = row.z+row.h/2
-    rowBtm = row.z-row.h/2
-
-    for hole in Thesketch:
-        #check the top and bottom of the row, looking at the opening from the right
-        e = [hole.edgeS(rowTop, -1), hole.edgeS(rowBtm, -1)]
-
-        # If either one hit the opening, make split points for the left side of the opening.
-        if e[0] or e[1]:
-            e += [hole.edgeS(rowTop, 1), hole.edgeS(rowBtm, 1)]
-
-            # If one of them missed for some reason, set that value to
-            # the middle of the opening.
-            for i,pos in enumerate(e):
-                if pos == None: e[i] = hole.x
-
-            # add the intersects to the list of edge points
-            edgetop.append([e[0],hole])
-            edgetop.append([e[2],hole])
-            edgebtm.append([e[1],hole])
-            edgebtm.append([e[3],hole])
-
-    # We want to make the walls in order, so sort the intersects.
-    # This is where you would want to remove edge points that are out of order
-    # so that you don't get the "oddity where overlapping openings create blocks inversely" problem
-    edgetop.sort()
-    edgebtm.sort()
-
-    #these two loops trim the edges to the limits of the wall.  This way openings extending outside the wall don't enlarge the wall.
-    while True:
-        try:
-            if (edgetop[-1][0] > dims['e']+row.EdgeOffset/r1) or (edgebtm[-1][0] > dims['e']+row.EdgeOffset/r1):
-                edgetop[-2:] = []
-                edgebtm[-2:] = []
-            else: break
-        except IndexError: break
-    #still trimming the edges...
-    while True:
-        try:
-            if (edgetop[0][0] < dims['s']+row.EdgeOffset/r1) or (edgebtm[0][0] < dims['s']+row.EdgeOffset/r1):
-                edgetop[:2] = []
-                edgebtm[:2] = []
-            else: break
-        except IndexError: break
-
-    #make those edge blocks and rows!  Wooo!
-    #This loop goes through each section, (a pair of points in edgetop)
-    #and places the edge blocks and inbetween normal block zones into the row object
-    for OpnSplitNo in range(int(len(edgetop)/2)):
-        #left edge is edge<x>[2*OpnSplitNo], right edge edgex[2*OpnSplitNo+1]
-        leftEdgeIndex = 2*OpnSplitNo
-        rightEdgeIndex = 2*OpnSplitNo + 1
-        # get the openings, to save time and confusion
-        leftOpening = edgetop[leftEdgeIndex][1]
-        rightOpening = edgetop[rightEdgeIndex][1]
-        #find the difference between the edge top and bottom on both sides
-        LTop = edgetop[leftEdgeIndex][0]
-        LBtm = edgebtm[leftEdgeIndex][0]
-        RTop = edgetop[rightEdgeIndex][0]
-        RBtm = edgebtm[rightEdgeIndex][0]
-        LDiff = LBtm-LTop
-        RDiff = RTop-RBtm
-
-        #which is furthur out on each side, top or bottom?
-        if LDiff > 0:
-            LFarEdge = LTop #The furthest edge left
-            LNerEdge = LBtm #the nearer edge left
-            LEB = 1 #Left Edge Boolean, set to 1 if furthest edge is top, -1 if it is bottom
-        else:
-            LFarEdge = LBtm
-            LNerEdge = LTop
-            LEB = -1
-
-        if RDiff > 0:
-            RFarEdge = RTop #The furthest edge right
-            RNerEdge = RBtm #the nearer edge right
-            REB = 1 #Right Edge Boolean, set to 1 if furthest edge is top, -1 if it is bottom
-
-        else:
-            RFarEdge = RBtm #The furthest edge right
-            RNerEdge = RTop
-            REB = -1 #Right Edge Boolean, set to 1 if furthest edge is top, -1 if it is bottom
-
-        #The space between the closest edges of the openings in this section of the row
-        InnerDiff = RNerEdge - LNerEdge
-        #The mid point between the nearest edges
-        InnerMid = (RNerEdge + LNerEdge)/2
-
-        #maximum distance to span with one block
-        MaxWid = (settings['w']+settings['wv'])/r1
-        AveWid = settings['w']
-        MinWid = settings['wm']
-
-        #check the left and right sides for wedge blocks
-        #Check and run the left edge first
-        #find the edge of the correct side, offset for minimum block height.  The LEB decides top or bottom
-        ZPositionCheck = row.z + (row.h/2-settings['hm'])*LEB
-#edgeS may return "None"
-        LeftWedgeEdge = leftOpening.edgeS(ZPositionCheck,1)
-
-        if (abs(LDiff) > AveWid) or (not LeftWedgeEdge):
-            #make wedge blocks
-            if not LeftWedgeEdge: LeftWedgeEdge = leftOpening.x
-            wedgeBlocks(row, leftOpening, LeftWedgeEdge, LNerEdge, LEB, r1)
-            #set the near and far edge settings to vertical, so the other edge blocks don't interfere
-            LFarEdge , LTop , LBtm = LNerEdge, LNerEdge, LNerEdge
-            LDiff = 0
-
-        #Now do the wedge blocks for the right, same drill... repeated code?
-        #find the edge of the correct side, offset for minimum block height.  The REB decides top or bottom
-        ZPositionCheck = row.z + (row.h/2-settings['hm'])*REB
-#edgeS may return "None"
-        RightWedgeEdge = rightOpening.edgeS(ZPositionCheck,-1)
-        if (abs(RDiff) > AveWid) or (not RightWedgeEdge):
-            #make wedge blocks
-            if not RightWedgeEdge: RightWedgeEdge = rightOpening.x
-            wedgeBlocks(row, rightOpening, RNerEdge, RightWedgeEdge, REB, r1)
-            #set the near and far edge settings to vertical, so the other edge blocks don't interfere
-            RFarEdge , RTop , RBtm = RNerEdge, RNerEdge, RNerEdge
-            RDiff = 0
-
-        #Check to see if the edges are close enough toegther to warrant a single block filling it
-        if (InnerDiff < MaxWid):
-            #if this is true, then this row is just one block!
-            x = (LNerEdge + RNerEdge)/2.
-            w = InnerDiff
-            ThisBlockDepth = rndd()*settings['dv']+settings['d']
-            BtmOff = LBtm - LNerEdge
-            TopOff = LTop - LNerEdge
-            ThisBlockOffsets = [[BtmOff,0,0]]*2 + [[TopOff,0,0]]*2
-            BtmOff = RBtm - RNerEdge
-            TopOff = RTop - RNerEdge
-            ThisBlockOffsets += [[BtmOff,0,0]]*2 + [[TopOff,0,0]]*2
-            bevel = leftOpening.edgeBev(rowTop)
-            bevelBlockOffsets(ThisBlockOffsets, bevel, 1)
-            bevel = rightOpening.edgeBev(rowTop)
-            bevelBlockOffsets(ThisBlockOffsets, bevel, -1)
-            row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,ThisBlockOffsets])
-            continue
-
-        # it's not one block, must be two or more
-        # set up the offsets for the left
-        BtmOff = LBtm - LNerEdge
-        TopOff = LTop - LNerEdge
-        leftOffsets = [[BtmOff,0,0]]*2 + [[TopOff,0,0]]*2 + [[0]*3]*4
-        bevelL = leftOpening.edgeBev(rowTop)
-        bevelBlockOffsets(leftOffsets, bevelL, 1)
-        # and now for the right
-        BtmOff = RBtm - RNerEdge
-        TopOff = RTop - RNerEdge
-        rightOffsets = [[0]*3]*4 + [[BtmOff,0,0]]*2 + [[TopOff,0,0]]*2
-        bevelR = rightOpening.edgeBev(rowTop)
-        bevelBlockOffsets(rightOffsets, bevelR, -1)
-        # check to see if it is only two blocks
-        if (InnerDiff < MaxWid*2):
-        #this row is just two blocks! Left block, then right block
-            #div is the x position of the dividing point between the two bricks
-            div = InnerMid + (rndd()*settings['wv'])/r1
-            #set the grout distance, since we need grout seperation between the blocks
-            grt = (settings['g'] + rndc()*settings['gv'])/r1
-            #set the x position and width for the left block
-            x = (div + LNerEdge)/2 - grt/4
-            w = (div - LNerEdge) - grt/2
-            ThisBlockDepth = rndd()*settings['dv']+settings['d']
-            #For reference: EdgeBlocks = [[x,z,w,h,d,[corner offset matrix]],[etc.]]
-            row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,leftOffsets])
-            #Initialize for the block on the right side
-            x = (div + RNerEdge)/2 + grt/4
-            w = (RNerEdge - div) - grt/2
-            ThisBlockDepth = rndd()*settings['dv']+settings['d']
-            row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,rightOffsets])
-            continue
-
-        #program should only get here if there are more than two blocks in the row, and no wedge blocks
-
-        #make Left edge block
-        #set the grout
-        grt = (settings['g'] + rndc()*settings['gv'])/r1
-        #set the x position and width for the left block
-        widOptions = [settings['w'], bevelL + settings['wm'], leftOpening.ts]
-        baseWid = max(widOptions)
-        w = (rndd()*settings['wv']+baseWid+row.EdgeOffset)
-        widOptions[0] = settings['wm']
-        widOptions[2] = w
-        w = max(widOptions) / r1 - grt
-        x = w/2 + LNerEdge + grt/2
-        BlockRowL = x + w/2
-        ThisBlockDepth = rndd()*settings['dv']+settings['d']
-        row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,leftOffsets])
-
-        #make Right edge block
-        #set the grout
-        grt = (settings['g'] + rndc()*settings['gv'])/r1
-        #set the x position and width for the left block
-        widOptions = [settings['w'], bevelR + settings['wm'], rightOpening.ts]
-        baseWid = max(widOptions)
-        w = (rndd()*settings['wv']+baseWid+row.EdgeOffset)
-        widOptions[0] = settings['wm']
-        widOptions[2] = w
-        w = max(widOptions) / r1 - grt
-        x = RNerEdge - w/2 - grt/2
-        BlockRowR = x - w/2
-        ThisBlockDepth = rndd()*settings['dv']+settings['d']
-        row.BlocksEdge.append([x,row.z,w,row.h,ThisBlockDepth,rightOffsets])
-
-        row.RowSegments.append([BlockRowL,BlockRowR])
-    return None
-
-
-def plan(Thesketch, oldrows = 0):
-    __doc__ = """\
-    The 'plan' function takes the data generated by the sketch function and the global settings
-    and creates a list of blocks.
-    It passes out a list of row heights, edge positions, edge blocks, and rows of blocks.
-    """
-    # if we were passed a list of rows already, use those; else make a list.
-    if oldrows: rows = oldrows
-    else:
-        #rows holds the important information common to all rows
-        #rows = [list of row objects]
-        rows = []
-
-        #splits are places where we NEED a row division, to accomidate openings
-        #add a split for the bottom row
-        splits = [dims['b']+settings['hb']]
-
-        #add a split for each critical point on each opening
-        for hole in Thesketch: splits += hole.crits()
-
-        #and, a split for the top row
-        splits.append(dims['t']-settings['ht'])
-        splits.sort()
-
-        #divs are the normal old row divisions, add them between the top and bottom split
-        divs = fill(splits[0],splits[-1],settings['h'],settings['hm']+settings['g'],settings['hv'])[1:-1]
-
-        #remove the divisions that are too close to the splits, so we don't get tiny thin rows
-        for i in range(len(divs)-1,-1,-1):
-            for j in range(len(splits)):
-                diff = abs(divs[i] - splits[j])
-                #(settings['hm']+settings['g']) is the old minimum value
-                if diff < (settings['h']-settings['hv']+settings['g']):
-                    del(divs[i])
-                    break
-
-        #now merge the divs and splits lists
-        divs += splits
-
-        #add bottom and/or top points, if bottom and/or top row heights are more than zero
-        if settings['hb']>0: divs.insert(0,dims['b'])
-        if settings['ht']>0: divs.append(dims['t'])
-
-        divs.sort()
-
-        #trim the rows to the bottom and top of the wall
-        if divs[0] < dims['b']: divs[:1] = []
-        if divs[-1] > dims['t']: divs[-1:] = []
-
-        #now, make the data for each row
-        #rows = [[center height,row height,edge offset],[etc.]]
-
-        divCount = len(divs)-1 # number of divs to check
-        divCheck = 0 # current div entry
-
-        while divCheck < divCount:
-            RowZ = (divs[divCheck]+divs[divCheck+1])/2
-            RowHeight = divs[divCheck+1]-divs[divCheck]-settings['g']+rndc()*settings['rwhl']*settings['gv']
-            EdgeOffset = settings['eoff']*(fmod(divCheck,2)-0.5)+settings['eoffv']*rndd()
-
-            # if row height is too shallow: delete next div entry, decrement total, and recheck current entry.
-            if RowHeight < settings['hm']:
-                del(divs[divCheck+1])
-                divCount -= 1 # Adjust count for removed div entry.
-                continue
-
-            rows.append(rowOb(RowZ, RowHeight, EdgeOffset))
-
-            divCheck += 1 # on to next div entry
-
-    #set up a special opening object to handle the edges of the wall
-    x = (dims['s'] + dims['e'])/2
-    z = (dims['t'] + dims['b'])/2
-    w = (dims['e'] - dims['s'])
-    h = (dims['t'] - dims['b'])
-    WallBoundaries = OpeningInv(x,z,w,h)
-
-    #Go over each row in the list, set up edge blocks and block sections
-    for rownum in range(len(rows)):
-        rowProcessing(rows[rownum], Thesketch, WallBoundaries)
-
-    #now return the things everyone needs
-    #return [rows,edgeBlocks,blockRows,Asketch]
-    return [rows,Thesketch]
-
-
-def archGeneration(hole, vlist, flist, sideSign):
-    __doc__ = """\
-    Makes arches for the top and bottom, depending on sideSign
-    example, Lower arch:
-    archGeneration(hole, vlist, flist, -1)
-    example, Upper arch:
-    archGeneration(hole, vlist, flist, 1)
-    hole is the opening object that the arch is for
-    add the verticies to vlist
-    add the faces to flist
-    sideSign is + or - 1, for the top or bottom arch. Other values may cause errors.
-    """
-
-    # working arrays for vectors and faces
-    avlist = []
-    aflist = []
-
-    # Top (1) or bottom (-1)
-    if sideSign == -1:
-        r = hole.rl #radius of the arch
-        rt = hole.rtl #thickness of the arch (stone height)
-        v = hole.vl #height of the arch
-        c = hole.cl
-    else:
-        r = hole.r #radius of the arch
-        rt = hole.rt #thickness of the arch (stone height)
-        v = hole.v #height of the arch
-        c = hole.c
-
-    ra = r + rt/2 #average radius of the arch
-    x = hole.x
-    w = hole.w
-    h = hole.h
-    z = hole.z
-    bev = hole.b
-    sideSignInv = -sideSign
-
-    if v > w/2: #two arcs, to make a pointed arch
-        # positioning
-        zpos = z + (h/2)*sideSign
-        xoffset = r - w/2
-        #left side top, right side bottom
-        #angles reference straight up, and are in radians
-        bevRad = r + bev
-        bevHt = sqrt(bevRad**2 - (bevRad - (w/2 + bev))**2)
-        midHalfAngle = atan(v/(r-w/2))
-        midHalfAngleBevel = atan(bevHt/(r-w/2))
-        bevelAngle = midHalfAngle - midHalfAngleBevel
-        anglebeg = (PI/2)*(sideSignInv)
-        angleend = (PI/2)*(sideSignInv) + midHalfAngle
-
-        avlist,aflist = arch(ra,rt,(xoffset)*(sideSign),zpos,anglebeg,angleend,bev,bevelAngle,len(vlist))
-
-        for i,vert in enumerate(avlist): avlist[i] = [vert[0]+hole.x,vert[1],vert[2]]
-        vlist += avlist
-        flist += aflist
-
-        #right side top, left side bottom
-
-        #angles reference straight up, and are in radians
-        anglebeg = (PI/2)*(sideSign) - midHalfAngle
-        angleend = (PI/2)*(sideSign)
-
-        avlist,aflist = arch(ra,rt,(xoffset)*(sideSignInv),zpos,anglebeg,angleend,bev,bevelAngle,len(vlist))
-
-        for i,vert in enumerate(avlist): avlist[i] = [vert[0]+hole.x,vert[1],vert[2]]
-
-        vlist += avlist
-        flist += aflist
-
-        #keystone
-        Dpth = settings['d']+rndc()*settings['dv']
-        Grout = settings['g'] + rndc()*settings['gv']
-        angleBevel = (PI/2)*(sideSign) - midHalfAngle
-        Wdth = (rt - Grout - bev) * 2 * sin(angleBevel) * sideSign #note, sin may be negative
-        MidZ = ((sideSign)*(bevHt + h/2.0) + z) + (rt - Grout - bev) * cos(angleBevel) #note, cos may come out negative too
-        nearCorner = sideSign*(MidZ - z) - v - h/2
-
-        if sideSign == 1:
-            TopHt = hole.top() - MidZ - Grout
-            BtmHt = nearCorner
-        else:
-            BtmHt =  - (hole.btm() - MidZ) - Grout
-            TopHt = nearCorner
-
-        # set the amout to bevel the keystone
-        keystoneBevel = (bevHt - v)*sideSign
-        if Wdth >= settings['hm']:
-            avlist,aflist = MakeAKeystone(x, Wdth, MidZ, TopHt, BtmHt, Dpth, keystoneBevel, len(vlist))
-
-            if radialized:
-                for i,vert in enumerate(avlist):
-                    if slope: r1 = dims['t']*sin(vert[2]*PI/(dims['t']*2))
-                    else: r1 = vert[2]
-                    avlist[i] = [((vert[0]-hole.x)/r1)+hole.x,vert[1],vert[2]]
-
-            vlist += avlist
-            flist += aflist
-# remove "debug note" once bevel is finalized.
-        else: print("keystone was too narrow - " + str(Wdth))
-
-    else: # only one arc - curve not peak.
-#bottom (sideSign -1) arch has poorly sized blocks...
-
-        zpos = z + (sideSign * (h/2 + v - r)) # single arc positioning
-
-        #angles reference straight up, and are in radians
-        if sideSign == -1: angleOffset = PI
-        else: angleOffset = 0.0
-
-        if v < w/2:
-            halfangle = atan(w/(2*(r-v)))
-
-            anglebeg = angleOffset - halfangle
-            angleend = angleOffset + halfangle
-        else:
-            anglebeg = angleOffset - PI/2
-            angleend = angleOffset + PI/2
-
-        avlist,aflist = arch(ra,rt,0,zpos,anglebeg,angleend,bev,0.0,len(vlist))
-
-        for i,vert in enumerate(avlist): avlist[i] = [vert[0]+x,vert[1],vert[2]]
-
-        vlist += avlist
-        flist += aflist
-
-        #Make the Side Stones
-        grt = (settings['g'] + rndc()*settings['gv'])
-        width = sqrt(rt**2 - c**2) - grt
-
-        if c > settings['hm'] + grt and c < width + grt:
-            if radialized: subdivision = settings['sdv'] * (zpos + (h/2)*sideSign)
-            else: subdivision = settings['sdv']
-
-            #set the height of the block, it should be as high as the max corner position, minus grout
-            height = c - grt*(0.5 + c/(width + grt))
-
-            #the vertical offset for the short side of the block
-            voff = sideSign * (settings['hm'] - height)
-            xstart = w/2
-            zstart = z + sideSign * (h/2 + grt/2)
-            woffset = width*(settings['hm'] + grt/2)/(c - grt/2)
-            depth = rndd()*settings['dv']+settings['d']
-
-            if sideSign == 1:
-                offsets = [[0]*3]*6 + [[0]*2 + [voff]]*2
-                topSide = zstart+height
-                btmSide = zstart
-            else:
-                offsets = [[0]*3]*4 + [[0]*2 + [voff]]*2 + [[0]*3]*2
-                topSide = zstart
-                btmSide = zstart-height
-            # Do some stuff to incorporate bev here
-            bevelBlockOffsets(offsets, bev, -1)
-
-            avlist,aflist = MakeABlock([x-xstart-width, x-xstart- woffset, btmSide, topSide, -depth/2, depth/2], subdivision, len(vlist), Offsets=offsets, xBevScl=1)
-
-# top didn't use radialized in prev version; just noting for clarity - may need to revise for "sideSign == 1"
-            if radialized:
-                for i,vert in enumerate(avlist): avlist[i] = [((vert[0]-x)/vert[2])+x,vert[1],vert[2]]
-
-            vlist += avlist
-            flist += aflist
-
-# keep sizing same - neat arches = master masons :)
-#           grt = (settings['g'] + rndc()*settings['gv'])
-#           height = c - grt*(0.5 + c/(width + grt))
-# if grout varies may as well change width too... width = sqrt(rt**2 - c**2) - grt
-#           voff = sideSign * (settings['hm'] - height)
-#           woffset = width*(settings['hm'] + grt/2)/(c - grt/2)
-
-            if sideSign == 1:
-                offsets = [[0]*3]*2 + [[0]*2 + [voff]]*2 + [[0]*3]*4
-                topSide = zstart+height
-                btmSide = zstart
-            else:
-                offsets = [[0]*2 + [voff]]*2 + [[0]*3]*6
-                topSide = zstart
-                btmSide = zstart-height
-            # Do some stuff to incorporate bev here
-            bevelBlockOffsets(offsets, bev, 1)
-
-            avlist,aflist = MakeABlock([x+xstart+woffset, x+xstart+width, btmSide, topSide, -depth/2, depth/2], subdivision, len(vlist), Offsets=offsets, xBevScl=1)
-
-# top didn't use radialized in prev version; just noting for clarity - may need to revise for "sideSign == 1"
-            if radialized:
-                for i,vert in enumerate(avlist): avlist[i] = [((vert[0]-x)/vert[2])+x,vert[1],vert[2]]
-
-            vlist += avlist
-            flist += aflist
-    return None
-
-
-def build(Aplan):
-    __doc__ = """\
-    Build creates the geometry for the wall, based on the
-    "Aplan" object from the "plan" function.  If physics is
-    enabled, then it make a number of individual blocks with
-    physics interaction enabled.  Otherwise it creates
-    geometry for the blocks, arches, etc. of the wall.
-    """
-
-    vlist = []
-    flist = []
-    rows = Aplan[0]
-
-#dead code...
-    #Physics setup is horribly broken.  Revisit when new API is in place.
-    '''if False: #settings['physics']:
-        geom = MakeABlock([-0.5,0.5,-0.5,0.5,-0.5,0.5], 3, 0, None,[], 3*settings['b']/(settings['w'] + settings['h'] + settings['d']))
-        blockmesh = Blender.Mesh.New('block')
-        vlist += geom[0]
-        flist += geom[1]
-        blockmesh.verts.extend(vlist)
-        blockmesh.faces.extend(flist)
-
-        for block in Aplan[1]:
-            x,z,w,h,d = block[:5]
-            block = scn.objects.new(blockmesh, 'block')
-            block.loc = [x, 0, z]
-            block.size = [w,d,h]
-            block.rbFlags = Blender.Object.RBFlags['BOUNDS'] | Blender.Object.RBFlags['ACTOR'] | Blender.Object.RBFlags['DYNAMIC'] | Blender.Object.RBFlags['RIGIDBODY']
-            block.rbShapeBoundType = Blender.Object.RBShapes['BOX']
-
-
-        for row in Aplan[2]:#row=[xstart,xend,z,h]
-            #currently, radial geometry is disabled for physics blocks setup
-            if radialized:
-                if slope: r1 = dims['t']*sin(row[2]*PI/(dims['t']*2))
-                else: r1 = row[2]
-
-            else: r1 = 1
-
-            divs = fill(row[0], row[1], settings['w'], settings['wm'], settings['wv'])
-            for i in range(len(divs)-1):
-                block = scn.objects.new(blockmesh, 'block')
-                block.loc = [(divs[i]+divs[i+1])/2, 0, row[2]]
-                block.size = [(divs[i + 1] - divs[i]) - settings['g'], (settings['d'] + rndd()*settings['dv'])*(1-settings['t']*((row[3]-dims['b'])/(dims['t'] - dims['b']))), row[3]]
-                block.rbFlags = Blender.Object.RBFlags['BOUNDS'] | Blender.Object.RBFlags['ACTOR'] | Blender.Object.RBFlags['DYNAMIC'] | Blender.Object.RBFlags['RIGIDBODY']
-                block.rbShapeBoundType = Blender.Object.RBShapes['BOX']
-
-        return None'''
-#end dead code...
-
-    # all the edge blocks, redacted
-    #AllBlocks = [[x,z,w,h,d,[corner offset matrix]],[etc.]]
-
-    #loop through each row, adding the normal old blocks
-    for rowidx in range(len(rows)):#row = row object
-        rows[rowidx].FillBlocks()
-
-    AllBlocks = []
-
-    #  If the wall is set to merge blocks, check all the blocks to see if you can merge any
-#seems to only merge vertical, should do horizontal too
-    if bigBlock:
-        for rowidx in range(len(rows)-1):
-            if radialized:
-                if slope: r1 = dims['t']*sin(abs(rows[rowidx].z)*PI/(dims['t']*2))
-                else: r1 = abs(rows[rowidx].z)
-            else: r1 = 1
-
-            Tollerance = settings['g']/r1
-            idxThis = len(rows[rowidx].BlocksNorm[:]) - 1
-            idxThat = len(rows[rowidx+1].BlocksNorm[:]) - 1
-
-            while True:
-                # end loop when either array idx wraps
-                if idxThis < 0 or idxThat < 0: break
-
-                blockThis = rows[rowidx].BlocksNorm[idxThis]
-                blockThat = rows[rowidx+1].BlocksNorm[idxThat]
-
-#seems to only merge vertical, should do horizontal too...
-                cx, cz, cw, ch, cd = blockThis[:5]
-                ox, oz, ow, oh, od = blockThat[:5]
-
-                if (abs(cw - ow) < Tollerance) and (abs(cx - ox) < Tollerance) :
-                    if cw > ow: BlockW = ow
-                    else: BlockW = cw
-
-                    AllBlocks.append([(cx+ox)/2,(cz+oz+(oh-ch)/2)/2,BlockW,abs(cz-oz)+(ch+oh)/2,(cd+od)/2,None])
-
-                    rows[rowidx].BlocksNorm.pop(idxThis)
-                    rows[rowidx+1].BlocksNorm.pop(idxThat)
-                    idxThis -= 1
-                    idxThat -= 1
-
-                elif cx > ox: idxThis -= 1
-                else: idxThat -= 1
-
-    #
-    #
-    # Add blocks to create a "shelf/platform".
-    # Does not account for openings (crosses gaps - which is a good thing)
-    if shelfExt:
-        SetGrtOff = settings['g']/2 # half grout for block size modifier
-
-        # Use wall block settings for shelf
-        SetBW = settings['w']
-        SetBWVar = settings['wv']
-        SetBWMin = settings['wm']
-        SetBH = settings['h']
-
-        # Shelf area settings
-        ShelfLft = shelfSpecs['x']
-        ShelfBtm = shelfSpecs['z']
-        ShelfEnd = ShelfLft + shelfSpecs['w']
-        ShelfTop = ShelfBtm + shelfSpecs['h']
-        ShelfThk = shelfSpecs['d'] * 2 # use double-depth due to offsets to position at cursor.
-
-        # Use "corners" to adjust position so not centered on depth.
-        # Facing shelf, at cursor (middle of wall blocks) - this way no gaps between platform and wall face due to wall block depth.
-        wallDepth = settings['d']/2 # offset by wall depth so step depth matches UI setting :)
-        if shelfBack: # place blocks on backside of wall
-            ShelfOffsets = [[0,ShelfThk/2,0],[0,wallDepth,0],[0,ShelfThk/2,0],[0,wallDepth,0],[0,ShelfThk/2,0],[0,wallDepth,0],[0,ShelfThk/2,0],[0,wallDepth,0]]
-        else:
-            ShelfOffsets = [[0,-wallDepth,0],[0,-ShelfThk/2,0],[0,-wallDepth,0],[0,-ShelfThk/2,0],[0,-wallDepth,0],[0,-ShelfThk/2,0],[0,-wallDepth,0],[0,-ShelfThk/2,0]]
-
-    # Add blocks for each "shelf row" in area
-        while ShelfBtm < ShelfTop:
-
-            # Make blocks for each row - based on rowOb::fillblocks
-            # Does not vary grout.
-            divs = fill(ShelfLft, ShelfEnd, SetBW, SetBWMin, SetBWVar)
-
-            #loop through the row divisions, adding blocks for each one
-            for i in range(len(divs)-1):
-                ThisBlockx = (divs[i]+divs[i+1])/2
-                ThisBlockw = divs[i+1]-divs[i]-SetGrtOff
-
-                AllBlocks.append([ThisBlockx, ShelfBtm, ThisBlockw, SetBH, ShelfThk, ShelfOffsets])
-
-            ShelfBtm += SetBH + SetGrtOff # moving up to next row...
-    #
-    #
-    # Add blocks to create "steps".
-    # Does not account for openings (crosses gaps - which is a good thing)
-    if stepMod:
-        SetGrtOff = settings['g']/2 # half grout for block size modifier
-
-        # Vary block width by wall block variations.
-        SetWidVar = settings['wv']
-        SetWidMin = settings['wm']
-
-        StepXMod = stepSpecs['t'] # width of step/tread, also sets basic block size.
-        StepZMod = stepSpecs['v']
-
-        StepLft = stepSpecs['x']
-        StepRt = stepSpecs['x'] + stepSpecs['w']
-        StepBtm = stepSpecs['z'] + StepZMod/2 # Start offset for centered blocks
-        StepWide = stepSpecs['w']
-        StepTop = StepBtm + stepSpecs['h']
-        StepThk = stepSpecs['d'] * 2 # use double-depth due to offsets to position at cursor.
-
-        # Use "corners" to adjust steps so not centered on depth.
-        # Facing steps, at cursor (middle of wall blocks) - this way no gaps between steps and wall face due to wall block depth.
-        # Also, will work fine as stand-alone if not used with wall (try block depth 0 and see what happens).
-        wallDepth = settings['d']/2 # offset by wall depth so step depth matches UI setting :)
-        if stepBack: # place blocks on backside of wall
-            StepOffsets = [[0,StepThk/2,0],[0,wallDepth,0],[0,StepThk/2,0],[0,wallDepth,0],[0,StepThk/2,0],[0,wallDepth,0],[0,StepThk/2,0],[0,wallDepth,0]]
-        else:
-            StepOffsets = [[0,-wallDepth,0],[0,-StepThk/2,0],[0,-wallDepth,0],[0,-StepThk/2,0],[0,-wallDepth,0],[0,-StepThk/2,0],[0,-wallDepth,0],[0,-StepThk/2,0]]
-
-    # Add steps for each "step row" in area (neg width is interesting but prevented)
-        while StepBtm < StepTop and StepWide > 0:
-
-            # Make blocks for each step row - based on rowOb::fillblocks
-            # Does not vary grout.
-
-            if stepOnly: # "cantilevered steps"
-                if stepLeft:
-                    stepStart = StepRt - StepXMod
-                else:
-                    stepStart = StepLft
-
-                AllBlocks.append([stepStart, StepBtm, StepXMod, StepZMod, StepThk, StepOffsets])
-            else:
-                divs = fill(StepLft, StepRt, StepXMod, SetWidMin, SetWidVar)
-
-                #loop through the row divisions, adding blocks for each one
-                for i in range(len(divs)-1):
-                    ThisBlockx = (divs[i]+divs[i+1])/2
-                    ThisBlockw = divs[i+1]-divs[i]-SetGrtOff
-
-                    AllBlocks.append([ThisBlockx, StepBtm, ThisBlockw, StepZMod, StepThk, StepOffsets])
-
-            StepBtm += StepZMod + SetGrtOff # moving up to next row...
-            StepWide -= StepXMod # reduce step width
-
-            # adjust side limit depending on direction of steps
-            if stepLeft:
-                StepRt -= StepXMod # move in from right
-            else:
-                StepLft += StepXMod # move in from left
-
-
-    #Copy all the blocks out of the rows
-    for row in rows:
-        AllBlocks += row.BlocksEdge
-        AllBlocks += row.BlocksNorm
-
-    #This loop makes individual blocks for each block specified in the plan
-    for block in AllBlocks:
-        x,z,w,h,d,corners = block
-        if radialized:
-            if slope: r1 = dims['t']*sin(z*PI/(dims['t']*2))
-            else: r1 = z
-        else: r1 = 1
-
-        geom = MakeABlock([x-w/2, x+w/2, z-h/2, z+h/2, -d/2, d/2], settings['sdv'], len(vlist), corners, None, settings['b']+rndd()*settings['bv'], r1)
-        vlist += geom[0]
-        flist += geom[1]
-
-
-    # This loop makes Arches for every opening specified in the plan.
-    for hole in Aplan[1]:
-        # lower arch stones
-        if hole.vl > 0 and hole.rtl > (settings['g'] + settings['hm']):#make lower arch blocks
-            archGeneration(hole, vlist, flist, -1)
-
-        #top arch stones
-        if hole.v > 0 and hole.rt > (settings['g'] + settings['hm']):#make upper arch blocks
-            archGeneration(hole, vlist, flist, 1)
-    #
-
-    #Warp all the points for domed stonework
-    if slope:
-        for i,vert in enumerate(vlist):
-            vlist[i] = [vert[0],(dims['t']+vert[1])*cos(vert[2]*PI/(2*dims['t'])),(dims['t']+vert[1])*sin(vert[2]*PI/(2*dims['t']))]
-
-    #Warp all the points for radial stonework
-    if radialized:
-        for i,vert in enumerate(vlist):
-            vlist[i] = [vert[2]*cos(vert[0]),vert[2]*sin(vert[0]),vert[1]]
-
-    return vlist, flist
-
-
-#The main function
-def createWall(radial, curve, openings, mergeBlox, shelf, shelfSide,
-        steps, stepDir, stepBare, stepSide):
-    __doc__ = """\
-    Call all the funcitons you need to make a wall, return the verts and faces.
-    """
-    global radialized
-    global slope
-    global openingSpecs
-    global bigBlock
-    global shelfExt
-    global stepMod
-    global stepLeft
-    global shelfBack
-    global stepOnly
-    global stepBack
-
-    # set all the working variables from passed parameters
-
-    radialized = radial
-    slope = curve
-    openingSpecs = openings
-    bigBlock = mergeBlox
-    shelfExt = shelf
-    stepMod = steps
-    stepLeft = stepDir
-    shelfBack = shelfSide
-    stepOnly = stepBare
-    stepBack = stepSide
-
-    asketch = sketch()
-    aplan = plan(asketch, 0)
-
-    return build(aplan)
-
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/Wallfactory.py b/release/scripts/addons_contrib/add_mesh_building_objects/Wallfactory.py
deleted file mode 100644
index 8c7fb93..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/Wallfactory.py
+++ /dev/null
@@ -1,647 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you may redistribute it, and/or
-# modify it, under the terms of the GNU General Public License
-# as published by the Free Software Foundation - either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, write to:
-#
-#	the Free Software Foundation Inc.
-#	51 Franklin Street, Fifth Floor
-#	Boston, MA 02110-1301, USA
-#
-# or go online at: http://www.gnu.org/licenses/ to view license options.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-#
-# This module contains the UI definition, display, and processing (create mesh)
-# functions.
-#
-# The routines to generate the vertices for the wall are found in the "Blocks" module.
-#
-
-
-import bpy
-import mathutils
-from bpy.props import *
-from add_mesh_building_objects.Blocks import *
-#from add_mesh_walls.preset_utils import *
-
-
-#
-class add_mesh_wallb(bpy.types.Operator):
-    """Add a wall mesh"""
-    bl_idname = "mesh.wall_add"
-    bl_label = "Add A Masonry Wall"
-    bl_options = {'REGISTER', 'UNDO'} # removes object, does not reset to "last" modification.
-    bl_description = "adds a block wall"
-
-    # UI items - API for properties - User accessable variables... 
-# not all options are via UI, and some operations just don't work yet.
-
-    # only create object when True
-    # False allows modifying several parameters without creating object
-    ConstructTog = BoolProperty(name="Construct",
-                                description="Generate the object",
-                                default = True)
-
-# need to modify so radial makes a tower (normal); want "flat" setting to make disk (alternate)
-    # make the wall circular - if not sloped it's a flat disc
-    RadialTog = BoolProperty(name="Radial",
-                             description="Make masonry radial",
-                             default = False)
-
-    # curve the wall - if radial creates dome.
-    SlopeTog = BoolProperty(name="Curved",
-                            description="Make masonry sloped, or curved",
-                            default = False)
-
-#need to review defaults and limits for all of these UI objects.
-
-    # wall area/size
-    WallStart = FloatProperty(name="Start",
-                              description="Left side, or start angle",
-                              default=-10.0, min=-100, max=100.0)
-    WallEnd = FloatProperty(name="End",
-                            description="Right side, or end angle",
-                            default=10.0, min=0.0, max=100.0)
-    WallBottom = FloatProperty(name="Bottom",
-                               description="Lower height or radius",
-                               default=0.0, min=-100, max=100)
-    WallTop = FloatProperty(name="Top",
-                            description="Upper height or radius",
-                            default=15.0, min=0.0, max=100.0)
-    EdgeOffset = FloatProperty(name="Edging",
-                               description="Block staggering on wall sides",
-                               default=0.6, min=0.0, max=100.0)
-
-    # block sizing
-    Width = FloatProperty(name="Width",
-                          description="Average width of each block",
-                          default=1.5, min=0.01, max=100.0)
-    WidthVariance = FloatProperty(name="Variance",
-                                  description="Random variance of block width",
-                                  default=0.5, min=0.0, max=100.0)
-    WidthMinimum = FloatProperty(name="Minimum",
-                                 description="Absolute minimum block width",
-                                 default=0.5, min=0.01, max=100.0)
-    Height = FloatProperty(name="Height",
-                           description="Average Height of each block",
-                           default=0.7, min=0.01, max=100.0)
-    HeightVariance = FloatProperty(name="Variance",
-                                   description="Random variance of block Height",
-                                   default=0.3, min=0.0, max=100.0)
-    HeightMinimum = FloatProperty(name="Minimum",
-                                  description="Absolute minimum block Height",
-                                  default=0.25, min=0.01, max=100.0)
-    Depth = FloatProperty(name="Depth",
-                          description="Average Depth of each block",
-                          default=2.0, min=0.01, max=100.0)
-    DepthVariance = FloatProperty(name="Variance",
-                                  description="Random variance of block Depth",
-                                  default=0.1, min=0.0, max=100.0)
-    DepthMinimum = FloatProperty(name="Minimum",
-                                 description="Absolute minimum block Depth",
-                                 default=1.0, min=0.01, max=100.0)
-    MergeBlock = BoolProperty(name="Merge Blocks",
-                              description="Make big blocks (merge closely adjoining blocks)",
-                              default = False)
-
-    # edging for blocks
-    Grout = FloatProperty(name="Thickness",
-                          description="Distance between blocks",
-                          default=0.1, min=-10.0, max=10.0)
-    GroutVariance = FloatProperty(name="Variance",
-                                  description="Random variance of block Grout",
-                                  default=0.03, min=0.0, max=100.0)
-    GroutDepth = FloatProperty(name="Depth",
-                          description="Grout Depth from the face of the blocks",
-                          default=0.1, min=0.0001, max=10.0)
-    GroutDepthVariance = FloatProperty(name="Variance",
-                                  description="Random variance of block Grout Depth",
-                                  default=0.03, min=0.0, max=100.0)
-    GroutEdge = BoolProperty(name="Edging",
-                             description="Grout perimiter",
-                             default = False)
-
-    #properties for openings
-    Opening1Tog = BoolProperty(name="Opening(s)",description="Make windows or doors", default = True)
-    Opening1Width = FloatProperty(name="Width",
-                                  description="The Width of opening 1",
-                                  default=2.5, min=0.01, max=100.0)
-    Opening1Height = FloatProperty(name="Height",
-                                   description="The Height of opening 1",
-                                   default=3.5, min=0.01, max=100.0)
-    Opening1X = FloatProperty(name="Indent",
-                              description="The x position or spacing of opening 1",
-                              default=5.0, min=-100, max=100.0)
-    Opening1Z = FloatProperty(name="Bottom",
-                              description="The z position of opening 1",
-                              default=5.0, min=-100, max=100.0)
-    Opening1Repeat = BoolProperty(name="Repeat",
-                                  description="make multiple openings, with spacing X1",
-                                  default=False)
-    Opening1TopArchTog = BoolProperty(name="Top Arch",
-                                      description="Add an arch to the top of opening 1",
-                                      default=True)
-    Opening1TopArch = FloatProperty(name="Curve",
-                                    description="Height of the arch on the top of the opening",
-                                    default=2.5, min=0.001, max=100.0)
-    Opening1TopArchThickness = FloatProperty(name="Thickness",
-                                             description="Thickness of the arch on the top of the opening",
-                                             default=0.75, min=0.001, max=100.0)
-    Opening1BtmArchTog = BoolProperty(name="Bottom Arch",
-                                      description="Add an arch to the bottom of opening 1",
-                                      default=False)
-    Opening1BtmArch = FloatProperty(name="Curve",
-                                    description="Height of the arch on the bottom of the opening",
-                                    default=1.0, min=0.01, max=100.0)
-    Opening1BtmArchThickness = FloatProperty(name="Thickness",
-                                             description="Thickness of the arch on the bottom of the opening",
-                                             default=0.5, min=0.01, max=100.0)
-    Opening1Bevel = FloatProperty(name="Bevel",
-                                             description="Angle block face",
-                                             default=0.25, min=-10.0, max=10.0)
-
-
-    # openings on top of wall.
-    CrenelTog = BoolProperty(name="Crenels",
-                             description="Make openings along top of wall",
-                             default = False)
-    CrenelXP = FloatProperty(name="Width %",
-                             description="Gap width in wall based % of wall width",
-                             default=0.25, min=0.10, max=1.0)
-    CrenelZP = FloatProperty(name="Height %",
-                             description="Crenel Height as % of wall height",
-                             default=0.10, min=0.10, max=1.0)
-
-
-    # narrow openings in wall.
-#need to prevent overlap with arch openings - though inversion is an interesting effect.
-    SlotTog = BoolProperty(name="Slots",
-                           description="Make narrow openings in wall",
-                           default = False)
-    SlotRpt = BoolProperty(name="Repeat",
-                           description="Repeat slots along wall",
-                           default = False)
-    SlotWdg = BoolProperty(name="Wedged (n/a)",
-                           description="Bevel edges of slots",
-                           default = False)
-    SlotX = FloatProperty(name="Indent",
-                          description="The x position or spacing of slots",
-                          default=0.0, min=-100, max=100.0)
-    SlotGap = FloatProperty(name="Opening",
-                            description="The opening size of slots",
-                            default=0.5, min=0.10, max=100.0)
-    SlotV = BoolProperty(name="Vertical",
-                         description="Vertical slots",
-                         default = True)
-    SlotVH = FloatProperty(name="Height",
-                           description="Height of vertical slot",
-                           default=3.5, min=0.10, max=100.0)
-    SlotVBtm = FloatProperty(name="Bottom",
-                             description="Z position for slot",
-                             default=5.00, min=-100.0, max=100.0)
-    SlotH = BoolProperty(name="Horizontal",
-                         description="Horizontal slots",
-                         default = False)
-    SlotHW = FloatProperty(name="Width",
-                           description="Width of horizontal slot",
-                           default=2.5, min=0.10, max=100.0)
-#this should offset from VBtm... maybe make a % like crenels?
-    SlotHBtm = FloatProperty(name="Bottom",
-                             description="Z position for horizontal slot",
-                             default=5.50, min=-100.0, max=100.0)
-
-
-    #properties for shelf (extend blocks in area)
-    ShelfTog = BoolProperty(name="Shelf",description="Add blocks in area by depth to make shelf/platform", default = False)
-    ShelfX = FloatProperty(name="Left",
-                              description="The x position of Shelf",
-                              default=-5.00, min=-100, max=100.0)
-    ShelfZ = FloatProperty(name="Bottom",
-                              description="The z position of Shelf",
-                              default=10.0, min=-100, max=100.0)
-    ShelfH = FloatProperty(name="Height",
-                                   description="The Height of Shelf area",
-                                   default=1.0, min=0.01, max=100.0)
-    ShelfW = FloatProperty(name="Width",
-                                  description="The Width of shelf area",
-                                  default=5.0, min=0.01, max=100.0)
-    ShelfD = FloatProperty(name="Depth",
-                          description="Depth of each block for shelf (from cursor + 1/2 wall depth)",
-                          default=2.0, min=0.01, max=100.0)
-    ShelfBack = BoolProperty(name="Backside",description="Shelf on backside of wall", default = False)
-
-
-    #properties for steps (extend blocks in area, progressive width)
-    StepTog = BoolProperty(name="Steps",description="Add blocks in area by depth with progressive width to make steps", default = False)
-    StepX = FloatProperty(name="Left",
-                              description="The x position of steps",
-                              default=-9.00, min=-100, max=100.0)
-    StepZ = FloatProperty(name="Bottom",
-                              description="The z position of steps",
-                              default=0.0, min=-100, max=100.0)
-    StepH = FloatProperty(name="Height",
-                                   description="The Height of step area",
-                                   default=10.0, min=0.01, max=100.0)
-    StepW = FloatProperty(name="Width",
-                                  description="The Width of step area",
-                                  default=8.0, min=0.01, max=100.0)
-    StepD = FloatProperty(name="Depth",
-                          description="Depth of each block for steps (from cursor + 1/2 wall depth)",
-                          default=1.0, min=0.01, max=100.0)
-    StepV = FloatProperty(name="Riser",
-                                  description="Height of each step",
-                                  default=0.70, min=0.01, max=100.0)
-    StepT = FloatProperty(name="Tread",
-                          description="Width of each step",
-                          default=1.0, min=0.01, max=100.0)
-    StepLeft = BoolProperty(name="High Left",description="Height left; else Height right", default = False)
-    StepOnly = BoolProperty(name="No Blocks",description="Steps only, no supporting blocks", default = False)
-    StepBack = BoolProperty(name="Backside",description="Steps on backside of wall", default = False)
-
-##
-##
-#####
-# Show the UI - expose the properties.
-#####
-##
-##
-    # Display the toolbox options
-
-    def draw(self, context):
-
-        layout = self.layout
-
-        box = layout.box()
-        box.prop(self, 'ConstructTog')
-
-# Wall area (size/position)
-        box = layout.box()
-        box.label(text='Wall Size (area)')
-        box.prop(self, 'WallStart')
-        box.prop(self, 'WallEnd')
-        box.prop(self, 'WallBottom')
-        box.prop(self, 'WallTop')
-        box.prop(self, 'EdgeOffset')
-
-# Wall block sizing
-        box = layout.box()
-        box.label(text='Block Sizing')
-        box.prop(self, 'MergeBlock')
-#add checkbox for "fixed" sizing (ignore variance) a.k.a. bricks.
-        box.prop(self, 'Width')
-        box.prop(self, 'WidthVariance')
-        box.prop(self, 'WidthMinimum')
-        box.prop(self, 'Height')
-        box.prop(self, 'HeightVariance')
-        box.prop(self, 'HeightMinimum')
-        box.prop(self, 'Depth')
-        box.prop(self, 'DepthVariance')
-        box.prop(self, 'DepthMinimum')
-
-# grout settings
-        box = layout.box()
-        bl_label = "Grout"
-        box.label(text='Grout')
-        box.prop(self, 'Grout')
-        box.prop(self, 'GroutVariance')
-        box.prop(self, 'GroutDepth')
-        box.prop(self, 'GroutDepthVariance')
-#		box.prop(self, 'GroutEdge')
-
-# Wall shape modifiers
-        box = layout.box()
-        box.label(text='Wall Shape')
-        box.prop(self, 'RadialTog')
-        box.prop(self, 'SlopeTog')
-
-# Openings (doors, windows; arched)
-        box = layout.box()
-        box.prop(self, 'Opening1Tog')
-        if self.properties.Opening1Tog:
-            box.prop(self, 'Opening1Width')
-            box.prop(self, 'Opening1Height')
-            box.prop(self, 'Opening1X')
-            box.prop(self, 'Opening1Z')
-            box.prop(self, 'Opening1Bevel')
-            box.prop(self, 'Opening1Repeat')
-            box.prop(self, 'Opening1TopArchTog')
-            box.prop(self, 'Opening1TopArch')
-            box.prop(self, 'Opening1TopArchThickness')
-            box.prop(self, 'Opening1BtmArchTog')
-            box.prop(self, 'Opening1BtmArch')
-            box.prop(self, 'Opening1BtmArchThickness')
-
-# Slots (narrow openings)
-        box = layout.box()
-        box.prop(self, 'SlotTog')
-        if self.properties.SlotTog:
-#		box.prop(self, 'SlotWdg')
-            box.prop(self, 'SlotX')
-            box.prop(self, 'SlotGap')
-            box.prop(self, 'SlotRpt')
-            box.prop(self, 'SlotV')
-            box.prop(self, 'SlotVH')
-            box.prop(self, 'SlotVBtm')
-            box.prop(self, 'SlotH')
-            box.prop(self, 'SlotHW')
-            box.prop(self, 'SlotHBtm')
-
-# Crenels, gaps in top of wall
-        box = layout.box()
-        box.prop(self, 'CrenelTog')
-        if self.properties.CrenelTog:
-            box.prop(self, 'CrenelXP')
-            box.prop(self, 'CrenelZP')
-
-# Shelfing (protrusions)
-        box = layout.box()
-        box.prop(self, 'ShelfTog')
-        if self.properties.ShelfTog:
-            box.prop(self, 'ShelfX')
-            box.prop(self, 'ShelfZ')
-            box.prop(self, 'ShelfH')
-            box.prop(self, 'ShelfW')
-            box.prop(self, 'ShelfD')
-            box.prop(self, 'ShelfBack')
-
-# Steps
-        box = layout.box()
-        box.prop(self, 'StepTog')
-        if self.properties.StepTog:
-            box.prop(self, 'StepX')
-            box.prop(self, 'StepZ')
-            box.prop(self, 'StepH')
-            box.prop(self, 'StepW')
-            box.prop(self, 'StepD')
-            box.prop(self, 'StepV')
-            box.prop(self, 'StepT')
-            box.prop(self, 'StepLeft')
-            box.prop(self, 'StepOnly')
-            box.prop(self, 'StepBack')
-
-##
-#####
-# Respond to UI - get the properties set by user.
-#####
-##
-    # Check and process UI settings to generate masonry
-
-    def execute(self, context):
-
-        global radialized
-        global slope
-        global openingSpecs
-        global bigBlock
-        global shelfExt
-        global stepMod
-        global stepLeft
-        global shelfBack
-        global stepOnly
-        global stepBack
-
-        # Create the wall when enabled (skip regen iterations when off)
-        if not self.properties.ConstructTog: return {'FINISHED'}
-
-        #enter the settings for the wall dimensions (area)
-# start can't be zero - min/max don't matter [if max less than end] but zero don't workie.
-# start can't exceed end.
-        if not self.properties.WallStart or self.properties.WallStart >= self.properties.WallEnd:
-            self.properties.WallStart = NOTZERO # Reset UI if input out of bounds...
-
-        dims['s'] = self.properties.WallStart
-        dims['e'] = self.properties.WallEnd
-        dims['b'] = self.properties.WallBottom
-        dims['t'] = self.properties.WallTop
-
-        settings['eoff'] = self.properties.EdgeOffset
-
-        #retrieve the settings for the wall block properties
-        settings['w'] = self.properties.Width
-        settings['wv'] = self.properties.WidthVariance
-        settings['wm'] = self.properties.WidthMinimum
-        if not radialized: settings['sdv'] = settings['w'] 
-        else: settings['sdv'] = 0.12
-
-        settings['h'] = self.properties.Height
-        settings['hv'] = self.properties.HeightVariance
-        settings['hm'] = self.properties.HeightMinimum
-
-        settings['d'] = self.properties.Depth
-        settings['dv'] = self.properties.DepthVariance
-        settings['dm'] = self.properties.DepthMinimum
-
-        if self.properties.MergeBlock:
-            bigBlock = 1
-        else: bigBlock = 0
-
-        settings['g'] = self.properties.Grout
-        settings['gv'] = self.properties.GroutVariance
-        settings['gd'] = self.properties.GroutDepth
-        settings['gdv'] = self.properties.GroutDepthVariance
-
-        if self.properties.GroutEdge: settings['ge'] = 1
-        else: settings['ge'] = 0
-
-        # set wall shape modifiers
-        if self.properties.RadialTog:
-            radialized = 1
-#eliminate to allow user control for start/completion?
-            dims['s'] = 0.0 # complete radial
-            if dims['e'] > PI*2: dims['e'] = PI*2 # max end for circle
-            if dims['b'] < settings['g']: dims['b'] = settings['g'] # min bottom for grout extension
-        else: radialized = 0
-
-        if self.properties.SlopeTog: slope = 1
-        else: slope = 0
-
-
-        shelfExt = 0
-        shelfBack = 0
-
-	# Add shelf if enabled
-        if self.properties.ShelfTog:
-            shelfExt = 1
-            shelfSpecs['h'] = self.properties.ShelfH
-            shelfSpecs['w'] = self.properties.ShelfW
-            shelfSpecs['d'] = self.properties.ShelfD
-            shelfSpecs['x'] = self.properties.ShelfX
-            shelfSpecs['z'] = self.properties.ShelfZ
-
-            if self.properties.ShelfBack:
-                shelfBack = 1
-
-
-        stepMod = 0
-        stepLeft = 0
-        stepOnly = 0
-        stepBack = 0
-
-	# Make steps if enabled
-        if self.properties.StepTog:
-            stepMod = 1
-            stepSpecs['x'] = self.properties.StepX
-            stepSpecs['z'] = self.properties.StepZ
-            stepSpecs['h'] = self.properties.StepH
-            stepSpecs['w'] = self.properties.StepW
-            stepSpecs['d'] = self.properties.StepD
-            stepSpecs['v'] = self.properties.StepV
-            stepSpecs['t'] = self.properties.StepT
-
-            if self.properties.StepLeft:
-                stepLeft = 1
-
-            if self.properties.StepOnly:
-                stepOnly = 1
-
-            if self.properties.StepBack:
-                stepBack = 1
-
-
-        #enter the settings for the openings
-#when openings overlap they create inverse stonework - interesting but not the desired effect :)
-#if opening width == indent*2 the edge blocks fail (row of blocks cross opening) - bug.
-        openingSpecs = []
-        openingIdx = 0 # track opening array references for multiple uses
-
-        # general openings with arch options - can be windows or doors.
-        if self.properties.Opening1Tog:
-            # set defaults...
-            openingSpecs += [{'w':0.5, 'h':0.5, 'x':0.8, 'z':2.7, 'rp':1, 'b':0.0, 'v':0, 'vl':0, 't':0, 'tl':0}]
-
-            openingSpecs[openingIdx]['w'] = self.properties.Opening1Width
-            openingSpecs[openingIdx]['h'] = self.properties.Opening1Height
-            openingSpecs[openingIdx]['x'] = self.properties.Opening1X
-            openingSpecs[openingIdx]['z'] = self.properties.Opening1Z
-            openingSpecs[openingIdx]['rp'] = self.properties.Opening1Repeat
-
-            if self.properties.Opening1TopArchTog:
-                openingSpecs[openingIdx]['v'] = self.properties.Opening1TopArch
-                openingSpecs[openingIdx]['t'] = self.properties.Opening1TopArchThickness
-
-            if self.properties.Opening1BtmArchTog:
-                openingSpecs[openingIdx]['vl'] = self.properties.Opening1BtmArch
-                openingSpecs[openingIdx]['tl'] = self.properties.Opening1BtmArchThickness
-            
-            openingSpecs[openingIdx]['b'] = self.properties.Opening1Bevel
-
-            openingIdx += 1 # count window/door/arch openings
-
-        # Slots (narrow openings)
-        if self.properties.SlotTog:
-
-            if self.properties.SlotV: # vertical slots
-                # set defaults...
-                openingSpecs += [{'w':0.5, 'h':0.5, 'x':0.0, 'z':2.7, 'rp':0, 'b':0.0, 'v':0, 'vl':0, 't':0, 'tl':0}]
-
-                openingSpecs[openingIdx]['w'] = self.properties.SlotGap
-                openingSpecs[openingIdx]['h'] = self.properties.SlotVH
-                openingSpecs[openingIdx]['x'] = self.properties.SlotX
-                openingSpecs[openingIdx]['z'] = self.properties.SlotVBtm
-                openingSpecs[openingIdx]['rp'] = self.properties.SlotRpt
-
-                # make them pointy...
-                openingSpecs[openingIdx]['v'] = self.properties.SlotGap
-                openingSpecs[openingIdx]['t'] = self.properties.SlotGap/2
-                openingSpecs[openingIdx]['vl'] = self.properties.SlotGap
-                openingSpecs[openingIdx]['tl'] = self.properties.SlotGap/2
-
-                openingIdx += 1 # count vertical slot openings
-
-# need to handle overlap of H and V slots...
-
-            if self.properties.SlotH: # Horizontal slots
-                # set defaults...
-                openingSpecs += [{'w':0.5, 'h':0.5, 'x':0.0, 'z':2.7, 'rp':0, 'b':0.0, 'v':0, 'vl':0, 't':0, 'tl':0}]
-
-                openingSpecs[openingIdx]['w'] = self.properties.SlotHW
-                openingSpecs[openingIdx]['h'] = self.properties.SlotGap
-                openingSpecs[openingIdx]['x'] = self.properties.SlotX
-                openingSpecs[openingIdx]['z'] = self.properties.SlotHBtm
-#horizontal repeat isn't same spacing as vertical...
-                openingSpecs[openingIdx]['rp'] = self.properties.SlotRpt
-
-                # make them pointy...
-# want arc to go sideways... maybe wedge will be sufficient and can skip horiz arcs.
-#				openingSpecs[openingIdx]['v'] = self.properties.SlotGap
-#				openingSpecs[openingIdx]['t'] = self.properties.SlotGap/2
-#				openingSpecs[openingIdx]['vl'] = self.properties.SlotGap
-#				openingSpecs[openingIdx]['tl'] = self.properties.SlotGap/2
-
-                openingIdx += 1 # count horizontal slot openings
-
-
-        # Crenellations (top row openings)
-        if self.properties.CrenelTog:
-
-# add bottom arch option?
-# perhaps a repeat toggle...
-# if crenel opening overlaps with arch opening it fills with blocks...
-
-            # set defaults...
-            openingSpecs += [{'w':0.5, 'h':0.5, 'x':0.0, 'z':2.7, 'rp':1, 'b':0.0, 'v':0, 'vl':0, 't':0, 'tl':0}]
-
-            wallW = self.properties.WallEnd - self.properties.WallStart
-            crenelW = wallW*self.properties.CrenelXP # Width % opening.
-
-            wallH = self.properties.WallTop - self.properties.WallBottom
-            crenelH = wallH*self.properties.CrenelZP # % proportional height.
-
-            openingSpecs[openingIdx]['w'] = crenelW
-            openingSpecs[openingIdx]['h'] = crenelH
-
-            # calculate the spacing between openings.
-            # this isn't the absolute start (left), it's opening center offset relative to cursor (space between openings)...
-            openingSpecs[openingIdx]['x'] = crenelW*2-1 # assume standard spacing
-
-            if not radialized: # normal wall?
-                # set indent 0 (center) if opening is 50% or more of wall width, no repeat.
-                if crenelW*2 >= wallW:
-                    openingSpecs[openingIdx]['x'] = 0
-                    openingSpecs[openingIdx]['rp'] = 0
-
-            openingSpecs[openingIdx]['z'] = self.properties.WallTop - (crenelH/2) # set bottom of opening (center of hole)
-
-            openingIdx += 1 # count crenel openings
-
-        #
-        # Process the user settings to generate a wall
-        #
-        # generate the list of vertices for the wall...
-        verts_array, faces_array = createWall(radialized, slope, openingSpecs, bigBlock,
-                shelfExt, shelfBack, stepMod, stepLeft, stepOnly, stepBack)
-
-        # Create new mesh
-        mesh = bpy.data.meshes.new("Wall")
-
-        # Make a mesh from a list of verts/edges/faces.
-        mesh.from_pydata(verts_array, [], faces_array)
-
-        scene = context.scene
-
-        # Deselect all objects.
-        bpy.ops.object.select_all(action='DESELECT')
-
-        mesh.update()
-
-        ob_new = bpy.data.objects.new("Wall", mesh)
-        scene.objects.link(ob_new)
-# leave this out to prevent 'Tab key" going into edit mode :):):)
-# Use rmb click to select and still modify.
-        scene.objects.active = ob_new
-        ob_new.select = True
-
-        ob_new.location = tuple(context.scene.cursor_location)
-        ob_new.rotation_quaternion = [1.0,0.0,0.0,0.0]
-
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/__init__.py b/release/scripts/addons_contrib/add_mesh_building_objects/__init__.py
deleted file mode 100644
index af0c030..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/__init__.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-# Contributed to by
-# SAYproductions, meta-androcto, jambay, brikbot#
-
-bl_info = {
-    "name": "Building Objects",
-    "author": "Multiple Authors",
-    "version": (0, 2),
-    "blender": (2, 6, 4),
-    "location": "View3D > Add > Mesh > Cad Objects",
-    "description": "Add building object types",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32711",
-    "category": "Add Mesh"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(add_mesh_balcony)
-    imp.reload(add_mesh_sove)
-    imp.reload(add_mesh_window)
-    imp.reload(add_mesh_beam_builder)
-    imp.reload(Wallfactory)
-    imp.reload(stairbuilder)
-
-else:
-    from . import add_mesh_balcony
-    from . import add_mesh_sove
-    from . import add_mesh_window
-    from . import add_mesh_beam_builder
-    from . import Wallfactory
-    from . import stairbuilder
-
-import bpy
-
-
-class INFO_MT_mesh_objects_add(bpy.types.Menu):
-    # Define the "mesh objects" menu
-    bl_idname = "INFO_MT_cad_objects_add"
-    bl_label = "Building Objects"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.menu("INFO_MT_mesh_beambuilder_add",
-            text="Beam Builder")
-        layout.operator("mesh.add_say3d_balcony",
-            text="Balcony")
-        layout.operator("mesh.add_say3d_sove",
-            text="Sove")
-        layout.operator("mesh.add_say3d_pencere2",
-            text="Window")
-        layout.operator("mesh.wall_add",
-            text="Wall Factory")
-        layout.operator("mesh.stairs",
-            text="Stair Builder")
-
-
-# Register all operators and panels
-
-# Define "Extras" menu
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_cad_objects_add", icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    # Add "Extras" menu to the "Add Mesh" menu
-    bpy.types.INFO_MT_mesh_add.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    # Remove "Extras" menu from the "Add Mesh" menu.
-    bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_balcony.py b/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_balcony.py
deleted file mode 100644
index f5f840f..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_balcony.py
+++ /dev/null
@@ -1,492 +0,0 @@
-'''
-bl_info = {
-    "name": "Balcony",
-    "author": "SayPRODUCTIONS",
-    "version": (1, 0),
-    "blender": (2, 5, 9),
-    "api": 33333,
-    "location": "View3D > Add > Mesh > Say3D",
-    "description": "Balcony olusturma",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Add Mesh"}
-'''
-import bpy, bmesh
-from bpy.props import *
-from bpy_extras.object_utils import object_data_add
-from mathutils import Vector
-import operator
-import os
-from math import pi, sin, cos, sqrt, atan
-def MAT(AD,R,G,B):
-    if AD not in bpy.data.materials:
-        mtl=bpy.data.materials.new(AD)
-        mtl.diffuse_color     = ([R,G,B])
-        mtl.diffuse_shader    = 'LAMBERT'
-        mtl.diffuse_intensity = 1.0
-    else:
-        mtl=bpy.data.materials[AD]
-    return mtl
-def Prs(s,v):
-    if v=='1':
-        s.lst=3
-        s.ls0='1';s.by0= 80;s.bk0=20;s.bf0=4;s.fh0=3;s.fd0=2;s.f00=16;s.f01=12;s.f02=12;s.f03=12
-        s.ls1='3';s.my1=  4;s.mg1= 4
-        s.ls2='4';s.kt2="2";s.ky2= 5;s.kk2=5
-    if v=='2':
-        s.lst=5
-        s.ls0='1';s.by0= 15;s.bk0=20;s.bf0=0
-        s.ls1='2';s.py1= 60;s.pd1=10
-        s.ls2='1';s.by2= 15;s.bk2=20;s.bf2=0
-        s.ls3='3';s.my3=  4;s.mg3= 4
-        s.ls4='4';s.kt4="2";s.ky4= 5;s.kk4=5
-    if v=='3':
-        s.lst=3
-        s.ls0='1';s.by0= 40;s.bk0=10;s.bf0=0
-        s.ls1='5';s.cy1= 56
-        s.ls2='4';s.kt2="1";s.ky2= 0;s.kk2=4
-    if v=='4':
-        s.lst=2
-        s.ls0='1';s.by0= 30;s.bk0=20;s.bf0=0
-        s.ls1='3';s.my1=  4;s.mg1= 4
-    if v=='5':
-        s.lst=2
-        s.ls0='1';s.by0= 27;s.bk0=20;s.bf0=2;s.fh0=3;s.fd0=2;s.f00=7;s.f01=7
-        s.ls1='3';s.my1=  4;s.mg1= 4
-    if v=='6':
-        s.lst=6
-        s.ls0='1';s.by0= 50;s.bk0=20;s.bf0=2;s.fh0=3;s.fd0=2;s.f00=12;s.f01=20
-        s.ls1='3';s.my1=  4;s.mg1= 4
-        s.ls2='4';s.kt2="2";s.ky2= 5;s.kk2=4
-        s.ls3='4';s.kt3="2";s.ky3= 5;s.kk3=4
-        s.ls4='4';s.kt4="2";s.ky4= 5;s.kk4=4
-        s.ls5='4';s.kt5="2";s.ky5= 5;s.kk5=5
-def EXT(PR,vr,fc,lz,mz,rz):
-    n=len(vr)
-    m=len(PR)
-    if lz==0:
-        for P in PR:vr.append([-mz,P[0],P[1]])
-    else:
-        for P in PR:vr.append([ P[0]-mz,  lz,P[1]])
-        for P in PR:vr.append([ P[0]-mz,P[0],P[1]])
-    if rz==0:
-        for P in PR:vr.append([ mz,P[0],P[1]])
-    else:
-        for P in PR:vr.append([-P[0]+mz,P[0],P[1]])
-        for P in PR:vr.append([-P[0]+mz,  rz,P[1]])
-    if   lz==0 and rz==0:l=1
-    elif lz==0 and rz> 0:l=2
-    elif lz> 0 and rz==0:l=2
-    elif lz> 0 and rz> 0:l=3
-    for j in range(0,l):
-        for i in range(0,m):
-            a=j*m
-            if i==m-1:fc.append([a+i+n,a+0+n+0,a+0+n+0+m,a+i+n+m])
-            else:     fc.append([a+i+n,a+i+n+1,a+i+n+1+m,a+i+n+m])
-def add_object(s,context):
-    fc=[];vr=[];SM=[]
-    Bal=[];Par=[];Mer=[];Krm=[];Glass=[];Dos=[]
-    blok=[]#    [ Tip ][             Balcony           [                    Joint_Gap                        ] [  Bulwark  ] [   Marble  ] [       Chrome      ] [  Glass  ]
-    blok.append([s.ls0,[s.by0,s.bk0,s.bf0,s.fh0,s.fd0,[s.f00,s.f01,s.f02,s.f03,s.f04,s.f05,s.f06,s.f07]],[s.py0,s.pd0],[s.my0,s.mg0],[s.kt0,s.ky0,s.kk0],[s.cy0]])
-    blok.append([s.ls1,[s.by1,s.bk1,s.bf1,s.fh1,s.fd1,[s.f10,s.f11,s.f12,s.f13,s.f14,s.f15,s.f16,s.f17]],[s.py1,s.pd1],[s.my1,s.mg1],[s.kt1,s.ky1,s.kk1],[s.cy1]])
-    blok.append([s.ls2,[s.by2,s.bk2,s.bf2,s.fh2,s.fd2,[s.f20,s.f21,s.f22,s.f23,s.f24,s.f25,s.f26,s.f27]],[s.py2,s.pd2],[s.my2,s.mg2],[s.kt2,s.ky2,s.kk2],[s.cy2]])
-    blok.append([s.ls3,[s.by3,s.bk3,s.bf3,s.fh3,s.fd3,[s.f30,s.f31,s.f32,s.f33,s.f34,s.f35,s.f36,s.f37]],[s.py3,s.pd3],[s.my3,s.mg3],[s.kt3,s.ky3,s.kk3],[s.cy3]])
-    blok.append([s.ls4,[s.by4,s.bk4,s.bf4,s.fh4,s.fd4,[s.f40,s.f41,s.f42,s.f43,s.f44,s.f45,s.f46,s.f47]],[s.py4,s.pd4],[s.my4,s.mg4],[s.kt4,s.ky4,s.kk4],[s.cy4]])
-    blok.append([s.ls5,[s.by5,s.bk5,s.bf5,s.fh5,s.fd5,[s.f50,s.f51,s.f52,s.f53,s.f54,s.f55,s.f56,s.f57]],[s.py5,s.pd5],[s.my5,s.mg5],[s.kt5,s.ky5,s.kk5],[s.cy5]])
-    blok.append([s.ls6,[s.by6,s.bk6,s.bf6,s.fh6,s.fd6,[s.f60,s.f61,s.f62,s.f63,s.f64,s.f65,s.f66,s.f67]],[s.py6,s.pd6],[s.my6,s.mg6],[s.kt6,s.ky6,s.kk6],[s.cy6]])
-    blok.append([s.ls7,[s.by7,s.bk7,s.bf7,s.fh7,s.fd7,[s.f70,s.f71,s.f72,s.f73,s.f74,s.f75,s.f76,s.f77]],[s.py7,s.pd7],[s.my7,s.mg7],[s.kt7,s.ky7,s.kk7],[s.cy7]])
-
-    h=-s.dds/100;dh=h+s.dhg/100;du=s.duz/100;
-    lz=s.luz/100;mz=s.muz/200;rz=s.ruz/100
-    dg=-((blok[0][1][1]-s.ddg)/100)
-    if h<0:#Pavement
-        if lz==0 and rz==0:
-            vr=[[-mz,du,h],[ mz,du, h],[-mz,dg, h],[ mz,dg, h],[-mz,dg, 0],
-                [ mz,dg,0],[-mz, 0,dh],[ mz, 0,dh],[-mz,du,dh],[ mz,du,dh]]
-            fc=[[0,1,3,2],[2,3,5,4],[6,7,9,8]];Dos=[0,1,2]
-        if lz==0 and rz >0:
-            vr=[[-mz,   du,h],[ mz-dg,du, h],[-mz,   dg, h],[ mz-dg,dg, h],[-mz,   dg, 0],
-                [ mz-dg,dg,0],[-mz, 0,   dh],[ mz-dg, 0,dh],[-mz,   du,dh],[ mz-dg,du,dh],[ mz-dg,du,0]]
-            fc=[[0,1,3,2],[2,3,5,4],[6,7,9,8],[3,1,10,5]];Dos=[0,1,2,3]
-        if lz >0 and rz==0:
-            vr=[[-mz+dg,du,h],[ mz,   du, h],[-mz+dg,dg, h],[ mz,   dg, h],[-mz+dg,dg, 0],
-                [ mz,   dg,0],[-mz+dg, 0,dh],[ mz,    0,dh],[-mz+dg,du,dh],[ mz,   du,dh],[-mz+dg,du,0]]
-            fc=[[0,1,3,2],[2,3,5,4],[6,7,9,8],[0,2,4,10]];Dos=[0,1,2,3]
-        if lz >0 and rz >0:
-            vr=[[-mz+dg,dg,0],[mz-dg,dg,0],[-mz+dg,dg, h],[mz-dg,dg, h],[-mz+dg,du, h],[mz-dg,du, h],
-                [-mz+dg,du,0],[mz-dg,du,0],[-mz,    0,dh],[mz,    0,dh],[-mz,   du,dh],[mz,   du,dh]]
-            fc=[[1,0,2,3],[3,2,4,5],[6,4,2,0],[3,5,7,1],[8,9,11,10]];Dos=[0,1,2,3,4]
-    else:
-        vr=[[-mz, 0, h],[mz, 0, h],[-mz,du, h],[mz,du, h],
-            [-mz,du,dh],[mz,du,dh],[-mz, 0,dh],[mz, 0,dh]]
-        fc=[[1,0,2,3],[5,4,6,7]];Dos=[0,1]
-    z=0
-    for i in range(s.lst):
-        if blok[i][0]=='1':#Balcony
-            k1=blok[i][1][1]/100;h =blok[i][1][0]/100
-            fh=blok[i][1][3]/100;fd=blok[i][1][4]/100
-            PR=[[-k1,z],[0,z],[0,z+h],[-k1,z+h]]
-            z+=h;fz=z
-            for f in range(blok[i][1][2]):
-                fz-=blok[i][1][5][f]/100
-                PR.append([-k1,   fz   ]);PR.append([-k1+fd,fz   ])
-                PR.append([-k1+fd,fz-fh]);PR.append([-k1,   fz-fh])
-                fz-=fh
-            BB=len(fc)
-            EXT(PR,vr,fc,lz,mz,rz)
-            BE=len(fc)
-            for F in range(BB,BE):Bal.append(F)
-        if blok[i][0]=='2':#Bulwark
-            k1=blok[i][2][1]/100;h=blok[i][2][0]/100
-            PR=[[-k1,z],[0,z],[0,z+h],[-k1,z+h]]
-            z+=h
-            BB=len(fc)
-            EXT(PR,vr,fc,lz,mz,rz)
-            BE=len(fc)
-            for F in range(BB,BE):Par.append(F)
-        if blok[i][0]=='3':#Marble
-            k1=blok[0][1][1]/100;k2=blok[i][3][1]/100;h=blok[i][3][0]/100
-            PR=[[-k1-k2,z],[k2,z],[k2,z+h],[-k1-k2,z+h]]
-            z+=h
-            BB=len(fc)
-            EXT(PR,vr,fc,lz,mz,rz)
-            BE=len(fc)
-            for F in range(BB,BE):Mer.append(F)
-        if blok[i][0]=='4':#Chrome
-            k1=blok[0][1][1]/200;k2=blok[i][4][2]/200;h=blok[i][4][1]/100
-            if blok[i][4][0]=="1":#Duz
-                z+=h
-                PR=[[-k1-k2,z],[-k1+k2,z],[-k1+k2,z+k2*2],[-k1-k2,z+k2*2]]
-                z+=k2*2
-            else:#Round
-                PR=[];z+=h+k2
-                for a in range(24):
-                    x=-k1+cos(a*pi/12)*k2;y=z+sin(a*pi/12)*k2
-                    PR.append([x,y])
-                z+=k2
-            BB=len(fc)
-            EXT(PR,vr,fc,lz,mz,rz)
-            BE=len(fc)
-            for F in range(BB,BE):Krm.append(F)
-            if blok[i][4][0]=="2":
-                for F in range(BB,BE):SM.append(F)
-        if blok[i][0]=='5':#Glass
-            k1=blok[0][1][1]/200;h=blok[i][5][0]/100
-            PR=[[-k1-0.001,z],[-k1+0.001,z],[-k1+0.001,z+h],[-k1-0.001,z+h]]
-            z+=h;BB=len(fc);n=len(vr)
-            fc.append([n+1,n,n+3,n+2])
-            EXT(PR,vr,fc,lz,mz,rz)
-            n=len(vr)
-            fc.append([n-2,n-1,n-4,n-3])
-            BE=len(fc)
-            for F in range(BB,BE):Glass.append(F)
-#OBJE -----------------------------------------------------------
-    mesh = bpy.data.meshes.new(name='Balcony')
-    mesh.from_pydata(vr,[],fc)
-    for i in SM:
-        mesh.polygons[i].use_smooth = 1
-    mesh.materials.append(MAT('Balcony', 0.66,0.64,0.72))
-    mesh.materials.append(MAT('Bulwark',0.46,0.44,0.52))
-    mesh.materials.append(MAT('Marble', 0.90,0.85,0.80))
-    mesh.materials.append(MAT('Chrome',   0.50,0.55,0.60))
-    mesh.materials.append(MAT('Glass',    0.50,0.80,1.00))
-    mesh.materials.append(MAT('Pavement', 1.00,1.00,1.00))
-
-    for i in Bal:mesh.polygons[i].material_index = 0
-    for i in Par:mesh.polygons[i].material_index = 1
-    for i in Mer:mesh.polygons[i].material_index = 2
-    for i in Krm:mesh.polygons[i].material_index = 3
-    for i in Glass:mesh.polygons[i].material_index = 4
-    for i in Dos:mesh.polygons[i].material_index = 5
-
-    mesh.update(calc_edges=True)
-    object_data_add(context, mesh, operator=None)
-    if bpy.context.mode != 'EDIT_MESH':
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.editmode_toggle()
-#----------------------------------------------------------------
-class OBJECT_OT_add_balcony(bpy.types.Operator):
-    bl_idname = "mesh.add_say3d_balcony"
-    bl_label = "Balcony"
-    bl_description = "Balcony Olustur"
-    bl_options = {'REGISTER', 'UNDO'}
-    prs = EnumProperty(items = (("1","Joint_Gap",    ""),
-                                ("2","Bulwark", ""),
-                                ("3","Glass",     ""),
-                                ("4","Marquise",  ""),
-                                ("5","Eaves",   ""),
-                                ("6","Railing","")))
-    son=prs
-    lst=IntProperty(         min=1,max=   8,default=  3)
-    luz=IntProperty(name='<',min=0,max=1000,default=100)
-    muz=IntProperty(         min=0,max=1000,default=200)
-    ruz=IntProperty(name='>',min=0,max=1000,default=100)
-
-    duz=IntProperty(min=  1,max=500,default=100,description="Pavement Width")
-    dhg=IntProperty(min=  1,max= 50,default= 17,description="Pavement Height")
-    dds=IntProperty(min=-50,max= 50,default= 10,description="Pavement Height")
-    ddg=IntProperty(min=  0,max= 50,default= 10,description="Pavement Width")
-    #Tip
-    ls0=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="1")
-    #Balcony
-    by0=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk0=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf0=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 4,description='Joint_Gap'     )
-    fh0=IntProperty(min=1,max= 10,default= 3);fd0=IntProperty(min=1,max= 10,default= 2)
-    f00=IntProperty(min=1,max=200,default=16);f01=IntProperty(min=1,max=200,default=12)
-    f02=IntProperty(min=1,max=200,default=12);f03=IntProperty(min=1,max=200,default=12)
-    f04=IntProperty(min=1,max=200,default= 3);f05=IntProperty(min=1,max=200,default= 3)
-    f06=IntProperty(min=1,max=200,default= 3);f07=IntProperty(min=1,max=200,default= 3)
-    #Bulwark
-    py0=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd0=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my0=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg0=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt0=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky0=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk0=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy0=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls1=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="3")
-    #Balcony
-    by1=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk1=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf1=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh1=IntProperty(min=1,max= 10,default=3);fd1=IntProperty(min=1,max= 10,default=2)
-    f10=IntProperty(min=1,max=200,default=3);f11=IntProperty(min=1,max=200,default=3)
-    f12=IntProperty(min=1,max=200,default=3);f13=IntProperty(min=1,max=200,default=3)
-    f14=IntProperty(min=1,max=200,default=3);f15=IntProperty(min=1,max=200,default=3)
-    f16=IntProperty(min=1,max=200,default=3);f17=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py1=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd1=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my1=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg1=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt1=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky1=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk1=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy1=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls2=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by2=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk2=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf2=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh2=IntProperty(min=1,max= 10,default=3);fd2=IntProperty(min=1,max= 10,default=2)
-    f20=IntProperty(min=1,max=200,default=3);f21=IntProperty(min=1,max=200,default=3)
-    f22=IntProperty(min=1,max=200,default=3);f23=IntProperty(min=1,max=200,default=3)
-    f24=IntProperty(min=1,max=200,default=3);f25=IntProperty(min=1,max=200,default=3)
-    f26=IntProperty(min=1,max=200,default=3);f27=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py2=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd2=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my2=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg2=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt2=EnumProperty(items=(("1","Square",""),("2","Round","")),default="2")
-    ky2=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk2=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy2=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls3=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by3=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk3=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf3=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh3=IntProperty(min=1,max= 10,default=3);fd3=IntProperty(min=1,max= 10,default=2)
-    f30=IntProperty(min=1,max=200,default=3);f31=IntProperty(min=1,max=200,default=3)
-    f32=IntProperty(min=1,max=200,default=3);f33=IntProperty(min=1,max=200,default=3)
-    f34=IntProperty(min=1,max=200,default=3);f35=IntProperty(min=1,max=200,default=3)
-    f36=IntProperty(min=1,max=200,default=3);f37=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py3=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd3=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my3=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg3=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt3=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky3=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk3=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy3=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls4=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by4=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk4=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf4=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh4=IntProperty(min=1,max= 10,default=3);fd4=IntProperty(min=1,max= 10,default=2)
-    f40=IntProperty(min=1,max=200,default=3);f41=IntProperty(min=1,max=200,default=3)
-    f42=IntProperty(min=1,max=200,default=3);f43=IntProperty(min=1,max=200,default=3)
-    f44=IntProperty(min=1,max=200,default=3);f45=IntProperty(min=1,max=200,default=3)
-    f46=IntProperty(min=1,max=200,default=3);f47=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py4=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd4=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my4=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg4=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt4=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky4=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk4=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy4=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls5=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by5=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk5=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf5=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh5=IntProperty(min=1,max= 10,default=3);fd5=IntProperty(min=1,max= 10,default=2)
-    f50=IntProperty(min=1,max=200,default=3);f51=IntProperty(min=1,max=200,default=3)
-    f52=IntProperty(min=1,max=200,default=3);f53=IntProperty(min=1,max=200,default=3)
-    f54=IntProperty(min=1,max=200,default=3);f55=IntProperty(min=1,max=200,default=3)
-    f56=IntProperty(min=1,max=200,default=3);f57=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py5=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd5=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my5=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg5=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt5=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky5=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk5=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy5=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls6=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by6=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk6=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf6=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh6=IntProperty(min=1,max= 10,default=3);fd6=IntProperty(min=1,max= 10,default=2)
-    f60=IntProperty(min=1,max=200,default=3);f61=IntProperty(min=1,max=200,default=3)
-    f62=IntProperty(min=1,max=200,default=3);f63=IntProperty(min=1,max=200,default=3)
-    f64=IntProperty(min=1,max=200,default=3);f65=IntProperty(min=1,max=200,default=3)
-    f66=IntProperty(min=1,max=200,default=3);f67=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py6=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd6=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my6=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg6=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt6=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky6=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk6=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy6=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    #Tip
-    ls7=EnumProperty(items=(("1","Balcony",""),("2","Bulwark",""),("3","Marble",""),("4","Chrome",""),("5","Glass","")),default="4")
-    #Balcony
-    by7=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    bk7=IntProperty(name='Thickness', min=1,max= 50,default=20,description='Thickness' )
-    bf7=IntProperty(name='Joint_Gap',     min=0,max=  8,default= 0,description='Joint_Gap'     )
-    fh7=IntProperty(min=1,max= 10,default=3);fd7=IntProperty(min=1,max= 10,default=2)
-    f70=IntProperty(min=1,max=200,default=3);f71=IntProperty(min=1,max=200,default=3)
-    f72=IntProperty(min=1,max=200,default=3);f73=IntProperty(min=1,max=200,default=3)
-    f74=IntProperty(min=1,max=200,default=3);f75=IntProperty(min=1,max=200,default=3)
-    f76=IntProperty(min=1,max=200,default=3);f77=IntProperty(min=1,max=200,default=3)
-    #Bulwark
-    py7=IntProperty(name='Elevation',min=1,max=200,default=80,description='Elevation')
-    pd7=IntProperty(name='Thickness', min=1,max= 50,default=10,description='Thickness' )
-    #Marble
-    my7=IntProperty(name='Elevation',min=1,max=50,default=4,description='Elevation')
-    mg7=IntProperty(name='maxWidth', min=0,max=20,default=4,description='maxWidth' )
-    #Chrome
-    kt7=EnumProperty(items=(("1","Square",""),("2","Round","")))
-    ky7=IntProperty(min=0,max=50,default=5,description='CutOut'  )
-    kk7=IntProperty(min=1,max=20,default=5,description='Thickness')
-    #Glass
-    cy7=IntProperty(name='Elevation',min=1,max=100,default=20,description='Elevation')
-    #--------------------------------------------------------------
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'prs', text="Wall Style")
-        layout.prop(self,'lst', text="Add Level")
-        row=layout.row()
-        row.label(text="Wall Length & Width")
-        row=layout.row()
-        row.prop(self,'luz')
-        row.prop(self,'muz')
-        row.prop(self,'ruz')
-
-        layout.label('Pavement XYZ')
-        row=layout.row();row.prop(self,'duz');row.prop(self,'dhg')
-        row=layout.row();row.prop(self,'dds');row.prop(self,'ddg')
-
-        ls=[];lf=[]
-        ls.append(self.ls0);lf.append(self.bf0)
-        ls.append(self.ls1);lf.append(self.bf1)
-        ls.append(self.ls2);lf.append(self.bf2)
-        ls.append(self.ls3);lf.append(self.bf3)
-        ls.append(self.ls4);lf.append(self.bf4)
-        ls.append(self.ls5);lf.append(self.bf5)
-        ls.append(self.ls6);lf.append(self.bf6)
-        ls.append(self.ls7);lf.append(self.bf7)
-        for i in range(self.lst-1,-1,-1):
-            box=layout.box()
-            box.prop(self,'ls'+str(i))
-            if  ls[i]=='1':#Balcony
-                box.prop(self,'by'+str(i))
-                box.prop(self,'bk'+str(i))
-                box.prop(self,'bf'+str(i))
-                if lf[i]>0:
-                    row=box.row()
-                    row.prop(self,'fh'+str(i))
-                    row.prop(self,'fd'+str(i))
-                for f in range(lf[i]):
-                    box.prop(self,'f'+str(i)+str(f))
-            if  ls[i]=='2':#Bulwark
-                box.prop(self,'py'+str(i))
-                box.prop(self,'pd'+str(i))
-            if  ls[i]=='3':#Marble
-                row=box.row()
-                row.prop(self,'my'+str(i))
-                row.prop(self,'mg'+str(i))
-            if  ls[i]=='4':#Chrome
-                row=box.row()
-                row.prop(self,'kt'+str(i))
-                row.prop(self,'ky'+str(i))
-                row.prop(self,'kk'+str(i))
-            if  ls[i]=='5':#Glass
-                box.prop(self,'cy'+str(i))
-    def execute(self, context):
-        if self.son!=self.prs:
-            Prs(self,self.prs)
-            self.son=self.prs
-        add_object(self,context)
-        return {'FINISHED'}
-# Registration
-def add_object_button(self, context):
-    self.layout.operator(
-        OBJECT_OT_add_balcony.bl_idname,
-        text="Balcony",
-        icon="SNAP_FACE")
-def register():
-    bpy.utils.register_class(OBJECT_OT_add_balcony)
-    bpy.types.INFO_MT_mesh_add.append(add_object_button)
-def unregister():
-    bpy.utils.unregister_class(OBJECT_OT_add_balcony)
-    bpy.types.INFO_MT_mesh_add.remove(add_object_button)
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_beam_builder.py b/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_beam_builder.py
deleted file mode 100644
index a5a0114..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_beam_builder.py
+++ /dev/null
@@ -1,1477 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Beam Builder",
-    "description": "Creates various types of beams.",
-    "author": "revolt_randy",
-    "version": (0, 1, 3),
-    "blender": (2, 6, 0),
-    "location": "View3D > Add > Mesh",
-    "warning": "Currently under development.", 
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/BeamBuilder",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?func=detail&aid=26911",
-    "category": "Add Mesh"}
-
-#
-# Creates a rectangluar, 'C', 'L', 'T', or 'I' - type beam.
-#
-       
-# Version History
-#
-# v0.1 - Script only generates a multi-sided mesh object,
-#           initial release for testing. 3/12/11
-#
-# v0.1.1 - Added 'C'-type beam, updated to work with 
-#           api r35499. 3/13/11
-#
-# v0.1.2 - Totally changed the way beams are created, size
-#           is now calculated based off width, length, & height
-#           (x,y,z). Added ability to taper beams as well.
-#           Add 'L' - type beam
-#           Add 'T' - type beam
-#           Add 'I' - type beam 
-#
-# v0.1.3 - Updated to work with api r41226, including using object_utils.py -
-#           part of blender's bpy_extras scripts. This is what handles
-#           the 'align to view', 'location', & 'rotation' options in the
-#           toolshelf when creating mesh. Added wiki & tracker url. Fixed
-#           a few bugs & fixed some debug prints that were still printing
-#           to console.  
-#     
-
-import bpy
-
-from bpy_extras import object_utils
-
-
-def create_mesh (self, context, name, verts, faces, debug):
-    # Creates mesh and object
-    # name - name of object to create
-    # verts - a list of vertex tuples
-    # faces - a list of face tuples
-    # debug - debug flag - if true prints data to console
-           
-    # Actually create mesh and object
-    mesh = bpy.data.meshes.new(name)
-
-    # add verts & faces to object
-    mesh.from_pydata(verts, [], faces)
-    mesh.update(calc_edges=True)
-    
-    if debug:
-        print("create_mesh function called and finished")    
-      
-    return object_utils.object_data_add(context, mesh, operator=self)
-
-
-def recalc_normals(debug):
-    # Recalculate normals
-    # parts of this script creates faces that are backwards or
-    # have thier normals facing the wrong way, so recalculate them
-    # debug - debug flag - if true prints data to console
-    
-    
-    if bpy.context.mode != 'EDIT_MESH':
-        bpy.ops.object.editmode_toggle()
-        # Recalcuate normals
-        bpy.ops.mesh.normals_make_consistent()
-        bpy.ops.object.editmode_toggle()
-        if debug:
-            print("\nObjectMode")
-    else:
-        bpy.ops.mesh.normals_make_consistent()
-        if debug:
-            print("\nEditMode")
-            
-    return
-
-
-def create_end_faces(verts_list, thick, debug):
-    # Create End Faces
-    # verts_list - list of vertices
-    # thick - if true object is hollow, so construct loop of end faces
-    #           instead of a solid end face
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # faces - a list of tuples defining the end faces
-    
-    faces = []
-    
-    num_of_verts = len(verts_list)
-    faces_temp = []
-
-    sides = 4 # sides - number of sides to mesh *added because of code re-write
-    
-    if thick:
-        # has thickness, so build end faces            
-        num_of_verts = int(num_of_verts / 2)
-        
-        # Create a list of the front faces
-        for index in range(num_of_verts):
-            if index == (num_of_verts - 1):
-                faces_temp.append(verts_list[index])
-                faces_temp.append(verts_list[index-index])
-                faces_temp.append(verts_list[index+1])
-                faces_temp.append(verts_list[index*2+1])
-            else:
-                faces_temp.append(verts_list[index])
-                faces_temp.append(verts_list[index+1])
-                faces_temp.append(verts_list[index+num_of_verts+1])
-                faces_temp.append(verts_list[index+num_of_verts])
-                        
-            faces.append(tuple(faces_temp))
-            faces_temp = []                
-    else:
-        #this code may not be needed, depends upon rewrite...
-        if sides > 4:
-            # more than 4 sides, so replace last list item (center vert) with first list item 
-            # for looping and building faces
-            center_vert = verts_list[num_of_verts - 1]
-            verts_list[num_of_verts - 1] = verts_list[0]
-
-            for index in range(int(num_of_verts - 1)):
-                faces_temp.append(verts_list[index])
-                faces_temp.append(verts_list[index + 1])
-                faces_temp.append(center_vert)
-                faces.append(tuple(faces_temp))
-                faces_temp = []
-        
-        else:
-            # create 1 end face
-            for index in range(num_of_verts):
-                faces_temp.append(verts_list[index])
-            faces.append(tuple(faces_temp))               
-    
-    # print debug info to console
-    if debug:
-        print("\ncreate_end_faces Function Starts")
-        print("\n End Face Verts list :", verts_list)
-        print("\n End Faces: ", faces)
-        print("\ncreate_end_faces Function Ends\n\n")
-            
-    return faces
-
-
-def create_side_faces(front_verts, back_verts, debug):
-    # Create side faces - simple bridging of front_verts & back_verts vertices,
-    #                     both front_verts & back_verts must be ordered in same direction
-    #                     with respect to y-axis
-    # front_verts - a list of front face vertices
-    # back_verts - a list of back face vertices
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # new_faces - a list of tuples defining the faces bridged between front_verts & back_verts
-    
-    # Number of faces to create
-    num_of_faces = (len(front_verts))
-    new_faces = []
-    
-    # add first value to end of lists for looping
-    front_verts.append(front_verts[0])
-    back_verts.append(back_verts[0])
-    
-    # Build the new_faces list with tuples defining each face    
-    for index in range(num_of_faces):
-        facestemp = (front_verts[index], front_verts[index+1], back_verts[index+1], back_verts[index])
-        new_faces.append(facestemp)
-    
-    # print debug info to console
-    if debug:
-        print("\ncreate_side_faces Function Starts") 
-        print("\n Number of faces to create: ", num_of_faces)
-        print("\n New faces :", new_faces)
-        print("\ncreate_side_faces Function Ends\n\n")
-
-    return new_faces
-
-
-def calc_end_verts(size, y_off, thick, debug):
-    # Calculates vertex location for end of mesh
-    
-    # size - tuple of x,y,z dimensions of mesh to create
-    # y_off - y offset, lets function know where to create verts on y-axis
-    # thick - thickness, if not zero this is the thickness of a hollow mesh
-    #         with the inner faces inset from size dimensions
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # verts - a list of tuples of the x,y,z location of each vertex
-    
-    verts = []
-    
-    if debug:
-        print ("\ncalc_end_verts Function Starts\n")
-        print("\nsize = ",size)
-        print("y_off = ",y_off)
-        
-    # Create vertices by calculation 
-    x_pos = 0 + size[0]/2
-    z_pos = 0 + size[2]/2
-    verts.append((x_pos, y_off, z_pos))
-
-    x_pos = 0 - size[0]/2
-    z_pos = 0 + size[2]/2
-    verts.append((x_pos, y_off, z_pos))
-    
-    x_pos = 0 - size[0]/2
-    z_pos = 0 - size[2]/2
-    verts.append((x_pos, y_off, z_pos)) 
-    
-    x_pos = 0 + size[0]/2
-    z_pos = 0 - size[2]/2
-    verts.append((x_pos, y_off, z_pos))   
-         
-    if thick:
-        # has thickness, so calculate inside vertices
-        #### not too sure about this, but it does work the way the 
-        #### solidify modifier works, so leaving as is for now
-        x_pos = size[0] - (thick * 2)
-        z_pos = size[2] - (thick * 2)
-        size = (x_pos, y_off, z_pos)
-        
-        # Create vertices by calculation 
-        x_pos = 0 + size[0]/2
-        z_pos = 0 + size[2]/2
-        verts.append((x_pos, y_off, z_pos))
-
-        x_pos = 0 - size[0]/2
-        z_pos = 0 + size[2]/2
-        verts.append((x_pos, y_off, z_pos))
-    
-        x_pos = 0 - size[0]/2
-        z_pos = 0 - size[2]/2
-        verts.append((x_pos, y_off, z_pos)) 
-    
-        x_pos = 0 + size[0]/2
-        z_pos = 0 - size[2]/2
-        verts.append((x_pos, y_off, z_pos))          
-            
-    if debug:
-        print ("verts :", verts)
-        print ("\ncalc_end_verts Function Ends.\n\n")
-    
-    return verts
-
-
-def adjust_c_beam_verts(verts, taper, debug):
-    # Adjusts verts produced to correct c beam shape
-    # verts - a list of tuples of vertex locations for one end of beam
-    # taper - % to taper outside verts by
-    # debug - if true values are printed to console for debugging
-    
-    # returns:
-    # verts - the corrected list of tuples of the adjustec vertex locations
-    
-    # This function corrects vertex locations to properly shape the
-    # beam, because creating a c beam uses the same code as the 
-    # create_rectangular_beam function does. Therefore the 5th & 6th
-    # vertice's z location needs to be changed to match the 1st & 2nd
-    # vertice's z location.
-
-    vert_orig = verts[0]
-    
-    # get 3rd value, the z location
-    vert_z = vert_orig[2] 
-    # get 1st value, the x location, for vert taper calcs    
-    vert_x = vert_orig[0]
-  
-    # vert_z has the z value to be used in the 5th & 6th verts
-    # get value of 5th vert 
-    vert_temp = verts[4]
-    
-
-    
-    # calculate the amount of taper, updating vert_x
-    # with the new value calculated.
-    vert_x = calc_taper(vert_orig[0], vert_temp[0], taper)
-    
-    vert_new = (vert_x,vert_temp[1],vert_z)
-    
-    if debug:
-        print ("\nadjust_c_beam_verts function starting")
-        print ("vert_orig = ",vert_orig[0])
-        print ("vert_x = ",vert_x)
-        print("vert_temp =",vert_temp)
-        print("vert_new =",vert_new)
-
-    # update 5th vert with new value
-    verts[4] = vert_new
-    
-    vert_orig = verts[1]
-    
-    # get 3rd value, the z location
-    vert_z = vert_orig[2] 
-    # get 1st value, the x location, for vert taper calcs    
-    vert_x = vert_orig[0]
-    # vert_z has the z value to be used in the 5th & 6th verts
-    # get value of 5th vert 
-    vert_temp = verts[5]
-    
-
-    
-    # calculate the amount of taper, updating vert_x
-    # with the new value calculated.
-    vert_x = calc_taper(vert_orig[0], vert_temp[0], taper)
-    
-    vert_new = (vert_x,vert_temp[1],vert_z)
-    
-    if debug:
-        print ("vert_orig = ",vert_orig[0])
-        print ("vert_x = ",vert_x)
-        print("vert_temp =",vert_temp)
-        print("vert_new =",vert_new)
-    
-    # update 6th vert with new value
-    verts[5] = vert_new    
-    
-    if debug:
-        print("\n adjust_c_beam_verts function ending")
-        print("verts =", verts)
-        
-    return verts        
-
-
-def calc_taper(outer_vert, inner_vert, taper):
-    # Calculate tapered edges of beam - inner vert is moved towards
-    #    outer vert based upon percentage value in taper
-    # outer_vert - the outside vertex
-    # inner_vert - the inside vertex to be moved
-    # taper - percentage to move vert
-    
-    # returns:
-    # adjusted_vert - the calculated vertex
-
-    #print("outer_vert =",outer_vert,"inner_vert",inner_vert)
-    
-    # taper values range from 0 to 100 for UI, but for calculations
-    # this value needs to be flipped, ranging from 100 to 0
-    taper = 100 - taper
-    
-    # calcuate taper & adjust vertex
-    vert_delta = inner_vert - outer_vert
-    adjusted_vert = outer_vert + ((vert_delta/100) * taper)    
-    
-    #print("adjusted_vert =", adjusted_vert)    
-    return adjusted_vert
-
-    
-def create_rectangular_beam(size, thick, debug):
-    # Creates a rectangular beam mesh object
-    # size - tuple of x,y,z dimensions of box
-    # thick - thickness, if not zero this is the thickness of a hollow 
-    #         box with inner faces inset from size dimensions
-    # debug - if true prints values from this function to console
-    
-    # returns: 
-    # verts_final - a list of tuples of the x, y, z, location of each vertice
-    # faces_final - a list of tuples of the vertices that make up each face  
-    
-    # Create temporarylists to hold vertices locations
-    verts_front_temp=[]
-    verts_back_temp=[]
-    
-    #calculate y offset from center for front vertices
-    y_off = size[1]/2 
-      
-        
-    # Create front vertices by calculation
-    verts_front_temp = calc_end_verts(size, y_off, thick, debug)
-    
-    # re-calculate y offset from center for back vertices
-    y_off = 0 - y_off
-    
-    # Create back vertices by calculation
-    verts_back_temp = calc_end_verts(size, y_off, thick, debug)
-    
-    # Combine all vertices into a final list of tuples
-    verts_final = verts_front_temp + verts_back_temp   
-           
-    # Print debug info to console
-    if debug:
-        print("\ncreate_multi_side_box Function Start")
-        print("\n Front vertices :", verts_front_temp)
-        print("\n Back vertices:", verts_back_temp)
-        print("\n All vertices:", verts_final)
-                      
-    # Create front face
-    faces_front_temp = []
-    verts_front_list = []
-    numofverts = len(verts_front_temp)
-    
-    # Build vertex list
-    for index in range(numofverts):
-        verts_front_list.append(index)
-       
-    faces_front_temp = create_end_faces(verts_front_list, thick, debug) 
-    
-    # Create back face
-    faces_back_temp = []
-    verts_back_list = []
-    numofverts = len(verts_back_temp)
-    
-    # Build vertex list
-    for index in range(numofverts):
-        verts_back_list.append(index + len(verts_back_temp))
-        
-    faces_back_temp = create_end_faces(verts_back_list, thick, debug)
-
-    # Create side faces
-    faces_side_temp = []
-    
-    # better code needed here???
-    if thick:
-        # Object has thickness, create list of outside vertices
-        numofverts = len(verts_front_list)
-        verts_front_temp = verts_front_list[0:int(numofverts/2)]
-        verts_back_temp = verts_back_list[0:int(numofverts/2)]
-        
-        faces_side_temp = create_side_faces(verts_front_temp, verts_back_temp, debug)
-        
-        # Create list of inside vertices
-        verts_front_temp = verts_front_list[int(numofverts/2):numofverts]
-        verts_back_temp = verts_back_list[int(numofverts/2):numofverts]
-        
-        faces_side_temp += create_side_faces(verts_front_temp, verts_back_temp, debug)            
-    else:
-        # Create list of only outside faces
-        faces_side_temp = create_side_faces(verts_front_list, verts_back_list, debug)
-    
-    # Combine all faces 
-    faces_final = faces_front_temp + faces_back_temp + faces_side_temp
-    
-    # print debug info to console   
-    if debug:
-        print("\ncreate_multi_side_box Function")
-        print("\nAll faces :",faces_final)
-        print("\ncreate_multi_side_box Function Ends\n\n")
-    
-    return verts_final, faces_final
-
-
-def create_C_beam(size, thick, taper, debug):
-    # Creates a C or U shaped mesh beam object 
-    # size - tuple of x,y,z dimensions of beam
-    # thick - thickness, the amount the inner faces will be
-    #           inset from size dimensions
-    # taper - % to taper outside edges by
-    # debug - if true prints values from this function to console
-    
-    # returns: 
-    # verts_final - a list of tuples of the x, y, z, location of each vertice
-    # faces_final - a list of tuples of the vertices that make up each face
-    
-    # print debug info to console
-    if debug:
-        print ("\ncreate_C_beam - function called")
-
-    # Get y offset of vertices from center
-    y_off = size[1] / 2
-    
-    # Create temporarylists to hold vertices locations
-    verts_front_temp=[]
-    verts_back_temp=[]
-    
-    # Create front vertices by calculation
-    verts_front_temp = calc_end_verts(size, y_off, thick, debug)
-    # Additional adjustment to the verts needed - 5th & 6th verts
-    # needed because the calc_end_verts creates a rectangluar beam
-    # the insides are inset, for a U channel we need the inside
-    # verts on the open end to match the z-loc of the outside verts 
-    verts_front_temp = adjust_c_beam_verts(verts_front_temp, taper, debug)       
-    
-    # recalculate y_off for other end vertices
-    y_off = 0 - y_off
-    
-    # Create back vertices by calculation
-    verts_back_temp = calc_end_verts(size, y_off, thick, debug)
-    # Additional adjustment to the verts needed - the z location
-    verts_back_temp = adjust_c_beam_verts(verts_back_temp, taper, debug)  
-    
-    # Combine all vertices into a final list of tuples
-    verts_final = verts_front_temp + verts_back_temp   
-  
-    # Print debug info to console
-    if debug:
-        print("\ncreate_C_beam function start")
-        print("\n Front vertices :", verts_front_temp)
-        print("\n Back vertices:", verts_back_temp)
-        print("\n All vertices:", verts_final)
-    
-    # Create front face
-    faces_front_temp = []
-    verts_front_list = []
-    numofverts = len(verts_front_temp)
-    
-    # Build vertex list
-    for index in range(numofverts):
-        verts_front_list.append(index)
-    # problem area   
-    faces_front_temp = create_end_faces(verts_front_list, thick, debug) 
-    # Remove 1st face - only 3 end faces needed
-    faces_front_temp = faces_front_temp[1:4]
-        
-    # Create back face
-    faces_back_temp = []
-    verts_back_list = []
-    numofverts = len(verts_back_temp)
-    
-    # Build vertex list
-    for index in range(numofverts):
-        verts_back_list.append(index + len(verts_back_temp))
-      
-    faces_back_temp = create_end_faces(verts_back_list, thick, debug)
-    # Remove 1st face - only 3 end faces needed
-    faces_back_temp = faces_back_temp[1:4]
-
-    # Create list of outside vertices for the 3 outside faces
-    numofverts = (len(verts_front_list))
-    verts_front_temp = verts_front_list[0:int(numofverts/2)]
-    verts_back_temp = verts_back_list[0:int(numofverts/2)]
-        
-    faces_side_temp = create_side_faces(verts_front_temp, verts_back_temp, debug)
-    # create_side_faces creates 4 outside faces, we only want 3
-    # so remove the 1st face
-    faces_side_temp  = faces_side_temp[1:]
-    
-    # Create list of inside vertices for the 3 inside faces
-    verts_front_temp = verts_front_list[int(numofverts/2):numofverts]
-    verts_back_temp = verts_back_list[int(numofverts/2):numofverts]
-        
-    faces_side_temp += create_side_faces(verts_front_temp, verts_back_temp, debug)
-    # create_side_faces creates 4 outside faces, we only want 3
-    # so remove the 1st face
-    faces_side_temp  = faces_side_temp[0:3] + faces_side_temp[4:]
-    
-    # fill in top two faces
-    faces_side_temp.append((0, 4, 12, 8))
-    faces_side_temp.append((5, 1, 9, 13))    
-    
-    # Combine all faces 
-    faces_final = faces_front_temp + faces_back_temp + faces_side_temp
-
-    # Print debug info to console
-    if debug:
-        print("\ncreate_C_beam function") 
-        print("\nAll faces =", faces_final)
-        print("\ncreate_C_beam function ending")
-         
-    return verts_final, faces_final
-
-
-def create_L_beam(size, thick, taper, debug):
-    # Creates a L shaped mesh beam object
-    # size - tuple of x,y,z dimensions of beam
-    # thick - thickness, the amount the inner faces will be
-    #           inset from size dimensions
-    # taper - % to taper outside edges by
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # verts_final - a list of tuples of the x, y, z, location of each vertice
-    # faces_final - a list of tuples of the vertices that make up each face
-    
-    if debug:
-        print("\ncreate_L_beam function starting")
-
-    # Get offset of vertices from center
-    x_off = size[0] / 2
-    y_off = size[1] / 2
-    z_off = size[2] / 2
-    
-    # Create temporarylists to hold vertices locations
-    verts_front_temp=[]
-    verts_back_temp=[]
-    
-    # Create front vertices by calculation
-    verts_front_temp = [(0 - x_off, 0 - y_off, z_off), \
-        (0 - (x_off - thick), 0 - y_off, z_off), \
-        (0 - (x_off - thick), 0 - y_off, 0 - (z_off - thick)), \
-        (x_off, 0 - y_off, 0 - (z_off - thick)), \
-        (x_off, 0 - y_off, 0 - z_off), \
-        (0 - x_off, 0 - y_off, 0 - z_off)]
-    
-    # Adjust taper
-    vert_outside = verts_front_temp[0]
-    vert_inside = verts_front_temp[1]
-    verts_front_temp[1] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1],vert_inside[2]]
-   
-    vert_outside = verts_front_temp[4]
-    vert_inside = verts_front_temp[3]
-    verts_front_temp[3] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    # Create back vertices by calculation
-    verts_back_temp = [(0 - x_off, y_off, z_off), \
-        (0 - (x_off - thick), y_off, z_off), \
-        (0 - (x_off - thick), y_off, 0 - (z_off - thick)), \
-        (x_off, y_off, 0 - (z_off - thick)), \
-        (x_off, y_off, 0 - z_off), \
-        (0 - x_off, y_off, 0 - z_off)]
-
-    # Adjust taper
-    vert_outside = verts_back_temp[0]
-    vert_inside = verts_back_temp[1]
-    verts_back_temp[1] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1],vert_inside[2]]   
-    
-    vert_outside = verts_back_temp[4]
-    vert_inside = verts_back_temp[3]
-    verts_back_temp[3] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))] 
-    
-    verts_final = verts_front_temp + verts_back_temp
-    
-    if debug:
-        print("\n verts_front_temp =", verts_front_temp)
-        print("\n verts_back_temp =", verts_back_temp)
-        print("\n verts_final =", verts_final)
-    
-    # define end faces, only 4 so just coded
-    faces_front_temp = []
-    faces_back_temp = []
-    faces_side_temp = []
-    
-    faces_front_temp = [(0, 1, 2, 5), (2, 3, 4, 5)]
-    faces_back_temp = [(6, 7, 8, 11), (8, 9, 10, 11)]
-    
-    verts_front_list = []
-    verts_back_list = []
-    num_of_verts = len(verts_front_temp)
-    
-    # build lists of back and front verts for create_side_faces function
-    for index in range(num_of_verts):
-        verts_front_list.append(index)
-    for index in range(num_of_verts):
-        verts_back_list.append(index  + 6)
-    
-    faces_side_temp = create_side_faces(verts_front_list, verts_back_list, debug)
-        
-    faces_final = faces_front_temp + faces_back_temp + faces_side_temp
-    
-    if debug:
-        print("\n faces_front_temp =", faces_front_temp)
-        print("\n faces_back_temp =", faces_back_temp)
-        print("\n faces_side_temp =", faces_side_temp)
-        print("\n faces_final =", faces_final)
-        print("\ncreate_L_beam function ending")
-        
-    return verts_final, faces_final
-
-
-
-def create_T_beam(size, thick, taper, debug):
-    # Creates a T shaped mesh beam object
-    # size - tuple of x,y,z dimensions of beam
-    # thick - thickness, the amount the inner faces will be
-    #           inset from size dimensions
-    # taper - % to taper outside edges by
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # verts_final - a list of tuples of the x, y, z, location of each vertice
-    # faces_final - a list of tuples of the vertices that make up each face
-    debug = 0
-    
-    if debug:
-        print("\ncreate_T_beam function starting")
-
-    # Get offset of vertices from center
-    x_off = size[0] / 2
-    y_off = size[1] / 2
-    z_off = size[2] / 2
-    thick_off = thick / 2
-
-    # Create temporarylists to hold vertices locations
-    verts_front_temp=[]
-    verts_back_temp=[]
-    
-    # Create front vertices by calculation
-    verts_front_temp = [(0 - x_off, 0 - y_off, z_off), \
-        (0 - thick_off, 0 - y_off, z_off), \
-        (thick_off, 0 - y_off, z_off), \
-        (x_off, 0 - y_off, z_off), \
-        (x_off, 0 - y_off, z_off - thick), \
-        (thick_off, 0 - y_off, z_off - thick), \
-        (thick_off, 0 - y_off, 0 - z_off), \
-        (0 - thick_off, 0 - y_off, 0 - z_off), \
-        (0 - thick_off, 0 - y_off, z_off - thick), \
-        (0 - x_off, 0 - y_off, z_off - thick)]
-
-    # Adjust taper
-    vert_outside = verts_front_temp[0]
-    vert_inside = verts_front_temp[9]
-    verts_front_temp[9] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-
-    vert_outside = verts_front_temp[3]
-    vert_inside = verts_front_temp[4]
-    verts_front_temp[4] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]  
-
-    # Adjust taper of bottom of beam, so 0 the center
-    # now becomes vert_outside, and vert_inside is calculated
-    # 1/2 way towards center
-    vert_outside = (0, 0 - y_off, 0 - z_off)
-    vert_inside = verts_front_temp[6]
-    verts_front_temp[6] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1], vert_inside[2]]  
-
-    vert_outside = (0, 0 - y_off, 0 - z_off)
-    vert_inside = verts_front_temp[7]
-    verts_front_temp[7] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1], vert_inside[2]]
-
-    # Create fack vertices by calculation
-    verts_back_temp = [(0 - x_off, y_off, z_off), \
-        (0 - thick_off, y_off, z_off), \
-        (thick_off, y_off, z_off), \
-        (x_off, y_off, z_off), \
-        (x_off, y_off, z_off - thick), \
-        (thick_off, y_off, z_off - thick), \
-        (thick_off, y_off, 0 - z_off), \
-        (0 - thick_off, y_off, 0 - z_off), \
-        (0 - thick_off, y_off, z_off - thick), \
-        (0 - x_off, y_off, z_off - thick)]
-
-    # Adjust taper
-    vert_outside = verts_back_temp[0]
-    vert_inside = verts_back_temp[9]
-    verts_back_temp[9] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-
-    vert_outside = verts_back_temp[3]
-    vert_inside = verts_back_temp[4]
-    verts_back_temp[4] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    # Adjust taper of bottom of beam, so 0 the center
-    # now becomes vert_outside, and vert_inside is calculated
-    # 1/2 way towards center
-    vert_outside = (0, 0 - y_off, 0 - z_off)
-    vert_inside = verts_back_temp[6]
-    verts_back_temp[6] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1], vert_inside[2]]  
-
-    vert_outside = (0, 0 - y_off, 0 - z_off)
-    vert_inside = verts_back_temp[7]
-    verts_back_temp[7] = [(calc_taper(vert_outside[0], vert_inside[0], taper)), vert_inside[1], vert_inside[2]]
-        
-    verts_final = verts_front_temp + verts_back_temp
-    
-    
-    # define end faces, only 8 so just coded
-    faces_front_temp = []
-    faces_back_temp = []
-    faces_side_temp = []
-    
-    faces_front_temp = [(0, 1, 8, 9), (1, 2, 5, 8), \
-        (2, 3, 4, 5), (5, 6, 7, 8)]
-        
-    faces_back_temp = [(10, 11, 18, 19), (11, 12, 15, 18), \
-        (12, 13, 14, 15), (15, 16, 17,  18)]
-
-    verts_front_list = []
-    verts_back_list = []
-    num_of_verts = len(verts_front_temp)
-    
-    # build lists of back and front verts for create_side_faces function
-    for index in range(num_of_verts):
-        verts_front_list.append(index)
-    for index in range(num_of_verts):
-        verts_back_list.append(index  + 10)
-    
-    faces_side_temp = create_side_faces(verts_front_list, verts_back_list, debug)
-    
-    faces_final = faces_front_temp + faces_back_temp + faces_side_temp
-
-    if debug:
-        print("\ncreate_T_beam function ending")    
-        
-    return verts_final, faces_final
-
-
-def create_I_beam(size, thick, taper, debug):
-    # Creates a T shaped mesh beam object
-    # size - tuple of x,y,z dimensions of beam
-    # thick - thickness, the amount the inner faces will be
-    #           inset from size dimensions
-    # taper - % to taper outside edges by
-    # debug - if true prints values from this function to console
-    
-    # returns:
-    # verts_final - a list of tuples of the x, y, z, location of each vertice
-    # faces_final - a list of tuples of the vertices that make up each face
-    debug = 0
-    
-    if debug:
-        print("\ncreate_I_beam function starting")
-
-    # Get offset of vertices from center
-    x_off = size[0] / 2
-    y_off = size[1] / 2
-    z_off = size[2] / 2
-    thick_off = thick / 2
-
-    # Create temporarylists to hold vertices locations
-    verts_front_temp=[]
-    verts_back_temp=[]
-    
-    # Create front vertices by calculation
-    verts_front_temp = [(0 - x_off, 0 - y_off, z_off), \
-        (0 - thick_off, 0 - y_off, z_off), \
-        (thick_off, 0 - y_off, z_off), \
-        (x_off, 0 - y_off, z_off), \
-        (x_off, 0 - y_off, z_off - thick), \
-        (thick_off, 0 - y_off, z_off - thick), \
-        (thick_off, 0 - y_off, 0 - z_off + thick), \
-        (x_off, 0 - y_off, 0 - z_off + thick), \
-        (x_off, 0 - y_off, 0 - z_off), \
-        (thick_off, 0 - y_off, 0 - z_off), \
-        (0 - thick_off, 0 - y_off, 0 - z_off), \
-        (0 - x_off, 0 - y_off, 0 - z_off), \
-        (0 - x_off, 0 - y_off, 0 -z_off  + thick), \
-        (0 - thick_off, 0 - y_off, 0 - z_off + thick), \
-        (0 - thick_off, 0 - y_off, z_off - thick), \
-        (0 - x_off, 0 - y_off, z_off - thick)]
-    
-    # Adjust taper
-    vert_outside = verts_front_temp[0]
-    vert_inside = verts_front_temp[15]
-    verts_front_temp[15] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_front_temp[3]
-    vert_inside = verts_front_temp[4]
-    verts_front_temp[4] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_front_temp[8]
-    vert_inside = verts_front_temp[7]
-    verts_front_temp[7] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_front_temp[11]
-    vert_inside = verts_front_temp[12]
-    verts_front_temp[12] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-
-    # Create back vertices by calculation
-    verts_back_temp = [(0 - x_off, y_off, z_off), \
-        (0 - thick_off, y_off, z_off), \
-        (thick_off, y_off, z_off), \
-        (x_off, y_off, z_off), \
-        (x_off, y_off, z_off - thick), \
-        (thick_off, y_off, z_off - thick), \
-        (thick_off, y_off, 0 - z_off + thick), \
-        (x_off, y_off, 0 - z_off + thick), \
-        (x_off, y_off, 0 - z_off), \
-        (thick_off, y_off, 0 - z_off), \
-        (0 - thick_off, y_off, 0 - z_off), \
-        (0 - x_off, y_off, 0 - z_off), \
-        (0 - x_off, y_off, 0 -z_off  + thick), \
-        (0 - thick_off, y_off, 0 - z_off + thick), \
-        (0 - thick_off, y_off, z_off - thick), \
-        (0 - x_off, y_off, z_off - thick)]
-
-    # Adjust taper
-    vert_outside = verts_back_temp[0]
-    vert_inside = verts_back_temp[15]
-    verts_back_temp[15] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_back_temp[3]
-    vert_inside = verts_back_temp[4]
-    verts_back_temp[4] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_back_temp[8]
-    vert_inside = verts_back_temp[7]
-    verts_back_temp[7] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]
-    
-    vert_outside = verts_back_temp[11]
-    vert_inside = verts_back_temp[12]
-    verts_back_temp[12] = [vert_inside[0], vert_inside[1], (calc_taper(vert_outside[2], vert_inside[2], taper))]       
- 
-    verts_final = verts_front_temp + verts_back_temp
-
-
-# define end faces, only 7 per end, so just coded
-    faces_front_temp = []
-    faces_back_temp = []
-    faces_side_temp = []
-    
-    faces_front_temp = [(0, 1, 14, 15), (1, 2, 5, 14), \
-        (2, 3, 4, 5), (6, 7, 8, 9), \
-        (6, 9, 10, 13), (12, 13, 10, 11), \
-        (5, 6, 13, 14)]
-        
-    faces_back_temp = [(16, 17, 30, 31), (17, 18, 21, 30), \
-        (18, 19, 20, 21), (22, 23, 24, 25), \
-        (22, 25, 26, 29), (28, 29, 26, 27), \
-        (21, 22, 29, 30)]
-        
-    verts_front_list = []
-    verts_back_list = []
-    num_of_verts = len(verts_front_temp)
-    
-    # build lists of back and front verts for create_side_faces function
-    for index in range(num_of_verts):
-        verts_front_list.append(index)
-    for index in range(num_of_verts):
-        verts_back_list.append(index  + 16)
-    
-    faces_side_temp = create_side_faces(verts_front_list, verts_back_list, debug)
-    
-    faces_final = faces_front_temp + faces_back_temp + faces_side_temp   
-    
-    if debug:
-        print("\ncreate_I_beam function ending")
-    
-    return verts_final, faces_final
-
-        
-
-# Define "Add_Rectangular_Beam" operator
-########### Needs Work ###############        
-class Add_Rectangular_Beam(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_rectangle_add"
-    bl_label = "Add Rectangluar Beam"
-    bl_description = "Create a Rectangular Beam mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-        
-    mesh_z_size = bpy.props.FloatProperty(name = "Height(z)",
-        description = "Height (along the z-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 1)
-        
-    mesh_x_size = bpy.props.FloatProperty(name = "Width(x)",
-        description = "Width (along the x-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = .5)
-        
-    mesh_y_size = bpy.props.FloatProperty(name = "Length(y)",
-        description = "Length (along y-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 2)
-            
-    thick_bool = bpy.props.BoolProperty(name = "Hollow",
-        description = "Create a hollow mesh with a defined thickness",
-        default = True)
-
-    thick = bpy.props.FloatProperty(name = "Thickness",
-        description = "Thickness of hollow mesh",
-        min = 0.01,
-        max = 1,
-        default = 0.1)
-        
-    # generic transform props
-    # required by object_utils.py - part of blender's
-    # code and is what handles alignment amongst other
-    # things.
-    view_align = bpy.props.BoolProperty(
-            name="Align to View",
-            default=False
-            )
-    location = bpy.props.FloatVectorProperty(
-            name="Location",
-            subtype='TRANSLATION',
-            )
-    rotation = bpy.props.FloatVectorProperty(
-            name="Rotation",
-            subtype='EULER',
-            )
-            
-    # Define tool parameter layout
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, 'mesh_z_size')
-        layout.prop(self, 'mesh_x_size')
-        layout.prop(self, 'mesh_y_size')
-        layout.prop(self, 'thick_bool')
-        if self.thick_bool:
-            layout.prop(self, 'thick')
-        layout.prop(self, 'view_align')
-        col = layout.column()
-        col.prop(self, 'location')
-        col.prop(self, 'rotation')
-                
-    def execute(self, context):
-        # debug flag - True prints debug info to console
-        debug = 0
-        
-        size = (self.mesh_x_size, self.mesh_y_size, self.mesh_z_size)
-        if self.thick_bool is True:
-            thick = self.thick
-        else:
-            thick = 0
-                        
-        verts, faces = create_rectangular_beam(size, thick, debug)
-            
-        if debug:
-            print("\nCreated Verts:", verts)
-            print("\nCreated Faces:", faces)
-                
-        create_mesh(self, context, "Rectangular Beam", verts, faces, debug)
-        
-        recalc_normals(debug)        
-        
-        return {'FINISHED'}
-
-'''
-    def invoke(self, context, event):
-        #self.align_matrix = align_matrix(context)
-        self.execute(context)
-        return {'FINISHED'}    
-'''
-
-
-# Define "Add_C_Beam" operator        
-class Add_C_Beam(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_c_beam_add"
-    bl_label = "Add C or U Channel"
-    bl_description = "Create a C or U channel mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-        
-    mesh_z_size = bpy.props.FloatProperty(name = "Height(z)",
-        description = "Height (along the z-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 1)
-        
-    mesh_x_size = bpy.props.FloatProperty(name = "Width(x)",
-        description = "Width (along the x-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = .5)
-        
-    mesh_y_size = bpy.props.FloatProperty(name = "Length(y)",
-        description = "Length (along y-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 2)
-
-    thick = bpy.props.FloatProperty(name = "Thickness",
-        description = "Thickness of mesh",
-        min = 0.01,
-        max = 1,
-        default = 0.1)
-
-    taper = bpy.props.IntProperty(name = "Taper",
-        description = "Percentage to taper outside edges, 0 = no taper, 100 = full taper",
-        min = 0,
-        max = 100,
-        default = 0)        
-
-    type = bpy.props.BoolProperty(name = "U-shaped",
-        description = "Create the beam in a U orientation rather than the defualt C orientation", 
-        default = True)
-                
-    # generic transform props
-    # required by object_utils.py - part of blender's
-    # code and is what handles alignment amongst other
-    # things.
-    view_align = bpy.props.BoolProperty(
-            name="Align to View",
-            default=False
-            )
-    location = bpy.props.FloatVectorProperty(
-            name="Location",
-            subtype='TRANSLATION',
-            )
-    rotation = bpy.props.FloatVectorProperty(
-            name="Rotation",
-            subtype='EULER',
-            )
-
-    # Define tool parameter layout
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, 'mesh_z_size')
-        layout.prop(self, 'mesh_x_size')
-        layout.prop(self, 'mesh_y_size')
-        layout.prop(self, 'thick')
-        layout.prop(self, 'taper')
-        layout.prop(self, 'type')
-        layout.prop(self, 'view_align')
-        col = layout.column()
-        col.prop(self, 'location')
-        col.prop(self, 'rotation')
-        
-                
-    def execute(self, context):
-        # debug flag - True prints debug info to console
-        debug = 0
-        
-        # if type == true beam is U chanel, otherwise it's a C
-        if self.type:
-            size = (self.mesh_x_size, self.mesh_y_size, self.mesh_z_size)
-            mesh_name = "U Beam"
-        else:
-            size = (self.mesh_z_size, self.mesh_y_size, self.mesh_x_size)
-            mesh_name = "C Beam"
-                        
-        verts, faces = create_C_beam(size, self.thick, self.taper, debug)      
-
-        if debug:
-            print("\nCreated Verts:", verts)
-            print("\nCreated Faces:", faces)
-                
-        create_mesh(self, context, mesh_name, verts, faces, debug)
-        
-        recalc_normals(debug)
-           
-        if not self.type:
-        # C-type beam is actually created as a u-type beam
-        # so rotate 90 degrees on y-axis to make a c-type
-        # and apply rotation to reset those values
-        # if self.type is true, do nothing as beam is alreay u-type.
-        # rotation value is in radians
-            bpy.ops.transform.rotate(value=[1.570796], constraint_axis=[False, True, False])
-            bpy.ops.object.transform_apply(location=False, rotation =True, scale=False)
-        
-        return {'FINISHED'}
-
-'''
-    def invoke(self, context, event):
-        #self.align_matrix = align_matrix(context)
-        self.execute(context)
-        return {'FINISHED'}
-'''
-    
-
-# Define "Add_L_Beam" operator    
-class Add_L_Beam(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_l_beam_add"
-    bl_label = "Add L Beam"
-    bl_description = "Create a L shaped mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    mesh_z_size = bpy.props.FloatProperty(name = "Height(z)",
-        description = "Height (along the z-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 1)
-        
-    mesh_x_size = bpy.props.FloatProperty(name = "Width(x)",
-        description = "Width (along the x-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = .5)
-        
-    mesh_y_size = bpy.props.FloatProperty(name = "Length(y)",
-        description = "Length (along y-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 2)
-
-    thick = bpy.props.FloatProperty(name = "Thickness",
-        description = "Thickness of mesh",
-        min = 0.01,
-        max = 1,
-        default = 0.1)
-
-    taper = bpy.props.IntProperty(name = "Taper",
-        description = "Percentage to taper outside edges, 0 = no taper, 100 = full taper",
-        min = 0,
-        max = 100,
-        default = 0)
-
-    # generic transform props
-    # required by object_utils.py - part of blender's
-    # code and is what handles alignment amongst other
-    # things.
-    view_align = bpy.props.BoolProperty(
-            name="Align to View",
-            default=False
-            )
-    location = bpy.props.FloatVectorProperty(
-            name="Location",
-            subtype='TRANSLATION',
-            )
-    rotation = bpy.props.FloatVectorProperty(
-            name="Rotation",
-            subtype='EULER',
-            )
-
-    # Define tool parameter layout
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, 'mesh_z_size')
-        layout.prop(self, 'mesh_x_size')
-        layout.prop(self, 'mesh_y_size')
-        layout.prop(self, 'thick')
-        layout.prop(self, 'taper')
-        layout.prop(self, 'view_align')
-        col = layout.column()
-        col.prop(self, 'location')
-        col.prop(self, 'rotation')
-        
-
-    def execute(self, context):
-        # debug flag - True prints debug info to console
-        debug = 0 
-        
-        size = (self.mesh_x_size, self.mesh_y_size, self.mesh_z_size)
-                           
-        verts, faces = create_L_beam(size, self.thick, self.taper, debug)
-        
-        if debug:
-            print("\nCreated Verts:", verts)
-            print("\nCreated Faces:", faces)
-                
-        create_mesh(self, context, "L Beam", verts, faces, debug)
-        
-        recalc_normals(debug) 
-        
-        return {'FINISHED'}
-
-'''
-    def invoke(self, context, event):
-        self.align_matrix = align_matrix(context)
-        self.execute(context)
-        return {'FINISHED'}
-'''
-    
-    
-# Define "Add_T_Beam" operator    
-class Add_T_Beam(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_t_beam_add"
-    bl_label = "Add T Beam"
-    bl_description = "Create a T shaped mesh"
-    bl_options = {'REGISTER', 'UNDO'}    
-
-    mesh_z_size = bpy.props.FloatProperty(name = "Height(z)",
-        description = "Height (along the z-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 1)
-        
-    mesh_x_size = bpy.props.FloatProperty(name = "Width(x)",
-        description = "Width (along the x-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = .5)
-        
-    mesh_y_size = bpy.props.FloatProperty(name = "Length(y)",
-        description = "Length (along y-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 2)
-
-    thick = bpy.props.FloatProperty(name = "Thickness",
-        description = "Thickness of mesh",
-        min = 0.01,
-        max = 1,
-        default = 0.1)
-
-    taper = bpy.props.IntProperty(name = "Taper",
-        description = "Percentage to taper outside edges, 0 = no taper, 100 = full taper",
-        min = 0,
-        max = 100,
-        default = 0)
-
-    # generic transform props
-    # required by object_utils.py - part of blender's
-    # code and is what handles alignment amongst other
-    # things.
-    view_align = bpy.props.BoolProperty(
-            name="Align to View",
-            default=False
-            )
-    location = bpy.props.FloatVectorProperty(
-            name="Location",
-            subtype='TRANSLATION',
-            )
-    rotation = bpy.props.FloatVectorProperty(
-            name="Rotation",
-            subtype='EULER',
-            )
-
-    # Define tool parameter layout
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, 'mesh_z_size')
-        layout.prop(self, 'mesh_x_size')
-        layout.prop(self, 'mesh_y_size')
-        layout.prop(self, 'thick')
-        layout.prop(self, 'taper')
-        layout.prop(self, 'view_align')
-        col = layout.column()
-        col.prop(self, 'location')
-        col.prop(self, 'rotation')
-
-
-    def execute(self, context):
-        # debug flag - True prints debug info to console
-        debug = 0
-        
-        size = (self.mesh_x_size, self.mesh_y_size, self.mesh_z_size)
-                           
-        verts, faces = create_T_beam(size, self.thick, self.taper, debug)
-        
-        if debug:
-            print("\nCreated Verts:", verts)
-            print("\nCreated Faces:", faces)
-                
-        create_mesh(self, context, "T Beam", verts, faces, debug)
-        
-        recalc_normals(debug) 
-        
-        return {'FINISHED'}
-
-'''
-    def invoke(self, context, event):
-        self.align_matrix = align_matrix(context)
-        self.execute(context)
-        return {'FINISHED'}
-'''
-    
-    
-# Define "Add_I_Beam" operator    
-class Add_I_Beam(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_i_beam_add"
-    bl_label = "Add I Beam"
-    bl_description = "Create a I shaped mesh"
-    bl_options = {'REGISTER', 'UNDO'}    
-
-    mesh_z_size = bpy.props.FloatProperty(name = "Height(z)",
-        description = "Height (along the z-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 1)
-        
-    mesh_x_size = bpy.props.FloatProperty(name = "Width(x)",
-        description = "Width (along the x-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = .5)
-        
-    mesh_y_size = bpy.props.FloatProperty(name = "Length(y)",
-        description = "Length (along y-axis) of mesh",
-        min = 0.01,
-        max = 100,
-        default = 2)
-
-    thick = bpy.props.FloatProperty(name = "Thickness",
-        description = "Thickness of mesh",
-        min = 0.01,
-        max = 1,
-        default = 0.1)
-
-    taper = bpy.props.IntProperty(name = "Taper",
-        description = "Percentage to taper outside edges, 0 = no taper, 100 = full taper",
-        min = 0,
-        max = 100,
-        default = 0)
-
-    # generic transform props
-    # required by object_utils.py - part of blender's
-    # code and is what handles alignment amongst other
-    # things.
-    view_align = bpy.props.BoolProperty(
-            name="Align to View",
-            default=False
-            )
-    location = bpy.props.FloatVectorProperty(
-            name="Location",
-            subtype='TRANSLATION',
-            )
-    rotation = bpy.props.FloatVectorProperty(
-            name="Rotation",
-            subtype='EULER',
-            )
-    
-    # Define tool parameter layout
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, 'mesh_z_size')
-        layout.prop(self, 'mesh_x_size')
-        layout.prop(self, 'mesh_y_size')
-        layout.prop(self, 'thick')
-        layout.prop(self, 'taper')
-        layout.prop(self, 'view_align')
-        col = layout.column()
-        col.prop(self, 'location')
-        col.prop(self, 'rotation')
-        
-
-    def execute(self, context):
-        # debug flag - True prints debug info to console
-        debug = 0
-        
-        size = (self.mesh_x_size, self.mesh_y_size, self.mesh_z_size)
-                           
-        verts, faces = create_I_beam(size, self.thick, self.taper, debug)
-        
-        if debug:
-            print("\nCreated Verts:", verts)
-            print("\nCreated Faces:", faces)
-                
-        create_mesh(self, context, "I Beam", verts, faces, debug)
-        
-        recalc_normals(debug) 
-        
-        return {'FINISHED'}
-
-
-'''
-    def invoke(self, context, event):
-        self.align_matrix = align_matrix(context)
-        self.execute(context)
-        return {'FINISHED'}    
-'''
-
-
-# Register all operators and define menus
-
-class INFO_MT_mesh_beambuilder_add(bpy.types.Menu):
-    # Define the "Beam Builder" menu
-    bl_idname = "INFO_MT_mesh_beambuilder_add"
-    bl_label = "Beam Builder"
-    
-    def draw(self, context):
-        layout = self.layout  
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("mesh.primitive_rectangle_add", text = "Rectangluar Beam")  
-        layout.operator("mesh.primitive_c_beam_add", text = "C or U Channel")
-        layout.operator("mesh.primitive_l_beam_add", text = "L Shaped Beam")
-        layout.operator("mesh.primitive_t_beam_add", text = "T Shaped Beam")
-        layout.operator("mesh.primitive_i_beam_add", text = "I Shaped Beam")
-        
-        
-    
-# Define menu    
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_mesh_beambuilder_add", icon='PLUGIN')
-
-
-# Add     
-def register():
-    bpy.utils.register_module(__name__)
-    
-    # Add BeamBuilder menu to the 'Add Mesh' menu
-    bpy.types.INFO_MT_mesh_add.append(menu_func)
-
- 
-# Remove 
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    
-    # Remove BeamBuilder menu from 'Add Mesh' menu
-    bpy.types.INFO_MT_mesh_add.remove(menu_func)
-
- 
-if __name__ == "__main__":
-    register() 
-     
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_sove.py b/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_sove.py
deleted file mode 100644
index 6f2629a..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_sove.py
+++ /dev/null
@@ -1,222 +0,0 @@
-'''bl_info = {
-    "name": "Sove",
-    "author": "SayPRODUCTIONS",
-    "version": (1, 0),
-    "blender": (2, 5, 9),
-    "api": 33333,
-    "location": "View3D > Add > Mesh > Say3D",
-    "description": "Sove Framema",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Add Mesh"}
-	'''
-import bpy
-from bpy.props import *
-from bpy_extras.object_utils import object_data_add
-from mathutils import Vector
-import operator
-from math import pi, sin, cos, sqrt, atan
-
-def MSVE():
-    if 'Sove' not in bpy.data.materials:
-        mtl=bpy.data.materials.new('Sove')
-        mtl.diffuse_color     = (0.44,0.52,0.64)
-        mtl.diffuse_shader    = 'LAMBERT' 
-        mtl.diffuse_intensity = 1.0 
-    else:
-        mtl=bpy.data.materials['Sove']
-    return mtl
-def Prs(self,v1,v2,v3,v4,v5,v6,v7,v8,v9,fg,fh,fd,
-        f0,f1,f2,f3,f4,f5,f6,f7,f8,f9):
-    self.gen=v1;self.knr=v2;self.yuk=v3
-    self.alt=v4;self.ust=v5;self.sdr=v6
-    self.pdr=v7;self.dh =v8;self.dr =v9
-    self.fg =fg;self.fh =fh;self.fd =fd
-    self.f0 =f0;self.f1 =f1;self.f2 =f2;self.f3=f3;self.f4=f4
-    self.f5 =f5;self.f6 =f6;self.f7 =f7;self.f8=f8;self.f9=f9
-def add_object(self, context):
-    fc=[];vr=[]
-    mx =self.gen/200;my =self.yuk/100;k1=self.knr/100;dh=self.dh/100;fd=self.fd/100;fh=self.fh/100
-    alt=self.alt/100;ust=my-self.ust/100;drn=-self.sdr/100;pdr=self.pdr/100
-    vr.append([-mx-k1,  0,  0]);vr.append([ mx+k1,  0,  0]);vr.append([ mx+k1,  0, my]);vr.append([-mx-k1,  0, my])
-    vr.append([-mx,   pdr,alt]);vr.append([ mx,   pdr,alt]);vr.append([ mx,   pdr,ust]);vr.append([-mx,   pdr,ust])
-    vr.append([-mx-k1,drn,  0]);vr.append([ mx+k1,drn,  0]);vr.append([ mx+k1,drn, my]);vr.append([-mx-k1,drn, my])
-    vr.append([-mx,   drn,alt]);vr.append([ mx,   drn,alt]);vr.append([ mx,   drn,ust]);vr.append([-mx,   drn,ust])
-    fc.append([ 8, 0, 1, 9]);fc.append([ 8, 9,13,12])
-    fc.append([12,13, 5, 4]);fc.append([11,10, 2, 3])
-    if self.fg==0:
-        fc.append([ 0, 8,11, 3]);fc.append([ 8,12,15,11]);fc.append([12, 4, 7,15])
-        fc.append([ 5,13,14, 6]);fc.append([13, 9,10,14]);fc.append([ 9, 1, 2,10])
-    else:
-        fc.append([11, 3,16,17]);fc.append([15,11,17,18]);fc.append([ 7,15,18,24])
-        fc.append([25,19,14, 6]);fc.append([19,20,10,14]);fc.append([20,21, 2,10])
-        ou=self.fg*12
-        fc.append([4,7,12+ou,24+ou]);fc.append([6,5,25+ou,13+ou])
-    z=my
-    for i in range(self.fg):
-        if i==0:z-=self.f0/100
-        if i==1:z-=self.f1/100
-        if i==2:z-=self.f2/100
-        if i==3:z-=self.f3/100
-        if i==4:z-=self.f4/100
-        if i==5:z-=self.f5/100
-        if i==6:z-=self.f6/100
-        if i==7:z-=self.f7/100
-        if i==8:z-=self.f8/100
-        if i==9:z-=self.f9/100
-        vr.append([   -mx-k1,     0,z]);vr.append([   -mx-k1,   drn,z]);vr.append([     -mx,   drn,z])
-        vr.append([       mx,   drn,z]);vr.append([    mx+k1,   drn,z]);vr.append([   mx+k1,     0,z])
-        vr.append([-mx-k1+fd,     0,z]);vr.append([-mx-k1+fd,drn+fd,z]);vr.append([     -mx,drn+fd,z])
-        vr.append([       mx,drn+fd,z]);vr.append([ mx+k1-fd,drn+fd,z]);vr.append([mx+k1-fd,     0,z])
-        z-=fh
-        vr.append([   -mx-k1,     0,z]);vr.append([   -mx-k1,   drn,z]);vr.append([     -mx,   drn,z])
-        vr.append([       mx,   drn,z]);vr.append([    mx+k1,   drn,z]);vr.append([   mx+k1,     0,z])
-        vr.append([-mx-k1+fd,     0,z]);vr.append([-mx-k1+fd,drn+fd,z]);vr.append([     -mx,drn+fd,z])
-        vr.append([       mx,drn+fd,z]);vr.append([ mx+k1-fd,drn+fd,z]);vr.append([mx+k1-fd,     0,z])
-        n=len(vr)
-        fc.append([n- 1,n- 2,n- 8,n- 7]);fc.append([n- 3,n- 9,n- 8,n- 2]);fc.append([n- 2,n- 1,n-13,n-14])
-        fc.append([n- 3,n- 2,n-14,n-15]);fc.append([n-15,n-14,n-20,n-21]);fc.append([n-14,n-13,n-19,n-20])
-        fc.append([n- 4,n- 5,n-11,n-10]);fc.append([n- 5,n- 6,n-12,n-11]);fc.append([n- 5,n- 4,n-16,n-17])
-        fc.append([n- 6,n- 5,n-17,n-18]);fc.append([n-24,n-18,n-17,n-23]);fc.append([n-23,n-17,n-16,n-22])
-        if self.fg>1:
-            if self.fg%2==0:
-                if i < self.fg/2:fc.append([7,n-16,n-4]);fc.append([6,n-3,n-15])
-                if i+1<self.fg/2:fc.append([7,n- 4,n+8]);fc.append([6,n+9,n- 3])
-                if i+1>self.fg/2:fc.append([4,n-16,n-4]);fc.append([5,n-3,n-15])
-                if i+1>self.fg/2 and i+1<self.fg:fc.append([4,n-4,n+8]);fc.append([5,n+9,n-3])
-            else:
-                if i<self.fg//2:
-                    fc.append([7,n-16,n-4]);fc.append([6,n-3,n-15])
-                    fc.append([7,n- 4,n+8]);fc.append([6,n+9,n- 3])
-                if i > self.fg//2:fc.append([4,n-16,n-4]);fc.append([5,n-3,n-15])
-                if i+1>self.fg//2 and i+1<self.fg:fc.append([4,n- 4,n+8]);fc.append([5,n+9,n-3])
-        if i<self.fg-1 and self.fg>1:
-            fc.append([n- 7,n- 8,n+4,n+5]);fc.append([n- 8,n- 9,n+3,n+4]);fc.append([n-9,n- 3,n+9,n+3])
-            fc.append([n-10,n-11,n+1,n+2]);fc.append([n-11,n-12, n ,n+1]);fc.append([n-4,n-10,n+2,n+8])
-        if i==self.fg-1:
-            fc.append([0, 8,n-11,n-12]);fc.append([ 8,12,n-10,n-11]);fc.append([12,4,n-4,n-10])
-            fc.append([5,13,n- 9,n- 3]);fc.append([13, 9,n- 8,n- 9]);fc.append([ 9,1,n-7,n- 8])
-    SM=[]
-    #Duz----------------
-    if self.dr==False:
-        fc.append([14,10,11,15]);fc.append([6,14,15,7])
-    #Yuvarlak-----------
-    else:        
-        if dh>mx:dh=mx;self.dh=mx*100
-        vr[ 6][2]-=dh;vr[ 7][2]-=dh
-        vr[14][2]-=dh;vr[15][2]-=dh
-        O=mx/dh
-        H1=sqrt(mx**2+dh**2)/2
-        H2=H1*O
-        R=sqrt(H1**2+H2**2)
-        M=ust-R
-        A=pi-atan(O)*2
-        for a in range(1,24):
-            p=(a*A/12)+(pi*1.5)-A
-            vr.append([cos(p)*R,pdr,M-sin(p)*R])
-            vr.append([cos(p)*R,drn,M-sin(p)*R])
-            n=len(vr)
-            if a==1:
-                fc.append([n-1,15,7,n-2])
-                SM.append(len(fc))
-                fc.append([15,n-1,11])
-            elif a<23:
-                fc.append([n-1,n-3,n-4,n-2])
-                SM.append(len(fc))
-                if a<13:   fc.append([n-3,n-1,11])
-                elif a==13:fc.append([n-3,n-1,10,11])
-                else:      fc.append([n-3,n-1,10])
-            elif a==23:
-                fc.append([n-1,n-3,n-4,n-2])
-                SM.append(len(fc))
-                fc.append([n-3,n-1,10])
-                fc.append([14,n-1,n-2,6])
-                SM.append(len(fc))
-                fc.append([n-1,14,10])
-#OBJE -----------------------------------------------------------
-    mesh = bpy.data.meshes.new(name='Sove')
-    bpy.data.objects.new('Sove', mesh)
-    mesh.from_pydata(vr,[],fc)
- #   for i in SM:
- #       mesh.faces[i-1].shade_smooth()
-    mesh.materials.append(MSVE())
-    mesh.update(calc_edges=True)
-    object_data_add(context, mesh, operator=None)
-    if bpy.context.mode != 'EDIT_MESH':
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.editmode_toggle()
-#----------------------------------------------------------------
-class OBJECT_OT_add_object(bpy.types.Operator):
-    bl_idname = "mesh.add_say3d_sove"
-    bl_label = "Sove"
-    bl_description = "Sove Frame"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    prs = EnumProperty(items = (("1","PENCERE 200",""),
-                                ("2","PENCERE 180",""),
-                                ("3","PENCERE 160","")),
-                                name="",description="")
-    son=prs
-    gen=IntProperty(name='Width', min=1,max= 400,default=200,description='Width')
-    knr=IntProperty(name='Thickness', min=1,max= 100,default= 15,description='Thickness')
-    yuk=IntProperty(name='Elevation',min=1,max=3000,default=590,description='Elevation')
-    alt=IntProperty(name='Old Spacing',      min=1,max= 300,default= 44,description='Old Spacing')
-    ust=IntProperty(name='Top margin',      min=1,max= 300,default= 33,description='Top margin')
-    sdr=IntProperty(name='Jamb', min=1,max= 100,default= 15,description='jamb Depth')
-    pdr=IntProperty(name='Wall Thickness',    min=0,max= 100,default= 20,description='Wall Thickness')
-    dh =IntProperty(name='',         min=1,max= 200,default= 30,description='Height')
-    dr=BoolProperty(name='Rounded', default=True,  description='Rounded')
-
-    fg =IntProperty(name='Gap',min=0,max=10,default=1,description='Gap')
-    fh =IntProperty(name='',    min=1,max=10,default=3,description='Height')
-    fd =IntProperty(name='',    min=1,max=10,default=2,description='Depth')
-
-    f0 =IntProperty(name='Interval',min=1,max=3000,default=90,description='Interval')
-    f1 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f2 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f3 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f4 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f5 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f6 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f7 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f8 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    f9 =IntProperty(name='Interval',min=1,max=3000,default=30,description='Interval')
-    #--------------------------------------------------------------
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'prs')
-        box=layout.box()
-        box.prop(self,'gen');box.prop(self,'yuk')
-        box.prop(self,'knr')
-        row=box.row();row.prop(self,'alt');row.prop(self,'ust')
-        row=box.row();row.prop(self,'sdr');row.prop(self,'pdr')
-        row=box.row();row.prop(self, 'dr');row.prop(self, 'dh')
-        box=layout.box()
-        box.prop(self,'fg')
-        row=box.row();row.prop(self, 'fh');row.prop(self, 'fd')
-        for i in range(self.fg):
-            box.prop(self,'f'+str(i))
-            
-    def execute(self, context):
-        if self.son!=self.prs:
-            if self.prs=='1':Prs(self,200,15,590,44,33,15,20,30,True,1,2,3,90,30,30,30,30,30,30,30,30,30)
-            if self.prs=='2':Prs(self,180,15,590,44,33,15,20,30,True,1,2,3,90,30,30,30,30,30,30,30,30,30)
-            if self.prs=='3':Prs(self,160,15,590,44,33,15,20,30,True,1,2,3,90,30,30,30,30,30,30,30,30,30)
-            self.son=self.prs
-        add_object(self, context)
-        return {'FINISHED'}
-# Reg--------------------------------
-def add_object_button(self, context):
-    self.layout.operator(
-        OBJECT_OT_add_object.bl_idname,
-        text="Sove",
-        icon="MOD_MESHDEFORM")
-def register():
-    bpy.utils.register_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_mesh_add.append(add_object_button)
-def unregister():
-    bpy.utils.unregister_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_mesh_add.remove(add_object_button)
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_window.py b/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_window.py
deleted file mode 100644
index 51dc0d3..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/add_mesh_window.py
+++ /dev/null
@@ -1,764 +0,0 @@
-bl_info = {
-    "name": "Window Generator 2",
-    "author": "SayPRODUCTIONS",
-    "version": (2, 0),
-    "blender": (2, 6, 3),
-    "api": 33333,
-    "location": "View3D > Add > Mesh > Say3D",
-    "description": "Window Generator 2",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Add Mesh"}
-import bpy
-from bpy.props import *
-from math import pi, sin, cos, sqrt
-def MAT(AD,R,G,B):
-    if AD not in bpy.data.materials:
-        mtl=bpy.data.materials.new(AD)
-        mtl.diffuse_color     = ([R,G,B])
-        mtl.diffuse_shader    = 'LAMBERT'
-        mtl.diffuse_intensity = 1.0
-    else:
-        mtl=bpy.data.materials[AD]
-    return mtl
-def Fitil(vr,fc,X,Z,x,y,z,zz,xx):
-    k3=z*2
-    vr.extend([[X[x  ]+xx,-z+zz,Z[y  ]+xx],[X[x  ]+xx+k3,-z+zz,Z[y  ]+xx+k3],[X[x  ]+xx+k3,z+zz,Z[y  ]+xx+k3],[X[x  ]+xx,z+zz,Z[y  ]+xx]])
-    vr.extend([[X[x  ]+xx,-z+zz,Z[y+1]-xx],[X[x  ]+xx+k3,-z+zz,Z[y+1]-xx-k3],[X[x  ]+xx+k3,z+zz,Z[y+1]-xx-k3],[X[x  ]+xx,z+zz,Z[y+1]-xx]])
-    vr.extend([[X[x+1]-xx,-z+zz,Z[y+1]-xx],[X[x+1]-xx-k3,-z+zz,Z[y+1]-xx-k3],[X[x+1]-xx-k3,z+zz,Z[y+1]-xx-k3],[X[x+1]-xx,z+zz,Z[y+1]-xx]])
-    vr.extend([[X[x+1]-xx,-z+zz,Z[y  ]+xx],[X[x+1]-xx-k3,-z+zz,Z[y  ]+xx+k3],[X[x+1]-xx-k3,z+zz,Z[y  ]+xx+k3],[X[x+1]-xx,z+zz,Z[y  ]+xx]])
-    n=len(vr)
-    fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10]])
-    fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6]])
-    fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2]])
-    fc.extend([[n- 4,n- 3,n-15,n-16],[n- 3,n- 2,n-14,n-15],[n- 2,n- 1,n-13,n-14]])
-    z=0.005
-    vr.extend([[X[x]+xx+k3,-z+zz,Z[y]+xx+k3],[X[x]+xx+k3,-z+zz,Z[y+1]-xx-k3],[X[x+1]-xx-k3,-z+zz,Z[y+1]-xx-k3],[X[x+1]-xx-k3,-z+zz,Z[y]+xx+k3]])
-    vr.extend([[X[x]+xx+k3, z+zz,Z[y]+xx+k3],[X[x]+xx+k3, z+zz,Z[y+1]-xx-k3],[X[x+1]-xx-k3, z+zz,Z[y+1]-xx-k3],[X[x+1]-xx-k3, z+zz,Z[y]+xx+k3]])
-    fc.extend([[n+1,n+0,n+3,n+2],[n+4,n+5,n+6,n+7]])
-def Kapak(vr,fc,X,Z,x,y,z,zz):
-    k2=z*2
-    vr.extend([[X[x  ],-z+zz,Z[y  ]],[X[x  ]+k2,-z+zz,Z[y  ]+k2],[X[x  ]+k2,z+zz,Z[y  ]+k2],[X[x  ],z+zz,Z[y  ]]])
-    vr.extend([[X[x  ],-z+zz,Z[y+1]],[X[x  ]+k2,-z+zz,Z[y+1]-k2],[X[x  ]+k2,z+zz,Z[y+1]-k2],[X[x  ],z+zz,Z[y+1]]])
-    vr.extend([[X[x+1],-z+zz,Z[y+1]],[X[x+1]-k2,-z+zz,Z[y+1]-k2],[X[x+1]-k2,z+zz,Z[y+1]-k2],[X[x+1],z+zz,Z[y+1]]])
-    vr.extend([[X[x+1],-z+zz,Z[y  ]],[X[x+1]-k2,-z+zz,Z[y  ]+k2],[X[x+1]-k2,z+zz,Z[y  ]+k2],[X[x+1],z+zz,Z[y  ]]])
-    n=len(vr)
-    fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10],[n-13,n-16,n-12,n- 9]])
-    fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6],[n- 9,n-12,n- 8,n- 5]])
-    fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2],[n- 5,n- 8,n- 4,n- 1]])
-    fc.extend([[n- 4,n- 3,n-15,n-16],[n- 3,n- 2,n-14,n-15],[n- 2,n- 1,n-13,n-14],[n- 1,n- 4,n-16,n-13]])
-def Prs(s):
-    if  s.prs=='1':
-        s.gen=3;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=190;s.mr=True
-        s.gnx0=  60;s.gnx1=  110;s.gnx2=  60
-        s.k00 =True;s.k01 =False;s.k02 =True
-    if  s.prs=='2':
-        s.gen=3;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=190;s.mr=True
-        s.gnx0=  60;s.gnx1=   60;s.gnx2=  60
-        s.k00 =True;s.k01 =False;s.k02 =True
-    if  s.prs=='3':
-        s.gen=3;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=190;s.mr=True
-        s.gnx0=  55;s.gnx1=   50;s.gnx2=  55
-        s.k00 =True;s.k01 =False;s.k02 =True
-    if  s.prs=='4':
-        s.gen=3;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=150;s.mr=True
-        s.gnx0=  55;s.gnx1=   50;s.gnx2=  55
-        s.k00 =True;s.k01 =False;s.k02 =True
-    if  s.prs=='5':
-        s.gen=3;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=150;s.mr=True
-        s.gnx0=  50;s.gnx1=   40;s.gnx2=  50
-        s.k00 =True;s.k01 =False;s.k02 =True
-    if  s.prs=='6':
-        s.gen=1;s.yuk=1;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=40;s.mr=True
-        s.gnx0=40
-        s.k00 =False
-    if  s.prs=='7':
-        s.gen=1;s.yuk=2;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=195;s.gny1=40
-        s.gnx0=70
-        s.k00 =True;s.k10 =False
-        s.mr=False
-    if  s.prs=='8':
-        s.gen=1;s.yuk=2;s.kl1=5;s.kl2=5;s.fk=2
-        s.gny0=180;s.gny1=35
-        s.gnx0=70
-        s.k00 =True;s.k10 =False
-        s.mr=False
-def add_object(self, context):
-    fc=[];vr=[];kx=[]
-    mx=self.gen;my=self.yuk;k1=self.kl1/100;y=my*4+4;k2=self.kl2/100;k3=self.fk/200;fr=(k1+k2)*0.5-0.01
-    RES=self.RES
-
-    u=self.kl1/100;X=[0,round(u,2)]
-    if mx> 0:u+=self.gnx0 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 1:u+=self.gnx1 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 2:u+=self.gnx2 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 3:u+=self.gnx3 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 4:u+=self.gnx4 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 5:u+=self.gnx5 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 6:u+=self.gnx6 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    if mx> 7:u+=self.gnx7 /100;X.append(round(u,2));u+=k2;X.append(round(u,2))
-    X[-1]=X[-2]+k1
-
-    u=self.kl1/100;Z=[0,round(u,2)]
-    if my> 0:u+=self.gny0 /100;Z.append(round(u,2));u+=k2;Z.append(round(u,2))
-    if my> 1:u+=self.gny1 /100;Z.append(round(u,2));u+=k2;Z.append(round(u,2))
-    if my> 2:u+=self.gny2 /100;Z.append(round(u,2));u+=k2;Z.append(round(u,2))
-    if my> 3:u+=self.gny3 /100;Z.append(round(u,2));u+=k2;Z.append(round(u,2))
-    if my> 4:u+=self.gny4 /100;Z.append(round(u,2));u+=k2;Z.append(round(u,2))
-    Z[-1]=Z[-2]+k1
-
-    u = X[-1]/2
-    for i in range(0,len(X)):X[i]-=u
-    kx=[[self.k00,self.k10,self.k20,self.k30,self.k40],
-        [self.k01,self.k11,self.k21,self.k31,self.k41],
-        [self.k02,self.k12,self.k22,self.k32,self.k42],
-        [self.k03,self.k13,self.k23,self.k33,self.k43],
-        [self.k04,self.k14,self.k24,self.k34,self.k44],
-        [self.k05,self.k15,self.k25,self.k35,self.k45],
-        [self.k06,self.k16,self.k26,self.k36,self.k46],
-        [self.k07,self.k17,self.k27,self.k37,self.k47]]
-    cam=[];mer=[];ftl=[];SM=[]
-#VERTICES ------------------------
-    vr.extend([[X[0],-k1/2,Z[0]],[X[0],k1/2,Z[0]]])
-    for x in range(1,len(X)-1):vr.extend([[X[x],-k1/2,Z[1]],[X[x], k1/2,Z[1]]])
-    vr.extend([[X[-1],-k1/2,Z[0]],[X[-1], k1/2,Z[0]]])
-    for z in range(2,len(Z)-2,2):
-        for x in range(0,len(X)):vr.extend([[X[x],-k1/2,Z[z]],[X[x], k1/2,Z[z]]])
-        for x in range(0,len(X)):vr.extend([[X[x],-k1/2,Z[z+1]],[X[x], k1/2,Z[z+1]]])
-    z=len(Z)-2
-    vr.extend([[X[0],-k1/2,Z[z+1]],[X[0], k1/2,Z[z+1]]])
-    ALT=[];UST=[len(vr)-2,len(vr)-1]
-    for x in range(1,len(X)-1):
-        vr.extend([[X[x],-k1/2,Z[z]],[X[x], k1/2,Z[z]]])
-        ALT.extend([len(vr)-2,len(vr)-1])
-    vr.extend([[X[-1],-k1/2,Z[z+1]],[X[-1],k1/2,Z[z+1]]])
-    SON=[len(vr)-2,len(vr)-1]
-#FACES ---------------------------
-    fc.append([0,1,3+mx*4,2+mx*4])
-    FB=[0];FR=[1]
-    for i in range(0,mx*4,4):
-        fc.append([i+3,i+2,i+4,i+5])
-        FB.extend([i+2,i+4])
-        FR.extend([i+3,i+5])
-    FR.append(3+mx*4);FB.append(2+mx*4)
-    FB.reverse()
-    fc.extend([FB,FR])
-    #Yatay
-    Y=(mx*4+4);V=mx*4+2
-    for z in range(0,(my-1)*Y*2,Y*2):
-        fc.extend([[z+Y+1,z+Y,z+Y+4+mx*4,z+Y+5+mx*4],[z+Y+V,z+Y+V+1,z+Y+V+5+mx*4,z+Y+V+4+mx*4]])
-        for i in range(0,mx*4+2,2):fc.extend([[z+i+Y+0,z+i+Y+2,z+i+Y+V+4,z+i+Y+V+2],[z+i+Y  +3,z+i+Y  +1,z+i+Y+V+3,z+i+Y+V+5]])
-        for i in range(0,mx*4-3,4):fc.extend([[z+i+Y+2,z+i+Y+3,z+i+Y  +5,z+i+Y  +4],[z+i+Y+V+5,z+i+Y+V+4,z+i+Y+V+6,z+i+Y+V+7]])
-    #Dikey
-    for Y in range(0,my):    
-        z=Y*(mx*4+4)*2
-        for i in range(0,mx*4+2,4):fc.extend([[z+i+1,z+i+0,z+i+V+2,z+i+V+3],[z+i+3,z+i+1,z+i+V+3,z+i+V+5],[z+i+2,z+i+3,z+i+V+5,z+i+V+4],[z+i+0,z+i+2,z+i+V+4,z+i+V+2]])
-    #Fitil-------------------
-    if self.UST=='1':y1=my
-    else:            y1=my-1
-    for y in range(0,y1):
-        for x in range(0,mx):
-            if  kx[x][y]==True:
-                Kapak(vr,fc,X,Z,x*2+1,y*2+1,k2/2,(k1+k2)*0.5-0.01)
-                Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,(k1+k2)*0.5-0.01,k2)
-            else:
-                Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,0,0)
-            m=len(fc);cam.extend([m-1,m-2])
-            ftl.extend([m-3,m-4,m-5,m-6,m-7,m-8,m-9,m-10,m-11,m-12,m-13,m-14])
-    #-----------------------------------------------------
-    if  self.UST=='1':#Duz
-        fc.append([UST[1],UST[0],SON[0],SON[1]])
-        for i in range(0,mx*4,4):
-            fc.append([ALT[i],ALT[i+1],ALT[i+3],ALT[i+2]])
-        ON=[UST[0]]
-        AR=[UST[1]]
-        for i in range(0,len(ALT)-1,2):
-            ON.append(ALT[i  ])
-            AR.append(ALT[i+1])
-        ON.append(SON[0])
-        fc.append(ON)
-        AR.append(SON[1])
-        AR.reverse();fc.append(AR)
-    elif self.UST=='2':#Yay
-        if   self.DT2=='1':
-            H=self.VL1/100
-            if   H<0.01:H=  0.01;self.VL1=1
-            elif H >= u:H=u-0.01;self.VL1=H*100
-            h=sqrt(u**2+H**2)/2
-            e=h*(u/H)
-            C=sqrt(h**2+e**2)
-            T1=Z[-1]-H
-        elif self.DT2=='2':
-            C=self.VL2/100
-            if  C<u+0.01:
-                C=u+0.01
-                self.VL2=C*100
-            T1=sqrt(C**2-u**2)+Z[-1]-C
-        R=C-k1;F=R-k3*2
-        K=R-k2;E=K-k3*2
-        z=Z[-1]-C
-
-        vr[UST[0]][2]=T1;vr[UST[1]][2]=T1
-        vr[SON[0]][2]=T1;vr[SON[1]][2]=T1
-        for i in ALT:vr[i][2]=sqrt(R**2-vr[i][0]**2)+z
-
-        ON=[SON[0]];U1=[]
-        for i in range(0,RES):
-            A=i*pi/RES;x=cos(A)*C
-            if  x>-u and x<u:
-                vr.append([x,-k1/2,sin(A)*C+z]);ON.append(len(vr)-1)
-        U1.extend(ON);U1.append(UST[0])
-        ON.extend([UST[0],ALT[0]])
-        AR=[];D1=[];D2=[]
-        for i in range(0,len(ALT)-2,4):
-            x1=vr[ALT[i+0]][0]; x2=vr[ALT[i+2]][0]
-            ON.append(ALT[i+0]);AR.append(ALT[i+1])
-            T1=[ALT[i+0]];      T2=[ALT[i+1]]
-            for j in range(0,RES):
-                A=j*pi/RES;x=-cos(A)*R
-                if  x1<x and x<x2:
-                    vr.extend([[x,-k1/2,sin(A)*R+z],[x,k1/2,sin(A)*R+z]])
-                    ON.append(len(vr)-2);AR.append(len(vr)-1)
-                    T1.append(len(vr)-2);T2.append(len(vr)-1)
-            ON.append(ALT[i+2]);AR.append(ALT[i+3])
-            T1.append(ALT[i+2]);T2.append(ALT[i+3])
-            D1.append(T1);      D2.append(T2)
-        AR.append(SON[1])
-        U2=[SON[1]]
-        for i in range(0,RES):
-            A=i*pi/RES;x=cos(A)*C
-            if  x>-u and x<u:
-                vr.append([x,k1/2,sin(A)*C+z])
-                AR.append(len(vr)-1);U2.append(len(vr)-1)
-        AR.append(UST[1])
-        U2.append(UST[1])
-        AR.reverse()
-        fc.extend([ON,AR])
-        for i in range(0,len(U1)-1):fc.append([U1[i+1],U1[i],U2[i],U2[i+1]]);SM.append(len(fc)-1)
-        for A in range(0,mx):
-            for i in range(0,len(D1[A])-1):
-                fc.append([D1[A][i+1],D1[A][i],D2[A][i],D2[A][i+1]]);SM.append(len(fc)-1)
-        y=my-1
-        for x in range(0,mx):
-            if  kx[x][y]==True:
-                fr=(k1+k2)*0.5-0.01;ek=k2                
-                R=C-k1;K=R-k2
-
-                x1=X[x*2+1];x2=X[x*2+2]
-                vr.extend([[x2,fr-k2/2,z+1  ],[x2-k2,fr-k2/2,z+1     ],[x2-k2,fr+k2/2,z+1     ],[x2,fr+k2/2,z+1  ]])
-                vr.extend([[x2,fr-k2/2,Z[-3]],[x2-k2,fr-k2/2,Z[-3]+k2],[x2-k2,fr+k2/2,Z[-3]+k2],[x2,fr+k2/2,Z[-3]]])
-                vr.extend([[x1,fr-k2/2,Z[-3]],[x1+k2,fr-k2/2,Z[-3]+k2],[x1+k2,fr+k2/2,Z[-3]+k2],[x1,fr+k2/2,Z[-3]]])
-                vr.extend([[x1,fr-k2/2,z+1  ],[x1+k2,fr-k2/2,z+1     ],[x1+k2,fr+k2/2,z+1     ],[x1,fr+k2/2,z+1  ]])
-
-                n=len(vr)
-                fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10],[n-13,n-16,n-12,n- 9]])
-                fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6],[n- 9,n-12,n- 8,n- 5]])
-                fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2],[n- 5,n- 8,n- 4,n- 1]])
-                ALT=[n-16,n-15,n-14,n-13,n-4,n-3,n-2,n-1]
-                vr[ALT[0]][2]=sqrt(R**2-vr[ALT[0]][0]**2)+z;vr[ALT[1]][2]=sqrt(K**2-vr[ALT[1]][0]**2)+z
-                vr[ALT[2]][2]=sqrt(K**2-vr[ALT[2]][0]**2)+z;vr[ALT[3]][2]=sqrt(R**2-vr[ALT[3]][0]**2)+z
-                vr[ALT[4]][2]=sqrt(R**2-vr[ALT[4]][0]**2)+z;vr[ALT[5]][2]=sqrt(K**2-vr[ALT[5]][0]**2)+z
-                vr[ALT[6]][2]=sqrt(K**2-vr[ALT[6]][0]**2)+z;vr[ALT[7]][2]=sqrt(R**2-vr[ALT[7]][0]**2)+z
-
-                D1=[];D2=[];T1=[];T2=[]
-                for i in range(0,RES):
-                    A =i*pi/RES;y1=cos(A)*R;y2=-cos(A)*K
-                    if x1   <y1 and y1<x2:   vr.extend([[y1,fr-k2/2,sin(A)*R+z],[y1,fr+k2/2,sin(A)*R+z]]);T1.append(len(vr)-2);T2.append(len(vr)-1)
-                    if x1+k2<y2 and y2<x2-k2:vr.extend([[y2,fr-k2/2,sin(A)*K+z],[y2,fr+k2/2,sin(A)*K+z]]);D1.append(len(vr)-2);D2.append(len(vr)-1)
-                ON=[ALT[1],ALT[0]];ON.extend(T1);ON.extend([ALT[4],ALT[5]]);ON.extend(D1)
-                AR=[ALT[2],ALT[3]];AR.extend(T2);AR.extend([ALT[7],ALT[6]]);AR.extend(D2);AR.reverse()
-
-                if   D1==[] and T1==[]:fc.extend([ON,AR,[ALT[5],ALT[6],ALT[2],ALT[1]],[ALT[7],ALT[4],ALT[0],ALT[3]]]);                                                        m=len(fc);SM.extend([m-1,m-2])
-                elif D1==[] and T1!=[]:fc.extend([ON,AR,[ALT[5],ALT[6],ALT[2],ALT[1]],[ALT[7],ALT[4],T1[-1],T2[-1]],[ALT[0],ALT[3],T2[0],T1[0]]]);                            m=len(fc);SM.extend([m-1,m-2,m-3])
-                elif D1!=[] and T1==[]:fc.extend([ON,AR,[ALT[5],ALT[6],D2[0],D1[0]],[ALT[2],ALT[1],D1[-1],D2[-1]],[ALT[7],ALT[4],ALT[0],ALT[3]]]);                            m=len(fc);SM.extend([m-1,m-2,m-3])
-                else:                  fc.extend([ON,AR,[ALT[5],ALT[6],D2[0],D1[0]],[ALT[2],ALT[1],D1[-1],D2[-1]],[ALT[7],ALT[4],T1[-1],T2[-1]],[ALT[0],ALT[3],T2[0],T1[0]]]);m=len(fc);SM.extend([m-1,m-2,m-3,m-4])
-
-                for i in range(0,len(D1)-1):fc.append([D1[i+1],D1[i],D2[i],D2[i+1]]);SM.append(len(fc)-1)
-                for i in range(0,len(T1)-1):fc.append([T1[i+1],T1[i],T2[i],T2[i+1]]);SM.append(len(fc)-1)
-                R=C-k1-k2;K=R-k3*2
-            else:
-                fr=0;ek=0
-                R=C-k1;K=R-k3*2
-            #Fitil
-            x1=X[x*2+1]+ek;x2=X[x*2+2]-ek
-            vr.extend([[x2,fr-k3,z+1     ],[x2-k3*2,fr-k3,z+1          ],[x2-k3*2,fr+k3,z+1          ],[x2,fr+k3,z+1     ]])
-            vr.extend([[x2,fr-k3,Z[-3]+ek],[x2-k3*2,fr-k3,Z[-3]+ek+k3*2],[x2-k3*2,fr+k3,Z[-3]+ek+k3*2],[x2,fr+k3,Z[-3]+ek]])
-            vr.extend([[x1,fr-k3,Z[-3]+ek],[x1+k3*2,fr-k3,Z[-3]+ek+k3*2],[x1+k3*2,fr+k3,Z[-3]+ek+k3*2],[x1,fr+k3,Z[-3]+ek]])
-            vr.extend([[x1,fr-k3,z+1     ],[x1+k3*2,fr-k3,z+1          ],[x1+k3*2,fr+k3,z+1          ],[x1,fr+k3,z+1     ]])
-            n=len(vr)
-            fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10]])
-            fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6]])
-            fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2]])
-            m=len(fc);ftl.extend([m-1,m-2,m-3,m-4,m-5,m-6,m-7,m-8,m-9])
-            ALT=[n-16,n-15,n-14,n-13,n-4,n-3,n-2,n-1]
-            vr[ALT[0]][2]=sqrt(R**2-vr[ALT[0]][0]**2)+z;vr[ALT[1]][2]=sqrt(K**2-vr[ALT[1]][0]**2)+z
-            vr[ALT[2]][2]=sqrt(K**2-vr[ALT[2]][0]**2)+z;vr[ALT[3]][2]=sqrt(R**2-vr[ALT[3]][0]**2)+z
-            vr[ALT[4]][2]=sqrt(R**2-vr[ALT[4]][0]**2)+z;vr[ALT[5]][2]=sqrt(K**2-vr[ALT[5]][0]**2)+z
-            vr[ALT[6]][2]=sqrt(K**2-vr[ALT[6]][0]**2)+z;vr[ALT[7]][2]=sqrt(R**2-vr[ALT[7]][0]**2)+z
-            D1=[];D2=[];T1=[];T2=[]
-            for i in range(0,RES):
-                A =i*pi/RES;y1=cos(A)*R;y2=-cos(A)*K
-                if x1     <y1 and y1<x2:     vr.extend([[y1,fr-k3,sin(A)*R+z],[y1,fr+k3,sin(A)*R+z]]);T1.append(len(vr)-2);T2.append(len(vr)-1);ftl.extend([len(fc)-1,len(fc)-2])
-                if x1+k3*2<y2 and y2<x2-k3*2:vr.extend([[y2,fr-k3,sin(A)*K+z],[y2,fr+k3,sin(A)*K+z]]);D1.append(len(vr)-2);D2.append(len(vr)-1);ftl.extend([len(fc)-1,len(fc)-2])
-            ON=[ALT[1],ALT[0]];ON.extend(T1);ON.extend([ALT[4],ALT[5]]);ON.extend(D1)
-            AR=[ALT[2],ALT[3]];AR.extend(T2);AR.extend([ALT[7],ALT[6]]);AR.extend(D2);AR.reverse()
-
-            if  D1==[]:fc.extend([ON,AR,[ALT[5],ALT[6],ALT[2],ALT[1]]]);                            m=len(fc);ftl.extend([m-1,m-2,m-3    ]);SM.extend([m-1    ])
-            else:      fc.extend([ON,AR,[ALT[5],ALT[6],D2[0],D1[0]],[ALT[2],ALT[1],D1[-1],D2[-1]]]);m=len(fc);ftl.extend([m-1,m-2,m-3,m-4]);SM.extend([m-1,m-2])
-
-            for i in range(0,len(D1)-1):fc.append([D1[i+1],D1[i],D2[i],D2[i+1]]);ftl.append(len(fc)-1);SM.append(len(fc)-1)
-            #Cam
-            x1=X[x*2+1]+ek+k3*2;x2=X[x*2+2]-ek-k3*2
-            ON=[];AR=[]
-            for i in range(0,RES):
-                A= i*pi/RES;y1=-cos(A)*K
-                if  x1<y1 and y1<x2:
-                    vr.extend([[y1,fr-0.005,sin(A)*K+z],[y1,fr+0.005,sin(A)*K+z]])
-                    n=len(vr);ON.append(n-1);AR.append(n-2)
-            vr.extend([[x1,fr-0.005,sqrt(K**2-x1**2)+z],[x1,fr+0.005,sqrt(K**2-x1**2)+z]])
-            vr.extend([[x1,fr-0.005,Z[-3]+ek+k3*2     ],[x1,fr+0.005,Z[-3]+ek+k3*2     ]])
-            vr.extend([[x2,fr-0.005,Z[-3]+ek+k3*2     ],[x2,fr+0.005,Z[-3]+ek+k3*2     ]])
-            vr.extend([[x2,fr-0.005,sqrt(K**2-x2**2)+z],[x2,fr+0.005,sqrt(K**2-x2**2)+z]])
-            n=len(vr);ON.extend([n-1,n-3,n-5,n-7]);AR.extend([n-2,n-4,n-6,n-8])
-            fc.append(ON);AR.reverse();fc.append(AR)
-            m=len(fc);cam.extend([m-1,m-2])        
-
-    elif self.UST=='3':#Egri
-        if   self.DT3=='1':H=(self.VL1/200)/u
-        elif self.DT3=='2':H=self.VL3/100
-        elif self.DT3=='3':H=sin(self.VL4*pi/180)/cos(self.VL4*pi/180)
-        z=sqrt(k1**2+(k1*H)**2)
-        k=sqrt(k2**2+(k2*H)**2)
-        f=sqrt(k3**2+(k3*H)**2)*2
-        vr[UST[0]][2]=Z[-1]+vr[UST[0]][0]*H
-        vr[UST[1]][2]=Z[-1]+vr[UST[1]][0]*H
-        for i in ALT:
-            vr[i][2] =Z[-1]+vr[i][0]*H-z
-        vr[SON[0]][2]=Z[-1]+vr[SON[0]][0]*H
-        vr[SON[1]][2]=Z[-1]+vr[SON[1]][0]*H
-        fc.append([UST[1],UST[0], SON[0],SON[1] ])
-        for i in range(0,mx*4,4):
-            fc.append([ALT[i],ALT[i+1],ALT[i+3],ALT[i+2]])
-        ON=[UST[0]]
-        AR=[UST[1]]
-        for i in range(0,len(ALT)-1,2):
-            ON.append(ALT[i  ])
-            AR.append(ALT[i+1])
-        ON.append(SON[0])
-        fc.append(ON)
-        AR.append(SON[1])
-        AR.reverse();fc.append(AR)
-        y=my-1
-        for x in range(0,mx):
-            if  kx[x][y]==True:
-                Kapak(vr,fc,X,Z,x*2+1,y*2+1,k2/2,(k1+k2)*0.5-0.01)
-                n=len(vr)
-                vr[n- 5][2]=Z[-1]+vr[n- 5][0]*H-z
-                vr[n- 6][2]=Z[-1]+vr[n- 6][0]*H-z-k
-                vr[n- 7][2]=Z[-1]+vr[n- 7][0]*H-z-k
-                vr[n- 8][2]=Z[-1]+vr[n- 8][0]*H-z
-                vr[n- 9][2]=Z[-1]+vr[n- 9][0]*H-z
-                vr[n-10][2]=Z[-1]+vr[n-10][0]*H-z-k
-                vr[n-11][2]=Z[-1]+vr[n-11][0]*H-z-k
-                vr[n-12][2]=Z[-1]+vr[n-12][0]*H-z
-                Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,(k1+k2)*0.5-0.01,k2)
-                n=len(vr)
-                vr[n- 2][2]=Z[-1]+vr[n- 2][0]*H-z-k-f
-                vr[n- 3][2]=Z[-1]+vr[n- 3][0]*H-z-k-f
-                vr[n- 6][2]=Z[-1]+vr[n- 6][0]*H-z-k-f
-                vr[n- 7][2]=Z[-1]+vr[n- 7][0]*H-z-k-f
-                vr[n-13][2]=Z[-1]+vr[n-13][0]*H-z-k
-                vr[n-14][2]=Z[-1]+vr[n-14][0]*H-z-k-f
-                vr[n-15][2]=Z[-1]+vr[n-15][0]*H-z-k-f
-                vr[n-16][2]=Z[-1]+vr[n-16][0]*H-z-k
-                vr[n-17][2]=Z[-1]+vr[n-17][0]*H-z-k
-                vr[n-18][2]=Z[-1]+vr[n-18][0]*H-z-k-f
-                vr[n-19][2]=Z[-1]+vr[n-19][0]*H-z-k-f
-                vr[n-20][2]=Z[-1]+vr[n-20][0]*H-z-k
-            else:
-                Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,0,0)
-                n=len(vr)
-                vr[n-2][2]=Z[-1]+vr[n-2][0]*H-z-f
-                vr[n-3][2]=Z[-1]+vr[n-3][0]*H-z-f
-                vr[n-6][2]=Z[-1]+vr[n-6][0]*H-z-f
-                vr[n-7][2]=Z[-1]+vr[n-7][0]*H-z-f
-                vr[n-13][2]=Z[-1]+vr[n-13][0]*H-z
-                vr[n-14][2]=Z[-1]+vr[n-14][0]*H-z-f
-                vr[n-15][2]=Z[-1]+vr[n-15][0]*H-z-f
-                vr[n-16][2]=Z[-1]+vr[n-16][0]*H-z
-                vr[n-17][2]=Z[-1]+vr[n-17][0]*H-z
-                vr[n-18][2]=Z[-1]+vr[n-18][0]*H-z-f
-                vr[n-19][2]=Z[-1]+vr[n-19][0]*H-z-f
-                vr[n-20][2]=Z[-1]+vr[n-20][0]*H-z
-            m=len(fc);cam.extend([m-1,m-2])
-            ftl.extend([m-3,m-4,m-5,m-6,m-7,m-8,m-9,m-10,m-11,m-12,m-13,m-14])
-    elif self.UST=='4':#Ucgen
-        if   self.DT3=='1':H=(self.VL1/100)/u
-        elif self.DT3=='2':H=self.VL3/100
-        elif self.DT3=='3':H=sin(self.VL4*pi/180)/cos(self.VL4*pi/180)
-        z=sqrt(k1**2+(k1*H)**2)
-        k=sqrt(k2**2+(k2*H)**2)
-        f=sqrt(k3**2+(k3*H)**2)*2
-        vr[UST[0]][2]=Z[-1]+vr[UST[0]][0]*H
-        vr[UST[1]][2]=Z[-1]+vr[UST[1]][0]*H
-        for i in ALT:
-            vr[i][2] =Z[-1]-abs(vr[i][0])*H-z
-        vr[SON[0]][2]=Z[-1]-vr[SON[0]][0]*H
-        vr[SON[1]][2]=Z[-1]-vr[SON[1]][0]*H
-        vr.extend([[0,-k1/2,Z[-1]],[0, k1/2,Z[-1]]])
-
-        x = 0
-        for j in range(2,len(ALT)-2,4):
-            if vr[ALT[j]][0]<0 and 0<vr[ALT[j+2]][0]:x=1
-
-        n=len(vr)
-        fc.extend([[UST[1],UST[0],n-2,n-1],[n-1,n-2,SON[0],SON[1]]])
-        ON=[SON[0],n-2,UST[0]];AR=[SON[1],n-1,UST[1]]
-
-        if  x==0:vr.extend([[0,-k1/2,Z[-1]-z],[0,k1/2,Z[-1]-z]])
-        for j in range(0,len(ALT)-2,4):
-            if  vr[ALT[j]][0]<0 and vr[ALT[j+2]][0]<0:
-                fc.append([ALT[j],ALT[j+1],ALT[j+3],ALT[j+2]])
-                ON.extend([ALT[j  ],ALT[j+2]])
-                AR.extend([ALT[j+1],ALT[j+3]])
-            elif vr[ALT[j]][0]>0 and vr[ALT[j+2]][0]>0:
-                fc.append([ALT[j],ALT[j+1],ALT[j+3],ALT[j+2]])
-                ON.extend([ALT[j  ],ALT[j+2]])
-                AR.extend([ALT[j+1],ALT[j+3]])
-            else:
-                n=len(vr)
-                fc.extend([[ALT[j],ALT[j+1],n-1,n-2],[n-2,n-1,ALT[j+3],ALT[j+2]]])
-                ON.extend([ALT[j+0],n-2,ALT[j+2]])
-                AR.extend([ALT[j+1],n-1,ALT[j+3]])
-        fc.append(ON);AR.reverse();fc.append(AR)
-        y=my-1
-        for x in range(0,mx):
-            if  vr[ALT[x*4]][0]<0 and vr[ALT[x*4+2]][0]<0:
-                if  kx[x][y]==True:
-                    Kapak(vr,fc,X,Z,x*2+1,y*2+1,k2/2,(k1+k2)*0.5-0.01)
-                    n=len(vr)
-                    vr[n- 5][2]=Z[-1]+vr[n- 5][0]*H-z
-                    vr[n- 6][2]=Z[-1]+vr[n- 6][0]*H-z-k
-                    vr[n- 7][2]=Z[-1]+vr[n- 7][0]*H-z-k
-                    vr[n- 8][2]=Z[-1]+vr[n- 8][0]*H-z
-                    vr[n- 9][2]=Z[-1]+vr[n- 9][0]*H-z
-                    vr[n-10][2]=Z[-1]+vr[n-10][0]*H-z-k
-                    vr[n-11][2]=Z[-1]+vr[n-11][0]*H-z-k
-                    vr[n-12][2]=Z[-1]+vr[n-12][0]*H-z
-                    Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,(k1+k2)*0.5-0.01,k2)
-                    n=len(vr)
-                    vr[n- 2][2]=Z[-1]+vr[n- 2][0]*H-z-k-f
-                    vr[n- 3][2]=Z[-1]+vr[n- 3][0]*H-z-k-f
-                    vr[n- 6][2]=Z[-1]+vr[n- 6][0]*H-z-k-f
-                    vr[n- 7][2]=Z[-1]+vr[n- 7][0]*H-z-k-f
-                    vr[n-13][2]=Z[-1]+vr[n-13][0]*H-z-k
-                    vr[n-14][2]=Z[-1]+vr[n-14][0]*H-z-k-f
-                    vr[n-15][2]=Z[-1]+vr[n-15][0]*H-z-k-f
-                    vr[n-16][2]=Z[-1]+vr[n-16][0]*H-z-k
-                    vr[n-17][2]=Z[-1]+vr[n-17][0]*H-z-k
-                    vr[n-18][2]=Z[-1]+vr[n-18][0]*H-z-k-f
-                    vr[n-19][2]=Z[-1]+vr[n-19][0]*H-z-k-f
-                    vr[n-20][2]=Z[-1]+vr[n-20][0]*H-z-k
-                else:
-                    Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,0,0)
-                    n=len(vr)
-                    vr[n-2][2]=Z[-1]+vr[n-2][0]*H-z-f
-                    vr[n-3][2]=Z[-1]+vr[n-3][0]*H-z-f
-                    vr[n-6][2]=Z[-1]+vr[n-6][0]*H-z-f
-                    vr[n-7][2]=Z[-1]+vr[n-7][0]*H-z-f
-                    vr[n-13][2]=Z[-1]+vr[n-13][0]*H-z
-                    vr[n-14][2]=Z[-1]+vr[n-14][0]*H-z-f
-                    vr[n-15][2]=Z[-1]+vr[n-15][0]*H-z-f
-                    vr[n-16][2]=Z[-1]+vr[n-16][0]*H-z
-                    vr[n-17][2]=Z[-1]+vr[n-17][0]*H-z
-                    vr[n-18][2]=Z[-1]+vr[n-18][0]*H-z-f
-                    vr[n-19][2]=Z[-1]+vr[n-19][0]*H-z-f
-                    vr[n-20][2]=Z[-1]+vr[n-20][0]*H-z
-                m=len(fc);cam.extend([m-1,m-2])
-                ftl.extend([m-3,m-4,m-5,m-6,m-7,m-8,m-9,m-10,m-11,m-12,m-13,m-14])
-            elif vr[ALT[x*4]][0]>0 and vr[ALT[x*4+2]][0]>0:
-                if  kx[x][y]==True:
-                    Kapak(vr,fc,X,Z,x*2+1,y*2+1,k2/2,(k1+k2)*0.5-0.01)
-                    n=len(vr)
-                    vr[n- 5][2]=Z[-1]-vr[n- 5][0]*H-z
-                    vr[n- 6][2]=Z[-1]-vr[n- 6][0]*H-z-k
-                    vr[n- 7][2]=Z[-1]-vr[n- 7][0]*H-z-k
-                    vr[n- 8][2]=Z[-1]-vr[n- 8][0]*H-z
-                    vr[n- 9][2]=Z[-1]-vr[n- 9][0]*H-z
-                    vr[n-10][2]=Z[-1]-vr[n-10][0]*H-z-k
-                    vr[n-11][2]=Z[-1]-vr[n-11][0]*H-z-k
-                    vr[n-12][2]=Z[-1]-vr[n-12][0]*H-z
-                    Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,(k1+k2)*0.5-0.01,k2)
-                    n=len(vr)
-                    vr[n- 2][2]=Z[-1]-vr[n- 2][0]*H-z-k-f
-                    vr[n- 3][2]=Z[-1]-vr[n- 3][0]*H-z-k-f
-                    vr[n- 6][2]=Z[-1]-vr[n- 6][0]*H-z-k-f
-                    vr[n- 7][2]=Z[-1]-vr[n- 7][0]*H-z-k-f
-                    vr[n-13][2]=Z[-1]-vr[n-13][0]*H-z-k
-                    vr[n-14][2]=Z[-1]-vr[n-14][0]*H-z-k-f
-                    vr[n-15][2]=Z[-1]-vr[n-15][0]*H-z-k-f
-                    vr[n-16][2]=Z[-1]-vr[n-16][0]*H-z-k
-                    vr[n-17][2]=Z[-1]-vr[n-17][0]*H-z-k
-                    vr[n-18][2]=Z[-1]-vr[n-18][0]*H-z-k-f
-                    vr[n-19][2]=Z[-1]-vr[n-19][0]*H-z-k-f
-                    vr[n-20][2]=Z[-1]-vr[n-20][0]*H-z-k
-                else:
-                    Fitil(vr,fc,X,Z,x*2+1,y*2+1,k3,0,0)
-                    n=len(vr)
-                    vr[n-2][2]=Z[-1]-vr[n-2][0]*H-z-f
-                    vr[n-3][2]=Z[-1]-vr[n-3][0]*H-z-f
-                    vr[n-6][2]=Z[-1]-vr[n-6][0]*H-z-f
-                    vr[n-7][2]=Z[-1]-vr[n-7][0]*H-z-f
-                    vr[n-13][2]=Z[-1]-vr[n-13][0]*H-z
-                    vr[n-14][2]=Z[-1]-vr[n-14][0]*H-z-f
-                    vr[n-15][2]=Z[-1]-vr[n-15][0]*H-z-f
-                    vr[n-16][2]=Z[-1]-vr[n-16][0]*H-z
-                    vr[n-17][2]=Z[-1]-vr[n-17][0]*H-z
-                    vr[n-18][2]=Z[-1]-vr[n-18][0]*H-z-f
-                    vr[n-19][2]=Z[-1]-vr[n-19][0]*H-z-f
-                    vr[n-20][2]=Z[-1]-vr[n-20][0]*H-z
-                m=len(fc);cam.extend([m-1,m-2])
-                ftl.extend([m-3,m-4,m-5,m-6,m-7,m-8,m-9,m-10,m-11,m-12,m-13,m-14])
-            else:
-                k4=k3*2
-                if  kx[x][y]==True:
-                    zz=(k1+k2)*0.5-0.01
-                    xx=X[x*2+1]
-                    vr.extend([[xx,-k2/2+zz,Z[-3]       ],[xx+k2,-k2/2+zz,Z[-3]    +k2       ],[xx+k2,k2/2+zz,Z[-3]    +k2       ],[xx,k2/2+zz,Z[-3]       ]])
-                    vr.extend([[xx,-k2/2+zz,Z[-1]+xx*H-z],[xx+k2,-k2/2+zz,Z[-1]+(xx+k2)*H-z-k],[xx+k2,k2/2+zz,Z[-1]+(xx+k2)*H-z-k],[xx,k2/2+zz,Z[-1]+xx*H-z]])
-                    vr.extend([[ 0,-k2/2+zz,Z[-1]     -z],[    0,-k2/2+zz,Z[-1]          -z-k],[    0,k2/2+zz,Z[-1]          -z-k],[ 0,k2/2+zz,Z[-1]     -z]])
-                    xx=X[x*2+2]
-                    vr.extend([[xx,-k2/2+zz,Z[-1]-xx*H-z],[xx-k2,-k2/2+zz,Z[-1]-(xx-k2)*H-z-k],[xx-k2,k2/2+zz,Z[-1]-(xx-k2)*H-z-k],[xx,k2/2+zz,Z[-1]-xx*H-z]])
-                    vr.extend([[xx,-k2/2+zz,Z[-3]       ],[xx-k2,-k2/2+zz,Z[-3]    +k2       ],[xx-k2,k2/2+zz,Z[-3]    +k2       ],[xx,k2/2+zz,Z[-3]       ]])
-                    n=len(vr)
-                    fc.extend([[n-20,n-19,n-15,n-16],[n-19,n-18,n-14,n-15],[n-18,n-17,n-13,n-14],[n-17,n-20,n-16,n-13]])
-                    fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10],[n-13,n-16,n-12,n- 9]])
-                    fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6],[n- 9,n-12,n- 8,n- 5]])
-                    fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2],[n- 5,n- 8,n- 4,n- 1]])
-                    fc.extend([[n- 4,n- 3,n-19,n-20],[n- 3,n- 2,n-18,n-19],[n- 2,n- 1,n-17,n-18],[n- 1,n- 4,n-20,n-17]])
-                    xx=X[x*2+1]
-                    vr.extend([[xx   +k2,-k3+zz,Z[-3]    +k2            ],[xx+k4+k2,-k3+zz,Z[-3]    +k2+k4         ],[xx+k4+k2, k3+zz,Z[-3]    +k2+k4         ],[xx   +k2, k3+zz,Z[-3]    +k2            ]])
-                    vr.extend([[xx   +k2,-k3+zz,Z[-1]+(xx+k2   )*H-z-k  ],[xx+k4+k2,-k3+zz,Z[-1]+(xx+k2+k4)*H-z-k-f],[xx+k4+k2, k3+zz,Z[-1]+(xx+k2+k4)*H-z-k-f],[xx   +k2, k3+zz,Z[-1]+(xx+k2   )*H-z-k  ]])
-                    vr.extend([[    0,-k3+zz,Z[-1]-k     -z],[       0,-k3+zz,Z[-1]-k             -z-f],[       0,k3+zz,Z[-1]-k          -z-f],[    0,k3+zz,Z[-1]-k     -z]])
-                    xx=X[x*2+2]
-                    vr.extend([[xx   -k2,-k3+zz,Z[-1]-(xx-k2   )*H-z-k  ],[xx-k4-k2,-k3+zz,Z[-1]-(xx-k2-k4)*H-z-k-f],[xx-k4-k2, k3+zz,Z[-1]-(xx-k2-k4)*H-z-k-f],[xx   -k2, k3+zz,Z[-1]-(xx-k2   )*H-z-k  ]])
-                    vr.extend([[xx   -k2,-k3+zz,Z[-3]    +k2            ],[xx-k4-k2,-k3+zz,Z[-3]    +k2+k4         ],[xx-k4-k2, k3+zz,Z[-3]    +k2+k4         ],[xx   -k2, k3+zz,Z[-3]    +k2            ]])
-                    n=len(vr)
-                    fc.extend([[n-20,n-19,n-15,n-16],[n-19,n-18,n-14,n-15],[n-18,n-17,n-13,n-14]])
-                    fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10]])
-                    fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6]])
-                    fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2]])
-                    fc.extend([[n- 4,n- 3,n-19,n-20],[n- 3,n- 2,n-18,n-19],[n- 2,n- 1,n-17,n-18]])
-                    xx=X[x*2+1]
-                    vr.extend([[xx+k4+k2,-k3+zz,Z[-3]    +k2+k4         ],[xx+k4+k2, k3+zz,Z[-3]    +k2+k4         ]])
-                    vr.extend([[xx+k4+k2,-k3+zz,Z[-1]+(xx+k2+k4)*H-z-k-f],[xx+k4+k2, k3+zz,Z[-1]+(xx+k2+k4)*H-z-k-f]])
-                    vr.extend([[       0,-k3+zz,Z[-1]-k             -z-f],[       0,k3+zz,Z[-1]-k          -z-f]])
-                    xx=X[x*2+2]
-                    vr.extend([[xx-k4-k2,-k3+zz,Z[-1]-(xx-k2-k4)*H-z-k-f],[xx-k4-k2, k3+zz,Z[-1]-(xx-k2-k4)*H-z-k-f]])
-                    vr.extend([[xx-k4-k2,-k3+zz,Z[-3]    +k2+k4         ],[xx-k4-k2, k3+zz,Z[-3]    +k2+k4         ]])
-                    fc.extend([[n+8,n+6,n+4,n+2,n+0],[n+1,n+3,n+5,n+7,n+9]])
-                else:
-                    xx=X[x*2+1]
-                    vr.extend([[xx,-k3,Z[-3]       ],[xx+k4,-k3,Z[-3]    +k4       ],[xx+k4,k3,Z[-3]    +k4       ],[xx,k3,Z[-3]       ]])
-                    vr.extend([[xx,-k3,Z[-1]+xx*H-z],[xx+k4,-k3,Z[-1]+(xx+k4)*H-z-f],[xx+k4,k3,Z[-1]+(xx+k4)*H-z-f],[xx,k3,Z[-1]+xx*H-z]])
-                    vr.extend([[ 0,-k3,Z[-1]     -z],[    0,-k3,Z[-1]          -z-f],[    0,k3,Z[-1]          -z-f],[ 0,k3,Z[-1]     -z]])
-                    xx=X[x*2+2]
-                    vr.extend([[xx,-k3,Z[-1]-xx*H-z],[xx-k4,-k3,Z[-1]-(xx-k4)*H-z-f],[xx-k4,k3,Z[-1]-(xx-k4)*H-z-f],[xx,k3,Z[-1]-xx*H-z]])
-                    vr.extend([[xx,-k3,Z[-3]       ],[xx-k4,-k3,Z[-3]    +k4       ],[xx-k4,k3,Z[-3]    +k4       ],[xx,k3,Z[-3]       ]])
-                    n=len(vr)
-                    fc.extend([[n-20,n-19,n-15,n-16],[n-19,n-18,n-14,n-15],[n-18,n-17,n-13,n-14]])
-                    fc.extend([[n-16,n-15,n-11,n-12],[n-15,n-14,n-10,n-11],[n-14,n-13,n- 9,n-10]])
-                    fc.extend([[n-12,n-11,n- 7,n- 8],[n-11,n-10,n- 6,n- 7],[n-10,n- 9,n- 5,n- 6]])
-                    fc.extend([[n- 8,n- 7,n- 3,n- 4],[n- 7,n- 6,n- 2,n- 3],[n- 6,n- 5,n- 1,n- 2]])
-                    fc.extend([[n- 4,n- 3,n-19,n-20],[n- 3,n- 2,n-18,n-19],[n- 2,n- 1,n-17,n-18]])
-                    xx=X[x*2+1]
-                    vr.extend([[xx+k4,-0.005,Z[-3]    +k4       ],[xx+k4,0.005,Z[-3]    +k4       ]])
-                    vr.extend([[xx+k4,-0.005,Z[-1]+(xx+k4)*H-z-f],[xx+k4,0.005,Z[-1]+(xx+k4)*H-z-f]])
-                    vr.extend([[    0,-0.005,Z[-1]          -z-f],[    0,0.005,Z[-1]          -z-f]])
-                    xx=X[x*2+2]
-                    vr.extend([[xx-k4,-0.005,Z[-1]-(xx-k4)*H-z-f],[xx-k4,0.005,Z[-1]-(xx-k4)*H-z-f]])
-                    vr.extend([[xx-k4,-0.005,Z[-3]    +k4       ],[xx-k4,0.005,Z[-3]    +k4       ]])
-                    fc.extend([[n+8,n+6,n+4,n+2,n+0],[n+1,n+3,n+5,n+7,n+9]])
-                m=len(fc);cam.extend([m-1,m-2])
-                ftl.extend([m-3,m-4,m-5,m-6,m-7,m-8,m-9,m-10,m-11,m-12,m-13,m-14,m-15,m-16,m-17])
-    #Mermer
-    if  self.mr==True:
-        mrh=-self.mr1/100;mrg= self.mr2/100
-        mdv=(self.mr3/200)+mrg;msv=-(mdv+(self.mr4/100))
-        vr.extend([[-u,mdv,0],[u,mdv,0],[-u,msv,0],[u,msv,0],[-u,mdv,mrh],[u,mdv,mrh],[-u,msv,mrh],[u,msv,mrh]])
-        n=len(vr);fc.extend([[n-1,n-2,n-4,n-3],[n-3,n-4,n-8,n-7],[n-6,n-5,n-7,n-8],[n-2,n-1,n-5,n-6],[n-4,n-2,n-6,n-8],[n-5,n-1,n-3,n-7]])
-        n=len(fc);mer.extend([n-1,n-2,n-3,n-4,n-5,n-6])
-#OBJE -----------------------------------------------------------
-    mesh = bpy.data.meshes.new(name='Window')
-    mesh.from_pydata(vr,[],fc)
-    if   self.mt1=='1':mesh.materials.append(MAT('PVC',    1.0,1.0,1.0))
-    elif self.mt1=='2':mesh.materials.append(MAT('Wood',   0.3,0.2,0.1))
-    elif self.mt1=='3':mesh.materials.append(MAT('Plastic',0.0,0.0,0.0))
-
-    if   self.mt2=='1':mesh.materials.append(MAT('PVC',    1.0,1.0,1.0))
-    elif self.mt2=='2':mesh.materials.append(MAT('Wood',   0.3,0.2,0.1))
-    elif self.mt2=='3':mesh.materials.append(MAT('Plastic',0.0,0.0,0.0))
-
-    mesh.materials.append(MAT('Glass',0.5,0.8,1.0))
-    if self.mr==True:mesh.materials.append(MAT('Marble', 0.9,0.8,0.7))
-
-    for i in ftl:
-        mesh.polygons[i].material_index=1
-    for i in cam:
-        mesh.polygons[i].material_index=2
-    for i in mer:
-        mesh.polygons[i].material_index=3
-    for i in SM:
-        mesh.polygons[i].use_smooth = 1
-    mesh.update(calc_edges=True)
-    from bpy_extras import object_utils
-    return object_utils.object_data_add(context, mesh, operator=None)
-    if  bpy.context.mode!='EDIT_MESH':
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.editmode_toggle()
-#----------------------------------------------------------------
-class PENCERE(bpy.types.Operator):
-    bl_idname = "mesh.add_say3d_pencere2"
-    bl_label = "Window"
-    bl_description = "Window Generator"
-    bl_options = {'REGISTER', 'UNDO'}
-    prs = EnumProperty(items = (('1',"WINDOW 250X200",""),
-                                ('2',"WINDOW 200X200",""),
-                                ('3',"WINDOW 180X200",""),
-                                ('4',"WINDOW 180X160",""),
-                                ('5',"WINDOW 160X160",""),
-                                ('6',"WINDOW 50X50",""),
-                                ('7',"DOOR 80X250",""),
-                                ('8',"DOOR 80X230","")),
-                                name="")
-    son=prs
-    gen=IntProperty(name='H Count',     min=1,max= 8, default= 3, description='Horizontal Panes')
-    yuk=IntProperty(name='V Count',     min=1,max= 5, default= 1, description='Vertical Panes')
-    kl1=IntProperty(name='Outer Frame', min=2,max=50, default= 5, description='Outside Frame Thickness')
-    kl2=IntProperty(name='Risers',      min=2,max=50, default= 5, description='Risers Width')
-    fk =IntProperty(name='Inner Frame', min=1,max=20, default= 2, description='Inside Frame Thickness')
-
-    mr=BoolProperty(name='Sill', default=True,description='Window Sill')
-    mr1=IntProperty(name='',min=1, max=20, default= 4, description='Height')
-    mr2=IntProperty(name='',min=0, max=20, default= 4, description='First Depth')
-    mr3=IntProperty(name='',min=1, max=50, default=20, description='Second Depth')
-    mr4=IntProperty(name='',min=0, max=50, default= 0, description='Extrusion for Jamb')
-
-    mt1=EnumProperty(items =(('1',"PVC",""),('2',"WOOD",""),('3',"Plastic","")),name="",default='1')
-    mt2=EnumProperty(items =(('1',"PVC",""),('2',"WOOD",""),('3',"Plastic","")),name="",default='3')
-
-    UST=EnumProperty(items =(('1',"Flat",""),('2',"Arch",  ""),('3',"Inclined", ""),('4',"Triangle","")),name="Top",default='1')
-    DT2=EnumProperty(items =(('1',"Difference",""),('2',"Radius",   "")),                         name="",default='1')
-    DT3=EnumProperty(items =(('1',"Difference",""),('2',"Incline %",""),('3',"Incline Angle","")),name="",default='1')
-
-    VL1=IntProperty( name='',min=-10000,max=10000,default=30)#Fark
-    VL2=IntProperty( name='',min=     1,max=10000,default=30)#Cap
-    VL3=IntProperty( name='',min=  -100,max=  100,default=30)#Egim %
-    VL4=IntProperty( name='',min=   -45,max=   45,default=30)#Egim Aci
-
-    RES=IntProperty(name='Resolution pi/',min=2,max=360,default=36)#Res
-
-    gnx0=IntProperty(name='',min=1,max=300,default= 60,description='1st Window Width')
-    gnx1=IntProperty(name='',min=1,max=300,default=110,description='2nd Window Width')
-    gnx2=IntProperty(name='',min=1,max=300,default= 60,description='3rd Window Width')
-    gnx3=IntProperty(name='',min=1,max=300,default= 60,description='4th Window Width')
-    gnx4=IntProperty(name='',min=1,max=300,default= 60,description='5th Window Width')
-    gnx5=IntProperty(name='',min=1,max=300,default= 60,description='6th Window Width')
-    gnx6=IntProperty(name='',min=1,max=300,default= 60,description='7th Window Width')
-    gnx7=IntProperty(name='',min=1,max=300,default= 60,description='8th Window Width')
-
-    gny0=IntProperty(name='',min=1,max=300,default=190,description='1st Row Height')
-    gny1=IntProperty(name='',min=1,max=300,default= 45,description='2nd Row Height')
-    gny2=IntProperty(name='',min=1,max=300,default= 45,description='3rd Row Height')
-    gny3=IntProperty(name='',min=1,max=300,default= 45,description='4th Row Height')
-    gny4=IntProperty(name='',min=1,max=300,default= 45,description='5th Row Height')
-
-    k00=BoolProperty(name='',default=True); k01=BoolProperty(name='',default=False)
-    k02=BoolProperty(name='',default=True); k03=BoolProperty(name='',default=False)
-    k04=BoolProperty(name='',default=False);k05=BoolProperty(name='',default=False)
-    k06=BoolProperty(name='',default=False);k07=BoolProperty(name='',default=False)
-
-    k10=BoolProperty(name='',default=False);k11=BoolProperty(name='',default=False)
-    k12=BoolProperty(name='',default=False);k13=BoolProperty(name='',default=False)
-    k14=BoolProperty(name='',default=False);k15=BoolProperty(name='',default=False)
-    k16=BoolProperty(name='',default=False);k17=BoolProperty(name='',default=False)
-
-    k20=BoolProperty(name='',default=False);k21=BoolProperty(name='',default=False)
-    k22=BoolProperty(name='',default=False);k23=BoolProperty(name='',default=False)
-    k24=BoolProperty(name='',default=False);k25=BoolProperty(name='',default=False)
-    k26=BoolProperty(name='',default=False);k27=BoolProperty(name='',default=False)
-
-    k30=BoolProperty(name='',default=False);k31=BoolProperty(name='',default=False)
-    k32=BoolProperty(name='',default=False);k33=BoolProperty(name='',default=False)
-    k34=BoolProperty(name='',default=False);k35=BoolProperty(name='',default=False)
-    k36=BoolProperty(name='',default=False);k37=BoolProperty(name='',default=False)
-
-    k40=BoolProperty(name='',default=False);k41=BoolProperty(name='',default=False)
-    k42=BoolProperty(name='',default=False);k43=BoolProperty(name='',default=False)
-    k44=BoolProperty(name='',default=False);k45=BoolProperty(name='',default=False)
-    k46=BoolProperty(name='',default=False);k47=BoolProperty(name='',default=False)
-    #--------------------------------------------------------------
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'prs')
-        box=layout.box()
-        box.prop(self,'gen');box.prop(self,'yuk')
-        box.prop(self,'kl1');box.prop(self,'kl2')
-        box.prop(self, 'fk')
-
-        box.prop(self,'mr')
-        if  self.mr==True:
-            row=box.row();row.prop(self,'mr1');row.prop(self,'mr2')
-            row=box.row();row.prop(self,'mr3');row.prop(self,'mr4')
-        row =layout.row();row.label('Frame');row.label('Inner Frame')
-        row =layout.row();row.prop(self,'mt1');row.prop(self,'mt2')
-
-        box.prop(self,'UST')
-        if   self.UST=='2':
-            row= box.row();    row.prop(self,'DT2')
-            if   self.DT2=='1':row.prop(self,'VL1')
-            elif self.DT2=='2':row.prop(self,'VL2')
-            box.prop(self,'RES')
-        elif self.UST=='3':
-            row= box.row();    row.prop(self,'DT3')
-            if   self.DT3=='1':row.prop(self,'VL1')
-            elif self.DT3=='2':row.prop(self,'VL3')
-            elif self.DT3=='3':row.prop(self,'VL4')
-        elif self.UST=='4':
-            row= box.row();    row.prop(self,'DT3')
-            if   self.DT3=='1':row.prop(self,'VL1')
-            elif self.DT3=='2':row.prop(self,'VL3')
-            elif self.DT3=='3':row.prop(self,'VL4')
-        row =layout.row()
-        for i in range(0,self.gen):
-            row.prop(self,'gnx'+str(i))
-        for j in range(0,self.yuk):
-            row=layout.row()
-            row.prop(self,'gny'+str(self.yuk-j-1))
-            for i in range(0,self.gen):
-                row.prop(self,'k'+str(self.yuk-j-1)+str(i))
-    def execute(self, context):
-        if self.son!=self.prs:
-            Prs(self)
-            self.son=self.prs
-        add_object(self,context)
-        return {'FINISHED'}
-# Registration
-def menu_func_pencere(self, context):
-    self.layout.operator(PENCERE.bl_idname,text="Window",icon="MOD_LATTICE")
-def register():
-    bpy.utils.register_class(PENCERE)
-    bpy.types.INFO_MT_mesh_add.append(menu_func_pencere)
-def unregister():
-    bpy.utils.unregister_class(PENCERE)
-    bpy.types.INFO_MT_mesh_add.remove(menu_func_pencere)
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/general.py b/release/scripts/addons_contrib/add_mesh_building_objects/general.py
deleted file mode 100644
index 4012735..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/general.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# Stairbuilder - General
-#
-# General is an object for creating meshes given the verts and faces.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 29, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-from bpy_extras import object_utils
-from math import atan
-from mathutils import Vector
-
-class General:
-    def __init__(self,rise,run,N):
-        self.stop=float(N)*Vector([run,0,rise])
-        self.slope=rise/run
-        self.angle=atan(self.slope)
-        #identical quads for all objects except stringer
-        self.faces=[[0,1,3,2],[0,1,5,4],[0,2,6,4],[4,5,7,6],[2,3,7,6],[1,3,7,5]]
-
-    def Make_mesh(self, verts, faces, name):        
-        # Create new mesh
-        mesh = bpy.data.meshes.new(name)
-
-        # Make a mesh from a list of verts/edges/faces.
-        mesh.from_pydata(verts, [], faces)
-
-        # Set mesh to use auto smoothing:
-        mesh.use_auto_smooth = True
-
-        # Update mesh geometry after adding stuff.
-        mesh.update()
-
-        return object_utils.object_data_add(bpy.context, mesh, operator=None)
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/post.py b/release/scripts/addons_contrib/add_mesh_building_objects/post.py
deleted file mode 100644
index 949e081..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/post.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# Stairbuilder - Post generation
-#
-# Generates posts for stair generation.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 29, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-from mathutils import Vector
-
-class Posts:
-    def __init__(self,G,rise,run,d,w,wT,nP,hR,tR, rEnable, lEnable):
-        self.G = G #General
-        self.rise = rise #Stair rise
-        self.run = run #Stair run
-        self.x1=Vector([0,0,hR-tR]) #rail start
-        self.x2=G.stop+Vector([0,0,hR-tR]) #rail stop
-        self.d=d #post depth
-        self.w=w #post width
-        self.wT=wT #tread width
-        self.nP=nP #number of posts 
-        self.sp=Vector([(self.x2[0]-self.x1[0])/float(nP+1),0,0]) #spacing between posts
-        self.rEnable = rEnable
-        self.lEnable = lEnable
-        self.Create()
-
-    def Intersect(self,i,d):
-        """find intersection point, x, for rail and post"""
-        x3=self.x1+i*self.sp+Vector([d,d,d])
-        x4=x3+Vector([0,0,self.x2[-1]])
-        a=self.x2-self.x1
-        b=x4-x3
-        c=x3-self.x1
-        cr_ab=a.cross(b)
-        mag_cr_ab=(cr_ab * cr_ab)
-        return self.x1+a*((c.cross(b).dot(cr_ab))/mag_cr_ab)
-
-    def Create(self):
-        for i in range(0,self.nP+2,1):
-            coords = []
-            #intersections with rail
-            coords.append(self.Intersect(i,0.0))
-            coords.append(self.Intersect(i,self.d))
-            #intersections with tread
-            coords.append(Vector([self.x1[0]+i*self.sp[0],0,
-                                  int(coords[0][0]/self.run)*self.rise]))
-            coords.append(coords[2]+Vector([self.d,0,0]))
-            #inner face
-            for j in range(4):
-                coords.append(coords[j]+Vector([0,self.w,0]))
-            if self.rEnable:
-                self.G.Make_mesh(coords, self.G.faces, 'posts')
-            if self.lEnable:
-                #make post on other side of steps as well
-                for j in coords:
-                    j += Vector([0,self.wT-self.w,0])
-                self.G.Make_mesh(coords, self.G.faces, 'posts')
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/rail.py b/release/scripts/addons_contrib/add_mesh_building_objects/rail.py
deleted file mode 100644
index 85c31dd..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/rail.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# Stairbuilder - Retainer generation
-#
-# Generates retainers for stair generation.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 29, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-from math import tan
-from mathutils import Vector
-
-class Rails:
-    def __init__(self,G,w,t,h,tT,wP,dP,wT, rEnable, lEnable):
-        self.G = G #General
-        self.w=w #rail width
-        self.t=t #rail thickness
-        self.h=h #rail height
-        self.start=Vector([0,0,self.h-self.t]) #rail start
-        self.stop=G.stop+Vector([0,0,self.h-self.t]) #rail stop
-        self.tT=tT #tread toe
-        self.wP=wP #post width
-        self.dP=dP #post depth
-        self.wT=wT #tread width
-        self.rEnable = rEnable
-        self.lEnable = lEnable
-        self.Create()
-
-    def Create(self):
-        #determine offset to include railing toe
-        offset=Vector([self.tT,0,self.tT*tan(self.G.angle)])
-        coords = []
-        coords.append(self.start-offset)
-        coords.append(self.stop+offset+Vector([self.dP,0,
-                                               self.dP*tan(self.G.angle)]))
-        coords.append(self.start-offset+Vector([0,self.w,0]))
-        coords.append(self.stop+offset+Vector([self.dP,self.w,
-                                               self.dP*tan(self.G.angle)]))
-        for j in range(4):
-            coords.append(coords[j]+Vector([0,0,self.t]))
-        #centre over posts
-        for j in coords:
-            j += Vector([0,0.5*(-self.w+self.wP),0])
-        if self.rEnable:
-            self.G.Make_mesh(coords, self.G.faces, 'rails')
-        if self.lEnable:
-            #make rail on other side
-            for j in coords:
-                j += Vector([0,self.wT-self.wP,0])
-            self.G.Make_mesh(coords, self.G.faces, 'rails')
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/retainer.py b/release/scripts/addons_contrib/add_mesh_building_objects/retainer.py
deleted file mode 100644
index 8c8a22c..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/retainer.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# Stairbuilder - Retainer generation
-#
-# Generates retainers for stair generation.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 29, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-from mathutils import Vector
-
-class Retainers:
-    def __init__(self,G,w,h,wP,wT,hR,n, rEnable, lEnable):
-        self.G = G #General
-        self.w=w #retainer width
-        self.h=h #retainer height
-        self.wP=wP #post width
-        self.wT=wT #tread width
-        self.nR=n #number of retainers
-        self.sp=hR/float(n+1) #retainer spacing
-        self.rEnable = rEnable
-        self.lEnable = lEnable
-        self.Create()
-
-    def Create(self):
-        for i in range(self.nR):
-            coords = []
-            offset=(i+1)*Vector([0,0,self.sp])
-            coords.append(offset)
-            coords.append(self.G.stop + offset)
-            coords.append(offset + Vector([0,self.w,0]))
-            coords.append(self.G.stop + offset + Vector([0,self.w,0]))
-            for j in range(4):
-                coords.append(coords[j] + Vector([0,0,self.h]))
-            #centre in posts
-            for j in coords:
-                j += Vector([0,0.5*(self.wP-self.w),0])
-            if self.rEnable:
-                self.G.Make_mesh(coords, self.G.faces, 'retainers')
-            if self.lEnable:
-                #make retainer on other side
-                for j in coords:
-                    j += Vector([0,self.wT-self.wP,0])
-                self.G.Make_mesh(coords,self.G.faces, 'retainers')
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/stairbuilder.py b/release/scripts/addons_contrib/add_mesh_building_objects/stairbuilder.py
deleted file mode 100644
index 0c2336b..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/stairbuilder.py
+++ /dev/null
@@ -1,561 +0,0 @@
-# Stairs and railing creator script for blender 2.49
-# Author: Nick van Adium
-# Date: 2010 08 09
-# 
-# Creates a straight-run staircase with railings and stringer
-# All components are optional and can be turned on and off by setting e.g. makeTreads=True or makeTreads=False
-# No GUI for the script, all parameters must be defined below
-# Current values assume 1 blender unit = 1 metre
-# 
-# Stringer will rest on lower landing and hang from upper landing
-# Railings start on the lowest step and end on the upper landing
-# 
-# NOTE: You must have numpy installed for this script to work!
-#       numpy is used to easily perform the necessary algebra
-#       numpy can be found at http://www.scipy.org/Download
-# 
-# Note: I'm not sure how to use recalcNormals so not all normals points ouwards.
-#       Perhaps someone else can contribute this.
-#
-#-----------------------------------------------------------
-#
-# Converted to Blender 2.5:
-#   - Still uses NumPy.
-#   - Classes are basically copy-paste from the original code
-#   - New Make_mesh copied from BrikBot's rock generator
-#   - Implemented standard add mesh GUI.
-#   @todo:
-#   - global vs. local needs cleaned up.
-#   - Join separate stringer objects and then clean up the mesh.
-#   - Put all objects into a group.
-#   - Generate left/right posts/railings/retainers separatly with
-#       option to disable just the left/right.
-#   - Add wall railing type as an option for left/right
-#   - Add different rail styles (profiles).  Select with enum.
-#   - Should have a non-NumPy code path for cross-compatability.
-#       - Could be another file with equivalent classes/functions?
-#           Then we would just import from there instead of from
-#           NumPy without having to change the actual code.  It
-#           would instead be a "try-except" block that trys to use
-#           NumPy.
-#   - Would like to add additional staircase types.
-#       - Spiral staircase
-#       - "L" staircase
-#       - "T" staircase
-#
-# Last Modified By: Paul "brikbot" Marshall
-# Last Modification: January 29, 2011
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#-----------------------------------------------------------
-# BEGIN NEW B2.5/Py3.2 CODE
-import bpy
-from add_mesh_building_objects.general import General
-from add_mesh_building_objects.post import Posts
-from add_mesh_building_objects.rail import Rails
-from add_mesh_building_objects.retainer import Retainers
-from add_mesh_building_objects.stringer import Stringer
-from add_mesh_building_objects.tread import Treads
-from bpy.props import (BoolProperty,
-                       EnumProperty,
-                       IntProperty,
-                       FloatProperty)
-from mathutils import Vector
-
-global G
-global typ
-global typ_s
-global typ_t
-global rise
-global run               
-            
-class stairs(bpy.types.Operator):
-    """Add stair objects"""
-    bl_idname = "mesh.stairs"
-    bl_label = "Add Stairs"
-    bl_options = {'REGISTER', 'UNDO'}
-    bl_description = "Add stairs"
-
-    # Stair types for enum:
-    id1 = ("id1", "Freestanding", "Generate a freestanding staircase.")
-    id2 = ("id2", "Housed-Open", "Generate a housed-open staircase.")
-    id3 = ("id3", "Box", "Generate a box staircase.")
-    id4 = ("id4", "Circular", "Generate a circular or spiral staircase.")
-
-    # Tread types for enum:
-    tId1 = ("tId1", "Classic", "Generate wooden style treads")
-    tId2 = ("tId2", "Basic Steel", "Generate common steel style treads")
-    tId3 = ("tId3", "Bar 1", "Generate bar/slat steel treads")
-    tId4 = ("tId4", "Bar 2", "Generate bar-grating steel treads")
-    tId5 = ("tId5", "Bar 3", "Generate bar-support steel treads")
-
-    # Stringer types for enum:
-    sId1 = ("sId1", "Classic", "Generate a classic style stringer")
-    sId2 = ("sId2", "I-Beam", "Generate a steel I-beam stringer")
-    sId3 = ("sId3", "C-Beam", "Generate a C-channel style stringer")
-    
-    typ = EnumProperty(name = "Type",
-                       description = "Type of staircase to generate",
-                       items = [id1, id2, id3, id4])
-
-    rise = FloatProperty(name = "Rise",
-                         description = "Single tread rise",
-                         min = 0.0, max = 1024.0,
-                         default = 0.20)
-    run = FloatProperty(name = "Run",
-                        description = "Single tread run",
-                        min = 0.0, max = 1024.0,
-                        default = 0.30)
-
-    #for circular
-    rad1 = FloatProperty(name = "Inner Radius",
-                         description = "Inner radius for circular staircase",
-                         min = 0.0, max = 1024.0,
-                         soft_max = 10.0,
-                         default = 0.25)
-    rad2 = FloatProperty(name = "Outer Radius",
-                         description = "Outer radius for circular staircase",
-                         min = 0.0, max = 1024.0,
-                         soft_min = 0.015625, soft_max = 32.0,
-                         default = 1.0)
-    deg = FloatProperty(name = "Degrees",
-                        description = "Number of degrees the stairway rotates",
-                        min = 0.0, max = 92160.0, step = 5.0,
-                        default = 450.0)
-    center = BoolProperty(name = "Center Pillar",
-                          description = "Generate a central pillar",
-                          default = False)
-
-    #for treads
-    make_treads = BoolProperty(name = "Make Treads",
-                              description = "Enable tread generation",
-                              default = True)
-    tread_w = FloatProperty(name = "Tread Width",
-                            description = "Width of each generated tread",
-                            min = 0.0001, max = 1024.0,
-                            default = 1.2)
-    tread_h = FloatProperty(name = "Tread Height",
-                            description = "Height of each generated tread",
-                            min = 0.0001, max = 1024.0,
-                            default = 0.04)
-    tread_t = FloatProperty(name = "Tread Toe",
-                            description = "Toe (aka \"nosing\") of each generated tread",
-                            min = 0.0, max = 10.0,
-                            default = 0.03)
-    tread_o = FloatProperty(name = "Tread Overhang",
-                            description = "How much tread \"overhangs\" the sides",
-                            min = 0.0, max = 1024.0,
-                            default = 0.025)
-    tread_n = IntProperty(name = "Number of Treads",
-                          description = "How many treads to generate",
-                          min = 1, max = 1024,
-                          default = 10)
-    typ_t = EnumProperty(name = "Tread Type",
-                         description = "Type/style of treads to generate",
-                         items = [tId1, tId2, tId3, tId4, tId5])
-    tread_tk = FloatProperty(name = "Thickness",
-                             description = "Thickness of the treads",
-                             min = 0.0001, max = 10.0,
-                             default = 0.02)
-    tread_sec = IntProperty(name = "Sections",
-                            description = "Number of sections to use for tread",
-                            min = 1, max = 1024,
-                            default = 5)
-    tread_sp = IntProperty(name = "Spacing",
-                           description = "Total spacing between tread sections as a percentage of total tread width",
-                           min = 0, max = 80,
-                           default = 5)
-    tread_sn = IntProperty(name = "Crosses",
-                           description = "Number of cross section supports",
-                           min = 2, max = 1024,
-                           default = 4)
-    #special circular tread properties:
-    tread_slc = IntProperty(name = "Slices",
-                            description = "Number of slices each tread is composed of",
-                            min = 1, max = 1024,
-                            soft_max = 16,
-                            default = 4)
-
-    #for posts
-    make_posts = BoolProperty(name = "Make Posts",
-                              description = "Enable post generation",
-                              default = True)
-    post_d = FloatProperty(name = "Post Depth",
-                           description = "Depth of generated posts",
-                           min = 0.0001, max = 10.0,
-                           default = 0.04)
-    post_w = FloatProperty(name = "Post Width",
-                           description = "Width of generated posts",
-                           min = 0.0001, max = 10.0,
-                           default = 0.04)
-    post_n = IntProperty(name = "Number of Posts",
-                         description = "Number of posts to generated",
-                         min = 1, max = 1024,
-                         default = 5)
-
-    #for railings
-    make_railings = BoolProperty(name = "Make Railings",
-                                 description = "Generate railings",
-                                 default = True)
-    rail_w = FloatProperty(name = "Railings Width",
-                           description = "Width of railings to generate",
-                           min = 0.0001, max = 10.0,
-                           default = 0.12)
-    rail_t = FloatProperty(name = "Railings Thickness",
-                           description = "Thickness of railings to generate",
-                           min = 0.0001, max = 10.0,
-                           default = 0.03)
-    rail_h = FloatProperty(name = "Railings Height",
-                           description = "Height of railings to generate",
-                           min = 0.0001, max = 10.0,
-                           default = 0.90)
-
-    #for retainers
-    make_retainers = BoolProperty(name = "Make Retainers",
-                                  description = "Generate retainers",
-                                  default = True)
-    ret_w = FloatProperty(name = "Retainer Width",
-                          description = "Width of generated retainers",
-                          min = 0.0001, max = 10.0,
-                          default = 0.01)
-    ret_h = FloatProperty(name = "Retainer Height",
-                          description = "Height of generated retainers",
-                          min = 0.0001, max = 10.0,
-                          default = 0.01)
-    ret_n = IntProperty(name = "Number of Retainers",
-                        description = "Number of retainers to generated",
-                        min = 1, max = 1024,
-                        default = 3)
-
-    #for stringer
-    make_stringer = BoolProperty(name = "Make Stringer",
-                                 description = "Generate stair stringer",
-                                 default = True)
-    typ_s = EnumProperty(name = "Stringer Type",
-                         description = "Type/style of stringer to generate",
-                         items = [sId1, sId2, sId3])
-    string_n = IntProperty(name = "Number of Stringers",
-                           description = "Number of stringers to generate",
-                           min = 1, max = 10,
-                           default = 1)
-    string_dis = BoolProperty(name = "Distributed",
-                              description = "Use distributed stringers",
-                              default = False)
-    string_w = FloatProperty(name = "Stringer width",
-                             description = "Width of stringer as a percentage of tread width",
-                             min = 0.0001, max = 100.0,
-                             default = 15.0)
-    string_h = FloatProperty(name = "Stringer Height",
-                             description = "Height of the stringer",
-                             min = 0.0001, max = 100.0,
-                             default = 0.3)
-    string_tw = FloatProperty(name = "Web Thickness",
-                              description = "Thickness of the beam's web as a percentage of width",
-                              min = 0.0001, max = 100.0,
-                              default = 25.0)
-    string_tf = FloatProperty(name = "Flange Thickness",
-                              description = "Thickness of the flange",
-                              min = 0.0001, max = 100.0,
-                              default = 0.05)
-    string_tp = FloatProperty(name = "Flange Taper",
-                              description = "Flange thickness taper as a percentage",
-                              min = 0.0, max = 100.0,
-                              default = 0.0)
-    string_g = BoolProperty(name = "Floating",
-                            description = "Cut bottom of strigner to be a \"floating\" section",
-                            default = False)
-
-    use_original = BoolProperty(name = "Use legacy method",
-                                description = "Use the Blender 2.49 legacy method for stair generation",
-                                default = True)
-    rEnable = BoolProperty(name = "Right Details",
-                           description = "Generate right side details (posts/rails/retainers)",
-                           default = True)
-    lEnable = BoolProperty(name = "Left Details",
-                           description = "Generate left side details (posts/rails/retainers)",
-                           default = True)
-
-    # Draw the GUI:
-    def draw(self, context):
-        layout = self.layout
-        box = layout.box()
-        box.prop(self, 'typ')
-        box = layout.box()
-        box.prop(self, 'rise')
-        if self.typ != "id4":
-            box.prop(self, 'run')
-        else:
-            box.prop(self, 'deg')
-            box.prop(self, 'rad1')
-            box.prop(self, 'rad2')
-            box.prop(self, 'center')
-        if self.typ == "id1":
-            box.prop(self, 'use_original')
-            if not self.use_original:
-                box.prop(self, 'rEnable')
-                box.prop(self, 'lEnable')
-        else:
-            self.use_original = False
-            box.prop(self, 'rEnable')
-            box.prop(self, 'lEnable')
-            
-        # Treads
-        box = layout.box()
-        box.prop(self, 'make_treads')
-        if self.make_treads:
-            if not self.use_original and self.typ != "id4":
-                box.prop(self, 'typ_t')
-            else:
-                self.typ_t = "tId1"
-            if self.typ != "id4":
-                box.prop(self, 'tread_w')
-            box.prop(self, 'tread_h')
-            box.prop(self, 'tread_t')
-            if self.typ not in ["id2", "id4"]:
-                box.prop(self, 'tread_o')
-            else:
-                self.tread_o = 0.0
-            box.prop(self, 'tread_n')
-            if self.typ_t != "tId1":
-                box.prop(self, 'tread_tk')
-                box.prop(self, 'tread_sec')
-                if self.tread_sec > 1 and self.typ_t not in ["tId3", "tId4"]:
-                    box.prop(self, 'tread_sp')
-                if self.typ_t in ["tId3", "tId4", "tId5"]:
-                    box.prop(self, 'tread_sn')
-            elif self.typ == "id4":
-                box.prop(self, "tread_slc")
-                    
-        # Posts
-        box = layout.box()
-        box.prop(self, 'make_posts')
-        if self.make_posts:
-            box.prop(self, 'post_d')
-            box.prop(self, 'post_w')
-            box.prop(self, 'post_n')
-            
-        # Railings
-        box = layout.box()
-        box.prop(self, 'make_railings')
-        if self.make_railings:
-            box.prop(self, 'rail_w')
-            box.prop(self, 'rail_t')
-            box.prop(self, 'rail_h')
-            
-        # Retainers
-        box = layout.box()
-        box.prop(self, 'make_retainers')
-        if self.make_retainers:
-            box.prop(self, 'ret_w')
-            box.prop(self, 'ret_h')
-            box.prop(self, 'ret_n')
-            
-        # Stringers
-        box = layout.box()
-        if self.typ != "id2":
-            box.prop(self, 'make_stringer')
-        else:
-            self.make_stringer = True
-        if self.make_stringer:
-            if not self.use_original:
-                box.prop(self, 'typ_s')
-            else:
-                self.typ_s = "sId1"
-            box.prop(self, 'string_w')
-            if self.typ == "id1":
-                if self.typ_s == "sId1" and not self.use_original:
-                    box.prop(self, 'string_n')
-                    box.prop(self, 'string_dis')
-                elif self.typ_s in ["sId2", "sId3"]:
-                    box.prop(self, 'string_n')
-                    box.prop(self, 'string_dis')
-                    box.prop(self, 'string_h')
-                    box.prop(self, 'string_tw')
-                    box.prop(self, 'string_tf')
-                    box.prop(self, 'string_tp')
-                    box.prop(self, 'string_g')
-            elif self.typ == "id2":
-                if self.typ_s in ["sId2", "sId3"]:
-                    box.prop(self, 'string_tw')
-                    box.prop(self, 'string_tf')
-
-        # Tread support:
-##        if self.make_stringer and typ_s in ["sId2", "sId3"]:
-
-    def execute(self, context):
-        global G
-        global typ
-        global typ_s
-        global typ_t
-        global rise
-        global run
-        typ = self.typ
-        typ_s = self.typ_s
-        typ_t = self.typ_t
-        rise = self.rise
-        run = self.run
-        G=General(rise,run,self.tread_n)
-        if self.make_treads:
-            if typ != "id4":
-                Treads(G,
-                       typ,
-                       typ_t,
-                       run,
-                       self.tread_w,
-                       self.tread_h,
-                       self.run,
-                       self.rise,
-                       self.tread_t,
-                       self.tread_o,
-                       self.tread_n,
-                       self.tread_tk,
-                       self.tread_sec,
-                       self.tread_sp,
-                       self.tread_sn)
-            else:
-                Treads(G,
-                       typ,
-                       typ_t,
-                       self.deg,
-                       self.rad2,
-                       self.tread_h,
-                       self.run,
-                       self.rise,
-                       self.tread_t,
-                       self.rad1,
-                       self.tread_n,
-                       self.tread_tk,
-                       self.tread_sec,
-                       self.tread_sp,
-                       self.tread_sn,
-                       self.tread_slc)
-        if self.make_posts and (self.rEnable or self.lEnable):
-            Posts(G,
-                  rise,
-                  run,
-                  self.post_d,
-                  self.post_w,
-                  self.tread_w,
-                  self.post_n,
-                  self.rail_h,
-                  self.rail_t,
-                  self.rEnable,
-                  self.lEnable)
-        if self.make_railings and (self.rEnable or self.lEnable):
-            Rails(G,
-                  self.rail_w,
-                  self.rail_t,
-                  self.rail_h,
-                  self.tread_t,
-                  self.post_w,
-                  self.post_d,
-                  self.tread_w,
-                  self.rEnable,
-                  self.lEnable)
-        if self.make_retainers and (self.rEnable or self.lEnable):
-            Retainers(G,
-                      self.ret_w,
-                      self.ret_h,
-                      self.post_w,
-                      self.tread_w,
-                      self.rail_h,
-                      self.ret_n,
-                      self.rEnable,
-                      self.lEnable)
-        if self.make_stringer:
-            if typ == "id1" and self.use_original:
-                Stringer(G,
-                         typ,
-                         typ_s,
-                         rise,
-                         run,
-                         self.string_w,
-                         self.string_h,
-                         self.tread_n,
-                         self.tread_h,
-                         self.tread_w,
-                         self.tread_t,
-                         self.tread_o,
-                         self.string_tw,
-                         self.string_tf,
-                         self.string_tp,
-                         not self.string_g)
-            elif typ == "id3":
-                Stringer(G,
-                         typ,
-                         typ_s,
-                         rise,
-                         run,
-                         100,
-                         self.string_h,
-                         self.tread_n,
-                         self.tread_h,
-                         self.tread_w,
-                         self.tread_t,
-                         self.tread_o,
-                         self.string_tw,
-                         self.string_tf,
-                         self.string_tp,
-                         not self.string_g,
-                         1, False, False)
-            elif typ == "id4":
-                Stringer(G,
-                         typ,
-                         typ_s,
-                         rise,
-                         self.deg,
-                         self.string_w,
-                         self.string_h,
-                         self.tread_n,
-                         self.tread_h,
-                         self.rad2 - self.rad1,
-                         self.tread_t,
-                         self.rad1,
-                         self.string_tw,
-                         self.string_tf,
-                         self.string_tp,
-                         not self.string_g,
-                         self.string_n,
-                         self.string_dis,
-                         self.use_original,
-                         self.tread_slc)
-            else:
-                Stringer(G,
-                         typ,
-                         typ_s,
-                         rise,
-                         run,
-                         self.string_w,
-                         self.string_h,
-                         self.tread_n,
-                         self.tread_h,
-                         self.tread_w,
-                         self.tread_t,
-                         self.tread_o,
-                         self.string_tw,
-                         self.string_tf,
-                         self.string_tp,
-                         not self.string_g,
-                         self.string_n,
-                         self.string_dis,
-                         self.use_original)
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/stringer.py b/release/scripts/addons_contrib/add_mesh_building_objects/stringer.py
deleted file mode 100644
index 99af723..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/stringer.py
+++ /dev/null
@@ -1,504 +0,0 @@
-# Stairbuilder - Stringer generation
-#
-# Generates stringer mesh for stair generation.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-#   Stringer Type (typ_s):
-#       - sId1 = Classic
-#       - sId2 = I-Beam
-#       - sId3 = C-Beam
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 29, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-from math import atan, cos, radians, tan
-from mathutils import Matrix, Vector
-from mathutils.geometry import (intersect_line_plane,
-                                intersect_line_line)
-
-class Stringer:
-    def  __init__(self,G,typ,typ_s,rise,run,w,h,nT,hT,wT,tT,tO,tw,tf,tp,g,
-                  nS=1,dis=False,notMulti=True,deg=4):
-        self.G = G #General
-        self.typ = typ # Stair type
-        self.typ_s = typ_s # Stringer type
-        self.rise = rise #Stair rise
-        self.run = run #Stair run. Degrees if self.typ == "id4"
-        if notMulti:
-            self.w = w / 100 #stringer width
-        else:
-            self.w = (wT * (w / 100)) / nS
-        self.h = h #stringer height
-        self.nT = nT #number of treads
-        self.hT = hT #tread height
-        self.wT = wT #tread width
-        self.tT = tT #tread toe
-        self.tO = tO #Tread overhang. Inner radius if self.typ == "id4"
-        self.tw = self.w * (tw / 100) #stringer web thickness
-        self.tf = tf #stringer flange thickness
-        self.tp = 1 - (tp / 100) #stringer flange taper
-        self.g = g #does stringer intersect the ground?
-        self.nS = nS #number of stringers
-        self.dis = dis #Use distributed stringers
-        self.deg = deg #number of sections per "slice". Only applys if self.typ == "id4"
-        # Default stringer object (classic / sId1):
-        self.faces1=[[0,1,3,2],[1,5,3],[3,5,4],[6,7,9,8],[7,11,9],[9,11,10],
-                     [0,2,8,6],[0,1,7,6],[1,5,11,7],[2,3,9,8],[3,4,10,9],[4,5,11,10]]
-        # Box stair type stringer:
-        self.faces2=[[0,1,7,6],[1,3,9,7],[3,4,10,9],[4,10,11,5],[5,11,8,2],
-                     [2,8,6,0],[0,1,2],[1,2,5,3],[3,4,5],[6,7,8],[7,8,11,9],[9,10,11]]
-        # I-beam stringer (id2 / sId2 / Taper < 100%):
-        self.faces3a=[[0,1,17,16],[1,2,18,17],[2,3,19,18],[3,4,20,19],[4,5,21,20],[5,6,22,21],
-                      [6,7,23,22],[7,8,24,23],[8,9,25,24],[9,10,26,25],[10,11,27,26],
-                      [11,12,28,27],[12,13,29,28],[13,14,30,29],[14,15,31,30],[15,0,16,31],
-                      [0,1,2,15],[2,11,14,15],[11,12,13,14],[2,3,10,11],[3,4,5,6],[3,6,7,10],
-                      [7,8,9,10],[16,17,18,31],[18,27,30,31],[27,28,29,30],[18,19,26,27],
-                      [19,20,21,22],[19,22,23,26],[23,24,25,26]]
-        # I-beam stringer (id2 / sId2 / Taper = 100%):
-        self.faces3b=[[0,1,9,8],[1,2,10,9],[2,3,11,10],[3,4,12,11],[4,5,13,12],[5,6,14,13],
-                      [6,7,15,14],[7,0,8,15],[0,1,6,7],[1,2,5,6],[2,3,4,5],[8,9,14,15],
-                      [9,10,13,14],[10,11,12,13]]
-        # I-beam stringer (id3 / sId2 / Taper < 100%):
-        self.faces3c=[[0,1,2,7],[2,3,6,7],[3,4,5,6],[1,2,23,16],[2,3,22,23],
-                      [3,4,21,22],[16,17,18,23],[18,19,22,23],[19,20,21,22],
-                      [17,8,15,18],[18,15,14,19],[19,14,13,20],[8,9,10,15],
-                      [10,11,14,15],[11,12,13,14],[9,10,53,52],[10,11,54,53],
-                      [11,12,55,54],[52,53,61,60],[53,54,62,61],[54,55,63,62],
-                      [60,61,34,33],[61,62,35,34],[62,63,36,35],[32,33,34,39],
-                      [34,35,38,39],[35,36,37,38],[41,32,39,42],[42,39,38,43],
-                      [43,38,37,44],[40,41,42,47],[42,43,46,47],[43,44,45,46],
-                      [25,26,47,40],[26,27,46,47],[27,28,45,46],[24,25,26,31],
-                      [26,27,30,31],[27,28,29,30],[24,31,57,56],[31,30,58,57],
-                      [30,29,59,58],[48,49,57,56],[49,50,58,57],[50,51,59,58],
-                      [0,7,49,48],[7,6,50,49],[6,5,51,50],[0,1,16,48],[16,40,56,48],
-                      [24,25,40,56],[16,17,41,40],[8,9,52,17],[17,52,60,41],
-                      [32,33,60,41],[12,13,20,55],[20,44,63,55],[37,44,63,36],
-                      [20,21,45,44],[28,29,51,21],[21,51,59,45],[28,45,59,29],
-                      [4,5,51,21]]
-        # C-beam stringer (id3 / sId3 / Taper < 100%):
-        self.faces4c=[[0,1,2,7],[2,3,6,7],[3,4,5,6],[1,2,23,16],[2,3,22,23],[3,4,21,22],
-                      [16,17,18,23],[18,19,22,23],[19,20,21,22],[17,8,15,18],[18,15,14,19],
-                      [19,14,13,20],[8,9,10,15],[10,11,14,15],[11,12,13,14],[0,24,25,7],
-                      [7,25,26,6],[6,26,27,5],[9,31,30,10],[10,30,29,11],[11,29,28,12],
-                      [24,25,30,31],[25,26,29,30],[26,27,28,29],[0,1,16,24],[16,24,31,17],
-                      [8,9,31,17],[4,5,27,21],[20,21,27,28],[12,13,20,28]]
-        self.Create()
-
-
-    def Create(self):
-        if self.typ == "id1":
-            if self.typ_s == "sId1":
-                if self.dis or self.nS == 1:
-                    offset = (self.wT / (self.nS + 1)) - (self.w / 2)
-                else:
-                    offset = 0
-                for i in range(self.nS):
-                    for j in range(self.nT):
-                        coords = []
-                        coords.append(Vector([0, offset, -self.rise]))
-                        coords.append(Vector([self.run, offset, -self.rise]))
-                        coords.append(Vector([0, offset, -self.hT]))
-                        coords.append(Vector([self.run, offset, -self.hT]))
-                        coords.append(Vector([self.run, offset, 0]))
-                        coords.append(Vector([self.run * 2, offset, 0]))
-                        for k in range(6):
-                            coords.append(coords[k]+Vector([0, self.w, 0]))
-                        for k in coords:
-                            k += j*Vector([self.run, 0, self.rise])
-                        self.G.Make_mesh(coords,self.faces1,'stringer')
-                    if self.dis or self.nS == 1:
-                        offset += self.wT / (self.nS + 1)
-                    else:
-                        offset += (self.wT - self.w) / (self.nS - 1)
-            elif self.typ_s == "sId2":
-                self.I_beam()
-        elif self.typ == "id2":
-            if self.typ_s == "sId1":
-                coords = []
-                coords.append(Vector([-self.tT, -self.w, -self.rise]))
-                coords.append(Vector([self.hT / self.G.slope, -self.w, -self.rise]))
-                coords.append(Vector([-self.tT, -self.w, 0]))
-                coords.append(Vector([self.nT * self.run, -self.w,
-                                      ((self.nT - 1) * self.rise) - self.hT]))
-                coords.append(Vector([self.nT * self.run, -self.w, self.nT * self.rise]))
-                coords.append(Vector([(self.nT * self.run) - self.tT, -self.w,
-                                      self.nT * self.rise]))
-                for i in range(6):
-                    coords.append(coords[i] + Vector([0, self.w, 0]))
-                self.G.Make_mesh(coords, self.faces2, 'stringer')
-                for i in coords:
-                    i += Vector([0, self.w + self.wT, 0])
-                self.G.Make_mesh(coords, self.faces2, 'stringer')
-            elif self.typ_s == "sId2":
-                self.housed_I_beam()
-            elif self.typ_s == "sId3":
-                self.housed_C_beam()
-        elif self.typ == "id3":
-            h = (self.rise - self.hT) - self.rise #height of top section
-            for i in range(self.nT):
-                coords = []
-                coords.append(Vector([i * self.run,0,-self.rise]))
-                coords.append(Vector([(i + 1) * self.run,0,-self.rise]))
-                coords.append(Vector([i * self.run,0,h + (i * self.rise)]))
-                coords.append(Vector([(i + 1) * self.run,0,h + (i * self.rise)]))
-                for j in range(4):
-                    coords.append(coords[j] + Vector([0,self.wT,0]))
-                self.G.Make_mesh(coords, self.G.faces, 'stringer')
-        elif self.typ == "id4":
-            offset = (self.wT / (self.nS + 1)) - (self.w / 2)
-            for s in range(self.nS):
-                base = self.tO + (offset * (s + 1))
-                start = [Vector([0, -base, -self.hT]),
-                         Vector([0, -base, -self.hT - self.rise]),
-                         Vector([0, -base - self.w, -self.hT]),
-                         Vector([0, -base - self.w, -self.hT - self.rise])]
-                self.d = radians(self.run) / self.nT
-                for i in range(self.nT):
-                    coords = []
-                    # Base faces.  Should be able to append more sections:
-                    tId4_faces = [[0, 1, 3, 2]]
-                    t_inner = Matrix.Rotation(self.d * i, 3, 'Z')
-                    coords.append((t_inner * start[0]) + Vector([0, 0, self.rise * i]))
-                    coords.append((t_inner * start[1]) + Vector([0, 0, self.rise * i]))
-                    t_outer = Matrix.Rotation(self.d * i, 3, 'Z')
-                    coords.append((t_outer * start[2]) + Vector([0, 0, self.rise * i]))
-                    coords.append((t_outer * start[3]) + Vector([0, 0, self.rise * i]))
-                    k = 0
-                    for j in range(self.deg):
-                        k = (j * 4) + 4
-                        tId4_faces.append([k, k - 4, k - 3, k + 1])
-                        tId4_faces.append([k - 2, k - 1, k + 3, k + 2])
-                        tId4_faces.append([k + 1, k - 3, k - 1, k + 3])
-                        tId4_faces.append([k, k - 4, k - 2, k + 2])
-                        rot = Matrix.Rotation(((self.d * (j + 1)) / self.deg) + (self.d * i), 3, 'Z')
-                        for v in start:
-                            coords.append((rot * v) + Vector([0, 0, self.rise * i]))
-                    for j in range(self.deg):
-                        k = ((j + self.deg) * 4) + 4
-                        tId4_faces.append([k, k - 4, k - 3, k + 1])
-                        tId4_faces.append([k - 2, k - 1, k + 3, k + 2])
-                        tId4_faces.append([k + 1, k - 3, k - 1, k + 3])
-                        tId4_faces.append([k, k - 4, k - 2, k + 2])
-                        rot = Matrix.Rotation(((self.d * ((j + self.deg) + 1)) / self.deg) + (self.d * i), 3, 'Z')
-                        for v in range(4):
-                            if v in [1, 3]:
-                                incline = (self.rise * i) + (self.rise / self.deg) * (j + 1)
-                                coords.append((rot * start[v]) + Vector([0, 0, incline]))
-                            else:
-                                coords.append((rot * start[v]) + Vector([0, 0, self.rise * i]))
-                    self.G.Make_mesh(coords, tId4_faces, 'treads')
-
-        return {'FINISHED'}
-
-
-    def I_beam(self):
-        mid = self.w / 2
-        web = self.tw / 2
-        # Bottom of the stringer:
-        baseZ = -self.rise - self.hT - self.h
-        # Top of the strigner:
-        topZ = -self.rise - self.hT
-        # Vertical taper amount:
-        taper = self.tf * self.tp
-
-        if self.dis or self.nS == 1:
-            offset = (self.wT / (self.nS + 1)) - mid
-        else:
-            offset = 0
-
-        # taper < 100%:
-        if self.tp > 0:
-            for i in range(self.nS):
-                coords = []
-                coords.append(Vector([0, offset,                baseZ]))
-                coords.append(Vector([0, offset,                baseZ + taper]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + (mid - web),  topZ - self.tf]))
-                coords.append(Vector([0, offset,                topZ - taper]))
-                coords.append(Vector([0, offset,                topZ]))
-                coords.append(Vector([0, offset + (mid - web),  topZ]))
-                coords.append(Vector([0, offset + (mid + web),  topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ - taper]))
-                coords.append(Vector([0, offset + (mid + web),  topZ - self.tf]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + self.w,       baseZ + taper]))
-                coords.append(Vector([0, offset + self.w,       baseZ]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ]))
-                for j in range(16):
-                    coords.append(coords[j]+Vector([self.run * self.nT, 0, self.rise * self.nT]))
-                # If the bottom meets the ground:
-                #   Bottom be flat with the xy plane, but shifted down.
-                #   Either project onto the plane along a vector (hard) or use the built in
-                #       interest found in mathutils.geometry (easy).  Using intersect:
-                if self.g:
-                    for j in range(16):
-                        coords[j] = intersect_line_plane(coords[j], coords[j + 16],
-                                                         Vector([0, 0, topZ]),
-                                                         Vector([0, 0, 1]))
-                self.G.Make_mesh(coords, self.faces3a, 'stringer')
-
-                if self.dis or self.nS == 1:
-                    offset += self.wT / (self.nS + 1)
-                else:
-                    offset += (self.wT - self.w) / (self.nS - 1)
-        # taper = 100%:
-        else:
-            for i in range(self.nS):
-                coords = []
-                coords.append(Vector([0, offset,                baseZ]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + (mid - web),  topZ - self.tf]))
-                coords.append(Vector([0, offset,                topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ]))
-                coords.append(Vector([0, offset + (mid + web),  topZ - self.tf]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + self.w,       baseZ]))
-                for j in range(8):
-                    coords.append(coords[j]+Vector([self.run * self.nT, 0, self.rise * self.nT]))
-                self.G.Make_mesh(coords, self.faces3b, 'stringer')
-                offset += self.wT / (self.nS + 1)
-                
-        return {'FINISHED'}
-
-
-    def housed_I_beam(self):
-        webOrth = Vector([self.rise, 0, -self.run]).normalized()
-        webHeight = Vector([self.run + self.tT, 0, -self.hT]).project(webOrth).length
-        vDelta_1 = self.tf * tan(self.G.angle)
-        vDelta_2 = (self.rise * (self.nT - 1)) - (webHeight + self.tf)
-        flange_y = (self.w - self.tw) / 2
-        front = -self.tT - self.tf
-        outer = -self.tO - self.tw - flange_y
-
-        coords = []
-        if self.tp > 0:
-            # Upper-Outer flange:
-            coords.append(Vector([front, outer, -self.rise]))
-            coords.append(Vector([-self.tT, outer, -self.rise]))
-            coords.append(Vector([-self.tT, outer, 0]))
-            coords.append(Vector([(self.run * (self.nT - 1)) - self.tT, outer,
-                                  self.rise * (self.nT - 1)]))
-            coords.append(Vector([self.run * self.nT, outer,
-                                  self.rise * (self.nT - 1)]))
-            coords.append(Vector([self.run * self.nT, outer,
-                                  (self.rise * (self.nT - 1)) + self.tf]))
-            coords.append(Vector([(self.run * (self.nT - 1)) - self.tT, outer,
-                                  (self.rise * (self.nT - 1)) + self.tf]))
-            coords.append(Vector([front, outer, self.tf - vDelta_1]))
-            # Lower-Outer flange:
-            coords.append(coords[0] + Vector([self.tf + webHeight, 0, 0]))
-            coords.append(coords[1] + Vector([self.tf + webHeight, 0, 0]))
-            coords.append(intersect_line_line(coords[9],
-                                              coords[9] - Vector([0, 0, 1]),
-                                              Vector([self.run, 0, -self.hT - self.tf]),
-                                              Vector([self.run * 2, 0, self.rise - self.hT - self.tf]))[0])
-            coords.append(Vector([(self.run * self.nT) - ((webHeight - self.hT) / tan(self.G.angle)),
-                                  outer, vDelta_2]))
-            coords.append(coords[4] - Vector([0, 0, self.tf + webHeight]))
-            coords.append(coords[5] - Vector([0, 0, self.tf + webHeight]))
-            coords.append(coords[11] + Vector([0, 0, self.tf]))
-            coords.append(intersect_line_line(coords[8],
-                                              coords[8] - Vector([0, 0, 1]),
-                                              Vector([self.run, 0, -self.hT]),
-                                              Vector([self.run * 2, 0, self.rise - self.hT]))[0])
-            # Outer web:
-            coords.append(coords[1] + Vector([0, flange_y, 0]))
-            coords.append(coords[8] + Vector([0, flange_y, 0]))
-            coords.append(coords[15] + Vector([0, flange_y, 0]))
-            coords.append(coords[14] + Vector([0, flange_y, 0]))
-            coords.append(coords[13] + Vector([0, flange_y, 0]))
-            coords.append(coords[4] + Vector([0, flange_y, 0]))
-            coords.append(coords[3] + Vector([0, flange_y, 0]))
-            coords.append(coords[2] + Vector([0, flange_y, 0]))
-            # Upper-Inner flange and lower-inner flange:
-            for i in range(16):
-                coords.append(coords[i] + Vector([0, self.w, 0]))
-            # Inner web:
-            for i in range(8):
-                coords.append(coords[i + 16] + Vector([0, self.tw, 0]))
-            # Mid nodes to so faces will be quads:
-            for i in [0,7,6,5,9,10,11,12]:
-                coords.append(coords[i] + Vector([0, flange_y, 0]))
-            for i in range(8):
-                coords.append(coords[i + 48] + Vector([0, self.tw, 0]))
-
-            self.G.Make_mesh(coords, self.faces3c, 'stringer')
-
-            for i in coords:
-                i += Vector([0, self.wT + self.tw, 0])
-
-            self.G.Make_mesh(coords, self.faces3c, 'stringer')
-
-        # @TODO Taper = 100%
-        
-        return {'FINISHED'}
-
-
-    def C_Beam(self):
-        mid = self.w / 2
-        web = self.tw / 2
-        # Bottom of the stringer:
-        baseZ = -self.rise - self.hT - self.h
-        # Top of the strigner:
-        topZ = -self.rise - self.hT
-        # Vertical taper amount:
-        taper = self.tf * self.tp
-
-        if self.dis or self.nS == 1:
-            offset = (self.wT / (self.nS + 1)) - mid
-        else:
-            offset = 0
-
-        # taper < 100%:
-        if self.tp > 0:
-            for i in range(self.nS):
-                coords = []
-                coords.append(Vector([0, offset,                baseZ]))
-                coords.append(Vector([0, offset,                baseZ + taper]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + (mid - web),  topZ - self.tf]))
-                coords.append(Vector([0, offset,                topZ - taper]))
-                coords.append(Vector([0, offset,                topZ]))
-                coords.append(Vector([0, offset + (mid - web),  topZ]))
-                coords.append(Vector([0, offset + (mid + web),  topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ - taper]))
-                coords.append(Vector([0, offset + (mid + web),  topZ - self.tf]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + self.w,       baseZ + taper]))
-                coords.append(Vector([0, offset + self.w,       baseZ]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ]))
-                for j in range(16):
-                    coords.append(coords[j]+Vector([self.run * self.nT, 0, self.rise * self.nT]))
-                # If the bottom meets the ground:
-                #   Bottom be flat with the xy plane, but shifted down.
-                #   Either project onto the plane along a vector (hard) or use the built in
-                #       interest found in mathutils.geometry (easy).  Using intersect:
-                if self.g:
-                    for j in range(16):
-                        coords[j] = intersect_line_plane(coords[j], coords[j + 16],
-                                                         Vector([0, 0, topZ]),
-                                                         Vector([0, 0, 1]))
-                self.G.Make_mesh(coords, self.faces3a, 'stringer')
-
-                if self.dis or self.nS == 1:
-                    offset += self.wT / (self.nS + 1)
-                else:
-                    offset += (self.wT - self.w) / (self.nS - 1)
-        # taper = 100%:
-        else:
-            for i in range(self.nS):
-                coords = []
-                coords.append(Vector([0, offset,                baseZ]))
-                coords.append(Vector([0, offset + (mid - web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + (mid - web),  topZ - self.tf]))
-                coords.append(Vector([0, offset,                topZ]))
-                coords.append(Vector([0, offset + self.w,       topZ]))
-                coords.append(Vector([0, offset + (mid + web),  topZ - self.tf]))
-                coords.append(Vector([0, offset + (mid + web),  baseZ + self.tf]))
-                coords.append(Vector([0, offset + self.w,       baseZ]))
-                for j in range(8):
-                    coords.append(coords[j]+Vector([self.run * self.nT, 0, self.rise * self.nT]))
-                self.G.Make_mesh(coords, self.faces3b, 'stringer')
-                offset += self.wT / (self.nS + 1)
-                
-        return {'FINISHED'}
-
-
-    def housed_C_beam(self):
-        webOrth = Vector([self.rise, 0, -self.run]).normalized()
-        webHeight = Vector([self.run + self.tT, 0, -self.hT]).project(webOrth).length
-        vDelta_1 = self.tf * tan(self.G.angle)
-        vDelta_2 = (self.rise * (self.nT - 1)) - (webHeight + self.tf)
-        flange_y = (self.w - self.tw) / 2
-        front = -self.tT - self.tf
-        outer = -self.tO - self.tw - flange_y
-
-        coords = []
-        if self.tp > 0:
-            # Upper-Outer flange:
-            coords.append(Vector([front, outer, -self.rise]))
-            coords.append(Vector([-self.tT, outer, -self.rise]))
-            coords.append(Vector([-self.tT, outer, 0]))
-            coords.append(Vector([(self.run * (self.nT - 1)) - self.tT, outer,
-                                  self.rise * (self.nT - 1)]))
-            coords.append(Vector([self.run * self.nT, outer,
-                                  self.rise * (self.nT - 1)]))
-            coords.append(Vector([self.run * self.nT, outer,
-                                  (self.rise * (self.nT - 1)) + self.tf]))
-            coords.append(Vector([(self.run * (self.nT - 1)) - self.tT, outer,
-                                  (self.rise * (self.nT - 1)) + self.tf]))
-            coords.append(Vector([front, outer, self.tf - vDelta_1]))
-            # Lower-Outer flange:
-            coords.append(coords[0] + Vector([self.tf + webHeight, 0, 0]))
-            coords.append(coords[1] + Vector([self.tf + webHeight, 0, 0]))
-            coords.append(intersect_line_line(coords[9],
-                                              coords[9] - Vector([0, 0, 1]),
-                                              Vector([self.run, 0, -self.hT - self.tf]),
-                                              Vector([self.run * 2, 0, self.rise - self.hT - self.tf]))[0])
-            coords.append(Vector([(self.run * self.nT) - ((webHeight - self.hT) / tan(self.G.angle)),
-                                  outer, vDelta_2]))
-            coords.append(coords[4] - Vector([0, 0, self.tf + webHeight]))
-            coords.append(coords[5] - Vector([0, 0, self.tf + webHeight]))
-            coords.append(coords[11] + Vector([0, 0, self.tf]))
-            coords.append(intersect_line_line(coords[8],
-                                              coords[8] - Vector([0, 0, 1]),
-                                              Vector([self.run, 0, -self.hT]),
-                                              Vector([self.run * 2, 0, self.rise - self.hT]))[0])
-            # Outer web:
-            coords.append(coords[1] + Vector([0, flange_y, 0]))
-            coords.append(coords[8] + Vector([0, flange_y, 0]))
-            coords.append(coords[15] + Vector([0, flange_y, 0]))
-            coords.append(coords[14] + Vector([0, flange_y, 0]))
-            coords.append(coords[13] + Vector([0, flange_y, 0]))
-            coords.append(coords[4] + Vector([0, flange_y, 0]))
-            coords.append(coords[3] + Vector([0, flange_y, 0]))
-            coords.append(coords[2] + Vector([0, flange_y, 0]))
-            # Outer corner nodes:
-            for i in [0, 7, 6, 5, 12, 11, 10, 9]:
-                coords.append(coords[i] + Vector([0, flange_y + self.tw, 0]))
-
-            self.G.Make_mesh(coords, self.faces4c, 'stringer')
-
-            for i in range(16):
-                coords[i] += Vector([0, -outer * 2, 0])
-            for i in range(8):
-                coords[i + 16] += Vector([0, (-outer - flange_y) * 2, 0])
-            for i in coords:
-                i += Vector([0, (self.tO * 2) + self.wT, 0])
-
-            self.G.Make_mesh(coords, self.faces4c, 'stringer')
-        
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/add_mesh_building_objects/tread.py b/release/scripts/addons_contrib/add_mesh_building_objects/tread.py
deleted file mode 100644
index 1a5af0c..0000000
--- a/release/scripts/addons_contrib/add_mesh_building_objects/tread.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# Stairbuilder - Tread generation
-#
-# Generates treads for stair generation.
-#   Stair Type (typ):
-#       - id1 = Freestanding staircase
-#       - id2 = Housed-open staircase
-#       - id3 = Box staircase
-#       - id4 = Circular staircase
-#   Tread Type (typ_t):
-#       - tId1 = Classic
-#       - tId2 = Basic Steel
-#       - tId3 = Bar 1
-#       - tId4 = Bar 2
-#       - tId5 = Bar 3
-# 
-# Paul "BrikBot" Marshall
-# Created: September 19, 2011
-# Last Modified: January 26, 2012
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.61.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  Stairbuilder is for quick stair generation.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import mathutils
-from copy import copy
-from math import radians, sqrt
-from mathutils import Matrix, Vector
-
-class Treads:
-    def __init__(self,G,typ,typ_t,run,w,h,d,r,toe,o,n,tk,sec,sp,sn,deg=4):
-        self.G = G #General
-        self.typ = typ #Stair type
-        self.typ_t = typ_t #Tread type
-        self.run = run #Stair run.  Degrees if self.typ == "id4"
-        self.w=w #tread width.  Is outer radius if self.typ == "id4"
-        self.h=h #tread height
-        self.d=d #tread run.  Ignore for now if self.typ == "id4"
-        self.r=r #tread rise
-        self.t=toe #tread nosing
-        self.o=o #tread side overhang.  Is inner radius if self.typ == "id4"
-        self.n=n #number of treads
-        self.tk=tk #thickness of tread metal
-        self.sec=sec #metal sections for tread
-        if sec != 1 and typ_t not in ["tId4", "tId5"]:
-            self.sp=((d+toe)*(sp/100))/(sec-1) #spacing between sections (% of depth)
-        elif typ_t in ["tId4", "tId5"]:
-            self.sp=sp/100 #keep % value
-        else:
-            self.sp=0
-        self.sn=sn #number of cross sections
-        self.deg = deg #number of section per "slice".  Only applys if self.typ == "id4"
-        self.tId2_faces = [[0,1,2,3],[0,3,4,5],[4,5,6,7],[6,7,8,9],[8,9,10,11],
-                           [12,13,14,15],[12,15,16,17],[16,17,18,19],
-                           [18,19,20,21],[20,21,22,23],[0,1,13,12],[1,2,14,13],
-                           [2,3,15,14],[3,4,16,15],[4,7,19,16],[7,8,20,19],
-                           [8,11,23,20],[11,10,22,23],[10,9,21,22],[9,6,18,21],
-                           [6,5,17,18],[5,0,12,17]]
-        self.out_faces = [[0,2,3,1],[0,2,10,8],[9,11,3,1],[9,11,10,8],
-                          [2,6,7,3],[2,6,14,10],[11,15,7,3],[11,15,14,10],
-                          [0,4,5,1],[0,4,12,8],[9,13,5,1],[9,13,12,8],
-                          [4,6,7,5],[4,6,14,12],[13,15,14,12],[13,15,7,5]]
-        self.Create()
-
-    def Create(self):
-        # Setup the coordinates:
-        coords = []
-        coords2 = []
-        coords3 = []
-        cross = 0
-        cW = 0
-        depth = 0
-        offset = 0
-        height = 0
-        if self.typ in ["id1", "id2", "id3"]:
-            if self.typ_t == "tId1":
-                coords.append(Vector([-self.t,-self.o,0]))
-                coords.append(Vector([self.d,-self.o,0]))
-                coords.append(Vector([-self.t,self.w + self.o,0]))
-                coords.append(Vector([self.d,self.w + self.o,0]))
-                for i in range(4):
-                    coords.append(coords[i]+Vector([0,0,-self.h]))
-
-            elif self.typ_t == "tId2":
-                depth = (self.d + self.t - (self.sec - 1) * self.sp) / self.sec
-                inset = depth / 4
-                tDepth = depth - self.t
-                coords.append(Vector([-self.t, -self.o, -self.h]))                          #0
-                coords.append(Vector([inset - self.t, -self.o, -self.h]))           #1
-                coords.append(Vector([inset - self.t, -self.o, -self.h + self.tk])) #2
-                coords.append(Vector([self.tk - self.t, -self.o, -self.h + self.tk]))       #3
-                coords.append(Vector([self.tk - self.t, -self.o, -self.tk]))                #4
-                coords.append(Vector([-self.t, -self.o, 0]))                                #5
-                coords.append(Vector([tDepth, -self.o, 0]))                                 #6
-                coords.append(Vector([tDepth - self.tk, -self.o, -self.tk]))                #7
-                coords.append(Vector([tDepth - self.tk, -self.o, self.tk - self.h]))        #8
-                coords.append(Vector([tDepth, -self.o, -self.h]))                           #9
-                coords.append(Vector([tDepth - inset, -self.o, -self.h]))           #10
-                coords.append(Vector([tDepth - inset, -self.o, -self.h + self.tk])) #11
-                for i in range(12):
-                    coords.append(coords[i] + Vector([0, self.w + (2 * self.o), 0]))
-            
-            elif self.typ_t in ["tId3", "tId4", "tId5"]:
-                # Frame:
-                coords.append(Vector([-self.t,-self.o,-self.h]))
-                coords.append(Vector([self.d,-self.o,-self.h]))
-                coords.append(Vector([-self.t,-self.o,0]))
-                coords.append(Vector([self.d,-self.o,0]))
-                for i in range(4):
-                    if (i % 2) == 0:
-                        coords.append(coords[i] + Vector([self.tk,self.tk,0]))
-                    else:
-                        coords.append(coords[i] + Vector([-self.tk,self.tk,0]))
-                for i in range(4):
-                    coords.append(coords[i] + Vector([0,self.w + self.o,0]))
-                for i in range(4):
-                    coords.append(coords[i + 4] + Vector([0,self.w + self.o - (2 * self.tk),0]))
-
-                # Tread sections:
-                if self.typ_t == "tId3":
-                    offset = (self.tk * sqrt(2)) / 2
-                    topset = self.h - offset
-                    self.sp = ((self.d + self.t - (2 * self.tk)) - (offset * (self.sec) + topset)) / (self.sec + 1)
-                    baseX = -self.t + self.sp + self.tk
-                    coords2.append(Vector([baseX, self.tk - self.o, offset - self.h]))
-                    coords2.append(Vector([baseX + offset, self.tk - self.o, -self.h]))
-                    for i in range(2):
-                        coords2.append(coords2[i] + Vector([topset, 0, topset]))
-                    for i in range(4):
-                        coords2.append(coords2[i] + Vector([0, (self.w + self.o) - (2 * self.tk), 0]))
-                elif self.typ_t in ["tId4", "tId5"]:
-                    offset = ((self.run + self.t) * self.sp) / (self.sec + 1)
-                    topset = (((self.run + self.t) * (1 - self.sp)) - (2 * self.tk)) / self.sec
-                    baseX = -self.t + self.tk + offset
-                    baseY = self.w + self.o - 2 * self.tk
-                    coords2.append(Vector([baseX, -self.o + self.tk, -self.h / 2]))
-                    coords2.append(Vector([baseX + topset, -self.o + self.tk, -self.h / 2]))
-                    coords2.append(Vector([baseX, -self.o + self.tk, 0]))
-                    coords2.append(Vector([baseX + topset, -self.o + self.tk, 0]))
-                    for i in range(4):
-                        coords2.append(coords2[i] + Vector([0, baseY, 0]))
-
-                # Tread cross-sections:
-                if self.typ_t in ["tId3", "tId4"]:
-                    cW = self.tk
-                    cross = (self.w + (2 * self.o) - (self.sn + 2) * self.tk) / (self.sn + 1)
-                else: # tId5
-                    spacing = self.sp ** (1 / 4)
-                    cross = ((2*self.o + self.w) * spacing) / (self.sn + 1)
-                    cW = (-2*self.tk + (2*self.o + self.w) * (1 - spacing)) / self.sn
-                    self.sp = topset
-                    height = -self.h / 2
-                baseY = -self.o + self.tk + cross
-                coords3.append(Vector([-self.t + self.tk, baseY, -self.h]))
-                coords3.append(Vector([self.d - self.tk, baseY, -self.h]))
-                coords3.append(Vector([-self.t + self.tk, baseY, height]))
-                coords3.append(Vector([self.d - self.tk, baseY, height]))
-                for i in range(4):
-                    coords3.append(coords3[i] + Vector([0, cW, 0]))
-
-            # Make the treads:
-            for i in range(self.n):
-                if self.typ_t == "tId1":
-                    self.G.Make_mesh(coords,self.G.faces,'treads')
-                elif self.typ_t == "tId2":
-                    temp = []
-                    for j in coords:
-                        temp.append(copy(j))
-                    for j in range(self.sec):
-                        self.G.Make_mesh(temp, self.tId2_faces, 'treads')
-                        for k in temp:
-                            k += Vector([depth + self.sp, 0, 0])
-                elif self.typ_t in ["tId3", "tId4", "tId5"]:
-                    self.G.Make_mesh(coords,self.out_faces,'treads')
-                    temp = []
-                    for j in coords2:
-                        temp.append(copy(j))
-                    for j in range(self.sec):
-                        self.G.Make_mesh(temp,self.G.faces,'bars')
-                        for k in temp:
-                            k += Vector([offset + self.sp, 0, 0])
-                    for j in coords2:
-                        j += Vector([self.d, 0, self.r])
-                    temp = []
-                    for j in coords3:
-                        temp.append(copy(j))
-                    for j in range(self.sn):
-                        self.G.Make_mesh(temp,self.G.faces,'crosses')
-                        for k in temp:
-                            k += Vector([0, cW + cross, 0])
-                    for j in coords3:
-                        j += Vector([self.d, 0, self.r])
-                for j in coords:
-                    j += Vector([self.d,0,self.r])
-        # Circular staircase:
-        elif self.typ in ["id4"]:
-            start = [Vector([0, -self.o, 0]), Vector([0, -self.o, -self.h]),
-                     Vector([0, -self.w, 0]), Vector([0, -self.w, -self.h])]
-            self.d = radians(self.run) / self.n
-            for i in range(self.n):
-                coords = []
-                # Base faces.  Should be able to append more sections:
-                tId4_faces = [[0, 1, 3, 2]]
-                t_inner = Matrix.Rotation((-self.t / self.o) + (self.d * i), 3, 'Z')
-                coords.append((t_inner * start[0]) + Vector([0, 0, self.r * i]))
-                coords.append((t_inner * start[1]) + Vector([0, 0, self.r * i]))
-                t_outer = Matrix.Rotation((-self.t / self.w) + (self.d * i), 3, 'Z')
-                coords.append((t_outer * start[2]) + Vector([0, 0, self.r * i]))
-                coords.append((t_outer * start[3]) + Vector([0, 0, self.r * i]))
-                k = 0
-                for j in range(self.deg + 1):
-                    k = (j * 4) + 4
-                    tId4_faces.append([k, k - 4, k - 3, k + 1])
-                    tId4_faces.append([k - 2, k - 1, k + 3, k + 2])
-                    tId4_faces.append([k + 1, k - 3, k - 1, k + 3])
-                    tId4_faces.append([k, k - 4, k - 2, k + 2])
-                    rot = Matrix.Rotation(((self.d * j) / self.deg) + (self.d * i), 3, 'Z')
-                    for v in start:
-                        coords.append((rot * v) + Vector([0, 0, self.r * i]))
-                tId4_faces.append([k, k + 1, k + 3, k + 2])
-                self.G.Make_mesh(coords, tId4_faces, 'treads')
-        return
diff --git a/release/scripts/addons_contrib/add_mesh_chain_rope/__init__.py b/release/scripts/addons_contrib/add_mesh_chain_rope/__init__.py
deleted file mode 100644
index 4cc70d2..0000000
--- a/release/scripts/addons_contrib/add_mesh_chain_rope/__init__.py
+++ /dev/null
@@ -1,38 +0,0 @@
-bl_info = {
-    "name": "Oscurart Chain and Rope Maker",
-    "author": "Oscurart",
-    "version": (1,1),
-    "blender": (2, 6, 3),
-    "location": "Add > Mesh",
-    "description": "Create chains and ropes along armatures/curves",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Add_Mesh/Oscurart_Chain_Rope_Maker",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=28136",
-    "category": "Object"}
-
-
-import bpy
-from .oscurart_rope_maker import * 
-from .oscurart_chain_maker import *
-
-def register():
-    bpy.utils.register_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_curve_add.append(oscRopeButton)
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_mesh_add.append(menu_oscChain)
-
-def unregister():
-    bpy.utils.unregister_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_curve_add.remove(oscRopeButton)
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_mesh_add.remove(menu_oscChain)    
-
-if __name__ == "__main__":
-    register()
-
-
-
-
-
diff --git a/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_chain_maker.py b/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_chain_maker.py
deleted file mode 100644
index 318e085..0000000
--- a/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_chain_maker.py
+++ /dev/null
@@ -1,191 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Oscurart Chain Maker",
-    "author": "Oscurart",
-    "version": (1,1),
-    "blender": (2, 5, 6),
-    "api": 3800,
-    "location": "Add > Mesh > Oscurart Chain",
-    "description": "Create chain links from armatures.",
-    "warning": "",
-    "wiki_url": "oscurart.blogspot.com",
-    "tracker_url": "",
-    "category": "Object"}
-
-
-
-
-
-import bpy
-
-
-def makeChain (self, context, mult, curverig):     
-
-    if bpy.context.active_object.type == 'ARMATURE':                
-        bpy.ops.object.mode_set(mode='OBJECT')      
-        VAR_SWITCH=abs(1)
-        ARMATURE=bpy.context.active_object        
-        def creahuesocero(hueso):
-            ## CREO DATA PARA ESLABON
-            mesh=bpy.data.meshes.new("objectData"+str(hueso.name))
-            object=bpy.data.objects.new("EslabonCero"+str(hueso.name),mesh)
-            mesh.from_pydata(
-            [(-0.04986128956079483,-0.6918092370033264,-0.17846597731113434),(-0.04986128956079483,-0.6918091773986816,0.17846640944480896),(-0.049861326813697815,-0.154555082321167,0.17846627533435822),(-0.049861326813697815,-0.15455523133277893,-0.17846614122390747),(-0.04986133798956871,-0.03475356101989746,0.25805795192718506),(-0.04986133798956871,-0.03475397825241089,-0.25805795192718506),(-0.049861278384923935,-0.8116106986999512,-0.2580576539039612),(-0.049861278384923935,-0.8116104602813721,0.25805822014808655),(-0.04986128211021423,-0.7692053318023682,2.6668965347198537e-07),(-0.04986127093434334,-0.923523485660553,2.7834033744511544e-07),(-0.04986133426427841,-0.0771591067314148,3.5627678585115063e-08),(-0.04986134544014931,0.0771591067314148,-3.5627678585115063e-08),(0.04986133798956871,-0.03475397825241089,-0.25805795192718506),(0.04986133053898811,0.0771591067314148,-3.5627678585115063e-08),(0.04986133798956871,-0.03475356101989746,0.25805795192718506),(0.04986134544014931,-0.15455523133277893,-0.17846614122390747),(0.04986134544014931,-0.0771591067314148,3.5627678585115063e-08),(0.04986134544014931,-0.154555082321167,0.17846627533435822),(0.049861397594213486,-0.8116106986999512,-0.2580576539039612),(0.04986140504479408,-0.923523485660553,2.7834033744511544e-07),(0.049861397594213486,-0.8116104602813721,0.25805822014808655),(0.04986139014363289,-0.6918091773986816,0.17846640944480896),(0.04986139014363289,-0.7692053318023682,2.6668965347198537e-07),(0.04986139014363289,-0.6918092370033264,-0.17846597731113434)],
-        [(1,2),(0,3),(3,5),(2,4),(0,6),(5,6),(1,7),(4,7),(0,8),(1,8),(7,9),(6,9),(8,9),(2,10),(3,10),(4,11),(5,11),(10,11),(5,12),(12,13),(11,13),(13,14),(4,14),(10,16),(15,16),(3,15),(2,17),(16,17),(9,19),(18,19),(6,18),(7,20),(19,20),(8,22),(21,22),(1,21),(0,23),(22,23),(14,20),(12,18),(15,23),(17,21),(12,15),(13,16),(14,17),(20,21),(19,22),(18,23)],
-        [(6,0,3,5),(1,7,4,2),(0,6,9,8),(8,9,7,1),(2,4,11,10),(10,11,5,3),(11,13,12,5),(4,14,13,11),(3,15,16,10),(10,16,17,2),(6,18,19,9),(9,19,20,7),(1,21,22,8),(23,0,8,22),(7,20,14,4),(5,12,18,6),(0,23,15,3),(2,17,21,1),(16,15,12,13),(17,16,13,14),(22,21,20,19),(23,22,19,18),(21,17,14,20),(15,23,18,12)]
-            )
-            bpy.context.scene.objects.link(object)
-            ## ESCALO EL HUESO
-            bpy.data.objects['EslabonCero'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)            
-            ## EMPARENTO
-            bpy.data.objects['EslabonCero'+str(hueso.name)].parent=ARMATURE
-            bpy.data.objects['EslabonCero'+str(hueso.name)].parent_type = 'BONE'
-            bpy.data.objects['EslabonCero'+str(hueso.name)].parent_bone=hueso.name           
-        def creahuesonoventa(hueso):
-            ## CREO DATA PARA ESLABON
-            mesh=bpy.data.meshes.new("objectData"+str(hueso.name))
-            object=bpy.data.objects.new("EslabonNov"+str(hueso.name),mesh)
-            mesh.from_pydata(
-            [(0.1784660965204239,-0.6918091773986816,-0.049861203879117966),(-0.1784662902355194,-0.6918091773986816,-0.04986126348376274),(-0.17846627533435822,-0.1545550525188446,-0.04986134544014931),(0.17846617102622986,-0.15455520153045654,-0.04986128583550453),(-0.25805795192718506,-0.03475359082221985,-0.049861375242471695),(0.25805795192718506,-0.034753888845443726,-0.04986129328608513),(0.2580578327178955,-0.8116105794906616,-0.04986117407679558),(-0.2580580413341522,-0.8116105198860168,-0.049861256033182144),(-9.672299938756623e-08,-0.7692052721977234,-0.04986122250556946),(-8.99775329799013e-08,-0.923523485660553,-0.04986120015382767),(-7.764004550381287e-09,-0.07715904712677002,-0.049861326813697815),(4.509517737005808e-08,0.0771591067314148,-0.049861349165439606),(0.25805795192718506,-0.034753888845443726,0.049861375242471695),(-2.2038317837314025e-08,0.0771591067314148,0.049861326813697815),(-0.25805795192718506,-0.03475359082221985,0.04986129328608513),(0.17846617102622986,-0.15455520153045654,0.04986138269305229),(-1.529285498236277e-08,-0.07715907692909241,0.049861352890729904),(-0.17846627533435822,-0.1545550525188446,0.049861323088407516),(0.2580578029155731,-0.8116105794906616,0.049861494451761246),(-1.5711103173998708e-07,-0.923523485660553,0.04986147582530975),(-0.2580580711364746,-0.8116105198860168,0.04986141249537468),(-0.1784663051366806,-0.6918091773986816,0.049861419945955276),(-1.340541757599567e-07,-0.7692052721977234,0.049861449748277664),(0.1784660816192627,-0.6918091773986816,0.04986146464943886)],
-            [(1,2),(0,3),(3,5),(2,4),(0,6),(5,6),(1,7),(4,7),(0,8),(1,8),(7,9),(6,9),(8,9),(2,10),(3,10),(4,11),(5,11),(10,11),(5,12),(12,13),(11,13),(13,14),(4,14),(10,16),(15,16),(3,15),(2,17),(16,17),(9,19),(18,19),(6,18),(7,20),(19,20),(8,22),(21,22),(1,21),(0,23),(22,23),(14,20),(12,18),(15,23),(17,21),(12,15),(13,16),(14,17),(20,21),(19,22),(18,23)],
-            [(6,0,3,5),(1,7,4,2),(0,6,9,8),(8,9,7,1),(2,4,11,10),(10,11,5,3),(11,13,12,5),(4,14,13,11),(3,15,16,10),(10,16,17,2),(6,18,19,9),(9,19,20,7),(1,21,22,8),(23,0,8,22),(7,20,14,4),(5,12,18,6),(0,23,15,3),(2,17,21,1),(16,15,12,13),(17,16,13,14),(22,21,20,19),(23,22,19,18),(21,17,14,20),(15,23,18,12)]
-            )
-            bpy.context.scene.objects.link(object)            
-            ## ESCALO EL HUESO
-            bpy.data.objects['EslabonNov'+str(hueso.name)].scale= (hueso.length*mult,hueso.length*mult,hueso.length*mult)        
-            ## EMPARENTO
-            bpy.data.objects['EslabonNov'+str(hueso.name)].parent=ARMATURE
-            bpy.data.objects['EslabonNov'+str(hueso.name)].parent_type = 'BONE'
-            bpy.data.objects['EslabonNov'+str(hueso.name)].parent_bone=hueso.name         
-        
-        for hueso in bpy.context.active_object.pose.bones:
-            if VAR_SWITCH == 1:
-                creahuesocero(hueso)
-            else:
-                creahuesonoventa(hueso)    
-            if VAR_SWITCH == 1:
-                VAR_SWITCH = 0
-                print(VAR_SWITCH)
-            else :
-                VAR_SWITCH = 1
-                print(VAR_SWITCH)                      
-        # SI NO TILDAMOS CURVERIG
-        if curverig == True:                           
-            # VARIABLES
-            LISTA_POINTC=[]
-            ACTARM=bpy.context.active_object            
-            # CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
-            crv= bpy.data.curves.new("CurvaCable", "CURVE")
-            obCable=bpy.data.objects.new("Cable",crv)
-            bpy.context.scene.objects.link(obCable)            
-            # SETEO ATRIBUTOS
-            crv.dimensions = "3D"
-            crv.resolution_u = 10
-            crv.resolution_v = 10
-            crv.twist_mode = "MINIMUM"            
-            # CREO LISTA DE COORDENADAS DE TAIL Y HEAD            
-            LISTA_POINTC.append((
-                ACTARM.data.bones[0].head_local[0],
-                ACTARM.data.bones[0].head_local[1],
-                ACTARM.data.bones[0].head_local[2],
-                1
-            ))            
-            print("huesos: "+ str(len(ACTARM.data.bones)))
-            for hueso in ACTARM.data.bones:
-                LISTA_POINTC.append((hueso.tail_local[0],hueso.tail_local[1],hueso.tail_local[2],1))               
-            # CREO EL SPLINE
-            spline=crv.splines.new("NURBS")
-            lencoord= len(LISTA_POINTC)
-            print("lencoord--> :"+str(lencoord))
-            rango=range(lencoord)
-            spline.points.add(lencoord-1)
-            for punto in rango:
-                spline.points[punto].co = LISTA_POINTC[punto]
-                print(LISTA_POINTC[punto])
-            # SETEO ENDPOINT
-            bpy.data.objects['Cable'].data.splines[0].use_endpoint_u= True            
-            # SELECCIONO LA CURVA
-            bpy.ops.object.select_all(action='DESELECT')
-            bpy.data.objects['Cable'].select=1
-            bpy.context.scene.objects.active=bpy.data.objects['Cable']            
-            # PASO A EDIT
-            bpy.ops.object.mode_set(mode='EDIT')            
-            # CREO HOOKS
-            POINTSTEP=0
-            for POINT in bpy.data.objects['Cable'].data.splines[0].points:
-                bpy.ops.curve.select_all(action="DESELECT")
-                bpy.data.objects['Cable'].data.splines[0].points[POINTSTEP].select=1
-                bpy.ops.object.hook_add_newob()
-                POINTSTEP+=1            
-            # PASO A SELECCIONAR LOS OBJETOS
-            bpy.ops.object.mode_set(mode='OBJECT')
-            bpy.ops.object.select_all(action='DESELECT')
-            ACTARM.select=1
-            bpy.context.scene.objects.active=bpy.data.objects['Armature']
-            bpy.ops.object.mode_set(mode='POSE')
-            bpy.ops.pose.select_all(action='DESELECT')
-            ACTARM.data.bones[-1].select=1
-            ACTARM.data.bones.active=ACTARM.data.bones[-1]
-            # SETEO IK SPLINE
-            bpy.ops.pose.constraint_add_with_targets(type='SPLINE_IK')
-            ACTARM.pose.bones[-1].constraints['Spline IK'].target = bpy.data.objects['Cable']
-            ACTARM.pose.bones[-1].constraints['Spline IK'].chain_count=100
-            bpy.context.active_object.pose.bones[-1].constraints['Spline IK'].use_y_stretch= False     
-            # VUELVO A OBJECT MODE
-            bpy.ops.object.mode_set(mode='OBJECT')	
-    else:
-        self.report({'WARNING'}, "Active Object must be an Armature")            	
-                             
-            
-#---------------        
-from bpy.props import *
-
-class MESH_OT_chain_maker(bpy.types.Operator):
-    bl_idname="mesh.primitive_oscurart_chain_add"
-    bl_label="Oscurart Chain"
-    bl_options={'REGISTER','UNDO'}
-    
-    curverig= BoolProperty(name="Curve Rig", default=False)
-    multiplier= FloatProperty (name="Scale", default=1 , min=0.01, max=100.0)
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object is not None)       
-    
-    def execute(self, context):
-        makeChain(self, context, self.multiplier,self.curverig)
-        return {'FINISHED'}
-    
-def menu_oscChain(self, context):
-    self.layout.operator("mesh.primitive_oscurart_chain_add", 
-        text="Oscurart Chain", 
-        icon='LINKED')
-
-def register():
-   bpy.utils.register_module(__name__)
-   bpy.types.INFO_MT_mesh_add.append(menu_oscChain)
- 
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_mesh_add.remove(menu_oscChain)
-    
- 
-if __name__ == "__main__":
-    register()    
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_rope_maker.py b/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_rope_maker.py
deleted file mode 100644
index d7e4334..0000000
--- a/release/scripts/addons_contrib/add_mesh_chain_rope/oscurart_rope_maker.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Oscurart Rope Maker",
-    "author": "Oscurart",
-    "version": (1,1),
-    "blender": (2, 5, 6),
-    "api": 3800,
-    "location": "Add > Curve > Oscurart Rope",
-    "description": "Create ropes",
-    "warning": "",
-    "wiki_url": "oscurart.blogspot.com",
-    "tracker_url": "",
-    "category": "Object"}
-
-
-
-import bpy, math
-
-
-
-
-
-def makeRope (context, DISTPOS, curvaResU, radius, FE, CUERDAS, stResU,DIAMETRO):    
-    
-    # CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
-    crv= bpy.data.curves.new("CurvaCable", "CURVE")
-    obCable=bpy.data.objects.new("Cable",crv)
-    bpy.context.scene.objects.link(obCable)
-    
-    # SETEO ATRIBUTOS
-    crv.dimensions = "3D"
-    crv.resolution_u = 10
-    crv.resolution_v = 10
-    crv.twist_mode = "MINIMUM"
-    
-    # LISTA DE COMPONENTES
-    coordenadas= [
-        (0,radius,0,radius),
-        (radius,0,0,radius),
-        (0,-radius,0,radius),
-        (-radius,0,0,radius)
-    ]
-    
-    
-    
-    # CREO EL SPLINE
-    spline=crv.splines.new("NURBS")
-    lencoord= len(coordenadas)
-    #print("lencoord--> :"+str(lencoord))
-    rango=range(lencoord)
-    spline.points.add(lencoord-1)
-    for punto in rango:
-        spline.points[punto].co = coordenadas[punto]
-        #print(punto)
-        
-        
-    # MODIFICACIONES DE DATA
-    spline.use_cyclic_u = True
-    spline.resolution_u = curvaResU
-    spline.order_u = 3    
-    spline.use_endpoint_u = True
-    
-    
-    ## ==CREO CADENAS==
-    
-    ## DIVIDO EL RADIO POR LA CANTIDAD DE LINEAS Y SETEO UNA LISTA
-    
-    GRADOS=[]
-    VALORPORPARTE=[]
-    DIVISION=360/CUERDAS
-    TAJADA=0
-    
-    for parte in range(0,CUERDAS):
-        GRADOS.append(TAJADA)
-        TAJADA+=DIVISION
-        
-
-    
-    for GRAD in GRADOS:
-
-
-        # VARIABLES
-        FC=0
-        VARLISTVER=[]
-       
-        VARANGLEY=0
-        VARANGLEZ=90
-        VARPOSX=0
-        EDGEINDEX=0
-        # DEFINO EL PESO PARA LAS COORDENADAS
-        WEIGHT = 1
-        
-        while FC < FE:           
-            ## CREA 3 CADENAS EN 0 90 Y 180 GRADOS 
-            VARLISTVER.append((VARPOSX, math.sin(math.radians(GRAD))/(1/DIAMETRO) , math.sin(math.radians(GRAD+90))/(1/DIAMETRO),WEIGHT))
-    
-            GRAD += 30
-            FC += 1
-            VARPOSX += DISTPOS
-     
-        
-        
-        # CREO DATA , OBJETO Y LO CONECTO A LA ESCENA
-        crv= bpy.data.curves.new("curvaData", "CURVE")
-        ob=bpy.data.objects.new("Curva",crv)
-        bpy.context.scene.objects.link(ob)
-        
-        # SETEO ATRIBUTOS
-        crv.dimensions = "3D"
-        crv.resolution_u = 10
-        crv.resolution_v = 10
-        crv.twist_mode = "MINIMUM"
-        
-        # LISTA DE COMPONENTES
-        coordenadas= VARLISTVER
-        
-        
-        
-        # CREO EL SPLINE
-        spline=crv.splines.new("NURBS")
-        lencoord= len(coordenadas)
-        #print("lencoord--> :"+str(lencoord))
-        rango=range(lencoord)
-        spline.points.add(lencoord-1)
-        for punto in rango:
-            spline.points[punto].co = coordenadas[punto]
-            #print(punto)
-            
-            
-        # MODIFICACIONES DE DATA
-        spline.use_cyclic_u = False
-        spline.resolution_u = stResU
-        spline.order_u = 3    
-        spline.use_endpoint_u = True
-        
-        ob.data.bevel_object= bpy.data.objects["Cable"]
-        
-        #print(VARLISTVER)
-        
-#---------------        
-from bpy.props import *
-
-class OBJECT_OT_add_object(bpy.types.Operator):
-    bl_idname="curve.primitive_osc_rope_add"
-    bl_label="Oscurart Rope"
-    bl_options={'REGISTER','UNDO'}
-    
-    strands = IntProperty (name="Strands", default=5 , min=1, max=1000, step=1)
-    diameter = FloatProperty (name="Diameter", default=1 , min=0, max=1000)
-    distPos= FloatProperty (name="Stretch", default=1 , min=0.01, max=100.0)
-    vertices= IntProperty (name="Length", default=10 , min=0, max=1000, step=1)
-    distResU= IntProperty (name="Resolution V", default=5 , min=1, max=1000, step=1)
-    stResU= IntProperty (name="Resolution U", default=5 , min=1, max=1000, step=1)
-    radio= FloatProperty (name="Radius", default=1 , min=0, max=1000)
-
-    def execute(self, context):
-        makeRope(context, 
-            self.distPos,self.distResU,self.radio,self.vertices,self.strands, self.stResU,self.diameter)
-        return {'FINISHED'}
-    
-# Registration
-
-def oscRopeButton(self, context):
-    self.layout.operator(
-        OBJECT_OT_add_object.bl_idname,
-        text="Oscurart Rope",
-        icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_curve_add.append(oscRopeButton)
-
-
-def unregister():
-    bpy.utils.unregister_class(OBJECT_OT_add_object)
-    bpy.types.INFO_MT_curve_add.remove(oscRopeButton)
-
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/add_mesh_clusters/__init__.py b/release/scripts/addons_contrib/add_mesh_clusters/__init__.py
deleted file mode 100644
index 7c4ecf2..0000000
--- a/release/scripts/addons_contrib/add_mesh_clusters/__init__.py
+++ /dev/null
@@ -1,530 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#
-#  Main author       : Clemens Barth (Blendphys at root-1.de)
-#  Authors           : Clemens Barth, Christine Mottet (Icosahedra), ...
-#
-#  Homepage(Wiki)    : http://development.root-1.de/Atomic_Blender.php
-#
-#  Start of project              : 2012-03-25 by Clemens Barth
-#  First publication in Blender  : 2012-05-27 by Clemens Barth
-#  Last modified                 : 2012-11-03
-#
-#
-#
-#  To do:
-#  ======
-#
-#  1. Include other shapes: dodecahedron, ...
-#  2. Skin option for parabolic shaped clusters
-#  3. Skin option for icosahedron
-#  4. Icosahedron: unlimited size ... 
-#
-
-bl_info = {
-    "name": "Atomic Blender - Cluster",
-    "description": "Creating cluster formed by atoms",
-    "author": "Clemens Barth",
-    "version": (0,5),
-    "blender": (2,6),
-    "location": "Panel: View 3D - Tools (left side)",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Add_Mesh/Cluster",
-    "tracker_url": "http://projects.blender.org/tracker/"
-                   "index.php?func=detail&aid=31618&group_id=153&atid=468",
-    "category": "Add Mesh"
-}
-
-import os
-import io
-import bpy
-from bpy.types import Operator, Panel
-from bpy_extras.io_utils import ImportHelper, ExportHelper
-from bpy.props import (StringProperty,
-                       BoolProperty,
-                       EnumProperty,
-                       IntProperty,
-                       FloatProperty)
-
-from . import add_mesh_cluster
-
-ATOM_Cluster_PANEL = 0
-
-# -----------------------------------------------------------------------------
-#                                                                           GUI
-
-
-class CLASS_ImportCluster(bpy.types.Operator):
-    bl_idname = "mesh.cluster"
-    bl_label = "Atom cluster"
-    bl_options = {'REGISTER', 'UNDO', 'PRESET'}
-
-    def execute(self, context):
-
-        global ATOM_Cluster_PANEL
-        ATOM_Cluster_PANEL = 1
-
-        return {'FINISHED'}
-
-
-
-class CLASS_atom_cluster_panel(Panel):
-    bl_label       = "Atomic Blender - Cluster"
-    bl_space_type  = "VIEW_3D"
-    bl_region_type = "TOOL_PROPS"
-
-
-    @classmethod
-    def poll(self, context):
-        global ATOM_Cluster_PANEL
-        
-        if ATOM_Cluster_PANEL == 0:
-            return False
-        
-        return True
-
-    def draw(self, context):
-        layout = self.layout
-        
-        if len(context.scene.atom_cluster) == 0:
-            bpy.context.scene.atom_cluster.add()
-        
-        scn = context.scene.atom_cluster[0]
-
-        row = layout.row()
-        row.label(text="Cluster properties")
-        box = layout.box()
-        row = box.row()
-        row.prop(scn, "shape")
-
-        if scn.shape in ["parabolid_square","parabolid_ab","parabolid_abc"]:
-            row = box.row()
-            row.prop(scn, "parabol_diameter")
-            row = box.row()
-            row.prop(scn, "parabol_height")
-        elif scn.shape in ["icosahedron"]:
-            row = box.row()
-            row.prop(scn, "icosahedron_size")
-        else:
-            row = box.row()
-            row.prop(scn, "size")
-            row = box.row()
-            row.prop(scn, "skin")
-
-        row = box.row()
-        row.prop(scn, "lattice_parameter")
-        row = box.row()
-        row.prop(scn, "element")
-        row = box.row()
-        row.prop(scn, "radius_type")        
-        row = box.row()
-        row.prop(scn, "scale_radius")
-        row = box.row()
-        row.prop(scn, "scale_distances")
-        
-        row = layout.row()
-        row.label(text="Load cluster")
-        box = layout.box()
-        row = box.row()    
-        row.operator("atom_cluster.load")
-        row = box.row()
-        row.label(text="Number of atoms")
-        row = box.row()
-        row.prop(scn, "atom_number_total")  
-        row = box.row()
-        row.prop(scn, "atom_number_drawn")  
-        
-        row = layout.row()
-        row.label(text="Modify cluster")
-        box = layout.box()
-        row = box.row()
-        row.label(text="All changes concern:")
-        row = box.row()
-        row.prop(scn, "radius_how")
-        row = box.row()
-        row.label(text="1. Change type of radii")
-        row = box.row()
-        row.prop(scn, "radius_type")
-        row = box.row()
-        row.label(text="2. Change atom radii by scale")
-        row = box.row()
-        col = row.column()
-        col.prop(scn, "radius_all")         
-        col = row.column(align=True)
-        col.operator( "atom_cluster.radius_all_bigger" )
-        col.operator( "atom_cluster.radius_all_smaller" )
-
-
-# The properties (gadgets) in the panel. They all go to scene
-# during initialization (see end) 
-class CLASS_atom_cluster_Properties(bpy.types.PropertyGroup):
-
-    def Callback_radius_type(self, context):
-        scn = bpy.context.scene.atom_cluster[0]
-        DEF_atom_cluster_radius_type(scn.radius_type,
-                                     scn.radius_how,)
-
-    size = FloatProperty(
-        name = "Size", default=30.0, min=0.1,
-        description = "Size of cluster in Angstroem")
-    skin = FloatProperty(
-        name = "Skin", default=1.0, min=0.0, max = 1.0,
-        description = "Skin of cluster in % of size (skin=1.0: show all atoms, skin=0.1: show only the outer atoms)")
-    parabol_diameter = FloatProperty(
-        name = "Diameter", default=30.0, min=0.1,
-        description = "Top diameter in Angstroem")
-    parabol_height = FloatProperty(
-        name = "Height", default=30.0, min=0.1, 
-        description = "Height in Angstroem")
-    icosahedron_size = IntProperty(
-        name = "Size", default=1, min=1, max=13, 
-        description = "Size n: 1 (13 atoms), 2 (55 atoms), 3 (147 atoms), 4 (309 atoms), 5 (561 atoms), ..., 13 (8217 atoms)")
-    shape = EnumProperty(
-        name="",
-        description="Choose the shape of the cluster",
-        items=(('sphere_square',  "Sphere - square",   "Sphere with square lattice"),
-               ('sphere_hex_ab',  "Sphere - hex ab",  "Sphere with hexagonal ab-lattice"),
-               ('sphere_hex_abc', "Sphere - hex abc", "Sphere with hexagonal abc-lattice"),
-               ('pyramide_square',  "Pyramide - Square",    "Pyramide: square (abc-lattice)"),
-               ('pyramide_hex_abc', "Pyramide - Tetraeder", "Pyramide: tetraeder (abcabc-lattice)"),
-               ('octahedron',           "Octahedron",           "Octahedron"),
-               ('truncated_octahedron', "Truncated octahedron", "Truncated octahedron"),
-               ('icosahedron', "Icosahedron", "Icosahedron"),
-               ('parabolid_square', "Paraboloid: square",  "Paraboloid with square lattice"),
-               ('parabolid_ab',     "Paraboloid: hex ab",  "Paraboloid with ab-lattice"),
-               ('parabolid_abc',    "Paraboloid: hex abc", "Paraboloid with abc-lattice")),
-               default='sphere_square',)  
-    lattice_parameter = FloatProperty(
-        name = "Lattice", default=4.08, min=1.0,
-        description = "Lattice parameter in Angstroem")
-    element = StringProperty(name="Element",
-        default="Gold", description = "Enter the name of the element")
-    radius_type = EnumProperty(
-        name="Radius",
-        description="Which type of atom radii?",
-        items=(('0',"predefined", "Use pre-defined radii"),
-               ('1',"atomic", "Use atomic radii"),
-               ('2',"van der Waals","Use van der Waals radii")),
-               default='0',)
-    scale_radius = FloatProperty(
-        name = "Scale R", default=1.0, min=0.0,
-        description = "Scale radius of atoms")
-    scale_distances = FloatProperty(
-        name = "Scale d", default=1.0, min=0.0,
-        description = "Scale distances")
-        
-    atom_number_total = StringProperty(name="Total",
-        default="---", description = "Number of all atoms in the cluster")    
-    atom_number_drawn = StringProperty(name="Drawn",
-        default="---", description = "Number of drawn atoms in the cluster")    
-        
-    radius_how = EnumProperty(
-        name="",
-        description="Which objects shall be modified?",
-        items=(('ALL_ACTIVE',"all active objects", "in the current layer"),
-               ('ALL_IN_LAYER',"all"," in active layer(s)")),
-               default='ALL_ACTIVE',)
-    radius_type = EnumProperty(
-        name="Type",
-        description="Which type of atom radii?",
-        items=(('0',"predefined", "Use pre-defined radii"),
-               ('1',"atomic", "Use atomic radii"),
-               ('2',"van der Waals","Use van der Waals radii")),
-               default='0',update=Callback_radius_type)
-    radius_all = FloatProperty(
-        name="Scale", default = 1.05, min=0.0,
-        description="Put in the scale factor")
-        
-
-# The button for reloading the atoms and creating the scene
-class CLASS_atom_cluster_load_button(Operator):
-    bl_idname = "atom_cluster.load"
-    bl_label = "Load"
-    bl_description = "Load the cluster"
-
-    def execute(self, context):
-        scn    = context.scene.atom_cluster[0]
-
-        add_mesh_cluster.DEF_atom_read_atom_data()
-        del add_mesh_cluster.ATOM_CLUSTER_ALL_ATOMS[:]
-
-        if scn.shape in ["parabolid_ab", "parabolid_abc", "parabolid_square"]:
-            parameter1 = scn.parabol_height
-            parameter2 = scn.parabol_diameter
-        elif scn.shape == "pyramide_hex_abc":
-            parameter1 = scn.size * 1.6
-            parameter2 = scn.skin
-        elif scn.shape == "pyramide_square":
-            parameter1 = scn.size * 1.4
-            parameter2 = scn.skin
-        elif scn.shape in ["octahedron", "truncated_octahedron"]:
-            parameter1 = scn.size * 1.4
-            parameter2 = scn.skin
-        elif scn.shape in ["icosahedron"]:
-            parameter1 = scn.icosahedron_size 
-        else:
-            parameter1 = scn.size
-            parameter2 = scn.skin
-
-        if scn.shape in ["octahedron", "truncated_octahedron", "sphere_square", "pyramide_square", "parabolid_square"]:
-            numbers = add_mesh_cluster.create_square_lattice(
-                                scn.shape, 
-                                parameter1, 
-                                parameter2,
-                                (scn.lattice_parameter/2.0))
-
-        if scn.shape in ["sphere_hex_ab", "parabolid_ab"]:
-            numbers = add_mesh_cluster.create_hexagonal_abab_lattice(
-                                scn.shape, 
-                                parameter1,
-                                parameter2, 
-                                scn.lattice_parameter)
-
-        if scn.shape in ["sphere_hex_abc", "pyramide_hex_abc", "parabolid_abc"]:
-            numbers = add_mesh_cluster.create_hexagonal_abcabc_lattice(
-                                scn.shape, 
-                                parameter1,
-                                parameter2, 
-                                scn.lattice_parameter)
-                                
-        if scn.shape in ["icosahedron"]:
-            numbers = add_mesh_cluster.create_icosahedron( 
-                                parameter1, 
-                                scn.lattice_parameter)
-
-        DEF_atom_draw_atoms(scn.element,
-                            scn.radius_type,
-                            scn.scale_radius,
-                            scn.scale_distances)                        
-
-        scn.atom_number_total = str(numbers[0])
-        scn.atom_number_drawn = str(numbers[1])
-        
-        return {'FINISHED'}
-        
-
-def DEF_atom_draw_atoms(prop_element,
-                        prop_radius_type,
-                        prop_scale_radius,
-                        prop_scale_distances):
-
-    current_layers=bpy.context.scene.layers
-                        
-    for element in add_mesh_cluster.ATOM_CLUSTER_ELEMENTS:
-        if prop_element in element.name:
-            number = element.number
-            name = element.name
-            color = element.color
-            radii = element.radii
-            break   
-    
-    material = bpy.data.materials.new(name)
-    material.name = name
-    material.diffuse_color = color
-
-    atom_vertices = []
-    for atom in add_mesh_cluster.ATOM_CLUSTER_ALL_ATOMS:
-        atom_vertices.append( atom.location * prop_scale_distances )
-    
-    # Build the mesh
-    atom_mesh = bpy.data.meshes.new("Mesh_"+name)
-    atom_mesh.from_pydata(atom_vertices, [], [])
-    atom_mesh.update()
-    new_atom_mesh = bpy.data.objects.new(name, atom_mesh)
-    bpy.context.scene.objects.link(new_atom_mesh)
-    
-    bpy.ops.surface.primitive_nurbs_surface_sphere_add(
-                            view_align=False, enter_editmode=False,
-                            location=(0,0,0), rotation=(0.0, 0.0, 0.0),
-                            layers=current_layers)
-
-    ball = bpy.context.scene.objects.active
-    ball.scale  = (radii[int(prop_radius_type)]*prop_scale_radius,) * 3
-
-    ball.active_material = material
-    ball.parent = new_atom_mesh
-    new_atom_mesh.dupli_type = 'VERTS'
-
-    # ------------------------------------------------------------------------
-    # SELECT ALL LOADED OBJECTS
-    bpy.ops.object.select_all(action='DESELECT')
-    new_atom_mesh.select = True
-    bpy.context.scene.objects.active = new_atom_mesh
-
-    return True
-
-
-# Routine to modify the radii via the type: predefined, atomic or van der Waals
-# Explanations here are also valid for the next 3 DEFs.
-def DEF_atom_cluster_radius_type(rtype,how):
-
-    if how == "ALL_IN_LAYER":
-
-        # Note all layers that are active.
-        layers = []
-        for i in range(20):
-            if bpy.context.scene.layers[i] == True:
-                layers.append(i)
-
-        # Put all objects, which are in the layers, into a list.
-        change_objects = []
-        for obj in bpy.context.scene.objects:
-            for layer in layers:
-                if obj.layers[layer] == True:
-                    change_objects.append(obj)
-
-        # Consider all objects, which are in the list 'change_objects'.
-        for obj in change_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type == "SURFACE" or obj.children[0].type  == "MESH":
-                    for element in add_mesh_cluster.ATOM_CLUSTER_ELEMENTS:
-                        if element.name in obj.name:
-                            obj.children[0].scale = (element.radii[int(rtype)],) * 3
-            else:
-                if obj.type == "SURFACE" or obj.type == "MESH":
-                    for element in add_mesh_cluster.ATOM_CLUSTER_ELEMENTS:
-                        if element.name in obj.name:
-                            obj.scale = (element.radii[int(rtype)],) * 3
-                            
-
-# Routine to scale the radii of all atoms
-def DEF_atom_cluster_radius_all(scale, how):
-
-    if how == "ALL_IN_LAYER":
-
-        layers = []
-        for i in range(20):
-            if bpy.context.scene.layers[i] == True:
-                layers.append(i)
-
-        change_objects = []
-        for obj in bpy.context.scene.objects:
-            for layer in layers:
-                if obj.layers[layer] == True:
-                    change_objects.append(obj)
-
-        for obj in change_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type == "SURFACE" or obj.children[0].type  == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.children[0].scale *= scale
-            else:
-                if obj.type == "SURFACE" or obj.type == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.scale *= scale
-
-    if how == "ALL_ACTIVE":
-        for obj in bpy.context.selected_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type == "SURFACE" or obj.children[0].type  == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.children[0].scale *= scale
-            else:
-                if obj.type == "SURFACE" or obj.type == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.scale *= scale
-
-
-# Button for increasing the radii of all atoms
-class CLASS_atom_cluster_radius_all_bigger_button(Operator):
-    bl_idname = "atom_cluster.radius_all_bigger"
-    bl_label = "Bigger ..."
-    bl_description = "Increase the radii of the atoms"
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_cluster[0]
-        DEF_atom_cluster_radius_all(
-                scn.radius_all,
-                scn.radius_how,)
-        return {'FINISHED'}
-
-
-# Button for decreasing the radii of all atoms
-class CLASS_atom_cluster_radius_all_smaller_button(Operator):
-    bl_idname = "atom_cluster.radius_all_smaller"
-    bl_label = "Smaller ..."
-    bl_description = "Decrease the radii of the atoms"
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_cluster[0]
-        DEF_atom_cluster_radius_all(
-                1.0/scn.radius_all,
-                scn.radius_how,)
-        return {'FINISHED'}
-
-
-# Routine to scale the radii of all atoms
-def DEF_atom_cluster_radius_all(scale, how):
-
-    if how == "ALL_IN_LAYER":
-
-        layers = []
-        for i in range(20):
-            if bpy.context.scene.layers[i] == True:
-                layers.append(i)
-
-        change_objects = []
-        for obj in bpy.context.scene.objects:
-            for layer in layers:
-                if obj.layers[layer] == True:
-                    change_objects.append(obj)
-
-
-        for obj in change_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type == "SURFACE" or obj.children[0].type  == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.children[0].scale *= scale
-            else:
-                if obj.type == "SURFACE" or obj.type == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.scale *= scale
-
-    if how == "ALL_ACTIVE":
-        for obj in bpy.context.selected_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type == "SURFACE" or obj.children[0].type  == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.children[0].scale *= scale
-            else:
-                if obj.type == "SURFACE" or obj.type == "MESH":
-                    if "Stick" not in obj.name:
-                        obj.scale *= scale
-
-
-# The entry into the menu 'file -> import'
-def DEF_menu_func(self, context):
-    self.layout.operator(CLASS_ImportCluster.bl_idname, icon='PLUGIN')
-
-def register_atom_class():
-    bpy.types.Scene.atom_cluster = bpy.props.CollectionProperty(type=CLASS_atom_cluster_Properties)    
-    bpy.context.scene.atom_cluster.add()
-
-def register():
-    bpy.utils.register_module(__name__)
-    register_atom_class()
-    bpy.types.INFO_MT_mesh_add.append(DEF_menu_func)
-    
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_mesh_add.remove(DEF_menu_func)
-
-if __name__ == "__main__":
-
-    register()
diff --git a/release/scripts/addons_contrib/add_mesh_clusters/add_mesh_cluster.py b/release/scripts/addons_contrib/add_mesh_clusters/add_mesh_cluster.py
deleted file mode 100644
index 9e30203..0000000
--- a/release/scripts/addons_contrib/add_mesh_clusters/add_mesh_cluster.py
+++ /dev/null
@@ -1,1321 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-import io
-import math
-import os
-import copy
-from math import pi, cos, sin, tan, sqrt
-from mathutils import Vector, Matrix
-from copy import copy
-
-# -----------------------------------------------------------------------------
-#                                                  Atom, stick and element data
-
-
-# This is a list that contains some data of all possible elements. The structure
-# is as follows:
-#
-# 1, "Hydrogen", "H", [0.0,0.0,1.0], 0.32, 0.32, 0.32 , -1 , 1.54   means
-#
-# No., name, short name, color, radius (used), radius (covalent), radius (atomic),
-#
-# charge state 1, radius (ionic) 1, charge state 2, radius (ionic) 2, ... all
-# charge states for any atom are listed, if existing.
-# The list is fixed and cannot be changed ... (see below)
-
-ATOM_CLUSTER_ELEMENTS_DEFAULT = (
-( 1,      "Hydrogen",        "H", (  1.0,   1.0,   1.0), 0.32, 0.32, 0.79 , -1 , 1.54 ),
-( 2,        "Helium",       "He", ( 0.85,   1.0,   1.0), 0.93, 0.93, 0.49 ),
-( 3,       "Lithium",       "Li", (  0.8,  0.50,   1.0), 1.23, 1.23, 2.05 ,  1 , 0.68 ),
-( 4,     "Beryllium",       "Be", ( 0.76,   1.0,   0.0), 0.90, 0.90, 1.40 ,  1 , 0.44 ,  2 , 0.35 ),
-( 5,         "Boron",        "B", (  1.0,  0.70,  0.70), 0.82, 0.82, 1.17 ,  1 , 0.35 ,  3 , 0.23 ),
-( 6,        "Carbon",        "C", ( 0.56,  0.56,  0.56), 0.77, 0.77, 0.91 , -4 , 2.60 ,  4 , 0.16 ),
-( 7,      "Nitrogen",        "N", ( 0.18,  0.31,  0.97), 0.75, 0.75, 0.75 , -3 , 1.71 ,  1 , 0.25 ,  3 , 0.16 ,  5 , 0.13 ),
-( 8,        "Oxygen",        "O", (  1.0,  0.05,  0.05), 0.73, 0.73, 0.65 , -2 , 1.32 , -1 , 1.76 ,  1 , 0.22 ,  6 , 0.09 ),
-( 9,      "Fluorine",        "F", ( 0.56,  0.87,  0.31), 0.72, 0.72, 0.57 , -1 , 1.33 ,  7 , 0.08 ),
-(10,          "Neon",       "Ne", ( 0.70,  0.89,  0.96), 0.71, 0.71, 0.51 ,  1 , 1.12 ),
-(11,        "Sodium",       "Na", ( 0.67,  0.36,  0.94), 1.54, 1.54, 2.23 ,  1 , 0.97 ),
-(12,     "Magnesium",       "Mg", ( 0.54,   1.0,   0.0), 1.36, 1.36, 1.72 ,  1 , 0.82 ,  2 , 0.66 ),
-(13,     "Aluminium",       "Al", ( 0.74,  0.65,  0.65), 1.18, 1.18, 1.82 ,  3 , 0.51 ),
-(14,       "Silicon",       "Si", ( 0.94,  0.78,  0.62), 1.11, 1.11, 1.46 , -4 , 2.71 , -1 , 3.84 ,  1 , 0.65 ,  4 , 0.42 ),
-(15,    "Phosphorus",        "P", (  1.0,  0.50,   0.0), 1.06, 1.06, 1.23 , -3 , 2.12 ,  3 , 0.44 ,  5 , 0.35 ),
-(16,        "Sulfur",        "S", (  1.0,   1.0,  0.18), 1.02, 1.02, 1.09 , -2 , 1.84 ,  2 , 2.19 ,  4 , 0.37 ,  6 , 0.30 ),
-(17,      "Chlorine",       "Cl", ( 0.12,  0.94,  0.12), 0.99, 0.99, 0.97 , -1 , 1.81 ,  5 , 0.34 ,  7 , 0.27 ),
-(18,         "Argon",       "Ar", ( 0.50,  0.81,  0.89), 0.98, 0.98, 0.88 ,  1 , 1.54 ),
-(19,     "Potassium",        "K", ( 0.56,  0.25,  0.83), 2.03, 2.03, 2.77 ,  1 , 0.81 ),
-(20,       "Calcium",       "Ca", ( 0.23,   1.0,   0.0), 1.74, 1.74, 2.23 ,  1 , 1.18 ,  2 , 0.99 ),
-(21,      "Scandium",       "Sc", ( 0.90,  0.90,  0.90), 1.44, 1.44, 2.09 ,  3 , 0.73 ),
-(22,      "Titanium",       "Ti", ( 0.74,  0.76,  0.78), 1.32, 1.32, 2.00 ,  1 , 0.96 ,  2 , 0.94 ,  3 , 0.76 ,  4 , 0.68 ),
-(23,      "Vanadium",        "V", ( 0.65,  0.65,  0.67), 1.22, 1.22, 1.92 ,  2 , 0.88 ,  3 , 0.74 ,  4 , 0.63 ,  5 , 0.59 ),
-(24,      "Chromium",       "Cr", ( 0.54,   0.6,  0.78), 1.18, 1.18, 1.85 ,  1 , 0.81 ,  2 , 0.89 ,  3 , 0.63 ,  6 , 0.52 ),
-(25,     "Manganese",       "Mn", ( 0.61,  0.47,  0.78), 1.17, 1.17, 1.79 ,  2 , 0.80 ,  3 , 0.66 ,  4 , 0.60 ,  7 , 0.46 ),
-(26,          "Iron",       "Fe", ( 0.87,   0.4,   0.2), 1.17, 1.17, 1.72 ,  2 , 0.74 ,  3 , 0.64 ),
-(27,        "Cobalt",       "Co", ( 0.94,  0.56,  0.62), 1.16, 1.16, 1.67 ,  2 , 0.72 ,  3 , 0.63 ),
-(28,        "Nickel",       "Ni", ( 0.31,  0.81,  0.31), 1.15, 1.15, 1.62 ,  2 , 0.69 ),
-(29,        "Copper",       "Cu", ( 0.78,  0.50,   0.2), 1.17, 1.17, 1.57 ,  1 , 0.96 ,  2 , 0.72 ),
-(30,          "Zinc",       "Zn", ( 0.49,  0.50,  0.69), 1.25, 1.25, 1.53 ,  1 , 0.88 ,  2 , 0.74 ),
-(31,       "Gallium",       "Ga", ( 0.76,  0.56,  0.56), 1.26, 1.26, 1.81 ,  1 , 0.81 ,  3 , 0.62 ),
-(32,     "Germanium",       "Ge", (  0.4,  0.56,  0.56), 1.22, 1.22, 1.52 , -4 , 2.72 ,  2 , 0.73 ,  4 , 0.53 ),
-(33,       "Arsenic",       "As", ( 0.74,  0.50,  0.89), 1.20, 1.20, 1.33 , -3 , 2.22 ,  3 , 0.58 ,  5 , 0.46 ),
-(34,      "Selenium",       "Se", (  1.0,  0.63,   0.0), 1.16, 1.16, 1.22 , -2 , 1.91 , -1 , 2.32 ,  1 , 0.66 ,  4 , 0.50 ,  6 , 0.42 ),
-(35,       "Bromine",       "Br", ( 0.65,  0.16,  0.16), 1.14, 1.14, 1.12 , -1 , 1.96 ,  5 , 0.47 ,  7 , 0.39 ),
-(36,       "Krypton",       "Kr", ( 0.36,  0.72,  0.81), 1.31, 1.31, 1.24 ),
-(37,      "Rubidium",       "Rb", ( 0.43,  0.18,  0.69), 2.16, 2.16, 2.98 ,  1 , 1.47 ),
-(38,     "Strontium",       "Sr", (  0.0,   1.0,   0.0), 1.91, 1.91, 2.45 ,  2 , 1.12 ),
-(39,       "Yttrium",        "Y", ( 0.58,   1.0,   1.0), 1.62, 1.62, 2.27 ,  3 , 0.89 ),
-(40,     "Zirconium",       "Zr", ( 0.58,  0.87,  0.87), 1.45, 1.45, 2.16 ,  1 , 1.09 ,  4 , 0.79 ),
-(41,       "Niobium",       "Nb", ( 0.45,  0.76,  0.78), 1.34, 1.34, 2.08 ,  1 , 1.00 ,  4 , 0.74 ,  5 , 0.69 ),
-(42,    "Molybdenum",       "Mo", ( 0.32,  0.70,  0.70), 1.30, 1.30, 2.01 ,  1 , 0.93 ,  4 , 0.70 ,  6 , 0.62 ),
-(43,    "Technetium",       "Tc", ( 0.23,  0.61,  0.61), 1.27, 1.27, 1.95 ,  7 , 0.97 ),
-(44,     "Ruthenium",       "Ru", ( 0.14,  0.56,  0.56), 1.25, 1.25, 1.89 ,  4 , 0.67 ),
-(45,       "Rhodium",       "Rh", ( 0.03,  0.49,  0.54), 1.25, 1.25, 1.83 ,  3 , 0.68 ),
-(46,     "Palladium",       "Pd", (  0.0,  0.41,  0.52), 1.28, 1.28, 1.79 ,  2 , 0.80 ,  4 , 0.65 ),
-(47,        "Silver",       "Ag", ( 0.75,  0.75,  0.75), 1.34, 1.34, 1.75 ,  1 , 1.26 ,  2 , 0.89 ),
-(48,       "Cadmium",       "Cd", (  1.0,  0.85,  0.56), 1.48, 1.48, 1.71 ,  1 , 1.14 ,  2 , 0.97 ),
-(49,        "Indium",       "In", ( 0.65,  0.45,  0.45), 1.44, 1.44, 2.00 ,  3 , 0.81 ),
-(50,           "Tin",       "Sn", (  0.4,  0.50,  0.50), 1.41, 1.41, 1.72 , -4 , 2.94 , -1 , 3.70 ,  2 , 0.93 ,  4 , 0.71 ),
-(51,      "Antimony",       "Sb", ( 0.61,  0.38,  0.70), 1.40, 1.40, 1.53 , -3 , 2.45 ,  3 , 0.76 ,  5 , 0.62 ),
-(52,     "Tellurium",       "Te", ( 0.83,  0.47,   0.0), 1.36, 1.36, 1.42 , -2 , 2.11 , -1 , 2.50 ,  1 , 0.82 ,  4 , 0.70 ,  6 , 0.56 ),
-(53,        "Iodine",        "I", ( 0.58,   0.0,  0.58), 1.33, 1.33, 1.32 , -1 , 2.20 ,  5 , 0.62 ,  7 , 0.50 ),
-(54,         "Xenon",       "Xe", ( 0.25,  0.61,  0.69), 1.31, 1.31, 1.24 ),
-(55,       "Caesium",       "Cs", ( 0.34,  0.09,  0.56), 2.35, 2.35, 3.35 ,  1 , 1.67 ),
-(56,        "Barium",       "Ba", (  0.0,  0.78,   0.0), 1.98, 1.98, 2.78 ,  1 , 1.53 ,  2 , 1.34 ),
-(57,     "Lanthanum",       "La", ( 0.43,  0.83,   1.0), 1.69, 1.69, 2.74 ,  1 , 1.39 ,  3 , 1.06 ),
-(58,        "Cerium",       "Ce", (  1.0,   1.0,  0.78), 1.65, 1.65, 2.70 ,  1 , 1.27 ,  3 , 1.03 ,  4 , 0.92 ),
-(59,  "Praseodymium",       "Pr", ( 0.85,   1.0,  0.78), 1.65, 1.65, 2.67 ,  3 , 1.01 ,  4 , 0.90 ),
-(60,     "Neodymium",       "Nd", ( 0.78,   1.0,  0.78), 1.64, 1.64, 2.64 ,  3 , 0.99 ),
-(61,    "Promethium",       "Pm", ( 0.63,   1.0,  0.78), 1.63, 1.63, 2.62 ,  3 , 0.97 ),
-(62,      "Samarium",       "Sm", ( 0.56,   1.0,  0.78), 1.62, 1.62, 2.59 ,  3 , 0.96 ),
-(63,      "Europium",       "Eu", ( 0.38,   1.0,  0.78), 1.85, 1.85, 2.56 ,  2 , 1.09 ,  3 , 0.95 ),
-(64,    "Gadolinium",       "Gd", ( 0.27,   1.0,  0.78), 1.61, 1.61, 2.54 ,  3 , 0.93 ),
-(65,       "Terbium",       "Tb", ( 0.18,   1.0,  0.78), 1.59, 1.59, 2.51 ,  3 , 0.92 ,  4 , 0.84 ),
-(66,    "Dysprosium",       "Dy", ( 0.12,   1.0,  0.78), 1.59, 1.59, 2.49 ,  3 , 0.90 ),
-(67,       "Holmium",       "Ho", (  0.0,   1.0,  0.61), 1.58, 1.58, 2.47 ,  3 , 0.89 ),
-(68,        "Erbium",       "Er", (  0.0,  0.90,  0.45), 1.57, 1.57, 2.45 ,  3 , 0.88 ),
-(69,       "Thulium",       "Tm", (  0.0,  0.83,  0.32), 1.56, 1.56, 2.42 ,  3 , 0.87 ),
-(70,     "Ytterbium",       "Yb", (  0.0,  0.74,  0.21), 1.74, 1.74, 2.40 ,  2 , 0.93 ,  3 , 0.85 ),
-(71,      "Lutetium",       "Lu", (  0.0,  0.67,  0.14), 1.56, 1.56, 2.25 ,  3 , 0.85 ),
-(72,       "Hafnium",       "Hf", ( 0.30,  0.76,   1.0), 1.44, 1.44, 2.16 ,  4 , 0.78 ),
-(73,      "Tantalum",       "Ta", ( 0.30,  0.65,   1.0), 1.34, 1.34, 2.09 ,  5 , 0.68 ),
-(74,      "Tungsten",        "W", ( 0.12,  0.58,  0.83), 1.30, 1.30, 2.02 ,  4 , 0.70 ,  6 , 0.62 ),
-(75,       "Rhenium",       "Re", ( 0.14,  0.49,  0.67), 1.28, 1.28, 1.97 ,  4 , 0.72 ,  7 , 0.56 ),
-(76,        "Osmium",       "Os", ( 0.14,   0.4,  0.58), 1.26, 1.26, 1.92 ,  4 , 0.88 ,  6 , 0.69 ),
-(77,       "Iridium",       "Ir", ( 0.09,  0.32,  0.52), 1.27, 1.27, 1.87 ,  4 , 0.68 ),
-(78,     "Platinium",       "Pt", ( 0.81,  0.81,  0.87), 1.30, 1.30, 1.83 ,  2 , 0.80 ,  4 , 0.65 ),
-(79,          "Gold",       "Au", (  1.0,  0.81,  0.13), 1.34, 1.34, 1.79 ,  1 , 1.37 ,  3 , 0.85 ),
-(80,       "Mercury",       "Hg", ( 0.72,  0.72,  0.81), 1.49, 1.49, 1.76 ,  1 , 1.27 ,  2 , 1.10 ),
-(81,      "Thallium",       "Tl", ( 0.65,  0.32,  0.30), 1.48, 1.48, 2.08 ,  1 , 1.47 ,  3 , 0.95 ),
-(82,          "Lead",       "Pb", ( 0.34,  0.34,  0.38), 1.47, 1.47, 1.81 ,  2 , 1.20 ,  4 , 0.84 ),
-(83,       "Bismuth",       "Bi", ( 0.61,  0.30,  0.70), 1.46, 1.46, 1.63 ,  1 , 0.98 ,  3 , 0.96 ,  5 , 0.74 ),
-(84,      "Polonium",       "Po", ( 0.67,  0.36,   0.0), 1.46, 1.46, 1.53 ,  6 , 0.67 ),
-(85,      "Astatine",       "At", ( 0.45,  0.30,  0.27), 1.45, 1.45, 1.43 , -3 , 2.22 ,  3 , 0.85 ,  5 , 0.46 ),
-(86,         "Radon",       "Rn", ( 0.25,  0.50,  0.58), 1.00, 1.00, 1.34 ),
-(87,      "Francium",       "Fr", ( 0.25,   0.0,   0.4), 1.00, 1.00, 1.00 ,  1 , 1.80 ),
-(88,        "Radium",       "Ra", (  0.0,  0.49,   0.0), 1.00, 1.00, 1.00 ,  2 , 1.43 ),
-(89,      "Actinium",       "Ac", ( 0.43,  0.67,  0.98), 1.00, 1.00, 1.00 ,  3 , 1.18 ),
-(90,       "Thorium",       "Th", (  0.0,  0.72,   1.0), 1.65, 1.65, 1.00 ,  4 , 1.02 ),
-(91,  "Protactinium",       "Pa", (  0.0,  0.63,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.13 ,  4 , 0.98 ,  5 , 0.89 ),
-(92,       "Uranium",        "U", (  0.0,  0.56,   1.0), 1.42, 1.42, 1.00 ,  4 , 0.97 ,  6 , 0.80 ),
-(93,     "Neptunium",       "Np", (  0.0,  0.50,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.10 ,  4 , 0.95 ,  7 , 0.71 ),
-(94,     "Plutonium",       "Pu", (  0.0,  0.41,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.08 ,  4 , 0.93 ),
-(95,     "Americium",       "Am", ( 0.32,  0.36,  0.94), 1.00, 1.00, 1.00 ,  3 , 1.07 ,  4 , 0.92 ),
-(96,        "Curium",       "Cm", ( 0.47,  0.36,  0.89), 1.00, 1.00, 1.00 ),
-(97,     "Berkelium",       "Bk", ( 0.54,  0.30,  0.89), 1.00, 1.00, 1.00 ),
-(98,   "Californium",       "Cf", ( 0.63,  0.21,  0.83), 1.00, 1.00, 1.00 ),
-(99,   "Einsteinium",       "Es", ( 0.70,  0.12,  0.83), 1.00, 1.00, 1.00 ),
-(100,       "Fermium",       "Fm", ( 0.70,  0.12,  0.72), 1.00, 1.00, 1.00 ),
-(101,   "Mendelevium",       "Md", ( 0.70,  0.05,  0.65), 1.00, 1.00, 1.00 ),
-(102,      "Nobelium",       "No", ( 0.74,  0.05,  0.52), 1.00, 1.00, 1.00 ),
-(103,    "Lawrencium",       "Lr", ( 0.78,   0.0,   0.4), 1.00, 1.00, 1.00 ),
-(104,       "Vacancy",      "Vac", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-(105,       "Default",  "Default", (  1.0,   1.0,   1.0), 1.00, 1.00, 1.00),
-(106,         "Stick",    "Stick", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-)
-
-# This list here contains all data of the elements and will be used during
-# runtime. It is a list of classes.
-# During executing Atomic Blender, the list will be initialized with the fixed
-# data from above via the class structure below (CLASS_atom_pdb_Elements). We
-# have then one fixed list (above), which will never be changed, and a list of
-# classes with same data. The latter can be modified via loading a separate
-# custom data file.
-ATOM_CLUSTER_ELEMENTS = []
-ATOM_CLUSTER_ALL_ATOMS = []
-
-# This is the class, which stores the properties for one element.
-class CLASS_atom_cluster_Elements(object):
-    __slots__ = ('number', 'name', 'short_name', 'color', 'radii', 'radii_ionic')
-    def __init__(self, number, name, short_name, color, radii, radii_ionic):
-        self.number = number
-        self.name = name
-        self.short_name = short_name
-        self.color = color
-        self.radii = radii
-        self.radii_ionic = radii_ionic
-
-# This is the class, which stores the properties of one atom.
-class CLASS_atom_cluster_atom(object):  
-    __slots__ = ('location')
-    def __init__(self, location):
-        self.location = location
-
-# -----------------------------------------------------------------------------
-#                                                                Read atom data
-        
-def DEF_atom_read_atom_data():
-
-    del ATOM_CLUSTER_ELEMENTS[:]
-
-    for item in ATOM_CLUSTER_ELEMENTS_DEFAULT:
-
-        # All three radii into a list
-        radii = [item[4],item[5],item[6]]
-        # The handling of the ionic radii will be done later. So far, it is an
-        # empty list.
-        radii_ionic = []
-
-        li = CLASS_atom_cluster_Elements(item[0],item[1],item[2],item[3],
-                                         radii,radii_ionic)
-        ATOM_CLUSTER_ELEMENTS.append(li)
-
-  
-# -----------------------------------------------------------------------------
-#                                                           Routines for shapes
-
-def vec_in_sphere(atom_pos,size, skin):
-
-    regular = True
-    inner   = True
-
-    if atom_pos.length > size/2.0:
-        regular = False
-
-    if atom_pos.length < (size/2.0)*(1-skin):
-        inner = False
-
-    return (regular, inner)
-
-
-def vec_in_parabole(atom_pos, height, diameter):
-
-    regular = True
-    inner   = True
-      
-    px = atom_pos[0]  
-    py = atom_pos[1]  
-    pz = atom_pos[2] + height/2.0
-    
-    a = diameter / sqrt(4 * height)
-    
-    
-    if pz < 0.0:
-        return (False, False)
-    if px == 0.0 and py == 0.0:
-        return (True, True)
-         
-    if py == 0.0:
-        y = 0.0
-        x = a * a * pz / px
-        z = x * x / (a * a)
-    else:
-        y = pz * py * a * a / (px*px + py*py)
-        x = y * px / py
-        z = (x*x + y*y) / (a * a)
-    
-    if( atom_pos.length > sqrt(x*x+y*y+z*z) ):
-        regular = False
-    
-    return (regular, inner)
-
-
-def vec_in_pyramide_square(atom_pos, size, skin):
-    
-    """
-    Please, if possible leave all this! The code documents the 
-    mathemetical way of cutting a pyramide with square base.
-
-    P1 = Vector((-size/2, 0.0, -size/4))
-    P2 = Vector((0.0, -size/2, -size/4))
-    P4 = Vector((size/2, 0.0,  -size/4))
-    P5 = Vector((0.0, size/2,  -size/4))
-    P6 = Vector((0.0, 0.0,      size/4))
-
-    # First face
-    v11 = P1 - P2
-    v12 = P1 - P6
-    n1 = v11.cross(v12)
-    g1 = -n1 * P1
-    
-    # Second face
-    v21 = P6 - P4
-    v22 = P6 - P5
-    n2 = v21.cross(v22)
-    g2 = -n2 * P6
-
-    # Third face
-    v31 = P1 - P5
-    v32 = P1 - P6
-    n3 = v32.cross(v31)
-    g3 = -n3 * P1
-    
-    # Forth face
-    v41 = P6 - P2
-    v42 = P2 - P4
-    n4 = v41.cross(v42)
-    g4 = -n4 * P2
-    
-    # Fith face, base
-    v51 = P2 - P1
-    v52 = P2 - P4
-    n5 = v51.cross(v52)
-    g5 = -n5 * P2
-    """
- 
-    # A much faster way for calculation:
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4,  1/4)) * size2
-    g1 = -1/16 * size3
-    n2 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4,  1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 0.0,  0.0, -1/2)) * size2
-    g5 = -1/8 * size3  
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-
-    regular = True
-    inner   = True
-    if(atom_pos.length > on_plane_1):
-        regular = False
-    if(atom_pos.length > on_plane_2):
-        regular = False
-    if(atom_pos.length > on_plane_3):
-        regular = False
-    if(atom_pos.length > on_plane_4):
-        regular = False
-    if(atom_pos.length > on_plane_5):
-        regular = False
-
-    if skin == 1.0:
-        return (regular, inner)
-
-    size = size * (1.0 - skin)
-    
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4,  1/4)) * size2
-    g1 = -1/16 * size3
-    n2 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4,  1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 0.0,  0.0, -1/2)) * size2
-    g5 = -1/8 * size3  
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-    
-    inner = False
-    if(atom_pos.length > on_plane_1):
-        inner = True
-    if(atom_pos.length > on_plane_2):
-        inner = True
-    if(atom_pos.length > on_plane_3):
-        inner = True
-    if(atom_pos.length > on_plane_4):
-        inner = True
-    if(atom_pos.length > on_plane_5):
-        inner = True
-
-    return (regular, inner)
-
-
-def vec_in_pyramide_hex_abc(atom_pos, size, skin):
-    
-    a = size/2.0
-    #c = size/2.0*cos((30/360)*2.0*pi)
-    c = size * 0.4330127020
-    #s = size/2.0*sin((30/360)*2.0*pi)  
-    s = size * 0.25   
-    #h = 2.0 * (sqrt(6.0)/3.0) * c
-    h = 1.632993162 * c
-
-    """
-    Please, if possible leave all this! The code documents the 
-    mathemetical way of cutting a tetraeder.
-
-    P1 = Vector((0.0,   a, 0.0))
-    P2 = Vector(( -c,  -s, 0.0))
-    P3 = Vector((  c,  -s, 0.0))    
-    P4 = Vector((0.0, 0.0,  h))
-    C = (P1+P2+P3+P4)/4.0
-    P1 = P1 - C
-    P2 = P2 - C
-    P3 = P3 - C
-    P4 = P4 - C
-
-    # First face
-    v11 = P1 - P2
-    v12 = P1 - P4
-    n1 = v11.cross(v12)
-    g1 = -n1 * P1
-    
-    # Second face
-    v21 = P2 - P3
-    v22 = P2 - P4
-    n2 = v21.cross(v22)
-    g2 = -n2 * P2
-
-    # Third face
-    v31 = P3 - P1
-    v32 = P3 - P4
-    n3 = v31.cross(v32)
-    g3 = -n3 * P3
-    
-    # Forth face
-    v41 = P2 - P1
-    v42 = P2 - P3
-    n4 = v41.cross(v42)
-    g4 = -n4 * P1
-    """
-
-    n1 = Vector(( -h*(a+s),    c*h,    c*a     ))
-    g1 = -1/2*c*(a*h+s*h)
-    n2 = Vector((        0, -2*c*h,  2*c*s     ))
-    g2 = -1/2*c*(a*h+s*h)
-    n3 = Vector((  h*(a+s),    c*h,    a*c     ))
-    g3 = -1/2*c*(a*h+s*h)
-    n4 = Vector((        0,      0, -2*c*(s+a) ))
-    g4 = -1/2*h*c*(s+a)
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-
-    regular = True
-    inner   = True
-    if(atom_pos.length > on_plane_1):
-        regular = False
-    if(atom_pos.length > on_plane_2):
-        regular = False
-    if(atom_pos.length > on_plane_3):
-        regular = False
-    if(atom_pos.length > on_plane_4):
-        regular = False
-
-    if skin == 1.0:
-        return (regular, inner)
-
-    size = size * (1.0 - skin)
-    
-    a = size/2.0
-    #c = size/2.0*cos((30/360)*2.0*pi)
-    c= size * 0.4330127020
-    #s = size/2.0*sin((30/360)*2.0*pi)  
-    s = size * 0.25   
-    #h = 2.0 * (sqrt(6.0)/3.0) * c
-    h = 1.632993162 * c
-
-    n1 = Vector(( -h*(a+s),    c*h,    c*a     ))
-    g1 = -1/2*c*(a*h+s*h)
-    n2 = Vector((        0, -2*c*h,  2*c*s     ))
-    g2 = -1/2*c*(a*h+s*h)
-    n3 = Vector((  h*(a+s),    c*h,    a*c     ))
-    g3 = -1/2*c*(a*h+s*h)
-    n4 = Vector((        0,      0, -2*c*(s+a) ))
-    g4 = -1/2*h*c*(s+a)
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    
-    inner = False
-    if(atom_pos.length > on_plane_1):
-        inner = True
-    if(atom_pos.length > on_plane_2):
-        inner = True
-    if(atom_pos.length > on_plane_3):
-        inner = True
-    if(atom_pos.length > on_plane_4):
-        inner = True
-
-    return (regular, inner)
-    
-
-
-def vec_in_octahedron(atom_pos,size, skin):
-
-    regular = True
-    inner   = True
-
-    """
-    Please, if possible leave all this! The code documents the 
-    mathemetical way of cutting an octahedron.
-
-    P1 = Vector((-size/2, 0.0, 0.0))
-    P2 = Vector((0.0, -size/2, 0.0))
-    P3 = Vector((0.0, 0.0, -size/2))
-    P4 = Vector((size/2, 0.0, 0.0))
-    P5 = Vector((0.0, size/2, 0.0))
-    P6 = Vector((0.0, 0.0, size/2))
-
-    # First face
-    v11 = P2 - P1
-    v12 = P2 - P3
-    n1 = v11.cross(v12)
-    g1 = -n1 * P2
-    
-    # Second face
-    v21 = P1 - P5
-    v22 = P1 - P3
-    n2 = v21.cross(v22)
-    g2 = -n2 * P1 
-    
-    # Third face
-    v31 = P1 - P2
-    v32 = P1 - P6
-    n3 = v31.cross(v32)
-    g3 = -n3 * P1
-    
-    # Forth face
-    v41 = P6 - P2
-    v42 = P2 - P4
-    n4 = v41.cross(v42)
-    g4 = -n4 * P2
-
-    # Fith face
-    v51 = P2 - P3
-    v52 = P2 - P4
-    n5 = v51.cross(v52)
-    g5 = -n5 * P2
-
-    # Six face
-    v61 = P6 - P4
-    v62 = P6 - P5
-    n6 = v61.cross(v62)
-    g6 = -n6 * P6
-
-    # Seventh face
-    v71 = P5 - P4
-    v72 = P5 - P3
-    n7 = v71.cross(v72)
-    g7 = -n7 * P5
-
-    # Eigth face
-    v81 = P1 - P5
-    v82 = P1 - P6
-    n8 = v82.cross(v81)
-    g8 = -n8 * P1
-    """
- 
-    # A much faster way for calculation:
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4, -1/4)) * size2
-    g1 = -1/8 * size3
-    n2 = Vector((-1/4,  1/4, -1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4, -1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 1/4, -1/4, -1/4)) * size2
-    g5 = g1
-    n6 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g6 = g1
-    n7 = Vector(( 1/4,  1/4, -1/4)) * size2
-    g7 = g1
-    n8 = Vector((-1/4,  1/4,  1/4)) * size2
-    g8 = g1
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-    distance_plane_6 = abs((n6 * atom_pos - g6)/n6.length)
-    on_plane_6 = (atom_pos - n6 * (distance_plane_6/n6.length)).length
-    distance_plane_7 = abs((n7 * atom_pos - g7)/n7.length)
-    on_plane_7 = (atom_pos - n7 * (distance_plane_7/n7.length)).length
-    distance_plane_8 = abs((n8 * atom_pos - g8)/n8.length)
-    on_plane_8 = (atom_pos - n8 * (distance_plane_8/n8.length)).length
-
-    if(atom_pos.length > on_plane_1):
-        regular = False
-    if(atom_pos.length > on_plane_2):
-        regular = False
-    if(atom_pos.length > on_plane_3):
-        regular = False
-    if(atom_pos.length > on_plane_4):
-        regular = False
-    if(atom_pos.length > on_plane_5):
-        regular = False
-    if(atom_pos.length > on_plane_6):
-        regular = False
-    if(atom_pos.length > on_plane_7):
-        regular = False
-    if(atom_pos.length > on_plane_8):
-        regular = False
-
-    if skin == 1.0:
-        return (regular, inner)
-
-    size = size * (1.0 - skin)
-
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4, -1/4)) * size2
-    g1 = -1/8 * size3
-    n2 = Vector((-1/4,  1/4, -1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4, -1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 1/4, -1/4, -1/4)) * size2
-    g5 = g1
-    n6 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g6 = g1
-    n7 = Vector(( 1/4,  1/4, -1/4)) * size2
-    g7 = g1
-    n8 = Vector((-1/4,  1/4,  1/4)) * size2
-    g8 = g1
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-    distance_plane_6 = abs((n6 * atom_pos - g6)/n6.length)
-    on_plane_6 = (atom_pos - n6 * (distance_plane_6/n6.length)).length
-    distance_plane_7 = abs((n7 * atom_pos - g7)/n7.length)
-    on_plane_7 = (atom_pos - n7 * (distance_plane_7/n7.length)).length
-    distance_plane_8 = abs((n8 * atom_pos - g8)/n8.length)
-    on_plane_8 = (atom_pos - n8 * (distance_plane_8/n8.length)).length
-
-    inner = False
-    if(atom_pos.length > on_plane_1):
-        inner = True
-    if(atom_pos.length > on_plane_2):
-        inner = True
-    if(atom_pos.length > on_plane_3):
-        inner = True
-    if(atom_pos.length > on_plane_4):
-        inner = True
-    if(atom_pos.length > on_plane_5):
-        inner = True
-    if(atom_pos.length > on_plane_6):
-        inner = True
-    if(atom_pos.length > on_plane_7):
-        inner = True
-    if(atom_pos.length > on_plane_8):
-        inner = True
-
-    return (regular, inner)
-
-
-def vec_in_truncated_octahedron(atom_pos,size, skin):
-
-    regular = True
-    inner   = True
-
-    # The normal octahedron
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4, -1/4)) * size2
-    g1 = -1/8 * size3
-    n2 = Vector((-1/4,  1/4, -1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4, -1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 1/4, -1/4, -1/4)) * size2
-    g5 = g1
-    n6 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g6 = g1
-    n7 = Vector(( 1/4,  1/4, -1/4)) * size2
-    g7 = g1
-    n8 = Vector((-1/4,  1/4,  1/4)) * size2
-    g8 = g1
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-    distance_plane_6 = abs((n6 * atom_pos - g6)/n6.length)
-    on_plane_6 = (atom_pos - n6 * (distance_plane_6/n6.length)).length
-    distance_plane_7 = abs((n7 * atom_pos - g7)/n7.length)
-    on_plane_7 = (atom_pos - n7 * (distance_plane_7/n7.length)).length
-    distance_plane_8 = abs((n8 * atom_pos - g8)/n8.length)
-    on_plane_8 = (atom_pos - n8 * (distance_plane_8/n8.length)).length
-
-    # Here are the 6 additional faces
-    # pp = (size/2.0) - (sqrt(2.0)/2.0) * ((size/sqrt(2.0))/3.0)
-    pp = size / 3.0
-
-    n_1 = Vector((1.0,0.0,0.0)) 
-    n_2 = Vector((-1.0,0.0,0.0))           
-    n_3 = Vector((0.0,1.0,0.0))    
-    n_4 = Vector((0.0,-1.0,0.0))
-    n_5 = Vector((0.0,0.0,1.0))    
-    n_6 = Vector((0.0,0.0,-1.0))   
-
-    distance_plane_1b = abs((n_1 * atom_pos + pp)/n_1.length)
-    on_plane_1b = (atom_pos - n_1 * (distance_plane_1b/n_1.length)).length
-    distance_plane_2b = abs((n_2 * atom_pos + pp)/n_2.length)
-    on_plane_2b = (atom_pos - n_2 * (distance_plane_2b/n_2.length)).length
-    distance_plane_3b = abs((n_3 * atom_pos + pp)/n_3.length)
-    on_plane_3b = (atom_pos - n_3 * (distance_plane_3b/n_3.length)).length
-    distance_plane_4b = abs((n_4 * atom_pos + pp)/n_4.length)
-    on_plane_4b = (atom_pos - n_4 * (distance_plane_4b/n_4.length)).length
-    distance_plane_5b = abs((n_5 * atom_pos + pp)/n_5.length)
-    on_plane_5b = (atom_pos - n_5 * (distance_plane_5b/n_5.length)).length
-    distance_plane_6b = abs((n_6 * atom_pos + pp)/n_6.length)
-    on_plane_6b = (atom_pos - n_6 * (distance_plane_6b/n_6.length)).length
-
-    if(atom_pos.length > on_plane_1):
-        regular = False
-    if(atom_pos.length > on_plane_2):
-        regular = False
-    if(atom_pos.length > on_plane_3):
-        regular = False
-    if(atom_pos.length > on_plane_4):
-        regular = False
-    if(atom_pos.length > on_plane_5):
-        regular = False
-    if(atom_pos.length > on_plane_6):
-        regular = False
-    if(atom_pos.length > on_plane_7):
-        regular = False
-    if(atom_pos.length > on_plane_8):
-        regular = False
-    if(atom_pos.length > on_plane_1b):
-        regular = False
-    if(atom_pos.length > on_plane_2b):
-        regular = False
-    if(atom_pos.length > on_plane_3b):
-        regular = False
-    if(atom_pos.length > on_plane_4b):
-        regular = False
-    if(atom_pos.length > on_plane_5b):
-        regular = False
-    if(atom_pos.length > on_plane_6b):
-        regular = False
-
-    if skin == 1.0:
-        return (regular, inner)
-
-    size = size * (1.0 - skin)
-    
-    # The normal octahedron
-    size2 = size  * size
-    size3 = size2 * size
-    n1 = Vector((-1/4, -1/4, -1/4)) * size2
-    g1 = -1/8 * size3
-    n2 = Vector((-1/4,  1/4, -1/4)) * size2
-    g2 = g1
-    n3 = Vector((-1/4, -1/4,  1/4)) * size2
-    g3 = g1
-    n4 = Vector(( 1/4, -1/4,  1/4)) * size2
-    g4 = g1
-    n5 = Vector(( 1/4, -1/4, -1/4)) * size2
-    g5 = g1
-    n6 = Vector(( 1/4,  1/4,  1/4)) * size2
-    g6 = g1
-    n7 = Vector(( 1/4,  1/4, -1/4)) * size2
-    g7 = g1
-    n8 = Vector((-1/4,  1/4,  1/4)) * size2
-    g8 = g1
-
-    distance_plane_1 = abs((n1 * atom_pos - g1)/n1.length)
-    on_plane_1 = (atom_pos - n1 * (distance_plane_1/n1.length)).length
-    distance_plane_2 = abs((n2 * atom_pos - g2)/n2.length)
-    on_plane_2 = (atom_pos - n2 * (distance_plane_2/n2.length)).length
-    distance_plane_3 = abs((n3 * atom_pos - g3)/n3.length)
-    on_plane_3 = (atom_pos - n3 * (distance_plane_3/n3.length)).length
-    distance_plane_4 = abs((n4 * atom_pos - g4)/n4.length)
-    on_plane_4 = (atom_pos - n4 * (distance_plane_4/n4.length)).length
-    distance_plane_5 = abs((n5 * atom_pos - g5)/n5.length)
-    on_plane_5 = (atom_pos - n5 * (distance_plane_5/n5.length)).length
-    distance_plane_6 = abs((n6 * atom_pos - g6)/n6.length)
-    on_plane_6 = (atom_pos - n6 * (distance_plane_6/n6.length)).length
-    distance_plane_7 = abs((n7 * atom_pos - g7)/n7.length)
-    on_plane_7 = (atom_pos - n7 * (distance_plane_7/n7.length)).length
-    distance_plane_8 = abs((n8 * atom_pos - g8)/n8.length)
-    on_plane_8 = (atom_pos - n8 * (distance_plane_8/n8.length)).length
-
-    # Here are the 6 additional faces
-    # pp = (size/2.0) - (sqrt(2.0)/2.0) * ((size/sqrt(2.0))/3.0)
-    pp = size / 3.0
-
-    n_1 = Vector((1.0,0.0,0.0)) 
-    n_2 = Vector((-1.0,0.0,0.0))           
-    n_3 = Vector((0.0,1.0,0.0))    
-    n_4 = Vector((0.0,-1.0,0.0))
-    n_5 = Vector((0.0,0.0,1.0))    
-    n_6 = Vector((0.0,0.0,-1.0))   
-    
-    distance_plane_1b = abs((n_1 * atom_pos + pp)/n_1.length)
-    on_plane_1b = (atom_pos - n_1 * (distance_plane_1b/n_1.length)).length
-    distance_plane_2b = abs((n_2 * atom_pos + pp)/n_2.length)
-    on_plane_2b = (atom_pos - n_2 * (distance_plane_2b/n_2.length)).length
-    distance_plane_3b = abs((n_3 * atom_pos + pp)/n_3.length)
-    on_plane_3b = (atom_pos - n_3 * (distance_plane_3b/n_3.length)).length
-    distance_plane_4b = abs((n_4 * atom_pos + pp)/n_4.length)
-    on_plane_4b = (atom_pos - n_4 * (distance_plane_4b/n_4.length)).length
-    distance_plane_5b = abs((n_5 * atom_pos + pp)/n_5.length)
-    on_plane_5b = (atom_pos - n_5 * (distance_plane_5b/n_5.length)).length
-    distance_plane_6b = abs((n_6 * atom_pos + pp)/n_6.length)
-    on_plane_6b = (atom_pos - n_6 * (distance_plane_6b/n_6.length)).length
-
-    inner = False
-
-    if(atom_pos.length > on_plane_1):
-        inner = True
-    if(atom_pos.length > on_plane_2):
-        inner = True
-    if(atom_pos.length > on_plane_3):
-        inner = True
-    if(atom_pos.length > on_plane_4):
-        inner = True
-    if(atom_pos.length > on_plane_5):
-        inner = True
-    if(atom_pos.length > on_plane_6):
-        inner = True
-    if(atom_pos.length > on_plane_7):
-        inner = True
-    if(atom_pos.length > on_plane_8):
-        inner = True
-    if(atom_pos.length > on_plane_1b):
-        inner = True
-    if(atom_pos.length > on_plane_2b):
-        inner = True
-    if(atom_pos.length > on_plane_3b):
-        inner = True
-    if(atom_pos.length > on_plane_4b):
-        inner = True
-    if(atom_pos.length > on_plane_5b):
-        inner = True
-    if(atom_pos.length > on_plane_6b):
-        inner = True
-    
-    return (regular, inner)
-
-# -----------------------------------------------------------------------------
-#                                                         Routines for lattices
-
-def create_hexagonal_abcabc_lattice(ctype, size, skin, lattice):
-
-    atom_number_total = 0
-    atom_number_drawn = 0
-    y_displ = 0
-    z_displ = 0
-
-    """
-    e = (1/sqrt(2.0)) * lattice
-    f = sqrt(3.0/4.0) * e
-    df1 = (e/2.0) * tan((30.0/360.0)*2.0*pi)
-    df2 = (e/2.0) / cos((30.0/360.0)*2.0*pi)
-    g = sqrt(2.0/3.0) * e
-    """
-
-    e = 0.7071067810 * lattice
-    f = 0.8660254038 * e
-    df1 = 0.2886751348 * e
-    df2 = 0.5773502690 * e
-    g = 0.8164965810 * e
-
-    if ctype == "parabolid_abc":
-        # size = height, skin = diameter
-        number_x = int(skin/(2*e))+4
-        number_y = int(skin/(2*f))+4
-        number_z = int(size/(2*g))
-    else:
-        number_x = int(size/(2*e))+4
-        number_y = int(size/(2*f))+4
-        number_z = int(size/(2*g))+1+4
-
-
-    for k in range(-number_z,number_z+1):
-        for j in range(-number_y,number_y+1):
-            for i in range(-number_x,number_x+1):
-                atom = Vector((float(i)*e,float(j)*f,float(k)*g)) 
-
-                if y_displ == 1:
-                    if z_displ == 1:
-                        atom[0] += e/2.0  
-                    else:
-                        atom[0] -= e/2.0
-                if z_displ == 1:
-                    atom[0] -= e/2.0
-                    atom[1] += df1
-                if z_displ == 2:
-                    atom[0] += 0.0
-                    atom[1] += df2
-
-                if ctype == "sphere_hex_abc":
-                    message = vec_in_sphere(atom, size, skin)
-                elif ctype == "pyramide_hex_abc":
-                    # size = height, skin = diameter
-                    message = vec_in_pyramide_hex_abc(atom, size, skin)
-                elif ctype == "parabolid_abc":
-                    message = vec_in_parabole(atom, size, skin)          
-
-                if message[0] == True and message[1] == True:
-                    atom_add = CLASS_atom_cluster_atom(atom)
-                    ATOM_CLUSTER_ALL_ATOMS.append(atom_add)
-                    atom_number_total += 1
-                    atom_number_drawn += 1
-                if message[0] == True and message[1] == False:
-                    atom_number_total += 1                 
-          
-            if y_displ == 1:
-                y_displ = 0
-            else:
-                y_displ = 1
-
-        y_displ = 0
-        if z_displ == 0:
-           z_displ = 1
-        elif z_displ == 1:
-           z_displ = 2
-        else:
-           z_displ = 0
-
-    print("Atom positions calculated")
-
-    return (atom_number_total, atom_number_drawn)
-
-
-def create_hexagonal_abab_lattice(ctype, size, skin, lattice):
-
-    atom_number_total = 0
-    atom_number_drawn = 0
-    y_displ = "even"
-    z_displ = "even"
-
-    """
-    e = (1/sqrt(2.0)) * lattice
-    f = sqrt(3.0/4.0) * e
-    df = (e/2.0) * tan((30.0/360.0)*2*pi)
-    g = sqrt(2.0/3.0) * e
-    """
-
-    e = 0.7071067814 * lattice
-    f = 0.8660254038 * e
-    df = 0.2886751348 * e
-    g = 0.8164965810 * e
-
-
-    if ctype == "parabolid_ab":
-        # size = height, skin = diameter
-        number_x = int(skin/(2*e))+4
-        number_y = int(skin/(2*f))+4
-        number_z = int(size/(2*g))
-    else:
-        number_x = int(size/(2*e))+4
-        number_y = int(size/(2*f))+4
-        number_z = int(size/(2*g))+1+4
-
-
-    for k in range(-number_z,number_z+1):
-        for j in range(-number_y,number_y+1):
-            for i in range(-number_x,number_x+1):
-
-                atom = Vector((float(i)*e,float(j)*f,float(k)*g))
-          
-                if "odd" in y_displ:
-                    if "odd" in z_displ:
-                        atom[0] += e/2.0  
-                    else:
-                        atom[0] -= e/2.0
-                if "odd" in z_displ:
-                    atom[0] -= e/2.0
-                    atom[1] += df
-
-                if ctype == "sphere_hex_ab":
-                    message = vec_in_sphere(atom, size, skin)
-                elif ctype == "parabolid_ab":
-                    # size = height, skin = diameter
-                    message = vec_in_parabole(atom, size, skin)          
-          
-                if message[0] == True and message[1] == True:
-                    atom_add = CLASS_atom_cluster_atom(atom)
-                    ATOM_CLUSTER_ALL_ATOMS.append(atom_add)
-                    atom_number_total += 1
-                    atom_number_drawn += 1
-                if message[0] == True and message[1] == False:
-                    atom_number_total += 1  
-          
-            if "even" in y_displ:
-                y_displ = "odd"
-            else:
-                y_displ = "even"
-
-        y_displ = "even"
-        if "even" in z_displ:
-            z_displ = "odd"
-        else:
-            z_displ = "even"
-
-    print("Atom positions calculated")
-
-    return (atom_number_total, atom_number_drawn)
-
-
-def create_square_lattice(ctype, size, skin, lattice):
-
-    atom_number_total = 0
-    atom_number_drawn = 0
-    
-    if ctype == "parabolid_square":
-        # size = height, skin = diameter
-        number_k = int(size/(2.0*lattice))
-        number_j = int(skin/(2.0*lattice)) + 5
-        number_i = int(skin/(2.0*lattice)) + 5
-    else:
-        number_k = int(size/(2.0*lattice))
-        number_j = int(size/(2.0*lattice))
-        number_i = int(size/(2.0*lattice))       
-
-
-    for k in range(-number_k,number_k+1):
-        for j in range(-number_j,number_j+1):
-            for i in range(-number_i,number_i+1):
-
-                atom = Vector((float(i),float(j),float(k))) * lattice 
-
-                if ctype == "sphere_square":
-                    message = vec_in_sphere(atom, size, skin)
-                elif ctype == "pyramide_square":
-                    message = vec_in_pyramide_square(atom, size, skin)
-                elif ctype == "parabolid_square":
-                    # size = height, skin = diameter
-                    message = vec_in_parabole(atom, size, skin)          
-                elif ctype == "octahedron":
-                    message = vec_in_octahedron(atom, size, skin)            
-                elif ctype == "truncated_octahedron":
-                    message = vec_in_truncated_octahedron(atom,size, skin)
-
-                if message[0] == True and message[1] == True:
-                    atom_add = CLASS_atom_cluster_atom(atom)
-                    ATOM_CLUSTER_ALL_ATOMS.append(atom_add)
-                    atom_number_total += 1
-                    atom_number_drawn += 1
-                if message[0] == True and message[1] == False:
-                    atom_number_total += 1 
-
-    print("Atom positions calculated")
-
-    return (atom_number_total, atom_number_drawn)
-
-
-
-# -----------------------------------------------------------------------------
-#                                                   Routine for the icosahedron
-
-
-# Note that the icosahedron needs a special treatment since it requires a
-# non-common crystal lattice. The faces are (111) facets and the geometry
-# is five-fold. So far, a max size of 8217 atoms can be chosen.
-# More details about icosahedron shaped clusters can be found in:
-#
-# 1. C. Mottet, G. Tréglia, B. Legrand, Surface Science 383 (1997) L719-L727
-# 2. C. R. Henry, Surface Science Reports 31 (1998) 231-325
-
-# The following code is a translation from an existing Fortran code into Python.
-# The Fortran code has been created by Christine Mottet and translated by me
-# (Clemens Barth). 
-
-# Although a couple of code lines are non-typical for Python, it is best to
-# leave the code as is.
-#
-# To do:
-#
-# 1. Unlimited cluster size
-# 2. Skin effect
-
-def create_icosahedron(size, lattice):
-
-    natot = int(1 + (10*size*size+15*size+11)*size/3)
-
-    x = list(range(natot+1))
-    y = list(range(natot+1))
-    z = list(range(natot+1))
-
-    xs = list(range(12+1))
-    ys = list(range(12+1))
-    zs = list(range(12+1))
-
-    xa = [[[ [] for i in range(12+1)] for j in range(12+1)] for k in range(20+1)]
-    ya = [[[ [] for i in range(12+1)] for j in range(12+1)] for k in range(20+1)]
-    za = [[[ [] for i in range(12+1)] for j in range(12+1)] for k in range(20+1)]
-
-    naret  = [[ [] for i in range(12+1)] for j in range(12+1)]
-    nfacet = [[[ [] for i in range(12+1)] for j in range(12+1)] for k in range(12+1)]
-
-    rac2 = sqrt(2.0)
-    rac5 = sqrt(5.0)
-    tdef = (rac5+1.0)/2.0
-
-    rapp  = sqrt(2.0*(1.0-tdef/(tdef*tdef+1.0)))
-    nats  = 2 * (5*size*size+1)
-    nat   = 13
-    epsi  = 0.01
-
-    x[1] = 0.0
-    y[1] = 0.0
-    z[1] = 0.0
-
-    for i in range(2, 5+1):
-        z[i]   = 0.0
-        y[i+4] = 0.0
-        x[i+8] = 0.0
-    
-    for i in range(2, 3+1):
-        x[i]    =  tdef
-        x[i+2]  = -tdef
-        x[i+4]  =  1.0
-        x[i+6]  = -1.0
-        y[i+8]  =  tdef
-        y[i+10] = -tdef
-
-    for i in range(2, 4+1, 2):
-        y[i]   =  1.0
-        y[i+1] = -1.0
-        z[i+4] =  tdef
-        z[i+5] = -tdef
-        z[i+8] =  1.0
-        z[i+9] = -1.0
-
-    xdef = rac2 / sqrt(tdef * tdef + 1)
-
-    for i in range(2, 13+1):
-        x[i] = x[i] * xdef / 2.0
-        y[i] = y[i] * xdef / 2.0
-        z[i] = z[i] * xdef / 2.0
-
-    if size > 1:
-
-        for n in range (2, size+1):
-            ifacet = 0
-            iaret  = 0
-            inatf  = 0
-            for i in range(1, 12+1):
-                for j in range(1, 12+1):
-                    naret[i][j] = 0
-                    for k in range (1, 12+1): 
-                        nfacet[i][j][k] = 0
-
-            nl1 = 6
-            nl2 = 8
-            nl3 = 9
-            k1  = 0
-            k2  = 0
-            k3  = 0
-            k12 = 0
-            for i in range(1, 12+1):
-                nat += 1
-                xs[i] = n * x[i+1]
-                ys[i] = n * y[i+1]
-                zs[i] = n * z[i+1]
-                x[nat] = xs[i]
-                y[nat] = ys[i]
-                z[nat] = zs[i]
-                k1 += 1
-
-            for i in range(1, 12+1):
-                for j in range(2, 12+1):
-                    if j <= i:
-                        continue
-                    
-                    xij = xs[j] - xs[i]
-                    yij = ys[j] - ys[i]
-                    zij = zs[j] - zs[i]
-                    xij2 = xij * xij
-                    yij2 = yij * yij
-                    zij2 = zij * zij
-                    dij2 = xij2 + yij2 + zij2
-                    dssn = n * rapp / rac2
-                    dssn2 = dssn * dssn
-                    diffij = abs(dij2-dssn2)
-                    if diffij >= epsi:
-                        continue
-                    
-                    for k in range(3, 12+1):
-                        if k <= j:
-                            continue
-                        
-                        xjk = xs[k] - xs[j]
-                        yjk = ys[k] - ys[j]
-                        zjk = zs[k] - zs[j]
-                        xjk2 = xjk * xjk
-                        yjk2 = yjk * yjk
-                        zjk2 = zjk * zjk
-                        djk2 = xjk2 + yjk2 + zjk2
-                        diffjk = abs(djk2-dssn2)
-                        if diffjk >= epsi:
-                            continue
-                        
-                        xik = xs[k] - xs[i]
-                        yik = ys[k] - ys[i]
-                        zik = zs[k] - zs[i]
-                        xik2 = xik * xik
-                        yik2 = yik * yik
-                        zik2 = zik * zik
-                        dik2 = xik2 + yik2 + zik2
-                        diffik = abs(dik2-dssn2)
-                        if diffik >= epsi:
-                            continue
-                        
-                        if nfacet[i][j][k] != 0:
-                            continue
-
-                        ifacet += 1
-                        nfacet[i][j][k] = ifacet
-
-                        if naret[i][j] == 0:
-                            iaret += 1
-                            naret[i][j] = iaret
-                            for l in range(1,n-1+1):
-                                nat += 1
-                                xa[i][j][l] = xs[i]+l*(xs[j]-xs[i]) / n
-                                ya[i][j][l] = ys[i]+l*(ys[j]-ys[i]) / n
-                                za[i][j][l] = zs[i]+l*(zs[j]-zs[i]) / n
-                                x[nat] = xa[i][j][l]
-                                y[nat] = ya[i][j][l]
-                                z[nat] = za[i][j][l]
-
-                        if naret[i][k] == 0:
-                            iaret += 1
-                            naret[i][k] = iaret
-                            for l in range(1, n-1+1):
-                                nat += 1
-                                xa[i][k][l] = xs[i]+l*(xs[k]-xs[i]) / n
-                                ya[i][k][l] = ys[i]+l*(ys[k]-ys[i]) / n
-                                za[i][k][l] = zs[i]+l*(zs[k]-zs[i]) / n
-                                x[nat] = xa[i][k][l]
-                                y[nat] = ya[i][k][l]
-                                z[nat] = za[i][k][l]
-
-                        if naret[j][k] == 0:
-                            iaret += 1
-                            naret[j][k] = iaret
-                            for l in range(1, n-1+1):
-                                nat += 1
-                                xa[j][k][l] = xs[j]+l*(xs[k]-xs[j]) / n
-                                ya[j][k][l] = ys[j]+l*(ys[k]-ys[j]) / n
-                                za[j][k][l] = zs[j]+l*(zs[k]-zs[j]) / n
-                                x[nat] = xa[j][k][l]
-                                y[nat] = ya[j][k][l]
-                                z[nat] = za[j][k][l]
-
-                        for l in range(2, n-1+1):
-                            for ll in range(1, l-1+1):
-                                xf = xa[i][j][l]+ll*(xa[i][k][l]-xa[i][j][l]) / l
-                                yf = ya[i][j][l]+ll*(ya[i][k][l]-ya[i][j][l]) / l
-                                zf = za[i][j][l]+ll*(za[i][k][l]-za[i][j][l]) / l
-                                nat += 1
-                                inatf += 1
-                                x[nat] = xf
-                                y[nat] = yf
-                                z[nat] = zf
-                                k3 += 1
-
-    atom_number_total = 0
-    atom_number_drawn = 0
-
-    for i in range (1,natot+1):
-
-        atom = Vector((x[i],y[i],z[i])) * lattice 
-
-        atom_add = CLASS_atom_cluster_atom(atom)
-        ATOM_CLUSTER_ALL_ATOMS.append(atom_add)
-        atom_number_total += 1
-        atom_number_drawn += 1
-
-    return (atom_number_total, atom_number_drawn)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/__init__.py b/release/scripts/addons_contrib/add_mesh_rocks/__init__.py
deleted file mode 100644
index 0f7cf24..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/__init__.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Paul "BrikBot" Marshall
-# Created: July 1, 2011
-# Last Modified: November 17, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-# Thanks to Meta-Androco, RickyBlender, Ace Dragon, and PKHG for ideas
-#   and testing.
-#
-# Coded in IDLE, tested in Blender 2.59.  NumPy Recommended.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  The Blender Rock Creation tool is for rapid generation of
-#  mesh rocks in Blender.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Rock Generator",
-    "author": "Paul Marshall (brikbot)",
-    "version": (1, 3),
-    "blender": (2, 6, 1),
-    "location": "View3D > Add > Rock Generator",
-    "description": "Adds a mesh rock to the Add Mesh menu",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6"\
-        "/Py/Scripts/Add_Mesh/Rock_Generator",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=27314",
-    "category": "Add Mesh"}
-
-if "bpy" in locals():
-    import imp
-    imp.reload(rockgen)
-else:
-    from add_mesh_rocks import rockgen
-
-import bpy
-
-
-# Register:
-def menu_func_rocks(self, context):
-    self.layout.operator(rockgen.rocks.bl_idname,
-                         text="Rock Generator",
-                         icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_mesh_add.append(menu_func_rocks)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_mesh_add.remove(menu_func_rocks)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/add_mesh_rocks.xml b/release/scripts/addons_contrib/add_mesh_rocks/add_mesh_rocks.xml
deleted file mode 100644
index 0202486..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/add_mesh_rocks.xml
+++ /dev/null
@@ -1,403 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE settings [
-<!ELEMENT settings (default,preset*)>
-<!ELEMENT default (title,size,shape,material,random)>
-<!ELEMENT preset (title,size,shape,material,random)>
-<!ELEMENT title (#PCDATA)>
-<!ELEMENT size (scale+,skew+,use_scale_dis,scale_fac)>
-<!ELEMENT scale (axis,lower,upper)>
-<!ELEMENT axis (#PCDATA)>
-<!ELEMENT lower (#PCDATA)>
-<!ELEMENT upper (#PCDATA)>
-<!ELEMENT skew (axis,value)>
-<!ELEMENT value (#PCDATA)>
-<!ELEMENT use_scale_dis (#PCDATA)>
-<!ELEMENT scale_fac (#PCDATA)>
-<!ELEMENT shape (deform,rough,detail,display_detail,smooth_fac,smooth_it)>
-<!ELEMENT deform (#PCDATA)>
-<!ELEMENT rough (#PCDATA)>
-<!ELEMENT detail (#PCDATA)>
-<!ELEMENT display_detail (#PCDATA)>
-<!ELEMENT smooth_fac (#PCDATA)>
-<!ELEMENT smooth_it (#PCDATA)>
-<!ELEMENT material (mat_enable,mat_color,mat_bright,mat_rough,mat_spec,mat_hard,mat_use_trans,mat_alpha,mat_cloudy,mat_IOR,mat_mossy)>
-<!ELEMENT mat_enable (#PCDATA)>
-<!ELEMENT mat_color (#PCDATA)>
-<!ELEMENT mat_bright (#PCDATA)>
-<!ELEMENT mat_rough (#PCDATA)>
-<!ELEMENT mat_spec (#PCDATA)>
-<!ELEMENT mat_hard (#PCDATA)>
-<!ELEMENT mat_use_trans (#PCDATA)>
-<!ELEMENT mat_alpha (#PCDATA)>
-<!ELEMENT mat_cloudy (#PCDATA)>
-<!ELEMENT mat_IOR (#PCDATA)>
-<!ELEMENT mat_mossy (#PCDATA)>
-<!ELEMENT random (use_random_seed,user_seed)>
-<!ELEMENT use_generate (#PCDATA)>
-<!ELEMENT use_random_seed (#PCDATA)>
-<!ELEMENT user_seed (#PCDATA)>
-
-<!ATTLIST preset id ID #REQUIRED>
-]>
-<settings>
-	<default>
-		<title>Default</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>5.0</deform>
-			<rough>2.5</rough>
-			<detail>3</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>False</mat_enable>
-			<mat_color>[0.5, 0.5, 0.5]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.0</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</default>
-	<preset id="1">
-		<title>River Rock</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>-0.5</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>-0.5</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>-0.5</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>3.0</deform>
-			<rough>2.0</rough>
-			<detail>2</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>2</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.5, 0.5, 0.5]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.125</mat_rough>
-			<mat_spec>0.5</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="2">
-		<title>Astroid</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>7.5</deform>
-			<rough>3.0</rough>
-			<detail>4</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.3, 0.25, 0.2]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.5</mat_rough>
-			<mat_spec>0.25</mat_spec>
-			<mat_hard>30</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="3">
-		<title>Sandstone</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>True</use_scale_dis>
-			<scale_fac>[5.0, 5.0, 0.1]</scale_fac>
-		</size>
-		<shape>
-			<deform>0.5</deform>
-			<rough>1.0</rough>
-			<detail>3</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>2</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.5, 0.4, 0.35]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.1</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="4">
-		<title>Ice</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>5.0</deform>
-			<rough>1.0</rough>
-			<detail>3</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>1</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.9, 0.95, 1.0]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.25</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>True</mat_use_trans>
-			<mat_alpha>0.9</mat_alpha>
-			<mat_cloudy>0.1</mat_cloudy>
-			<mat_IOR>1.31</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="5">
-		<title>Fake Ocean</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>10.0</lower>
-				<upper>10.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>10.0</lower>
-				<upper>10.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.0</lower>
-				<upper>0.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>7.5</deform>
-			<rough>3.0</rough>
-			<detail>4</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.1, 0.12, 0.125]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.5</mat_rough>
-			<mat_spec>0.25</mat_spec>
-			<mat_hard>30</mat_hard>
-			<mat_use_trans>True</mat_use_trans>
-			<mat_alpha>0.5</mat_alpha>
-			<mat_cloudy>0.5</mat_cloudy>
-			<mat_IOR>1.333</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-</settings>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/factory.xml b/release/scripts/addons_contrib/add_mesh_rocks/factory.xml
deleted file mode 100644
index 0202486..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/factory.xml
+++ /dev/null
@@ -1,403 +0,0 @@
-<?xml version="1.0" ?>
-<!DOCTYPE settings [
-<!ELEMENT settings (default,preset*)>
-<!ELEMENT default (title,size,shape,material,random)>
-<!ELEMENT preset (title,size,shape,material,random)>
-<!ELEMENT title (#PCDATA)>
-<!ELEMENT size (scale+,skew+,use_scale_dis,scale_fac)>
-<!ELEMENT scale (axis,lower,upper)>
-<!ELEMENT axis (#PCDATA)>
-<!ELEMENT lower (#PCDATA)>
-<!ELEMENT upper (#PCDATA)>
-<!ELEMENT skew (axis,value)>
-<!ELEMENT value (#PCDATA)>
-<!ELEMENT use_scale_dis (#PCDATA)>
-<!ELEMENT scale_fac (#PCDATA)>
-<!ELEMENT shape (deform,rough,detail,display_detail,smooth_fac,smooth_it)>
-<!ELEMENT deform (#PCDATA)>
-<!ELEMENT rough (#PCDATA)>
-<!ELEMENT detail (#PCDATA)>
-<!ELEMENT display_detail (#PCDATA)>
-<!ELEMENT smooth_fac (#PCDATA)>
-<!ELEMENT smooth_it (#PCDATA)>
-<!ELEMENT material (mat_enable,mat_color,mat_bright,mat_rough,mat_spec,mat_hard,mat_use_trans,mat_alpha,mat_cloudy,mat_IOR,mat_mossy)>
-<!ELEMENT mat_enable (#PCDATA)>
-<!ELEMENT mat_color (#PCDATA)>
-<!ELEMENT mat_bright (#PCDATA)>
-<!ELEMENT mat_rough (#PCDATA)>
-<!ELEMENT mat_spec (#PCDATA)>
-<!ELEMENT mat_hard (#PCDATA)>
-<!ELEMENT mat_use_trans (#PCDATA)>
-<!ELEMENT mat_alpha (#PCDATA)>
-<!ELEMENT mat_cloudy (#PCDATA)>
-<!ELEMENT mat_IOR (#PCDATA)>
-<!ELEMENT mat_mossy (#PCDATA)>
-<!ELEMENT random (use_random_seed,user_seed)>
-<!ELEMENT use_generate (#PCDATA)>
-<!ELEMENT use_random_seed (#PCDATA)>
-<!ELEMENT user_seed (#PCDATA)>
-
-<!ATTLIST preset id ID #REQUIRED>
-]>
-<settings>
-	<default>
-		<title>Default</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>5.0</deform>
-			<rough>2.5</rough>
-			<detail>3</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>False</mat_enable>
-			<mat_color>[0.5, 0.5, 0.5]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.0</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</default>
-	<preset id="1">
-		<title>River Rock</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.5</lower>
-				<upper>1.25</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>-0.5</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>-0.5</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>-0.5</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>3.0</deform>
-			<rough>2.0</rough>
-			<detail>2</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>2</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.5, 0.5, 0.5]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.125</mat_rough>
-			<mat_spec>0.5</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="2">
-		<title>Astroid</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>5.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>7.5</deform>
-			<rough>3.0</rough>
-			<detail>4</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.3, 0.25, 0.2]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.5</mat_rough>
-			<mat_spec>0.25</mat_spec>
-			<mat_hard>30</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="3">
-		<title>Sandstone</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>1.0</lower>
-				<upper>1.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>True</use_scale_dis>
-			<scale_fac>[5.0, 5.0, 0.1]</scale_fac>
-		</size>
-		<shape>
-			<deform>0.5</deform>
-			<rough>1.0</rough>
-			<detail>3</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>2</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.5, 0.4, 0.35]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.1</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>False</mat_use_trans>
-			<mat_alpha>0.0</mat_alpha>
-			<mat_cloudy>0.0</mat_cloudy>
-			<mat_IOR>1.0</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="4">
-		<title>Ice</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.0</lower>
-				<upper>2.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>5.0</deform>
-			<rough>1.0</rough>
-			<detail>3</detail>
-			<display_detail>2</display_detail>
-			<smooth_fac>2.0</smooth_fac>
-			<smooth_it>1</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.9, 0.95, 1.0]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>0.25</mat_rough>
-			<mat_spec>0.2</mat_spec>
-			<mat_hard>50</mat_hard>
-			<mat_use_trans>True</mat_use_trans>
-			<mat_alpha>0.9</mat_alpha>
-			<mat_cloudy>0.1</mat_cloudy>
-			<mat_IOR>1.31</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-	<preset id="5">
-		<title>Fake Ocean</title>
-		<size>
-			<scale>
-				<axis>X</axis>
-				<lower>10.0</lower>
-				<upper>10.0</upper>
-			</scale>
-			<scale>
-				<axis>Y</axis>
-				<lower>10.0</lower>
-				<upper>10.0</upper>
-			</scale>
-			<scale>
-				<axis>Z</axis>
-				<lower>0.0</lower>
-				<upper>0.0</upper>
-			</scale>
-			<skew>
-				<axis>X</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Y</axis>
-				<value>0.0</value>
-			</skew>
-			<skew>
-				<axis>Z</axis>
-				<value>0.0</value>
-			</skew>
-			<use_scale_dis>False</use_scale_dis>
-			<scale_fac>[1.0, 1.0, 1.0]</scale_fac>
-		</size>
-		<shape>
-			<deform>7.5</deform>
-			<rough>3.0</rough>
-			<detail>4</detail>
-			<display_detail>3</display_detail>
-			<smooth_fac>0.0</smooth_fac>
-			<smooth_it>0</smooth_it>
-		</shape>
-		<material>
-			<mat_enable>True</mat_enable>
-			<mat_color>[0.1, 0.12, 0.125]</mat_color>
-			<mat_bright>0.85</mat_bright>
-			<mat_rough>1.5</mat_rough>
-			<mat_spec>0.25</mat_spec>
-			<mat_hard>30</mat_hard>
-			<mat_use_trans>True</mat_use_trans>
-			<mat_alpha>0.5</mat_alpha>
-			<mat_cloudy>0.5</mat_cloudy>
-			<mat_IOR>1.333</mat_IOR>
-			<mat_mossy>0.0</mat_mossy>
-		</material>
-		<random>
-			<use_generate>True</use_generate>
-			<use_random_seed>True</use_random_seed>
-			<user_seed>1</user_seed>
-		</random>
-	</preset>
-</settings>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/rockgen.py b/release/scripts/addons_contrib/add_mesh_rocks/rockgen.py
deleted file mode 100644
index 25df19a..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/rockgen.py
+++ /dev/null
@@ -1,1602 +0,0 @@
-# Blender rock creation tool
-#
-# Based on BlenderGuru's asteroid tutorial and personal experimentation.
-#   Tutorial: http://www.blenderguru.com/how-to-make-a-realistic-asteroid/
-# Update with another tutorial shared by "rusted" of BlenderArtists:
-#   Tutorial: http://saschahenrichs.blogspot.com/2010/03/3dsmax-environment-modeling-1.html
-#
-# Uses the NumPy Gaussian random number generator to generate a
-# a rock within a given range and give some randomness to the displacement
-# texture values.  NumPy's gaussian generator was chosen as, based on
-# profiling I performed, it runs in about half the time as the built in
-# Python gaussian equivalent.  I would like to shift the script to use the
-# NumPy beta distribution as it ran in about half the time as the NumPy
-# gaussian once the skew calculations are added.
-#
-# Set lower and upper bounds to the same for no randomness.
-#
-# Tasks:
-#   Generate meshes with random scaling between given values.
-#       - Allow for a skewed distribution
-#           *** Completed on 4/17/2011 ***
-#       - Create a set of meshes that can be used
-#   Give the user the ability to set the subsurf level (detail level)
-#       *** Completed on 4/29/2011 ***
-#       - Set subsurf modifiers to default at view:3, render:3.
-#           *** Completed on 4/17/2011 ***
-#       - Set crease values to allow for hard edges on first subsurf.
-#           *** Completed on 4/29/2011 ***
-#   Be able to generate and add a texture to the displacement modifiers.
-#       *** Completed 5/17/2011 ***
-#       - Generate three displacement modifiers.
-#           - The first only uses a Musgrave for initial intentations.
-#           *** Now generating four displacement modifiers ***
-#           *** Completed on 5/17/2011 ***
-#       - Set a randomness for the type and values of the displacement texture.
-#           *** Completed 5/9/2011 ***
-#       - Allow the user to set a value for the range of displacement.
-#           -> Modification: have user set "roughness" and "roughness range".
-#           *** Compleded on 4/23/2011 ***
-#   Set material settings and assign material textures
-#       *** Completed 6/9/2011 ***
-#       - Mossiness of the rocks.
-#           *** Completed 6/9/2011 ***
-#       - Color of the rocks.
-#           *** Completed 5/16/2011 ***
-#       - Wetness/shinyness of the rock.
-#           *** Completed 5/6/2011 ***
-#       - For all the user provides a mean value for a skewed distribution.
-#           *** Removed to lessen usage complexity ***
-#   Add some presets (mesh) to make it easier to use
-#       - Examples: river rock, asteroid, quaried rock, etc
-#           *** Completed 7/12/2011 ***
-#
-# Code Optimization:
-#   Remove all "bpy.ops" operations with "bpy.data" base operations.
-#   Remove material/texture cataloging with building a list of
-#       returned values from bpy.data.*.new() operations.
-#       *** Completed on 9/6/2011 ***
-#   Search for places where list comprehensions can be used.
-#   Look for alternate methods
-#       - Possible alternate and more efficient data structures
-#       - Possible alternate algorithms may realize greater performance
-#       - Look again at multi-processing.  Without bpy.ops is might
-#           be viable.
-#
-# Future tasks:
-#   Multi-thread the script
-#       *** Will not be implemented.  Multi-processing is adding to much
-#           overhead to realize a performance increase ***
-#       - Learn basic multi-threading in Python (multiprocessing)
-#       - Break material generation into separate threads (processes)
-#       - Break mesh generation into separate threads (processes)
-#       - Move name generation, texture ID generation, etc to process first
-#       - Roll version to 2.0 on completion
-#
-# Paul "BrikBot" Marshall
-# Created: April 17, 2011
-# Last Modified: November 17, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-# Thanks to Meta-Androco, RickyBlender, Ace Dragon, and PKHG for ideas
-#   and testing.
-#
-# Coded in IDLE, tested in Blender 2.59.  NumPy Recommended.
-# Search for "@todo" to quickly find sections that need work.
-#
-# Remeber -
-#   Functional code comes before fast code.  Once it works, then worry about
-#   making it faster/more efficient.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  The Blender Rock Creation tool is for rapid generation of mesh rocks.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-import bpy
-import math
-import time
-from add_mesh_rocks import (settings,
-                            utils)
-from bpy_extras import object_utils
-from mathutils import (Color,
-                       Vector)
-from bpy.props import (BoolProperty,
-                       IntProperty,
-                       FloatProperty,
-                       FloatVectorProperty,
-                       EnumProperty)
-
-# This try block allows for the script to psudo-intelligently select the
-# appropriate random to use.  If Numpy's random is present it will use that.
-# If Numpy's random is not present, it will through a "module not found"
-# exception and instead use the slower built-in random that Python has.
-try:
-    from numpy.random import random_integers as randint
-    from numpy.random import normal as gauss
-    from numpy.random import (beta,
-                              uniform,
-                              seed,
-                              weibull)
-    print("Rock Generator: Numpy found.")
-    numpy = True
-except:
-    from random import (randint,
-                        gauss,
-                        uniform,
-                        seed)
-    from random import betavariate as beta
-    from random import weibullvariate as weibull
-    print("Rock Generator: Numpy not found.  Using Python's random.")
-    numpy = False
-
-# Global variables:
-lastRock = 0
-
-
-# Creates a new mesh:
-#
-# param: verts - Vector of vertices for the mesh.
-#        edges - Edges for the mesh.  Can be "[]".
-#        faces - Face tuples corresponding to vertices.
-#        name  - Name of the mesh.
-def createMeshObject(context, verts, edges, faces, name):
-    # Create new mesh
-    mesh = bpy.data.meshes.new(name)
-
-    # Make a mesh from a list of verts/edges/faces.
-    mesh.from_pydata(verts, edges, faces)
-
-    # Set mesh to use auto smoothing:
-    mesh.use_auto_smooth = True
-
-    # Update mesh geometry after adding stuff.
-    mesh.update()
-
-    return object_utils.object_data_add(context, mesh, operator=None)
-
-
-# Set the values for a texture from parameters.
-#
-# param: texture - bpy.data.texture to modify.
-#        level   - designated tweaked settings to use
-#                   -> Below 10 is a displacment texture
-#                   -> Between 10 and 20 is a base material texture
-def randomizeTexture(texture, level=1):
-    noises = ['BLENDER_ORIGINAL', 'ORIGINAL_PERLIN', 'IMPROVED_PERLIN',
-              'VORONOI_F1', 'VORONOI_F2', 'VORONOI_F3', 'VORONOI_F4',
-              'VORONOI_F2_F1', 'VORONOI_CRACKLE']
-    if texture.type == 'CLOUDS':
-        if randint(0, 1) == 0:
-            texture.noise_type = 'SOFT_NOISE'
-        else:
-            texture.noise_type = 'HARD_NOISE'
-        if level != 11:
-            tempInt = randint(0, 6)
-        else:
-            tempInt = randint(0, 8)
-        texture.noise_basis = noises[tempInt]
-        texture.noise_depth = 8
-
-        if level == 0:
-            texture.noise_scale = gauss(0.625, 1 / 24)
-        elif level == 2:
-            texture.noise_scale = 0.15
-        elif level == 11:
-            texture.noise_scale = gauss(0.5, 1 / 24)
-
-            if texture.noise_basis in ['BLENDER_ORIGINAL', 'ORIGINAL_PERLIN',
-                                       'IMPROVED_PERLIN', 'VORONOI_F1']:
-                texture.intensity = gauss(1, 1 / 6)
-                texture.contrast = gauss(4, 1 / 3)
-            elif texture.noise_basis in ['VORONOI_F2', 'VORONOI_F3', 'VORONOI_F4']:
-                texture.intensity = gauss(0.25, 1 / 12)
-                texture.contrast = gauss(2, 1 / 6)
-            elif texture.noise_basis == 'VORONOI_F2_F1':
-                texture.intensity = gauss(0.5, 1 / 6)
-                texture.contrast = gauss(2, 1 / 6)
-            elif texture.noise_basis == 'VORONOI_CRACKLE':
-                texture.intensity = gauss(0.5, 1 / 6)
-                texture.contrast = gauss(2, 1 / 6)
-    elif texture.type == 'MUSGRAVE':
-        musgraveType = ['MULTIFRACTAL', 'RIDGED_MULTIFRACTAL',
-                        'HYBRID_MULTIFRACTAL', 'FBM', 'HETERO_TERRAIN']
-        texture.musgrave_type = 'MULTIFRACTAL'
-        texture.dimension_max = abs(gauss(0, 0.6)) + 0.2
-        texture.lacunarity = beta(3, 8) * 8.2 + 1.8
-
-        if level == 0:
-            texture.noise_scale = gauss(0.625, 1 / 24)
-            texture.noise_intensity = 0.2
-            texture.octaves = 1.0
-        elif level == 2:
-            texture.intensity = gauss(1, 1 / 6)
-            texture.contrast = 0.2
-            texture.noise_scale = 0.15
-            texture.octaves = 8.0
-        elif level == 10:
-            texture.intensity = gauss(0.25, 1 / 12)
-            texture.contrast = gauss(1.5, 1 / 6)
-            texture.noise_scale = 0.5
-            texture.octaves = 8.0
-        elif level == 12:
-            texture.octaves = uniform(1, 3)
-        elif level > 12:
-            texture.octaves = uniform(2, 8)
-        else:
-            texture.intensity = gauss(1, 1 / 6)
-            texture.contrast = 0.2
-            texture.octaves = 8.0
-    elif texture.type == 'DISTORTED_NOISE':
-        tempInt = randint(0, 8)
-        texture.noise_distortion = noises[tempInt]
-        tempInt = randint(0, 8)
-        texture.noise_basis = noises[tempInt]
-        texture.distortion = skewedGauss(2.0, 2.6666, (0.0, 10.0), False)
-
-        if level == 0:
-            texture.noise_scale = gauss(0.625, 1 / 24)
-        elif level == 2:
-            texture.noise_scale = 0.15
-        elif level >= 12:
-            texture.noise_scale = gauss(0.2, 1 / 48)
-    elif texture.type == 'STUCCI':
-        stucciTypes = ['PLASTIC', 'WALL_IN', 'WALL_OUT']
-        if randint(0, 1) == 0:
-            texture.noise_type = 'SOFT_NOISE'
-        else:
-            texture.noise_type = 'HARD_NOISE'
-        tempInt = randint(0, 2)
-        texture.stucci_type = stucciTypes[tempInt]
-
-        if level == 0:
-            tempInt = randint(0, 6)
-            texture.noise_basis = noises[tempInt]
-            texture.noise_scale = gauss(0.625, 1 / 24)
-        elif level == 2:
-            tempInt = randint(0, 6)
-            texture.noise_basis = noises[tempInt]
-            texture.noise_scale = 0.15
-        elif level >= 12:
-            tempInt = randint(0, 6)
-            texture.noise_basis = noises[tempInt]
-            texture.noise_scale = gauss(0.2, 1 / 30)
-        else:
-            tempInt = randint(0, 6)
-            texture.noise_basis = noises[tempInt]
-    elif texture.type == 'VORONOI':
-        metrics = ['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', 'CHEBYCHEV',
-                   'MINKOVSKY_HALF', 'MINKOVSKY_FOUR', 'MINKOVSKY']
-        # Settings for first dispalcement level:
-        if level == 0:
-            tempInt = randint(0, 1)
-            texture.distance_metric = metrics[tempInt]
-            texture.noise_scale = gauss(0.625, 1 / 24)
-            texture.contrast = 0.5
-            texture.intensity = 0.7
-        elif level == 2:
-            texture.noise_scale = 0.15
-            tempInt = randint(0, 6)
-            texture.distance_metric = metrics[tempInt]
-        elif level >= 12:
-            tempInt = randint(0, 1)
-            texture.distance_metric = metrics[tempInt]
-            texture.noise_scale = gauss(0.125, 1 / 48)
-            texture.contrast = 0.5
-            texture.intensity = 0.7
-        else:
-            tempInt = randint(0, 6)
-            texture.distance_metric = metrics[tempInt]
-
-    return
-
-
-# Randomizes the given material given base values.
-#
-# param: Material to randomize
-def randomizeMaterial(material, color, dif_int, rough, spec_int, spec_hard,
-                      use_trans, alpha, cloudy, mat_IOR, mossiness, spec_IOR):
-    skew = False
-    stddev = 0.0
-    lastUsedTex = 1
-    numTex = 6
-    baseColor = []
-
-    # Diffuse settings:
-    material.diffuse_shader = 'OREN_NAYAR'
-    if 0.5 > dif_int:
-        stddev = dif_int / 3
-        skew = False
-    else:
-        stddev = (1 - dif_int) / 3
-        skew = True
-    material.diffuse_intensity = skewedGauss(dif_int, stddev, (0.0, 1.0), skew)
-    if 1.57 > rough:
-        stddev = rough / 3
-        skew = False
-    else:
-        stddev = (3.14 - rough) / 3
-        skew = True
-    material.roughness = skewedGauss(rough, stddev, (0.0, 3.14), skew)
-
-    for i in range(3):
-        if color[i] > 0.9 or color[i] < 0.1:
-            baseColor.append(skewedGauss(color[i], color[i] / 30,
-                                         (0, 1), color[i] > 0.9))
-        else:
-            baseColor.append(gauss(color[i], color[i] / 30))
-    material.diffuse_color = baseColor
-
-    # Specular settings:
-    material.specular_shader = 'BLINN'
-    if 0.5 > spec_int:
-        variance = spec_int / 3
-        skew = False
-    else:
-        variance = (1 - spec_int) / 3
-        skew = True
-    material.specular_intensity = skewedGauss(spec_int, stddev,
-                                              (0.0, 1.0), skew)
-    if 256 > spec_hard:
-        variance = (spec_hard - 1) / 3
-        skew = False
-    else:
-        variance = (511 - spec_hard) / 3
-        skew = True
-    material.specular_hardness = int(round(skewedGauss(spec_hard, stddev,
-                                                       (1.0, 511.0), skew)))
-    if 5.0 > spec_IOR:
-        variance = spec_IOR / 3
-        skew = False
-    else:
-        variance = (10.0 - spec_IOR) / 3
-        skew = True
-    material.specular_ior = skewedGauss(spec_IOR, stddev, (0.0, 10.0), skew)
-
-    # Raytrans settings:
-    #   *** Added on 11/17/2011 ***
-    material.use_transparency = use_trans
-    if use_trans:
-        trans = material.raytrace_transparency
-        # Fixed values:
-        material.transparency_method = 'RAYTRACE'
-        trans.depth = 24
-        trans.gloss_samples = 32
-        trans.falloff = 1.0
-        # Needs randomization:
-        material.alpha = -gauss(alpha, 0.05) + 1;
-        trans.gloss_factor = -gauss(cloudy, 0.05) + 1
-        trans.filter = gauss(cloudy, 0.1)
-        trans.ior = skewedGauss(mat_IOR, 0.01, [0.25, 4.0], mat_IOR > 2.125)
-
-    #Misc. settings:
-    material.use_transparent_shadows = True
-
-    # Rock textures:
-    # Now using slot.texture for texture access instead of
-    #   bpy.data.textures[newTex[<index>]]
-    #   *** Completed on 9/6/2011 ***
-    # Create the four new textures:
-    textureTypes = ['MUSGRAVE', 'CLOUDS', 'DISTORTED_NOISE',
-                    'STUCCI', 'VORONOI']
-
-    for i in range(numTex):
-        texColor = []
-
-        # Set the active material slot:
-        material.active_texture_index = i
-        # Assign a texture to the active material slot:
-        material.active_texture = bpy.data.textures.new(name = 'stone_tex',
-                                                        type = 'NONE')
-        # Store the slot to easy coding access:
-        slot = material.texture_slots[i]
-
-        # If the texture is not a moss texture:
-        if i > 1:
-            slot.texture.type = textureTypes[randint(0, 3)]
-
-            # Set the texture's color (RGB):
-            for j in range(3):
-                if color[j] > 0.9 or color[j] < 0.1:
-                    texColor.append(skewedGauss(color[j], color[j] / 30,
-                                                (0, 1), color[j] > 0.9))
-                else:
-                    texColor.append(gauss(color[j], color[j] / 30))
-            slot.color = texColor
-            # Randomize the value (HSV):
-            v = material.diffuse_color.v
-            if v == 0.5:
-                slot.color.v = gauss(v, v / 3)
-            elif v > 0.5:
-                slot.color.v = skewedGauss(v, v / 3, (0, 1), True)
-            else:
-                slot.color.v = skewedGauss(v, (1 - v) / 3, (0, 1), False)
-
-            # Adjust scale and normal based on texture type:
-            if slot.texture.type == 'VORONOI':
-                slot.scale = (gauss(5, 1), gauss(5, 1), gauss(5, 1))
-                slot.normal_factor = gauss(rough / 10, rough / 30)
-            elif slot.texture.type == 'STUCCI':
-                slot.scale = (gauss(1.5, 0.25), gauss(1.5, 0.25),
-                              gauss(1.5, 0.25))
-                slot.normal_factor = gauss(rough / 10, rough / 30)
-            elif slot.texture.type == 'DISTORTED_NOISE':
-                slot.scale = (gauss(1.5, 0.25), gauss(1.5, 0.25),
-                              gauss(1.5, 0.25))
-                slot.normal_factor = gauss(rough / 10, rough / 30)
-            elif slot.texture.type == 'MUSGRAVE':
-                slot.scale = (gauss(1.5, 0.25), gauss(1.5, 0.25),
-                              gauss(1.5, 0.25))
-                slot.normal_factor = gauss(rough, rough / 3)
-            elif slot.texture.type == 'CLOUDS':
-                slot.scale = (gauss(1.5, 0.25), gauss(1.5, 0.25),
-                              gauss(1.5, 0.25))
-                slot.normal_factor = gauss(rough, rough / 3)
-
-            # Set the color influence to 0.5.
-            # This allows for the moss textures to show:
-            slot.diffuse_color_factor = 0.5
-            # Set additional influence booleans:
-            slot.use_stencil = True
-            slot.use_map_specular = True
-            slot.use_map_color_spec = True
-            slot.use_map_hardness = True
-            slot.use_map_normal = True
-        # The following is for setting up the moss textures:
-        else:
-            slot.texture.type = textureTypes[i]
-
-            # Set the mosses color (RGB):
-            texColor.append(gauss(0.5, 1 / 6))
-            texColor.append(1)
-            texColor.append(0)
-            slot.color = texColor
-            # Randomize the value (HSV):
-            slot.color.v = gauss(0.275, 1 / 24)
-
-            # Scale the texture size:
-            slot.scale = (gauss(1.5, 0.25),
-                          gauss(1.5, 0.25),
-                          gauss(1.5, 0.25))
-
-            # Set the strength of the moss color:
-            slot.diffuse_color_factor = mossiness
-            # Have it influence spec and hardness:
-            slot.use_map_specular = True
-            slot.use_map_color_spec = True
-            slot.use_map_hardness = True
-
-            # If the texutre is a voronoi crackle clouds, use "Negative":
-            if slot.texture.type == 'CLOUDS':
-                if slot.texture.noise_basis == 'VORONOI_CRACKLE':
-                    slot.invert = True
-
-            if mossiness == 0:
-                slot.use = False
-
-        randomizeTexture(slot.texture, 10 + i)
-
-    return
-
-
-# Generates an object based on one of several different mesh types.
-# All meshes have exactly eight vertices, and may be built from either
-# tri's or quads.
-#
-# param: muX        - mean X offset value
-#        sigmaX     - X offset standard deviation
-#        scaleX     - X upper and lower bounds
-#        upperSkewX - Is the distribution upperskewed?
-#        muY        - mean Y offset value
-#        sigmaY     - Y offset standard deviation
-#        scaleY     - Y upper and lower bounds
-#        upperSkewY - Is the distribution upperskewed?
-#        muZ        - mean Z offset value
-#        sigmaZ     - Z offset standard deviation
-#        scaleZ     - Z upper and lower bounds
-#        upperSkewY - Is the distribution upperskewed?
-#        base       - base number on the end of the object name
-#        shift      - Addition to the base number for multiple runs.
-#        scaleDisplace - Scale the displacement maps
-#
-# return: name      - the built name of the object
-def generateObject(context, muX, sigmaX, scaleX, upperSkewX, muY, sigmaY,
-                   scaleY, upperSkewY, muZ, sigmaZ, scaleZ, upperSkewZ, base,
-                   shift, scaleDisplace, scale_fac):
-    x = []
-    y = []
-    z = []
-    shape = randint(0, 11)
-
-    # Cube
-    # Use parameters to re-scale cube:
-    # Reversed if/for nesting.  Should be a little faster.
-    if shape == 0:
-        for j in range(8):
-            if sigmaX == 0:
-                x.append(scaleX[0] / 2)
-            else:
-                x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-            if sigmaY == 0:
-                y.append(scaleY[0] / 2)
-            else:
-                y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-            if sigmaZ == 0:
-                z.append(scaleZ[0] / 2)
-            else:
-                z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 1:
-        for j in range(8):
-            if j in [0, 1, 3, 4]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [2, 5]:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 4)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [6, 7]:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(0, sigmaX, scaleX, upperSkewX) / 4)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 4)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 2:
-        for j in range(8):
-            if j in [0, 2, 5, 7]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 4)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 4)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 4)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 4)
-            elif j in [1, 3, 4, 6]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 3:
-        for j in range(8):
-            if j > 0:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            else:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(0, sigmaX, scaleX, upperSkewX) / 8)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 8)
-                if sigmaZ == 0:
-                    z.append(0)
-                else:
-                    z.append(skewedGauss(0, sigmaZ, scaleZ, upperSkewZ) / 8)
-    elif shape == 4:
-        for j in range(10):
-            if j in [0, 9]:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(0, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [1, 2, 3, 4]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [5, 7]:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(0, sigmaX, scaleX, upperSkewX) / 3)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 3)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 3)
-                if sigmaZ == 0:
-                    z.append(0)
-                else:
-                    z.append(skewedGauss(0, sigmaZ, scaleZ, upperSkewZ) / 6)
-            elif j in [6, 8]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 3)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 3)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 3)
-                if sigmaZ == 0:
-                    z.append(0)
-                else:
-                    z.append(skewedGauss(0, sigmaZ, scaleZ, upperSkewZ) / 6)
-    elif shape == 5:
-        for j in range(10):
-            if j == 0:
-                if sigmaX == 0:
-                    x.append(0)
-                else:
-                    x.append(skewedGauss(0, sigmaX, scaleX, upperSkewX) / 8)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 8)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [1, 2]:
-                if sigmaX == 0:
-                    x.append(scaleZ[0] * .125)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) * 0.125)
-                if sigmaY == 0:
-                    y.append(scaleZ[0] * 0.2165)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) * 0.2165)
-                if sigmaZ == 0:
-                    z.append(0)
-                else:
-                    z.append(skewedGauss(0, sigmaZ, scaleZ, upperSkewZ) / 4)
-            elif j == 3:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 4)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 4)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 4)
-                if sigmaZ == 0:
-                    z.append(0)
-                else:
-                    z.append(skewedGauss(0, sigmaZ, scaleZ, upperSkewZ) / 4)
-            elif j in [4, 6]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] * 0.25)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) * 0.25)
-                if sigmaY == 0:
-                    y.append(scaleY[0] * 0.433)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) * 0.433)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j == 5:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 4)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 4)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j in [7, 9]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] * 0.10825)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) * 0.10825)
-                if sigmaY == 0:
-                    y.append(scaleY[0] * 0.2165)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) * 0.2165)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            elif j == 8:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 4)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 6:
-        for j in range(7):
-            if j > 0:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            else:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 7:
-        for j in range(10):
-            if j in [1, 3, 4, 5, 8, 9]:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(scaleY[0] / 2)
-                else:
-                    y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-            else:
-                if sigmaX == 0:
-                    x.append(scaleX[0] / 2)
-                else:
-                    x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-                if sigmaY == 0:
-                    y.append(0)
-                else:
-                    y.append(skewedGauss(0, sigmaY, scaleY, upperSkewY) / 2)
-                if sigmaZ == 0:
-                    z.append(scaleZ[0] / 2)
-                else:
-                    z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 8:
-        for j in range(7):
-            if sigmaX == 0:
-                x.append(scaleX[0] / 2)
-            else:
-                x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-            if sigmaY == 0:
-                y.append(scaleY[0] / 2)
-            else:
-                y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-            if sigmaZ == 0:
-                z.append(scaleZ[0] / 2)
-            else:
-                z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 9:
-        for j in range(8):
-            if sigmaX == 0:
-                x.append(scaleX[0] / 2)
-            else:
-                x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-            if sigmaY == 0:
-                y.append(scaleY[0] / 2)
-            else:
-                y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-            if sigmaZ == 0:
-                z.append(scaleZ[0] / 2)
-            else:
-                z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 10:
-        for j in range(7):
-            if sigmaX == 0:
-                x.append(scaleX[0] / 2)
-            else:
-                x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-            if sigmaY == 0:
-                y.append(scaleY[0] / 2)
-            else:
-                y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-            if sigmaZ == 0:
-                z.append(scaleZ[0] / 2)
-            else:
-                z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-    elif shape == 11:
-        for j in range(7):
-            if sigmaX == 0:
-                x.append(scaleX[0] / 2)
-            else:
-                x.append(skewedGauss(muX, sigmaX, scaleX, upperSkewX) / 2)
-            if sigmaY == 0:
-                y.append(scaleY[0] / 2)
-            else:
-                y.append(skewedGauss(muY, sigmaY, scaleY, upperSkewY) / 2)
-            if sigmaZ == 0:
-                z.append(scaleZ[0] / 2)
-            else:
-                z.append(skewedGauss(muZ, sigmaZ, scaleZ, upperSkewZ) / 2)
-
-    # This is for scaling the displacement textures.
-    # Scale the vertices so that their average is equal to 1 * scale factor.
-    if scaleDisplace:
-        averageX = (sum(x) / len(x)) * scale_fac[0]
-        for i in range(len(x)):
-            x[i] /= averageX
-        averageY = (sum(y) / len(y)) * scale_fac[1]
-        for i in range(len(y)):
-            y[i] /= averageY
-        averageZ = (sum(z) / len(z)) * scale_fac[2]
-        for i in range(len(z)):
-            z[i] /= averageZ
-
-    # Build vertex and face arrays:
-    if shape == 1:
-        verts = [(-x[0],-y[0],-z[0]),(x[1],-y[1],-z[1]),(x[2],-y[2],z[2]),
-             (-x[3],y[3],-z[3]),(x[4],y[4],-z[4]),(x[5],y[5],z[5]),
-             (x[6],y[6],z[6]),(x[7],y[7],-z[7])]
-        faces = [[0,1,2],[0,1,7],[3,0,7],[3,4,7],[1,4,7],[3,4,5],[1,2,6],
-                 [1,4,6],[4,5,6],[0,2,6],[0,3,6],[3,5,6]]
-    elif shape == 2:
-        verts = [(-x[0],y[0],-z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (-x[3],y[3],-z[3]),(-x[4],-y[4],z[4]),(x[5],y[5],z[5]),
-             (x[6],y[6],z[6]),(-x[7],y[7],z[7])]
-        faces = [[0,1,2],[0,2,3],[0,3,7],[0,7,4],[1,4,5],[0,1,4],[5,1,2],
-                 [5,2,6],[3,2,6],[3,6,7],[5,4,7],[5,6,7]]
-    elif shape == 3:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (-x[3],y[3],-z[3]),(x[4],-y[4],z[4]),(x[5],y[5],z[5]),
-             (-x[6],y[6],z[6]),(-x[7],-y[7],z[7])]
-        faces = [[0,1,2],[0,2,3],[0,3,6],[0,6,7],[0,7,4],[0,4,1],[5,4,1,2],
-                 [5,6,3,2],[5,4,7,6]]
-    elif shape == 4:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (-x[3],y[3],-z[3]),(-x[4],-y[4],-z[4]),(x[5],-y[5],-z[5]),
-             (x[6],y[6],-z[6]),(x[7],y[7],-z[7]),(-x[8],y[8],-z[8]),
-             (x[9],y[9],-z[9])]
-        faces = [[0,1,6],[0,6,2],[0,2,7],[0,7,3],[0,3,8],[0,8,4],[0,4,5],
-                 [0,5,1],[1,9,2],[2,9,3],[3,9,4],[4,9,1],[1,6,2],[2,7,3],
-                 [3,8,4],[4,5,1]]
-    elif shape == 5:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],z[1]),(x[2],y[2],z[2]),
-             (-x[3],y[3],z[3]),(x[4],-y[4],-z[4]),(x[5],y[5],-z[5]),
-             (x[6],y[6],-z[6]),(-x[7],y[7],-z[7]),(-x[8],y[8],-z[8]),
-             (-x[9],-y[9],-z[9])]
-        faces = [[0,1,2],[0,2,3],[0,3,1],[1,4,5],[1,5,2],[2,5,6],[2,6,7],
-                 [2,7,3],[3,7,8],[3,8,9],[3,9,1],[1,9,4],[4,5,9],[5,6,7],
-                 [7,8,9],[9,5,7]]
-    elif shape == 6:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (-x[3],y[3],-z[3]),(-x[4],y[4],z[4]),(-x[5],-y[5],z[5]),
-             (-x[6],-y[6],-z[6])]
-        faces = [[0,1,2],[0,2,3,4],[0,1,6,5],[0,4,5],[1,2,3,6],[3,4,5,6]]
-    elif shape == 7:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (x[3],y[3],-z[3]),(-x[4],y[4],-z[4]),(-x[5],y[5],z[5]),
-             (-x[6],y[6],z[6]),(-x[7],y[7],-z[7]),(-x[8],-y[8],-z[8]),
-             (-x[9],-y[9],z[9])]
-        faces = [[0,1,2],[0,2,3],[0,5,6],[0,6,9],[0,1,8,9],[0,3,4,5],
-                 [1,2,7,8],[2,3,4,7],[4,5,6,7],[6,7,8,9]]
-    elif shape == 8:
-        verts = [(x[0],y[0],z[0]),(x[1],-y[1],-z[1]),(x[2],y[2],-z[2]),
-             (-x[3],y[3],-z[3]),(-x[4],-y[4],-z[4]),(-x[5],-y[5],z[5]),
-             (-x[6],y[6],z[6])]
-        faces = [[0,2,1],[0,1,4],[0,4,5],[0,5,6],[0,6,3,2],[2,1,4,3],
-                 [3,6,5,4]]
-    elif shape == 9:
-        verts = [(-x[0],-y[0],-z[0]),(-x[1],y[1],-z[1]),(-x[2],y[2],z[2]),
-             (-x[3],-y[3],z[3]),(x[4],-y[4],-z[4]),(x[5],y[5],-z[5]),
-             (x[6],y[6],z[6]),(x[7],-y[7],z[7])]
-        faces = [[0,1,6,2],[1,5,7,6],[5,4,3,7],[4,0,2,3],[0,1,5,4],[3,2,6,7]]
-    elif shape == 10:
-        verts = [(-x[0],-y[0],-z[0]),(-x[1],y[1],-z[1]),(-x[2],y[2],z[2]),
-             (x[3],-y[3],z[3]),(x[4],y[4],z[4]),(x[5],y[5],-z[5]),
-             (x[6],-y[6],-z[6])]
-        faces = [[0,2,3],[0,3,6],[0,1,5,6],[2,3,4],[0,1,2],[1,2,4,5],[3,4,5,6]]
-    elif shape == 11:
-        verts = [(-x[0],-y[0],-z[0]),(-x[1],y[1],-z[1]),(-x[2],y[2],z[2]),
-             (x[3],-y[3],z[3]),(x[4],y[4],z[4]),(x[5],y[5],-z[5]),
-             (x[6],-y[6],-z[6])]
-        faces = [[0,2,3],[0,3,6],[0,1,5,6],[2,3,4],[5,6,3],[1,5,3,4],[0,1,4,2]]
-    else:
-        verts = [(-x[0],-y[0],-z[0]),(-x[1],y[1],-z[1]),(-x[2],-y[2],z[2]),
-             (-x[3],y[3],z[3]),(x[4],-y[4],-z[4]),(x[5],y[5],-z[5]),
-             (x[6],-y[6],z[6]),(x[7],y[7],z[7])]
-        faces = [[0,1,3,2],[0,1,5,4],[0,4,6,2],[7,5,4,6],[7,3,2,6],[7,5,1,3]]
-
-    name = "Rock." + str(base + shift).zfill(3)
-
-    # Make object:
-    obj = createMeshObject(context, verts, [], faces, name)
-
-    if scaleDisplace:
-        bpy.data.objects[name].scale = Vector((averageX, averageY, averageZ))
-
-    # For a slight speed bump / Readability:
-    mesh = bpy.data.meshes[name]
-
-    # Apply creasing:
-    if shape == 0:
-        for i in range(12):
-            # todo: "0.375 / 3"?  WTF?  That = 0.125. . . .
-            #   *** Completed 7/15/2011: Changed second one ***
-            mesh.edges[i].crease = gauss(0.125, 0.125)
-    elif shape == 1:
-        for i in [0, 2]:
-            mesh.edges[i].crease = gauss(0.5, 0.125)
-        for i in [6, 9, 11, 12]:
-            mesh.edges[i].crease = gauss(0.25, 0.05)
-        for i in [5, 7, 15, 16]:
-            mesh.edges[i].crease = gauss(0.125, 0.025)
-    elif shape == 2:
-        for i in range(18):
-            mesh.edges[i].crease = gauss(0.125, 0.025)
-    elif shape == 3:
-        for i in [0, 1, 6, 10, 13]:
-            mesh.edges[i].crease = gauss(0.25, 0.05)
-        mesh.edges[8].crease = gauss(0.5, 0.125)
-    elif shape == 4:
-        for i in [5, 6, 7, 10, 14, 16, 19, 21]:
-            mesh.edges[i].crease = gauss(0.5, 0.125)
-    elif shape == 7:
-        for i in range(18):
-            if i in [0, 1, 2, 3, 6, 7, 8, 9, 13, 16]:
-                mesh.edges[i].crease = gauss(0.5, 0.125)
-            elif i in [11,17]:
-                mesh.edges[i].crease = gauss(0.25, 0.05)
-            else:
-                mesh.edges[i].crease = gauss(0.125, 0.025)
-    elif shape == 8:
-        for i in range(12):
-            if i in [0, 3, 8, 9, 10]:
-                mesh.edges[i].crease = gauss(0.5, 0.125)
-            elif i == 11:
-                mesh.edges[i].crease = gauss(0.25, 0.05)
-            else:
-                mesh.edges[i].crease = gauss(0.125, 0.025)
-    elif shape == 9:
-        for i in range(12):
-            if i in [0, 3, 4, 11]:
-                mesh.edges[i].crease = gauss(0.5, 0.125)
-            else:
-                mesh.edges[i].crease = gauss(0.25, 0.05)
-    elif shape == 10:
-        for i in range(12):
-            if i in [0, 2, 3, 4, 8, 11]:
-                mesh.edges[i].crease = gauss(0.5, 0.125)
-            elif i in [1, 5, 7]:
-                mesh.edges[i].crease = gauss(0.25, 0.05)
-            else:
-                mesh.edges[i].crease = gauss(0.125, 0.025)
-    elif shape == 11:
-        for i in range(11):
-            if i in [1, 2, 3, 4, 8, 11]:
-                mesh.edges[i].crease = gauss(0.25, 0.05)
-            else:
-                mesh.edges[i].crease = gauss(0.125, 0.025)
-
-    return name
-
-
-# Artifically skews a normal (gaussian) distribution.  This will not create
-# a continuous distribution curve but instead acts as a piecewise finction.
-# This linearly scales the output on one side to fit the bounds.
-#
-# Example output historgrams:
-#
-# Upper skewed:                 Lower skewed:
-#  |                 â–„           |      _
-#  |                 â–ˆ           |      â–ˆ
-#  |                 â–ˆ_          |      â–ˆ
-#  |                 ██          |     _█
-#  |                _██          |     ██
-#  |              _▄███_         |     ██ _
-#  |             ▄██████         |    ▄██▄█▄_
-#  |          _█▄███████         |    ███████
-#  |         _██████████_        |   ████████▄▄█_ _
-#  |      _▄▄████████████        |   ████████████▄█_
-#  | _▄_ ▄███████████████▄_      | _▄███████████████▄▄_
-#   -------------------------     -----------------------
-#                    |mu               |mu
-#   Historgrams were generated in R (http://www.r-project.org/) based on the
-#   calculations below and manually duplicated here.
-#
-# param:  mu          - mu is the mean of the distribution.
-#         sigma       - sigma is the standard deviation of the distribution.
-#         bounds      - bounds[0] is the lower bound and bounds[1]
-#                       is the upper bound.
-#         upperSkewed - if the distribution is upper skewed.
-# return: out         - Rondomly generated value from the skewed distribution.
-#
-# @todo: Because NumPy's random value generators are faster when called
-#   a bunch of times at once, maybe allow this to generate and return
-#   multiple values at once?
-def skewedGauss(mu, sigma, bounds, upperSkewed=True):
-    raw = gauss(mu, sigma)
-
-    # Quicker to check an extra condition than do unnecessary math. . . .
-    if raw < mu and not upperSkewed:
-        out = ((mu - bounds[0]) / (3 * sigma)) * raw + ((mu * (bounds[0] - (mu - 3 * sigma))) / (3 * sigma))
-    elif raw > mu and upperSkewed:
-        out = ((mu - bounds[1]) / (3 * -sigma)) * raw + ((mu * (bounds[1] - (mu + 3 * sigma))) / (3 * -sigma))
-    else:
-        out = raw
-
-    return out
-
-
-# @todo create a def for generating an alpha and beta for a beta distribution
-#   given a mu, sigma, and an upper and lower bound.  This proved faster in
-#   profiling in addition to providing a much better distribution curve
-#   provided multiple iterations happen within this function; otherwise it was
-#   slower.
-#   This might be a scratch because of the bounds placed on mu and sigma:
-#
-#   For alpha > 1 and beta > 1:
-#   mu^2 - mu^3           mu^3 - mu^2 + mu
-#   ----------- < sigma < ----------------
-#      1 + mu                  2 - mu
-#
-##def generateBeta(mu, sigma, scale, repitions=1):
-##    results = []
-##
-##    return results
-
-# Creates rock objects:
-def generateRocks(context, scaleX, skewX, scaleY, skewY, scaleZ, skewZ,
-                  scale_fac, detail, display_detail, deform, rough,
-                  smooth_fac, smooth_it, mat_enable, color, mat_bright,
-                  mat_rough, mat_spec, mat_hard, mat_use_trans, mat_alpha,
-                  mat_cloudy, mat_IOR, mat_mossy, numOfRocks=1, userSeed=1.0,
-                  scaleDisplace=False, randomSeed=True):
-    global lastRock
-    newMat = []
-    sigmaX = 0
-    sigmaY = 0
-    sigmaZ = 0
-    upperSkewX = False
-    upperSkewY = False
-    upperSkewZ = False
-    shift = 0
-    lastUsedTex = 1
-    vertexScaling = []
-
-    # Seed the random Gaussian value generator:
-    if randomSeed:
-        seed(int(time.time()))
-    else:
-        seed(userSeed)
-
-    if mat_enable:
-        # Calculate the number of materials to use.
-        #   If less than 10 rocks are being generated, generate one material
-        #       per rock.
-        #   If more than 10 rocks are being generated, generate
-        #       ceil[(1/9)n + (80/9)] materials.
-        #       -> 100 rocks will result in 20 materials
-        #       -> 1000 rocks will result in 120 materials.
-        if numOfRocks < 10:
-            numOfMats = numOfRocks
-        else:
-            numOfMats = math.ceil((1/9) * numOfRocks + (80/9))
-
-        # newMat = generateMaterialsList(numOfMats)
-        #   *** No longer needed on 9/6/2011 ***
-
-        # todo Set general material settings:
-        #   *** todo completed 5/25/2011 ***
-        # Material roughness actual max = 3.14.  Needs scaling.
-        mat_rough *= 0.628
-        spec_IOR = 1.875 * (mat_spec ** 2) + 7.125 * mat_spec + 1
-
-        # Changed as material mapping is no longer needed.
-        #   *** Complete 9/6/2011 ***
-        for i in range(numOfMats):
-            newMat.append(bpy.data.materials.new(name = 'stone'))
-            randomizeMaterial(newMat[i], color, mat_bright,
-                              mat_rough, mat_spec, mat_hard, mat_use_trans,
-                              mat_alpha, mat_cloudy, mat_IOR, mat_mossy,
-                              spec_IOR)
-
-    # These values need to be really small to look good.
-    # So the user does not have to use such ridiculously small values:
-    deform /= 10
-    rough /= 100
-
-    # Verify that the min really is the min:
-    if scaleX[1] < scaleX[0]:
-        scaleX[0], scaleX[1] = scaleX[1], scaleX[0]
-    if scaleY[1] < scaleY[0]:
-        scaleY[0], scaleY[1] = scaleY[1], scaleY[0]
-    if scaleZ[1] < scaleZ[0]:
-        scaleZ[0], scaleZ[1] = scaleZ[1], scaleZ[0]
-
-    # todo: edit below to allow for skewing the distribution
-    #   *** todo completed 4/22/2011 ***
-    #   *** Code now generating "int not scriptable error" in Blender ***
-    #
-    # Calculate mu and sigma for a Gaussian distributed random number
-    #   generation:
-    # If the lower and upper bounds are the same, skip the math.
-    #
-    # sigma is the standard deviation of the values.  The 95% interval is three
-    # standard deviations, which is what we want most generated values to fall
-    # in.  Since it might be skewed we are going to use half the difference
-    # betwee the mean and the furthest bound and scale the other side down
-    # post-number generation.
-    if scaleX[0] != scaleX[1]:
-        skewX = (skewX + 1) / 2
-        muX = scaleX[0] + ((scaleX[1] - scaleX[0]) * skewX)
-        if skewX < 0.5:
-            sigmaX = (scaleX[1] - muX) / 3
-        else:
-            sigmaX = (muX - scaleX[0]) / 3
-            upperSkewX = True
-    else:
-        muX = scaleX[0]
-    if scaleY[0] != scaleY[1]:
-        skewY = (skewY + 1) / 2
-        muY = scaleY[0] + ((scaleY[1] - scaleY[0]) * skewY)
-        if skewY < 0.5:
-            sigmaY = (scaleY[1] - muY) / 3
-        else:
-            sigmaY = (muY - scaleY[0]) / 3
-            upperSkewY = True
-    else:
-        muY = scaleY[0]
-    if scaleZ[0] != scaleZ[1]:
-        skewZ = (skewZ + 1) / 2
-        muZ = scaleZ[0] + ((scaleZ[1] - scaleZ[0]) * skewZ)
-        if skewZ < 0.5:
-            sigmaZ = (scaleZ[1] - muZ) / 3
-        else:
-            sigmaZ = (muZ - scaleZ[0]) / 3
-            upperSkewZ = True
-    else:
-        muZ = scaleZ
-
-    for i in range(numOfRocks):
-        # todo: enable different random values for each (x,y,z) corrdinate for
-        # each vertex.  This will add additional randomness to the shape of the
-        # generated rocks.
-        #   *** todo completed 4/19/2011 ***
-        #   *** Code is notably slower at high rock counts ***
-
-        name = generateObject(context, muX, sigmaX, scaleX, upperSkewX, muY,
-                               sigmaY, scaleY, upperSkewY, muZ, sigmaZ, scaleZ,
-                               upperSkewZ, i, lastRock, scaleDisplace, scale_fac)
-
-        rock = bpy.data.objects[name]
-
-        # todo Map what the two new textures will be:
-        # This is not working.  It works on paper so . . . ???
-        #   *** todo completed on 4/23/2011 ***
-        #   *** todo re-added as the first rock is getting
-        #       'Texture.001' twice. ***
-        #   *** todo completed on 4/25/2011 ***
-        #   *** Script no longer needs to map new texture names 9/6/2011 ***
-
-        # Create the four new textures:
-        # todo Set displacement texture parameters:
-        #   *** todo completed on 5/31/2011 ***
-        # Voronoi has been removed from being an option for the fine detail
-        #   texture.
-        texTypes = ['CLOUDS', 'MUSGRAVE', 'DISTORTED_NOISE', 'STUCCI', 'VORONOI']
-        newTex = []
-        # The first texture is to give a more ranodm base shape appearance:
-        newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                            type = texTypes[1]))
-        randomizeTexture(newTex[0], 0)
-        newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                            type = texTypes[4]))
-        randomizeTexture(newTex[1], 0)
-        if numpy:
-            newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                                type = texTypes[int(round(weibull(1, 1)[0] / 2.125))]))
-            randomizeTexture(newTex[2], 1)
-            newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                                type = texTypes[int(round(weibull(1, 1)[0] / 2.125))]))
-            randomizeTexture(newTex[3], 2)
-        else:
-            newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                                type = texTypes[int(round(weibull(1, 1) / 2.125))]))
-            randomizeTexture(newTex[2], 1)
-            newTex.append(bpy.data.textures.new(name = 'rock_displacement',
-                                                type = texTypes[int(round(weibull(1, 1) / 2.125))]))
-            randomizeTexture(newTex[3], 2)
-
-        # Add modifiers:
-        rock.modifiers.new(name = "Subsurf", type = 'SUBSURF')
-        rock.modifiers.new(name = "Subsurf", type = 'SUBSURF')
-        rock.modifiers.new(name = "Displace", type = 'DISPLACE')
-        rock.modifiers.new(name = "Displace", type = 'DISPLACE')
-        rock.modifiers.new(name = "Displace", type = 'DISPLACE')
-        rock.modifiers.new(name = "Displace", type = 'DISPLACE')
-
-        # If smoothing is enabled, allow a little randomness into the
-        #   smoothing factor. Then add the smoothing modifier.
-        if smooth_fac > 0.0 and smooth_it > 0:
-            rock.modifiers.new(name = "Smooth", type='SMOOTH')
-            rock.modifiers[6].factor = gauss(smooth_fac, (smooth_fac ** 0.5) / 12)
-            rock.modifiers[6].iterations = smooth_it
-        # Make a call to random to keep things consistant:
-        else:
-            gauss(0, 1)
-
-        # Set subsurf modifier parameters:
-        rock.modifiers[0].levels = display_detail
-        rock.modifiers[0].render_levels = detail
-        rock.modifiers[1].levels = display_detail
-        rock.modifiers[1].render_levels = detail
-
-        # todo Set displacement modifier parameters:
-        #   *** todo completed on 4/23/2011 ***
-        #   *** toned down the variance on 4/26/2011 ***
-        #   *** added third modifier on 4/28/2011 ***
-        #   *** texture access changed on 9/6/2011 ***
-        rock.modifiers[2].texture = newTex[0]
-        rock.modifiers[2].strength = gauss(deform / 100, (1 / 300) * deform)
-        rock.modifiers[2].mid_level = 0
-        rock.modifiers[3].texture = newTex[1]
-        rock.modifiers[3].strength = gauss(deform, (1 / 3) * deform)
-        rock.modifiers[3].mid_level = 0
-        rock.modifiers[4].texture = newTex[2]
-        rock.modifiers[4].strength = gauss(rough * 2, (1 / 3) * rough)
-        rock.modifiers[5].texture = newTex[3]
-        rock.modifiers[5].strength = gauss(rough, (1 / 3) * rough)
-
-        # Set mesh to be smooth and fix the normals:
-        utils.smooth(bpy.data.meshes[name])
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.mesh.normals_make_consistent()
-        bpy.ops.object.editmode_toggle()
-
-        if mat_enable:
-            bpy.ops.object.material_slot_add()
-            rock.material_slots[0].material = newMat[randint(0, numOfMats - 1)]
-
-        # Store the last value of i:
-        shift = i
-
-    # Add the shift to lastRock:
-    lastRock += shift + 1
-
-    return
-
-
-# Much of the code below is more-or-less imitation of other addons and as such
-# I have left it undocumented.
-
-class rocks(bpy.types.Operator):
-    """Add rock objects"""
-    bl_idname = "mesh.rocks"
-    bl_label = "Add Rocks"
-    bl_options = {'REGISTER', 'UNDO'}
-    bl_description = "Add rocks"
-
-    # Get the preset values from the XML file.
-    #   -> The script was morphed into a Python module
-    #       to support this.
-    # Tell settings.py to parse the XML file with the settings.
-    # Then get the default values resulting from the parsing.
-    # Make a list containing the default values and append to that
-    # the presets specified in the same XML file.  This list will
-    # be used to load preset values.
-    settings.parse()
-    defaults = settings.getDefault()
-    presetsList = [defaults]
-    presetsList += settings.getPresetLists()
-    presets = []
-    lastPreset = 0
-
-    # Build the presets list for the enum property.
-    # This needs to be a for loop as the user might add presets to
-    # the XML file and those should show here:
-    for i in range(len(presetsList)):
-        value = str(i)
-        name = presetsList[i][0]
-        description = name + " preset values."
-        presets.append((value, name, description))
-
-    preset_values = EnumProperty(items = presets,
-                                 name = "Presets",
-                                 description = "Preset values for some rock types")
-
-    num_of_rocks = IntProperty(name = "Number of rocks",
-                               description = "Number of rocks to generate. WARNING: Slow at high values!",
-                               min = 1, max = 1048576,
-                               soft_max = 20,
-                               default = 1)
-
-    scale_X = FloatVectorProperty(name = "X scale",
-                                  description = "X axis scaling range.",
-                                  min = 0.0, max = 256.0, step = 1,
-                                  default = defaults[1], size = 2)
-    skew_X = FloatProperty(name = "X skew",
-                           description = "X Skew ratio. 0.5 is no skew.",
-                           min = -1.0, max = 1.0, default = defaults[4])
-    scale_Y = FloatVectorProperty(name = "Y scale",
-                                  description = "Y axis scaling range.",
-                                  min = 0.0, max = 256.0, step = 1,
-                                  default = defaults[2], size = 2)
-    skew_Y = FloatProperty(name = "Y skew",
-                           description = "Y Skew ratio. 0.5 is no skew.",
-                           min = -1.0, max = 1.0, default = defaults[5])
-    scale_Z = FloatVectorProperty(name = "Z scale",
-                                  description = "Z axis scaling range.",
-                                  min = 0.0, max = 256.0, step = 1,
-                                  default = defaults[3], size = 2)
-    skew_Z = FloatProperty(name = "Z skew",
-                           description = "Z Skew ratio. 0.5 is no skew.",
-                           min = -1.0, max = 1.0, default = defaults[6])
-    use_scale_dis = BoolProperty(name = "Scale displace textures",
-                                description = "Scale displacement textures with dimensions.  May cause streched textures.",
-                                default = defaults[7])
-    scale_fac = FloatVectorProperty(name = "Scaling Factor",
-                                    description = "XYZ scaling factor.  1 = no scaling.",
-                                    min = 0.0001, max = 256.0, step = 0.1,
-                                    default = defaults[8], size = 3)
-
-    # @todo Possible to title this section "Physical Properties:"?
-    deform = FloatProperty(name = "Deformation",
-                           description = "Rock deformation",
-                           min = 0.0, max = 1024.0, default = defaults[9])
-    rough = FloatProperty(name = "Roughness",
-                          description = "Rock roughness",
-                          min = 0.0, max = 1024.0, default = defaults[10])
-    detail = IntProperty(name = "Detail level",
-                         description = "Detail level.  WARNING: Slow at high values!",
-                         min = 1, max = 1024, default = defaults[11])
-    display_detail = IntProperty(name = "Display Detail",
-                                 description = "Display detail.  Use a lower value for high numbers of rocks.",
-                                 min = 1, max = 128, default = defaults[12])
-    smooth_fac = FloatProperty(name = "Smooth Factor",
-                               description = "Smoothing factor.  A value of 0 disables.",
-                               min = 0.0, max = 128.0, default = defaults[13])
-    smooth_it = IntProperty(name = "Smooth Iterations",
-                            description = "Smoothing iterations.  A value of 0 disables.",
-                            min = 0, max = 128, default = defaults[14])
-
-    # @todo Add material properties
-    mat_enable = BoolProperty(name = "Generate materials",
-                              description = "Generate materials and textures for the rocks",
-                              default = defaults[15])
-    mat_color = FloatVectorProperty(name = "Color",
-                                    description = "Base color settings (RGB)",
-                                    min = 0.0, max = 1.0, default = defaults[16], size = 3, subtype = 'COLOR')
-    mat_bright = FloatProperty(name = "Brightness",
-                               description = "Material brightness",
-                               min = 0.0, max = 1.0, default = defaults[17])
-    mat_rough = FloatProperty(name = "Roughness",
-                              description = "Material roughness",
-                              min = 0.0, max = 5.0, default = defaults[18])
-    mat_spec = FloatProperty(name = "Shine",
-                             description = "Material specularity strength",
-                             min = 0.0, max = 1.0, default = defaults[19])
-    mat_hard = IntProperty(name = "Hardness",
-                           description = "Material hardness",
-                           min = 0, max = 511, default = defaults[20])
-    mat_use_trans = BoolProperty(name = "Use Transparency",
-                                 description = "Enables transparency in rocks (WARNING: SLOW RENDER TIMES)",
-                                 default = defaults[21])
-    mat_alpha = FloatProperty(name = "Alpha",
-                              description = "Transparency of the rocks",
-                              min = 0.0, max = 1.0, default = defaults[22])
-    mat_cloudy = FloatProperty(name = "Cloudy",
-                               description = "How cloudy the transparent rocks look",
-                               min = 0.0, max = 1.0, default = defaults[23])
-    mat_IOR = FloatProperty(name = "IoR",
-                            description = "Index of Refraction",
-                            min = 0.25, max = 4.0, soft_max = 2.5,
-                            default = defaults[24])
-    mat_mossy = FloatProperty(name = "Mossiness",
-                              description = "Amount of mossiness on the rocks",
-                              min = 0.0, max = 1.0, default = defaults[25])
-
-    use_generate = BoolProperty(name = "Generate Rocks",
-                                description = "Enable actual generation.",
-                                default = defaults[26])
-    use_random_seed = BoolProperty(name = "Use a random seed",
-                                  description = "Create a seed based on time. Causes user seed to be ignored.",
-                                  default = defaults[27])
-    user_seed = IntProperty(name = "User seed",
-                            description = "Use a specific seed for the generator.",
-                            min = 0, max = 1048576, default = defaults[28])
-
-
-    def draw(self, context):
-        layout = self.layout
-        box = layout.box()
-        box.prop(self, 'num_of_rocks')
-        box = layout.box()
-        box.prop(self, 'scale_X')
-        box.prop(self, 'skew_X')
-        box.prop(self, 'scale_Y')
-        box.prop(self, 'skew_Y')
-        box.prop(self, 'scale_Z')
-        box.prop(self, 'skew_Z')
-        box.prop(self, 'use_scale_dis')
-        if self.use_scale_dis:
-            box.prop(self, 'scale_fac')
-        else:
-            self.scale_fac = utils.toFloats(self.defaults[8])
-        box = layout.box()
-        box.prop(self, 'deform')
-        box.prop(self, 'rough')
-        box.prop(self, 'detail')
-        box.prop(self, 'display_detail')
-        box.prop(self, 'smooth_fac')
-        box.prop(self, 'smooth_it')
-        box = layout.box()
-        box.prop(self, 'mat_enable')
-        if self.mat_enable:
-            box.prop(self, 'mat_color')
-            box.prop(self, 'mat_bright')
-            box.prop(self, 'mat_rough')
-            box.prop(self, 'mat_spec')
-            box.prop(self, 'mat_hard')
-            box.prop(self, 'mat_use_trans')
-            if self.mat_use_trans:
-                box.prop(self, 'mat_alpha')
-                box.prop(self, 'mat_cloudy')
-                box.prop(self, 'mat_IOR')
-            box.prop(self, 'mat_mossy')
-        box = layout.box()
-        box.prop(self, 'use_generate')
-        box.prop(self, 'use_random_seed')
-        if not self.use_random_seed:
-            box.prop(self, 'user_seed')
-        box.prop(self, 'preset_values')
-
-
-    def execute(self, context):
-        # The following "if" block loads preset values:
-        if self.lastPreset != int(self.preset_values):
-            self.scale_X = utils.toFloats(self.presetsList[int(self.preset_values)][1])
-            self.scale_Y = utils.toFloats(self.presetsList[int(self.preset_values)][2])
-            self.scale_Z = utils.toFloats(self.presetsList[int(self.preset_values)][3])
-            self.skew_X = float(self.presetsList[int(self.preset_values)][4])
-            self.skew_Y = float(self.presetsList[int(self.preset_values)][5])
-            self.skew_Z = float(self.presetsList[int(self.preset_values)][6])
-            self.use_scale_dis = bool(self.presetsList[int(self.preset_values)][7])
-            self.scale_fac = utils.toFloats(self.presetsList[int(self.preset_values)][8])
-            self.deform = float(self.presetsList[int(self.preset_values)][9])
-            self.rough = float(self.presetsList[int(self.preset_values)][10])
-            self.detail = int(self.presetsList[int(self.preset_values)][11])
-            self.display_detail = int(self.presetsList[int(self.preset_values)][12])
-            self.smooth_fac = float(self.presetsList[int(self.preset_values)][13])
-            self.smooth_it = int(self.presetsList[int(self.preset_values)][14])
-            self.mat_enable = bool(self.presetsList[int(self.preset_values)][15])
-            self.mat_color = utils.toFloats(self.presetsList[int(self.preset_values)][16])
-            self.mat_bright = float(self.presetsList[int(self.preset_values)][17])
-            self.mat_rough = float(self.presetsList[int(self.preset_values)][18])
-            self.mat_spec = float(self.presetsList[int(self.preset_values)][19])
-            self.mat_hard = int(self.presetsList[int(self.preset_values)][20])
-            self.mat_use_trans = bool(self.presetsList[int(self.preset_values)][21])
-            self.mat_alpha = float(self.presetsList[int(self.preset_values)][22])
-            self.mat_cloudy = float(self.presetsList[int(self.preset_values)][23])
-            self.mat_IOR = float(self.presetsList[int(self.preset_values)][24])
-            self.mat_mossy = float(self.presetsList[int(self.preset_values)][25])
-            self.use_generate = bool(self.presetsList[int(self.preset_values)][26])
-            self.use_random_seed = bool(self.presetsList[int(self.preset_values)][27])
-            self.user_seed = int(self.presetsList[int(self.preset_values)][28])
-            self.lastPreset = int(self.preset_values)
-
-        # todo Add deform, deform_Var, rough, and rough_Var:
-        #   *** todo completed 4/23/2011 ***
-        #   *** Eliminated "deform_Var" and "rough_Var" so the script is not
-        #       as complex to use.  May add in again as advanced features. ***
-        if self.use_generate:
-            generateRocks(context,
-                          self.scale_X,
-                          self.skew_X,
-                          self.scale_Y,
-                          self.skew_Y,
-                          self.scale_Z,
-                          self.skew_Z,
-                          self.scale_fac,
-                          self.detail,
-                          self.display_detail,
-                          self.deform,
-                          self.rough,
-                          self.smooth_fac,
-                          self.smooth_it,
-                          self.mat_enable,
-                          self.mat_color,
-                          self.mat_bright,
-                          self.mat_rough,
-                          self.mat_spec,
-                          self.mat_hard,
-                          self.mat_use_trans,
-                          self.mat_alpha,
-                          self.mat_cloudy,
-                          self.mat_IOR,
-                          self.mat_mossy,
-                          self.num_of_rocks,
-                          self.user_seed,
-                          self.use_scale_dis,
-                          self.use_random_seed)
-
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/settings.py b/release/scripts/addons_contrib/add_mesh_rocks/settings.py
deleted file mode 100644
index 647a62d..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/settings.py
+++ /dev/null
@@ -1,184 +0,0 @@
-# Paul "BrikBot" Marshall
-# Created: July 1, 2011
-# Last Modified: November 17, 2011
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-# Thanks to Meta-Androco, RickyBlender, Ace Dragon, and PKHG for ideas
-#   and testing.
-#
-# Coded in IDLE, tested in Blender 2.59.  NumPy Recommended.
-# Search for "@todo" to quickly find sections that need work.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  The Blender Rock Creation tool is for rapid generation of
-#  mesh rocks in Blender.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-import inspect
-import shutil
-from add_mesh_rocks import utils
-from xml.dom import minidom
-
-basePath = inspect.getfile(inspect.currentframe())[0:-len("settings.py")]
-path = basePath + "add_mesh_rocks.xml"
-
-try:
-    source = minidom.parse(path)
-    print("Rock generator settings file found:\n" + path)
-except:
-    print("Rock generator settings file not found.  Creating settings file.")
-    shutil.copy(basePath + "factory.xml", path)
-    source = minidom.parse(path)
-
-xmlDefault = source.getElementsByTagName('default')[0]
-xmlPresets = source.getElementsByTagName('preset')
-default = []
-presets = []
-
-#----- Gets and Sets -----#
-
-
-def getDefault():
-    global default
-    return default
-
-
-def getPresetLists():
-    global presets
-    return presets
-
-
-def getPreset(ID=0):
-    global presets
-    return presets[ID]
-
-#---------- Core ----------#
-
-
-def parse():
-    global xmlDefault
-    global xmlPresets
-    global default
-    global presets
-
-    # Parse default values
-    default = parseNode(xmlDefault)
-
-    # Parse preset values
-    for setting in xmlPresets:
-        presets.append(parseNode(setting))
-
-    return '{FINISHED}'
-
-
-# Takes a node and parses it for data.  Relies on that setting.xml has
-#   a valid format as specified by the DTD.
-# For some reason minidom places an empty child node for every other node.
-def parseNode(setting, title=True):
-    loc = 1
-
-    if title:
-        # Preset name (xmlPreset.childNodes[1]):
-        title = setting.childNodes[loc].childNodes[0].data
-        loc += 2
-
-    # Preset size values (xmlPreset.childNodes[3]):
-    scaleX = [float(setting.childNodes[loc].childNodes[1].childNodes[3].childNodes[0].data),
-              float(setting.childNodes[loc].childNodes[1].childNodes[5].childNodes[0].data)]
-    scaleY = [float(setting.childNodes[loc].childNodes[3].childNodes[3].childNodes[0].data),
-              float(setting.childNodes[loc].childNodes[3].childNodes[5].childNodes[0].data)]
-    scaleZ = [float(setting.childNodes[loc].childNodes[5].childNodes[3].childNodes[0].data),
-              float(setting.childNodes[loc].childNodes[5].childNodes[5].childNodes[0].data)]
-    skewX = float(setting.childNodes[loc].childNodes[7].childNodes[3].childNodes[0].data)
-    skewY = float(setting.childNodes[loc].childNodes[9].childNodes[3].childNodes[0].data)
-    skewZ = float(setting.childNodes[loc].childNodes[11].childNodes[3].childNodes[0].data)
-    if setting.childNodes[loc].childNodes[13].childNodes[0].data == 'False':
-        use_scale_dis = False
-    else:
-        use_scale_dis = True
-    scale_fac = utils.toList(setting.childNodes[loc].childNodes[15].childNodes[0].data)
-    loc += 2
-
-    # Presst shape values (xmlPreset.childNodes[5]):
-    deform = float(setting.childNodes[loc].childNodes[1].childNodes[0].data)
-    rough = float(setting.childNodes[loc].childNodes[3].childNodes[0].data)
-    detail = int(setting.childNodes[loc].childNodes[5].childNodes[0].data)
-    display_detail = int(setting.childNodes[loc].childNodes[7].childNodes[0].data)
-    smooth_fac = float(setting.childNodes[loc].childNodes[9].childNodes[0].data)
-    smooth_it = int(setting.childNodes[loc].childNodes[11].childNodes[0].data)
-    loc += 2
-
-    # Preset material values (xmlPreset.childNodes[7]):
-    if setting.childNodes[loc].childNodes[1].childNodes[0].data == 'False':
-        mat_enable = False
-    else:
-        mat_enable = True
-    mat_color = utils.toList(setting.childNodes[loc].childNodes[3].childNodes[0].data)
-    mat_bright = float(setting.childNodes[loc].childNodes[5].childNodes[0].data)
-    mat_rough = float(setting.childNodes[loc].childNodes[7].childNodes[0].data)
-    mat_spec = float(setting.childNodes[loc].childNodes[9].childNodes[0].data)
-    mat_hard = int(setting.childNodes[loc].childNodes[11].childNodes[0].data)
-    mat_use_trans = bool(setting.childNodes[loc].childNodes[13].childNodes[0].data)
-    mat_alpha = float(setting.childNodes[loc].childNodes[15].childNodes[0].data)
-    mat_cloudy = float(setting.childNodes[loc].childNodes[17].childNodes[0].data)
-    mat_IOR = float(setting.childNodes[loc].childNodes[19].childNodes[0].data)
-    #mat_use_mirror = float(setting.childNodes[loc].childNodes[21].childNodes[0].data)
-    #mat_mossy = float(setting.childNodes[loc].childNodes[23].childNodes[0].data)
-    #mat_mossy = float(setting.childNodes[loc].childNodes[25].childNodes[0].data)
-    mat_mossy = float(setting.childNodes[loc].childNodes[21].childNodes[0].data)
-    loc += 2
-
-    # Preset random values (xmlPreset.childNodes[9]):
-    if setting.childNodes[loc].childNodes[1].childNodes[0].data == 'True':
-        use_generate = True
-    else:
-        use_generate = False
-    if setting.childNodes[loc].childNodes[3].childNodes[0].data == 'False':
-        use_random_seed = False
-    else:
-        use_random_seed = True
-    user_seed = int(setting.childNodes[loc].childNodes[5].childNodes[0].data)
-
-    if title:
-        parsed = [title, scaleX, scaleY, scaleZ, skewX, skewY, skewZ,
-                  use_scale_dis, scale_fac, deform, rough, detail,
-                  display_detail, smooth_fac, smooth_it, mat_enable, mat_color,
-                  mat_bright, mat_rough, mat_spec, mat_hard, mat_use_trans,
-                  mat_alpha, mat_cloudy, mat_IOR, mat_mossy, use_generate,
-                  use_random_seed, user_seed]
-    else:
-        parsed = [scaleX, scaleY, scaleZ, skewX, skewY, skewZ, use_scale_dis,
-                  scale_fac, deform, rough, detail, display_detail, smooth_fac,
-                  smooth_it, mat_enable, mat_color, mat_bright, mat_rough,
-                  mat_spec, mat_hard, mat_use_trans, mat_alpha, mat_cloudy,
-                  mat_IOR, mat_mossy, use_generate, use_random_seed, user_seed]
-
-    return parsed
-
-
-def save():
-    return '{FINISHED}'
-
-
-def _print():
-    for i in presets:
-        print(i)
-    return '{FINISHED}'
diff --git a/release/scripts/addons_contrib/add_mesh_rocks/utils.py b/release/scripts/addons_contrib/add_mesh_rocks/utils.py
deleted file mode 100644
index 94acaf7..0000000
--- a/release/scripts/addons_contrib/add_mesh_rocks/utils.py
+++ /dev/null
@@ -1,69 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  The Blender Rock Creation tool is for rapid generation of mesh rocks.
-#  Copyright (C) 2011  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-
-# Converts a formated string to a float tuple:
-#   IN - '(0.5, 0.2)' -> CONVERT -> OUT - (0.5, 0.2)
-def toTuple(stringIn):
-    sTemp = str(stringIn)[1:len(str(stringIn)) - 1].split(', ')
-    fTemp = []
-    for i in sTemp:
-        fTemp.append(float(i))
-    return tuple(fTemp)
-
-
-# Converts a formated string to a float tuple:
-#   IN - '[0.5, 0.2]' -> CONVERT -> OUT - [0.5, 0.2]
-def toList(stringIn):
-    sTemp = str(stringIn)[1:len(str(stringIn)) - 1].split(', ')
-    fTemp = []
-    for i in sTemp:
-        fTemp.append(float(i))
-    return fTemp
-
-
-# Converts each item of a list into a float:
-def toFloats(inList):
-    outList = []
-    for i in inList:
-        outList.append(float(i))
-    return outList
-
-
-# Converts each item of a list into an integer:
-def toInts(inList):
-    outList = []
-    for i in inList:
-        outList.append(int(i))
-    return outList
-
-
-# Sets all faces smooth.  Done this way since I can't
-# find a simple way without using bpy.ops:
-def smooth(mesh):
-    import bmesh
-    bm = bmesh.new()
-    bm.from_mesh(mesh)
-    for f in bm.faces:
-        f.smooth = True
-    bm.to_mesh(mesh)
-    return mesh
diff --git a/release/scripts/addons_contrib/add_mesh_symmetrical_empty.py b/release/scripts/addons_contrib/add_mesh_symmetrical_empty.py
deleted file mode 100644
index 67f4831..0000000
--- a/release/scripts/addons_contrib/add_mesh_symmetrical_empty.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Add Symmetrical Empty",
-    "author": "Pablo Vazquez",			
-    "version": (1,0,2),
-    "blender": (2, 6, 4),
-    "location": "View3D > Add > Mesh > Symmetrical Empty",
-    "description": "Add an empty mesh with a Mirror Modifier for quick symmetrical modeling",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Add_Mesh/Add_Symmetrical_Empty",
-    "tracker_url": "",
-    "category": "Add Mesh"}
-'''
-Adds an empty mesh with a mirror modifier.
-'''    
-
-import bpy
-from bpy.props import BoolProperty
-
-def Add_Symmetrical_Empty():
-
-    bpy.ops.mesh.primitive_plane_add(enter_editmode = True)
-
-    sempty = bpy.context.object
-    sempty.name = "SymmEmpty"
-
-    # check if we have a mirror modifier, otherwise add
-    if (sempty.modifiers and sempty.modifiers['Mirror']):
-        pass
-    else:
-        bpy.ops.object.modifier_add(type ='MIRROR')
-
-    # Delete all!
-    bpy.ops.mesh.select_all(action='TOGGLE')
-    bpy.ops.mesh.select_all(action='TOGGLE')
-    bpy.ops.mesh.delete(type ='VERT')
-
-
-class AddSymmetricalEmpty(bpy.types.Operator):
-    
-    bl_idname = "mesh.primitive_symmetrical_empty_add"
-    bl_label = "Add Symmetrical Empty Mesh"
-    bl_description = "Add an empty mesh with a Mirror Modifier for quick symmetrical modeling"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def draw(self, context):
-        layout = self.layout
-        mirror = bpy.context.object.modifiers['Mirror']
-
-        layout.prop(mirror,'use_clip', text="Use Clipping")
-
-        layout.label("Mirror Axis")
-        row = layout.row(align=True)
-        row.prop(mirror, "use_x")
-        row.prop(mirror, "use_y")
-        row.prop(mirror, "use_z")
-
-    def execute(self, context):
-        Add_Symmetrical_Empty()
-        return {'FINISHED'}
-
-## menu option ##
-def menu_item(self, context):
-    # only in object mode
-    if bpy.context.mode == "OBJECT":
-        self.layout.operator("mesh.primitive_symmetrical_empty_add",
-            text="Symmetrical Empty", icon="EMPTY_DATA")
-
-## register and add it on top of the list ##
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_mesh_add.prepend(menu_item)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_mesh_add.remove(menu_item)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/add_scene_elements/__init__.py b/release/scripts/addons_contrib/add_scene_elements/__init__.py
deleted file mode 100644
index f1f9f53..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/__init__.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-# by meta-androcto, parts based on work by Erich Toven #
-
-bl_info = {
-    "name": "Scene Elements",
-    "author": "Meta Androcto, ",
-    "version": (0, 2),
-    "blender": (2, 6, 4),
-    "location": "View3D > Add > Scene Elements",
-    "description": "Add Scenes & Lights, Objects.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6"\
-        "/Py/Scripts",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32682",
-    "category": "Object"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(scene_camera)
-    imp.reload(scene_lighting)
-    imp.reload(scene_materials)
-    imp.reload(scene_objects)
-    imp.reload(scene_objects_cycles)
-
-else:
-    from . import scene_camera
-    from . import scene_lighting
-    from . import scene_materials
-    from . import scene_objects
-    from . import scene_objects_cycles
-	
-import bpy
-
-class INFO_MT_mesh_objects_add(bpy.types.Menu):
-    # Define the "mesh objects" menu
-    bl_idname = "INFO_MT_scene_elements"
-    bl_label = "Scene Elements"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("camera.add_scene",
-            text="Scene_Camera")
-        layout.operator("materials.add_scene",
-            text="Scene_Objects_BI")
-        layout.operator("plane.add_scene",
-            text="Scene_Plane")
-        layout.operator("objects_cycles.add_scene",
-            text="Scene_Objects_Cycles")
-
-class INFO_MT_mesh_lamps_add(bpy.types.Menu):
-    # Define the "mesh objects" menu
-    bl_idname = "INFO_MT_scene_lamps"
-    bl_label = "Lighting Elements"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("object.add_single_spot",
-            text="Add Single Spot")
-        layout.operator("object.add_basic_3point",
-            text="Add 3 Point Spot Setup")
-        layout.operator("object.add_basic_2point",
-            text="Add 2 Point Setup")
-        layout.operator("object.add_area_3point",
-            text="Add 3 Point Setup")
-
-# Register all operators and panels
-# Define "Extras" menu
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_scene_elements", icon="PLUGIN")
-    self.layout.menu("INFO_MT_scene_lamps", icon="PLUGIN")
-def register():
-    bpy.utils.register_module(__name__)
-    # Add "Extras" menu to the "Add Mesh" menu
-    bpy.types.INFO_MT_add.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    # Remove "Extras" menu from the "Add Mesh" menu.
-    bpy.types.INFO_MT_add.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/add_scene_elements/scene_camera.py b/release/scripts/addons_contrib/add_scene_elements/scene_camera.py
deleted file mode 100644
index 6af3d32..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/scene_camera.py
+++ /dev/null
@@ -1,89 +0,0 @@
-'''# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Scene Lighting Presets",
-    "author": "meta-androcto",
-    "version": (0,1),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tool Shelf > Scene Lighting Presets",
-    "description": "Creates Scenes with Lighting presets",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/",
-    "tracker_url": "",
-    "category": "Object"}
-'''	
-import bpy, mathutils, math
-from math import pi
-from bpy.props import *
-from mathutils import Vector
-
-class add_scene_camera(bpy.types.Operator):
-    bl_idname = "camera.add_scene"
-    bl_label = "Camera Only"
-    bl_description = "Empty scene with Camera"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-	
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "scene_camera"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("Camera_World")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        world.light_settings.use_ambient_occlusion = True
-        world.light_settings.ao_factor = 0.25
-# add camera
-        bpy.ops.object.camera_add(location = (7.48113,-6.50764,5.34367), rotation = (1.109319,0.010817,0.814928),)
-        cam = bpy.context.active_object.data
-        cam.lens = 35
-        cam.draw_size = 0.1
-
-        return {"FINISHED"}
-
-#### REGISTER ####
-def add_object_button(self, context):
-    self.layout.menu("INFO_MT_camera.add_scene", icon="PLUGIN")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_add.append(add_object_button)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_add.remove(add_object_button)
-
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/add_scene_elements/scene_lighting.py b/release/scripts/addons_contrib/add_scene_elements/scene_lighting.py
deleted file mode 100644
index f5735e8..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/scene_lighting.py
+++ /dev/null
@@ -1,244 +0,0 @@
-'''
-bl_info = {
-    "name": "Add 3 Point Lighting Setup",
-    "author": "Erich Toven" meta-androcto
-    "version": (1, 1),
-    "blender": (2, 5, 6),
-    "api": 34765,
-    "location": "View3D > Add",
-    "description": "Adds a new 3 point lighting setup",
-    "warning": "Very Alpha!",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Object"}
-
-
-'''
-import bpy, mathutils, math
-from math import pi
-from bpy.props import FloatVectorProperty
-#from add_utils import AddObjectHelper, add_object_data
-from mathutils import Vector
-
-
-class functions():
-    def addTrackToConstraint(ob, name, target):
-        cns = ob.constraints.new('TRACK_TO')
-        cns.name = name
-        cns.target = target
-        cns.track_axis = 'TRACK_NEGATIVE_Z'
-        cns.up_axis = 'UP_Y'
-        cns.owner_space = 'LOCAL'
-        cns.target_space = 'LOCAL'
-        return
-
-class AddSingleSpot(bpy.types.Operator):
-
-    bl_idname = "object.add_single_spot"
-    bl_label = "Add Single Spot Setup"
-    bl_options = {'REGISTER', 'UNDO'}
- 
-    def execute(self, context):
-   
-        ### Add basic 3 point lighting setup ###        
-        bpy.ops.object.add(type='EMPTY', view_align=False, enter_editmode=False, location=(0.000000, 0.000000, 0.000000))
-        empty1 = bpy.context.object
-        
-        bpy.ops.object.lamp_add(type='SPOT', view_align=False, location=(0.000000, -10.000000, 10.000000), rotation=(-52.103, 15.548, -169.073))
-        lamp1 = bpy.context.object
-
-        ### Configure Lighting Setup ###        
-        lamp1.name = 'Single_Spot1'
-        
-        lamp1.data.energy = 4.0
-        lamp1.data.distance = 25.0
-        lamp1.data.spot_size = 1.396264
-        lamp1.data.spot_blend = 1
-        lamp1.data.shadow_method = 'BUFFER_SHADOW'
-        lamp1.data.shadow_buffer_type = 'HALFWAY'
-        lamp1.data.shadow_filter_type = 'GAUSS'
-        lamp1.data.shadow_buffer_soft = 10
-        lamp1.data.shadow_buffer_size = 2048
-        lamp1.data.shadow_buffer_bias = 0.100
-        lamp1.data.shadow_buffer_samples = 8
-        lamp1.data.use_auto_clip_start = True
-        lamp1.data.use_auto_clip_end = True
-
-        functions.addTrackToConstraint(lamp1,'AutoTrack',empty1)
-  
-        return {'FINISHED'}
-
-class AddArea3point(bpy.types.Operator):
-    bl_idname = "object.add_area_3point"
-    bl_label = "add 3 Point Area Setup"
-    bl_options = {'REGISTER', 'UNDO'}
-    bl_description = "Add 3 Point lights to Scene"  
-    def execute(self, context):
-        ### Add basic 3 point lighting setup ###      
-
-        bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(-12.848104, 18.574114, 7.496113), rotation=(1.537930, 0.711540, 3.687180))
-        lamp1 = bpy.context.object
-
-        bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(-13.168015, -18.672356, 15.276655), rotation=(0.941318, 0.917498, -1.187617))     
-        lamp2 = bpy.context.object
-
-        bpy.ops.object.lamp_add(type='POINT', view_align=False, location=(19.430519, -20.502472, 7.496113), rotation=(1.614763, 0.709077, 0.853816))   
-        lamp3 = bpy.context.object
-
-
-        ### Configure Lighting Setup ###        
-        lamp1.name = 'Point1'
-        lamp2.name = 'Point2'
-        lamp3.name = 'Point3'
-        
-        lamp1.data.energy = 0.75
-        lamp1.data.distance = 15.0
-        lamp1.data.shadow_method = 'RAY_SHADOW'
-
-       
-        lamp2.data.energy = 0.75
-        lamp2.data.distance = 16.0
-        lamp2.data.shadow_method = 'RAY_SHADOW'
-
-        
-        lamp3.data.energy = 0.6
-        lamp3.data.distance = 8.0
-        lamp3.data.shadow_method = 'RAY_SHADOW'
-
-        return {'FINISHED'}
-
-class AddBasic3Point(bpy.types.Operator):
-
-    bl_idname = "object.add_basic_3point"
-    bl_label = "Add 3 Point Spot Setup"
-    bl_options = {'REGISTER', 'UNDO'}
- 
-    def execute(self, context):
-   
-        ### Add basic 3 point lighting setup ###        
-        bpy.ops.object.add(type='EMPTY', view_align=False, enter_editmode=False, location=(0.000000, -3.817210, 8.279530), rotation=(0, 0, 0))
-        empty1 = bpy.context.object
-        
-        bpy.ops.object.lamp_add(type='SPOT', view_align=False, location=(19.430519, -20.502472, 7.496113), rotation=(1.614763, 0.709077, 0.853816))
-        lamp1 = bpy.context.object
-
-        bpy.ops.object.lamp_add(type='SPOT', view_align=False, location=(-12.848104, 18.574114, 7.496113), rotation=(1.537930, 1.537930, 3.687180))
-        lamp2 = bpy.context.object
-                
-        bpy.ops.object.lamp_add(type='SPOT', view_align=False, location=(-13.168015, -18.672356, 15.276655), rotation=(0.941318, 0.917498, -1.187617))
-        lamp3 = bpy.context.object
-
-        ### Configure Lighting Setup ###        
-        lamp1.name = 'Spot1'
-        lamp2.name = 'Spot2'
-        lamp3.name = 'Key'
-        
-        lamp1.data.energy = 4.0
-        lamp1.data.distance = 25.0
-        lamp1.data.spot_size = 1.396264
-        lamp1.data.spot_blend = 1
-        lamp1.data.shadow_method = 'BUFFER_SHADOW'
-        lamp1.data.shadow_buffer_type = 'HALFWAY'
-        lamp1.data.shadow_filter_type = 'GAUSS'
-        lamp1.data.shadow_buffer_soft = 10
-        lamp1.data.shadow_buffer_size = 2048
-        lamp1.data.shadow_buffer_bias = 0.100
-        lamp1.data.shadow_buffer_samples = 8
-        lamp1.data.use_auto_clip_start = True
-        lamp1.data.use_auto_clip_end = True
-        
-        
-        lamp2.data.energy = 2.0
-        lamp2.data.distance = 25.0
-        lamp2.data.spot_size = 1.047198
-        lamp2.data.spot_blend = 1
-        lamp2.data.shadow_method = 'BUFFER_SHADOW'
-        lamp2.data.shadow_buffer_type = 'HALFWAY'
-        lamp2.data.shadow_filter_type = 'GAUSS'
-        lamp2.data.shadow_buffer_soft = 5
-        lamp2.data.shadow_buffer_size = 2048
-        lamp2.data.shadow_buffer_bias = 0.100
-        lamp2.data.shadow_buffer_samples = 16
-        lamp2.data.use_auto_clip_start = True
-        lamp2.data.use_auto_clip_end = True
-
-        lamp3.data.energy = 2.0
-        lamp3.data.distance = 30.0
-        lamp3.data.spot_size = 1.570797
-        lamp3.data.spot_blend = 1
-        lamp3.data.shadow_method = 'BUFFER_SHADOW'
-        lamp3.data.shadow_buffer_type = 'HALFWAY'
-        lamp3.data.shadow_filter_type = 'GAUSS'
-        lamp3.data.shadow_buffer_soft = 20
-        lamp3.data.shadow_buffer_size = 2048
-        lamp3.data.shadow_buffer_bias = 1
-        lamp3.data.shadow_buffer_samples = 16
-        lamp3.data.use_auto_clip_start = True
-        lamp3.data.use_auto_clip_end = True
-
-        functions.addTrackToConstraint(lamp3,'AutoTrack',empty1)
-  
-        return {'FINISHED'}
-class AddBasic2Point(bpy.types.Operator):
-
-    bl_idname = "object.add_basic_2point"
-    bl_label = "Add 2 Point Setup"
-    bl_options = {'REGISTER', 'UNDO'}
- 
-    def execute(self, context):
-   
-# add point lamp
-        bpy.ops.object.lamp_add(type="POINT", location = (4.07625,1.00545,5.90386), rotation =(0.650328,0.055217,1.866391))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Point_Right"
-        lamp1.energy = 1.0
-        lamp1.distance = 30.0
-        lamp1.shadow_method = "RAY_SHADOW"
-        lamp1.use_sphere = True        
-# add point lamp2
-        bpy.ops.object.lamp_add(type="POINT", location = (-0.57101,-4.24586,5.53674), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Point_Left"
-        lamp2.energy = 1.0
-        lamp2.distance = 30.0
-        lamp2.shadow_method = "RAY_SHADOW"
-  
-        return {'FINISHED'}
-       
-class INFO_MT_add_3pointsetup(bpy.types.Menu):
-    bl_idname = "INFO_MT_lighting.add"
-    bl_label = "Lighting Setups"
-    bl_description = "Add 3 point light sets to Scene"  
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        layout.operator("object.add_single_spot",
-            text="Add Single Spot")
-        layout.operator("object.add_basic_3point",
-            text="Add 3 Point Spot Setup")
-        layout.operator("object.add_basic_2point",
-            text="Add 2 Point Setup")
-        layout.operator("object.add_area_3point",
-            text="Add 3 Point Setup")
-
-#import space_info    
-
-
-#### REGISTER ####
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_lighting.add", icon="PLUGIN")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_add.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_add.remove(menu_func)
-
-
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_scene_elements/scene_materials.py b/release/scripts/addons_contrib/add_scene_elements/scene_materials.py
deleted file mode 100644
index 0383312..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/scene_materials.py
+++ /dev/null
@@ -1,250 +0,0 @@
-'''
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Scene Lighting Presets",
-    "author": "meta-androcto",
-    "version": (0,1),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tool Shelf > Scene Lighting Presets",
-    "description": "Creates Scenes with Lighting presets",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/",
-    "tracker_url": "",
-    "category": "Object"}
-'''	
-import bpy, mathutils, math
-from math import pi
-from bpy.props import *
-from mathutils import Vector
-
-class add_scene(bpy.types.Operator):
-    bl_idname = "materials.add_scene"
-    bl_label = "Create test scene"
-    bl_description = "Materials Scene with Objects"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-	
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "scene_materials"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("Materials_World")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        world.light_settings.use_ambient_occlusion = True
-        world.light_settings.ao_factor = 0.25
-# add camera
-        bpy.ops.object.camera_add(location = (7.48113,-6.50764,5.34367), rotation = (1.109319,0.010817,0.814928))
-        cam = bpy.context.active_object.data
-        cam.lens = 35
-        cam.draw_size = 0.1
-        
-# add point lamp
-        bpy.ops.object.lamp_add(type="POINT", location = (4.07625,1.00545,5.90386), rotation =(0.650328,0.055217,1.866391))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Point_Right"
-        lamp1.energy = 1.0
-        lamp1.distance = 30.0
-        lamp1.shadow_method = "RAY_SHADOW"
-        lamp1.use_sphere = True        
-# add point lamp2
-        bpy.ops.object.lamp_add(type="POINT", location = (-0.57101,-4.24586,5.53674), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Point_Left"
-        lamp2.energy = 1.0
-        lamp2.distance = 30.0
-#       lamp2.shadow_method = "RAY_SHADOW"
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-
-# add cube
-        bpy.ops.mesh.primitive_cube_add()
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.mesh.subdivide(number_cuts=2)
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.modifier_add(type='BEVEL')
-        bpy.ops.object.modifier_add(type='SUBSURF')
-        bpy.ops.object.shade_smooth()
-
-
-        cube = bpy.context.active_object
-# add new material
-
-        cubeMaterial = blend_data.materials.new("Cube_Material")
-        bpy.ops.object.material_slot_add()
-        cube.material_slots[0].material = cubeMaterial
-
-            
-#Material settings
-# Diffuse
-        cubeMaterial.preview_render_type = "CUBE"
-        cubeMaterial.diffuse_color = (1.000, 0.373, 0.00)
-        cubeMaterial.diffuse_shader  = 'OREN_NAYAR' 
-        cubeMaterial.diffuse_intensity = 1.0
-        cubeMaterial.roughness = 0.09002
-# Specular
-        cubeMaterial.specular_color = (1.000, 0.800, 0.136)
-        cubeMaterial.specular_shader = "PHONG"
-        cubeMaterial.specular_intensity = 1.0
-        cubeMaterial.specular_hardness = 511.0
-# Shading
-        cubeMaterial.ambient = 1.00
-        cubeMaterial.use_cubic = False
-# Transparency
-        cubeMaterial.use_transparency = False
-        cubeMaterial.alpha = 0
-# Mirror
-        cubeMaterial.raytrace_mirror.use = True
-        cubeMaterial.mirror_color = (1.000, 0.793, 0.0)
-        cubeMaterial.raytrace_mirror.reflect_factor = 0.394
-        cubeMaterial.raytrace_mirror.fresnel = 2.0
-        cubeMaterial.raytrace_mirror.fresnel_factor = 1.641
-        cubeMaterial.raytrace_mirror.fade_to = "FADE_TO_SKY"
-        cubeMaterial.raytrace_mirror.gloss_anisotropic = 1.0
-# Shadow
-        cubeMaterial.use_transparent_shadows = True
-		
-# Add a texture
-        cubetex = blend_data.textures.new("CloudTex", type='CLOUDS')
-        cubetex.noise_type = 'SOFT_NOISE'
-        cubetex.noise_scale = 0.25
-        mtex = cubeMaterial.texture_slots.add()
-        mtex.texture = cubetex
-        mtex.texture_coords = 'ORCO'
-        mtex.scale = (0.800, 0.800, 0.800)
-        mtex.use_map_mirror = True
-        mtex.mirror_factor = 0.156
-        mtex.use_map_color_diffuse = True
-        mtex.diffuse_color_factor = 0.156
-        mtex.use_map_normal = True
-        mtex.normal_factor = 0.010
-        mtex.blend_type = "ADD"
-        mtex.use_rgb_to_intensity = True
-        mtex.color = (1.000, 0.207, 0.000)
-#add monkey #
-        bpy.ops.mesh.primitive_monkey_add(location = (-0.32639,0.08901,1.49976))
-        bpy.ops.transform.rotate(value=(1.15019), axis=(0, 0, 1))
-        bpy.ops.transform.rotate(value=(-0.683882), axis=(0, 1, 0))
-        bpy.ops.object.modifier_add(type='SUBSURF')
-        bpy.ops.object.shade_smooth()
-        monkey = bpy.context.active_object
-# add new material
-
-        monkeyMaterial = blend_data.materials.new("Monkey_Material")
-        bpy.ops.object.material_slot_add()
-        monkey.material_slots[0].material = monkeyMaterial
-
-#Material settings
-        monkeyMaterial.preview_render_type = "MONKEY"
-        monkeyMaterial.diffuse_color = (0.239, 0.288, 0.288)
-        monkeyMaterial.specular_color = (0.604, 0.465, 0.136)
-        monkeyMaterial.diffuse_shader    = 'LAMBERT' 
-        monkeyMaterial.diffuse_intensity = 1.0 
-        monkeyMaterial.specular_intensity = 0.3
-        monkeyMaterial.ambient = 0
-        monkeyMaterial.type = 'SURFACE'
-        monkeyMaterial.use_cubic = True
-        monkeyMaterial.use_transparency = False
-        monkeyMaterial.alpha = 0
-        monkeyMaterial.use_transparent_shadows = True
-        monkeyMaterial.raytrace_mirror.use = True
-        monkeyMaterial.raytrace_mirror.reflect_factor = 0.65
-        monkeyMaterial.raytrace_mirror.fade_to = "FADE_TO_MATERIAL"
-# add plane
-
-        bpy.ops.mesh.primitive_plane_add(location = (0.0,0.0,-1.0))
-        bpy.ops.transform.rotate(value=(-0.820305), axis=(0, 0, 1))
-        bpy.ops.transform.resize(value=(22.0, 22.0, 0.0))
-        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
-
-        plane = bpy.context.active_object
-# add new material
-
-        planeMaterial = blend_data.materials.new("Plane_Material")
-        bpy.ops.object.material_slot_add()
-        plane.material_slots[0].material = planeMaterial
-
-            
-#Material settings
-        planeMaterial.preview_render_type = "CUBE"
-        planeMaterial.diffuse_color = (0.2, 0.2, 0.2)
-        planeMaterial.specular_color = (0.604, 0.465, 0.136)
-        planeMaterial.specular_intensity = 0.3
-        planeMaterial.ambient = 0
-        planeMaterial.use_cubic = True
-        planeMaterial.use_transparency = False
-        planeMaterial.alpha = 0
-        planeMaterial.use_transparent_shadows = True
-        return {"FINISHED"}
-
-class INFO_MT_add_scenesetup(bpy.types.Menu):
-    bl_idname = "INFO_MT_materials.add_scene"
-    bl_label = "Materials Scene"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        layout.operator("materials.add_scene",
-            text="Add scene")
-
-#### REGISTER ####
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_materials.add_scene", icon="PLUGIN")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_add.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_add.remove(menu_func)
-
-
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_scene_elements/scene_objects.py b/release/scripts/addons_contrib/add_scene_elements/scene_objects.py
deleted file mode 100644
index 4b20867..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/scene_objects.py
+++ /dev/null
@@ -1,157 +0,0 @@
-'''
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Scene Lighting Presets",
-    "author": "meta-androcto",
-    "version": (0,1),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tool Shelf > Scene Lighting Presets",
-    "description": "Creates Scenes with Lighting presets",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/",
-    "tracker_url": "",
-    "category": "Object"}
-'''	
-import bpy, mathutils, math
-from math import pi
-from bpy.props import *
-from mathutils import Vector
-
-class add_scene(bpy.types.Operator):
-    bl_idname = "plane.add_scene"
-    bl_label = "Create test scene"
-    bl_description = "Scene with 'infinite' plane"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-	
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "scene_plane"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("Plane_World")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        world.light_settings.use_ambient_occlusion = True
-        world.light_settings.ao_factor = 0.25
-# add camera
-        bpy.ops.object.camera_add(location = (7.48113,-6.50764,5.34367), rotation = (1.109319,0.010817,0.814928))
-        cam = bpy.context.active_object.data
-        cam.lens = 35
-        cam.draw_size = 0.1
-        
-# add point lamp
-        bpy.ops.object.lamp_add(type="POINT", location = (4.07625,1.00545,5.90386), rotation =(0.650328,0.055217,1.866391))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Point_Right"
-        lamp1.energy = 1.0
-        lamp1.distance = 30.0
-        lamp1.shadow_method = "RAY_SHADOW"
-        lamp1.use_sphere = True        
-# add point lamp2
-        bpy.ops.object.lamp_add(type="POINT", location = (-0.57101,-4.24586,5.53674), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Point_Left"
-        lamp2.energy = 1.0
-        lamp2.distance = 30.0
-#        lamp2.shadow_method = "RAY_SHADOW"
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-
-# add plane
-
-        bpy.ops.mesh.primitive_plane_add(location = (0.0,0.0,-1.0))
-        bpy.ops.transform.rotate(value=(-0.820305), axis=(0, 0, 1))
-        bpy.ops.transform.resize(value=(22.0, 22.0, 0.0))
-        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
-
-        plane = bpy.context.active_object
-# add new material
-
-        planeMaterial = blend_data.materials.new("Plane_Material")
-        bpy.ops.object.material_slot_add()
-        plane.material_slots[0].material = planeMaterial
-
-            
-#Material settings
-        planeMaterial.preview_render_type = "CUBE"
-        planeMaterial.diffuse_color = (0.2, 0.2, 0.2)
-        planeMaterial.specular_color = (0.604, 0.465, 0.136)
-        planeMaterial.specular_intensity = 0.3
-        planeMaterial.ambient = 0
-        planeMaterial.use_cubic = True
-        planeMaterial.use_transparency = False
-        planeMaterial.alpha = 0
-        planeMaterial.use_transparent_shadows = True
-        return {"FINISHED"}
-
-class INFO_MT_add_scenesetup(bpy.types.Menu):
-    bl_idname = "INFO_MT_plane.add_scene"
-    bl_label = "Lighting Setups"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        layout.operator("planet.add_scene",
-            text="Add scene")
-
-#### REGISTER ####
-def add_object_button(self, context):
-    self.layout.menu("INFO_MT_plane.add_scene", icon="PLUGIN")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_add.append(add_object_button)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_add.remove(add_object_button)
-
-
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/add_scene_elements/scene_objects_cycles.py b/release/scripts/addons_contrib/add_scene_elements/scene_objects_cycles.py
deleted file mode 100644
index de4a883..0000000
--- a/release/scripts/addons_contrib/add_scene_elements/scene_objects_cycles.py
+++ /dev/null
@@ -1,261 +0,0 @@
-'''
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Scene Lighting Presets",
-    "author": "meta-androcto",
-    "version": (0,1),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tool Shelf > Scene Lighting Presets",
-    "description": "Creates Scenes with Lighting presets",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/",
-    "tracker_url": "",
-    "category": "Object"}
-'''	
-import bpy, mathutils, math
-from math import pi
-from bpy.props import *
-from mathutils import Vector
-
-class add_scene(bpy.types.Operator):
-    bl_idname = "objects_cycles.add_scene"
-    bl_label = "Create test scene"
-    bl_description = "Cycles Scene with Objects"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-	
-# add new scene
-
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        bpy.context.scene.render.engine='CYCLES'
-        scene.name = "scene_object_cycles"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("Cycles_Object_World")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        world.light_settings.use_ambient_occlusion = True
-        world.light_settings.ao_factor = 0.25
-# add camera
-        bpy.ops.object.camera_add(location = (7.48113,-6.50764,5.34367), rotation = (1.109319,0.010817,0.814928))
-        cam = bpy.context.active_object.data
-        cam.lens = 35
-        cam.draw_size = 0.1
-        
-# add point lamp
-        bpy.ops.object.lamp_add(type="POINT", location = (4.07625,1.00545,5.90386), rotation =(0.650328,0.055217,1.866391))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Point_Right"
-        lamp1.energy = 1.0
-        lamp1.distance = 30.0
-        lamp1.shadow_method = "RAY_SHADOW"
-        lamp1.use_sphere = True        
-# add point lamp2
-        bpy.ops.object.lamp_add(type="POINT", location = (-0.57101,-4.24586,5.53674), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Point_Left"
-        lamp2.energy = 1.0
-        lamp2.distance = 30.0
-#        lamp2.shadow_method = "RAY_SHADOW"
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-
-# add cube
-        bpy.ops.mesh.primitive_cube_add()
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.mesh.subdivide(number_cuts=2)
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.modifier_add(type='BEVEL')
-        bpy.ops.object.modifier_add(type='SUBSURF')
-        bpy.ops.object.shade_smooth()
-
-
-        cube = bpy.context.active_object
-# add new material
-
-        cubeMaterial = blend_data.materials.new("Cycles_Cube_Material")
-        bpy.ops.object.material_slot_add()
-        cube.material_slots[0].material = cubeMaterial
-
-            
-#Material settings
-# Diffuse
-        cubeMaterial.preview_render_type = "CUBE"
-        cubeMaterial.diffuse_color = (1.000, 0.373, 0.00)
-        cubeMaterial.diffuse_shader  = 'OREN_NAYAR' 
-        cubeMaterial.diffuse_intensity = 1.0
-        cubeMaterial.roughness = 0.09002
-# Specular
-        cubeMaterial.specular_color = (1.000, 0.800, 0.136)
-        cubeMaterial.specular_shader = "PHONG"
-        cubeMaterial.specular_intensity = 1.0
-        cubeMaterial.specular_hardness = 511.0
-# Shading
-        cubeMaterial.ambient = 1.00
-        cubeMaterial.use_cubic = False
-# Transparency
-        cubeMaterial.use_transparency = False
-        cubeMaterial.alpha = 0
-# Mirror
-        cubeMaterial.raytrace_mirror.use = True
-        cubeMaterial.mirror_color = (1.000, 0.793, 0.0)
-        cubeMaterial.raytrace_mirror.reflect_factor = 0.394
-        cubeMaterial.raytrace_mirror.fresnel = 2.0
-        cubeMaterial.raytrace_mirror.fresnel_factor = 1.641
-        cubeMaterial.raytrace_mirror.fade_to = "FADE_TO_SKY"
-        cubeMaterial.raytrace_mirror.gloss_anisotropic = 1.0
-# Shadow
-        cubeMaterial.use_transparent_shadows = True
-## Cycles ##
-
-        cubeMaterial.use_nodes = True
-
-# Add a texture
-        cubetex = blend_data.textures.new("CloudTex", type='CLOUDS')
-        cubetex.noise_type = 'SOFT_NOISE'
-        cubetex.noise_scale = 0.25
-        mtex = cubeMaterial.texture_slots.add()
-        mtex.texture = cubetex
-        mtex.texture_coords = 'ORCO'
-        mtex.scale = (0.800, 0.800, 0.800)
-        mtex.use_map_mirror = True
-        mtex.mirror_factor = 0.156
-        mtex.use_map_color_diffuse = True
-        mtex.diffuse_color_factor = 0.156
-        mtex.use_map_normal = True
-        mtex.normal_factor = 0.010
-        mtex.blend_type = "ADD"
-        mtex.use_rgb_to_intensity = True
-        mtex.color = (1.000, 0.207, 0.000)
-#add monkey #
-        bpy.ops.mesh.primitive_monkey_add(location = (-0.32639,0.08901,1.49976))
-        bpy.ops.transform.rotate(value=(1.15019), axis=(0, 0, 1))
-        bpy.ops.transform.rotate(value=(-0.683882), axis=(0, 1, 0))
-        bpy.ops.object.modifier_add(type='SUBSURF')
-        bpy.ops.object.shade_smooth()
-        monkey = bpy.context.active_object
-# add new material
-
-        monkeyMaterial = blend_data.materials.new("Cycles_Monkey_Material")
-        bpy.ops.object.material_slot_add()
-        monkey.material_slots[0].material = monkeyMaterial
-
-#Material settings
-        monkeyMaterial.preview_render_type = "MONKEY"
-        monkeyMaterial.diffuse_color = (0.239, 0.288, 0.288)
-        monkeyMaterial.specular_color = (0.604, 0.465, 0.136)
-        monkeyMaterial.diffuse_shader    = 'LAMBERT' 
-        monkeyMaterial.diffuse_intensity = 1.0 
-        monkeyMaterial.specular_intensity = 0.3
-        monkeyMaterial.ambient = 0
-        monkeyMaterial.type = 'SURFACE'
-        monkeyMaterial.use_cubic = True
-        monkeyMaterial.use_transparency = False
-        monkeyMaterial.alpha = 0
-        monkeyMaterial.use_transparent_shadows = True
-        monkeyMaterial.raytrace_mirror.use = True
-        monkeyMaterial.raytrace_mirror.reflect_factor = 0.65
-        monkeyMaterial.raytrace_mirror.fade_to = "FADE_TO_MATERIAL"
-        monkeyMaterial.use_nodes=True
-# add plane
-
-        bpy.ops.mesh.primitive_plane_add(location = (0.0,0.0,-1.0))
-        bpy.ops.transform.rotate(value=(-0.820305), axis=(0, 0, 1))
-        bpy.ops.transform.resize(value=(22.0, 22.0, 0.0))
-        bpy.ops.object.transform_apply(location=False, rotation=False, scale=True)
-
-        plane = bpy.context.active_object
-# add new material
-
-        planeMaterial = blend_data.materials.new("Cycles_Plane_Material")
-        bpy.ops.object.material_slot_add()
-        plane.material_slots[0].material = planeMaterial
-
-            
-#Material settings
-        planeMaterial.preview_render_type = "CUBE"
-        planeMaterial.diffuse_color = (0.2, 0.2, 0.2)
-        planeMaterial.specular_color = (0.604, 0.465, 0.136)
-        planeMaterial.specular_intensity = 0.3
-        planeMaterial.ambient = 0
-        planeMaterial.use_cubic = True
-        planeMaterial.use_transparency = False
-        planeMaterial.alpha = 0
-        planeMaterial.use_transparent_shadows = True
-        mats = bpy.data.materials
-        sc = bpy.context.scene
-        planeMaterial.use_nodes=True
-        TreeNodes=planeMaterial.node_tree
-        links = TreeNodes.links
-        shader = TreeNodes.nodes.new('BSDF_GLOSSY') 
-        return {'FINISHED'}
-class INFO_MT_add_scenesetup(bpy.types.Menu):
-    bl_idname = "INFO_MT_objects_cycles.add_scene"
-    bl_label = "Lighting Setups"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        layout.operator("light.add_scene",
-            text="Add scene")
-
-#### REGISTER ####
-def menu_func(self, context):
-    self.layout.menu("INFO_MT_objects_cycles.add_scene", icon="PLUGIN")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_add.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_add.remove(menu_func)
-
-
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/anim_selection_sets.py b/release/scripts/addons_contrib/anim_selection_sets.py
deleted file mode 100644
index 7c95e56..0000000
--- a/release/scripts/addons_contrib/anim_selection_sets.py
+++ /dev/null
@@ -1,353 +0,0 @@
- #  ***** BEGIN GPL LICENSE BLOCK *****
- #
- #  This program is free software; you can redistribute it and/or
- #  modify it under the terms of the GNU General Public License
- #  as published by the Free Software Foundation; either version 2
- #  of the License, or (at your option) any later version.
- #
- #  This program is distributed in the hope that it will be useful,
- #  but WITHOUT ANY WARRANTY; without even the implied warranty of
- #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- #  GNU General Public License for more details.
- #
- #  You should have received a copy of the GNU General Public License
- #  along with this program; if not, see <http://www.gnu.org/licenses/>
- #  and write to the Free Software Foundation, Inc., 51 Franklin Street, 
- #  Fifth Floor, Boston, MA  02110-1301, USA..
- #
- #  The Original Code is Copyright (C) 2012 Blender Foundation ###
- #  All rights reserved.
- #
- #
- #  The Original Code is: all of this file.
- #
- #  Contributor(s): Dan Eicher.
- #
- #  ***** END GPL LICENSE BLOCK *****
-
-# <pep8 compliant>
-
-import string
-import bpy
-
-bl_info = {
-  "name": "Selection Set",
-  "author": "Dan Eicher",
-  "version": (0, 1, 0),
-  "blender": (2, 6, 3),
-  "location": "Properties -> Object Data -> Selection Sets",
-  "description": "Selection Sets to select groups of bones",
-  "warning": "Proxy armatures need to export sets and run generated script on re-opening file",
-  "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Animation/SelectionSets",
-  "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=31492",
-  "category": "Animation"
-}
-
-
-script_template = '''# generated by ANIM_OT_selection_set_export -- abandon all hope, ye who hand edit!
-
-import bpy
-
-def selection_set_import():
-    arm = bpy.data.armatures['${name}']
-
-    set_list = [${set_list}
-               ]
-
-    for name, bones in set_list:
-        if arm.selection_sets.find(name) == -1:
-            sel_set = arm.selection_sets.add()
-            sel_set.name = name
-
-            for bone in bones:
-                set_bone = sel_set.bones.add()
-                set_bone.name = bone
-
-
-if __name__ == "__main__":
-    selection_set_import()
-'''
-
-
-def generic_poll(context):
-    return (context.mode == 'POSE' and context.object and context.object.type == 'ARMATURE')
-
-
-def active_selection_set_update_func(self, context):
-    idx = self.active_selection_set
-    if idx < -1 or idx >= len(self.selection_sets):
-        self.active_selection_set = -1
-        raise IndexError('Armature.active_selection_set: out of range')
-
-
-class SelectionSetBone(bpy.types.PropertyGroup):
-    name = bpy.props.StringProperty()
-
-
-class SelectionSet(bpy.types.PropertyGroup):
-    name = bpy.props.StringProperty(options={'LIBRARY_EDITABLE'})
-    bones = bpy.props.CollectionProperty(type=SelectionSetBone)
-
-
-class ANIM_OT_selection_set_add(bpy.types.Operator):
-    """Add a new selection set"""
-    bl_idname = "anim.selection_set_add"
-    bl_label = "Selection Set Add"
-
-    @classmethod
-    def poll(cls, context):
-        return generic_poll(context)
-
-    def execute(self, context):
-        arm = context.active_object.data
-
-        tmp_name = name = 'Set'
-        name_sub = 1
-        while arm.selection_sets.find(name) != -1:
-            name = tmp_name + ' ' + str(name_sub)
-            name_sub += 1
-
-        sel_set = arm.selection_sets.add()
-        sel_set.name = name
-
-        arm.active_selection_set = arm.selection_sets.find(name)
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_remove(bpy.types.Operator):
-    """Remove the active selection set"""
-    bl_idname = "anim.selection_set_remove"
-    bl_label = "Selection Set Remove"
-
-    @classmethod
-    def poll(cls, context):
-        arm = context.active_object.data
-        return (generic_poll(context) and arm.active_selection_set != -1)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        active_index = arm.active_selection_set
-
-        arm.selection_sets.remove(active_index)
-
-        if active_index >= len(arm.selection_sets):
-            arm.active_selection_set = len(arm.selection_sets) - 1
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_assign(bpy.types.Operator):
-    """Add selected bones to the active selection set"""
-    bl_idname = "anim.selection_set_assign"
-    bl_label = "Selection Set Assign"
-
-    @classmethod
-    def poll(cls, context):
-        arm = context.active_object.data
-        return (generic_poll(context) and arm.active_selection_set != -1)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        sel_set = arm.selection_sets[arm.active_selection_set]
-        bones = [bone for bone in arm.bones if bone.select]
-
-        for bone in bones:
-            if sel_set.bones.find(bone.name) == -1:
-                set_bone = sel_set.bones.add()
-                set_bone.name = bone.name
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_unassign(bpy.types.Operator):
-    """Remove selected bones from the active selection set"""
-    bl_idname = "anim.selection_set_unassign"
-    bl_label = "Selection Set Unassign"
-
-    @classmethod
-    def poll(cls, context):
-        arm = context.active_object.data
-        return (generic_poll(context) and arm.active_selection_set != -1)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        sel_set = arm.selection_sets[arm.active_selection_set]
-        bones = [bone for bone in arm.bones if bone.select]
-
-        for bone in bones:
-            bone_index = sel_set.bones.find(bone.name)
-            if bone_index != -1:
-                sel_set.bones.remove(bone_index)
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_select(bpy.types.Operator):
-    """Select bones in selection set"""
-    bl_idname = "anim.selection_set_select"
-    bl_label = "Selection Set Select Bones"
-
-    @classmethod
-    def poll(cls, context):
-        arm = context.active_object.data
-        return (generic_poll(context) and arm.active_selection_set != -1)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        sel_set = arm.selection_sets[arm.active_selection_set]
-
-        for bone in sel_set.bones:
-            try:
-                arm.bones[bone.name].select = True
-            except:
-                bone_index = sel_set.bones.find(bone.name)
-                sel_set.bones.remove(bone_index)
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_deselect(bpy.types.Operator):
-    """Deselect bones in selection set"""
-    bl_idname = "anim.selection_set_deselect"
-    bl_label = "Selection Set Deselect Bones"
-
-    @classmethod
-    def poll(cls, context):
-        arm = context.active_object.data
-        return (generic_poll(context) and arm.active_selection_set != -1)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        sel_set = arm.selection_sets[arm.active_selection_set]
-
-        for bone in sel_set.bones:
-            try:
-                arm.bones[bone.name].select = False
-            except:
-                bone_index = sel_set.bones.find(bone.name)
-                sel_set.bones.remove(bone_index)
-
-        return {'FINISHED'}
-
-
-class ANIM_OT_selection_set_export(bpy.types.Operator):
-    """Export selection set data to a python script"""
-    bl_idname = "anim.selection_set_export"
-    bl_label = "Selection Set Export"
-
-    @classmethod
-    def poll(cls, context):
-        return generic_poll(context)
-
-    def execute(self, context):
-        arm = context.active_object.data
-        set_script = string.Template(script_template)
-        set_list = ""
-
-        for sel_set in arm.selection_sets:
-            set_bones = ""
-            for bone in sel_set.bones:
-                set_bones += "'" + bone.name + "',"
-            set_list += "\n                ('{name}', [{bones}]),".format(name=sel_set.name, bones=set_bones)
-
-        try:
-            script_file = bpy.data.texts['{arm.name}SelectionSetImport.py'.format(arm=arm)]
-        except:
-            script_file = bpy.data.texts.new('{arm.name}SelectionSetImport.py'.format(arm=arm))
-
-        script_file.clear()
-        script_file.write(set_script.substitute(name=arm.name, set_list=set_list))
-
-        return {'FINISHED'}
-
-
-class DATA_PT_bone_sets(bpy.types.Panel):
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "data"
-    bl_label = "Selection Sets"
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type == 'ARMATURE' and context.object.pose)
-
-    def draw(self, context):
-        layout = self.layout
-        ob = context.object
-        arm = ob.data
-        sel_set = None
-
-        if arm.active_selection_set != -1:
-            try:
-                sel_set = arm.selection_sets[arm.active_selection_set]
-            except:
-                pass
-
-        row = layout.row()
-
-        row.template_list(arm, "selection_sets", arm, "active_selection_set",
-                          rows=(5 if len(arm.selection_sets) else 2))
-
-        col = row.column(align=True)
-        col.operator("anim.selection_set_add", icon='ZOOMIN', text="")
-        col.operator("anim.selection_set_remove", icon='ZOOMOUT', text="")
-
-        if sel_set:
-            col = layout.column()
-            col.prop(sel_set, "name", text="Name")
-
-        row = layout.row()
-
-        sub = row.row(align=True)
-        sub.operator("anim.selection_set_assign", text="Assign")
-        sub.operator("anim.selection_set_unassign", text="Remove")
-
-        sub = row.row(align=True)
-        sub.operator("anim.selection_set_select", text="Select")
-        sub.operator("anim.selection_set_deselect", text="Deselect")
-
-        row = layout.row()
-        row.operator("anim.selection_set_export", text="Export Selection Sets")
-
-
-def register():
-    bpy.utils.register_class(SelectionSetBone)
-    bpy.utils.register_class(SelectionSet)
-    bpy.utils.register_class(ANIM_OT_selection_set_add)
-    bpy.utils.register_class(ANIM_OT_selection_set_remove)
-    bpy.utils.register_class(ANIM_OT_selection_set_assign)
-    bpy.utils.register_class(ANIM_OT_selection_set_unassign)
-    bpy.utils.register_class(ANIM_OT_selection_set_select)
-    bpy.utils.register_class(ANIM_OT_selection_set_deselect)
-    bpy.utils.register_class(ANIM_OT_selection_set_export)
-    bpy.utils.register_class(DATA_PT_bone_sets)
-
-    bpy.types.Armature.selection_sets = bpy.props.CollectionProperty(type=SelectionSet,
-                                            name="Selection Sets",
-                                            description="Collection of bones to be selected")
-
-    bpy.types.Armature.active_selection_set = bpy.props.IntProperty(name="Active Selection Set",
-                                                                    default=-1,
-                                                                    options={'LIBRARY_EDITABLE'},
-                                                                    update=active_selection_set_update_func)
-
-
-def unregister():
-    del bpy.types.Armature.selection_sets
-    del bpy.types.Armature.active_selection_set
-
-    bpy.utils.unregister_class(SelectionSet)
-    bpy.utils.unregister_class(SelectionSetBone)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_add)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_remove)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_assign)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_unassign)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_select)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_deselect)
-    bpy.utils.unregister_class(ANIM_OT_selection_set_export)
-    bpy.utils.unregister_class(DATA_PT_bone_sets)
-
-if __name__ == "__main__":
-    register()
-
diff --git a/release/scripts/addons_contrib/animation_motion_trail.py b/release/scripts/addons_contrib/animation_motion_trail.py
deleted file mode 100644
index 1d8916c..0000000
--- a/release/scripts/addons_contrib/animation_motion_trail.py
+++ /dev/null
@@ -1,1740 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-
-bl_info = {
-    'name': "Motion Trail",
-    'author': "Bart Crouch",
-    'version': (3, 1, 1),
-    'blender': (2, 6, 1),
-    'location': "View3D > Toolbar > Motion Trail tab",
-    'warning': "",
-    'description': "Display and edit motion trails in the 3d-view",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/"\
-        "Py/Scripts/Animation/Motion_Trail",
-    'tracker_url': "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=26374",
-    'category': 'Animation'}
-
-
-import bgl
-import blf
-import bpy
-from bpy_extras import view3d_utils
-import math
-import mathutils
-
-
-# fake fcurve class, used if no fcurve is found for a path
-class fake_fcurve():
-    def __init__(self, object, index, rotation=False, scale=False):
-        # location
-        if not rotation and not scale:
-            self.loc = object.location[index]
-        # scale
-        elif scale:
-            self.loc = object.scale[index]
-        # rotation
-        elif rotation == 'QUATERNION':
-            self.loc = object.rotation_quaternion[index]
-        elif rotation == 'AXIS_ANGLE':
-            self.loc = object.rotation_axis_angle[index]
-        else:
-            self.loc = object.rotation_euler[index]
-        self.keyframe_points = []
-    
-    def evaluate(self, frame):
-        return(self.loc)
-    
-    def range(self):
-        return([])
-
-
-# get location curves of the given object
-def get_curves(object, child=False):
-    if object.animation_data and object.animation_data.action:
-        action = object.animation_data.action
-        if child:
-            # posebone
-            curves = [fc for fc in action.fcurves if len(fc.data_path)>=14 \
-            and fc.data_path[-9:]=='.location' and \
-            child.name in fc.data_path.split("\"")]
-        else:
-            # normal object
-            curves = [fc for fc in action.fcurves if \
-            fc.data_path == 'location']
-    elif object.animation_data and object.animation_data.use_nla:
-        curves = []
-        strips = []
-        for track in object.animation_data.nla_tracks:
-            not_handled = [s for s in track.strips]
-            while not_handled:
-                current_strip = not_handled.pop(-1)
-                if current_strip.action:
-                    strips.append(current_strip)
-                if current_strip.strips:
-                    # meta strip
-                    not_handled += [s for s in current_strip.strips]
-        
-        for strip in strips:
-            if child:
-                # posebone
-                curves = [fc for fc in strip.action.fcurves if \
-                len(fc.data_path)>=14 and fc.data_path[-9:]=='.location' \
-                and child.name in fc.data_path.split("\"")]
-            else:
-                # normal object
-                curves = [fc for fc in strip.action.fcurves if \
-                fc.data_path == 'location']
-            if curves:
-                # use first strip with location fcurves
-                break
-    else:
-        # should not happen?
-        curves = []
-    
-    # ensure we have three curves per object
-    fcx = None
-    fcy = None
-    fcz = None
-    for fc in curves:
-        if fc.array_index == 0:
-            fcx = fc
-        elif fc.array_index == 1:
-            fcy = fc
-        elif fc.array_index == 2:
-            fcz = fc
-    if fcx == None:
-        fcx = fake_fcurve(object, 0)
-    if fcy == None:
-        fcy = fake_fcurve(object, 1)
-    if fcz == None:
-        fcz = fake_fcurve(object, 2)
-
-    return([fcx, fcy, fcz])
-
-
-# turn screen coordinates (x,y) into world coordinates vector
-def screen_to_world(context, x, y):
-    depth_vector = view3d_utils.region_2d_to_vector_3d(\
-        context.region, context.region_data, [x,y])
-    vector = view3d_utils.region_2d_to_location_3d(\
-        context.region, context.region_data, [x,y], depth_vector)
-    
-    return(vector)
-
-
-# turn 3d world coordinates vector into screen coordinate integers (x,y)
-def world_to_screen(context, vector):
-    prj = context.region_data.perspective_matrix * \
-        mathutils.Vector((vector[0], vector[1], vector[2], 1.0))
-    width_half = context.region.width / 2.0
-    height_half = context.region.height / 2.0
-
-    x = int(width_half + width_half * (prj.x / prj.w))
-    y = int(height_half + height_half * (prj.y / prj.w))
-    
-    # correction for corner cases in perspective mode
-    if prj.w < 0:
-        if x < 0:
-            x = context.region.width * 2
-        else:
-            x = context.region.width * -2
-        if y < 0:
-            y = context.region.height * 2
-        else:
-            y = context.region.height * -2
-    
-    return(x, y)
-
-
-# calculate location of display_ob in worldspace
-def get_location(frame, display_ob, offset_ob, curves):
-    if offset_ob:
-        bpy.context.scene.frame_set(frame)
-        display_mat = getattr(display_ob, "matrix", False)
-        if not display_mat:
-            # posebones have "matrix", objects have "matrix_world"
-            display_mat = display_ob.matrix_world
-        if offset_ob:
-            loc = display_mat.to_translation() + \
-                offset_ob.matrix_world.to_translation()
-        else:
-            loc = display_mat.to_translation()
-    else:
-        fcx, fcy, fcz = curves
-        locx = fcx.evaluate(frame)
-        locy = fcy.evaluate(frame)
-        locz = fcz.evaluate(frame)
-        loc = mathutils.Vector([locx, locy, locz])
-    
-    return(loc)
-
-
-# get position of keyframes and handles at the start of dragging
-def get_original_animation_data(context, keyframes):
-    keyframes_ori = {}
-    handles_ori = {}
-    
-    if context.active_object and context.active_object.mode == 'POSE':
-        armature_ob = context.active_object
-        objects = [[armature_ob, pb, armature_ob] for pb in \
-            context.selected_pose_bones]
-    else:
-        objects = [[ob, False, False] for ob in context.selected_objects]
-    
-    for action_ob, child, offset_ob in objects:
-        if not action_ob.animation_data:
-            continue
-        curves = get_curves(action_ob, child)
-        if len(curves) == 0:
-            continue
-        fcx, fcy, fcz = curves
-        if child:
-            display_ob = child
-        else:
-            display_ob = action_ob
-        
-        # get keyframe positions
-        frame_old = context.scene.frame_current
-        keyframes_ori[display_ob.name] = {}
-        for frame in keyframes[display_ob.name]:
-            loc = get_location(frame, display_ob, offset_ob, curves)
-            keyframes_ori[display_ob.name][frame] = [frame, loc]
-        
-        # get handle positions
-        handles_ori[display_ob.name] = {}
-        for frame in keyframes[display_ob.name]:
-            handles_ori[display_ob.name][frame] = {}
-            left_x = [frame, fcx.evaluate(frame)]
-            right_x = [frame, fcx.evaluate(frame)]
-            for kf in fcx.keyframe_points:
-                if kf.co[0] == frame:
-                    left_x = kf.handle_left[:]
-                    right_x = kf.handle_right[:]
-                    break
-            left_y = [frame, fcy.evaluate(frame)]
-            right_y = [frame, fcy.evaluate(frame)]
-            for kf in fcy.keyframe_points:
-                if kf.co[0] == frame:
-                    left_y = kf.handle_left[:]
-                    right_y = kf.handle_right[:]
-                    break
-            left_z = [frame, fcz.evaluate(frame)]
-            right_z = [frame, fcz.evaluate(frame)]
-            for kf in fcz.keyframe_points:
-                if kf.co[0] == frame:
-                    left_z = kf.handle_left[:]
-                    right_z = kf.handle_right[:]
-                    break
-            handles_ori[display_ob.name][frame]["left"] = [left_x, left_y,
-                left_z]
-            handles_ori[display_ob.name][frame]["right"] = [right_x, right_y,
-                right_z]
-        
-        if context.scene.frame_current != frame_old:
-            context.scene.frame_set(frame_old)
-    
-    return(keyframes_ori, handles_ori)
-
-
-# callback function that calculates positions of all things that need be drawn
-def calc_callback(self, context):
-    if context.active_object and context.active_object.mode == 'POSE':
-        armature_ob = context.active_object
-        objects = [[armature_ob, pb, armature_ob] for pb in \
-            context.selected_pose_bones]
-    else:
-        objects = [[ob, False, False] for ob in context.selected_objects]
-    if objects == self.displayed:
-        selection_change = False
-    else:
-        selection_change = True
-    
-    if self.lock and not selection_change and \
-    context.region_data.perspective_matrix == self.perspective and not \
-    context.window_manager.motion_trail.force_update:
-        return
-    
-    # dictionaries with key: objectname
-    self.paths = {} # value: list of lists with x, y, color
-    self.keyframes = {} # value: dict with frame as key and [x,y] as value
-    self.handles = {} # value: dict of dicts
-    self.timebeads = {} # value: dict with frame as key and [x,y] as value
-    self.click = {} # value: list of lists with frame, type, loc-vector
-    if selection_change:
-        # value: editbone inverted rotation matrix or None
-        self.edit_bones = {}
-    if selection_change or not self.lock or context.window_manager.\
-    motion_trail.force_update:
-        # contains locations of path, keyframes and timebeads
-        self.cached = {"path":{}, "keyframes":{}, "timebeads_timing":{},
-            "timebeads_speed":{}}
-    if self.cached["path"]:
-        use_cache = True
-    else:
-        use_cache = False
-    self.perspective = context.region_data.perspective_matrix.copy()
-    self.displayed = objects # store, so it can be checked next time
-    context.window_manager.motion_trail.force_update = False
-   
-    global_undo = context.user_preferences.edit.use_global_undo
-    context.user_preferences.edit.use_global_undo = False
-    
-    for action_ob, child, offset_ob in objects:
-        if selection_change:
-            if not child:
-                self.edit_bones[action_ob.name] = None
-            else:
-                bpy.ops.object.mode_set(mode='EDIT')
-                editbones = action_ob.data.edit_bones
-                mat = editbones[child.name].matrix.copy().to_3x3().inverted()
-                bpy.ops.object.mode_set(mode='POSE')
-                self.edit_bones[child.name] = mat
-        
-        if not action_ob.animation_data:
-            continue
-        curves = get_curves(action_ob, child)
-        if len(curves) == 0:
-            continue
-        
-        if context.window_manager.motion_trail.path_before == 0:
-            range_min = context.scene.frame_start
-        else:
-            range_min = max(context.scene.frame_start,
-                context.scene.frame_current - \
-                context.window_manager.motion_trail.path_before)
-        if context.window_manager.motion_trail.path_after == 0:
-            range_max = context.scene.frame_end
-        else:
-            range_max = min(context.scene.frame_end,
-                context.scene.frame_current + \
-                context.window_manager.motion_trail.path_after)
-        fcx, fcy, fcz = curves
-        if child:
-            display_ob = child
-        else:
-            display_ob = action_ob
-        
-        # get location data of motion path
-        path = []
-        speeds = []
-        frame_old = context.scene.frame_current
-        step = 11 - context.window_manager.motion_trail.path_resolution
-        
-        if not use_cache:
-            if display_ob.name not in self.cached["path"]:
-                self.cached["path"][display_ob.name] = {}
-        if use_cache and range_min-1 in self.cached["path"][display_ob.name]:
-            prev_loc = self.cached["path"][display_ob.name][range_min-1]
-        else:
-            prev_loc = get_location(range_min-1, display_ob, offset_ob, curves)
-            self.cached["path"][display_ob.name][range_min-1] = prev_loc
-        
-        for frame in range(range_min, range_max + 1, step):
-            if use_cache and frame in self.cached["path"][display_ob.name]:
-                loc = self.cached["path"][display_ob.name][frame]
-            else:
-                loc = get_location(frame, display_ob, offset_ob, curves)
-                self.cached["path"][display_ob.name][frame] = loc
-            if not context.region or not context.space_data:
-                continue
-            x, y = world_to_screen(context, loc)
-            if context.window_manager.motion_trail.path_style == 'simple':
-                path.append([x, y, [0.0, 0.0, 0.0], frame, action_ob, child])
-            else:
-                dloc = (loc - prev_loc).length
-                path.append([x, y, dloc, frame, action_ob, child])
-                speeds.append(dloc)
-                prev_loc = loc
-        
-        # calculate color of path
-        if context.window_manager.motion_trail.path_style == 'speed':
-            speeds.sort()
-            min_speed = speeds[0]
-            d_speed = speeds[-1] - min_speed
-            for i, [x, y, d_loc, frame, action_ob, child] in enumerate(path):
-                relative_speed = (d_loc - min_speed) / d_speed # 0.0 to 1.0
-                red = min(1.0, 2.0 * relative_speed)
-                blue = min(1.0, 2.0 - (2.0 * relative_speed))
-                path[i][2] = [red, 0.0, blue]
-        elif context.window_manager.motion_trail.path_style == 'acceleration':
-            accelerations = []
-            prev_speed = 0.0
-            for i, [x, y, d_loc, frame, action_ob, child] in enumerate(path):
-                accel = d_loc - prev_speed
-                accelerations.append(accel)
-                path[i][2] = accel
-                prev_speed = d_loc
-            accelerations.sort()
-            min_accel = accelerations[0]
-            max_accel = accelerations[-1]
-            for i, [x, y, accel, frame, action_ob, child] in enumerate(path):
-                if accel < 0:
-                    relative_accel = accel / min_accel # values from 0.0 to 1.0
-                    green = 1.0 - relative_accel
-                    path[i][2] = [1.0, green, 0.0]
-                elif accel > 0:
-                    relative_accel = accel / max_accel # values from 0.0 to 1.0
-                    red = 1.0 - relative_accel
-                    path[i][2] = [red, 1.0, 0.0]
-                else:
-                    path[i][2] = [1.0, 1.0, 0.0]
-        self.paths[display_ob.name] = path
-        
-        # get keyframes and handles
-        keyframes = {}
-        handle_difs = {}
-        kf_time = []
-        click = []
-        if not use_cache:
-            if display_ob.name not in self.cached["keyframes"]:
-                self.cached["keyframes"][display_ob.name] = {}
-        
-        for fc in curves:
-            for kf in fc.keyframe_points:
-                # handles for location mode
-                if context.window_manager.motion_trail.mode == 'location':
-                    if kf.co[0] not in handle_difs:
-                        handle_difs[kf.co[0]] = {"left":mathutils.Vector(),
-                            "right":mathutils.Vector(), "keyframe_loc":None}
-                    handle_difs[kf.co[0]]["left"][fc.array_index] = \
-                        (mathutils.Vector(kf.handle_left[:]) - \
-                        mathutils.Vector(kf.co[:])).normalized()[1]
-                    handle_difs[kf.co[0]]["right"][fc.array_index] = \
-                        (mathutils.Vector(kf.handle_right[:]) - \
-                        mathutils.Vector(kf.co[:])).normalized()[1]
-                # keyframes
-                if kf.co[0] in kf_time:
-                    continue
-                kf_time.append(kf.co[0])
-                co = kf.co[0]
-                
-                if use_cache and co in \
-                self.cached["keyframes"][display_ob.name]:
-                    loc = self.cached["keyframes"][display_ob.name][co]
-                else:
-                    loc = get_location(co, display_ob, offset_ob, curves)
-                    self.cached["keyframes"][display_ob.name][co] = loc
-                if handle_difs:
-                    handle_difs[co]["keyframe_loc"] = loc
-                
-                x, y = world_to_screen(context, loc)
-                keyframes[kf.co[0]] = [x, y]
-                if context.window_manager.motion_trail.mode != 'speed':
-                    # can't select keyframes in speed mode
-                    click.append([kf.co[0], "keyframe",
-                        mathutils.Vector([x,y]), action_ob, child])
-        self.keyframes[display_ob.name] = keyframes
-        
-        # handles are only shown in location-altering mode
-        if context.window_manager.motion_trail.mode == 'location' and \
-        context.window_manager.motion_trail.handle_display:
-            # calculate handle positions
-            handles = {}
-            for frame, vecs in handle_difs.items():
-                if child:
-                    # bone space to world space
-                    mat = self.edit_bones[child.name].copy().inverted()
-                    vec_left = vecs["left"] * mat
-                    vec_right = vecs["right"] * mat
-                else:
-                    vec_left = vecs["left"]
-                    vec_right = vecs["right"]
-                if vecs["keyframe_loc"] != None:
-                    vec_keyframe = vecs["keyframe_loc"]
-                else:
-                    vec_keyframe = get_location(frame, display_ob, offset_ob,
-                        curves)
-                x_left, y_left = world_to_screen(context, vec_left*2 + \
-                    vec_keyframe)
-                x_right, y_right = world_to_screen(context, vec_right*2 + \
-                    vec_keyframe)
-                handles[frame] = {"left":[x_left, y_left],
-                    "right":[x_right, y_right]}
-                click.append([frame, "handle_left",
-                    mathutils.Vector([x_left, y_left]), action_ob, child])
-                click.append([frame, "handle_right",
-                    mathutils.Vector([x_right, y_right]), action_ob, child])
-            self.handles[display_ob.name] = handles
-        
-        # calculate timebeads for timing mode
-        if context.window_manager.motion_trail.mode == 'timing':
-            timebeads = {}
-            n = context.window_manager.motion_trail.timebeads * (len(kf_time) \
-                - 1)
-            dframe = (range_max - range_min) / (n + 1)
-            if not use_cache:
-                if display_ob.name not in self.cached["timebeads_timing"]:
-                    self.cached["timebeads_timing"][display_ob.name] = {}
-            
-            for i in range(1, n+1):
-                frame = range_min + i * dframe
-                if use_cache and frame in \
-                self.cached["timebeads_timing"][display_ob.name]:
-                    loc = self.cached["timebeads_timing"][display_ob.name]\
-                        [frame]
-                else:
-                    loc = get_location(frame, display_ob, offset_ob, curves)
-                    self.cached["timebeads_timing"][display_ob.name][frame] = \
-                        loc
-                x, y = world_to_screen(context, loc)
-                timebeads[frame] = [x, y]
-                click.append([frame, "timebead", mathutils.Vector([x,y]),
-                    action_ob, child])
-            self.timebeads[display_ob.name] = timebeads
-        
-        # calculate timebeads for speed mode
-        if context.window_manager.motion_trail.mode == 'speed':
-            angles = dict([[kf, {"left":[], "right":[]}] for kf in \
-                self.keyframes[display_ob.name]])
-            for fc in curves:
-                for i, kf in enumerate(fc.keyframe_points):
-                    if i != 0:
-                        angle = mathutils.Vector([-1, 0]).angle(mathutils.\
-                            Vector(kf.handle_left) - mathutils.Vector(kf.co),
-                            0)
-                        if angle != 0:
-                            angles[kf.co[0]]["left"].append(angle)
-                    if i != len(fc.keyframe_points) - 1:
-                        angle = mathutils.Vector([1, 0]).angle(mathutils.\
-                            Vector(kf.handle_right) - mathutils.Vector(kf.co),
-                            0)
-                        if angle != 0:
-                            angles[kf.co[0]]["right"].append(angle)
-            timebeads = {}
-            kf_time.sort()
-            if not use_cache:
-                if display_ob.name not in self.cached["timebeads_speed"]:
-                    self.cached["timebeads_speed"][display_ob.name] = {}
-            
-            for frame, sides in angles.items():
-                if sides["left"]:
-                    perc = (sum(sides["left"]) / len(sides["left"])) / \
-                        (math.pi / 2)
-                    perc = max(0.4, min(1, perc * 5))
-                    previous = kf_time[kf_time.index(frame) - 1]
-                    bead_frame = frame - perc * ((frame - previous - 2) / 2)
-                    if use_cache and bead_frame in \
-                    self.cached["timebeads_speed"][display_ob.name]:
-                        loc = self.cached["timebeads_speed"][display_ob.name]\
-                            [bead_frame]
-                    else:
-                        loc = get_location(bead_frame, display_ob, offset_ob,
-                            curves)
-                        self.cached["timebeads_speed"][display_ob.name]\
-                            [bead_frame] = loc
-                    x, y = world_to_screen(context, loc)
-                    timebeads[bead_frame] = [x, y]
-                    click.append([bead_frame, "timebead", mathutils.\
-                        Vector([x,y]), action_ob, child])
-                if sides["right"]:
-                    perc = (sum(sides["right"]) / len(sides["right"])) / \
-                        (math.pi / 2)
-                    perc = max(0.4, min(1, perc * 5))
-                    next = kf_time[kf_time.index(frame) + 1]
-                    bead_frame = frame + perc * ((next - frame - 2) / 2)
-                    if use_cache and bead_frame in \
-                    self.cached["timebeads_speed"][display_ob.name]:
-                        loc = self.cached["timebeads_speed"][display_ob.name]\
-                            [bead_frame]
-                    else:
-                        loc = get_location(bead_frame, display_ob, offset_ob,
-                            curves)
-                        self.cached["timebeads_speed"][display_ob.name]\
-                            [bead_frame] = loc
-                    x, y = world_to_screen(context, loc)
-                    timebeads[bead_frame] = [x, y]
-                    click.append([bead_frame, "timebead", mathutils.\
-                        Vector([x,y]), action_ob, child])
-            self.timebeads[display_ob.name] = timebeads
-        
-        # add frame positions to click-list
-        if context.window_manager.motion_trail.frame_display:
-            path = self.paths[display_ob.name]
-            for x, y, color, frame, action_ob, child in path:
-                click.append([frame, "frame", mathutils.Vector([x,y]),
-                    action_ob, child])
-        
-        self.click[display_ob.name] = click
-        
-        if context.scene.frame_current != frame_old:
-            context.scene.frame_set(frame_old)
-    
-    context.user_preferences.edit.use_global_undo = global_undo
-
-
-# draw in 3d-view
-def draw_callback(self, context):
-    # polling
-    if context.mode not in ['OBJECT', 'POSE'] or \
-    context.window_manager.motion_trail.enabled != 1:
-        return
-    
-    # display limits
-    if context.window_manager.motion_trail.path_before != 0:
-        limit_min = context.scene.frame_current - \
-            context.window_manager.motion_trail.path_before
-    else:
-        limit_min = -1e6
-    if context.window_manager.motion_trail.path_after != 0:
-        limit_max = context.scene.frame_current + \
-            context.window_manager.motion_trail.path_after
-    else:
-        limit_max = 1e6
-    
-    # draw motion path
-    bgl.glEnable(bgl.GL_BLEND)
-    bgl.glLineWidth(context.window_manager.motion_trail.path_width)
-    alpha = 1.0 - (context.window_manager.motion_trail.path_transparency / \
-        100.0)
-    if context.window_manager.motion_trail.path_style == 'simple':
-        bgl.glColor4f(0.0, 0.0, 0.0, alpha)
-        for objectname, path in self.paths.items():
-            bgl.glBegin(bgl.GL_LINE_STRIP)
-            for x, y, color, frame, action_ob, child in path:
-                if frame < limit_min or frame > limit_max:
-                    continue
-                bgl.glVertex2i(x, y)
-            bgl.glEnd()
-    else:
-        for objectname, path in self.paths.items():
-            for i, [x, y, color, frame, action_ob, child] in enumerate(path):
-                if frame < limit_min or frame > limit_max:
-                    continue
-                r, g, b = color
-                if i != 0:
-                    prev_path = path[i-1]
-                    halfway = [(x + prev_path[0])/2, (y + prev_path[1])/2]
-                    bgl.glColor4f(r, g, b, alpha)
-                    bgl.glBegin(bgl.GL_LINE_STRIP)
-                    bgl.glVertex2i(int(halfway[0]), int(halfway[1]))
-                    bgl.glVertex2i(x, y)
-                    bgl.glEnd()
-                if i != len(path) - 1:
-                    next_path = path[i+1]
-                    halfway = [(x + next_path[0])/2, (y + next_path[1])/2]
-                    bgl.glColor4f(r, g, b, alpha)
-                    bgl.glBegin(bgl.GL_LINE_STRIP)
-                    bgl.glVertex2i(x, y)
-                    bgl.glVertex2i(int(halfway[0]), int(halfway[1]))
-                    bgl.glEnd()
-    
-    # draw frames
-    if context.window_manager.motion_trail.frame_display:
-        bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
-        bgl.glPointSize(1)
-        bgl.glBegin(bgl.GL_POINTS)
-        for objectname, path in self.paths.items():
-            for x, y, color, frame, action_ob, child in path:
-                if frame < limit_min or frame > limit_max:
-                    continue
-                if self.active_frame and objectname == self.active_frame[0] \
-                and abs(frame - self.active_frame[1]) < 1e-4:
-                    bgl.glEnd()
-                    bgl.glColor4f(1.0, 0.5, 0.0, 1.0)
-                    bgl.glPointSize(3)
-                    bgl.glBegin(bgl.GL_POINTS)
-                    bgl.glVertex2i(x,y)
-                    bgl.glEnd()
-                    bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
-                    bgl.glPointSize(1)
-                    bgl.glBegin(bgl.GL_POINTS)
-                else:
-                    bgl.glVertex2i(x,y)
-        bgl.glEnd()
-    
-    # time beads are shown in speed and timing modes
-    if context.window_manager.motion_trail.mode in ['speed', 'timing']:
-        bgl.glColor4f(0.0, 1.0, 0.0, 1.0)
-        bgl.glPointSize(4)
-        bgl.glBegin(bgl.GL_POINTS)
-        for objectname, values in self.timebeads.items():
-            for frame, coords in values.items():
-                if frame < limit_min or frame > limit_max:
-                    continue
-                if self.active_timebead and \
-                objectname == self.active_timebead[0] and \
-                abs(frame - self.active_timebead[1]) < 1e-4:
-                    bgl.glEnd()
-                    bgl.glColor4f(1.0, 0.5, 0.0, 1.0)
-                    bgl.glBegin(bgl.GL_POINTS)
-                    bgl.glVertex2i(coords[0], coords[1])
-                    bgl.glEnd()
-                    bgl.glColor4f(0.0, 1.0, 0.0, 1.0)
-                    bgl.glBegin(bgl.GL_POINTS)
-                else:
-                    bgl.glVertex2i(coords[0], coords[1])
-        bgl.glEnd()
-    
-    # handles are only shown in location mode
-    if context.window_manager.motion_trail.mode == 'location':
-        # draw handle-lines
-        bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-        bgl.glLineWidth(1)
-        bgl.glBegin(bgl.GL_LINES)
-        for objectname, values in self.handles.items():
-            for frame, sides in values.items():
-                if frame < limit_min or frame > limit_max:
-                    continue
-                for side, coords in sides.items():
-                    if self.active_handle and \
-                    objectname == self.active_handle[0] and \
-                    side == self.active_handle[2] and \
-                    abs(frame - self.active_handle[1]) < 1e-4:
-                        bgl.glEnd()
-                        bgl.glColor4f(.75, 0.25, 0.0, 1.0)
-                        bgl.glBegin(bgl.GL_LINES)
-                        bgl.glVertex2i(self.keyframes[objectname][frame][0],
-                            self.keyframes[objectname][frame][1])
-                        bgl.glVertex2i(coords[0], coords[1])
-                        bgl.glEnd()
-                        bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-                        bgl.glBegin(bgl.GL_LINES)
-                    else:
-                        bgl.glVertex2i(self.keyframes[objectname][frame][0],
-                            self.keyframes[objectname][frame][1])
-                        bgl.glVertex2i(coords[0], coords[1])
-        bgl.glEnd()
-        
-        # draw handles
-        bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-        bgl.glPointSize(4)
-        bgl.glBegin(bgl.GL_POINTS)
-        for objectname, values in self.handles.items():
-            for frame, sides in values.items():
-                if frame < limit_min or frame > limit_max:
-                    continue
-                for side, coords in sides.items():
-                    if self.active_handle and \
-                    objectname == self.active_handle[0] and \
-                    side == self.active_handle[2] and \
-                    abs(frame - self.active_handle[1]) < 1e-4:
-                        bgl.glEnd()
-                        bgl.glColor4f(1.0, 0.5, 0.0, 1.0)
-                        bgl.glBegin(bgl.GL_POINTS)
-                        bgl.glVertex2i(coords[0], coords[1])
-                        bgl.glEnd()
-                        bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-                        bgl.glBegin(bgl.GL_POINTS)
-                    else:
-                        bgl.glVertex2i(coords[0], coords[1])
-        bgl.glEnd()
-        
-    # draw keyframes
-    bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-    bgl.glPointSize(6)
-    bgl.glBegin(bgl.GL_POINTS)
-    for objectname, values in self.keyframes.items():
-        for frame, coords in values.items():
-            if frame < limit_min or frame > limit_max:
-                continue
-            if self.active_keyframe and \
-            objectname == self.active_keyframe[0] and \
-            abs(frame - self.active_keyframe[1]) < 1e-4:
-                bgl.glEnd()
-                bgl.glColor4f(1.0, 0.5, 0.0, 1.0)
-                bgl.glBegin(bgl.GL_POINTS)
-                bgl.glVertex2i(coords[0], coords[1])
-                bgl.glEnd()
-                bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-                bgl.glBegin(bgl.GL_POINTS)
-            else:
-                bgl.glVertex2i(coords[0], coords[1])
-    bgl.glEnd()
-    
-    # draw keyframe-numbers
-    if context.window_manager.motion_trail.keyframe_numbers:
-        blf.size(0, 12, 72)
-        bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-        for objectname, values in self.keyframes.items():
-            for frame, coords in values.items():
-                if frame < limit_min or frame > limit_max:
-                    continue
-                blf.position(0, coords[0] + 3, coords[1] + 3, 0)
-                text = str(frame).split(".")
-                if len(text) == 1:
-                    text = text[0]
-                elif len(text[1]) == 1 and text[1] == "0":
-                    text = text[0]
-                else:
-                    text = text[0] + "." + text[1][0]
-                if self.active_keyframe and \
-                objectname == self.active_keyframe[0] and \
-                abs(frame - self.active_keyframe[1]) < 1e-4:
-                    bgl.glColor4f(1.0, 0.5, 0.0, 1.0)
-                    blf.draw(0, text)
-                    bgl.glColor4f(1.0, 1.0, 0.0, 1.0)
-                else:
-                    blf.draw(0, text)
-    
-    # restore opengl defaults
-    bgl.glLineWidth(1)
-    bgl.glDisable(bgl.GL_BLEND)
-    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-    bgl.glPointSize(1)
-
-
-# change data based on mouse movement
-def drag(context, event, drag_mouse_ori, active_keyframe, active_handle,
-active_timebead, keyframes_ori, handles_ori, edit_bones):
-    # change 3d-location of keyframe
-    if context.window_manager.motion_trail.mode == 'location' and \
-    active_keyframe:
-        objectname, frame, frame_ori, action_ob, child = active_keyframe
-        if child:
-            mat = action_ob.matrix_world.copy().inverted() * \
-                edit_bones[child.name].copy().to_4x4()
-        else:
-            mat = 1
-        
-        mouse_ori_world = screen_to_world(context, drag_mouse_ori[0],
-            drag_mouse_ori[1]) * mat
-        vector = screen_to_world(context, event.mouse_region_x,
-            event.mouse_region_y) * mat
-        d = vector - mouse_ori_world
-        
-        loc_ori_ws = keyframes_ori[objectname][frame][1]
-        loc_ori_bs = loc_ori_ws * mat
-        new_loc = loc_ori_bs + d
-        curves = get_curves(action_ob, child)
-        
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if kf.co[0] == frame:
-                    kf.co[1] = new_loc[i]
-                    kf.handle_left[1] = handles_ori[objectname][frame]\
-                        ["left"][i][1] + d[i]
-                    kf.handle_right[1] = handles_ori[objectname][frame]\
-                        ["right"][i][1] + d[i]
-                    break
-    
-    # change 3d-location of handle
-    elif context.window_manager.motion_trail.mode == 'location' and \
-    active_handle:
-        objectname, frame, side, action_ob, child = active_handle
-        if child:
-            mat = action_ob.matrix_world.copy().inverted() * \
-                edit_bones[child.name].copy().to_4x4()
-        else:
-            mat = 1
-        
-        mouse_ori_world = screen_to_world(context, drag_mouse_ori[0],
-            drag_mouse_ori[1]) * mat
-        vector = screen_to_world(context, event.mouse_region_x,
-            event.mouse_region_y) * mat
-        d = vector - mouse_ori_world
-        curves = get_curves(action_ob, child)
-        
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if kf.co[0] == frame:
-                    if side == "left":
-                        # change handle type, if necessary
-                        if kf.handle_left_type in ['AUTO', 'AUTO_CLAMPED',
-                        'ANIM_CLAMPED']:
-                            kf.handle_left_type = 'ALIGNED'
-                        elif kf.handle_left_type == 'VECTOR':
-                            kf.handle_left_type = 'FREE'
-                        # change handle position(s)
-                        kf.handle_left[1] = handles_ori[objectname][frame]\
-                            ["left"][i][1] + d[i]
-                        if kf.handle_left_type in ['ALIGNED', 'ANIM_CLAMPED',
-                        'AUTO', 'AUTO_CLAMPED']:
-                            dif = (abs(handles_ori[objectname][frame]["right"]\
-                                [i][0] - kf.co[0]) / abs(kf.handle_left[0] - \
-                                kf.co[0])) * d[i]
-                            kf.handle_right[1] = handles_ori[objectname]\
-                                [frame]["right"][i][1] - dif
-                    elif side == "right":
-                        # change handle type, if necessary
-                        if kf.handle_right_type in ['AUTO', 'AUTO_CLAMPED',
-                        'ANIM_CLAMPED']:
-                            kf.handle_left_type = 'ALIGNED'
-                            kf.handle_right_type = 'ALIGNED'
-                        elif kf.handle_right_type == 'VECTOR':
-                            kf.handle_left_type = 'FREE'
-                            kf.handle_right_type = 'FREE'
-                        # change handle position(s)
-                        kf.handle_right[1] = handles_ori[objectname][frame]\
-                            ["right"][i][1] + d[i]
-                        if kf.handle_right_type in ['ALIGNED', 'ANIM_CLAMPED',
-                        'AUTO', 'AUTO_CLAMPED']:
-                            dif = (abs(handles_ori[objectname][frame]["left"]\
-                                [i][0] - kf.co[0]) / abs(kf.handle_right[0] - \
-                                kf.co[0])) * d[i]
-                            kf.handle_left[1] = handles_ori[objectname]\
-                                [frame]["left"][i][1] - dif
-                    break
-    
-    # change position of all keyframes on timeline
-    elif context.window_manager.motion_trail.mode == 'timing' and \
-    active_timebead:
-        objectname, frame, frame_ori, action_ob, child = active_timebead
-        curves = get_curves(action_ob, child)
-        ranges = [val for c in curves for val in c.range()]
-        ranges.sort()
-        range_min = round(ranges[0])
-        range_max = round(ranges[-1])
-        range = range_max - range_min
-        dx_screen = -(mathutils.Vector([event.mouse_region_x,
-            event.mouse_region_y]) - drag_mouse_ori)[0]
-        dx_screen = dx_screen / context.region.width * range
-        new_frame = frame + dx_screen
-        shift_low = max(1e-4, (new_frame - range_min) / (frame - range_min))
-        shift_high = max(1e-4, (range_max - new_frame) / (range_max - frame))
-        
-        new_mapping = {}
-        for i, curve in enumerate(curves):
-            for j, kf in enumerate(curve.keyframe_points):
-                frame_map = kf.co[0]
-                if frame_map < range_min + 1e-4 or \
-                frame_map > range_max - 1e-4:
-                    continue
-                frame_ori = False
-                for f in keyframes_ori[objectname]:
-                    if abs(f - frame_map) < 1e-4:
-                        frame_ori = keyframes_ori[objectname][f][0]
-                        value_ori = keyframes_ori[objectname][f]
-                        break
-                if not frame_ori:
-                    continue
-                if frame_ori <= frame:
-                    frame_new = (frame_ori - range_min) * shift_low + \
-                        range_min
-                else:
-                    frame_new = range_max - (range_max - frame_ori) * \
-                        shift_high
-                frame_new = max(range_min + j, min(frame_new, range_max - \
-                    (len(curve.keyframe_points)-j)+1))
-                d_frame = frame_new - frame_ori
-                if frame_new not in new_mapping:
-                    new_mapping[frame_new] = value_ori
-                kf.co[0] = frame_new
-                kf.handle_left[0] = handles_ori[objectname][frame_ori]\
-                    ["left"][i][0] + d_frame
-                kf.handle_right[0] = handles_ori[objectname][frame_ori]\
-                    ["right"][i][0] + d_frame
-        del keyframes_ori[objectname]
-        keyframes_ori[objectname] = {}
-        for new_frame, value in new_mapping.items():
-            keyframes_ori[objectname][new_frame] = value
-    
-    # change position of active keyframe on the timeline
-    elif context.window_manager.motion_trail.mode == 'timing' and \
-    active_keyframe:
-        objectname, frame, frame_ori, action_ob, child = active_keyframe
-        if child:
-            mat = action_ob.matrix_world.copy().inverted() * \
-                edit_bones[child.name].copy().to_4x4()
-        else:
-            mat = action_ob.matrix_world.copy().inverted()
-        
-        mouse_ori_world = screen_to_world(context, drag_mouse_ori[0],
-            drag_mouse_ori[1]) * mat
-        vector = screen_to_world(context, event.mouse_region_x,
-            event.mouse_region_y) * mat
-        d = vector - mouse_ori_world
-        
-        locs_ori = [[f_ori, coords] for f_mapped, [f_ori, coords] in \
-            keyframes_ori[objectname].items()]
-        locs_ori.sort()
-        direction = 1
-        range = False
-        for i, [f_ori, coords] in enumerate(locs_ori):
-            if abs(frame_ori - f_ori) < 1e-4:
-                if i == 0:
-                    # first keyframe, nothing before it
-                    direction = -1
-                    range = [f_ori, locs_ori[i+1][0]]
-                elif i == len(locs_ori) - 1:
-                    # last keyframe, nothing after it
-                    range = [locs_ori[i-1][0], f_ori]
-                else:
-                    current = mathutils.Vector(coords)
-                    next = mathutils.Vector(locs_ori[i+1][1])
-                    previous = mathutils.Vector(locs_ori[i-1][1])
-                    angle_to_next = d.angle(next - current, 0)
-                    angle_to_previous = d.angle(previous-current, 0)
-                    if angle_to_previous < angle_to_next:
-                        # mouse movement is in direction of previous keyframe
-                        direction = -1
-                    range = [locs_ori[i-1][0], locs_ori[i+1][0]]
-                break
-        direction *= -1 # feels more natural in 3d-view
-        if not range:
-            # keyframe not found, is impossible, but better safe than sorry
-            return(active_keyframe, active_timebead, keyframes_ori)
-        # calculate strength of movement
-        d_screen = mathutils.Vector([event.mouse_region_x,
-            event.mouse_region_y]) - drag_mouse_ori
-        if d_screen.length != 0:
-            d_screen = d_screen.length / (abs(d_screen[0])/d_screen.length*\
-                context.region.width + abs(d_screen[1])/d_screen.length*\
-                context.region.height)
-            d_screen *= direction  # d_screen value ranges from -1.0 to 1.0
-        else:
-            d_screen = 0.0
-        new_frame = d_screen * (range[1] - range[0]) + frame_ori
-        max_frame = range[1]
-        if max_frame == frame_ori:
-            max_frame += 1
-        min_frame = range[0]
-        if min_frame == frame_ori:
-            min_frame -= 1
-        new_frame = min(max_frame - 1, max(min_frame + 1, new_frame))
-        d_frame = new_frame - frame_ori
-        curves = get_curves(action_ob, child)
-        
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if abs(kf.co[0] - frame) < 1e-4:
-                    kf.co[0] = new_frame
-                    kf.handle_left[0] = handles_ori[objectname][frame_ori]\
-                        ["left"][i][0] + d_frame
-                    kf.handle_right[0] = handles_ori[objectname][frame_ori]\
-                        ["right"][i][0] + d_frame
-                    break
-        active_keyframe = [objectname, new_frame, frame_ori, action_ob, child]
-    
-    # change position of active timebead on the timeline, thus altering speed
-    elif context.window_manager.motion_trail.mode == 'speed' and \
-    active_timebead:
-        objectname, frame, frame_ori, action_ob, child = active_timebead
-        if child:
-            mat = action_ob.matrix_world.copy().inverted() * \
-                edit_bones[child.name].copy().to_4x4()
-        else:
-            mat = 1
-        
-        mouse_ori_world = screen_to_world(context, drag_mouse_ori[0],
-            drag_mouse_ori[1]) * mat
-        vector = screen_to_world(context, event.mouse_region_x,
-            event.mouse_region_y) * mat
-        d = vector - mouse_ori_world
-        
-        # determine direction (to next or previous keyframe)
-        curves = get_curves(action_ob, child)
-        fcx, fcy, fcz = curves
-        locx = fcx.evaluate(frame_ori)
-        locy = fcy.evaluate(frame_ori)
-        locz = fcz.evaluate(frame_ori)
-        loc_ori = mathutils.Vector([locx, locy, locz]) # bonespace
-        keyframes = [kf for kf in keyframes_ori[objectname]]
-        keyframes.append(frame_ori)
-        keyframes.sort()
-        frame_index = keyframes.index(frame_ori)
-        kf_prev = keyframes[frame_index - 1]
-        kf_next = keyframes[frame_index + 1]
-        vec_prev = (mathutils.Vector(keyframes_ori[objectname][kf_prev][1]) \
-            * mat - loc_ori).normalized()
-        vec_next = (mathutils.Vector(keyframes_ori[objectname][kf_next][1]) \
-            * mat - loc_ori).normalized()
-        d_normal = d.copy().normalized()
-        dist_to_next = (d_normal - vec_next).length
-        dist_to_prev = (d_normal - vec_prev).length
-        if dist_to_prev < dist_to_next:
-            direction = 1
-        else:
-            direction = -1
-        
-        if (kf_next - frame_ori) < (frame_ori - kf_prev):
-            kf_bead = kf_next
-            side = "left"
-        else:
-            kf_bead = kf_prev
-            side = "right"
-        d_frame = d.length * direction * 2 # *2 to make it more sensitive
-        
-        angles = []
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if abs(kf.co[0] - kf_bead) < 1e-4:
-                    if side == "left":
-                        # left side
-                        kf.handle_left[0] = min(handles_ori[objectname]\
-                            [kf_bead]["left"][i][0] + d_frame, kf_bead - 1)
-                        angle = mathutils.Vector([-1, 0]).angle(mathutils.\
-                            Vector(kf.handle_left) - mathutils.Vector(kf.co),
-                            0)
-                        if angle != 0:
-                            angles.append(angle)
-                    else:
-                        # right side
-                        kf.handle_right[0] = max(handles_ori[objectname]\
-                            [kf_bead]["right"][i][0] + d_frame, kf_bead + 1)
-                        angle = mathutils.Vector([1, 0]).angle(mathutils.\
-                            Vector(kf.handle_right) - mathutils.Vector(kf.co),
-                            0)
-                        if angle != 0:
-                            angles.append(angle)
-                    break
-        
-        # update frame of active_timebead
-        perc = (sum(angles) / len(angles)) / (math.pi / 2)
-        perc = max(0.4, min(1, perc * 5))
-        if side == "left":
-            bead_frame = kf_bead - perc * ((kf_bead - kf_prev - 2) / 2)
-        else:
-            bead_frame = kf_bead + perc * ((kf_next - kf_bead - 2) / 2)
-        active_timebead = [objectname, bead_frame, frame_ori, action_ob, child]
-    
-    return(active_keyframe, active_timebead, keyframes_ori)
-
-
-# revert changes made by dragging
-def cancel_drag(context, active_keyframe, active_handle, active_timebead,
-keyframes_ori, handles_ori, edit_bones):
-    # revert change in 3d-location of active keyframe and its handles
-    if context.window_manager.motion_trail.mode == 'location' and \
-    active_keyframe:
-        objectname, frame, frame_ori, active_ob, child = active_keyframe
-        curves = get_curves(active_ob, child)
-        loc_ori = keyframes_ori[objectname][frame][1]
-        if child:
-            loc_ori = loc_ori * edit_bones[child.name] * \
-                active_ob.matrix_world.copy().inverted()
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if kf.co[0] == frame:
-                    kf.co[1] = loc_ori[i]
-                    kf.handle_left[1] = handles_ori[objectname][frame]\
-                        ["left"][i][1]
-                    kf.handle_right[1] = handles_ori[objectname][frame]\
-                        ["right"][i][1]
-                    break
-    
-    # revert change in 3d-location of active handle
-    elif context.window_manager.motion_trail.mode == 'location' and \
-    active_handle:
-        objectname, frame, side, active_ob, child = active_handle
-        curves = get_curves(active_ob, child)
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if kf.co[0] == frame:
-                    kf.handle_left[1] = handles_ori[objectname][frame]\
-                        ["left"][i][1]
-                    kf.handle_right[1] = handles_ori[objectname][frame]\
-                        ["right"][i][1]
-                    break
-    
-    # revert position of all keyframes and handles on timeline
-    elif context.window_manager.motion_trail.mode == 'timing' and \
-    active_timebead:
-        objectname, frame, frame_ori, active_ob, child = active_timebead
-        curves = get_curves(active_ob, child)
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                for kf_ori, [frame_ori, loc] in keyframes_ori[objectname].\
-                items():
-                    if abs(kf.co[0] - kf_ori) < 1e-4:
-                        kf.co[0] = frame_ori
-                        kf.handle_left[0] = handles_ori[objectname]\
-                            [frame_ori]["left"][i][0]
-                        kf.handle_right[0] = handles_ori[objectname]\
-                            [frame_ori]["right"][i][0]
-                        break
-    
-    # revert position of active keyframe and its handles on the timeline
-    elif context.window_manager.motion_trail.mode == 'timing' and \
-    active_keyframe:
-        objectname, frame, frame_ori, active_ob, child = active_keyframe
-        curves = get_curves(active_ob, child)
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if abs(kf.co[0] - frame) < 1e-4:
-                    kf.co[0] = keyframes_ori[objectname][frame_ori][0]
-                    kf.handle_left[0] = handles_ori[objectname][frame_ori]\
-                        ["left"][i][0]
-                    kf.handle_right[0] = handles_ori[objectname][frame_ori]\
-                        ["right"][i][0]
-                    break
-        active_keyframe = [objectname, frame_ori, frame_ori, active_ob, child]
-    
-    # revert position of handles on the timeline
-    elif context.window_manager.motion_trail.mode == 'speed' and \
-    active_timebead:
-        objectname, frame, frame_ori, active_ob, child = active_timebead
-        curves = get_curves(active_ob, child)
-        keyframes = [kf for kf in keyframes_ori[objectname]]
-        keyframes.append(frame_ori)
-        keyframes.sort()
-        frame_index = keyframes.index(frame_ori)
-        kf_prev = keyframes[frame_index - 1]
-        kf_next = keyframes[frame_index + 1]
-        if (kf_next - frame_ori) < (frame_ori - kf_prev):
-            kf_frame = kf_next
-        else:
-            kf_frame = kf_prev
-        for i, curve in enumerate(curves):
-            for kf in curve.keyframe_points:
-                if kf.co[0] == kf_frame:
-                    kf.handle_left[0] = handles_ori[objectname][kf_frame]\
-                        ["left"][i][0]
-                    kf.handle_right[0] = handles_ori[objectname][kf_frame]\
-                        ["right"][i][0]
-                    break
-        active_timebead = [objectname, frame_ori, frame_ori, active_ob, child]
-    
-    return(active_keyframe, active_timebead)
-
-
-# return the handle type of the active selection
-def get_handle_type(active_keyframe, active_handle):
-    if active_keyframe:
-        objectname, frame, side, action_ob, child = active_keyframe
-        side = "both"
-    elif active_handle:
-        objectname, frame, side, action_ob, child = active_handle
-    else:
-        # no active handle(s)
-        return(False)
-    
-    # properties used when changing handle type
-    bpy.context.window_manager.motion_trail.handle_type_frame = frame
-    bpy.context.window_manager.motion_trail.handle_type_side = side
-    bpy.context.window_manager.motion_trail.handle_type_action_ob = \
-        action_ob.name
-    if child:
-        bpy.context.window_manager.motion_trail.handle_type_child = child.name
-    else:
-        bpy.context.window_manager.motion_trail.handle_type_child = ""
-    
-    curves = get_curves(action_ob, child=child)
-    for c in curves:
-        for kf in c.keyframe_points:
-            if kf.co[0] == frame:
-                if side in ["left", "both"]:
-                    return(kf.handle_left_type)
-                else:
-                    return(kf.handle_right_type)
-    
-    return("AUTO")
-
-
-# turn the given frame into a keyframe
-def insert_keyframe(self, context, frame):
-    objectname, frame, frame, action_ob, child = frame
-    curves = get_curves(action_ob, child)
-    for c in curves:
-        y = c.evaluate(frame)
-        if c.keyframe_points:
-            c.keyframe_points.insert(frame, y)
-    
-    bpy.context.window_manager.motion_trail.force_update = True
-    calc_callback(self, context)
-
-
-# change the handle type of the active selection
-def set_handle_type(self, context):
-    if not context.window_manager.motion_trail.handle_type_enabled:
-        return
-    if context.window_manager.motion_trail.handle_type_old == \
-    context.window_manager.motion_trail.handle_type:
-        # function called because of selection change, not change in type
-        return
-    context.window_manager.motion_trail.handle_type_old = \
-        context.window_manager.motion_trail.handle_type
-    
-    frame = bpy.context.window_manager.motion_trail.handle_type_frame
-    side = bpy.context.window_manager.motion_trail.handle_type_side
-    action_ob = bpy.context.window_manager.motion_trail.handle_type_action_ob
-    action_ob = bpy.data.objects[action_ob]
-    child = bpy.context.window_manager.motion_trail.handle_type_child
-    if child:
-        child = action_ob.pose.bones[child]
-    new_type = context.window_manager.motion_trail.handle_type
-    
-    curves = get_curves(action_ob, child=child)
-    for c in curves:
-        for kf in c.keyframe_points:
-            if kf.co[0] == frame:
-                # align if necessary
-                if side in ["right", "both"] and new_type in \
-                ["AUTO", "AUTO_CLAMPED", "ALIGNED"]:
-                    # change right handle
-                    normal = (kf.co - kf.handle_left).normalized()
-                    size = (kf.handle_right[0] - kf.co[0]) / normal[0]
-                    normal = normal*size + kf.co
-                    kf.handle_right[1] = normal[1]
-                elif side == "left" and new_type in ["AUTO", "AUTO_CLAMPED",
-                "ALIGNED"]:
-                    # change left handle
-                    normal = (kf.co - kf.handle_right).normalized()
-                    size = (kf.handle_left[0] - kf.co[0]) / normal[0]
-                    normal = normal*size + kf.co
-                    kf.handle_left[1] = normal[1]
-                # change type
-                if side in ["left", "both"]:
-                    kf.handle_left_type = new_type
-                if side in ["right", "both"]:
-                    kf.handle_right_type = new_type
-    
-    context.window_manager.motion_trail.force_update = True
-
-
-class MotionTrailOperator(bpy.types.Operator):
-    """Edit motion trails in 3d-view"""
-    bl_idname = "view3d.motion_trail"
-    bl_label = "Motion Trail"
-    
-    _handle1 = None
-    _handle2 = None
-    
-    def modal(self, context, event):
-        if context.window_manager.motion_trail.enabled == -1:
-            context.window_manager.motion_trail.enabled = 0
-            try:
-                context.region.callback_remove(self._handle1)
-            except:
-                pass
-            try:
-                context.region.callback_remove(self._handle2)
-            except:
-                pass
-            context.area.tag_redraw()
-            return {'FINISHED'}
-        
-        if not context.area:
-            return {'PASS_THROUGH'}
-        if not context.region or event.type == 'NONE':
-            context.area.tag_redraw()
-            return {'PASS_THROUGH'}
-        
-        select = context.user_preferences.inputs.select_mouse
-        if not context.active_object or not context.active_object.mode in \
-        ['OBJECT', 'POSE']:
-            if self.drag:
-                self.drag = False
-                self.lock = True
-                context.window_manager.motion_trail.force_update = True
-            # default hotkeys should still work
-            if event.type == self.transform_key and event.value == 'PRESS':
-                if bpy.ops.transform.translate.poll():
-                    bpy.ops.transform.translate('INVOKE_DEFAULT')
-            elif event.type == select + 'MOUSE' and event.value == 'PRESS' \
-            and not self.drag and not event.shift and not event.alt \
-            and not event.ctrl:
-                if bpy.ops.view3d.select.poll():
-                    bpy.ops.view3d.select('INVOKE_DEFAULT')
-            elif event.type == 'LEFTMOUSE' and event.value == 'PRESS' and not\
-            event.alt and not event.ctrl and not event.shift:
-                if eval("bpy.ops."+self.left_action+".poll()"):
-                    eval("bpy.ops."+self.left_action+"('INVOKE_DEFAULT')")
-            return {'PASS_THROUGH'}
-        # check if event was generated within 3d-window, dragging is exception
-        if not self.drag:
-            if not (0 < event.mouse_region_x < context.region.width) or \
-            not (0 < event.mouse_region_y < context.region.height):
-                return {'PASS_THROUGH'}
-        
-        if event.type == self.transform_key and event.value == 'PRESS' and \
-        (self.active_keyframe or self.active_handle or self.active_timebead \
-        or self.active_frame):
-            # override default translate()
-            if not self.drag:
-                # start drag
-                if self.active_frame:
-                    insert_keyframe(self, context, self.active_frame)
-                    self.active_keyframe = self.active_frame
-                    self.active_frame = False
-                self.keyframes_ori, self.handles_ori = \
-                    get_original_animation_data(context, self.keyframes)
-                self.drag_mouse_ori = mathutils.Vector([event.mouse_region_x,
-                    event.mouse_region_y])
-                self.drag = True
-                self.lock = False
-            else:
-                # stop drag
-                self.drag = False
-                self.lock = True
-                context.window_manager.motion_trail.force_update = True
-        elif event.type == self.transform_key and event.value == 'PRESS':
-            # call default translate()
-            if bpy.ops.transform.translate.poll():
-                bpy.ops.transform.translate('INVOKE_DEFAULT')
-        elif (event.type == 'ESC' and self.drag and event.value == 'PRESS') \
-        or (event.type == 'RIGHTMOUSE' and self.drag and event.value == \
-        'PRESS'):
-            # cancel drag
-            self.drag = False
-            self.lock = True
-            context.window_manager.motion_trail.force_update = True
-            self.active_keyframe, self.active_timebead = cancel_drag(context,
-                self.active_keyframe, self.active_handle,
-                self.active_timebead, self.keyframes_ori, self.handles_ori,
-                self.edit_bones)
-        elif event.type == 'MOUSEMOVE' and self.drag:
-            # drag
-            self.active_keyframe, self.active_timebead, self.keyframes_ori = \
-                drag(context, event, self.drag_mouse_ori,
-                self.active_keyframe, self.active_handle,
-                self.active_timebead, self.keyframes_ori, self.handles_ori,
-                self.edit_bones)
-        elif event.type == select + 'MOUSE' and event.value == 'PRESS' and \
-        not self.drag and not event.shift and not event.alt and not \
-        event.ctrl:
-            # select
-            treshold = 10
-            clicked = mathutils.Vector([event.mouse_region_x,
-                event.mouse_region_y])
-            self.active_keyframe = False
-            self.active_handle = False
-            self.active_timebead = False
-            self.active_frame = False
-            context.window_manager.motion_trail.force_update = True
-            context.window_manager.motion_trail.handle_type_enabled = True
-            found = False
-            
-            if context.window_manager.motion_trail.path_before == 0:
-                frame_min = context.scene.frame_start
-            else:
-                frame_min = max(context.scene.frame_start,
-                    context.scene.frame_current - \
-                    context.window_manager.motion_trail.path_before)
-            if context.window_manager.motion_trail.path_after == 0:
-                frame_max = context.scene.frame_end
-            else:
-                frame_max = min(context.scene.frame_end,
-                    context.scene.frame_current + \
-                    context.window_manager.motion_trail.path_after)
-            
-            for objectname, values in self.click.items():
-                if found:
-                    break
-                for frame, type, coord, action_ob, child in values:
-                    if frame < frame_min or frame > frame_max:
-                        continue
-                    if (coord - clicked).length <= treshold:
-                        found = True
-                        if type == "keyframe":
-                            self.active_keyframe = [objectname, frame, frame,
-                                action_ob, child]
-                        elif type == "handle_left":
-                            self.active_handle = [objectname, frame, "left",
-                                action_ob, child]
-                        elif type == "handle_right":
-                            self.active_handle = [objectname, frame, "right",
-                                action_ob, child]
-                        elif type == "timebead":
-                            self.active_timebead = [objectname, frame, frame,
-                                action_ob, child]
-                        elif type == "frame":
-                            self.active_frame = [objectname, frame, frame,
-                                action_ob, child]
-                        break
-            if not found:
-                context.window_manager.motion_trail.handle_type_enabled = False
-                # no motion trail selections, so pass on to normal select()
-                if bpy.ops.view3d.select.poll():
-                    bpy.ops.view3d.select('INVOKE_DEFAULT')
-            else:
-                handle_type = get_handle_type(self.active_keyframe,
-                    self.active_handle)
-                if handle_type:
-                    context.window_manager.motion_trail.handle_type_old = \
-                        handle_type
-                    context.window_manager.motion_trail.handle_type = \
-                        handle_type
-                else:
-                    context.window_manager.motion_trail.handle_type_enabled = \
-                        False
-        elif event.type == 'LEFTMOUSE' and event.value == 'PRESS' and \
-        self.drag:
-            # stop drag
-            self.drag = False
-            self.lock = True
-            context.window_manager.motion_trail.force_update = True
-        elif event.type == 'LEFTMOUSE' and event.value == 'PRESS' and not\
-        event.alt and not event.ctrl and not event.shift:
-            if eval("bpy.ops."+self.left_action+".poll()"):
-                eval("bpy.ops."+self.left_action+"('INVOKE_DEFAULT')")
-        
-        if context.area: # not available if other window-type is fullscreen
-            context.area.tag_redraw()
-        
-        return {'PASS_THROUGH'}
-
-    def invoke(self, context, event):
-        if context.area.type == 'VIEW_3D':
-            # get clashing keymap items
-            select = context.user_preferences.inputs.select_mouse
-            kms = [bpy.context.window_manager.keyconfigs.active.\
-                keymaps['3D View'], bpy.context.window_manager.keyconfigs.\
-                active.keymaps['Object Mode']]
-            kmis = []
-            self.left_action = None
-            self.right_action = None
-            for km in kms:
-                for kmi in km.keymap_items:
-                    if kmi.idname == "transform.translate" and \
-                    kmi.map_type == 'KEYBOARD' and not \
-                    kmi.properties.texture_space:
-                        kmis.append(kmi)
-                        self.transform_key = kmi.type
-                    elif (kmi.type == 'ACTIONMOUSE' and select == 'RIGHT') \
-                    and not kmi.alt and not kmi.any and not kmi.ctrl \
-                    and not kmi.shift:
-                        kmis.append(kmi)
-                        self.left_action = kmi.idname
-                    elif kmi.type == 'SELECTMOUSE' and not kmi.alt and not \
-                    kmi.any and not kmi.ctrl and not kmi.shift:
-                        kmis.append(kmi)
-                        if select == 'RIGHT':
-                            self.right_action = kmi.idname
-                        else:
-                            self.left_action = kmi.idname
-                    elif kmi.type == 'LEFTMOUSE' and not kmi.alt and not \
-                    kmi.any and not kmi.ctrl and not kmi.shift:
-                        kmis.append(kmi)
-                        self.left_action = kmi.idname
-            
-            if context.window_manager.motion_trail.enabled == 0:
-                # enable
-                context.window_manager.motion_trail.enabled = 1
-                self.active_keyframe = False
-                self.active_handle = False
-                self.active_timebead = False
-                self.active_frame = False
-                self.click = {}
-                self.drag = False
-                self.lock = True
-                self.perspective = context.region_data.perspective_matrix
-                self.displayed = []
-                context.window_manager.motion_trail.force_update = True
-                context.window_manager.motion_trail.handle_type_enabled = False
-                self.cached = {"path":{}, "keyframes":{},
-                    "timebeads_timing":{}, "timebeads_speed":{}}
-                
-                for kmi in kmis:
-                    kmi.active = False
-
-                self._handle1 = context.region.callback_add(calc_callback,
-                    (self, context), 'POST_VIEW')
-                self._handle2 = context.region.callback_add(draw_callback,
-                    (self, context), 'POST_PIXEL')
-                if context.area:
-                    context.area.tag_redraw()
-
-                context.window_manager.modal_handler_add(self)
-            else:
-                # disable
-                context.window_manager.motion_trail.enabled = -1
-                for kmi in kmis:
-                    kmi.active = True
-            
-            return {'RUNNING_MODAL'}
-        
-        else:
-            self.report({'WARNING'}, "View3D not found, cannot run operator")
-            return {'CANCELLED'}
-
-
-class MotionTrailPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Motion Trail"
-    bl_options = {'DEFAULT_CLOSED'}
-    @classmethod
-    def poll(cls, context):
-        if not context.active_object:
-            return(False)
-        return(context.active_object.mode in ['OBJECT', 'POSE'])
-    
-    def draw(self, context):
-        col = self.layout.column()
-        if context.window_manager.motion_trail.enabled != 1:
-            col.operator("view3d.motion_trail", text="Enable motion trail")
-        else:
-            col.operator("view3d.motion_trail", text="Disable motion trail")
-        
-        box = self.layout.box()
-        box.prop(context.window_manager.motion_trail, "mode")
-        #box.prop(context.window_manager.motion_trail, "calculate")
-        if context.window_manager.motion_trail.mode in ['timing']:
-            box.prop(context.window_manager.motion_trail, "timebeads")
-        
-        box = self.layout.box()
-        col = box.column()
-        row = col.row()
-        if context.window_manager.motion_trail.path_display:
-            row.prop(context.window_manager.motion_trail, "path_display",
-                icon="DOWNARROW_HLT", text="", emboss=False)
-        else:
-            row.prop(context.window_manager.motion_trail, "path_display",
-                icon="RIGHTARROW", text="", emboss=False)
-        row.label("Path options")
-        if context.window_manager.motion_trail.path_display:
-            col.prop(context.window_manager.motion_trail, "path_style",
-                text="Style")
-            grouped = col.column(align=True)
-            grouped.prop(context.window_manager.motion_trail, "path_width",
-                text="Width")
-            grouped.prop(context.window_manager.motion_trail,
-                "path_transparency", text="Transparency")
-            grouped.prop(context.window_manager.motion_trail,
-                "path_resolution")
-            row = grouped.row(align=True)
-            row.prop(context.window_manager.motion_trail, "path_before")
-            row.prop(context.window_manager.motion_trail, "path_after")
-            col = col.column(align=True)
-            col.prop(context.window_manager.motion_trail, "keyframe_numbers")
-            col.prop(context.window_manager.motion_trail, "frame_display")
-        
-        if context.window_manager.motion_trail.mode in ['location']:
-            box = self.layout.box()
-            col = box.column(align=True)
-            col.prop(context.window_manager.motion_trail, "handle_display",
-                text="Handles")
-            if context.window_manager.motion_trail.handle_display:
-                row = col.row()
-                row.enabled = context.window_manager.motion_trail.\
-                    handle_type_enabled
-                row.prop(context.window_manager.motion_trail, "handle_type")
-
-
-class MotionTrailProps(bpy.types.PropertyGroup):
-    def internal_update(self, context):
-        context.window_manager.motion_trail.force_update = True
-        if context.area:
-            context.area.tag_redraw()
-    
-    # internal use
-    enabled = bpy.props.IntProperty(default=0)
-    force_update = bpy.props.BoolProperty(name="internal use",
-        description="Force calc_callback to fully execute",
-        default=False)
-    handle_type_enabled = bpy.props.BoolProperty(default=False)
-    handle_type_frame = bpy.props.FloatProperty()
-    handle_type_side = bpy.props.StringProperty()
-    handle_type_action_ob = bpy.props.StringProperty()
-    handle_type_child = bpy.props.StringProperty()
-    handle_type_old = bpy.props.EnumProperty(items=(("AUTO", "", ""), 
-        ("AUTO_CLAMPED", "", ""), ("VECTOR", "", ""), ("ALIGNED", "", ""), 
-        ("FREE", "", "")), default='AUTO',)
-    
-    # visible in user interface
-    calculate = bpy.props.EnumProperty(name="Calculate",
-        items=(("fast", "Fast", "Recommended setting, change if the "\
-            "motion path is positioned incorrectly"),
-            ("full", "Full", "Takes parenting and modifiers into account, "\
-            "but can be very slow on complicated scenes")),
-        description="Calculation method for determining locations",
-        default='full',
-        update=internal_update)
-    frame_display = bpy.props.BoolProperty(name="Frames",
-        description="Display frames, \n test",
-        default=True,
-        update=internal_update)
-    handle_display = bpy.props.BoolProperty(name="Display",
-        description="Display handles",
-        default=True,
-        update=internal_update)
-    handle_type = bpy.props.EnumProperty(name="Type",
-        items=(("AUTO", "Automatic", ""),
-            ("AUTO_CLAMPED", "Auto Clamped", ""),
-            ("VECTOR", "Vector", ""),
-            ("ALIGNED", "Aligned", ""),
-            ("FREE", "Free", "")),
-        description="Set handle type for the selected handle",
-        default='AUTO',
-        update=set_handle_type)
-    keyframe_numbers = bpy.props.BoolProperty(name="Keyframe numbers",
-        description="Display keyframe numbers",
-        default=False,
-        update=internal_update)
-    mode = bpy.props.EnumProperty(name="Mode",
-        items=(("location", "Location", "Change path that is followed"),
-            ("speed", "Speed", "Change speed between keyframes"),
-            ("timing", "Timing", "Change position of keyframes on timeline")),
-        description="Enable editing of certain properties in the 3d-view",
-        default='location',
-        update=internal_update)
-    path_after = bpy.props.IntProperty(name="After",
-        description="Number of frames to show after the current frame, "\
-            "0 = display all",
-        default=50,
-        min=0,
-        update=internal_update)
-    path_before = bpy.props.IntProperty(name="Before",
-        description="Number of frames to show before the current frame, "\
-            "0 = display all",
-        default=50,
-        min=0,
-        update=internal_update)
-    path_display = bpy.props.BoolProperty(name="Path options",
-        description="Display path options",
-        default=True)
-    path_resolution = bpy.props.IntProperty(name="Resolution",
-        description="10 is smoothest, but could be "\
-        "slow when adjusting keyframes, handles or timebeads",
-        default=10,
-        min=1,
-        max=10,
-        update=internal_update)
-    path_style = bpy.props.EnumProperty(name="Path style",
-        items=(("acceleration", "Acceleration", "Gradient based on relative "\
-                "acceleration"),
-            ("simple", "Simple", "Black line"),
-            ("speed", "Speed", "Gradient based on relative speed")),
-        description="Information conveyed by path color",
-        default='simple',
-        update=internal_update)
-    path_transparency = bpy.props.IntProperty(name="Path transparency",
-        description="Determines visibility of path",
-        default=0,
-        min=0,
-        max=100,
-        subtype='PERCENTAGE',
-        update=internal_update)
-    path_width = bpy.props.IntProperty(name="Path width",
-        description="Width in pixels",
-        default=1,
-        min=1,
-        soft_max=5,
-        update=internal_update)
-    timebeads = bpy.props.IntProperty(name="Time beads",
-        description="Number of time beads to display per segment",
-        default=5,
-        min=1,
-        soft_max = 10,
-        update=internal_update)
-
-
-classes = [MotionTrailProps,
-    MotionTrailOperator,
-    MotionTrailPanel]
-
-
-def register():
-    for c in classes:
-        bpy.utils.register_class(c)
-    bpy.types.WindowManager.motion_trail = bpy.props.PointerProperty(\
-        type=MotionTrailProps)
-
-
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-    del bpy.types.WindowManager.motion_trail
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/btrace/__init__.py b/release/scripts/addons_contrib/btrace/__init__.py
deleted file mode 100644
index 6b59e3a..0000000
--- a/release/scripts/addons_contrib/btrace/__init__.py
+++ /dev/null
@@ -1,68 +0,0 @@
-#BEGIN GPL LICENSE BLOCK
-
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public License
-#as published by the Free Software Foundation; either version 2
-#of the License, or (at your option) any later version.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
-#GNU General Public License for more details.
-
-#You should have received a copy of the GNU General Public License
-#along with this program; if not, write to the Free Software Foundation,
-#Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-#END GPL LICENCE BLOCK
-
-bl_info = {
-    'name': "Btrace",
-    'author': "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
-    'version': (1, 1, ),
-    'blender': (2, 62),
-    'location': "View3D > Tools",
-    'description': "Tools for converting/animating objects/particles into curves",
-    'warning': "Still under development, bug reports appreciated",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Curve/Btrace",
-    'tracker_url': "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=29563",
-    'category': "Add Curve"
-    }
-
-import bpy
-from .bTrace import *
-import selection_utils
-from bpy.props import FloatProperty, EnumProperty, IntProperty, BoolProperty, FloatVectorProperty
-
-### Define Classes to register
-classes = [
-    TracerProperties,
-    TracerPropertiesMenu,
-    addTracerObjectPanel,
-    OBJECT_OT_convertcurve,
-    OBJECT_OT_objecttrace,
-    OBJECT_OT_objectconnect,
-    OBJECT_OT_writing,
-    OBJECT_OT_particletrace,
-    OBJECT_OT_traceallparticles,
-    OBJECT_OT_curvegrow,
-    OBJECT_OT_reset,
-    OBJECT_OT_fcnoise,
-    OBJECT_OT_meshfollow,
-    OBJECT_OT_materialChango,
-    OBJECT_OT_clearColorblender
-    ]
-
-def register():
-    for c in classes:
-        bpy.utils.register_class(c)
-    bpy.types.WindowManager.curve_tracer = bpy.props.PointerProperty(type=TracerProperties)
-    bpy.types.WindowManager.btrace_menu = bpy.props.PointerProperty(type=TracerPropertiesMenu, update=deselect_others)
-
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-    del bpy.types.WindowManager.curve_tracer
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/btrace/bTrace.py b/release/scripts/addons_contrib/btrace/bTrace.py
deleted file mode 100644
index ae592d0..0000000
--- a/release/scripts/addons_contrib/btrace/bTrace.py
+++ /dev/null
@@ -1,1565 +0,0 @@
-#BEGIN GPL LICENSE BLOCK
-
-#This program is free software; you can redistribute it and/or
-#modify it under the terms of the GNU General Public License
-#as published by the Free Software Foundation; either version 2
-#of the License, or (at your option) any later version.
-
-#This program is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
-#GNU General Public License for more details.
-
-#You should have received a copy of the GNU General Public License
-#along with this program; if not, write to the Free Software Foundation,
-#Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-#END GPL LICENCE BLOCK
-
-bl_info = {
-    'name': "Btrace",
-    'author': "liero, crazycourier, Atom, Meta-Androcto, MacKracken",
-    'version': (1, 1, ),
-    'blender': (2, 62),
-    'location': "View3D > Tools",
-    'description': "Tools for converting/animating objects/particles into curves",
-    'warning': "Still under development, bug reports appreciated",
-    'wiki_url': "",
-    'tracker_url': "http://projects.blender.org/tracker/?func=detail&atid=468&aid=29563&group_id=153",
-    'category': "Add Curve"
-    }
-
-#### TO DO LIST ####
-### [   ]  Add more options to curve radius/modulation plus cyclic/connect curve option
-
-import bpy
-import selection_utils
-from bpy.props import FloatProperty, EnumProperty, IntProperty, BoolProperty, FloatVectorProperty
-
-
-def deselect_others(ob, context):
-    """For tool menu select, deselects others if one selected"""
-    selected = addTracerObjectPanel.selected
-    ob[selected] = False
-    keys = [key for key in ob.keys() if ob[key]]  # all the True keys
-    if len(keys) <= 0:
-        ob[selected] = True  # reselect
-        return None
-    for key in keys:
-        addTracerObjectPanel.selected = key
-        ob[key] = True
-
-
-# Class for properties panel
-class TracerPropertiesMenu(bpy.types.PropertyGroup):
-    """Toolbar show/hide booleans for tool options"""
-    tool_objectTrace = BoolProperty(name="Object Trace", default=False, description="Trace selected mesh object with a curve", update=deselect_others)
-    tool_objectsConnect = BoolProperty(name="Objects Connect", default=False, description="Connect objects with a curve controlled by hooks", update=deselect_others)
-    tool_particleTrace = BoolProperty(name="Particle Trace", default=False, description="Trace particle path with a  curve", update=deselect_others)
-    tool_meshFollow = BoolProperty(name="Mesh Follow", default=False, description="Follow selection items on animated mesh object", update=deselect_others)
-    tool_particleConnect = BoolProperty(name="Particle Connect", default=False, description="Connect particles with a curves and animated over particle lifetime", update=deselect_others)
-    tool_growCurve = BoolProperty(name="Grow Curve", default=False, description="Animate curve bevel over time by keyframing points radius", update=deselect_others)
-    tool_handwrite = BoolProperty(name="Handwriting", default=False, description="Create and Animate curve using the grease pencil", update=deselect_others)
-    tool_fcurve = BoolProperty(name="F-Curve Noise", default=False, description="Add F-Curve noise to selected objects", update=deselect_others)
-    tool_colorblender = BoolProperty(name="Color Blender", default=False, description="Add F-Curve noise to selected objects", update=deselect_others)
-
-
-# Class to define properties
-class TracerProperties(bpy.types.PropertyGroup):
-    """Options for tools"""
-    curve_spline = EnumProperty(name="Spline", items=(("POLY", "Poly", "Use Poly spline type"),  ("NURBS", "Nurbs", "Use Nurbs spline type"), ("BEZIER", "Bezier", "Use Bezier spline type")), description="Choose which type of spline to use when curve is created", default="BEZIER")
-    curve_handle = EnumProperty(name="Handle", items=(("ALIGNED", "Aligned", "Use Aligned Handle Type"), ("AUTOMATIC", "Automatic", "Use Auto Handle Type"), ("FREE_ALIGN", "Free Align", "Use Free Handle Type"), ("VECTOR", "Vector", "Use Vector Handle Type")), description="Choose which type of handle to use when curve is created",  default="VECTOR")
-    curve_resolution = IntProperty(name="Bevel Resolution", min=1, max=32, default=4, description="Adjust the Bevel resolution")
-    curve_depth = FloatProperty(name="Bevel Depth", min=0.0, max=100.0, default=0.1, description="Adjust the Bevel depth")
-    curve_u = IntProperty(name="Resolution U", min=0, max=64, default=12, description="Adjust the Surface resolution")
-    curve_join = BoolProperty(name="Join Curves", default=False, description="Join all the curves after they have been created")
-    curve_smooth = BoolProperty(name="Smooth", default=True, description="Render curve smooth")
-    # Option to Duplicate Mesh
-    object_duplicate = BoolProperty(name="Apply to Copy", default=False, description="Apply curve to a copy of object")
-    # Distort Mesh options
-    distort_modscale = IntProperty(name="Modulation Scale", min=0, max=50, default=2, description="Add a scale to modulate the curve at random points, set to 0 to disable")
-    distort_noise = FloatProperty(name="Mesh Noise", min=0.0, max=50.0, default=0.00, description="Adjust noise added to mesh before adding curve")
-    # Particle Options
-    particle_step = IntProperty(name="Step Size", min=1, max=50, default=5, description="Sample one every this number of frames")
-    particle_auto = BoolProperty(name='Auto Frame Range', default=True, description='Calculate Frame Range from particles life')
-    particle_f_start = IntProperty(name='Start Frame', min=1, max=5000, default=1, description='Start frame')
-    particle_f_end = IntProperty(name='End Frame', min=1, max=5000, default=250, description='End frame')
-    # F-Curve Modifier Properties
-    fcnoise_rot = BoolProperty(name="Rotation", default=False, description="Affect Rotation")
-    fcnoise_loc = BoolProperty(name="Location", default=True, description="Affect Location")
-    fcnoise_scale = BoolProperty(name="Scale", default=False, description="Affect Scale")
-    fcnoise_amp = IntProperty(name="Amp", min=1, max=500, default=5, description="Adjust the amplitude")
-    fcnoise_timescale = FloatProperty(name="Time Scale", min=1, max=500, default=50, description="Adjust the time scale")
-    fcnoise_key = BoolProperty(name="Add Keyframe", default=True, description="Keyframe is needed for tool, this adds a LocRotScale keyframe")
-    show_curve_settings = BoolProperty(name="Curve Settings", default=False, description="Change the curve settings for the created curve")
-    material_settings = BoolProperty(name="Material Settings", default=False, description="Change the material settings for the created curve")
-    particle_settings = BoolProperty(name="Particle Settings", default=False, description="Show the settings for the created curve")
-    animation_settings = BoolProperty(name="Animation Settings", default=False, description="Show the settings for the Animations")
-    distort_curve = BoolProperty(name="Add Distortion", default=False, description="Set options to distort the final curve")
-    connect_noise = BoolProperty(name="F-Curve Noise", default=False, description="Adds F-Curve Noise Modifier to selected objects")
-    settings_objectTrace = BoolProperty(name="Object Trace Settings", default=False, description="Trace selected mesh object with a curve")
-    settings_objectsConnect = BoolProperty(name="Objects Connect Settings", default=False, description="Connect objects with a curve controlled by hooks")
-    settings_objectTrace = BoolProperty(name="Object Trace Settings", default=False, description="Trace selected mesh object with a curve")
-    respect_order = BoolProperty(name="Order", default=False, description="Remember order objects were selected")
-    settings_particleTrace = BoolProperty(name="Particle Trace Settings", default=False, description="Trace particle path with a  curve")
-    settings_particleConnect = BoolProperty(name="Particle Connect Settings", default=False, description="Connect particles with a curves and animated over particle lifetime")
-    settings_growCurve = BoolProperty(name="Grow Curve Settings", default=False, description="Animate curve bevel over time by keyframing points radius")
-    settings_fcurve = BoolProperty(name="F-Curve Settings", default=False, description="F-Curve Settings")
-    settings_toggle = BoolProperty(name="Settings", default=False, description="Toggle Settings")
-    # Animation Options
-    anim_auto = BoolProperty(name='Auto Frame Range', default=True, description='Automatically calculate Frame Range')
-    anim_f_start = IntProperty(name='Start', min=1, max=2500, default=1, description='Start frame / Hidden object')
-    anim_length = IntProperty(name='Duration', min=1, soft_max=1000, max=2500, default=100, description='Animation Length')
-    anim_f_fade = IntProperty(name='Fade After', min=0, soft_max=250, max=2500, default=10, description='Fade after this frames / Zero means no fade')
-    anim_delay = IntProperty(name='Grow', min=0, max=50, default=5, description='Frames it takes a point to grow')
-    anim_tails = BoolProperty(name='Tails on endpoints', default=True, description='Set radius to zero for open splines endpoints')
-    anim_keepr = BoolProperty(name='Keep Radius', default=True, description='Try to keep radius data from original curve')
-    animate = BoolProperty(name="Animate Result", default=False, description='Animate the final curve objects')
-    # Convert to Curve options
-    convert_conti = BoolProperty(name='Continuous', default=True, description='Create a continuous curve using verts from mesh')
-    convert_everyedge = BoolProperty(name='Every Edge', default=False, description='Create a curve from all verts in a mesh')
-    convert_edgetype = EnumProperty(name="Edge Type for Curves",
-        items=(("CONTI", "Continuous", "Create a continuous curve using verts from mesh"),  ("EDGEALL", "All Edges", "Create a curve from every edge in a mesh")),
-        description="Choose which type of spline to use when curve is created", default="CONTI")
-    convert_joinbefore = BoolProperty(name="Join objects before convert", default=False, description='Join all selected mesh to one object before converting to mesh')
-    # Mesh Follow Options
-    fol_edge_select = BoolProperty(name='Edge', default=False, description='Grow from edges')
-    fol_vert_select = BoolProperty(name='Vertex', default=False, description='Grow from verts')
-    fol_face_select = BoolProperty(name='Face', default=True, description='Grow from faces')
-    fol_mesh_type = EnumProperty(name='Mesh type', default='VERTS', description='Mesh feature to draw cruves from', items=(
-        ("VERTS", "Verts", "Draw from Verts"), ("EDGES", "Edges", "Draw from Edges"), ("FACES", "Faces", "Draw from Faces"), ("OBJECT", "Object", "Draw from Object origin")))
-    fol_start_frame = IntProperty(name="Start Frame", min=1, max=2500, default=1, description="Start frame for range to trace")
-    fol_end_frame = IntProperty(name="End Frame", min=1, max=2500, default=250, description="End frame for range to trace")
-    fol_perc_verts = FloatProperty(name="Reduce selection by", min=0.001, max=1.000, default=0.5, description="percentage of total verts to trace")
-    fol_sel_option = EnumProperty(name="Selection type", description="Choose which objects to follow", default="RANDOM", items=(
-        ("RANDOM", "Random", "Follow Random items"),  ("CUSTOM", "Custom Select", "Follow selected items"), ("ALL", "All", "Follow all items")))
-    trace_mat_color = FloatVectorProperty(name="Material Color", description="Choose material color", min=0, max=1, default=(0.0,0.3,0.6), subtype="COLOR")
-    trace_mat_random = BoolProperty(name="Random Color", default=False, description='Make the material colors random')
-
-    # Material custom Properties properties
-    mat_simple_adv_toggle = EnumProperty(name="Material Options", items=(("SIMPLE", "Simple", "Show Simple Material Options"), ("ADVANCED", "Advanced", "Show Advanced Material Options")), description="Choose which Material Options to show", default="SIMPLE")
-    mat_run_color_blender = BoolProperty(name="Run Color Blender", default=False, description="Generate colors from a color scheme")
-    mmColors = bpy.props.EnumProperty(
-        items=(("RANDOM", "Random", "Use random colors"),
-                ("CUSTOM", "Custom", "Use custom colors"),
-                ("BW", "Black/White", "Use Black and White"),
-                ("BRIGHT", "Bright Colors", "Use Bright colors"),
-                ("EARTH", "Earth", "Use Earth colors"),
-                ("GREENBLUE", "Green to Blue", "Use Green to Blue colors")),
-        description="Choose which type of colors the materials uses",
-        default="BRIGHT",
-        name="Define a color palette")
-    # Custom property for how many keyframes to skip
-    mmSkip = bpy.props.IntProperty(name="frames", min=1, max=500, default=20, description="Number of frames between each keyframes")
-    # Custom property to enable/disable random order for the 
-    mmBoolRandom = bpy.props.BoolProperty(name="Random Order", default=False, description="Randomize the order of the colors")
-    # Custom Color properties
-    mmColor1 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.8, 0.8, 0.8), description="Custom Color 1", subtype="COLOR")
-    mmColor2 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.8, 0.8, 0.3), description="Custom Color 2", subtype="COLOR")
-    mmColor3 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.8, 0.5, 0.6), description="Custom Color 3", subtype="COLOR")
-    mmColor4 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.2, 0.8, 0.289), description="Custom Color 4", subtype="COLOR")
-    mmColor5 = bpy.props.FloatVectorProperty(min=0, max=1, default=(1.0, 0.348, 0.8), description="Custom Color 5", subtype="COLOR")
-    mmColor6 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.4, 0.67, 0.8), description="Custom Color 6", subtype="COLOR")
-    mmColor7 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.66, 0.88, 0.8), description="Custom Color 7", subtype="COLOR")
-    mmColor8 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.8, 0.38, 0.22), description="Custom Color 8", subtype="COLOR")
-    # BW Color properties
-    bwColor1 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.0,0.0,0.0), description="Black/White Color 1", subtype="COLOR")
-    bwColor2 = bpy.props.FloatVectorProperty(min=0, max=1, default=(1.0,1.0,1.0), description="Black/White Color 2", subtype="COLOR")
-    # Bright Color properties
-    brightColor1 = bpy.props.FloatVectorProperty(min=0, max=1, default=(1.0, 0.0, 0.75), description="Bright Color 1", subtype="COLOR")
-    brightColor2 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.0,1.0,1.0), description="Bright Color 2", subtype="COLOR")
-    brightColor3 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.0,1.0,0.0), description="Bright Color 3", subtype="COLOR")
-    brightColor4 = bpy.props.FloatVectorProperty(min=0, max=1, default=(1.0,1.0,0.0), description="Bright Color 4", subtype="COLOR")
-    # Earth Color Properties
-    earthColor1 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.068, 0.019, 0.014), description="Earth Color 1", subtype="COLOR")
-    earthColor2 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.089, 0.060, 0.047), description="Earth Color 2", subtype="COLOR")
-    earthColor3 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.188, 0.168, 0.066), description="Earth Color 3", subtype="COLOR")
-    earthColor4 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.445, 0.296, 0.065), description="Earth Color 4", subtype="COLOR")
-    earthColor5 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.745, 0.332, 0.065), description="Earth Color 5", subtype="COLOR")
-    # Green to Blue Color properties
-    greenblueColor1 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.296, 0.445, 0.074), description="Green/Blue Color 1", subtype="COLOR")
-    greenblueColor2 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.651, 1.0, 0.223), description="Green/Blue Color 2", subtype="COLOR")
-    greenblueColor3 = bpy.props.FloatVectorProperty(min=0, max=1, default=(0.037, 0.047, 0.084), description="Green/Blue Color 3", subtype="COLOR")
-
-
-############################
-## Draw Brush panel in Toolbar
-############################
-class addTracerObjectPanel(bpy.types.Panel):
-    bl_label = "Btrace: Panel"
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_context = 'objectmode'
-    selected = "tool_objectTrace"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        Btrace = bpy.context.window_manager.curve_tracer
-        btracemenu = props = bpy.context.window_manager.btrace_menu
-        obj = bpy.context.object
-
-
-        ############################
-        ## Color Blender Panel options
-        ############################
-        def color_blender():
-            """Buttons for Color Blender"""
-            row = box.row()
-            row.label("Color palette")
-            row.prop(Btrace, 'mmColors', text="")
-            # Show Custom Colors if selected
-            if Btrace.mmColors == 'CUSTOM':
-                row = box.row(align=True)
-                row.prop(Btrace, 'mmColor1', text="")
-                row.prop(Btrace, 'mmColor2', text="")
-                row.prop(Btrace, 'mmColor3', text="")
-                row.prop(Btrace, 'mmColor4', text="")
-                row.prop(Btrace, 'mmColor5', text="")
-                row.prop(Btrace, 'mmColor6', text="")
-                row.prop(Btrace, 'mmColor7', text="")
-                row.prop(Btrace, 'mmColor8', text="")
-            # Show Earth Colors
-            elif Btrace.mmColors == 'BW':
-                row = box.row(align=True)
-                row.prop(Btrace, 'bwColor1', text="")
-                row.prop(Btrace, 'bwColor2', text="")
-            # Show Earth Colors
-            elif Btrace.mmColors == 'BRIGHT':
-                row = box.row(align=True)
-                row.prop(Btrace, 'brightColor1', text="")
-                row.prop(Btrace, 'brightColor2', text="")
-                row.prop(Btrace, 'brightColor3', text="")
-                row.prop(Btrace, 'brightColor4', text="")
-            # Show Earth Colors
-            elif Btrace.mmColors == 'EARTH':
-                row = box.row(align=True)
-                row.prop(Btrace, 'earthColor1', text="")
-                row.prop(Btrace, 'earthColor2', text="")
-                row.prop(Btrace, 'earthColor3', text="")
-                row.prop(Btrace, 'earthColor4', text="")
-                row.prop(Btrace, 'earthColor5', text="")
-            # Show Earth Colors
-            elif Btrace.mmColors == 'GREENBLUE':
-                row = box.row(align=True)
-                row.prop(Btrace, 'greenblueColor1', text="")
-                row.prop(Btrace, 'greenblueColor2', text="")
-                row.prop(Btrace, 'greenblueColor3', text="")
-            elif Btrace.mmColors == 'RANDOM':
-                row = box.row()
-
-        ############################
-        ## Curve Panel options
-        ############################
-        def curve_settings():
-            """Button for curve options"""
-            row = self.layout.row()
-            row = box.row(align=True)
-
-            row.prop(Btrace, 'show_curve_settings', icon='CURVE_BEZCURVE', text="Curve Settings")
-            row.prop(Btrace, 'material_settings', icon='MATERIAL_DATA', text="Material Settings")
-            if Btrace.material_settings:
-                row = box.row()
-                row.label(text="Material Settings", icon='COLOR')
-                row = box.row()
-                row.prop(Btrace, "trace_mat_random")
-                if not Btrace.trace_mat_random:
-                    row = box.row()
-                    row.prop(Btrace, "trace_mat_color", text="")
-                else:
-                    row.prop(Btrace, "mat_run_color_blender")
-                    if Btrace.mat_run_color_blender:
-                        row = box.row()
-                        row.operator("object.colorblenderclear", text="Reset Material Keyframes", icon="KEY_DEHLT")
-                        row.prop(Btrace, 'mmSkip', text="Keyframe every")
-                      
-                    color_blender()
-                row = box.row()
-            if Btrace.show_curve_settings:
-                #if  or btracemenu.tool_handwrite:
-                if len(bpy.context.selected_objects) > 0 and obj.type == 'CURVE': # selected curve options
-                    col = box.column(align=True)
-                    col.label(text="Edit Curves for", icon='CURVE_BEZCURVE')
-                    col.label(text="Selected Curve Bevel Options")
-                    row = col.row(align=True)
-                    row.prop(obj.data, 'bevel_depth', text="Depth")
-                    row.prop(obj.data, 'bevel_resolution', text="Resolution")
-                    row = col.row(align=True)
-                    row.prop(obj.data, 'resolution_u')
-                else: # For new curve
-                    box.label(text="New Curve Settings", icon='CURVE_BEZCURVE')
-                    box.prop(Btrace, "curve_spline")
-                    box.prop(Btrace, "curve_handle")
-                    box.label(text="Bevel Options")
-                    col = box.column(align=True)
-                    row = col.row(align=True)
-                    row.prop(Btrace, "curve_depth", text="Depth")
-                    row.prop(Btrace, "curve_resolution", text="Resolution")
-                    row = col.row(align=True)
-                    row.prop(Btrace, "curve_u")
-
-        ############################
-        ## Grow Animation Panel options
-        ############################
-        def add_grow():
-            """Button for grow animation option"""
-            row = box.row()
-            row.label(text="Animate Final Curve")
-            row = box.row()
-            row.prop(Btrace, "animate", text="Add Grow Curve Animation", icon="META_BALL")
-            row.label("")
-            if Btrace.animate:
-                box.label(text='Frame Animation Settings:', icon="META_BALL")
-                col = box.column(align=True)
-                col.prop(Btrace, 'anim_auto')
-                if not Btrace.anim_auto:
-                    row = col.row(align=True)
-                    row.prop(Btrace, 'anim_f_start')
-                    row.prop(Btrace, 'anim_length')
-                row = col.row(align=True)
-                row.prop(Btrace, 'anim_delay')
-                row.prop(Btrace, 'anim_f_fade')
-
-                box.label(text='Additional Settings')
-                row = box.row()
-                row.prop(Btrace, 'anim_tails')
-                row.prop(Btrace, 'anim_keepr')
-
-        ##################################################################
-        ## Start Btrace Panel
-        ##################################################################
-        col = self.layout.column(align=True)
-        #col.label(text="Trace Tools")
-        row = col.row()
-        row.prop(btracemenu, "tool_objectTrace", text="Ojbect Trace", icon="FORCE_MAGNETIC")
-        row.prop(btracemenu, "tool_objectsConnect", text="Object Connect", icon="OUTLINER_OB_EMPTY")
-        row = col.row()
-        row.prop(btracemenu, "tool_meshFollow", text="Mesh Follow", icon="DRIVER")
-        row.prop(btracemenu, "tool_handwrite", text="Handwriting", icon='BRUSH_DATA')
-        row = col.row()   
-        row.prop(btracemenu, "tool_particleTrace", icon="PARTICLES", text="Particle Trace")
-        row.prop(btracemenu, "tool_particleConnect", icon="MOD_PARTICLES", text="Particle Connect")
-        row = layout.row()
-        col = layout.column(align=True)
-        row = col.row()
-        row.prop(btracemenu, "tool_growCurve", icon="META_BALL", text="Grow Animation")
-        row.prop(btracemenu, "tool_fcurve", text="Fcurve Noise", icon='RNDCURVE')
-        row = col.row()
-        row.prop(btracemenu, "tool_colorblender", text="Color Blender", icon="COLOR")
-        row.label(text="")
-        row = layout.row()
-
-        ##########################
-        ## Start  Object Tools
-        ##########################
-        sel = bpy.context.selected_objects
-        ############################
-        ### Object Trace
-        ############################
-        if btracemenu.tool_objectTrace:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Object Trace", icon="FORCE_MAGNETIC")
-            row.operator("object.btobjecttrace", text="Run!", icon="PLAY")
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            myselected = "Selected %d" % len(bpy.context.selected_objects)
-            row.label(text=myselected)
-            if Btrace.settings_toggle:
-                row = box.row()
-                row.label(text='Edge Draw Method')
-                row = box.row(align=True)
-                row.prop(Btrace, 'convert_edgetype')
-                box.prop(Btrace, "object_duplicate")
-                if len(sel) > 1:
-                    box.prop(Btrace, 'convert_joinbefore')
-                else:
-                    Btrace.convert_joinbefore = False
-                row = box.row()
-                row.prop(Btrace, "distort_curve")
-                if Btrace.distort_curve:
-                    col = box.column(align=True)
-                    col.prop(Btrace, "distort_modscale")
-                    col.prop(Btrace, "distort_noise")
-                row = box.row()
-                curve_settings()  # Show Curve/material settings
-                add_grow()  # Grow settings here
-
-        ############################
-        ### Objects Connect
-        ############################
-        if btracemenu.tool_objectsConnect:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Objects Connect", icon="OUTLINER_OB_EMPTY")
-            row.operator("object.btobjectsconnect", text="Run!", icon="PLAY")
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.label(text="")
-            if Btrace.settings_toggle:
-                row = box.row()
-                row.prop(Btrace, "respect_order", text="Selection Options")
-                if Btrace.respect_order:
-                    box.operator("object.select_order", text="Click to start order selection", icon='UV_SYNC_SELECT')
-                row = box.row()
-                row.prop(Btrace, "connect_noise", text="Add F-Curve Noise")
-                if Btrace.connect_noise:
-                    row = box.row()
-                    row.label(text="F-Curve Noise", icon='RNDCURVE')
-                    row = box.row(align=True)
-                    row.prop(Btrace, "fcnoise_rot")
-                    row.prop(Btrace, "fcnoise_loc")
-                    row.prop(Btrace, "fcnoise_scale")
-                    col = box.column(align=True)
-                    col.prop(Btrace, "fcnoise_amp")
-                    col.prop(Btrace, "fcnoise_timescale")
-                    box.prop(Btrace, "fcnoise_key")
-                curve_settings()  # Show Curve/material settings
-                add_grow()  # Grow settings here
-
-        ############################
-        ### Mesh Follow
-        ############################
-        if btracemenu.tool_meshFollow:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Mesh Follow", icon="DRIVER")
-            row.operator("object.btmeshfollow", text="Run!", icon="PLAY")
-            row = box.row()
-            if Btrace.fol_mesh_type == 'OBJECT':
-                a, b = "Trace Object", "SNAP_VOLUME"
-            if Btrace.fol_mesh_type == 'VERTS':
-                a, b = "Trace Verts", "SNAP_VERTEX"
-            if Btrace.fol_mesh_type == 'EDGES':
-                a, b = "Trace Edges", "SNAP_EDGE"
-            if Btrace.fol_mesh_type == 'FACES':
-               a, b = "Trace Faces", "SNAP_FACE"
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.label(text=a, icon=b)
-            if Btrace.settings_toggle:
-                col = box.column(align=True)
-                row = col.row(align=True)
-                row.prop(Btrace, "fol_mesh_type", expand=True)
-                row = col.row(align=True)
-                if Btrace.fol_mesh_type != 'OBJECT':
-                    row.prop(Btrace, "fol_sel_option", expand=True)
-                    row = box.row()
-                    if Btrace.fol_sel_option == 'RANDOM':
-                        row.label("Random Select of Total")
-                        row.prop(Btrace, "fol_perc_verts", text="%")
-                    if Btrace.fol_sel_option == 'CUSTOM':
-                        row.label("Choose selection in Edit Mode")
-                    if Btrace.fol_sel_option == 'ALL':
-                        row.label("Select All items")
-                col = box.column(align=True)
-                col.label("Time Options", icon="TIME")
-                col.prop(Btrace, "particle_step")
-                row = col.row(align=True)
-                row.prop(Btrace, "fol_start_frame")
-                row.prop(Btrace, "fol_end_frame")
-                curve_settings()  # Show Curve/material settings
-                add_grow()  # Grow settings here
-
-         ############################
-        ### Handwriting Tools
-        ############################
-        if btracemenu.tool_handwrite:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text='Handwriting', icon='BRUSH_DATA')
-            row.operator("curve.btwriting", text="Run!", icon='PLAY')
-            row = box.row()
-            row = box.row()
-            row.label(text='Grease Pencil Writing Tools')
-            col = box.column(align=True)
-            row = col.row(align=True)
-            row.operator("gpencil.draw", text="Draw", icon='BRUSH_DATA').mode = 'DRAW'
-            row.operator("gpencil.draw", text="Poly", icon='VPAINT_HLT').mode = 'DRAW_POLY'
-            row = col.row(align=True)
-            row.operator("gpencil.draw", text="Line", icon='ZOOMOUT').mode = 'DRAW_STRAIGHT'
-            row.operator("gpencil.draw", text="Erase", icon='TPAINT_HLT').mode = 'ERASER'
-            row = box.row()
-            row.operator("gpencil.data_unlink", text="Delete Grease Pencil Layer", icon="CANCEL")
-            row = box.row()
-            curve_settings()  # Show Curve/material settings
-            add_grow()  # Grow settings here
-
-        ############################
-        ### Particle Trace
-        ############################
-        if btracemenu.tool_particleTrace:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Particle Trace", icon="PARTICLES")
-            row.operator("particles.particletrace", text="Run!", icon="PLAY")
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.label(text="")
-            if Btrace.settings_toggle:
-                box.prop(Btrace, "particle_step")
-                row = box.row()
-                row.prop(Btrace, "curve_join")
-                curve_settings()  # Show Curve/material settings
-                add_grow()  # Grow settings here
-
-        ############################
-        ### Connect Particles
-        ############################
-        if btracemenu.tool_particleConnect:
-            row = layout.row()
-            row.label(text="  Trace Tool:", icon="FORCE_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text='Particle Connect', icon='MOD_PARTICLES')
-            row.operator("particles.connect", icon="PLAY", text='Run!')
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.label(text="")
-            if Btrace.settings_toggle:
-                box.prop(Btrace, "particle_step")
-                row = box.row()
-                row.prop(Btrace, 'particle_auto')
-                if not Btrace.particle_auto:
-                    row = box.row(align=True)
-                    row.prop(Btrace, 'particle_f_start')
-                    row.prop(Btrace, 'particle_f_end')
-                curve_settings()  # Show Curve/material settings
-                add_grow()  # Grow settings here
-
-        #######################
-        #### Grow Animation ####
-        #######################
-        if btracemenu.tool_growCurve:
-            row = layout.row()
-            row.label(text="  Curve Tool:", icon="OUTLINER_OB_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Grow Curve", icon="META_BALL")
-            row.operator('curve.btgrow', text='Run!', icon='PLAY')
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.operator('object.btreset',  icon='KEY_DEHLT')
-            if Btrace.settings_toggle:
-                box.label(text='Frame Animation Settings:')
-                col = box.column(align=True)
-                col.prop(Btrace, 'anim_auto')
-                if not Btrace.anim_auto:
-                    row = col.row(align=True)
-                    row.prop(Btrace, 'anim_f_start')
-                    row.prop(Btrace, 'anim_length')
-                row = col.row(align=True)
-                row.prop(Btrace, 'anim_delay')
-                row.prop(Btrace, 'anim_f_fade')
-
-                box.label(text='Additional Settings')
-                row = box.row()
-                row.prop(Btrace, 'anim_tails')
-                row.prop(Btrace, 'anim_keepr')
-
-        #######################
-        #### F-Curve Noise Curve ####
-        #######################
-        if btracemenu.tool_fcurve:
-            row = layout.row()
-            row.label(text="  Curve Tool:", icon="OUTLINER_OB_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="F-Curve Noise", icon='RNDCURVE')
-            row.operator("object.btfcnoise", icon='PLAY', text="Run!")
-            row = box.row()
-            row.prop(Btrace, "settings_toggle", icon='MODIFIER', text='Settings')
-            row.operator('object.btreset',  icon='KEY_DEHLT')
-            if Btrace.settings_toggle:
-                row = box.row(align=True)
-                row.prop(Btrace, "fcnoise_rot")
-                row.prop(Btrace, "fcnoise_loc")
-                row.prop(Btrace, "fcnoise_scale")
-                col = box.column(align=True)
-                col.prop(Btrace, "fcnoise_amp")
-                col.prop(Btrace, "fcnoise_timescale")
-                box.prop(Btrace, "fcnoise_key")
-
-        #######################
-        #### Color Blender ####
-        #######################
-        if btracemenu.tool_colorblender:
-            row = layout.row()
-            row.label(text="  Curve/Object Tool:", icon="OUTLINER_OB_CURVE")
-            box = self.layout.box()
-            row = box.row()
-            row.label(text="Color Blender", icon="COLOR")
-            row.operator("object.colorblender", icon='PLAY', text="Run!")
-            row = box.row()
-            row.operator("object.colorblenderclear", text="Reset Keyframes", icon="KEY_DEHLT")
-            row.prop(Btrace, 'mmSkip', text="Keyframe every")
-            color_blender()
-
-###### END PANEL ##############
-###############################
-
-
-################## ################## ################## ############
-## Object Trace
-## creates a curve with a modulated radius connecting points of a mesh
-################## ################## ################## ############
-
-class OBJECT_OT_objecttrace(bpy.types.Operator):
-    bl_idname = "object.btobjecttrace"
-    bl_label = "Btrace: Object Trace"
-    bl_description = "Trace selected mesh object with a curve with the option to animate"
-    bl_options = {'REGISTER', 'UNDO'}
-
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type in {'MESH', 'FONT'})
-
-    def invoke(self, context, event):
-        import bpy
-
-        # Run through each selected object and convert to to a curved object
-        brushObj = bpy.context.selected_objects
-        Btrace = bpy.context.window_manager.curve_tracer
-        # Duplicate Mesh
-        if Btrace.object_duplicate:
-            bpy.ops.object.duplicate_move()
-            brushObj = bpy.context.selected_objects
-        # Join Mesh
-        if Btrace.convert_joinbefore:
-            if len(brushObj) > 1:  # Only run if multiple objects selected
-                bpy.ops.object.join()
-                brushObj = bpy.context.selected_objects
-
-        for i in brushObj:
-            bpy.context.scene.objects.active = i
-            if i and i.type != 'CURVE':
-                bpy.ops.object.btconvertcurve()
-                addtracemat(bpy.context.object.data)
-            if Btrace.animate:
-                bpy.ops.curve.btgrow()
-        return {'FINISHED'}
-
-
-################## ################## ################## ############
-## Objects Connect
-## connect selected objects with a curve + hooks to each node
-## possible handle types: 'FREE' 'AUTO' 'VECTOR' 'ALIGNED'
-################## ################## ################## ############
-
-class OBJECT_OT_objectconnect(bpy.types.Operator):
-    bl_idname = "object.btobjectsconnect"
-    bl_label = "Btrace: Objects Connect"
-    bl_description = "Connect selected objects with a curve and add hooks to each node"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        return len(bpy.context.selected_objects) > 1
-
-    def invoke(self, context, event):
-        import bpy, selection_utils
-        list = []
-        Btrace = bpy.context.window_manager.curve_tracer
-        curve_handle = Btrace.curve_handle
-        if curve_handle == 'AUTOMATIC':  # hackish because of naming conflict in api
-            curve_handle = 'AUTO'
-        # Check if Btrace group exists, if not create
-        bgroup = bpy.data.groups.keys()
-        if 'Btrace' not in bgroup:
-            bpy.ops.group.create(name="Btrace")
-        #  check if noise
-        if Btrace.connect_noise:
-            bpy.ops.object.btfcnoise()
-        # check if respect order is checked, create list of objects
-        if Btrace.respect_order == True:
-            selobnames = selection_utils.selected
-            obnames = []
-            for ob in selobnames:
-                obnames.append(bpy.data.objects[ob])
-        else:
-            obnames = bpy.context.selected_objects  # No selection order
-
-        for a in obnames:
-            list.append(a)
-            a.select = False
-
-        # trace the origins
-        tracer = bpy.data.curves.new('tracer', 'CURVE')
-        tracer.dimensions = '3D'
-        spline = tracer.splines.new('BEZIER')
-        spline.bezier_points.add(len(list) - 1)
-        curve = bpy.data.objects.new('curve', tracer)
-        bpy.context.scene.objects.link(curve)
-
-        # render ready curve
-        tracer.resolution_u = Btrace.curve_u
-        tracer.bevel_resolution = Btrace.curve_resolution  # Set bevel resolution from Panel options
-        tracer.fill_mode = 'FULL'
-        tracer.bevel_depth = Btrace.curve_depth  # Set bevel depth from Panel options
-
-        # move nodes to objects
-        for i in range(len(list)):
-            p = spline.bezier_points[i]
-            p.co = list[i].location
-            p.handle_right_type = curve_handle
-            p.handle_left_type = curve_handle
-
-        bpy.context.scene.objects.active = curve
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-        # place hooks
-        for i in range(len(list)):
-            list[i].select = True
-            curve.data.splines[0].bezier_points[i].select_control_point = True
-            bpy.ops.object.mode_set(mode='EDIT')
-            bpy.ops.object.hook_add_selob()
-            bpy.ops.object.mode_set(mode='OBJECT')
-            curve.data.splines[0].bezier_points[i].select_control_point = False
-            list[i].select = False
-
-        bpy.ops.object.select_all(action='DESELECT')
-        curve.select = True # selected curve after it's created
-        addtracemat(bpy.context.object.data) # Add material
-        if Btrace.animate: # Add Curve Grow it?
-            bpy.ops.curve.btgrow()
-        bpy.ops.object.group_link(group="Btrace") # add to Btrace group
-        if Btrace.animate:
-            bpy.ops.curve.btgrow() # Add grow curve
-        return {'FINISHED'}
-
-
-################## ################## ################## ############
-## Particle Trace
-## creates a curve from each particle of a system
-################## ################## ################## ############
-def  curvetracer(curvename, splinename):
-    Btrace = bpy.context.window_manager.curve_tracer
-    tracer = bpy.data.curves.new(splinename, 'CURVE')
-    tracer.dimensions = '3D'
-    curve = bpy.data.objects.new(curvename, tracer)
-    bpy.context.scene.objects.link(curve)
-    try:
-        tracer.fill_mode = 'FULL'
-    except:
-        tracer.use_fill_front = tracer.use_fill_back = False
-    tracer.bevel_resolution = Btrace.curve_resolution
-    tracer.bevel_depth = Btrace.curve_depth
-    tracer.resolution_u = Btrace.curve_u
-    return tracer, curve
-
-
-class OBJECT_OT_particletrace(bpy.types.Operator):
-    bl_idname = "particles.particletrace"
-    bl_label = "Btrace: Particle Trace"
-    bl_description = "Creates a curve from each particle of a system. Keeping particle amount under 250 will make this run faster"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        return (bpy.context.object and bpy.context.object.particle_systems)
-
-    def execute(self, context):
-        Btrace = bpy.context.window_manager.curve_tracer
-        particle_step = Btrace.particle_step    # step size in frames
-        obj = bpy.context.object
-        ps = obj.particle_systems.active
-        curvelist = []
-        curve_handle = Btrace.curve_handle
-        if curve_handle == 'AUTOMATIC':  # hackish naming conflict
-            curve_handle = 'AUTO'
-        if curve_handle == 'FREE_ALIGN':  # hackish naming conflict
-            curve_handle = 'FREE'
-
-        # Check if Btrace group exists, if not create
-        bgroup = bpy.data.groups.keys()
-        if 'Btrace' not in bgroup:
-            bpy.ops.group.create(name="Btrace")
-
-        if Btrace.curve_join:
-            tracer = curvetracer('Tracer', 'Splines')
-        for x in ps.particles:
-            if not Btrace.curve_join:
-                tracer = curvetracer('Tracer.000', 'Spline.000')
-            spline = tracer[0].splines.new('BEZIER')
-            spline.bezier_points.add((x.lifetime - 1) // particle_step)  # add point to spline based on step size
-            for t in list(range(int(x.lifetime))):
-                bpy.context.scene.frame_set(t + x.birth_time)
-                if not t % particle_step:
-                    p = spline.bezier_points[t // particle_step]
-                    p.co = x.location
-                    p.handle_right_type = curve_handle
-                    p.handle_left_type = curve_handle
-            particlecurve = tracer[1]
-            curvelist.append(particlecurve)
-        # add to group
-        bpy.ops.object.select_all(action='DESELECT')
-        for curveobject in curvelist:
-            curveobject.select = True
-            bpy.context.scene.objects.active = curveobject
-            bpy.ops.object.group_link(group="Btrace")
-            addtracemat(curveobject.data)  # Add material
-        
-        if Btrace.animate:
-            bpy.ops.curve.btgrow()  # Add grow curve
-
-        return {'FINISHED'}
-
-
-###########################################################################
-## Particle Connect
-## connect all particles in active system with a continuous animated curve
-###########################################################################
-
-class OBJECT_OT_traceallparticles(bpy.types.Operator):
-    bl_idname = 'particles.connect'
-    bl_label = 'Connect Particles'
-    bl_description = 'Create a continuous animated curve from particles in active system'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        return (bpy.context.object and bpy.context.object.particle_systems)
-
-    def execute(self, context):
-        
-        obj = bpy.context.object
-        ps = obj.particle_systems.active
-        set = ps.settings
-
-        # Grids distribution not supported
-        if set.distribution == 'GRID':
-            self.report({'INFO'},"Grid distribution mode for particles not supported.")
-            return{'FINISHED'}
-        
-        Btrace = bpy.context.window_manager.curve_tracer
-        particle_f_start = Btrace.particle_f_start # Get frame start
-        particle_f_end = Btrace.particle_f_end # Get frame end
-        curve_handle = Btrace.curve_handle
-        if curve_handle == 'AUTOMATIC': # hackish because of naming conflict in api
-            curve_handle = 'AUTO'
-        if curve_handle == 'FREE_ALIGN':
-            curve_handle = 'FREE'        
-        tracer = bpy.data.curves.new('Splines','CURVE') # define what kind of object to create
-        curve = bpy.data.objects.new('Tracer',tracer) # Create new object with settings listed above
-        bpy.context.scene.objects.link(curve) # Link newly created object to the scene
-        spline = tracer.splines.new('BEZIER')  # add a new Bezier point in the new curve
-        spline.bezier_points.add(set.count-1)
-		
-        tracer.dimensions = '3D'
-        tracer.resolution_u = Btrace.curve_u
-        tracer.bevel_resolution = Btrace.curve_resolution
-        tracer.fill_mode = 'FULL'
-        tracer.bevel_depth = Btrace.curve_depth
-
-        if Btrace.particle_auto:
-            f_start = int(set.frame_start)
-            f_end = int(set.frame_end + set.lifetime)
-        else:
-            if particle_f_end <= particle_f_start:
-                 particle_f_end = particle_f_start + 1
-            f_start = particle_f_start
-            f_end = particle_f_end
-
-        for bFrames in range(f_start, f_end):
-            bpy.context.scene.frame_set(bFrames)
-            if not (bFrames-f_start) % Btrace.particle_step:
-                for bFrames in range(set.count):
-                    if ps.particles[bFrames].alive_state != 'UNBORN': 
-                        e = bFrames
-                    bp = spline.bezier_points[bFrames]
-                    pt = ps.particles[e]
-                    bp.co = pt.location
-                    #bp.handle_left = pt.location
-                    #bp.handle_right = pt.location
-                    bp.handle_right_type = curve_handle
-                    bp.handle_left_type = curve_handle 
-                    bp.keyframe_insert('co')
-                    bp.keyframe_insert('handle_left')
-                    bp.keyframe_insert('handle_right')
-        # Select new curve
-        bpy.ops.object.select_all(action='DESELECT')
-        curve.select = True
-        bpy.context.scene.objects.active = curve
-        addtracemat(curve.data) #Add material
-        if Btrace.animate:
-            bpy.ops.curve.btgrow()
-        return{'FINISHED'}
-
-################## ################## ################## ############
-## Writing Tool
-## Writes a curve by animating its point's radii
-## 
-################## ################## ################## ############
-class OBJECT_OT_writing(bpy.types.Operator):
-    bl_idname = 'curve.btwriting'
-    bl_label = 'Write'
-    bl_description = 'Use Grease Pencil to write and convert to curves'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    # @classmethod  ### Removed so panel still draws if nothing is selected
-    # def poll(cls, context):
-    #     return (context.scene.grease_pencil or context.object.grease_pencil != None)
-
-    def execute(self, context):
-        Btrace = bpy.context.window_manager.curve_tracer
-        obj = bpy.context.object
-        gactive = bpy.context.active_object # set selected object before convert
-        bpy.ops.gpencil.convert(type='CURVE')
-        gactiveCurve = bpy.context.active_object # get curve after convert
-        # render ready curve
-        gactiveCurve.data.resolution_u = Btrace.curve_u
-        gactiveCurve.data.bevel_resolution = Btrace.curve_resolution  # Set bevel resolution from Panel options
-        gactiveCurve.data.fill_mode = 'FULL'
-        gactiveCurve.data.bevel_depth = Btrace.curve_depth  # Set bevel depth from Panel options
-
-        writeObj = bpy.context.selected_objects
-        if Btrace.animate:
-            for i in writeObj:
-                bpy.context.scene.objects.active = i
-                bpy.ops.curve.btgrow()
-                addtracemat(bpy.context.object.data) #Add material
-        else:
-            for i in writeObj:
-                bpy.context.scene.objects.active = i
-                addtracemat(bpy.context.object.data) #Add material
-
-        # Delete grease pencil strokes
-        bpy.context.scene.objects.active = gactive
-        bpy.ops.gpencil.data_unlink()
-        bpy.context.scene.objects.active = gactiveCurve
-        # Smooth object
-        bpy.ops.object.shade_smooth()
-        # Return to first frame
-        bpy.context.scene.frame_set(Btrace.anim_f_start)
-        
-        return{'FINISHED'}
-
-################## ################## ################## ############
-## Create Curve
-## Convert mesh to curve using either Continuous, All Edges, or Sharp Edges
-## Option to create noise
-################## ################## ################## ############
-
-class OBJECT_OT_convertcurve(bpy.types.Operator):
-    bl_idname = "object.btconvertcurve"
-    bl_label = "Btrace: Create Curve"
-    bl_description = "Convert mesh to curve using either Continuous, All Edges, or Sharp Edges"
-    bl_options = {'REGISTER', 'UNDO'}
-        
-    def execute(self, context):
-        import bpy, random, mathutils
-        from mathutils import Vector
-
-        Btrace = bpy.context.window_manager.curve_tracer
-        traceobjects = bpy.context.selected_objects # create a list with all the selected objects
-
-        obj = bpy.context.object
-        
-        ### Convert Font
-        if obj.type == 'FONT':
-            bpy.ops.object.mode_set(mode='OBJECT')
-            bpy.ops.object.convert(target='CURVE') # Convert edges to curve
-            bpy.context.object.data.dimensions = '3D'
-            
-        # make a continuous edge through all vertices
-        if obj.type == 'MESH':
-            # Add noise to mesh
-            if Btrace.distort_curve:
-                for v in obj.data.vertices:
-                    for u in range(3):
-                        v.co[u] += Btrace.distort_noise * (random.uniform(-1,1))
-
-            if Btrace.convert_edgetype == 'CONTI':
-                ## Start Continuous edge
-                bpy.ops.object.mode_set(mode='EDIT')
-                bpy.ops.mesh.select_all(action='SELECT')
-                bpy.ops.mesh.delete(type='EDGE_FACE')
-                bpy.ops.mesh.select_all(action='DESELECT')
-                verts = bpy.context.object.data.vertices
-                bpy.ops.object.mode_set(mode='OBJECT')
-                li = []
-                p1 = random.randint(0,len(verts)-1) 
-                
-                for v in verts: 
-                    li.append(v.index)
-                li.remove(p1)
-                for z in range(len(li)):
-                    x = []
-                    for px in li:
-                        d = verts[p1].co - verts[px].co # find distance from first vert
-                        x.append(d.length)
-                    p2 = li[x.index(min(x))] # find the shortest distance list index
-                    verts[p1].select = verts[p2].select = True
-                    bpy.ops.object.mode_set(mode='EDIT')
-                    bpy.context.tool_settings.mesh_select_mode = [True, False, False]
-                    bpy.ops.mesh.edge_face_add()
-                    bpy.ops.mesh.select_all(action='DESELECT')
-                    bpy.ops.object.mode_set(mode='OBJECT')
-                    # verts[p1].select = verts[p2].select = False #Doesn't work after Bmesh merge
-                    li.remove(p2)  # remove item from list.
-                    p1 = p2
-                # Convert edges to curve
-                bpy.ops.object.mode_set(mode='OBJECT')
-                bpy.ops.object.convert(target='CURVE') 
-            
-            if Btrace.convert_edgetype == 'EDGEALL':
-                ## Start All edges
-                bpy.ops.object.mode_set(mode='EDIT')
-                bpy.ops.mesh.select_all(action='SELECT')
-                bpy.ops.mesh.delete(type='ONLY_FACE')
-                bpy.ops.object.mode_set()
-                bpy.ops.object.convert(target='CURVE')
-                for sp in obj.data.splines:
-                    sp.type = Btrace.curve_spline
-
-        obj = bpy.context.object
-        # Set spline type to custom property in panel
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.curve.spline_type_set(type=Btrace.curve_spline) 
-        # Set handle type to custom property in panel
-        bpy.ops.curve.handle_type_set(type=Btrace.curve_handle) 
-        bpy.ops.object.editmode_toggle()
-        obj.data.fill_mode = 'FULL'
-        # Set resolution to custom property in panel
-        obj.data.bevel_resolution = Btrace.curve_resolution 
-        obj.data.resolution_u = Btrace.curve_u 
-        # Set depth to custom property in panel
-        obj.data.bevel_depth = Btrace.curve_depth 
-        # Smooth object
-        bpy.ops.object.shade_smooth()
-        # Modulate curve radius and add distortion
-        if Btrace.distort_curve: 
-            scale = Btrace.distort_modscale
-            if scale == 0:
-                return {'FINISHED'}
-            for u in obj.data.splines:
-                for v in u.bezier_points:
-                    v.radius = scale*round(random.random(),3) 
-        return {'FINISHED'}
-
-
-################## ################## ################## ############
-## Mesh Follow, trace vertex or faces
-## Create curve at center of selection item, extruded along animation
-## Needs to be animated mesh!!!
-################## ################## ################## ############
-
-class OBJECT_OT_meshfollow(bpy.types.Operator):
-    bl_idname = "object.btmeshfollow"
-    bl_label = "Btrace: Vertex Trace"
-    bl_description = "Trace Vertex or Face on an animated mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-        
-    
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type in {'MESH'})
-
-    def execute(self, context):
-        import bpy, random
-        from mathutils import Vector
-
-        Btrace = bpy.context.window_manager.curve_tracer
-        distort_curve = Btrace.distort_curve    # modulate the resulting curve
-        stepsize = Btrace.particle_step
-        traceobjects = bpy.context.selected_objects  # create a list with all the selected objects
-
-        obj = bpy.context.object
-        scn = bpy.context.scene
-        meshdata = obj.data
-        cursor = bpy.context.scene.cursor_location.copy()  # Store the location to restore at end of script
-        drawmethod = Btrace.fol_mesh_type  # Draw from Edges, Verts, or Faces
-        if drawmethod == 'VERTS':
-            meshobjs = obj.data.vertices
-        if drawmethod == 'FACES':
-            meshobjs = obj.data.polygons  # untested
-        if drawmethod == 'EDGES':
-            meshobjs = obj.data.edges  # untested
-
-        # Frame properties
-        start_frame, end_frame = Btrace.fol_start_frame, Btrace.fol_end_frame
-        if start_frame > end_frame:  # Make sure the math works
-            startframe = end_frame - 5  # if start past end, goto (end - 5)
-        frames = int((end_frame - start_frame) / stepsize)
-
-        def getsel_option():  # Get selection objects.
-            sel = []
-            seloption, fol_mesh_type = Btrace.fol_sel_option, Btrace.fol_mesh_type  # options = 'random', 'custom', 'all'
-            if fol_mesh_type == 'OBJECT':
-                pass
-            else:
-                if seloption == 'CUSTOM':
-                    for i in meshobjs:
-                        if i.select == True:
-                            sel.append(i.index)
-                if seloption == 'RANDOM':
-                    for i in list(meshobjs):
-                        sel.append(i.index)
-                    finalsel = int(len(sel) * Btrace.fol_perc_verts)
-                    remove = len(sel) - finalsel
-                    for i in range(remove):
-                        sel.pop(random.randint(0, len(sel) - 1))
-                if seloption == 'ALL':
-                    for i in list(meshobjs):
-                        sel.append(i.index)
-
-            return sel
-
-        def get_coord(objindex):
-            obj_co = []  # list of vector coordinates to use
-            frame_x = start_frame
-            for i in range(frames):  # create frame numbers list
-                scn.frame_set(frame_x)
-                if drawmethod != 'OBJECT':
-                    followed_item = meshobjs[objindex]
-                    if drawmethod == 'VERTS':
-                        g_co = obj.matrix_local * followed_item.co  # find Vert vector
-
-                    if drawmethod == 'FACES':
-                        g_co = obj.matrix_local * followed_item.normal  # find Face vector
-
-                    if drawmethod == 'EDGES':
-                        v1 = followed_item.vertices[0]
-                        v2 = followed_item.vertices[1]
-                        co1 = bpy.context.object.data.vertices[v1]
-                        co2 = bpy.context.object.data.vertices[v2]
-                        localcenter = co1.co.lerp(co2.co, 0.5)
-                        g_co = obj.matrix_world * localcenter
-
-                if drawmethod == 'OBJECT':
-                    g_co = objindex.location.copy()
-
-                obj_co.append(g_co)
-                frame_x = frame_x + stepsize
-
-            scn.frame_set(start_frame)
-            return obj_co
-
-        def make_curve(co_list):
-            Btrace = bpy.context.window_manager.curve_tracer
-            tracer = bpy.data.curves.new('tracer','CURVE')
-            tracer.dimensions = '3D'
-            spline = tracer.splines.new('BEZIER')
-            spline.bezier_points.add(len(co_list)-  1)
-            curve = bpy.data.objects.new('curve',tracer)
-            scn.objects.link(curve)
-            curvelist.append(curve)
-            # render ready curve
-            tracer.resolution_u = Btrace.curve_u
-            tracer.bevel_resolution = Btrace.curve_resolution  # Set bevel resolution from Panel options
-            tracer.fill_mode = 'FULL'
-            tracer.bevel_depth = Btrace.curve_depth  # Set bevel depth from Panel options
-            curve_handle = Btrace.curve_handle
-            if curve_handle == 'AUTOMATIC': # hackish AUTOMATIC doesn't work here
-                curve_handle = 'AUTO'
-
-            # move bezier points to objects
-            for i in range(len(co_list)):
-                p = spline.bezier_points[i]
-                p.co = co_list[i]
-                p.handle_right_type = curve_handle
-                p.handle_left_type = curve_handle
-            return curve
-
-        # Run methods
-        # Check if Btrace group exists, if not create
-        bgroup = bpy.data.groups.keys()
-        if 'Btrace' not in bgroup:
-            bpy.ops.group.create(name="Btrace") 
-
-        Btrace = bpy.context.window_manager.curve_tracer
-        sel = getsel_option()  # Get selection
-        curvelist = []  # list to use for grow curve
-        
-        if Btrace.fol_mesh_type == 'OBJECT':
-            vector_list = get_coord(obj)
-            curvelist.append(make_curve(vector_list))
-        else:
-            for i in sel:
-                vector_list = get_coord(i)
-                curvelist.append(make_curve(vector_list))
-        # Select new curves and add to group
-        bpy.ops.object.select_all(action='DESELECT')
-        for curveobject in curvelist:
-            if curveobject.type == 'CURVE':
-                curveobject.select = True
-                bpy.context.scene.objects.active = curveobject
-                bpy.ops.object.group_link(group="Btrace")
-                addtracemat(curveobject.data)
-                curveobject.select = False
-
-        if Btrace.animate:  # Add grow curve
-            for curveobject in curvelist:
-                curveobject.select = True
-            bpy.ops.curve.btgrow()
-            for curveobject in curvelist:
-                curveobject.select = False
-
-        obj.select = False  # Deselect original object
-        return {'FINISHED'}
-
-###################################################################
-#### Add Tracer Material
-###################################################################
-
-def addtracemat(matobj):
-    # Need to add cycles or BI render material options
-    # if engine == 'CYCLES':
-        # Add cycles mat
-    # if engine == 'BLENDER_RENDER':
-        # Add blender interal mat
-    matslots = bpy.context.object.data.materials.items()  # Check if a material exists, skip if it does
-    if len(matslots) < 1:  # Make sure there is only one material slot
-        engine = bpy.context.scene.render.engine
-        Btrace = bpy.context.window_manager.curve_tracer
-        if not Btrace.mat_run_color_blender:  # Check if color blender is to be run
-            if Btrace.trace_mat_random:  # Create Random color for each item
-                # Use random color from chosen palette, assign color lists for each palette
-                import random
-                brightColors  = [Btrace.brightColor1, Btrace.brightColor2, Btrace.brightColor3, Btrace.brightColor4]
-                bwColors = [Btrace.bwColor1, Btrace.bwColor2]
-                customColors = [Btrace.mmColor1, Btrace.mmColor2, Btrace.mmColor3, Btrace.mmColor4, Btrace.mmColor5, Btrace.mmColor6, Btrace.mmColor7, Btrace.mmColor8]
-                earthColors = [Btrace.earthColor1, Btrace.earthColor2, Btrace.earthColor3, Btrace.earthColor4, Btrace.earthColor5]
-                greenblueColors = [Btrace.greenblueColor1, Btrace.greenblueColor2, Btrace.greenblueColor3]
-                if Btrace.mmColors == 'BRIGHT':
-                    #print(random.randint(0, len(brightColors) - 1))
-                    mat_color = brightColors[random.randint(0, len(brightColors) - 1)]
-                if Btrace.mmColors == 'BW':
-                    mat_color = bwColors[random.randint(0, len(bwColors) - 1)]
-                if Btrace.mmColors == 'CUSTOM':
-                    mat_color = customColors[random.randint(0, len(customColors) - 1)]
-                if Btrace.mmColors == 'EARTH':
-                    mat_color = earthColors[random.randint(0, len(earthColors) - 1)]
-                if Btrace.mmColors == 'GREENBLUE':
-                    mat_color = greenblueColors[random.randint(0, len(greenblueColors) - 1)]
-                if Btrace.mmColors == 'RANDOM':
-                    mat_color = (random.random(), random.random(), random.random())
-            else:  # Choose Single color
-                mat_color = Btrace.trace_mat_color
-            # mat_color = Btrace.trace_mat_color
-            TraceMat = bpy.data.materials.new('TraceMat')
-            TraceMat.diffuse_color = mat_color
-            TraceMat.specular_intensity = 0.5
-            matobj.materials.append(bpy.data.materials.get(TraceMat.name))
-
-        else:  # Run color blender operator
-            bpy.ops.object.colorblender()
-
-    return {'FINISHED'}
-
-###################################################################
-#### Add Color Blender Material
-###################################################################
-
-# This is the magical material changer!
-class OBJECT_OT_materialChango(bpy.types.Operator):
-    bl_idname = 'object.colorblender'
-    bl_label = 'Color Blender'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-
-        import bpy, random
-        Btrace = bpy.context.window_manager.curve_tracer  # properties panel
-        colorObjects = bpy.context.selected_objects
-
-        # Set color lists
-        brightColors  = [Btrace.brightColor1, Btrace.brightColor2, Btrace.brightColor3, Btrace.brightColor4]
-        bwColors = [Btrace.bwColor1, Btrace.bwColor2]
-        customColors = [Btrace.mmColor1, Btrace.mmColor2, Btrace.mmColor3, Btrace.mmColor4, Btrace.mmColor5, Btrace.mmColor6, Btrace.mmColor7, Btrace.mmColor8]
-        earthColors = [Btrace.earthColor1, Btrace.earthColor2, Btrace.earthColor3, Btrace.earthColor4, Btrace.earthColor5]
-        greenblueColors = [Btrace.greenblueColor1, Btrace.greenblueColor2, Btrace.greenblueColor3]
-
-        colorList = Btrace.mmColors
-
-        # Go through each selected object and run the operator
-        for i in colorObjects:
-            theObj = i
-            # Check to see if object has materials
-            checkMaterials = len(theObj.data.materials)
-            if checkMaterials == 0:
-                # Add a material
-                materialName = "colorblendMaterial"
-                madMat = bpy.data.materials.new(materialName)
-                theObj.data.materials.append(madMat)
-            else:                
-                pass # pass since we have what we need
-                
-            # assign the first material of the object to "mat"
-            mat = theObj.data.materials[0] 
-
-            # Numbers of frames to skip between keyframes
-            skip = Btrace.mmSkip
-
-            # Random material function
-            def colorblenderRandom():
-                for crazyNumber in range(3):
-                    mat.diffuse_color[crazyNumber] = random.random()
-            
-            def colorblenderCustom():
-                mat.diffuse_color = random.choice(customColors)
-                
-            # Black and white color        
-            def colorblenderBW():
-                mat.diffuse_color = random.choice(bwColors)
-            
-            # Bright colors
-            def colorblenderBright():
-                mat.diffuse_color = random.choice(brightColors)
-                
-            # Earth Tones
-            def colorblenderEarth():
-                mat.diffuse_color = random.choice(earthColors)
-                
-            # Green to Blue Tones
-            def colorblenderGreenBlue():
-                mat.diffuse_color = random.choice(greenblueColors)
-             
-            # define frame start/end variables
-            scn = bpy.context.scene       
-            start = scn.frame_start
-            end = scn.frame_end           
-            # Go to each frame in iteration and add material
-            while start<=(end+(skip-1)):
-               
-                bpy.ops.anim.change_frame(frame=start)
-                
-                # Check what colors setting is checked and run the appropriate function
-                if Btrace.mmColors=='RANDOM':
-                    colorblenderRandom()
-                elif Btrace.mmColors=='CUSTOM':
-                    colorblenderCustom()
-                elif Btrace.mmColors=='BW':
-                    colorblenderBW()
-                elif Btrace.mmColors=='BRIGHT':
-                    colorblenderBright()
-                elif Btrace.mmColors=='EARTH':
-                    colorblenderEarth()
-                elif Btrace.mmColors=='GREENBLUE':
-                    colorblenderGreenBlue()
-                else:
-                    pass
-                
-                # Add keyframe to material
-                mat.keyframe_insert('diffuse_color')
-                
-                # Increase frame number
-                start += skip
-        return{'FINISHED'}
-    
-###### This clears the keyframes ######
-class OBJECT_OT_clearColorblender(bpy.types.Operator):
-    bl_idname = 'object.colorblenderclear'
-    bl_label = 'Clear colorblendness'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    def invoke(self, context, event):
-        
-        import bpy, random
-        mcolorblend = context.window_manager.colorblender_operator # properties panel
-        colorObjects = bpy.context.selected_objects
-        
-        # Go through each selected object and run the operator
-        for i in colorObjects:
-            theObj = i    
-            # assign the first material of the object to "mat"
-            matCl = theObj.data.materials[0] 
-            
-            # define frame start/end variables
-            scn = bpy.context.scene       
-            start = scn.frame_start
-            end = scn.frame_end
-
-            # Remove all keyframes from diffuse_color, super sloppy need to find better way
-            while start <= (end * 2):
-                bpy.ops.anim.change_frame(frame=start)
-                matCl.keyframe_delete('diffuse_color')
-                start += 1
-            
-        return{'FINISHED'}
-
-
-################## ################## ################## ############
-## F-Curve Noise
-## will add noise modifiers to each selected object f-curves
-## change type to: 'rotation' | 'location' | 'scale' | '' to effect all
-## first record a keyframe for this to work (to generate the f-curves)
-################## ################## ################## ############
-
-class OBJECT_OT_fcnoise(bpy.types.Operator):
-    bl_idname = "object.btfcnoise"
-    bl_label = "Btrace: F-curve Noise"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    def execute(self, context):
-        import bpy, random
-        
-        Btrace = bpy.context.window_manager.curve_tracer
-        amp = Btrace.fcnoise_amp
-        timescale = Btrace.fcnoise_timescale
-        addkeyframe = Btrace.fcnoise_key
-        
-        # This sets properties for Loc, Rot and Scale if they're checked in the Tools window
-        noise_rot = 'rotation'
-        noise_loc = 'location'
-        noise_scale = 'scale'
-        if not Btrace.fcnoise_rot:
-            noise_rot = 'none'
-        if not Btrace.fcnoise_loc:
-            noise_loc = 'none'
-        if not Btrace.fcnoise_scale:
-            noise_scale = 'none'
-            
-        type = noise_loc, noise_rot, noise_scale # Add settings from panel for type of keyframes
-        amplitude = amp
-        time_scale = timescale
-        
-        for i in bpy.context.selected_objects:
-            # Add keyframes, this is messy and should only add keyframes for what is checked
-            if addkeyframe == True:
-                bpy.ops.anim.keyframe_insert(type="LocRotScale")         
-            for obj in bpy.context.selected_objects:
-                if obj.animation_data:
-                    for c in obj.animation_data.action.fcurves:
-                        if c.data_path.startswith(type):
-                            # clean modifiers
-                            for m in c.modifiers : 
-                                c.modifiers.remove(m)
-                            # add noide modifiers
-                            n = c.modifiers.new('NOISE')
-                            n.strength = amplitude
-                            n.scale = time_scale
-                            n.phase = random.randint(0,999)
-        return {'FINISHED'}
-
-################## ################## ################## ############
-## Curve Grow Animation
-## Animate curve radius over length of time
-################## ################## ################## ############     
-class OBJECT_OT_curvegrow(bpy.types.Operator):
-    bl_idname = 'curve.btgrow'
-    bl_label = 'Run Script'
-    bl_description = 'Keyframe points radius'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type in {'CURVE'})
-    
-    def execute(self, context):
-        Btrace = bpy.context.window_manager.curve_tracer
-        anim_f_start, anim_length, anim_auto = Btrace.anim_f_start, Btrace.anim_length, Btrace.anim_auto
-        curve_resolution, curve_depth = Btrace.curve_resolution, Btrace.curve_depth
-        # make the curve visible
-        objs = bpy.context.selected_objects
-        for i in objs: # Execute on multiple selected objects
-            bpy.context.scene.objects.active = i
-            obj = bpy.context.active_object
-            try:
-                obj.data.fill_mode = 'FULL'
-            except:
-                obj.data.dimensions = '3D'
-                obj.data.fill_mode = 'FULL'
-            if not obj.data.bevel_resolution:
-                obj.data.bevel_resolution = curve_resolution
-            if not obj.data.bevel_depth:
-                obj.data.bevel_depth = curve_depth
-            if anim_auto:
-                anim_f_start = bpy.context.scene.frame_start
-                anim_length = bpy.context.scene.frame_end
-            # get points data and beautify
-            actual, total = anim_f_start, 0
-            for sp in obj.data.splines:
-                total += len(sp.points) + len(sp.bezier_points)
-            step = anim_length / total
-            for sp in obj.data.splines:
-                sp.radius_interpolation = 'BSPLINE'
-                po = [p for p in sp.points] + [p for p in sp.bezier_points]
-                if not Btrace.anim_keepr:
-                    for p in po:
-                        p.radius = 1
-                if Btrace.anim_tails and not sp.use_cyclic_u:
-                    po[0].radius = po[-1].radius = 0
-                    po[1].radius = po[-2].radius = .65
-                ra = [p.radius for p in po]
-
-                # record the keyframes
-                for i in range(len(po)):
-                    po[i].radius = 0
-                    po[i].keyframe_insert('radius', frame=actual)
-                    actual += step
-                    po[i].radius = ra[i]
-                    po[i].keyframe_insert('radius', frame=(actual + Btrace.anim_delay))
-
-                    if Btrace.anim_f_fade:
-                        po[i].radius = ra[i]
-                        po[i].keyframe_insert('radius', frame=(actual + Btrace.anim_f_fade - step))
-                        po[i].radius = 0
-                        po[i].keyframe_insert('radius', frame=(actual + Btrace.anim_delay + Btrace.anim_f_fade))
-
-            bpy.context.scene.frame_set(Btrace.anim_f_start)
-        return{'FINISHED'}
-
-################## ################## ################## ############
-## Remove animation and curve radius data
-################## ################## ################## ############
-class OBJECT_OT_reset(bpy.types.Operator):
-    bl_idname = 'object.btreset'
-    bl_label = 'Clear animation'
-    bl_description = 'Remove animation / curve radius data'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-        objs = bpy.context.selected_objects
-        for i in objs: # Execute on multiple selected objects
-            bpy.context.scene.objects.active = i
-            obj = bpy.context.active_object
-            obj.animation_data_clear()
-            if obj.type == 'CURVE':
-                for sp in obj.data.splines:
-                    po = [p for p in sp.points] + [p for p in sp.bezier_points]
-                    for p in po:
-                        p.radius = 1
-        return{'FINISHED'}
-
-### Define Classes to register
-classes = [
-    TracerProperties,
-    TracerPropertiesMenu,
-    addTracerObjectPanel,
-    OBJECT_OT_convertcurve,
-    OBJECT_OT_objecttrace,
-    OBJECT_OT_objectconnect,
-    OBJECT_OT_writing,
-    OBJECT_OT_particletrace,
-    OBJECT_OT_traceallparticles,
-    OBJECT_OT_curvegrow,
-    OBJECT_OT_reset,
-    OBJECT_OT_fcnoise,
-    OBJECT_OT_meshfollow,
-    OBJECT_OT_materialChango,
-    OBJECT_OT_clearColorblender
-    ]
-
-def register():
-    for c in classes:
-        bpy.utils.register_class(c)
-    bpy.types.WindowManager.curve_tracer = bpy.props.PointerProperty(type=TracerProperties)
-    bpy.types.WindowManager.btrace_menu = bpy.props.PointerProperty(type=TracerPropertiesMenu, update=deselect_others)
-
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-    del bpy.types.WindowManager.curve_tracer
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/cmu_mocap_browser/__init__.py b/release/scripts/addons_contrib/cmu_mocap_browser/__init__.py
deleted file mode 100644
index c814880..0000000
--- a/release/scripts/addons_contrib/cmu_mocap_browser/__init__.py
+++ /dev/null
@@ -1,388 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 3
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8-80 compliant>
-
-# This script was developed with financial support from the Foundation for
-# Science and Technology of Portugal, under the grant SFRH/BD/66452/2009.
-
-
-bl_info = {
-    'name': "Carnegie Mellon University Mocap Library Browser",
-    'author': "Daniel Monteiro Basso <daniel at basso.inf.br>",
-    'version': (2012, 6, 1, 1),
-    'blender': (2, 6, 3),
-    'location': "View3D > Tools",
-    'description': "Assistant for using CMU Motion Capture data",
-    'warning': '',
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-                "Scripts/3D_interaction/CMU_Mocap_Library_Browser",
-    'tracker_url': "http://projects.blender.org/tracker/index.php?"\
-                   "func=detail&aid=29086",
-    'category': '3D View'}
-
-
-import os
-import bpy
-import bgl
-import blf
-import math
-from . import library
-
-
-def initialize_subjects():
-    """
-        Initializes the main object and the subjects (actors) list
-    """
-    while bpy.data.scenes[0].cmu_mocap_lib.subject_list:
-        bpy.data.scenes[0].cmu_mocap_lib.subject_list.remove(0)
-    for k, v in library.subjects.items():
-        n = bpy.data.scenes[0].cmu_mocap_lib.subject_list.add()
-        n.name = "{:d} - {}".format(k, v['desc'])
-        n.idx = k
-
-
-def update_motions(self, context):
-    """
-        Updates the motions list after a subject is selected
-    """
-    sidx = -1
-    if self.subject_active != -1:
-        sidx = self.subject_list[self.subject_active].idx
-    while self.motion_list:
-        self.motion_list.remove(0)
-    if sidx != -1:
-        for k, v in library.subjects[sidx]["motions"].items():
-            n = self.motion_list.add()
-            n.name = "{:d} - {}".format(k, v["desc"])
-            n.idx = k
-        self.motion_active = -1
-
-
-class ListItem(bpy.types.PropertyGroup):
-    name = bpy.props.StringProperty()
-    idx = bpy.props.IntProperty()
-
-
-class CMUMocapLib(bpy.types.PropertyGroup):
-    local_storage = bpy.props.StringProperty(
-        name="Local Storage",
-        subtype='DIR_PATH',
-        description="Location to store downloaded resources",
-        default="~/cmu_mocap_lib")
-    follow_structure = bpy.props.BoolProperty(
-        name="Follow Library Folder Structure",
-        description="Store resources in subfolders of the local storage",
-        default=True)
-    automatically_import = bpy.props.BoolProperty(
-        name="Automatically Import after Download",
-        description="Import the resource after the download is finished",
-        default=True)
-    subject_list = bpy.props.CollectionProperty(
-        name="subjects", type=ListItem)
-    subject_active = bpy.props.IntProperty(
-        name="subject_idx", default=-1, update=update_motions)
-    subject_import_name = bpy.props.StringProperty(
-        name="Armature Name",
-        description="Identifier of the imported subject's armature",
-        default="Skeleton")
-    motion_list = bpy.props.CollectionProperty(name="motions", type=ListItem)
-    motion_active = bpy.props.IntProperty(name="motion_idx", default=-1)
-    frame_skip = bpy.props.IntProperty(name="Fps Divisor", default=4,
-    # usually the sample rate is 120, so the default 4 gives you 30fps
-                          description="Frame supersampling factor", min=1)
-    cloud_scale = bpy.props.FloatProperty(name="Marker Cloud Scale",
-                          description="Scale the marker cloud by this value",
-                          default=1., min=0.0001, max=1000000.0,
-                          soft_min=0.001, soft_max=100.0)
-
-
-def draw_callback(self, context):
-    mid = int(360 * self.recv / self.fsize)
-    cx = 200
-    cy = 30
-    blf.position(0, 230, 23, 0)
-    blf.size(0, 20, 72)
-    blf.draw(0, "{0:2d}% of {1}".format(
-        100 * self.recv // self.fsize, self.hfsize))
-
-    bgl.glEnable(bgl.GL_BLEND)
-    bgl.glColor4f(.7, .7, .7, 0.8)
-    bgl.glBegin(bgl.GL_TRIANGLE_FAN)
-    bgl.glVertex2i(cx, cy)
-    for i in range(mid):
-        x = cx + 20 * math.sin(math.radians(float(i)))
-        y = cy + 20 * math.cos(math.radians(float(i)))
-        bgl.glVertex2f(x, y)
-    bgl.glEnd()
-
-    bgl.glColor4f(.0, .0, .0, 0.6)
-    bgl.glBegin(bgl.GL_TRIANGLE_FAN)
-    bgl.glVertex2i(cx, cy)
-    for i in range(mid, 360):
-        x = cx + 20 * math.sin(math.radians(float(i)))
-        y = cy + 20 * math.cos(math.radians(float(i)))
-        bgl.glVertex2f(x, y)
-    bgl.glEnd()
-
-    bgl.glDisable(bgl.GL_BLEND)
-    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-
-
-class CMUMocapDownloadImport(bpy.types.Operator):
-    bl_idname = "mocap.download_import"
-    bl_label = "Download and Import a file"
-
-    remote_file = bpy.props.StringProperty(
-        name="Remote File",
-        description="Location from where to download the file data")
-    local_file = bpy.props.StringProperty(
-        name="Local File",
-        description="Destination where to save the file data")
-    do_import = bpy.props.BoolProperty(
-        name="Manual Import",
-        description="Import the resource non-automatically",
-        default=False)
-
-    timer = None
-    fout = None
-    src = None
-    fsize = 0
-    recv = 0
-    cloud_scale = 1
-
-    def modal(self, context, event):
-        context.area.tag_redraw()
-        if event.type == 'ESC':
-            self.fout.close()
-            os.unlink(self.local_file)
-            return self.cancel(context)
-        if event.type == 'TIMER':
-            to_read = min(self.fsize - self.recv, 100 * 2 ** 10)
-            data = self.src.read(to_read)
-            self.fout.write(data)
-            self.recv += to_read
-            if self.fsize == self.recv:
-                self.fout.close()
-                return self.cancel(context)
-        return {'PASS_THROUGH'}
-
-    def cancel(self, context):
-        context.window_manager.event_timer_remove(self.timer)
-        context.region.callback_remove(self.handle)
-        if os.path.exists(self.local_file):
-            self.import_or_open()
-        return {'CANCELLED'}
-
-    def execute(self, context):
-        cml = bpy.data.scenes[0].cmu_mocap_lib
-        if not os.path.exists(self.local_file):
-            try:
-                os.makedirs(os.path.split(self.local_file)[0])
-            except:
-                pass
-            from urllib.request import urlopen
-            self.src = urlopen(self.remote_file)
-            info = self.src.info()
-            self.fsize = int(info["Content-Length"])
-            m = int(math.log10(self.fsize) // 3)
-            self.hfsize = "{:.1f}{}".format(
-                self.fsize * math.pow(10, -m * 3),
-                ['b', 'Kb', 'Mb', 'Gb', 'Tb', 'Eb', 'Pb'][m])  # :-p
-            self.fout = open(self.local_file, 'wb')
-            self.recv = 0
-            self.handle = context.region.\
-                callback_add(draw_callback, (self, context), 'POST_PIXEL')
-            self.timer = context.window_manager.\
-                event_timer_add(0.001, context.window)
-            context.window_manager.modal_handler_add(self)
-            return {'RUNNING_MODAL'}
-        else:
-            self.import_or_open()
-        return {'FINISHED'}
-
-    def import_or_open(self):
-        cml = bpy.data.scenes[0].cmu_mocap_lib
-        if cml.automatically_import or self.do_import:
-            if self.local_file.endswith("mpg"):
-                bpy.ops.wm.path_open(filepath=self.local_file)
-            elif self.local_file.endswith("asf"):
-                try:
-                    bpy.ops.import_anim.asf(
-                        filepath=self.local_file,
-                        from_inches=True,
-                        use_rot_x=True, use_rot_z=True,
-                        armature_name=cml.subject_import_name)
-                except AttributeError:
-                    self.report({'ERROR'}, "To use this feature "
-                        "please enable the Acclaim ASF/AMC Importer addon.")
-            elif self.local_file.endswith("amc"):
-                ob = bpy.context.active_object
-                if not ob or ob.type != 'ARMATURE' or \
-                    'source_file_path' not in ob:
-                    self.report({'ERROR'}, "Please select a CMU Armature.")
-                    return
-                try:
-                    bpy.ops.import_anim.amc(
-                        filepath=self.local_file,
-                        frame_skip=cml.frame_skip)
-                except AttributeError:
-                    self.report({'ERROR'}, "To use this feature please "
-                        "enable the Acclaim ASF/AMC Importer addon.")
-            elif self.local_file.endswith("c3d"):
-                try:
-                    bpy.ops.import_anim.c3d(
-                        filepath=self.local_file,
-                        from_inches=False,
-                        auto_scale=True,
-                        scale=cml.cloud_scale,
-                        show_names=False,
-                        frame_skip=cml.frame_skip)
-                except AttributeError:
-                    self.report({'ERROR'}, "To use this feature "
-                        "please enable the C3D Importer addon.")
-
-
-
-class CMUMocapConfig(bpy.types.Panel):
-    bl_idname = "object.cmu_mocap_config"
-    bl_label = "CMU Mocap Browser Configuration"
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        if not bpy:
-            return
-        cml = bpy.data.scenes[0].cmu_mocap_lib
-        layout = self.layout
-        layout.operator("wm.url_open",
-            text="Carnegie Mellon University Mocap Library",
-            icon='URL').url = 'http://mocap.cs.cmu.edu/'
-        layout.prop(cml, "local_storage")
-        layout.prop(cml, "follow_structure")
-        layout.prop(cml, "automatically_import")
-
-
-class CMUMocapSubjectBrowser(bpy.types.Panel):
-    bl_idname = "object.cmu_mocap_subject_browser"
-    bl_label = "CMU Mocap Subject Browser"
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        if not bpy:
-            return
-        layout = self.layout
-        cml = bpy.data.scenes[0].cmu_mocap_lib
-        # spare space... layout.label("Subjects")
-        layout.template_list(cml, "subject_list", cml, "subject_active")
-        layout.prop(cml, "subject_import_name")
-        if cml.subject_active != -1:
-            sidx = cml.subject_list[cml.subject_active].idx
-            remote_fname = library.skeleton_url.format(sidx)
-            tid = "{0:02d}".format(sidx)
-            local_path = os.path.expanduser(cml.local_storage)
-            if cml.follow_structure:
-                local_path = os.path.join(local_path, tid)
-            local_fname = os.path.join(local_path, tid + ".asf")
-            do_import = False
-            if os.path.exists(local_fname):
-                label = "Import Selected"
-                do_import = True
-            elif cml.automatically_import:
-                label = "Download and Import Selected"
-            else:
-                label = "Download Selected"
-
-            props = layout.operator("mocap.download_import",
-                                    text=label, icon='ARMATURE_DATA')
-            props.remote_file = remote_fname
-            props.local_file = local_fname
-            props.do_import = do_import
-
-
-class CMUMocapMotionBrowser(bpy.types.Panel):
-    bl_idname = "object.cmu_mocap_motion_browser"
-    bl_label = "CMU Mocap Motion Browser"
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        if not bpy:
-            return
-        layout = self.layout
-        cml = bpy.data.scenes[0].cmu_mocap_lib
-        # spare space... layout.label("Motions for selected subject")
-        layout.template_list(cml, "motion_list", cml, "motion_active")
-        if cml.motion_active == -1:
-            return
-        sidx = cml.subject_list[cml.subject_active].idx
-        midx = cml.motion_list[cml.motion_active].idx
-        motion = library.subjects[sidx]['motions'][midx]
-        fps = motion['fps']
-        ifps = fps // cml.frame_skip
-        # layout.label("Original capture frame rate: {0:d} fps.".format(fps))
-        # layout.label("Importing frame rate: {0:d} fps.".format(ifps))
-        row = layout.row()
-        row.column().label("Original: {0:d} fps.".format(fps))
-        row.column().label("Importing: {0:d} fps.".format(ifps))
-        layout.prop(cml, "frame_skip")
-        layout.prop(cml, "cloud_scale")
-        remote_fname = library.motion_url.format(sidx, midx)
-        tid = "{0:02d}".format(sidx)
-        local_path = os.path.expanduser(cml.local_storage)
-        if cml.follow_structure:
-            local_path = os.path.join(local_path, tid)
-        for target, icon, ext in (
-                ('Motion Data', 'POSE_DATA', 'amc'),
-                ('Marker Cloud', 'EMPTY_DATA', 'c3d'),
-                ('Movie', 'FILE_MOVIE', 'mpg')):
-            action = "Import" if ext != 'mpg' else "Open"
-            fname = "{0:02d}_{1:02d}.{2}".format(sidx, midx, ext)
-            local_fname = os.path.join(local_path, fname)
-            do_import = False
-            if os.path.exists(local_fname):
-                label = "{0} {1}".format(action, target)
-                do_import = True
-            elif cml.automatically_import:
-                label = "Download and {0} {1}".format(action, target)
-            else:
-                label = "Download {0}".format(target)
-            row = layout.row()
-            props = row.operator("mocap.download_import", text=label, icon=icon)
-            props.remote_file = remote_fname + ext
-            props.local_file = local_fname
-            props.do_import = do_import
-            row.active = ext in motion['files']
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.Scene.cmu_mocap_lib = bpy.props.PointerProperty(type=CMUMocapLib)
-    initialize_subjects()
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/cmu_mocap_browser/library.py b/release/scripts/addons_contrib/cmu_mocap_browser/library.py
deleted file mode 100644
index 68c255a..0000000
--- a/release/scripts/addons_contrib/cmu_mocap_browser/library.py
+++ /dev/null
@@ -1,7487 +0,0 @@
-#!/usr/bin/env python3
-#-*- coding:utf-8 -*-
-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 3
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-# This script was developed with financial support from the Foundation for
-# Science and Technology of Portugal, under the grant SFRH/BD/66452/2009.
-
-
-skeleton_url = "http://mocap.cs.cmu.edu:8080/subjects/{0:02d}/{0:02d}.asf"
-motion_url = "http://mocap.cs.cmu.edu:8080/subjects/{0:02d}/{0:02d}_{1:02d}."
-search_url = "http://mocap.cs.cmu.edu/search.php?subjectnumber=%&motion=%"
-
-# Carnegie Mellon University Mocap Library - http://mocap.cs.cmu.edu
-
-subjects = {1: {'desc': 'climb, swing, hang on playground equipment',
-     'motions': {1: {'desc': 'playground - forward jumps, turn around',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'playground - climb',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'playground - climb, hang, swing',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'playground - climb',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'playground - climb, go under',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'playground - climb, sit, dangle legs, descend',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'playground - climb, sit, dangle legs, jump down',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'playground - climb, sit, dangle legs, rock back, lower self to ground',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'playground - climb, hang, hold self up with arms straight, swing, drop, sit, dangle legs, go under',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'playground - climb, swing, lean back, drop',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'playground - climb, hang, lean over, jump down',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 12: {'desc': 'playground - climb, pull up, dangle, sit, lower self to ground',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 13: {'desc': 'playground - climb, go under, jump down',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 14: {'desc': 'playground - climb, jump down, dangle, legs push off against',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 2: {'desc': 'various expressions and human behaviors',
-     'motions': {1: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'run/jog',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'jump, balance',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'punch/strike',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'bend over, scoop up, rise, lift arm',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'swordplay',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'swordplay',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'swordplay',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'wash self',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 3: {'desc': 'walk on uneven terrain',
-     'motions': {1: {'desc': 'walk on uneven terrain',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'walk on uneven terrain',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'walk on uneven terrain',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'walk on uneven terrain',
-                     'files': ['c3d', 'amc', 'avi'],
-                     'fps': 120}}},
- 5: {'desc': 'modern dance',
-     'motions': {1: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'dance - expressive arms, pirouette',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'dance - sideways arabesque, turn step, folding arms',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'dance - sideways arabesque, folding arms, bending back',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'dance - quasi-cou-de-pied, raised leg above hip-height, jete en tourant',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'dance - cartwheel-like start, pirouettes, jete',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'dance - small jetes, attitude/arabesque, shifted-axis pirouette, turn',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'dance - rond de jambe in the air, jete, turn',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'dance - glissade devant, glissade derriere, attitude/arabesque',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'dance - glissade devant, glissade derriere, attitude/arabesque',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'dance - sideways steps, pirouette',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 12: {'desc': 'dance - arms held high, pointe tendue a terre, upper body rotation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 13: {'desc': 'dance - small jetes, pirouette',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 14: {'desc': 'dance - retire derriere, attitude/arabesque',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 15: {'desc': 'dance - retire derriere, attitude/arabesque',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 16: {'desc': 'dance - coupe dessous, jete en tourant',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 17: {'desc': 'dance - coupe dessous, grand jete en tourant',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 18: {'desc': 'dance - attitude/arabesque, jete en tourant, bending back',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 19: {'desc': 'dance - attitude/arabesque, jete en tourant, bending back',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 20: {'desc': 'dance - attitude/arabesque, jete en tourant, bending back',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 6: {'desc': 'dribble, shoot basketball',
-     'motions': {1: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'basketball - forward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'basketball - forward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'basketball - forward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'basketball - forward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'basketball - backward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'basketball - backward dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'basketball - sideways dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'basketball - sideways dribble',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'basketball - forward dribble, 90-degree left turns',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'basketball - forward dribble, 90-degree right turns',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 12: {'desc': 'basketball - forward dribble, 90-degree right turns, crossover dribble',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 13: {'desc': 'basketball - low, fast free style dribble, dribble through legs',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 14: {'desc': 'basketball - crossover dribble, shoot',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 15: {'desc': 'basketball - dribble, shoot',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 7: {'desc': 'walk',
-     'motions': {1: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'walk',
-                     'files': ['c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'slow walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'slow walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                 12: {'desc': 'brisk walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 8: {'desc': 'walk',
-     'motions': {1: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'slow walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'walk/stride',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'walk, exaggerated stride',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'walk',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'slow walk/stride',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 9: {'desc': 'run',
-     'motions': {1: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 2: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 3: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 4: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 5: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 6: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 7: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 8: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 9: {'desc': 'run',
-                     'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                     'fps': 120},
-                 10: {'desc': 'run',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 11: {'desc': 'run',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                 12: {'desc': 'navigate - walk forward, backward, sideways',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 10: {'desc': 'kick soccer ball',
-      'motions': {1: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 11: {'desc': 'kick soccer ball',
-      'motions': {1: {'desc': 'soccer - kick ball',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 12: {'desc': 'tai chi, walk',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'tai chi',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 13: {'desc': 'various everyday behaviors',
-      'motions': {1: {'desc': 'sit on high stool, stand up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'sit on high stool, stand up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'sit on high stool, stand up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'sit on stepstool, chin in hand',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'sit on stepstool, hands against chin, fidget, stand up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'sit on stepstool, hands against chin, elbow out, stand up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'unscrew bottlecap, drink soda',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'unscrew bottlecap, drink soda, screw on bottlecap',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'drink soda',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'jump up to grab, reach for, tiptoe',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'forward jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'jump up to grab, reach for, tiptoe',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'forward jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'boxing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'boxing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'forward jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'sweep floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'sweep floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'sweep floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'direct traffic, wave',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'direct traffic, wave, point',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'direct traffic, wave, point',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'jumping jacks, side twists, bend over, squats',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'jumping jacks, side twists, squats, jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'jumping jacks, side twists, bend over, jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'forward jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'climb ladder',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'climb ladder',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  38: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  39: {'desc': 'jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  40: {'desc': 'jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  41: {'desc': 'jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  42: {'desc': 'jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 14: {'desc': 'various everyday behaviors',
-      'motions': {1: {'desc': 'boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'drink soda, screw on bottlecap',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'unscrew bottlecap, drink soda',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'jumping jacks, jog, squats, side twists, stretches',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'jump up to grab, reach for, tiptoe',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'jump up to grab, reach for, tiptoe',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'jump up to grab, reach for, tiptoe',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'wash windows',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'mop floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'jumping jacks, jog, squats, side twists, stretches',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'mop floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'sweep floor',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'laugh',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'jumping jacks, side twists, reach up, bend over',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'climb 3 steps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'direct traffic, wave, point',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'direct traffic, wave, point',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'direct traffic, wave, point',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'sit on high stool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'sit on high stool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'sit on stepstool, stand up, swing legs',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'sit on stepstool, ankle on other knee, hand on chin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'sit on stepstool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'sit on stepstool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'climb ladder',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'climb ladder',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'climb ladder',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'sit on stepstool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'drink soda',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 15: {'desc': 'various everyday behaviors, dance moves',
-      'motions': {1: {'desc': 'walk/wander',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'climb, step over, sit on, stand on stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk/wander',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'wash windows, paint; hand signals; dance - Egyptian walk, the Dive, the Twist, the Cabbage Patch; boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'wash windows, paint; hand signals; dance - Egyptian walk, the Dive, the Twist, the Cabbage Patch; boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'lean forward, reach for',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'lean forward, tiptoe, reach for',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'hand signals - horizontally revolve forearms',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walk/wander',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'sit on high stool, stand up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'wash windows, paint figure eights; hand signals',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'wash windows; basketball - dribble, lay-up shot, pass; throw ball; dance - Egyptian walk, the Dive, the Twist; strew',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'boxing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk/wander',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 16: {'desc': 'run, jump, walk',
-      'motions': {1: {'desc': 'jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'high jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'high jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'forward jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'forward jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'forward jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'run/jog, sudden stop',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'forward jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'forward jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walk, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walk, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walk, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'walk, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'walk, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'walk, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'walk, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'walk, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'walk, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'walk, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'walk, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'walk, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'walk, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'walk, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'walk, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'slow walk, stop',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'slow walk, stop',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'run/jog, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  38: {'desc': 'run/jog, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  39: {'desc': 'run/jog, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  40: {'desc': 'run/jog, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  41: {'desc': 'run/jog, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  42: {'desc': 'run/jog, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  43: {'desc': 'run/jog, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  44: {'desc': 'run/jog, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  45: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  46: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  47: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  48: {'desc': 'run, veer left',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  49: {'desc': 'run, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  50: {'desc': 'run, veer right',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  51: {'desc': 'run, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  52: {'desc': 'run, 90-degree left turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  53: {'desc': 'run, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  54: {'desc': 'run, 90-degree right turn',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  55: {'desc': 'run',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  56: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  57: {'desc': 'run/jog, sudden stop',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  58: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 17: {'desc': 'different walking styles',
-      'motions': {1: {'desc': 'walk with anger, frustration',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk with anger, frustration',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk stealthily',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk stealthily',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walk/hobble',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'whistle, walk jauntily',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'whistle, walk jauntily',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': "muscular, heavyset person's walk",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': "muscular, heavyset person's walk",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'boxing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 18: {'desc': 'human interaction and communication (2 subjects - subject A)',
-      'motions': {1: {'desc': 'walk, shake hands (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk, shake hands (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'A pulls B; B resists (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'A pulls B; B resists (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'A pulls B by the elbow; B resists (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'A pulls B by the elbow; B resists (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'navigate busy sidewalk; A leads the way, takes B by the arm (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'conversation - explain with hand gestures (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'conversation - explain with hand gestures, walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'quarrel - angry hand gestures (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'quarrel - angry hand gestures (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'friends meet, hang out; A sits, B joins A (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'run, scramble for last seat (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'run, scramble for last seat (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'chicken dance (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 19: {'desc': 'human interaction and communication (2 subjects - subject B)',
-      'motions': {1: {'desc': 'walk, shake hands (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk, shake hands (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'A pulls B; B resists (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'A pulls B; B resists (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'A pulls B by the elbow; B resists (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'A pulls B by the elbow; B resists (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'navigate busy sidewalk; A leads the way, takes B by the arm (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'conversation - explain with hand gestures (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'conversation - explain with hand gestures, walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'quarrel - angry hand gestures (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'quarrel - angry hand gestures (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'friends meet, hang out; A sits, B joins A (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'run, scramble for last seat (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'run, scramble for last seat (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'chicken dance (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 20: {'desc': 'human interaction - at play, formations (2 subjects - subject A)',
-      'motions': {1: {'desc': 'chicken dance (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'link arms, walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'link arms, walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'synchronized walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'synchronized walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'soldiers march (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'soldiers march (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'zombie march (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'nursery rhyme - ring around the rosey (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': '360-degree two-person whip (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'high-five, walk (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'low-five, walk (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': "blind man's bluff (blindfold tag) (2 subjects - subject A)",
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 21: {'desc': 'human interaction - at play, formations (2 subjects - subject B)',
-      'motions': {1: {'desc': 'chicken dance (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'link arms, walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'link arms, walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'synchronized walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'synchronized walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'soldiers march (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'soldiers march (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'zombie march (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'nursery rhyme - ring around the rosey (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': '360-degree two-person whip (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'high-five, walk (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'low-five, walk (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': "blind man's bluff (blindfold tag) (2 subjects - subject B)",
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 22: {'desc': 'human interaction (2 subjects - subject A)',
-      'motions': {1: {'desc': 'B sits; A pulls up B (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'A sits; B pulls up A (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'A sits, holds face in hands; B kneels, comforts A (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': "B comforts A, puts one hand on A's shoulder (2 subjects - subject A)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': "A comforts B, puts both hands on B's shoulders (2 subjects - subject A)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': "B comforts A, puts both hands on A's shoulders (2 subjects - subject A)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': "A comforts B, puts one hand on B's shoulder (2 subjects - subject A)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'hold hands, swing arms, walk (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'A gives B a shoulder rub; B sits, A stands (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'A shelters B, a younger child, from harm (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'B shelters A, a younger child, from harm (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'A stumbles into B (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'A passes soda to B; both drink (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'alternating squats (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'alternating jumping jacks (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'synchronized jumping jacks (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'rush up, arm wrestle (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'A stares down B, leans with hands on high stool (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'B stares down A, leans with hands on high stool (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'violence - A picks up high stool, threatens to strike B (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'conversation - B pounds high stool, points at A (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'walk; B catches keys thrown by A (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'walk; A catches keys thrown by B (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'walk; B catches wallet thrown by A (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'walk; A catches wallet thrown by B (2 subjects - subject A)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 23: {'desc': 'human interaction (2 subjects - subject B)',
-      'motions': {1: {'desc': 'B sits; A pulls up B (subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'A sits; B pulls up A (subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'A sits, holds face in hands; B kneels, comforts A (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': "B comforts A, puts one hand on A's shoulder (2 subjects - subject B)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': "A comforts B, puts both hands on B's shoulders (2 subjects - subject B)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': "B comforts A, puts both hands on A's shoulders (2 subjects - subject B)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': "A comforts B, puts one hand on B's shoulder (2 subjects - subject B)",
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'hold hands, swing arms, walk (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'A gives B a shoulder rub; B sits, A stands (subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'A shelters B, a younger child, from harm (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'B shelters A, a younger child, from harm (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'A stumbles into B (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'A passes soda to B; both drink (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'alternating squats (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'alternating jumping jacks (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'synchronized jumping jacks (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'rush up, arm wrestle (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'A stares down B, leans with hands on high stool (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'B stares down A, leans with hands on high stool (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'violence - A picks up high stool, threatens to strike B (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'conversation - B pounds high stool, points at A (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'walk; B catches keys thrown by A (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'walk; A catches keys thrown by B (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'walk; B catches wallet thrown by A (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'walk; A catches wallet thrown by B (2 subjects - subject B)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 24: {'desc': 'nursery rhymes',
-      'motions': {1: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 25: {'desc': 'nursery rhymes',
-      'motions': {1: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg'],
-                      'fps': 120}}},
- 26: {'desc': 'nursery rhymes, basketball, bending',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'Alaska vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'Alaska vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'bend, pick up',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'bend, lift',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'bend, lift',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 27: {'desc': 'recreation, nursery rhymes',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'nursery rhyme - Cock Robin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 28: {'desc': 'recreation, nursery rhymes, animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'prairie dog (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'whale (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'snake (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'mouse (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'cat (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'elephant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'dinosaur (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 29: {'desc': 'recreation, nursery rhymes, animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'nursery rhyme - Cock Robin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'whale (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'cat (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'fish (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'elephant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'mouse (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'dinosaur (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'snake (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 30: {'desc': 'recreation, nursery rhymes, animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'nursery rhyme - Cock Robin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'whale (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'cat (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'elephant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'mouse (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'snake (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'Tyrannosaurus rex (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 31: {'desc': 'recreation, nursery rhymes, animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'whale (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'cat (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'elephant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'Tyrannosaurus rex (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'mouse (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'snake (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 32: {'desc': 'recreation, nursery rhymes, animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'nursery rhyme - Cock Robin',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'basketball signals',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'nursery rhyme - "I\'m a little teapot..."',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Alaskan vacation',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'nursery rhyme - Cock Robin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'Alaskan vacation',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'cat (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'elephant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'mouse (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'Tyrannosaurus rex (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'snake (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 33: {'desc': 'throw and catch football (2 subjects - subject A)',
-      'motions': {1: {'desc': 'football - throw, catch (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'football - throw, catch, jump around (2 subjects - subject A)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60}}},
- 34: {'desc': 'throw and catch football (2 subjects - subject B)',
-      'motions': {1: {'desc': 'football - throw, catch (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'football - throw, catch, jump around (2 subjects - subject B)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60}}},
- 35: {'desc': 'walk, run',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'run/jog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'navigate around obstacles',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 36: {'desc': 'walk on uneven terrain',
-      'motions': {1: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk forward, turn around, walk back',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk forward, turn around, walk back',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'walk on uneven terrain',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walk forward, turn around, walk back',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'walk on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'jump/hop on uneven terrain',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 37: {'desc': 'walk',
-      'motions': {1: {'desc': 'slow walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 38: {'desc': 'walk, run',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'run around in a circle',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk around, frequent turns, cyclic walk along a line',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 39: {'desc': 'climb, swing, hang on playground equipment',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walk forward, turn around, walk back',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 40: {'desc': 'navigate from corner to corner, interact with stepstool',
-      'motions': {2: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'climb, step over, sit on, jump over stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'climb, step over, jump over stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'climb, step over, jump over stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'climb, step over, jump over stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'wait for bus',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'wait for bus',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'basketball signals',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 41: {'desc': 'navigate from corner to corner, interact with stepstool',
-      'motions': {2: {'desc': 'navigate - walk forward, backward, sideways, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'navigate - walk forward, backward, sideways, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'navigate - walk forward, backward, on a diagonal',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'climb, step over, jump over, navigate around stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'climb, step over, jump over, navigate around stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'climb, step over, jump over, navigate around stepstool',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'basketball signals',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'basketball signals',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 42: {'desc': 'stretch',
-      'motions': {1: {'desc': 'stretch - rotate head, shoulders, arms, legs',
-                      'files': ['tvd', 'c3d', 'amc'],
-                      'fps': 60}}},
- 43: {'desc': 'swing on playground equipment',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'playground - grip bar, swing body',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'playground - grip bar, swing body',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 45: {'desc': 'walk',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 46: {'desc': 'walk',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 47: {'desc': 'walk',
-      'motions': {1: {'desc': 'walk forward, turn around, walk back',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 49: {'desc': 'modern dance, gymnastics',
-      'motions': {1: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'jump up and down, hop on one foot',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'jump up and down, hop on one foot',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'run, leap',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'run, leap',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'cartwheels',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'dance - arms held high, side arabesque',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'dance - fold in from side arabesque, curl inwards',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'dance - fold in from side arabesque, curl inwards',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'dance - lean forward, bring back leg forward, arching arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'dance - fold in from side arabesque, curl inwards',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'dance - lean forward, bring back leg forward, arching arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'static dance pose - folded in, head lowered, leg bent',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'dance - fold in from side arabesque, curl inwards',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'dance - lean forward, bring back leg forward, arching arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'balance on one leg, outstretched arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'balance on one leg, outstretched arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'balance on one leg, outstretched arms',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'acrobatics - spin/twirl, hang on ropes',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'dance - lean back on bent leg, balance, bend elbow by ear',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 54: {'desc': 'animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'monkey (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'bear (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'penguin (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'pterosaur (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'pterosaur (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'pterosaur (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'prairie dog (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'roadrunner (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'insect/praying mantis (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'ghost (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'penguin (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'dragon (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'dragon (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'superhero',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'squirrel (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'squirrel (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'squirrel - robotic like motion (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'follow path, walk around obstacles',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'follow path, walk around obstacles',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'follow path, walk around obstacles',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'hummingbird (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'chicken (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 55: {'desc': 'animal behaviors (pantomime - human subject)',
-      'motions': {1: {'desc': 'dance, whirl',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'lambada dance',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'genie (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'hummingbird (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'chicken (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'chicken (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'monkey (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'monkey (human subject)',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'hummingbird (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'animal (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'dancing bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'insect/praying mantis (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'prairie dog (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'roadrunner (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'panda (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'ghost (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'penguin (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'dragon (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'hippo ballerina (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'pterosaur (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'superhero',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'devil',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'various animals (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'dancing animal (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'monkey (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'dancing ant (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'monkey/bear (human subject)',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 56: {'desc': 'vignettes - locomotion, upper-body motions (focus: motion transitions)',
-      'motions': {1: {'desc': 'walk around',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'vignettes - fists up, wipe window, yawn, stretch, angrily grab, smash against wall',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'vignettes - fists up, wipe window, yawn, stretch, angrily grab, smash against wall, lift open window, throw punches, skip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'vignettes - fists up, wipe window, grab, lift open window, throw punches, yawn, stretch, walk, jump',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'vignettes - walk, drink water, run/jog, jump, wipe window, lift open window, throw punches, yawn, stretch',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'vignettes - throw punches, grab, skip, yawn, stretch, leap, lift open window, walk, jump/bound',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'vignettes - yawn, stretch, walk, run/jog, angrily grab, jump, skip, halt',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'vignettes - lift open window, smash against wall, hop, walk, run/jog, yawn, stretch',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 60: {'desc': 'salsa',
-      'motions': {1: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60}}},
- 61: {'desc': 'salsa',
-      'motions': {1: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'salsa dance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'salsa dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60}}},
- 62: {'desc': 'construction work, random motions',
-      'motions': {1: {'desc': 'bolt loosening, wrench',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'bolt tightening, wrench',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'sawing, hand saw',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'screwing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'screwing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'unscrewing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'hammering a nail',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'hammering a nail',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'pulling a nail',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'hammering sequence',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'cleaning up',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'hard days drink',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'moving a stool',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'opening umbrella',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'opening umbrella',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'closing umbrella',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'opening and closing umbrella',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'closing a box',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'opening a box',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'closing, moving and opening a box',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  21: {'desc': 'coiling a rope',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  22: {'desc': 'dynamic calibration',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  23: {'desc': 'bolt tightening',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  24: {'desc': 'bolt tightening, with putting bolt in',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  25: {'desc': 'bolt loosening, wrench',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60}}},
- 63: {'desc': 'golf',
-      'motions': {1: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120}}},
- 64: {'desc': 'golf',
-      'motions': {1: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Swing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'Swing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'Putt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'Putt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'Putt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'Putt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'Putt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'Placing Tee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'Placing Tee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'Placing Tee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'Placing Tee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'Placing Tee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'Placing Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'Placing Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'Placing Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'Placing Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'Placing Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'Picking up Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'Picking up Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'Picking up Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'Picking up Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'Picking up Ball',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 120}}},
- 69: {'desc': 'walking',
-      'motions': {1: {'desc': 'walk forward',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk forward',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk forward',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk forward',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walk forward',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'walk and turn (repeated)',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'walk and turn (repeated)',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'walk and turn (repeated)',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walk and turn (repeated)',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'walk and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walk and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walk and turn both directions (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walk, turn in place (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk, turn in place (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walk, turn in place (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'turn in place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'turn in place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'turn in place (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'turn in place (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'walk forward 90 degree right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'walk forward 90 degree right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'walk forward 90 degree right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'walk forward 90 degree right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'walk forward 90 degree left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'walk forward 90 degree left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'walk forward 90 degree left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'walk forward 90 degree left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'walk forward 90 degree smooth right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'walk forward 90 degree smooth right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'walk forward 90 degree smooth right turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'walk forward 90 degree smooth left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'walk forward 90 degree smooth left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'walk forward 90 degree smooth left turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  38: {'desc': 'walk backwards and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  39: {'desc': 'walk backward, turn in place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  40: {'desc': 'walk backward, turn in place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  41: {'desc': 'walk backward, turn in place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  42: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  43: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  44: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  45: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  46: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  47: {'desc': 'walk sideways and turn (repeated)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  48: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  49: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  50: {'desc': 'walk sideways and backwards',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  51: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  52: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  53: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  54: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  55: {'desc': 'walk backwards and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  56: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  57: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  58: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  59: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  60: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  61: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  62: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  63: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  64: {'desc': 'walk sideways and turn (opposite direction)',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  65: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  66: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  67: {'desc': 'walk sideways and turn',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  68: {'desc': 'walk forward and pick up object, set down object',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  69: {'desc': 'walk forward and pick up object, carry back object',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  70: {'desc': 'walk up to object, squat, pick up object, set down in another place.',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  71: {'desc': 'walk up to object, squat, pick up object, set down in another place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  72: {'desc': 'walk up to object, pick up object, set down in another place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  73: {'desc': 'walk up to object, lean over, pick up object, set down in another place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  74: {'desc': 'walk up to object, lean over, pick up object, set down in another place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  75: {'desc': 'walk up to object, squat, pick up object, set down in another place',
-                       'files': ['amc', 'avi'],
-                       'fps': 120}}},
- 70: {'desc': 'suitcase',
-      'motions': {1: {'desc': 'carry 5.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'carry 5.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'carry 19.5lb suitcase',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'carry 12.5lb suitcase',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'carry 12.5lb suitcase',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'carry 12.5lb suitcase',
-                       'files': ['amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'carry 12.5lb suitcase',
-                       'files': ['amc', 'avi'],
-                       'fps': 120}}},
- 74: {'desc': 'kicks and walking on slopes',
-      'motions': {1: {'desc': 'stiff walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'stiff walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'lifting up',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'lifting up',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  9: {'desc': '',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'peeping',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'peeping',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'thinker',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'Range of motion',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'slope 1',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'slope1',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'slope 2',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'slope 2',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'slope 3',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'slope 3',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'stiff walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60}}},
- 75: {'desc': 'jumps; hopscotch; sits',
-      'motions': {1: {'desc': 'run jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'run jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'run jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'wide leg run',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'cross leg run',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  6: {'desc': '180 jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'angle jumps',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  8: {'desc': '360 jumps',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  9: {'desc': '360 jump',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  10: {'desc': '2 jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  11: {'desc': '2 jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'box jump',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'hopscotch',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'hopscotch',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'long jumps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'jump kick',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'medium sit',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'high sit',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'medium sit',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'low sit',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60}}},
- 76: {'desc': 'avoidance',
-      'motions': {1: {'desc': 'walk backwards then attack with a punch',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk backwards, feign a few attacks, then attack',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'avoid attacker',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'defensive guard pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'swatting at pesky bug',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'avoid stepping on something',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'careful stepping over things',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walking backwards',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'turning',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'quick large steps backwards',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 77: {'desc': 'careful actions',
-      'motions': {1: {'desc': 'looking around',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'standing',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'ready stance',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'Looking around',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'look around with flashlight',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'searching ground',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'poking ground',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'investigating thing on ground with two hands',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'duck to avoid flying object',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'careful run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'careful run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'careful run in circle',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'careful run in figure eight',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'careful creeping',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'careful creeping',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'laying down, getting up, careful ready pose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'laying down, getting up, careful ready pose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'laying down on back, getting up, careful ready pose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'limping, hurt right leg',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'limping, hurt right leg',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  21: {'desc': 'stretching',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  22: {'desc': 'limping, hurt right leg',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  23: {'desc': 'limping, hurt right leg',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  24: {'desc': 'limping, hurt right leg',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  25: {'desc': 'careful walk and search',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  26: {'desc': 'careful walk and search',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  27: {'desc': 'careful walk and search',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  28: {'desc': 'careful walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  29: {'desc': 'creeping walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  30: {'desc': 'creeping walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  31: {'desc': 'silent walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  32: {'desc': 'creeping walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  33: {'desc': 'creeping with limp',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  34: {'desc': 'creep and pause, repeat',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60}}},
- 78: {'desc': 'walking',
-      'motions': {1: {'desc': 'LeftTightTurn         CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'RightWideTurn            CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'LeftWideTurn     CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'SuperTightLeft        CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'SuperTightRight         CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'RunningStraight       CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'RunningWideRight       CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'RunningWideLeft      CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'RunningTigherLeft      CleanedGRS',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'RunningTighterRight      CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'calibration',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'RunningNoBall     CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'OffensiveMoveSpinLeft            CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'OffensiveMoveSpinLeft      CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'OffensiveMoveGoRight     CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'OffensiveMoveGoLeft         CleanedGRs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'OffensiveMoveSpinRight             CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'WalkEvasiveLeft      CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'WalkEvasiveRight              CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'FeintLeftMoveRight            CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'FeintRightMoveLeft      CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'FakeShotBreakRight     CleanedGRs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'FakeShotBreakLeft            CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'DefensiveStraightNoStop          CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'DefensiveStraightWithStop          CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'DefensiveRightStopToStop           CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'DefensiveLeftStopToStop              CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'DefensiveMoveZigZag           CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'DefensiveMoveSideToSide           CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'DefensiveMoveSideToSide           CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'Pivoting     CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'SraightDriveFromStop          Cleaned GRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'RightDrive (left then right)    Cleaned GRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'LeftDrive (right then left)    Cleaned GRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'RightTightTurn    CleanedGRS',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 79: {'desc': 'actor everyday activities',
-      'motions': {1: {'desc': 'chopping wood',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'swimming',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'swimming',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'digging',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'sewing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'hand shake',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'lost marker',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'boxing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'slicing bread',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'chopping onions',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'Subject calibration',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'eating dinner',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'mixing batter',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'making dough',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'eating a sandwich',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'buying something',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'playing violin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'playing drums',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'playing piano',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'hanging a picture',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  21: {'desc': 'putting on a pull over',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  22: {'desc': 'range of motion',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  23: {'desc': 'putting on a jacket',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  24: {'desc': 'putting on button up sweater',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  25: {'desc': 'moving heavy box',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  26: {'desc': 'planting a tree',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  27: {'desc': 'planting a plant',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  28: {'desc': 'putting on a ball cap',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  29: {'desc': 'putting on a dress',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  30: {'desc': 'pushing a swing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  31: {'desc': 'writing on a chalkboard',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  32: {'desc': 'writing on a chalkboard',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  33: {'desc': 'chug a beer',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  34: {'desc': 'fishing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  35: {'desc': 'fishing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  36: {'desc': 'answering the phone',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  37: {'desc': 'dialing phone',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  38: {'desc': 'drinking water',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  39: {'desc': 'sipping martinee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  40: {'desc': 'drinking a soda',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  41: {'desc': 'sipping coffee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  42: {'desc': 'eating soup',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  43: {'desc': 'painting',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  44: {'desc': 'washing a window',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  45: {'desc': 'bear',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  46: {'desc': 'bear',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  47: {'desc': 'chicken',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  48: {'desc': 'elephant',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  49: {'desc': 'monkey',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  50: {'desc': 'mouse',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  51: {'desc': 'chipmunk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  52: {'desc': 'prairie dog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  53: {'desc': 'dog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  54: {'desc': 'snake',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  55: {'desc': 'sweeping',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  56: {'desc': 'T-rex',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  57: {'desc': 'fish',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  58: {'desc': 'bird',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  59: {'desc': 'cat',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  60: {'desc': 'chicken',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  61: {'desc': 'cow',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  62: {'desc': 'chicken',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  63: {'desc': 'tiger',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  64: {'desc': 'penguin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  65: {'desc': 'horse',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  66: {'desc': 'movie and trial dont match',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  67: {'desc': 'no movie',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 60},
-                  68: {'desc': 'cold',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  69: {'desc': 'very happy',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  70: {'desc': 'laughing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  71: {'desc': 'sad',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  72: {'desc': 'crying',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  73: {'desc': 'scared',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  74: {'desc': 'upset',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  75: {'desc': 'channel surfing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  76: {'desc': 'driving',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  77: {'desc': 'vacuuming',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  78: {'desc': 'taking a movie',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  79: {'desc': 'putting on headphones',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  80: {'desc': 'using a palm pilot',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  81: {'desc': 'brushing teeth',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  82: {'desc': 'putting on deoderant',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  83: {'desc': 'shaving',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  84: {'desc': 'combing hair',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  85: {'desc': 'typing on a laptop',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  86: {'desc': 'shooting bow and arrow',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  87: {'desc': 'raking',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  88: {'desc': 'swatting at a fly',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  89: {'desc': 'holding a baby',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  90: {'desc': 'washing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  91: {'desc': 'football',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  92: {'desc': 'frisbee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  93: {'desc': 'weight lifting',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  94: {'desc': 'flexing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  95: {'desc': 'rowing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  96: {'desc': 'shooting a gun',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60}}},
- 80: {'desc': 'assorted motions',
-      'motions': {1: {'desc': 'shaking hands',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'chopping onions',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'shooting a gun',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'sewing',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'digging a hole',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'paying for something',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'hanging picture',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'picking up something',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'planting a flower',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'boxing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'putting on a sweater',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  12: {'desc': 'fishing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  13: {'desc': 'drumming',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  14: {'desc': 'teaching',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  15: {'desc': 'putting on a coat',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  16: {'desc': 'mixing batter',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  17: {'desc': 'hand mixing dough',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  18: {'desc': 'vacuuming',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  19: {'desc': 'pushing broom',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  20: {'desc': 'planting',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  21: {'desc': 'pushing swing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  22: {'desc': 'putting on a hat',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  23: {'desc': 'putting on a skirt',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  24: {'desc': 'eating',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  25: {'desc': 'answering a phone',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  26: {'desc': 'dialing phone',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  27: {'desc': 'setting glass of water',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  28: {'desc': 'drinking and smoking',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  29: {'desc': 'chugging',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  30: {'desc': 'range of motion',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  31: {'desc': 'making coffee',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  32: {'desc': 'slicing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  33: {'desc': 'eating soup',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  34: {'desc': 'rake leaves',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  35: {'desc': 'putting on headphones',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  36: {'desc': 'violin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  37: {'desc': 'TV',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  38: {'desc': 'driving',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  39: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  40: {'desc': 'drinking from bottle',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  41: {'desc': 'freezing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  42: {'desc': 'freezing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  43: {'desc': 'happy',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  44: {'desc': 'laughing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  45: {'desc': 'crying',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  46: {'desc': 'crying',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  47: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  48: {'desc': 'arguing',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  49: {'desc': 'gorilla',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  50: {'desc': 'cleaning window',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  51: {'desc': 'chicken',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  52: {'desc': 'dog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  53: {'desc': 'elephant',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  54: {'desc': 'monkey',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  55: {'desc': 'mouse',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  56: {'desc': 'chip monk',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  57: {'desc': 'prairie dog',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  58: {'desc': 'snake',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  59: {'desc': 'panther',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  60: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  61: {'desc': 'sweeping',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  62: {'desc': 'bird',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  63: {'desc': 'chicken',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  64: {'desc': 'cat',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  65: {'desc': 'fish',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  66: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  67: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  68: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  69: {'desc': 'painting',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  70: {'desc': 'piano',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  71: {'desc': 'chopping wood',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  72: {'desc': 'swimming',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  73: {'desc': 'shaking hands',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60}}},
- 81: {'desc': 'pushing a box; jumping off a ledge; walks',
-      'motions': {1: {'desc': 'fix hair and walk forward',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk forward',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walk',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walk at a brisk pace',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'push heavy object',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'push heavy box',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'pull heavy object',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'drag heavy object',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'drag heavy object',
-                      'files': ['tvd', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'push object that is high in air',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'push object that is high in air',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'jump backwards off ledge',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'jump backwards off ledge',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'climb backwards off ledge',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'climb backwards off ledge',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'walk forward',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'adjust hair walk forward',
-                       'files': ['tvd', 'amc', 'avi'],
-                       'fps': 120}}},
- 82: {'desc': 'jumping; pushing; emotional walks',
-      'motions': {1: {'desc': 'Static pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'Jump off ledge',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Jump off ledge',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Jump off ledge',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'sitting on ground relaxing',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'Pushing on heavy object',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'Pushing on heavy object',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'stand still; casual walk forward',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'confident walk forward',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'sad walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'normal walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'happy or fast walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'normal walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'walk forward and slow down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walk forward and turn sideways',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'bang on high object',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'bang on high object',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'static pose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 83: {'desc': 'steps',
-      'motions': {1: {'desc': 'large sidestep to right',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'sidestep to the right and up a ledge',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'large step to a short ledge',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'large sidestep to right',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'very large sidestep to right',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'very large sidestep to right and down',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'short sidestep to right and down',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'medium step forward and down',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'short step forward and down',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'medium step forward and down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'static pose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'medium sidestep to right and down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'large sidestep to right',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'short sidestep to left and down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'short step forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'medium sidestep to left and down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'medium step to left and down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'short step to left and forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'medium sidestep to left',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'medium step forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'large step to left and forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'stretching',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'short sidestep to left and up',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'medium step to left and up',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'short step forward and up',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'medium step to left, forward, and up',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'walk forward stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'sidestep to right then back to left',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'walk forward and up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'walk forward and stepping up stairs',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'walk forward turn 90 degrees left walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'walk forward turn 90 degrees right walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  38: {'desc': 'walk forward turn 90 degrees left walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  39: {'desc': 'walk forward turn 90 degrees right walk forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  40: {'desc': 'hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  41: {'desc': 'hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  42: {'desc': 'long jump forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  43: {'desc': 'long jump forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  44: {'desc': 'medium step forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  45: {'desc': 'hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  46: {'desc': 'medium hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  47: {'desc': 'long jump forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  48: {'desc': 'short hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  49: {'desc': 'medium hop forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  50: {'desc': 'long jump forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  51: {'desc': 'hop turn 90 degrees left in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  52: {'desc': 'hop turn 90 degrees left in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  53: {'desc': 'hop turn 90 degrees left in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  54: {'desc': 'hop turn 180 degrees left in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  55: {'desc': 'medium sidestep to right',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  56: {'desc': 'hop turn left 180 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  57: {'desc': 'hop turn left 180 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  58: {'desc': 'hop turn left 270 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  59: {'desc': 'hop turn left 270 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  60: {'desc': 'hop turn left 270 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  61: {'desc': 'hop turn 360 degrees left in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  62: {'desc': 'hop turn left 360 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  63: {'desc': 'large sidestep to right and forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  64: {'desc': 'hop and turn right 360 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  65: {'desc': 'hop and turn right 360 degrees in air',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  66: {'desc': 'short sidestep to right',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  67: {'desc': 'short sidestep to the right',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  68: {'desc': 'medium sidestep to right',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 85: {'desc': 'jumps; flips; breakdance',
-      'motions': {1: {'desc': 'JumpTwist',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'JumpTwist',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'UpRightSequence',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'FancyFootWork',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'HandStandKicks',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'KickFlip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'KickFlipStumble',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'Helicopter',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'motorcycle pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'EndofBreakDance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'UpRightSequence',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'LongSequenceGood',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'BadStartSequnce',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'BreakSequencewithFlips',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': '90TwistsFall',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 86: {'desc': 'sports and various activities',
-      'motions': {1: {'desc': 'jumps kicks and punches',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'walk, squats, run, stretch, jumps, punches, and drinking',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'walking, running, jumping, kicking, and stretching',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'walking, stretching, punching, chopping, and drinking',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'walking, jumping, jumping jacks,  jumping on one foot, punching, chopping,',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'walking, running, kicking, punching, knee kicking, and stretching',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'walking, swinging arms, stretching, jumping on one leg, and jumping',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'walking, squats, stretching, kicking, and punching',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'walking, sitting, looking, stand up',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'walk around, sit, stand up, and running',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'walking, stretching, walking and turning',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'walking, dragging, sweeping, dustpan, wipe window, and wipe mirror',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'walking around, walk up ladder, step down ladder',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'bouncing basketball, shooting basketball, dribble basketball, two handed dribble',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'walking, sitting, hand motions',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 87: {'desc': 'acrobatics',
-      'motions': {1: {'desc': 'Jump with kick and spin',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'T-Pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'Backflip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'backflip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'cartwheels',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60}}},
- 88: {'desc': 'acrobatics',
-      'motions': {1: {'desc': 'backflip',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'backflips, jump onto platform, handstands, vertical pushups',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'motorcycle pose',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'stretches, cartwheels, flips, spin kicks, spins, and fall',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'cartwheel into backflip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'jump and spin kick',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  7: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  8: {'desc': 'crouch and flip backward on hands',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  9: {'desc': 'stretch and cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  10: {'desc': 'stretch and spin',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60},
-                  11: {'desc': 'stretches and jumps',
-                       'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                       'fps': 60}}},
- 89: {'desc': 'acrobatics',
-      'motions': {1: {'desc': 'balance object on forehead',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  2: {'desc': 'motorcycle pose',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  3: {'desc': 'flip and stand on one hand',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  4: {'desc': 'spins, flips, stand on one hand',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  5: {'desc': 'spin upside down, handstand, flips',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60},
-                  6: {'desc': 'balance beam',
-                      'files': ['tvd', 'c3d', 'amc', 'mpg', 'avi'],
-                      'fps': 60}}},
- 90: {'desc': 'cartwheels; acrobatics; dances',
-      'motions': {1: {'desc': 'bkwd summersult',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'cartwheel',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'jump kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'jump kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'jump kick',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'side flip',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'Flip forward onto hands and back again',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                  11: {'desc': 'hand spring',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'bck flp twst fall',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'bck flp twst fall',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'front hand flip',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'front hand flip',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'fall on face',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'BannanaPeelSlip',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'RugPullFall',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'monkey backflip',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'monkey sequence',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'monkey sequence',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'straight walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'straight walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'ball mount',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'fwd ball walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'fwd ball walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'bwk ball walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'breakdance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'sequesnce',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'russian dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'russian dance',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'moonwalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'arm up wide leg roll',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'wide leg roll',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'wide leg roll',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'wide leg roll',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 91: {'desc': 'walks and turns',
-      'motions': {1: {'desc': 'Walk digital figure eight',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'WalkStraight',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'Walk figure eight',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'Walking',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'Mummy Walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'Motorcycle Pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'mummy8',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'mummyDigital8',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': 'DrunkWalk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': 'SlowWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': 'LavishWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': 'TooCoolWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': 'SadWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': 'DepressedWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': 'ClumsyWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': 'Limp',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  17: {'desc': 'QuickWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  18: {'desc': 'CarefulWalk LookingAround',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  19: {'desc': 'March',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  20: {'desc': 'ShyWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  21: {'desc': 'acheyWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  22: {'desc': 'CasualQuickWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  23: {'desc': 'CoolWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  24: {'desc': 'HurtLegWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  25: {'desc': 'DragBadLegWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  26: {'desc': 'HurtStomachWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  27: {'desc': 'SlowWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  28: {'desc': 'GhettoWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  29: {'desc': 'NormalWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  30: {'desc': 'SexyWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  31: {'desc': 'NormalWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  32: {'desc': 'ScaredWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  33: {'desc': 'MachoWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  34: {'desc': 'NormalWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  35: {'desc': 'TrafficWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  36: {'desc': 'WalkStraight',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  37: {'desc': 'Forward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  38: {'desc': 'SmallForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  39: {'desc': 'JumpForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  40: {'desc': 'JumpForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  41: {'desc': 'JumpForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  42: {'desc': 'JumpForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  43: {'desc': 'JumpSmallForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  44: {'desc': 'JumpSmallForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  45: {'desc': 'JumpForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  46: {'desc': 'Jump Turn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  47: {'desc': 'Jump Turn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  48: {'desc': 'JumpTurn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  49: {'desc': 'Jump Turn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  50: {'desc': 'JumpTurn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  51: {'desc': 'FurtherJumpTurn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  52: {'desc': 'SmallJumpTurn',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  53: {'desc': '180 degree jump',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  54: {'desc': '180',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  55: {'desc': '180',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  56: {'desc': '90',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  57: {'desc': 'WalkForward',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  58: {'desc': '270',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  59: {'desc': '360 smallStumble',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  60: {'desc': '360',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  61: {'desc': '360',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  62: {'desc': 'walkFigure8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 93: {'desc': 'Charleston Dance',
-      'motions': {1: {'desc': 'Motorcycle Pose',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': 'rangeOfMotion',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': 'charleston_01',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': 'charleston_side_by_side_female',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': 'charleston_side_by_side_male',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': 'lindyHop2',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': 'Casual Walk',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': 'xtra fancY charleston',
-                      'files': ['tvd', 'c3d', 'amc', 'avi'],
-                      'fps': 120}}},
- 94: {'desc': 'indian dance',
-      'motions': {1: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  2: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  3: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  4: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  5: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  6: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  7: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  8: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  9: {'desc': '',
-                      'files': ['c3d', 'amc', 'avi'],
-                      'fps': 120},
-                  10: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  11: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  12: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  13: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  14: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  15: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                  16: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 102: {'desc': 'Basketball',
-       'motions': {1: {'desc': 'RightWideTurn',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   2: {'desc': 'LeftWideTurn',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   3: {'desc': 'SuperTightLeft',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   4: {'desc': 'SuperTightRight',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   5: {'desc': 'RunningStraight',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   6: {'desc': 'RunningWideRight',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   7: {'desc': 'RunningWideLeft',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   8: {'desc': 'RunningTighterRight',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   9: {'desc': 'calibration',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   10: {'desc': 'RunningNoBall',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   11: {'desc': 'OffensiveMoveSpinLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   12: {'desc': 'OffensiveMoveSpinLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   13: {'desc': 'OffensiveMoveGoRight',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   14: {'desc': 'OffensiveMoveGoLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   15: {'desc': 'OffensiveMoveSpinRight',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   16: {'desc': 'WalkEvasiveLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   17: {'desc': 'WalkEvasiveRight',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   18: {'desc': 'FeintLeftMoveRight',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   19: {'desc': 'FeintRightMoveLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   20: {'desc': 'FakeShotBreakRight',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   21: {'desc': 'FakeShotBreakLeft',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   22: {'desc': 'DefensiveStraightNoStop',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   23: {'desc': 'DefensiveStraightWithStop',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   24: {'desc': 'DefensiveRightStopToStop',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   25: {'desc': 'DefensiveLeftStopToStop',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   26: {'desc': 'DefensiveMoveZigZag',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   27: {'desc': 'DefensiveMoveSideToSide',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   28: {'desc': 'DefensiveMoveSideToSide',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   29: {'desc': 'Pivoting',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   30: {'desc': 'SraightDriveFromStop',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   31: {'desc': 'RightDrive (left then right)',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   32: {'desc': 'LeftDrive (right then left)',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   33: {'desc': 'RightTightTurn',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120}}},
- 103: {'desc': 'Charelston Dancing',
-       'motions': {1: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'rangeOfMotion_01',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'charleston_01',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'charleston_side_by_side_female',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'charleston_side_by_side_male',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'lindyHop2',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Casual Walk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'xtra fancY charleston',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 104: {'desc': 'motion',
-       'motions': {1: {'desc': 'JogThrough',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'neutral Male walk, exact footfalls',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Frankenstein male walk, exact footfalls',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'JogThrough',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'StartJog',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'StartJog',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'JogStop',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'JogStop',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'HappyGoLuckWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'ExcitedWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'StumbleWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'HappyStartWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'SpasticWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'SpasticStop',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'SpasticStop',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'CasualWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'RegularWalk8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'RegularWalkRightAngleTurns',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'SternWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'SternWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'SternWalk8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'SternWalkRightAngleTurns',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'SlowWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'SlowWalk8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'RunThrough',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'SlowWalkRightAngleTurns',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'ZombieWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'ZombieWalk8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   43: {'desc': 'ZombieWalkRightAngleTurns',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   44: {'desc': 'AttitudeWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   45: {'desc': 'AttitudeWalk8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   46: {'desc': 'AttitudeWalkRightAngleTurns',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   47: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   48: {'desc': 'RunThrough',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   49: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   50: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   51: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   52: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   53: {'desc': 'StartRun',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   54: {'desc': 'StartRun',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   55: {'desc': 'StartRun',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   56: {'desc': 'RunStop',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   57: {'desc': 'RunStop',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 105: {'desc': 'motion',
-       'motions': {1: {'desc': 'WalkDigital8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'WalkStraight',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Walk8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Digital8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'mummyWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'MotorCyclePose',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'mummy8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'mummyDigital8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'DrunkWalk',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'SlowWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'LavishWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'TooCoolWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'SadWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'DepressedWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'ClumsyWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Limp',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'QuickWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'CarefulWalk LookingAround',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'March',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'ShyWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'acheyWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'CasualQuickWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'CoolWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'HurtLegWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'DragBadLegWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'HurtStomachWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'SlowWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'GhettoWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'NormalWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'SexyWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'NormalWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'ScaredWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'MachoWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'NormalWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'TrafficWalk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'WalkStraight',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Forward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'SmallForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'JumpForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'JumpForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'JumpForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'JumpForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   43: {'desc': 'JumpSmallForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   44: {'desc': 'JumpSmallForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   45: {'desc': 'JumpForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   46: {'desc': 'Jump Turn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   47: {'desc': 'Jump Turn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   48: {'desc': 'JumpTurn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   49: {'desc': 'Jump Turn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   50: {'desc': 'JumpTurn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   51: {'desc': 'FurtherJumpTurn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   52: {'desc': 'SmallJumpTurn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   53: {'desc': '180',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   54: {'desc': '180',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   55: {'desc': '180',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   56: {'desc': '90',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   57: {'desc': 'WalkForward',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   58: {'desc': '270',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   59: {'desc': '360 smallStumble',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   60: {'desc': '360',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   61: {'desc': '360',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   62: {'desc': 'walkFigure8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 106: {'desc': 'Female General Subject',
-       'motions': {1: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   2: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   3: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   4: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   5: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   6: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   7: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   8: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   9: {'desc': 'clean',
-                       'files': ['tvd', 'c3d', 'amc'],
-                       'fps': 120},
-                   10: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   11: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   12: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   13: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   14: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   15: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   16: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   17: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   18: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   19: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   20: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   21: {'desc': 'bad AMC',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   22: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   23: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   24: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   25: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   26: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   27: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   28: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   29: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   30: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   31: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   32: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   33: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120},
-                   34: {'desc': 'clean',
-                        'files': ['tvd', 'c3d', 'amc'],
-                        'fps': 120}}},
- 107: {'desc': 'Walking with obstacles 1',
-       'motions': {1: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': '',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': '',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 108: {'desc': 'Walking with obstacles 2',
-       'motions': {1: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': '',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 111: {'desc': 'Pregnant Woman',
-       'motions': {1: {'desc': 'Walk backwards',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Bow',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Crawling',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Curtsey',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Dance',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Get up from floor',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Get up from floor',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Get up from floor',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Get up from chair',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'get up from chair',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'get up from chair',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Lay down',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'March',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Mope',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Peekaboo',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Pick up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Pick up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Punch Kick',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Ring around the rosie',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Roll over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Range of motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Shrug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Walk sideways',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Walking up stairs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Standing still',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Stepping over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Stepping over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Stepping up / stepping down',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Stretch and yawn',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Throwing',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Walk and carry',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Wave',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 113: {'desc': 'Post pregnant woman',
-       'motions': {1: {'desc': 'Walk backwards',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Bow',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Curtsey',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Dance',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Walk digital 8',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Walk figure 8',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Lay down and get up',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'March',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Walk, mope around',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Peekaboo',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Punch and kick',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Ring around the rosie',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Sit in chair and get up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Shrug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Walk sideway',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Walk sideways',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walking up and down stairs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Walk up and down stairs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Standing Still',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Step over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Stretch and yawn',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Throw',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Walk and carry',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Wave',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Yoga',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 114: {'desc': 'Pregnant Woman',
-       'motions': {1: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Getting up from laying down',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Range of motion',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Getting up from chair',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Sitting in chair',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Getting up from chair',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Walking up and down stairs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Walking up and down stairs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Walking up and down stairs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Stretching',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Laying down and getting up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Stretching',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Sit down and stretch',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 115: {'desc': 'Bending over',
-       'motions': {1: {'desc': 'Pick up box, bend from waist',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Pick box up, bend from waist',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Pick box up, bend from waist',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Pick box up, bend from waist',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Pick box up, bend from waist',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Picking box up, bending knees',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Picking box up, bending knees',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Picking box up, bending knees',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Picking box up, bending knees',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Pick box up, bend from waist',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 118: {'desc': 'Jumping',
-       'motions': {1: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Range of motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 120: {'desc': 'Various Style Walks',
-       'motions': {1: {'desc': 'Alien Turn',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Gorilla',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Mickey cast spell',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Mickey Conducting',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Mickey Dance',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Mickey Dance',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Mickey Dance',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Mickey sneaky walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Mickey sneaking walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Mickey sneaking walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Mickey sneaking walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Mickey sneaking walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Mickey sneaking walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Mickey sneaking walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Mickey Surprised',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Mickey Surprised',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Mickey Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Mickey Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walk slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Robot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Zombie',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 122: {'desc': 'Varying Height and Length Steps',
-       'motions': {1: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'clean',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': '',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   43: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   44: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   45: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   46: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   47: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   48: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   49: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   50: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   51: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   52: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   53: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   54: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   55: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   56: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   57: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   58: {'desc': 'cleaned',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   59: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   60: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   61: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   62: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   63: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   64: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   65: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   66: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   67: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   68: {'desc': 'clean',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 123: {'desc': 'Carry Suitcase with Varying Weights',
-       'motions': {1: {'desc': '15.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': '15.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': '19.5lb',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': '19.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': '19.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': '19.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': '12.5lb',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': '12.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': '12.5 lbs',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': '12.5lb',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': '15.5 lbs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': '15.5 lbs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': '15.5 lbs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 124: {'desc': 'Sports Related Motions',
-       'motions': {1: {'desc': 'Baseball Pitch',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Baseball Pitch',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Basketball Shoot',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Basketball Free Throw',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Basketball Jump Shot',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Basketball Lay Up',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Baseball Swing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Baseball Bunt',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Frisbee',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': '2 Foot Jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Underhand Toss',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Underhand Fast Pitch',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 125: {'desc': 'Swimming',
-       'motions': {1: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Break Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Butterfly',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Free Style',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 126: {'desc': 'Swimming 2',
-       'motions': {1: {'desc': 'Back Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Back Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Breast Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Fly Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Fly Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Fly Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Fly Stroke',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Free Style',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Free Style',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Free Style',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Range of Motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 127: {'desc': 'Action Adventure Obstacles, running, jumping, ducking, rolling',
-       'motions': {1: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Range of Motion',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Walk to Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Run to Quick Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Run Right',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Run Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Run Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Run Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Run Side Step Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Run Side Step Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Run Turn Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Run Turn Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Run Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Run Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Run Quick Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Run Quick Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Run Jump Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Run Jump Stop Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Run Dive Over Roll Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Run Dive Over Roll Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Run Jump Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Run Jump Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Run Jump Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Run Jump Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Run Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Run Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Run Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Run Over',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Run Duck Underneath',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 128: {'desc': 'Action Adventure Motions running, ducking, rolling, stopping',
-       'motions': {1: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Run Left',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Run Right',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Run Duck Underneath',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Run Stop Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Run Stop Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Run Stop Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Run Stop Run',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Run Roll Underneath',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Run Dive Over Roll Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Run Dive Over Roll Run',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 131: {'desc': 'Michael Jackson Styled Motions',
-       'motions': {1: {'desc': 'Start Walk Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Start Walk Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Start Hop Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Start Hop Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Start Duck Underneath Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Start Duck Underneath Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Jump Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Jump Stop',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Start Walk Left',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Start Walk Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Start Walk Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Start Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Start Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Start Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 132: {'desc': 'Varying Weird Walks',
-       'motions': {1: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Walk With Arms Out,  balancing',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Walk With Arms Out,  balancing',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Walk With Arms Out,  balancing',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Walk With Arms Out,  balancing',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Walk Backwards',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Walk Duck Footed',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Walk With Knees Bent',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Walk Crossover',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Walk Fast',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Hop on left foot',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Bouncy Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Walk Leaning To The Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Walk Leaning To The Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Marching',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'Pigeon Toed Walking',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'Walk With Stiff Arms',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'Walk With Stiff Arms',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'Walk Swinging Shoulders',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   43: {'desc': 'Walk Swinging Shoulders',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   44: {'desc': 'Walk Swinging Shoulders',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   45: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   46: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   47: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   48: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   49: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   50: {'desc': 'Walk Slow',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   51: {'desc': 'Tpose',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   52: {'desc': 'Range of Motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   53: {'desc': 'Walk With Legs Apart',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   54: {'desc': 'Walk With Wild Arms',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   55: {'desc': 'Walk With Wild Legs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   56: {'desc': 'Walk With Wild Legs',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 133: {'desc': 'Baby Styled Walk',
-       'motions': {1: {'desc': 'Walk Crawl',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Walk Crawl',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Walk Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Walk Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Walk Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Walk Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Walk Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Stretch Walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Stretch Walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Stretch Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Walk Stop Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Walk Stop Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Walk Stop Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Walk Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Walk Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Walk Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Walk Right',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Walk ZigZag',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Range of Motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 134: {'desc': 'Skateboard Motions',
-       'motions': {1: {'desc': 'Duck Under',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Go Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Lean Turn Right',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Pump Jump',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Push Turn Left',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Push Turn Left',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Push Turn Right',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Push Turn Right',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Start',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Start',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Stop and Go',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Stop and Go',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Stop ang Go',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Lean Turn Left',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 135: {'desc': 'Martial Arts Walks',
-       'motions': {1: {'desc': 'Bassai',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Empi',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Empi',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Front Kick',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Gedanbarai',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Heiansyodan',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Mawashigeri',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Motorcycle',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Oiduki',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Syutouuke',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Yokogeri',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 136: {'desc': 'Weird Walks',
-       'motions': {1: {'desc': 'Walk Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Walk Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Walk Backwards Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Walk Backwards Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Walk on Toes Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Walk on Toes Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Walk Backward on Toes Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Walk Backward on Toes Bent Forward',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Walk Crouched',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Walk Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Walk Backwards Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Walk Backwards Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Walk on Toes Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Walk on Toes Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Walk Backwards on Toes Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Walk Backwards on Toes Crouched',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Flamingo, lift legs high',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Flamingo, lift legs high',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Motorcycle',
-                        'files': ['amc', 'avi'],
-                        'fps': 60},
-                   20: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Normal Walk Backwards',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Normal Walk Backwards',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Walk on Toes',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Walk on Toes',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Walk Backwards on Toes',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Walk Backwards on Toes',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Quail, quick little steps',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Quail, quick little steps',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Range of Motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 137: {'desc': 'Stylized Motions',
-       'motions': {1: {'desc': 'Cat Coffee Mug',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Cat Pick Up',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Cat Wait',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Cat Walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Chicken Coffee Mug',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Chicken Pick Up',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Chicken Wait',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Chicken Walk',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Dinosaur Coffee Mug',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Dinosaur Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Dinosaur Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Dinosaur Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Drunk Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Drunk Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Drunk Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Drunk Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Gangly Teen Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Gangly Teen Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Gangly Teen Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Gangly Teen Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Graceful Lady Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Graceful Lady Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Graceful Lady Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Graceful Lady Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Motorcycle',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Normal Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Normal Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Normal Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Normal Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Old Man Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Old Man Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Old Man Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Old Man Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Range of Motion',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Sexy Lady Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Sexy Lady Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Sexy Lady Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Sexy Lady Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'Strong Man Coffee Mug',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'Strong Man Pick Up',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'Strong Man Wait',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'Strong Man Walk',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 138: {'desc': 'Marching, Walking and Talking',
-       'motions': {1: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Marching',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Marching',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   43: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   44: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   45: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   46: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   47: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   48: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   49: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   50: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   51: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   52: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   53: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   54: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   55: {'desc': 'Story',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 139: {'desc': 'Action Walks, sneaking, wounded, looking around',
-       'motions': {1: {'desc': 'Looking Around',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Shifting Weight',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Looking Around',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Looking Around',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Pulling a Gun',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Poking Around On The Ground',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Poking Around On The Ground',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Poking Around On The Ground',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Ducking',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Run',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Run To Sneak',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Run in Circles',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Run in Circles',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Sneak Sideways',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Sneak Sideways',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Get Up From Ground',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Get Up From Ground',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Get Up From Ground Laying on Back',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walk Wounded Leg',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Walk Wounded Leg',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Range Of Motion',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Walk Wounded Leg',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Walk Wounded Leg',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Walk Wounded Leg',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Giving Directions',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Looking Around',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Looking Around',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Walking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Sneaking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Walking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Sneaking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Sneaking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Sneaking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Sneaking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 140: {'desc': 'Getting Up From Ground',
-       'motions': {1: {'desc': 'Get Up Face Down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Get Up Face Down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Get Up Laying on Side',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Get Up Laying on Side',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Motorcycle',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Idle',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Idle',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Get Up From Ground Laying on Back',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Get Up From Ground Laying on Back',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120}}},
- 141: {'desc': 'General Subject Capture',
-       'motions': {1: {'desc': 'Run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Jump Distances',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Jump Sideways',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Jump Twist',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Walk Up and Over',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Steop On Walk Down',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Step Over',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Toss and Catch',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Throw and Catch',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Dance, Twist',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Stretch and Yawn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Punch and Kick',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Range of Motion',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Wave Hello',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Sit on Stool',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Peek a Boo',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Walk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Waiting',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Shrug',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'High Five',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Shake Hands',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Around the world High Five Low',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Walk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Curtsey',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Mope',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Slap Hands, Throw it Back',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Random Walk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Random Walk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Walk Backwards',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Walk Sideways, Cross Legs',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Walk Sideways, Foot to Foot',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Run',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 142: {'desc': 'Stylized Walks',
-       'motions': {1: {'desc': 'Childish',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Clumsy',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Clumsy',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Cool',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Depressed',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Elated',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Elderlyman',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Happy',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Joy',
-                       'files': ['c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Lavish',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Marching',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Painfulleftknee',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Relaxed',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Rushed',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Sad',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Scared',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Scared',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Sexy',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Shy',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Singing in the rain jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Singing in the rain jump',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Sneaky',
-                        'files': ['c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 143: {'desc': 'General Subject Capture',
-       'motions': {1: {'desc': 'Run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   2: {'desc': 'Run to Stop',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   3: {'desc': 'Start to Run',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   4: {'desc': 'Run Figure 8',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   5: {'desc': 'Jumping Distances',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   6: {'desc': 'Jumping Heights',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   7: {'desc': 'Jumping Sideways',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   8: {'desc': 'Jumping Twists',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   9: {'desc': 'Jumping Twists',
-                       'files': ['tvd', 'c3d', 'amc', 'avi'],
-                       'fps': 120},
-                   10: {'desc': 'Walk And Pick up Tool Box',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   11: {'desc': 'Walk And Pick up Box',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   12: {'desc': 'Walk And Pick up Toolbox',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   13: {'desc': 'Walk and Pick up Laundry Basket',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   14: {'desc': 'Walk And Step Over',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   15: {'desc': 'Walk And Step Over',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   16: {'desc': 'Walk And Step Over',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   17: {'desc': 'Walk Up Stairs And Over',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   18: {'desc': 'Sit Down And Get Up',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   19: {'desc': 'Sit On Stool And Get Up',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   20: {'desc': 'Catch And Throw',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   21: {'desc': 'Range Of Motion',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   22: {'desc': 'Catch And Throw Football',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   23: {'desc': 'Punching',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   24: {'desc': 'Kicking',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   25: {'desc': 'Waving',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   26: {'desc': 'Washing Window',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   27: {'desc': 'Washing Window',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   28: {'desc': 'Sweeping, Push Broom',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   29: {'desc': 'Pacing',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   30: {'desc': 'Stretch And Yawn',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   31: {'desc': 'Hopscotch',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   32: {'desc': 'Walk',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   33: {'desc': 'Peek A Boo',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   34: {'desc': 'Chicken Dance',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   35: {'desc': 'Macarena Dance',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   36: {'desc': 'Airplane',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   37: {'desc': 'Climb Up And Down Ladder',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   38: {'desc': 'Walk Digital 8',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   39: {'desc': 'Walk Backwards',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   40: {'desc': 'Walk Sideways',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   41: {'desc': 'Sneak',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120},
-                   42: {'desc': 'Run',
-                        'files': ['tvd', 'c3d', 'amc', 'avi'],
-                        'fps': 120}}},
- 144: {'desc': 'punching female',
-       'motions': {1: {'desc': 'Cartwheels',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   2: {'desc': 'Cartwheels001',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   3: {'desc': 'Figure8s',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   4: {'desc': 'Figure8s001',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   5: {'desc': 'Front_Kicking',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   6: {'desc': 'Front_Kicking001',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   7: {'desc': 'Left_Blocks',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   8: {'desc': 'Left_Blocks001',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   9: {'desc': 'Left_Front_Kicking',
-                       'files': ['c3d', 'amc'],
-                       'fps': 120},
-                   10: {'desc': 'Left_Front_Kicking001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   11: {'desc': 'Left_Lunges',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   12: {'desc': 'Left_Lunges001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   13: {'desc': 'Left_Punch_Sequence001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   14: {'desc': 'Left_Punch_Sequence002',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   15: {'desc': 'Left_Spin_reach001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   16: {'desc': 'Left_Spin_reach002',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   17: {'desc': 'Lunges',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   18: {'desc': 'Lunges001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   19: {'desc': 'motorcycle pose',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   20: {'desc': 'Punch_Sequence',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   21: {'desc': 'Punch_Sequence001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   22: {'desc': 'Reach_Left001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   23: {'desc': 'Reach_Left002',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   24: {'desc': 'Reach_Right',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   25: {'desc': 'Reach_Right001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   26: {'desc': 'Right_Blocks',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   27: {'desc': 'Right_Blocks001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   28: {'desc': 'Right_Spin_reach',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   29: {'desc': 'Right_Spin_reach001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   30: {'desc': 'Sun Salutation',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   31: {'desc': 'Sun Salutation001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   32: {'desc': 'Sun Salutation002',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   33: {'desc': 'Walking',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120},
-                   34: {'desc': 'Walking001',
-                        'files': ['c3d', 'amc'],
-                        'fps': 120}}}}
-
-# End of Mocap Library
-
-if __name__ == '__main__':
-    # The following is the code that compiled the data above.
-    # If you execute this file it should output to stdout the exact same code.
-
-    import re
-    import os
-    from pprint import pformat
-    from urllib.request import urlopen
-
-    subjects_re = re.compile(
-        r"(?ms)909090.*?Subject\ \#(?P<subjno>\d+)\s+(?P<desc>[^<]*).*?"
-        r"(?P<subjskel>http.*?asf).*?BGCOLOR(?P<motionBlock>.*?)/TR>\n")
-    motions_re = re.compile(
-        r"(?ms)<TD>(?P<motno>\d+)</TD><TD>(?P<desc>[^<].*?)"
-        r"</TD>(?P<urls>.*?)<TD>(?P<fps>\d+)</TD>")
-    urls_re = re.compile('(http.*?)(...)"')
-    myself_re = re.compile(r"(?ms)(.*# Carnegie.*?\n).*?(# End of.*$)")
-
-    subjects = {}
-    if not os.path.exists("search.html"):
-        src = urlopen(search_url)
-        data = src.read()
-        with open("search.html", 'wb') as out:
-            out.write(data)
-    for match in subjects_re.finditer(open("search.html", 'rt').read()):
-        d = match.groupdict()
-        sub = subjects.setdefault(int(d['subjno']), {})
-        sub['desc'] = d['desc'][1:-2]
-        assert(d['subjskel'] == skeleton_url.format(int(d['subjno'])))
-        sub['motions'] = {}
-        for m2 in motions_re.finditer(d['motionBlock']):
-            d2 = m2.groupdict()
-            mot = sub['motions'].setdefault(int(d2['motno']), {})
-            mot['desc'] = d2['desc'].strip()
-            mot['fps'] = int(d2['fps'])
-            for u in urls_re.finditer(d2['urls']):
-                murl = motion_url.format(int(d['subjno']), int(d2['motno']))
-                assert(u.group(1) == murl)
-                mot.setdefault('files', []).append(u.group(2))
-
-    m = myself_re.match(open(__file__).read())
-    print("{0}\nsubjects={1}\n\n{2}".format(
-            m.group(1), pformat(subjects), m.group(2)), end='')
diff --git a/release/scripts/addons_contrib/cursor_control/__init__.py b/release/scripts/addons_contrib/cursor_control/__init__.py
deleted file mode 100644
index ed014f5..0000000
--- a/release/scripts/addons_contrib/cursor_control/__init__.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-# Blender Add-Ons menu registration (in User Prefs)
-bl_info = {
-    'name': 'Cursor Control',
-    'author': 'Morgan Mörtsell (Seminumerical)',
-    'version': (0, 7, 0),
-    'blender': (2, 5, 9),
-    'location': 'View3D > Properties > Cursor',
-    'description': 'Control the Cursor',
-    'warning': 'buggy, may crash other addons', # used for warning icon and text in addons panel
-    'wiki_url': 'http://blenderpythonscripts.wordpress.com/',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-                   'func=detail&aid=27253',
-    'category': '3D View'}
-
-
-
-import bpy
-
-# To support reload properly, try to access a package var, if it's there, reload everything
-if "local_var" in locals():
-    import imp
-    imp.reload(data)
-    imp.reload(ui)
-    imp.reload(operators)
-    imp.reload(history)
-    imp.reload(memory)
-else:
-    from cursor_control import data
-    from cursor_control import ui
-    from cursor_control import operators
-    from cursor_control import history
-    from cursor_control import memory
-
-local_var = True
-
-def register():
-    bpy.utils.register_module(__name__)
-    # Register Cursor Control Structure
-    bpy.types.Scene.cursor_control = bpy.props.PointerProperty(type=data.CursorControlData, name="")
-    bpy.types.Scene.cursor_history = bpy.props.PointerProperty(type=history.CursorHistoryData, name="")
-    bpy.types.Scene.cursor_memory  = bpy.props.PointerProperty(type=memory.CursorMemoryData, name="")
-    # Register menu
-    bpy.types.VIEW3D_MT_snap.append(ui.menu_callback)
-
-def unregister():
-    # Register menu
-    bpy.types.VIEW3D_MT_snap.remove(ui.menu_callback)
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/cursor_control/data.py b/release/scripts/addons_contrib/cursor_control/data.py
deleted file mode 100644
index fcd82d1..0000000
--- a/release/scripts/addons_contrib/cursor_control/data.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-"""
-  TODO:
-
-      IDEAS:
-
-      LATER:
-
-      ISSUES:
-          Bugs:
-          Mites:
-
-      QUESTIONS:
-
-
-"""
-
-
-
-import bpy
-import bgl
-import math
-from mathutils import Vector, Matrix
-from mathutils import geometry
-from misc_utils import *
-from constants_utils import *
-from cursor_utils import *
-from ui_utils import *
-from geometry_utils import *
-
-
-PRECISION = 4
-
-
-class CursorControlData(bpy.types.PropertyGroup):
-    # Step length properties
-    stepLengthEnable = bpy.props.BoolProperty(name="Use step length",description="Use step length",default=0)
-    stepLengthMode = bpy.props.EnumProperty(items=[
-        ("Mode", "Mode", "Mode"),
-        ("Absolute", "Absolute", "Absolute"),
-        ("Proportional", "Proportional", "Proportional")],
-        default="Proportional")
-    stepLengthValue = bpy.props.FloatProperty(name="",precision=PRECISION,default=PHI)
-    # Property for linex result select...
-    linexChoice = bpy.props.IntProperty(name="",default=-1)
-    deltaVector = bpy.props.FloatVectorProperty(name="",precision=PRECISION,default=(1,0,0))
-
-    def hideLinexChoice(self):
-        self.linexChoice = -1
-
-    def cycleLinexCoice(self,limit):
-        qc = self.linexChoice + 1
-        if qc<0:
-            qc = 1
-        if qc>=limit:
-            qc = 0
-        self.linexChoice = qc
-  
-    def setCursor(self,v):
-        if self.stepLengthEnable:
-            c = CursorAccess.getCursor()
-            if((Vector(c)-Vector(v)).length>0):
-                if self.stepLengthMode=='Absolute':
-                    v = Vector(v)-Vector(c)
-                    v.normalize()
-                    v = v*self.stepLengthValue + Vector(c)
-                if self.stepLengthMode=='Proportional':
-                    v = (Vector(v)-Vector(c))*self.stepLengthValue + Vector(c)
-        CursorAccess.setCursor(Vector(v))
-        
-    def guiStates(self,context):
-        tvs = 0
-        tes = 0
-        tfs = 0
-        edit_mode = False
-        obj = context.active_object
-        if (context.mode == 'EDIT_MESH'):
-            if (obj and obj.type=='MESH' and obj.data):
-                tvs = obj.data.total_vert_sel
-
-                tes = obj.data.total_edge_sel
-                tfs = obj.data.total_face_sel
-                edit_mode = True
-        return (tvs, tes, tfs, edit_mode)
-
-    def invertDeltaVector(self):
-        self.deltaVector = Vector([0,0,0])-Vector(self.deltaVector)
-
-    def normalizeDeltaVector(self):
-        q = Vector(self.deltaVector)
-        q.normalize()
-        self.deltaVector = q
-
-    def addDeltaVectorToCursor(self):
-        c = CursorAccess.getCursor()
-        CursorAccess.setCursor(Vector(c)+Vector(self.deltaVector))
-
-    def subDeltaVectorToCursor(self):
-        c = CursorAccess.getCursor()
-        CursorAccess.setCursor(Vector(c)-Vector(self.deltaVector))
diff --git a/release/scripts/addons_contrib/cursor_control/history.py b/release/scripts/addons_contrib/cursor_control/history.py
deleted file mode 100644
index 14f354d..0000000
--- a/release/scripts/addons_contrib/cursor_control/history.py
+++ /dev/null
@@ -1,288 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-"""
-  TODO:
-
-      IDEAS:
-
-      LATER:
-
-      ISSUES:
-          Bugs:
-              Seg-faults when unregistering addon...
-          Mites:
-            * History back button does not light up on first cursor move.
-              It does light up on the second, or when mouse enters the tool-area
-            * Switching between local and global view triggers new cursor position in history trace.
-            * Each consecutive click on the linex operator triggers new cursor position in history trace.
-                 (2011-01-16) Was not able to fix this because of some strange script behaviour
-                              while trying to clear linexChoice from addHistoryLocation
-
-      QUESTIONS:
-
-
-
-"""
-
-
-
-import bpy
-import bgl
-import math
-from mathutils import Vector, Matrix
-from mathutils import geometry
-from misc_utils import *
-from constants_utils import *
-from cursor_utils import *
-from ui_utils import *
-
-
-
-class CursorHistoryData(bpy.types.PropertyGroup):
-    # History tracker
-    historyDraw = bpy.props.BoolProperty(description="Draw history trace in 3D view",default=1)
-    historyDepth = 144
-    historyWindow = 12
-    historyPosition = [-1] # Integer must be in a list or else it can not be written to
-    historyLocation = []
-    #historySuppression = [False] # Boolean must be in a list or else it can not be written to
-
-    def addHistoryLocation(self, l):
-        if(self.historyPosition[0]==-1):
-            self.historyLocation.append(l.copy())
-            self.historyPosition[0]=0
-            return
-        if(l==self.historyLocation[self.historyPosition[0]]):
-            return
-        #if self.historySuppression[0]:
-            #self.historyPosition[0] = self.historyPosition[0] - 1
-        #else:
-            #self.hideLinexChoice()
-        while(len(self.historyLocation)>self.historyPosition[0]+1):
-            self.historyLocation.pop(self.historyPosition[0]+1)
-        #self.historySuppression[0] = False
-        self.historyLocation.append(l.copy())
-        if(len(self.historyLocation)>self.historyDepth):
-            self.historyLocation.pop(0)
-        self.historyPosition[0] = len(self.historyLocation)-1
-        #print (self.historyLocation)
-
-    #def enableHistorySuppression(self):
-        #self.historySuppression[0] = True
-
-    def previousLocation(self):
-        if(self.historyPosition[0]<=0):
-            return
-        self.historyPosition[0] = self.historyPosition[0] - 1
-        CursorAccess.setCursor(self.historyLocation[self.historyPosition[0]].copy())
-
-    def nextLocation(self):
-        if(self.historyPosition[0]<0):
-            return
-        if(self.historyPosition[0]+1==len(self.historyLocation)):
-            return
-        self.historyPosition[0] = self.historyPosition[0] + 1
-        CursorAccess.setCursor(self.historyLocation[self.historyPosition[0]].copy())
-
-
-
-class VIEW3D_OT_cursor_previous(bpy.types.Operator):
-    """Previous cursor location"""
-    bl_idname = "view3d.cursor_previous"
-    bl_label = "Previous cursor location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_history
-        cc.previousLocation()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_next(bpy.types.Operator):
-    """Next cursor location"""
-    bl_idname = "view3d.cursor_next"
-    bl_label = "Next cursor location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_history
-        cc.nextLocation()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_history_show(bpy.types.Operator):
-    """Show cursor trace"""
-    bl_idname = "view3d.cursor_history_show"
-    bl_label = "Show cursor trace"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_history
-        cc.historyDraw = True
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_history_hide(bpy.types.Operator):
-    """Hide cursor trace"""
-    bl_idname = "view3d.cursor_history_hide"
-    bl_label = "Hide cursor trace"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_history
-        cc.historyDraw = False
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_PT_cursor_history(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Cursor History"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        # Display in object or edit mode.
-        cc = context.scene.cursor_history
-        cc.addHistoryLocation(CursorAccess.getCursor())
-        if (context.area.type == 'VIEW_3D' and
-            (context.mode == 'EDIT_MESH'
-            or context.mode == 'OBJECT')):
-            return 1
-
-        return 0
-
-    def draw_header(self, context):
-        layout = self.layout
-        cc = context.scene.cursor_history
-        if cc.historyDraw:
-            GUI.drawIconButton(True, layout, 'RESTRICT_VIEW_OFF', "view3d.cursor_history_hide", False)
-        else:
-            GUI.drawIconButton(True, layout, 'RESTRICT_VIEW_ON' , "view3d.cursor_history_show", False)
-
-    def draw(self, context):
-        layout = self.layout
-        sce = context.scene
-        cc = context.scene.cursor_history
-
-        row = layout.row()
-        row.label("Navigation: ")
-        GUI.drawIconButton(cc.historyPosition[0]>0, row, 'PLAY_REVERSE', "view3d.cursor_previous")
-        #if(cc.historyPosition[0]<0):
-            #row.label("  --  ")
-        #else:
-            #row.label("  "+str(cc.historyPosition[0])+"  ")
-        GUI.drawIconButton(cc.historyPosition[0]<len(cc.historyLocation)-1, row, 'PLAY', "view3d.cursor_next")
-
-        row = layout.row()
-        col = row.column()
-        col.prop(CursorAccess.findSpace(), "cursor_location")
-
-  
-                
-
-class VIEW3D_PT_cursor_history_init(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Register callback"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    initDone = False
-
-    @classmethod
-    def poll(cls, context):
-        if VIEW3D_PT_cursor_history_init.initDone:
-            return 0
-        print ("Cursor History draw-callback registration...")
-        sce = context.scene
-        if context.area.type == 'VIEW_3D':
-            for reg in context.area.regions:
-                if reg.type == 'WINDOW':
-                    # Register callback for SL-draw
-                    reg.callback_add(
-                        cursor_history_draw,
-                        (cls,context),
-                        'POST_PIXEL')
-                    VIEW3D_PT_cursor_history_init.initDone = True
-                    print ("Cursor History draw-callback registered")
-                    # Unregister to prevent double registration...
-                    # Started to fail after v2.57
-                    # bpy.types.unregister(VIEW3D_PT_cursor_history_init)
-        else:
-            print("View3D not found, cannot run operator")
-        return 0
-
-    def draw_header(self, context):
-        pass
-
-    def draw(self, context):
-        pass
-
-
-
-def cursor_history_draw(cls,context):
-    cc = context.scene.cursor_history
-
-    draw = 0
-    if hasattr(cc, "historyDraw"):
-        draw = cc.historyDraw
-
-    if(draw):
-        bgl.glEnable(bgl.GL_BLEND)
-        bgl.glShadeModel(bgl.GL_FLAT)
-        alpha = 1-PHI_INV
-        # History Trace
-        if cc.historyPosition[0]<0:
-            return
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        ccc = 0
-        for iii in range(cc.historyWindow+1):
-            ix_rel = iii - int(cc.historyWindow / 2)
-            ix = cc.historyPosition[0] + ix_rel
-            if(ix<0 or ix>=len(cc.historyLocation)):
-                continue
-            ppp = region3d_get_2d_coordinates(context, cc.historyLocation[ix])
-            if(ix_rel<=0):
-                bgl.glColor4f(0, 0, 0, alpha)
-            else:
-                bgl.glColor4f(1, 0, 0, alpha)
-            bgl.glVertex2f(ppp[0], ppp[1])
-            ccc = ccc + 1
-        bgl.glEnd()
diff --git a/release/scripts/addons_contrib/cursor_control/memory.py b/release/scripts/addons_contrib/cursor_control/memory.py
deleted file mode 100644
index 1d2d9db..0000000
--- a/release/scripts/addons_contrib/cursor_control/memory.py
+++ /dev/null
@@ -1,307 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-"""
-  TODO:
-
-      IDEAS:
-	  Add/Subtract
-	  
-      LATER:
-
-      ISSUES:
-          Bugs:
-          Mites:
-	      CTRL-Z forces memory to world origin (0,0,0)... why??
-		  Happens only if undo reaches 'default world state'
-		  How to Reproduce:
-		      1. File->New
-		      2. Move 3D-cursor
-		      3. Set memory
-		      4. Move cube
-		      5. CTRL-Z
-
-      QUESTIONS:
-  
-  
-"""
-
-
-
-import bpy
-import bgl
-import math
-from mathutils import Vector, Matrix
-from mathutils import geometry
-from misc_utils import *
-from constants_utils import *
-from cursor_utils import *
-from ui_utils import *
-
-
-
-PRECISION = 4
-
-
-
-class CursorMemoryData(bpy.types.PropertyGroup):
-
-    savedLocationDraw = bpy.props.BoolProperty(description="Draw SL cursor in 3D view",default=1)
-    savedLocation = bpy.props.FloatVectorProperty(name="",description="Saved Location",precision=PRECISION)
-
-
-class VIEW3D_OT_cursor_memory_save(bpy.types.Operator):
-    """Save cursor location"""
-    bl_idname = "view3d.cursor_memory_save"
-    bl_label = "Save cursor location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_memory
-        cc.savedLocation = CursorAccess.getCursor()
-        CursorAccess.setCursor(cc.savedLocation)
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_memory_swap(bpy.types.Operator):
-    """Swap cursor location"""
-    bl_idname = "view3d.cursor_memory_swap"
-    bl_label = "Swap cursor location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        location = CursorAccess.getCursor().copy()
-        cc = context.scene.cursor_memory
-        CursorAccess.setCursor(cc.savedLocation)
-        cc.savedLocation = location
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_memory_recall(bpy.types.Operator):
-    """Recall cursor location"""
-    bl_idname = "view3d.cursor_memory_recall"
-    bl_label = "Recall cursor location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_memory
-        CursorAccess.setCursor(cc.savedLocation)
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_memory_show(bpy.types.Operator):
-    """Show cursor memory"""
-    bl_idname = "view3d.cursor_memory_show"
-    bl_label = "Show cursor memory"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_memory
-        cc.savedLocationDraw = True
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_memory_hide(bpy.types.Operator):
-    """Hide cursor memory"""
-    bl_idname = "view3d.cursor_memory_hide"
-    bl_label = "Hide cursor memory"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_memory
-        cc.savedLocationDraw = False
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_PT_cursor_memory(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Cursor Memory"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        # Display in object or edit mode.
-        if (context.area.type == 'VIEW_3D' and
-            (context.mode == 'EDIT_MESH'
-            or context.mode == 'OBJECT')):
-            return 1
-
-        return 0
-
-    def draw_header(self, context):
-        layout = self.layout
-        cc = context.scene.cursor_memory
-        if cc.savedLocationDraw:
-            GUI.drawIconButton(True, layout, 'RESTRICT_VIEW_OFF', "view3d.cursor_memory_hide", False)
-        else:
-            GUI.drawIconButton(True, layout, 'RESTRICT_VIEW_ON' , "view3d.cursor_memory_show", False)
-        #layout.prop(sce, "cursor_memory.savedLocationDraw")
-
-    def draw(self, context):
-        layout = self.layout
-        sce = context.scene
-        cc = context.scene.cursor_memory
-
-        row = layout.row()
-        col = row.column()
-        row2 = col.row()
-        GUI.drawIconButton(True, row2, 'FORWARD', "view3d.cursor_memory_save")
-        row2 = col.row()
-        GUI.drawIconButton(True, row2, 'FILE_REFRESH', "view3d.cursor_memory_swap")
-        row2 = col.row()
-        GUI.drawIconButton(True, row2, 'BACK'        , "view3d.cursor_memory_recall")
-        col = row.column()
-        col.prop(cc, "savedLocation")
-
-
-
-class VIEW3D_PT_cursor_memory_init(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Register callback"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    initDone = False
-
-    @classmethod
-    def poll(cls, context):
-        if VIEW3D_PT_cursor_memory_init.initDone:
-            return 0
-        print ("Cursor Memory draw-callback registration...")
-        sce = context.scene
-        if context.area.type == 'VIEW_3D':
-            for reg in context.area.regions:
-                if reg.type == 'WINDOW':
-                    # Register callback for SL-draw
-                    reg.callback_add(
-                        cursor_memory_draw,
-                        (cls,context),
-                        'POST_PIXEL')
-                    VIEW3D_PT_cursor_memory_init.initDone = True
-                    print ("Cursor Memory draw-callback registered")
-                    # Unregister to prevent double registration...
-                    # Started to fail after v2.57
-                    # bpy.types.unregister(VIEW3D_PT_cursor_memory_init)
-        else:
-            print("View3D not found, cannot run operator")
-        return 0
-
-    def draw_header(self, context):
-        pass
-
-    def draw(self, context):
-        pass
-
-
-
-def cursor_memory_draw(cls,context):
-    cc = context.scene.cursor_memory
-
-    draw = 0
-    if hasattr(cc, "savedLocationDraw"):
-        draw = cc.savedLocationDraw
-
-    if(draw):
-        bgl.glEnable(bgl.GL_BLEND)
-        bgl.glShadeModel(bgl.GL_FLAT)
-        p1 = Vector(cc.savedLocation)
-        location = region3d_get_2d_coordinates(context, p1)
-        alpha = 1-PHI_INV
-        # Circle
-        color = ([0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1],
-            [0.33, 0.33, 0.33],
-            [1, 1, 1])
-        offset = ([-4.480736161291701, -8.939966636005579],
-            [-0.158097634992133, -9.998750178787843],
-            [4.195854066857877, -9.077158622037636],
-            [7.718765411993642, -6.357724476147943],
-            [9.71288060283854, -2.379065025383466],
-            [9.783240669628, 2.070797430975971],
-            [7.915909938224691, 6.110513059466902],
-            [4.480736161291671, 8.939966636005593],
-            [0.15809763499209872, 9.998750178787843],
-            [-4.195854066857908, 9.077158622037622],
-            [-7.718765411993573, 6.357724476148025],
-            [-9.712880602838549, 2.379065025383433],
-            [-9.783240669627993, -2.070797430976005],
-            [-7.915909938224757, -6.110513059466818])
-        bgl.glBegin(bgl.GL_LINE_LOOP)
-        for i in range(14):
-            bgl.glColor4f(color[i][0], color[i][1], color[i][2], alpha)
-            bgl.glVertex2f(location[0]+offset[i][0], location[1]+offset[i][1])
-        bgl.glEnd()
-
-        # Crosshair
-        offset2 = 20
-        offset = 5
-        bgl.glColor4f(0, 0, 0, alpha)
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        bgl.glVertex2f(location[0]-offset2, location[1])
-        bgl.glVertex2f(location[0]- offset, location[1])
-        bgl.glEnd()
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        bgl.glVertex2f(location[0]+ offset, location[1])
-        bgl.glVertex2f(location[0]+offset2, location[1])
-        bgl.glEnd()
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        bgl.glVertex2f(location[0], location[1]-offset2)
-        bgl.glVertex2f(location[0], location[1]- offset)
-        bgl.glEnd()
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        bgl.glVertex2f(location[0], location[1]+ offset)
-        bgl.glVertex2f(location[0], location[1]+offset2)
-        bgl.glEnd()
-        
-       
diff --git a/release/scripts/addons_contrib/cursor_control/operators.py b/release/scripts/addons_contrib/cursor_control/operators.py
deleted file mode 100644
index 3840db5..0000000
--- a/release/scripts/addons_contrib/cursor_control/operators.py
+++ /dev/null
@@ -1,895 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-"""
-  TODO:
-
-      IDEAS:
-
-      LATER:
-
-      ISSUES:
-          Bugs:
-          Mites:
-
-      QUESTIONS:
-
-
-"""
-
-
-
-import bpy
-import bgl
-import math
-from mathutils import Vector, Matrix
-from mathutils import geometry
-from misc_utils import *
-from constants_utils import *
-from cursor_utils import *
-from ui_utils import *
-from geometry_utils import *
-
-
-class VIEW3D_OT_cursor_to_origin(bpy.types.Operator):
-    """Move to world origin"""
-    bl_idname = "view3d.cursor_to_origin"
-    bl_label = "Move to world origin"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        cc.setCursor([0,0,0])
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_to_active_object_center(bpy.types.Operator):
-    """Move to active object origin"""
-    bl_idname = "view3d.cursor_to_active_object_center"
-    bl_label = "Move to active object origin"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        cc.setCursor(context.active_object.location)
-        return {'FINISHED'}
-
-
-
-#class VIEW3D_OT_cursor_to_nearest_object(bpy.types.Operator):
-    #"""Move to center of nearest object"""
-    #bl_idname = "view3d.cursor_to_nearest_object"
-    #bl_label = "Move to center of nearest object"
-    #bl_options = {'REGISTER'}
-
-    #def modal(self, context, event):
-        #return {'FINISHED'}
-
-    #def execute(self, context):
-        #cc.setCursor(context.active_object.location)
-        #return {'FINISHED'}
-
-
-
-#class VIEW3D_OT_cursor_to_selection_midpoint(bpy.types.Operator):
-    #"""Move to active objects median"""
-    #bl_idname = "view3d.cursor_to_selection_midpoint"
-    #bl_label = "Move to active objects median"
-    #bl_options = {'REGISTER'}
-
-    #def modal(self, context, event):
-        #return {'FINISHED'}
-
-    #def execute(self, context):
-        #location = Vector((0,0,0))
-        #n = 0
-        #for obj in context.selected_objects:
-            #location = location + obj.location
-            #n += 1
-        #if (n==0):
-            #return {'CANCELLED'}
-        #location = location / n
-        #cc.setCursor(location)
-        #return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_to_sl(bpy.types.Operator):
-    """Move to saved location"""
-    bl_idname = "view3d.cursor_to_sl"
-    bl_label = "Move to saved location"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        if hasattr(context.scene, "cursor_memory"):
-            cm = context.scene.cursor_memory
-            cc.hideLinexChoice()
-            cc.setCursor(cm.savedLocation)
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_to_sl_mirror(bpy.types.Operator):
-    """Mirror cursor around SL or selection"""
-    bl_idname = "view3d.cursor_to_sl_mirror"
-    bl_label = "Mirror cursor around SL or selection"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def mirror(self, cc, p):
-        v = p - Vector(CursorAccess.getCursor())
-        cc.setCursor(p + v)
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        obj = context.active_object
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        
-        if obj==None or obj.data.total_vert_sel==0:
-            if hasattr(context.scene, "cursor_memory"):
-                cm = context.scene.cursor_memory
-                self.mirror(cc, Vector(cm.savedLocation))
-            return {'FINISHED'}
-
-        mat = obj.matrix_world
-
-        if obj.data.total_vert_sel==1:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            self.mirror(cc, mat*Vector(sf[0].co))
-            return {'FINISHED'}
-
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-
-        if obj.data.total_vert_sel==2:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            p = G3.closestP2L(c, Vector(sf[0].co), Vector(sf[1].co))
-            self.mirror(cc, mat*p)
-            return {'FINISHED'}
-            
-        if obj.data.total_vert_sel==3:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            normal = (v1-v0).cross(v2-v0)
-            normal.normalize();            
-            p = G3.closestP2S(c, v0, normal)
-            self.mirror(cc, mat*p)
-            return {'FINISHED'}
-              
-        if obj.data.total_face_sel==1:
-            sf = [f for f in obj.data.faces if f.select == 1]
-            v0 = Vector(obj.data.vertices[sf[0].vertices[0]].co)
-            v1 = Vector(obj.data.vertices[sf[0].vertices[1]].co)
-            v2 = Vector(obj.data.vertices[sf[0].vertices[2]].co)
-            normal = (v1-v0).cross(v2-v0)
-            normal.normalize();            
-            p = G3.closestP2S(c, v0, normal)
-            self.mirror(cc, mat*p)
-            return {'FINISHED'}
-
-        return {'CANCELLED'}
-
-
-class VIEW3D_OT_cursor_to_vertex(bpy.types.Operator):
-    """Move to closest vertex"""
-    bl_idname = "view3d.cursor_to_vertex"
-    bl_label = "Move to closest vertex"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = context.active_object
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        vs = obj.data.vertices
-        c = mati*Vector(CursorAccess.getCursor())
-        v = None
-        d = -1
-        for vv in vs:
-            if not vv.select:
-                continue
-            w = Vector(vv.co)
-            dd = G3.distanceP2P(c, w)
-            if d<0 or dd<d:
-                v = w
-                d = dd
-        if v==None:
-            return
-        cc.setCursor(mat*v)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_line(bpy.types.Operator):
-    """Move to closest point on line"""
-    bl_idname = "view3d.cursor_to_line"
-    bl_label = "Move to closest point on line"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mat = obj.matrix_world
-        if obj.data.total_vert_sel==2:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            p = CursorAccess.getCursor()
-            v0 = mat*sf[0].co
-            v1 = mat*sf[1].co
-            q = G3.closestP2L(p, v0, v1)
-            cc.setCursor(q)
-            return {'FINISHED'}
-        if obj.data.total_edge_sel<2:
-            return {'CANCELLED'}
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-        q = None
-        d = -1
-        for ee in obj.data.edges:
-            if not ee.select:
-                continue
-            e1 = Vector(obj.data.vertices[ee.vertices[0]].co)
-            e2 = Vector(obj.data.vertices[ee.vertices[1]].co)
-            qq = G3.closestP2L(c, e1, e2)
-            dd = G3.distanceP2P(c, qq)
-            if d<0 or dd<d:
-                q = qq
-                d = dd
-        if q==None:
-            return {'CANCELLED'}
-        cc.setCursor(mat*q)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_edge(bpy.types.Operator):
-    """Move to closest point on edge"""
-    bl_idname = "view3d.cursor_to_edge"
-    bl_label = "Move to closest point on edge"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mat = obj.matrix_world
-        if obj.data.total_vert_sel==2:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            p = CursorAccess.getCursor()
-            v0 = mat*sf[0].co
-            v1 = mat*sf[1].co
-            q = G3.closestP2E(p, v0, v1)
-            cc.setCursor(q)
-            return {'FINISHED'}
-        if obj.data.total_edge_sel<2:
-            return {'CANCELLED'}
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-        q = None
-        d = -1
-        for ee in obj.data.edges:
-            if not ee.select:
-                continue
-            e1 = Vector(obj.data.vertices[ee.vertices[0]].co)
-            e2 = Vector(obj.data.vertices[ee.vertices[1]].co)
-            qq = G3.closestP2E(c, e1, e2)
-            dd = G3.distanceP2P(c, qq)
-            if d<0 or dd<d:
-                q = qq
-                d = dd
-        if q==None:
-            return {'CANCELLED'}
-        cc.setCursor(mat*q)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_plane(bpy.types.Operator):
-    """Move to closest point on a plane"""
-    bl_idname = "view3d.cursor_to_plane"
-    bl_label = "Move to closest point on a plane"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        if obj.data.total_vert_sel==3:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            normal = (v1-v0).cross(v2-v0)
-            normal.normalize();
-            p = CursorAccess.getCursor()
-            n = mat*normal-obj.location
-            v = mat*v0
-            k = - (p-v).dot(n) / n.dot(n)
-            q = p+n*k
-            cc.setCursor(q)
-            return {'FINISHED'}
-
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-        q = None
-        d = -1
-        for ff in obj.data.polygons:
-            if not ff.select:
-                continue
-            qq = G3.closestP2S(c, Vector(obj.data.vertices[ff.vertices[0]].co), ff.normal)
-            dd = G3.distanceP2P(c, qq)
-            if d<0 or dd<d:
-                q = qq
-                d = dd
-        if q==None:
-            return {'CANCELLED'}
-        cc.setCursor(mat*q)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_face(bpy.types.Operator):
-    """Move to closest point on a face"""
-    bl_idname = "view3d.cursor_to_face"
-    bl_label = "Move to closest point on a face"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-        if obj.data.total_vert_sel==3:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            fv = [v0, v1, v2]
-            normal = (v1-v0).cross(v2-v0)
-            normal.normalize();
-            q = G3.closestP2F(c, fv, normal)
-            cc.setCursor(mat*q)
-            return {'FINISHED'}
-
-        #visual = True
-
-        qqq = []
-        q = None
-        d = -1
-        for ff in obj.data.polygons:
-            if not ff.select:
-                continue
-            fv=[]
-            for vi in ff.vertices:
-                fv.append(Vector(obj.data.vertices[vi].co))
-            qq = G3.closestP2F(c, fv, ff.normal)
-            #if visual:
-                #qqq.append(qq)
-            dd = G3.distanceP2P(c, qq)
-            if d<0 or dd<d:
-                q = qq
-                d = dd
-        if q==None:
-            return {'CANCELLED'}
-
-        #if visual:
-            #ci = MeshEditor.addVertex(c)
-            #for qq in qqq:
-                #qqi = MeshEditor.addVertex(qq)
-                #MeshEditor.addEdge(ci, qqi)
-
-        cc.setCursor(mat*q)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_vertex_median(bpy.types.Operator):
-    """Move to median of vertices"""
-    bl_idname = "view3d.cursor_to_vertex_median"
-    bl_label = "Move to median of vertices"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = context.active_object
-        mat = obj.matrix_world
-        vs = obj.data.vertices
-        selv = [v for v in vs if v.select == 1]
-        location = Vector((0,0,0))
-        for v in selv:
-            location = location + v.co
-        n = len(selv)
-        if (n==0):
-            return {'CANCELLED'}
-        location = location / n
-        cc.setCursor(mat*location)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_linex(bpy.types.Operator):
-    """Alternate between closest encounter points of two lines"""
-    bl_idname = "view3d.cursor_to_linex"
-    bl_label = "Alternate between to closest encounter points of two lines"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        obj = bpy.context.active_object
-        mat = obj.matrix_world
-
-        se = [e for e in obj.data.edges if (e.select == 1)]
-        e1v1 = obj.data.vertices[se[0].vertices[0]].co
-        e1v2 = obj.data.vertices[se[0].vertices[1]].co
-        e2v1 = obj.data.vertices[se[1].vertices[0]].co
-        e2v2 = obj.data.vertices[se[1].vertices[1]].co
-
-        qq = geometry.intersect_line_line (e1v1, e1v2, e2v1, e2v2)
-
-        q = None
-        if len(qq)==0:
-            #print ("lx 0")
-            return {'CANCELLED'}
-
-        if len(qq)==1:
-            #print ("lx 1")
-            q = qq[0]
-        
-        if len(qq)==2:
-            cc = context.scene.cursor_control
-            cc.cycleLinexCoice(2)
-            q = qq[cc.linexChoice]
-
-        #q = geometry.intersect_line_line (e1v1, e1v2, e2v1, e2v2)[qc] * mat
-        #i2 = geometry.intersect_line_line (e2v1, e2v2, e1v1, e1v2)[0] * mat
-        cc.setCursor(mat*q)
-        return {'FINISHED'}
-
-
-class VIEW3D_OT_cursor_to_cylinderaxis(bpy.types.Operator):
-    """Move to closest point on cylinder axis"""
-    bl_idname = "view3d.cursor_to_cylinderaxis"
-    bl_label = "Move to closest point on cylinder axis"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-
-        sf = [f for f in obj.data.vertices if f.select == 1]
-        v0 = Vector(sf[0].co)
-        v1 = Vector(sf[1].co)
-        v2 = Vector(sf[2].co)
-        fv = [v0, v1, v2]
-        q = G3.closestP2CylinderAxis(c, fv)
-        if(q==None):
-            return {'CANCELLED'}
-        cc.setCursor(mat*q)
-        return {'FINISHED'}     
-
-
-class VIEW3D_OT_cursor_to_spherecenter(bpy.types.Operator):
-    """Move to center of cylinder or sphere"""
-    bl_idname = "view3d.cursor_to_spherecenter"
-    bl_label = "Move to center of cylinder or sphere"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-
-        if obj.data.total_vert_sel==3:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            fv = [v0, v1, v2]
-            q = G3.closestP2CylinderAxis(c, fv)
-            #q = G3.centerOfSphere(fv)
-            if(q==None):
-                return {'CANCELLED'}
-            cc.setCursor(mat*q)
-            return {'FINISHED'}
-        if obj.data.total_vert_sel==4:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            v3 = Vector(sf[3].co)
-            fv = [v0, v1, v2, v3]
-            q = G3.centerOfSphere(fv)
-            if(q==None):
-                return {'CANCELLED'}
-            cc.setCursor(mat*q)
-            return {'FINISHED'}
-        return {'CANCELLED'}
-
-
-
-class VIEW3D_OT_cursor_to_perimeter(bpy.types.Operator):
-    """Move to perimeter of cylinder or sphere"""
-    bl_idname = "view3d.cursor_to_perimeter"
-    bl_label = "Move to perimeter of cylinder or sphere"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-
-        if obj.data.total_vert_sel==3:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            fv = [v0, v1, v2]
-            q = G3.closestP2Cylinder(c, fv)
-            if(q==None):
-                return {'CANCELLED'}
-            #q = G3.centerOfSphere(fv)
-            cc.setCursor(mat*q)
-            return {'FINISHED'}
-        if obj.data.total_vert_sel==4:
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            v2 = Vector(sf[2].co)
-            v3 = Vector(sf[3].co)
-            fv = [v0, v1, v2, v3]
-            q = G3.closestP2Sphere(c, fv)
-            if(q==None):
-                return {'CANCELLED'}
-            cc.setCursor(mat*q)
-            return {'FINISHED'}
-        return {'CANCELLED'}
-
-
-
-#class VIEW3D_OT_cursor_offset_from_radius(bpy.types.Operator):
-    #"""Calculate offset from radius"""
-    #bl_idname = "view3d.cursor_offset_from_radius"
-    #bl_label = "Calculate offset from radius"
-    #bl_options = {'REGISTER'}
-
-    #def modal(self, context, event):
-        #return {'FINISHED'}
-
-    #def execute(self, context):
-        #BlenderFake.forceUpdate()
-        #cc = context.scene.cursor_control
-        #cc.hideLinexChoice()
-        #obj = bpy.context.active_object
-        #mesh = obj.data.vertices
-        #mat = obj.matrix_world
-        #mati = mat.copy()
-        #mati.invert()
-        #c = mati*Vector(CursorAccess.getCursor())
-
-        #if obj.data.total_vert_sel==3:
-            #sf = [f for f in obj.data.vertices if f.select == 1]
-            #v0 = Vector(sf[0].co)
-            #v1 = Vector(sf[1].co)
-            #v2 = Vector(sf[2].co)
-            #fv = [v0, v1, v2]
-            #q = G3.centerOfSphere(fv)
-            #d = (v0-q).length
-            #cc.stepLengthValue = d
-            #return {'FINISHED'}
-        #if obj.data.total_vert_sel==4:
-            #sf = [f for f in obj.data.vertices if f.select == 1]
-            #v0 = Vector(sf[0].co)
-            #v1 = Vector(sf[1].co)
-            #v2 = Vector(sf[2].co)
-            #v3 = Vector(sf[3].co)
-            #fv = [v0, v1, v2, v3]
-            #q = G3.centerOfSphere(fv)
-            #d = (v0-q).length
-            #cc.stepLengthValue = d
-            #return {'FINISHED'}
-        #return {'CANCELLED'}
-
-
-
-class VIEW3D_OT_cursor_stepval_phinv(bpy.types.Operator):
-    """Set step value to 1/Phi"""
-    bl_idname = "view3d.cursor_stepval_phinv"
-    bl_label = "Set step value to 1/Phi"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.stepLengthValue = PHI_INV
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_stepval_phi(bpy.types.Operator):
-    """Set step value to Phi"""
-    bl_idname = "view3d.cursor_stepval_phi"
-    bl_label = "Set step value to Phi"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.stepLengthValue = PHI
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_stepval_phi2(bpy.types.Operator):
-    """Set step value to Phi²"""
-    bl_idname = "view3d.cursor_stepval_phi2"
-    bl_label = "Set step value to Phi²"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.stepLengthValue = PHI_SQR
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_cursor_stepval_vvdist(bpy.types.Operator):
-    """Set step value to distance vertex-vertex"""
-    bl_idname = "view3d.cursor_stepval_vvdist"
-    bl_label = "Set step value to distance vertex-vertex"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        cc.hideLinexChoice()
-        obj = bpy.context.active_object
-        mesh = obj.data.vertices
-        mat = obj.matrix_world
-        mati = mat.copy()
-        mati.invert()
-        c = mati*Vector(CursorAccess.getCursor())
-
-        sf = [f for f in obj.data.vertices if f.select == 1]
-        v0 = Vector(sf[0].co)
-        v1 = Vector(sf[1].co)
-        q = (v0-v1).length
-        cc.stepLengthValue = q
-
-        BlenderFake.forceRedraw()
-        return {'FINISHED'}
-
-
-
-
-class VIEW3D_OT_ccdelta_invert(bpy.types.Operator):
-    """Invert delta vector"""
-    bl_idname = "view3d.ccdelta_invert"
-    bl_label = "Invert delta vector"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.invertDeltaVector()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_ccdelta_normalize(bpy.types.Operator):
-    """Normalize delta vector"""
-    bl_idname = "view3d.ccdelta_normalize"
-    bl_label = "Normalize delta vector"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.normalizeDeltaVector()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_ccdelta_add(bpy.types.Operator):
-    """Add delta vector to 3D cursor"""
-    bl_idname = "view3d.ccdelta_add"
-    bl_label = "Add delta vector to 3D cursor"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.addDeltaVectorToCursor()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_ccdelta_sub(bpy.types.Operator):
-    """Subtract delta vector to 3D cursor"""
-    bl_idname = "view3d.ccdelta_sub"
-    bl_label = "Subtract delta vector to 3D cursor"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        cc = context.scene.cursor_control
-        cc.subDeltaVectorToCursor()
-        return {'FINISHED'}
-
-
-
-class VIEW3D_OT_ccdelta_vvdist(bpy.types.Operator):
-    """Set delta vector from selection"""
-    bl_idname = "view3d.ccdelta_vvdist"
-    bl_label = "Set delta vector from selection"
-    bl_options = {'REGISTER'}
-
-    def modal(self, context, event):
-        return {'FINISHED'}
-
-    def execute(self, context):
-        BlenderFake.forceUpdate()
-        cc = context.scene.cursor_control
-        obj = bpy.context.active_object
-        if obj.data.total_vert_sel==0:
-            if hasattr(context.scene, "cursor_memory"):
-                cm = context.scene.cursor_memory
-                
-                mesh = obj.data.vertices
-                mat = obj.matrix_world
-                mati = mat.copy()
-                mati.invert()
-                c = mati*Vector(CursorAccess.getCursor())
-                
-                v0 = Vector(cm.savedLocation)
-                v1 = Vector(c)
-                cc.deltaVector = v0-v1
-                
-                
-        if obj.data.total_vert_sel==1:
-            mesh = obj.data.vertices
-            mat = obj.matrix_world
-            mati = mat.copy()
-            mati.invert()
-            c = mati*Vector(CursorAccess.getCursor())
-
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(c)
-            cc.deltaVector = v0-v1
-
-        if obj.data.total_vert_sel==2:
-            #mesh = obj.data.vertices
-            #mat = obj.matrix_world
-            #mati = mat.copy()
-            #mati.invert()
-            #c = mati*Vector(CursorAccess.getCursor())
-
-            sf = [f for f in obj.data.vertices if f.select == 1]
-            v0 = Vector(sf[0].co)
-            v1 = Vector(sf[1].co)
-            cc.deltaVector = v1-v0
-
-        return {'FINISHED'}
-
-
-
-
diff --git a/release/scripts/addons_contrib/cursor_control/ui.py b/release/scripts/addons_contrib/cursor_control/ui.py
deleted file mode 100644
index 4863836..0000000
--- a/release/scripts/addons_contrib/cursor_control/ui.py
+++ /dev/null
@@ -1,224 +0,0 @@
-# -*- coding: utf-8 -*-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-
-"""
-  TODO:
-
-      IDEAS:
-
-      LATER:
-
-      ISSUES:
-          Bugs:
-          Mites:
-
-      QUESTIONS:
-
-
-"""
-
-
-
-import bpy
-import bgl
-import math
-from mathutils import Vector, Matrix
-from mathutils import geometry
-from misc_utils import *
-from constants_utils import *
-from cursor_utils import *
-from ui_utils import *
-from geometry_utils import *
-
-
-class VIEW3D_PT_cursor(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Cursor Target"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        # Display in object or edit mode.
-        if (context.area.type == 'VIEW_3D' and
-            (context.mode == 'EDIT_MESH'
-            or context.mode == 'OBJECT')):
-            return 1
-
-        return 0
-
-    def draw_header(self, context):
-        pass
- 
-    def draw(self, context):
-        layout = self.layout
-        sce = context.scene
-
-        cc = context.scene.cursor_control
-        (tvs,tes,tfs,edit_mode) = cc.guiStates(context)
-
-        # Mesh data elements
-        if(edit_mode):
-            row = layout.row()
-            GUI.drawIconButton(tvs>=1          , row, 'STICKY_UVS_DISABLE', "view3d.cursor_to_vertex")
-            GUI.drawIconButton(tvs==2 or tes>=1, row, 'MESH_DATA'         , "view3d.cursor_to_line")
-            GUI.drawIconButton(tvs==2 or tes>=1, row, 'OUTLINER_OB_MESH'  , "view3d.cursor_to_edge")
-            GUI.drawIconButton(tvs==3 or tfs>=1, row, 'SNAP_FACE'         , "view3d.cursor_to_plane")
-            GUI.drawIconButton(tvs==3 or tfs>=1, row, 'FACESEL'           , "view3d.cursor_to_face")
-
-        # Geometry from mesh
-        if(edit_mode):
-            row = layout.row()
-            GUI.drawIconButton(tvs<=3 or tfs==1 , row, 'MOD_MIRROR'  , "view3d.cursor_to_sl_mirror")
-            GUI.drawIconButton(tes==2, row, 'PARTICLE_TIP', "view3d.cursor_to_linex")
-            GUI.drawIconButton(tvs>1 , row, 'ROTATECENTER', "view3d.cursor_to_vertex_median")  #EDITMODE_HLT
-            GUI.drawIconButton(tvs==3 or tvs==4, row, 'FORCE_FORCE'  , "view3d.cursor_to_spherecenter")
-            GUI.drawIconButton(tvs==3 or tvs==4, row, 'MATERIAL'  , "view3d.cursor_to_perimeter")
-
-        # Objects
-        #row = layout.row()
-
-        #GUI.drawIconButton(context.active_object!=None    , row, 'ROTATE'          , "view3d.cursor_to_active_object_center")
-        #GUI.drawIconButton(len(context.selected_objects)>1, row, 'ROTATECOLLECTION', "view3d.cursor_to_selection_midpoint")
-        #GUI.drawIconButton(len(context.selected_objects)>1, row, 'ROTATECENTER'    , "view3d.cursor_to_selection_midpoint")
-
-        # References World Origin, Object Origin, SL and CL
-        row = layout.row()
-        GUI.drawIconButton(True                       , row, 'WORLD_DATA'    , "view3d.cursor_to_origin")
-        GUI.drawIconButton(context.active_object!=None, row, 'ROTACTIVE'       , "view3d.cursor_to_active_object_center")
-        GUI.drawIconButton(True                       , row, 'CURSOR'        , "view3d.cursor_to_sl")
-        #GUI.drawIconButton(True, row, 'GRID'          , "view3d.cursor_sl_recall")
-        #GUI.drawIconButton(True, row, 'SNAP_INCREMENT', "view3d.cursor_sl_recall")
-        #row.label("("+str(cc.linexChoice)+")")
-        cc = context.scene.cursor_control
-        if cc.linexChoice>=0:
-            col = row.column()
-            col.enabled = False
-            col.prop(cc, "linexChoice")
-
-        # Limit/Clamping Properties
-        row = layout.row()
-        row.prop(cc, "stepLengthEnable")
-        if (cc.stepLengthEnable):
-            row = layout.row()
-            row.prop(cc, "stepLengthMode")
-            row.prop(cc, "stepLengthValue")
-            row = layout.row()
-            GUI.drawTextButton(True, row, '1/Phi'      , "view3d.cursor_stepval_phinv")
-            GUI.drawTextButton(True, row, 'Phi'      , "view3d.cursor_stepval_phi")
-            GUI.drawTextButton(True, row, 'Phi²'      , "view3d.cursor_stepval_phi2")
-            GUI.drawIconButton(tvs==2, row, 'EDGESEL'      , "view3d.cursor_stepval_vvdist")
-
-
-
-class VIEW3D_PT_ccDelta(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Cursor Delta"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        # Display in object or edit mode.
-        if (context.area.type == 'VIEW_3D' and
-            (context.mode == 'EDIT_MESH'
-            or context.mode == 'OBJECT')):
-            return 1
-
-        return 0
-
-    def draw_header(self, context):
-        pass
- 
-    def draw(self, context):
-        layout = self.layout
-        #sce = context.scene
-
-        cc = context.scene.cursor_control
-        (tvs,tes,tfs,edit_mode) = cc.guiStates(context)
-        
-        row = layout.row()
-        col = row.column();
-        GUI.drawIconButton(True , col, 'FF'  , "view3d.ccdelta_add")
-        GUI.drawIconButton(True , col, 'REW'  , "view3d.ccdelta_sub")
-        GUI.drawIconButton(tvs<=2 , col, 'FORWARD'  , "view3d.ccdelta_vvdist")
-        
-        col = row.column();
-        col.prop(cc, "deltaVector")
-
-        col = row.column();
-        GUI.drawIconButton(True , col, 'MOD_MIRROR'  , "view3d.ccdelta_invert")
-        GUI.drawIconButton(True , col, 'SNAP_NORMAL'  , "view3d.ccdelta_normalize")
-
-
-  
-class CursorControlMenu(bpy.types.Menu):
-    """menu"""
-    bl_idname = "cursor_control_calls"
-    bl_label = "Cursor Control"
-    
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        #layout.operator(VIEW3D_OT_cursor_to_vertex.bl_idname, text = "Vertex")
-        #layout.operator(VIEW3D_OT_cursor_to_line.bl_idname, text = "Line")
-        #obj = context.active_object
-        #if (context.mode == 'EDIT_MESH'):
-            #if (obj and obj.type=='MESH' and obj.data):
-        cc = context.scene.cursor_control
-        (tvs,tes,tfs,edit_mode) = cc.guiStates(context)
-        
-        if(edit_mode):
-            if(tvs>=1):
-                layout.operator(VIEW3D_OT_cursor_to_vertex.bl_idname, text = "Closest Vertex")
-            if(tvs==2 or tes>=1):
-                layout.operator(VIEW3D_OT_cursor_to_line.bl_idname, text = "Closest Line")
-            if(tvs==2 or tes>=1):
-                layout.operator(VIEW3D_OT_cursor_to_edge.bl_idname, text = "Closest Edge")
-            if(tvs==3 or tfs>=1):
-                layout.operator(VIEW3D_OT_cursor_to_plane.bl_idname, text = "Closest Plane")
-            if(tvs==3 or tfs>=1):
-                layout.operator(VIEW3D_OT_cursor_to_face.bl_idname, text = "Closest Face")
-
-        if(edit_mode):
-            if(tvs<=3 or tfs==1):
-                layout.operator(VIEW3D_OT_cursor_to_sl_mirror.bl_idname, text = "Mirror")
-            if(tes==2):
-                layout.operator(VIEW3D_OT_cursor_to_linex.bl_idname, text = "Line Intersection")
-            if(tvs>1):
-                layout.operator(VIEW3D_OT_cursor_to_vertex_median.bl_idname, text = "Vertex Median")
-            if(tvs==3 or tvs==4):
-                layout.operator(VIEW3D_OT_cursor_to_spherecenter.bl_idname, text = "Circle Center")
-            if(tvs==3 or tvs==4):
-                layout.operator(VIEW3D_OT_cursor_to_perimeter.bl_idname, text = "Circle Perimeter")
-        
-        layout.operator(VIEW3D_OT_cursor_to_origin.bl_idname, text = "World Origin")
-        layout.operator(VIEW3D_OT_cursor_to_active_object_center.bl_idname, text = "Active Object")
-        layout.operator(VIEW3D_OT_cursor_to_sl.bl_idname, text = "Cursor Memory")
-
-
-
-def menu_callback(self, context):
-    #obj = context.active_object
-    #if (context.mode == 'EDIT_MESH'):
-        #if (obj and obj.type=='MESH' and obj.data):
-    self.layout.menu(CursorControlMenu.bl_idname, icon="PLUGIN")
-
diff --git a/release/scripts/addons_contrib/curve_tools.py b/release/scripts/addons_contrib/curve_tools.py
deleted file mode 100644
index 4758e58..0000000
--- a/release/scripts/addons_contrib/curve_tools.py
+++ /dev/null
@@ -1,1353 +0,0 @@
-# #####BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# #####END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Curve Tools",
-    "author": "Zak",
-    "version": (0, 1, 5),
-    "blender": (2, 5, 9),
-    "location": "Properties > Object data",
-    "description": "Creates driven Lofts or Birails between curves",
-    "warning": "may be buggy or incomplete",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Curve/Curve_Tools",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=27720",
-    "category": "Add Curve"}
-
-### UPDATES
-#1.5
-
-#-Fixed birail function
-#-Added Curve Snap to W key specials menu.
-#-Removed some functions that arent needed and wrapped into the operators.
-#-nurbs with weights for loft and birail
-#-Panel Moved to view 3d tools
-#-inserted TODO comments
-#-tried to implement live tension and bias for Hermite interpolation by driving the mesh but
-#i dont know why, the code is executed all the time even if you dont change the variables.
-#-snap to curves affects all the curves on the scene
-#-i was able to preserve handle types when split or subdivide
-
-
-#1.4
-#-incorporate curve snap
-#assign a copy transform to helper
-#-nurbs implemented (in progress)
-
-import bpy
-from mathutils import *
-from bpy.props import *
-
-print("----------")
-
-
-### PROPERTIES
-class sprops(bpy.types.PropertyGroup):
-    pass
-
-
-bpy.utils.register_class(sprops)
-
-#bpy.selection will store objects names in the order they were selected
-bpy.selection=[]
-
-
-#dodriver a simple checker to chosse whether  you want a driven mesh or not.
-bpy.types.Scene.dodriver = BoolProperty(name = "dodriver",                                      default=False)
-
-#interpolation types
-myitems = (('0','Linear', ''),('1','Cubic',''),('2','Catmull',''), ('3','Hermite',''))
-bpy.types.Scene.intype = EnumProperty(name="intype", items = myitems, default='3')
-
-#number of steps and spans to be created
-bpy.types.Scene.steps = IntProperty(name="steps", default=12, min=2)
-bpy.types.Scene.spans = IntProperty(name="spans", default=12, min=2)
-
-#parameters for Hermite interpolation
-bpy.types.Scene.tension = FloatProperty(name = "tension", min=0.0, default=0.0)
-bpy.types.Scene.bias = FloatProperty(name = "bias", min=0.0, default = 0.5)
-
-#proportional birail
-bpy.types.Scene.proportional = BoolProperty(name="proportional", default=False)
-
-#this stores the result of calculating the curve length
-bpy.types.Scene.clen = FloatProperty(name="clen", default=0.0, precision=5)
-
-#minimun distance for merge curve tool
-bpy.types.Scene.limit = FloatProperty(name="limit", default=0.1, precision=3)
-
-
-### SELECT BY ORDER BLOCK
-
-#i dont know what to do with this. Im not using it yet.
-def selected_points(curve):
-
-    selp = []
-    for spl in curve.splines:
-        if spl.type=="BEZIER":
-            points = spl.bezier_points
-            for p in points:
-                if p.select_control_point:
-                    selp.append(p)
-
-        elif spl.type=="NURBS":
-            points = spl.points
-            for p in points:
-                if p.select:
-                    selp.append(p)
-    return selp
-
-#writes bpy.selection when a new object is selected or deselected
-#it compares bpy.selection with bpy.context.selected_objects
-
-def select():
-
-    #print(bpy.context.mode)
-    if bpy.context.mode=="OBJECT":
-        obj = bpy.context.object
-        sel = len(bpy.context.selected_objects)
-
-        if sel==0:
-            bpy.selection=[]
-        else:
-            if sel==1:
-                bpy.selection=[]
-                bpy.selection.append(obj)
-            elif sel>len(bpy.selection):
-                for sobj in bpy.context.selected_objects:
-                    if (sobj in bpy.selection)==False:
-                        bpy.selection.append(sobj)
-
-            elif sel<len(bpy.selection):
-                for it in bpy.selection:
-                    if (it in bpy.context.selected_objects)==False:
-                        bpy.selection.remove(it)
-
-    #on edit mode doesnt work well
-
-
-#executes selection by order at 3d view
-class Selection(bpy.types.Header):
-    bl_label = "Selection"
-    bl_space_type = "VIEW_3D"
-
-    def __init__(self):
-        #print("hey")
-        select()
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row.label("Sel: "+str(len(bpy.selection)))
-
-### GENERAL CURVE FUNCTIONS
-
-#distance between 2 points
-def dist(p1, p2):
-    return (p2-p1).magnitude
-
-#sets cursors position for debugging porpuses
-def cursor(pos):
-    bpy.context.scene.cursor_location = pos
-
-#cuadratic bezier value
-def quad(p, t):
-    return p[0]*(1.0-t)**2.0 + 2.0*t*p[1]*(1.0-t) + p[2]*t**2.0
-
-#cubic bezier value
-def cubic(p, t):
-    return p[0]*(1.0-t)**3.0 + 3.0*p[1]*t*(1.0-t)**2.0 + 3.0*p[2]*(t**2.0)*(1.0-t) + p[3]*t**3.0
-
-#gets a bezier segment's control points on global coordinates
-def getbezpoints(spl, mt, seg=0):
-    points = spl.bezier_points
-    p0 = mt * points[seg].co
-    p1 = mt * points[seg].handle_right
-    p2 = mt * points[seg+1].handle_left
-    p3 = mt * points[seg+1].co
-    return p0, p1, p2, p3
-
-#gets nurbs polygon control points on global coordinates
-def getnurbspoints(spl, mw):
-    pts = []
-    ws = []
-    for p in spl.points:
-        v = Vector(p.co[0:3])*mw
-        pts.append(v)
-        ws.append(p.weight)
-    return pts , ws
-
-#calcs a nurbs knot vector
-def knots(n, order, type=0):#0 uniform 1 endpoints 2 bezier
-
-    kv = []
-
-    t = n+order
-    if type==0:
-        for i in range(0, t):
-            kv.append(1.0*i)
-
-    elif type==1:
-        k=0.0
-        for i in range(1, t+1):
-            kv.append(k)
-            if i>=order and i<=n:
-                k+=1.0
-    elif type==2:
-        if order==4:
-            k=0.34
-            for a in range(0,t):
-                if a>=order and a<=n: k+=0.5
-                kv.append(floor(k))
-                k+=1.0/3.0
-
-        elif order==3:
-            k=0.6
-            for a in range(0, t):
-                if a >=order and a<=n: k+=0.5
-                kv.append(floor(k))
-
-    ##normalize the knot vector
-    for i in range(0, len(kv)):
-        kv[i]=kv[i]/kv[-1]
-
-    return kv
-
-#nurbs curve evaluation
-def C(t, order, points, weights, knots):
-    #c = Point([0,0,0])
-    c = Vector()
-    rational = 0
-    i = 0
-    while i < len(points):
-        b = B(i, order, t, knots)
-        p = points[i] * (b * weights[i])
-        c = c + p
-        rational = rational + b*weights[i]
-        i = i + 1
-
-    return c * (1.0/rational)
-
-#nurbs basis function
-def B(i,k,t,knots):
-    ret = 0
-    if k>0:
-        n1 = (t-knots[i])*B(i,k-1,t,knots)
-        d1 = knots[i+k] - knots[i]
-        n2 = (knots[i+k+1] - t) * B(i+1,k-1,t,knots)
-        d2 = knots[i+k+1] - knots[i+1]
-        if d1 > 0.0001 or d1 < -0.0001:
-            a = n1 / d1
-        else:
-            a = 0
-        if d2 > 0.0001 or d2 < -0.0001:
-            b = n2 / d2
-        else:
-            b = 0
-        ret = a + b
-        #print "B i = %d, k = %d, ret = %g, a = %g, b = %g\n"%(i,k,ret,a,b)
-    else:
-        if knots[i] <= t and t <= knots[i+1]:
-            ret = 1
-        else:
-            ret = 0
-    return ret
-
-#calculates a global parameter t along all control points
-#t=0 begining of the curve
-#t=1 ending of the curve
-
-def calct(obj, t):
-
-    spl=None
-    mw = obj.matrix_world
-    if obj.data.splines.active==None:
-        if len(obj.data.splines)>0:
-            spl=obj.data.splines[0]
-    else:
-        spl = obj.data.splines.active
-
-    if spl==None:
-        return False
-
-    if spl.type=="BEZIER":
-        points = spl.bezier_points
-        nsegs = len(points)-1
-
-        d = 1.0/nsegs
-        seg = int(t/d)
-        t1 = t/d - int(t/d)
-
-        if t==1:
-            seg-=1
-            t1 = 1.0
-
-        p = getbezpoints(spl,mw, seg)
-
-        coord = cubic(p, t1)
-
-        return coord
-
-    elif spl.type=="NURBS":
-        data = getnurbspoints(spl, mw)
-        pts = data[0]
-        ws = data[1]
-        order = spl.order_u
-        n = len(pts)
-        ctype = spl.use_endpoint_u
-        kv = knots(n, order, ctype)
-
-        coord = C(t, order-1, pts, ws, kv)
-
-        return coord
-
-#length of the curve
-def arclength(objs):
-    length = 0.0
-
-    for obj in objs:
-        if obj.type=="CURVE":
-            prec = 1000 #precision
-            inc = 1/prec #increments
-
-            ### TODO: set a custom precision value depending the number of curve points
-            #that way it can gain on accuracy in less operations.
-
-            #subdivide the curve in 1000 lines and sum its magnitudes
-            for i in range(0, prec):
-                ti = i*inc
-                tf = (i+1)*inc
-                a = calct(obj, ti)
-                b = calct(obj, tf)
-                r = (b-a).magnitude
-                length+=r
-
-    return length
-
-
-class ArcLengthOperator(bpy.types.Operator):
-
-    bl_idname = "curve.arc_length_operator"
-    bl_label = "Measures the length of a curve"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        objs = context.selected_objects
-        context.scene.clen = arclength(objs)
-        return {'FINISHED'}
-
-### LOFT INTERPOLATIONS
-
-#objs = selected objects
-#i = object index
-#t = parameter along u direction
-#tr = parameter along v direction
-
-#linear
-def intl(objs, i, t, tr):
-    p1 = calct(objs[i],t)
-    p2 = calct(objs[i+1], t)
-
-    r = p1 + (p2 - p1)*tr
-
-    return r
-
-#tipo = interpolation type
-#tension and bias are for hermite interpolation
-#they can be changed to obtain different lofts.
-
-#cubic
-def intc(objs, i, t, tr, tipo=3, tension=0.0, bias=0.0):
-
-    ncurves =len(objs)
-
-    #if 2 curves go to linear interpolation regardless the one you choose
-    if ncurves<3:
-        return intl(objs, i, t, tr)
-    else:
-
-        #calculates the points to be interpolated on each curve
-        if i==0:
-            p0 = calct(objs[i], t)
-            p1 = p0
-            p2 = calct(objs[i+1], t)
-            p3 = calct(objs[i+2], t)
-        else:
-            if ncurves-2 == i:
-                p0 = calct(objs[i-1], t)
-                p1 = calct(objs[i], t)
-                p2 = calct(objs[i+1], t)
-                p3 = p2
-            else:
-                p0 = calct(objs[i-1], t)
-                p1 = calct(objs[i], t)
-                p2 = calct(objs[i+1], t)
-                p3 = calct(objs[i+2], t)
-
-
-    #calculates the interpolation between those points
-    #i used methods from this page: http://paulbourke.net/miscellaneous/interpolation/
-
-    if tipo==0:
-        #linear
-        return intl(objs, i, t, tr)
-    elif tipo == 1:
-        #natural cubic
-        t2 = tr*tr
-        a0 = p3-p2-p0+p1
-        a1 = p0-p1-a0
-        a2 = p2-p0
-        a3 = p1
-        return a0*tr*t2 + a1*t2+a2*tr+a3
-    elif tipo == 2:
-        #catmull it seems to be working. ill leave it for now.
-        t2 = tr*tr
-        a0 = -0.5*p0 +1.5*p1 -1.5*p2 +0.5*p3
-        a1 = p0 - 2.5*p1 + 2*p2 -0.5*p3
-        a2 = -0.5*p0 + 0.5 *p2
-        a3 = p1
-        return a0*tr*tr + a1*t2+a2*tr+a3
-
-    elif tipo == 3:
-        #hermite
-        tr2 = tr*tr
-        tr3 = tr2*tr
-        m0 = (p1-p0)*(1+bias)*(1-tension)/2
-        m0+= (p2-p1)*(1-bias)*(1-tension)/2
-        m1 = (p2-p1)*(1+bias)*(1-tension)/2
-        m1+= (p3-p2)*(1-bias)*(1-tension)/2
-        a0 = 2*tr3 - 3*tr2 + 1
-        a1 = tr3 - 2 * tr2+ tr
-        a2 = tr3 - tr2
-        a3 = -2*tr3 + 3*tr2
-
-        return a0*p1+a1*m0+a2*m1+a3*p2
-
-
-#handles loft driver expression
-#example: loftdriver('Loft', 'BezierCurve;BezierCurve.001;BezierCurve.002', 3)
-
-#name: its the name of the mesh to be driven
-#objs: the  names of the curves that drives the mesh
-#3 interpolation type
-
-def loftdriver(name, objs, intype):
-    #print("ejecutando "+name)
-    intype = int(intype)
-
-    tension = 0.0
-    bias = 0.5
-    #if the loft object still exists proceed normal
-    try:
-        resobj = bpy.data.objects[name]
-        spans = resobj["spans"]
-        steps = resobj["steps"]
-        if intype==3: #hermite
-            tension = resobj['tension']
-            bias = resobj['bias']
-
-    #if not delete the driver
-    except:
-        curve = bpy.context.object
-        for it in curve.keys():
-            if it == "driver":
-                curve.driver_remove('["driver"]')
-        return False
-
-    objs = objs.split(";")
-    #objs = objs[0:-1]
-
-
-    #retrieves the curves from the objs string
-    for i, l in enumerate(objs):
-        objs[i] = bpy.data.objects[l]
-
-
-
-    #calcs the new vertices coordinates if we change the curves.
-    vxs = loft(objs, steps, spans, intype, tension, bias)
-
-    #apply the new cordinates to the loft object
-    me = resobj.data
-
-    for i in range(0, len(me.vertices)):
-        me.vertices[i].co = vxs[i]
-    me.update()
-    return spans
-
-#NOTES:
-#loftdriver function will fail or produce weird results if:
-#the user changes resobj["spans"] or resobj["steps"]
-#if we delete any vertex from the loft object
-
-### TODO:check if thats the case to remove the drivers
-
-#creates the drivers expressions for each curve
-def createloftdriver(objs, res, intype):
-
-    line = ""
-    for obj in objs:
-        line+=obj.name+";"
-    line=line[0:-1]
-    name = res.name
-
-    interp = str(intype)
-
-    for obj in objs:
-        obj["driver"] = 1.0
-
-        obj.driver_add('["driver"]')
-        obj.animation_data.drivers[0].driver.expression = "loftdriver('"+ name +"', '" + line + "', "+interp+")"
-
-
-    ### creating this driver will execute loft all the time without reason,
-    #and if i cant drive the mesh i cannot implement live tension and bias
-
-#   res['driver'] = 1.0
-#   if res.animation_data==None:
-#       res.animation_data_create()
-#   res.driver_add('["driver"]')
-#   res.animation_data.drivers[0].driver.expression = "loftdriver('"+ name +"', '" + line + "', "+interp+")"
-
-#calculates the vertices position of the loft object
-def loft(objs, steps, spans, interpolation=1, tension=0.0, bias=0.5):
-    verts=[]
-
-    for i in range(0, len(objs)):
-
-        for j in range(0,steps+1):
-            t = 1.0*j/steps
-            verts.append(calct(objs[i], t))
-
-        temp2=[]
-        if i<len(objs)-1:
-            for l in range(1, spans):
-                tr = 1.0*l/spans
-                for k in range(0, steps+1):
-                    t=1.0*k/steps
-                    if interpolation:
-                        pos = intc(objs, i, t, tr, interpolation, tension, bias)
-                    else:
-                        pos = intl(objs,i, t, tr)
-
-                    temp2.append(pos)
-            verts.extend(temp2)
-    return verts
-
-
-#loft operator
-
-class LoftOperator(bpy.types.Operator):
-    """Tooltip"""
-    bl_idname = "mesh.loft_operator"
-    bl_label = "Loft between bezier curves"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        #retrieves the curves in the order they were selected
-        objs = bpy.selection
-
-        spans = context.scene.spans
-        steps = context.scene.steps
-
-        intype = int(context.scene.intype)
-
-        verts = loft(objs, steps, spans, intype)
-
-        nfaces = steps*spans*(len(objs)-1)
-        faces=[]
-        for i in range(0, nfaces):
-            d = int(i/steps)
-            f = [i+d,i+d+1, i+d+steps+2, i+d+steps+1]
-            #inverts normals
-            #f = [i+d,i+d+steps+1, i+d+steps+2, i+d+1]
-            faces.append(f)
-
-
-        me = bpy.data.meshes.new("Loft")
-        me.from_pydata(verts,[], faces)
-        me.update()
-        newobj = bpy.data.objects.new("Loft", me)
-        #newobj.data = me
-        scn = context.scene
-        scn.objects.link(newobj)
-        scn.objects.active = newobj
-        newobj.select = True
-        bpy.ops.object.shade_smooth()
-
-        #the object stores its own steps and spans
-        #this way the driver will know how to deform the mesh
-        newobj["steps"] = steps
-        newobj["spans"] = spans
-
-        if intype==3:
-            newobj['tension'] = context.scene.tension
-            newobj['bias'] = context.scene.bias
-
-
-        if context.scene.dodriver:
-            createloftdriver(objs, newobj, intype)
-
-        return {'FINISHED'}
-
-class UpdateFix(bpy.types.Operator):
-    """Tooltip"""
-    bl_idname = "mesh.update_fix"
-    bl_label = "Update fix"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        #print("------------")
-#       for it in bpy.app.driver_namespace:
-#           print(it)
-        bpy.app.driver_namespace['loftdriver'] = loftdriver
-        bpy.app.driver_namespace['birail1driver'] = birail1driver
-        for obj in context.scene.objects:
-            if obj.type=="CURVE" and obj.animation_data!=None and len(obj.animation_data.drivers)>0:
-                for drv in obj.animation_data.drivers:
-                    if drv.data_path=='["driver"]':
-                        cad = drv.driver.expression
-                        drv.driver.expression = ""
-                        drv.driver.expression = cad
-
-        return {'FINISHED'}
-
-
-#derives a curve at a given parameter
-def deriv(curve, t, unit=False):
-
-    a = t + 0.001
-    if t==1: a=t-0.001
-
-    pos = calct(curve, t)
-    der = (pos-calct(curve, a))/(t-a)
-    if unit:
-        der = der/der.magnitude
-    return der
-
-### BIRAIL1 BLOCK
-
-
-#see explanation video about the construction
-#http://vimeo.com/25455967
-
-#calculates birail vertices
-
-### TODO: when the 3 curves are coplanar it should fail, cause the cross product. check that
-def birail1(objs, steps, spans, proportional):
-
-    profile=objs[0]
-    ### TODO: identify which path is left or right
-    path1 = objs[1]
-    path2 = objs[2]
-
-    trans = []
-
-    r0 = [calct(path1,0), calct(path2, 0)]
-    r0mag = (r0[1]-r0[0]).magnitude
-
-    for i in range(0, steps):
-        u = i/(steps-1)
-        appr0 = r0[0]+(r0[1]-r0[0])*u
-        trans.append(calct(profile, u)-appr0)
-
-    der10 = deriv(path1, 0)
-    der20 = deriv(path2, 0)
-
-    verts = []
-
-    mult = 1.0
-
-    for i in range(0, spans):
-        v = i/(spans-1)
-        r = [calct(path1, v),calct(path2, v)]
-        rmag = (r[1]-r[0]).magnitude
-
-        der1 = deriv(path1, v)
-        der2 = deriv(path2, v)
-
-        angle1 = der10.angle(der1)
-        angle2 = der20.angle(der2)
-
-        #if angle1!=0.0 and angle2!=0: we can avoid some operations by doing this check but im lazy
-        cr1 = der1.cross(der10)
-        rot1 = Matrix().Rotation(-angle1, 3, cr1)
-
-        cr2 = der2.cross(der20)
-        rot2 = Matrix().Rotation(-angle2, 3, cr2)
-
-        if proportional:
-            mult = rmag/r0mag
-
-        for j in range(0, steps):
-            u = j/(steps-1)
-
-            app = r[0]+(r[1]-r[0])*u
-
-            newtr1 = trans[j].copy()
-            newtr1.rotate(rot1)
-
-            newtr2 = trans[j].copy()
-            newtr2.rotate(rot2)
-
-            r1 = (newtr1-trans[j])*(1-u)
-            r2 = (newtr2-trans[j])*(u)
-
-            res = r1+r2+app+mult*trans[j]
-
-            verts.append(res)
-
-    return verts
-
-
-#same as loft driver
-### TODO check if it is registered
-def birail1driver(name, objs):
-
-    objs = objs.split(";")
-    #objs = objs[0:-1]
-
-    for i, l in enumerate(objs):
-        objs[i] = bpy.data.objects[l]
-
-    try:
-        resobj = bpy.data.objects[name]
-        spans = resobj["spans"]
-        steps = resobj["steps"]
-        prop = resobj["prop"]
-
-    except:
-        curve = bpy.context.object
-        curve.driver_remove('["driver"]')
-        return False
-
-    vxs = birail1(objs, steps, spans, prop)
-
-    me = resobj.data
-
-    for i in range(0, len(me.vertices)):
-        me.vertices[i].co = vxs[i]
-    me.update()
-    return spans
-
-def createbirail1driver(objs, res):
-
-    line = ""
-    for obj in objs:
-        line+=obj.name+";"
-    line=line[0:-1]
-    for obj in objs:
-        obj["driver"] = 1.0
-        obj.driver_add('["driver"]')
-        obj.animation_data.drivers[0].driver.expression = "birail1driver('"+ res.name +"', '" + line + "')"
-
-### TODO: check polls and if initial variables are ok to perform the birail
-class Birail1Operator(bpy.types.Operator):
-
-    bl_idname = "mesh.birail1_operator"
-    bl_label = "Birail between 3 bezier curves"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-
-        objs = bpy.selection
-
-        if len(objs)!=3:
-            self.report({'ERROR'},"Please select 3 curves")
-            return {'FINISHED'}
-
-        scn = context.scene
-        spans = scn.spans
-        steps = scn.steps
-        prop = scn.proportional
-
-        verts = birail1(objs, steps, spans, prop)
-
-        if verts!=[]:
-            faces=[]
-
-            nfaces = (steps-1)*(spans-1)
-
-            for i in range(0, nfaces):
-                d = int(i/(steps-1))
-                f = [i+d+1, i+d, i+d+steps, i+d+steps+1 ]
-                faces.append(f)
-
-            me = bpy.data.meshes.new("Birail")
-            me.from_pydata(verts,[], faces)
-            me.update()
-            newobj = bpy.data.objects.new("Birail", me)
-            newobj.data = me
-
-            scn.objects.link(newobj)
-            scn.objects.active = newobj
-            newobj.select = True
-            bpy.ops.object.shade_smooth()
-            newobj['steps']=steps
-            newobj['spans']=spans
-            newobj['prop']=prop
-
-            if scn.dodriver:
-                createbirail1driver(objs, newobj)
-
-        return {'FINISHED'}
-
-#register the drivers
-bpy.app.driver_namespace['loftdriver'] = loftdriver
-bpy.app.driver_namespace['birail1driver'] = birail1driver
-
-### MERGE SPLINES BLOCK
-
-#reads spline points
-#spl spline to read
-#rev reads the spline forward or backwards
-def readspline(spl, rev=0):
-    res = []
-
-    if spl.type=="BEZIER":
-        points = spl.bezier_points
-        for p in points:
-            if rev:
-                h2 = p.handle_left
-                h1 = p.handle_right
-                h2type = p.handle_left_type
-                h1type = p.handle_right_type
-            else:
-                h1 = p.handle_left
-                h2 = p.handle_right
-                h1type = p.handle_left_type
-                h2type = p.handle_right_type
-
-            co = p.co
-            res.append([h1, co, h2, h1type, h2type])
-    if rev:
-        res.reverse()
-
-    return res
-
-#returns a new merged spline
-#cu curve object
-#pts1 points from the first spline
-#pts2 points from the second spline
-
-def merge(cu, pts1, pts2):
-    newspl = cu.data.splines.new(type="BEZIER")
-    for i, p in enumerate(pts1):
-
-        if i>0: newspl.bezier_points.add()
-        newspl.bezier_points[i].handle_left = p[0]
-        newspl.bezier_points[i].co = p[1]
-        newspl.bezier_points[i].handle_right = p[2]
-        newspl.bezier_points[i].handle_left_type = p[3]
-        newspl.bezier_points[i].handle_right_type = p[4]
-
-    newspl.bezier_points[-1].handle_right_type="FREE"
-    newspl.bezier_points[-1].handle_left_type="FREE"
-
-    newspl.bezier_points[-1].handle_right = pts2[0][2]
-
-
-    for j in range(1, len(pts2)):
-
-        newspl.bezier_points.add()
-        newspl.bezier_points[-1].handle_left = pts2[j][0]
-        newspl.bezier_points[-1].co = pts2[j][1]
-        newspl.bezier_points[-1].handle_right = pts2[j][2]
-        newspl.bezier_points[-1].handle_left_type = pts2[j][3]
-        newspl.bezier_points[-1].handle_right_type = pts2[j][4]
-
-    return newspl
-
-#looks if the splines first and last points are close to another spline
-### TODO: Check if the objects selected are valid
-### if possible implement nurbs
-
-class MergeSplinesOperator(bpy.types.Operator):
-
-    bl_idname = "curve.merge_splines"
-    bl_label = "Merges spline points inside a limit"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        curves = []
-        limit = context.scene.limit
-        print("merguing")
-        for obj in context.selected_objects:
-            if obj.type=="CURVE":
-                curves.append(obj)
-
-        for cu in curves:
-            splines = []
-            for spl in cu.data.splines:
-                splines.append(spl)
-            print(splines)
-            #compares all the splines inside a curve object
-            for spl1 in splines:
-                for spl2 in splines:
-                    print(spl1, spl2)
-                    if spl1!=spl2 and spl1.type==spl2.type=="BEZIER" and spl1.use_cyclic_u==spl2.use_cyclic_u==False:
-                        print("not cyclic")
-                        if len(spl1.bezier_points)>1  and len(spl2.bezier_points)>1:
-
-                            #edges of the 2 splines
-                            p1i = spl1.bezier_points[0].co
-                            p1f = spl1.bezier_points[-1].co
-                            p2i = spl2.bezier_points[0].co
-                            p2f = spl2.bezier_points[-1].co
-
-                            if dist(p1i, p2i)<limit:
-                                print("join p1i p2i")
-
-                                p1 = readspline(spl2, 1)
-                                p2 = readspline(spl1)
-                                res=merge(cu, p1, p2)
-                                cu.data.splines.remove(spl1)
-                                cu.data.splines.remove(spl2)
-                                splines.append(res)
-                                break
-                            elif dist(p1i, p2f)<limit:
-                                print("join p1i p2f")
-                                p1 = readspline(spl2)
-                                p2 = readspline(spl1)
-                                res = merge(cu, p1, p2)
-                                cu.data.splines.remove(spl1)
-                                cu.data.splines.remove(spl2)
-                                splines.append(res)
-                                break
-                            elif dist(p1f, p2i)<limit:
-                                print("join p1f p2i")
-                                p1 = readspline(spl1)
-                                p2 = readspline(spl2)
-                                res = merge(cu, p1, p2)
-                                cu.data.splines.remove(spl1)
-                                cu.data.splines.remove(spl2)
-                                splines.append(res)
-                                break
-                            elif dist(p1f, p2f)<limit:
-                                print("unir p1f p2f")
-                                p1 = readspline(spl1)
-                                p2 = readspline(spl2, 1)
-                                res = merge(cu, p1, p2)
-                                cu.data.splines.remove(spl1)
-                                cu.data.splines.remove(spl2)
-                                splines.append(res)
-                                break
-
-        #splines.remove(spl1)
-        return {'FINISHED'}
-
-### NURBS WEIGHTS
-
-class NurbsWeightsPanel(bpy.types.Panel):
-    bl_label = "Nurbs Weights"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-    #bl_context = "data"
-
-    @classmethod
-    def poll(cls, context):
-        if context.active_object != None and context.active_object.type =="CURVE" and context.active_object.data.splines.active!=None and context.active_object.data.splines.active.type=="NURBS":
-            return True
-        else:
-            return False
-
-
-    def draw(self, context):
-        layout = self.layout
-
-        obj = context.object
-
-        for p in obj.data.splines.active.points:
-            if p.select:
-                row = layout.row()
-                row.prop(p,  "weight")
-
-### CUT / SUBDIVIDE CURVE
-#obj curve object
-#t parameter to perform the cut or split
-#method True = subdivide, Flase= Split
-
-def cutcurve(obj, t, method=True):
-
-    #flocal to global transforms or viceversa
-
-
-    #retrieves the active spline or the first spline if there no one active
-
-    spline=None
-    if obj.data.splines.active==None:
-        for sp in obj.data.splines:
-            if sp.type=="BEZIER":
-                spline= sp
-                break
-    else:
-        if obj.data.splines.active.type!="BEZIER":
-            return False
-        else:
-            spline=obj.data.splines.active
-
-    if spline==None: return False
-
-    points = spline.bezier_points
-    nsegs = len(points)-1
-
-    #transform global t into local t1
-    d = 1.0/nsegs
-    seg = int(t/d)
-    t1 = t/d-int(t/d)
-    if t>=1.0:
-        t=1.0
-        seg-=1
-        t1 = 1.0
-
-    #if t1 is not inside a segment dont perform any action
-    if t1>0.0 and t1<1.0:
-        mw = obj.matrix_world
-        mwi = obj.matrix_world.copy().inverted()
-
-        pts = getbezpoints(spline, mw, seg)
-
-        #position on the curve to perform the action
-        pos = calct(obj, t)
-
-        #De Casteljau's algorithm to get the handles
-        #http://en.wikipedia.org/wiki/De_Casteljau%27s_algorithm
-        h1 = pts[0]+(pts[1]-pts[0])*t1
-        h4 = pts[2]+(pts[3]-pts[2])*t1
-        r = pts[1]+(pts[2]-pts[1])*t1
-        h2 = h1+(r-h1)*t1
-        h3 = r+(h4-r)*t1
-
-
-        if method:
-            #SUBDIVIDE
-            splp = []
-            type = "ALIGNED"
-            for i, p in enumerate(points):
-                ph1 = p.handle_left*mw
-                pco = p.co*mw
-                ph2 = p.handle_right*mw
-                ph1type = p.handle_left_type
-                ph2type = p.handle_right_type
-                splp.append([ph1, pco, ph2, ph1type, ph2type])
-                p.handle_left_type = type
-                p.handle_right_type = type
-
-                if i==seg:
-                    splp[-1][2]=h1
-                    splp.append([h2, pos, h3, type, type])
-
-                if i==seg+1:
-                    splp[-1][0]=h4
-                    splp[-1][3]=type
-                    splp[-1][4]=type
-                #if i dont set all the handles to "FREE"
-                #it returns weirds result
-                ### TODO: find out how to preserve handle's types
-
-            points.add()
-            for i, p in enumerate(points):
-                p.handle_left_type = "FREE"
-                p.handle_right_type ="FREE"
-                p.handle_left = splp[i][0]*mwi
-                p.co = splp[i][1]*mwi
-                p.handle_right=splp[i][2]*mwi
-                p.handle_left_type = splp[i][3]
-                p.handle_right_type =splp[i][4]
-        else:
-            #SPLIT CURVE
-            spl1 = []
-            spl2 = []
-            k=0 #changes to 1 when the first spline is processed
-            type = "ALIGNED"
-            for i, p in enumerate(points):
-                ph1 = p.handle_left*mw
-                pco = p.co*mw
-                ph2 = p.handle_right*mw
-                ph1type = p.handle_left_type
-                ph2type = p.handle_right_type
-                if k==0:
-                    spl1.append([ph1, pco, ph2, ph1type, ph2type])
-                else:
-                    spl2.append([ph1, pco, ph2, ph1type, ph2type])
-
-                if i==seg:
-                    spl1[-1][2]=h1
-                    spl1.append([h2, pos, h3, type, type])
-                    spl2.append([h2, pos, h3, type, type])
-                    k=1
-
-                if i==seg+1:
-                    spl2[-1][0]=h4
-                    spl2[-1][3]=type
-                    spl2[-1][4]=type
-
-            sp1 = obj.data.splines.new(type="BEZIER")
-            for i, p in enumerate(spl1):
-                if i>0: sp1.bezier_points.add()
-                sp1.bezier_points[i].handle_left_type = "FREE"
-                sp1.bezier_points[i].handle_right_type ="FREE"
-                sp1.bezier_points[i].handle_left = spl1[i][0]*mwi
-                sp1.bezier_points[i].co = spl1[i][1]*mwi
-                sp1.bezier_points[i].handle_right=spl1[i][2]*mwi
-                #i tried to preserve the handles here but
-                #didnt work well
-
-                sp1.bezier_points[i].handle_left_type = spl1[i][3]
-                sp1.bezier_points[i].handle_right_type =spl1[i][4]
-
-            sp2 = obj.data.splines.new(type="BEZIER")
-            for i, p in enumerate(spl2):
-                if i>0: sp2.bezier_points.add()
-                sp2.bezier_points[i].handle_left_type = "FREE"
-                sp2.bezier_points[i].handle_right_type = "FREE"
-                sp2.bezier_points[i].handle_left = spl2[i][0]*mwi
-                sp2.bezier_points[i].co = spl2[i][1]*mwi
-                sp2.bezier_points[i].handle_right=spl2[i][2]*mwi
-                sp2.bezier_points[i].handle_left_type = spl2[i][3]
-                sp2.bezier_points[i].handle_right_type =spl2[i][4]
-
-            obj.data.splines.remove(spline)
-
-class CutCurveOperator(bpy.types.Operator):
-    """Subdivide / Split a bezier curve"""
-    bl_idname = "curve.cut_operator"
-    bl_label = "Cut curve operator"
-
-    #cut or split
-    method = bpy.props.BoolProperty(default=False)
-    t = 0.0
-
-    @classmethod
-    def poll(self, context):
-        if context.active_object!=None:
-            return context.active_object.type=="CURVE"
-        else:
-            return False
-
-
-    def modal(self, context, event):
-
-        if event.type == 'MOUSEMOVE':
-            #full screen width
-            #not tested for multiple monitors
-            fullw = context.window_manager.windows[0].screen.areas[0].regions[0].width
-
-            self.t = event.mouse_x/fullw
-
-            #limit t to [0,...,1]
-            if self.t<0:
-                self.t=0.0
-            elif self.t>1.0:
-                self.t=1.0
-
-            obj = context.object
-            pos = calct(obj, self.t)
-
-            #if calct() detects a non bezier spline returns false
-            if pos==False:
-                return {'CANCELLED'}
-            cursor(pos)
-
-        elif event.type == 'LEFTMOUSE':
-            #print(self.method, self.t)
-            cutcurve(context.object, self.t, self.method)
-            return {'FINISHED'}
-
-        elif event.type in {'RIGHTMOUSE', 'ESC'}:
-            #print("Cancelled")
-
-            return {'CANCELLED'}
-
-        return {'RUNNING_MODAL'}
-
-    def invoke(self, context, event):
-
-        if context.object:
-            context.window_manager.modal_handler_add(self)
-            return {'RUNNING_MODAL'}
-        else:
-            self.report({'WARNING'}, "No active object, could not finish")
-            return {'CANCELLED'}
-
-### CURVE SNAP BLOCK
-
-class AllowCurveSnap(bpy.types.Operator):
-    bl_idname = "curve.allow_curve_snap"
-    bl_label = "Allow Curve Snap"
-
-    add = bpy.props.BoolProperty()
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object!=None
-
-    def execute(self, context):
-        add = self.add
-
-        scn = context.scene
-
-        if add==False:
-            for helper in context.scene.objects:
-                for key  in helper.keys():
-                    print(key)
-                    if key=="is_snap_helper" and helper[key]==1:
-                        scn.objects.unlink(helper)
-        else:
-            #objs = context.selected_objects
-            objs = context.scene.objects
-            for obj in objs:
-                if obj.type=="CURVE":
-
-                    res = obj.data.resolution_u
-
-                    obj.data.resolution_u = 100
-
-                    me = obj.to_mesh(scene=scn, apply_modifiers=True,settings = "PREVIEW" )
-                    obj.data.resolution_u = res
-                    newobj = bpy.data.objects.new(obj.name+"_snap", me)
-                    scn.objects.link(newobj)
-                    newobj.layers = obj.layers
-                    newobj.matrix_world = obj.matrix_world
-                    newobj["is_snap_helper"]=True
-                    newobj.hide_render=True
-                    newobj.hide_select = True
-                    cons = newobj.constraints.new(type="COPY_TRANSFORMS")
-                    cons.target =obj
-
-        return {'FINISHED'}
-
-def menu_func(self, context):
-    self.layout.operator("curve.allow_curve_snap").add=True
-    self.layout.operator("curve.allow_curve_snap", text = "Delete Snap Helpers").add=False
-
-### PANEL
-class CurvePanel(bpy.types.Panel):
-    bl_label = "Curve Tools"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-    #bl_options = {'REGISTER', 'UNDO'}
-    #bl_context = "data"
-    bl_options = {'DEFAULT_CLOSED'}
-    steps = IntProperty(min=2, default = 12)
-
-    @classmethod
-    def poll(cls, context):
-        return (context.active_object != None) and (context.active_object.type=="CURVE")
-    def draw(self, context):
-        layout = self.layout
-
-        obj = context.object
-        scn = context.scene
-
-        align = True
-        row = layout.row(align=align)
-
-        row.prop(context.scene, "intype", text = "")
-        row.prop(context.scene, "dodriver", text = "Driven")
-        if scn.intype=='3': #Hermite interp
-            row = layout.row(align=align)
-            row.prop(scn, "tension")
-            row.prop(scn, "bias")
-
-        row = layout.row(align=align)
-        row.prop(context.scene, "steps")
-        row.prop(context.scene, "spans")
-        row = layout.row(align=align)
-        row.operator("mesh.loft_operator", text = "Loft")
-        row.operator("mesh.update_fix", text = "Update Fix")
-        row = layout.row(align=align)
-        row.operator("mesh.birail1_operator", text = "Birail 1")
-        row.prop(context.scene, "proportional", text = "Proportional")
-        row = layout.row(align=align)
-        row.operator("curve.arc_length_operator", text = "Calc Length")
-        row.prop(context.scene, "clen", text = "")
-        row = layout.row(align=align)
-        row.operator("curve.merge_splines", text = "Merge")
-        row.prop(context.scene,"limit",  text = "Limit")
-        row = layout.row(align=align)
-        row.operator("curve.cut_operator", text="Subdivide").method=True
-        row.operator("curve.cut_operator", text="Split").method=False
-
-#       col1 = row.column()
-#       col1.prop(context.scene, "intype", text = "")
-#       col1.prop(context.scene, "dodriver", text = "Driven")
-#       row = layout.row(align=align)
-#       col2 = row.column(align=align)
-#       col2.prop(context.scene, "steps")
-#       col2.prop(context.scene, "spans")
-#       row = layout.row(align=align)
-#       row.operator("mesh.loft_operator", text = "Loft")
-#       row.operator("mesh.update_fix", text = "Update Fix")
-#       row = layout.row(align=align)
-#       row.operator("mesh.birail1_operator", text = "Birail 1")
-#       row.prop(context.scene, "proportional", text = "Proportional")
-#       row = layout.row(align=align)
-#       row.operator("curve.arc_length_operator", text = "Calc Length")
-#       row.prop(context.scene, "clen", text = "")
-#       row = layout.row(align=align)
-#       row.operator("curve.merge_splines", text = "Merge")
-#       row.prop(context.scene,"limit",  text = "Limit")
-#       row = layout.row(align=align)
-#       row.operator("curve.cut_operator", text="Subdivide").method=True
-#       row.operator("curve.cut_operator", text="Split").method=False
-
-classes = [AllowCurveSnap, Selection, LoftOperator, Birail1Operator,
-            ArcLengthOperator, UpdateFix, MergeSplinesOperator, CutCurveOperator, NurbsWeightsPanel, CurvePanel]
-
-bpy.app.driver_namespace['loftdriver'] = loftdriver
-bpy.app.driver_namespace['birail1driver'] = birail1driver
-
-def register():
-
-    domenu=1
-    for op in dir(bpy.types):
-        if op=="CURVE_OT_allow_curve_snap":
-            domenu=0
-            break
-    if domenu:
-        bpy.types.VIEW3D_MT_object_specials.append(menu_func)
-
-    for c in classes:
-        bpy.utils.register_class(c)
-
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-
-    bpy.types.VIEW3D_MT_object_specials.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/development_class_viewer.py b/release/scripts/addons_contrib/development_class_viewer.py
deleted file mode 100644
index efd822a..0000000
--- a/release/scripts/addons_contrib/development_class_viewer.py
+++ /dev/null
@@ -1,194 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': "Class Viewer",
-    'author': "Mackraken", "batFinger"
-    'version': (0, 1, 2),
-    'blender': (2, 5, 8),
-    'location': "Text Editor > Toolbar, Text Editor > Right Click",
-    'warning': "",
-    'description': "List text's classes and definitions",
-    'wiki_url': "https://sites.google.com/site/aleonserra/home/scripts/class-viewer",
-    'category': "Development"}
-
-import bpy
-
-#lists all defs, comment or classes
-#space = current text editor
-#sort = sort result
-#tipo = kind of struct to look for
-#escape = character right next to the class or def name 
-
-def getfunc(space, sort, tipo="def ", escape= ""):
-    defs = []
-    if space.type=="TEXT_EDITOR":
-        if space.text!=None:
-            txt = space.text
-            
-            for i, l in enumerate(txt.lines):
-                try:
-                    line = l.body
-                except:
-                    line=""
-                
-                if line[0:len(tipo)]==tipo:
-                    end = line.find(escape)
-                    if end==0:
-                        func = line[len(tipo)::]
-                    else:
-                        func = line[len(tipo):end]
-                    defs.append([func, i+1])
-            
-            if sort: defs.sort()
-    
-    return defs
-
-class TEXT_OT_Jumptoline(bpy.types.Operator):
-    bl_label = "Jump"
-    bl_idname = "text.jumptoline"
-    __doc__ = "Jump to line"
-    line = bpy.props.IntProperty(default=-1)
-    
-    @classmethod
-    def poll(cls, context):
-        if context.area.spaces[0].type!="TEXT_EDITOR":
-            return False
-        else: 
-            return context.area.spaces[0].text!=None
-    
-    def execute(self, context):
-        
-        scn = context.scene
-
-        if self.line!=-1:
-            bpy.ops.text.jump(line=self.line)
-
-        return {'FINISHED'}
-
-
-
-class CommentsMenu(bpy.types.Menu):
-    bl_idname = "OBJECT_MT_select_comments"
-    bl_label = "Select"
-    
-    
-    
-    @classmethod
-    def poll(cls, context):
-        if context.area.spaces[0].type!="TEXT_EDITOR":
-            return False
-        else: 
-            return context.area.spaces[0].text!=None
-        
-    def draw(self, context):
-    
-        layout = self.layout
-        space = context.area.spaces[0]
-        
-        items = getfunc(space, 1, "### ", "")
-        
-        for it in items:
-            layout.operator("text.jumptoline",text=it[0]).line = it[1]
-
-class DefsMenu(bpy.types.Menu):
-    bl_idname = "OBJECT_MT_select_defs"
-    bl_label = "Select"
-    
-    tipo = bpy.props.BoolProperty(default=False)
-    
-    @classmethod
-    def poll(cls, context):
-        if context.area.spaces[0].type!="TEXT_EDITOR":
-            return False
-        else: 
-            return context.area.spaces[0].text!=None
-        
-    def draw(self, context):
-        scn = context.scene
-        layout = self.layout
-        space = context.area.spaces[0]
-        tipo = self.tipo
-        
-        
-        items = getfunc(space, 1, "def ", "(")
-        
-        for it in items:
-            layout.operator("text.jumptoline",text=it[0]).line = it[1]
-                
-class ClassesMenu(bpy.types.Menu):
-    bl_idname = "OBJECT_MT_select_classes"
-    bl_label = "Select"
-    
-    
-    
-    @classmethod
-    def poll(cls, context):
-        if context.area.spaces[0].type!="TEXT_EDITOR":
-            return False
-        else: 
-            return context.area.spaces[0].text!=None
-        
-    def draw(self, context):
-    
-        layout = self.layout
-        space = context.area.spaces[0]
-    
-        
-        
-        items = getfunc(space, 1, "class ", "(")
-        
-        for it in items:
-            layout.operator("text.jumptoline",text=it[0]).line = it[1]
-
-
-            
-def GotoComments(self, context): 
-    self.layout.menu("OBJECT_MT_select_comments", text="Comments", icon='PLUGIN')
-    return False
-
-def GotoDefs(self, context): 
-    self.layout.menu("OBJECT_MT_select_defs", text="Defs", icon='PLUGIN')
-    return False
-
-def GotoClasses(self, context): 
-    self.layout.menu("OBJECT_MT_select_classes", text="Classes", icon='PLUGIN')
-    return False
-
-
-classes = [TEXT_OT_Jumptoline, ClassesMenu, DefsMenu, CommentsMenu]
-
-
-def register():
-    for c in classes:
-        bpy.utils.register_class(c)
-        
-    bpy.types.TEXT_MT_toolbox.append(GotoComments)
-    bpy.types.TEXT_MT_toolbox.append(GotoDefs)
-    bpy.types.TEXT_MT_toolbox.append(GotoClasses)
-
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-        
-        bpy.types.TEXT_MT_toolbox.remove(GotoComments)
-    bpy.types.TEXT_MT_toolbox.remove(GotoDefs)
-    bpy.types.TEXT_MT_toolbox.remove(GotoClasses)
-    
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/__init__.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/__init__.py
deleted file mode 100644
index ca78b0b..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/__init__.py
+++ /dev/null
@@ -1,91 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# Script copyright (C) Marcus Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-bl_info = {
-    "name": "BRIK - Blender Ragdoll Implementation Kit",
-    "author": "FunkyWyrm",
-    "version": (0,2),
-    "blender": (2, 5, 5),
-    "api": 31965,
-    "location": "View 3D > Tool Shelf > BRIK Panel",
-    "description": "Kit for creating ragdoll structures from armatures and implementing them in the game engine.",
-    "warning": "Preliminary release for testing purposes. Use with caution on important files.",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
-        "Scripts/Game_Engine/BRIK_ragdolls",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=24946",
-    "category": "Game Engine"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(brik)
-else:
-    from . import brik
-
-import bpy
-
-################################################################################
-
-##### REGISTER #####
-def register():
-    #Register brik add-on
-    bpy.utils.register_module(__name__)
-
-    #Set-up gui menu properties using the bpy.types.Scene type
-    scnType = bpy.types.Scene
-    
-    FloatProperty = bpy.props.FloatProperty
-    scnType.brik_ragdoll_mass = FloatProperty( name = "Ragdoll mass", 
-                                               default = 80.0, min = 0.05, max= 99999,
-                                               description = "The total mass of the ragdoll rigid body structure created with BRIK",  
-                                               update = brik.calc_ragdoll_mass)
-                                    
-    # triplet setup.... ( return value, name, description )
-    EnumProperty = bpy.props.EnumProperty
-    menu_options = [  ( "All", "All", "Use all armature bones" ) ]
-    #enumProp = EnumProperty( name = "Bone selection", items = menu_options, 
-    enumProp = EnumProperty( name = "Bone selection", items = brik_bone_list, 
-                    description = "Use the bones from the selected bone group" )
-  
-    scnType.brik_bone_groups = enumProp
-    pass
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    pass
-    
-def brik_bone_list(self, context):
-    ob = bpy.context.object
-    group_list = [  ( "All", "All", "Use all armature bones" ) ]
-    if ob.type == 'ARMATURE':
-        #Select bone groups
-        ob_pose = ob.pose
-        bone_groups = ob_pose.bone_groups
-        for item in bone_groups:
-            group_list = group_list + [(item.name, item.name, "Use bones in selected bone group")]
-            
-    return group_list
-
-if __name__ == "__main__":
-    register()
-    
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik.py
deleted file mode 100644
index 6cafaa5..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik.py
+++ /dev/null
@@ -1,1243 +0,0 @@
-#brik_0_2.py
-
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# Script copyright (C) Marcus Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-"""
-brik is the Blender Ragdoll Implementation Kit.
-
-It aims to provide a tool kit that enables the easy implementation of ragdolls in Blender.
-
-Acnowledgements:
-    This section comes first because I am grateful to Thomas Eldredge (teldredge on
-www.blenderartists.com). Without his great script to take apart, I would never have got
-around to this even though it's been in my todo list for a while. The link to his thread is
-http://blenderartists.org/forum/showthread.php?t=152150
-    
-Website:
-    Blenderartists script development thread is:
-    http://blenderartists.org/forum/showthread.php?t=199191
-
-Bugs:
-    
-    Editing a text file after hitting the create or destroy button and then
-    changing an option such as writing the hierarchy file will undo the edits
-    to the text. This is a known bug due to the lack of a text editor global
-    undo push. See the bug tracker:
-        https://projects.blender.org/tracker/index.php?func=detail&aid=21043&group_id=9&atid=498
-            
-    Creating rigid body structures based on multiple armatures in the scene that have similarly
-    named bones can cause some rigid body objects to be removed. This can probably be fixed by
-    testing for membership of a group. However, similarly named bones should be renamed to a
-    unique name since bone name and driver object name being similar is essential for correct
-    operation of both the brik script and the brik_Use_doll game engine script.
-    
-    Running Create multiple times on the same armature will recreate the rigid body joints
-    rather than editing existing ones.
-
-Notes:
-    
-    The mass of each object could be calculated using their volume. The
-    armature could be assigned a mass and the bones' mass could be calculated
-    from this using their volume.
-    
-    Non-deforming bones do not have rigid body objects created for them. 
-    Perhaps this would be better given as a toggle option.
-"""
-
-import bpy
-from bpy.props import *
-import mathutils
-from mathutils import Vector
-from game_engine_ragdolls_kit.brik_funcs import *
-
-class VIEW3D_PT_brik_panel(bpy.types.Panel):
-
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_context = 'objectmode'
-    bl_label = 'brik'
-    bl_options = {'DEFAULT_CLOSED'}  
-    
-    #Draws the panel header in the tools pane
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(text='', icon='CONSTRAINT_BONE')
-        
-    #Draws the brik panel in the tools pane
-    def draw(self, context):
-        ob = bpy.context.object
-        scn = bpy.context.scene
-        layout = self.layout
-
-        col = layout.column()
-        
-        if ob:
-            col.prop(ob, 'name', text = 'Selected', icon = 'OUTLINER_OB_'+str(ob.type))
-    
-            layout.separator()
-    
-            box = layout.box()
-            box.label(text = 'Create or remove?')
-                
-            
-            if ob.type == 'ARMATURE':
-                brik_structure = 'brik_structure_created' in ob.keys() and ob['brik_structure_created']
-                hitboxes = 'brik_hit_boxes_created' in ob.keys() and ob['brik_hit_boxes_created']
-                
-                col.label(text = 'BRIK structure settings')
-                row = col.row()
-                col.prop( scn, "brik_ragdoll_mass" )      
-                col.prop( scn, "brik_bone_groups" )   
-                
-                col = box.column(align=True)
-                row = col.row()
-                row.active = not(brik_structure)
-                row.operator('object.brik_create_structure', text = 'Create structure')
-                
-                row = col.row()
-                row.active = brik_structure
-                row.operator('object.brik_destroy_structure', text = 'Remove structure')
-                
-                row = col.row()
-                row.active = not(hitboxes)
-#                col = box.column(align = True)
-                row.operator('object.brik_create_hit_boxes', text = 'Create hit boxes')
-                
-                row = col.row()
-                row.active = hitboxes
-                row.operator('object.brik_remove_hit_boxes', text = 'Remove hit boxes')
-                
-                row = col.row()
-                row.active = hitboxes and brik_structure
-                row.operator('object.brik_link_structure', text = 'Link objects')
-                
-            else:
-                box.label(text='Select armature')
-                
-            game_options_active = 'brik_structure_created' in ob.keys() and ob['brik_structure_created'] \
-                                    and 'brik_hit_boxes_created' in ob.keys() and ob['brik_hit_boxes_created']
-            col = box.column(align = True)
-            col.active = game_options_active
-            col.label(text='Game options:')
-            col.operator('object.brik_write_game_file', text = 'Write game file')
-            create_logic_active = 'brik_file_written' in ob.keys() and ob['brik_file_written']
-            row = col.row()
-            row.active = create_logic_active
-            row.operator('object.brik_create_game_logic', text = 'Create game logic')
-                
-        else:
-            col.label(text='Select an object')
-            
-        def test_func(operator):
-            print(operator)
-            
-class brik_link_structure(bpy.types.Operator):
-    bl_label = 'brik link structure operator'
-    bl_idname = 'object.brik_link_structure'
-    bl_description = 'Links the object data of the hitboxes and corresponding rigid bodies'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    def draw(self, context):
-        #No menu options available
-        pass
-    #Create links
-    def execute(self, context):
-        armature = bpy.context.active_object
-        driver_dict = armature['brik_bone_driver_dict']
-        hitbox_dict = armature['brik_bone_hit_box_dict']
-        objects = bpy.data.objects
-        for bone_name in hitbox_dict:
-            hitbox = objects[hitbox_dict[bone_name]]
-#            print(driver_dict, bone_name, objects)
-            driver_box = objects[driver_dict[bone_name]]
-            #select hitbox
-            select_name(name = hitbox_dict[bone_name], extend = False)
-            #select driver_box
-            select_name(name = driver_dict[bone_name], extend = True)
-            #create link
-            bpy.ops.object.make_links_data(type='OBDATA')
-        #return original selection
-        select_name(name = armature.name, extend = False)
-        
-        return{'FINISHED'}
-
-class brik_create_structure(bpy.types.Operator):
-    bl_label = 'brik create structure operator'
-    bl_idname = 'object.brik_create_structure'
-    bl_description = 'Create a rigid body structure based on an amature.'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    #Properties that can be changed by the user
-
-    prefix = StringProperty(name='Prefix', \
-                            description='Prefix to be appended to the bone name that defines the rigid body object.',\
-                            default='RB_')
-    
-    driver_length = FloatProperty(name='Driver length',\
-                              description='Length of rigid body driver objects as proportion of bone length.',\
-                              min=0.05,\
-                              max=1.0,\
-                              step=0.05,\
-                              default=0.8)
-    
-    driver_width = FloatProperty(name = 'Driver width',\
-                                  description='Width of rigid body driver objects as proportion of bone length',\
-                                  min=0.05,\
-                                  max=1.0,\
-                                  step=0.05,\
-                                  default=0.2)
-    
-    add_to_group = BoolProperty(name='Add to group',\
-                                description='Add all created objects to a group',\
-                                default=True)
-                                
-    invisible = BoolProperty(name='Invisible',\
-                                description='Make boxes invisible for rendering',\
-                                default=True)
-
-                                
-    box_type = EnumProperty(name="Box type",
-        description="Shape that rigid body objects are created from.",
-        items=[ \
-          ('BONE', "Bone",
-              "Plain bone dimensions are used."),
-          ('ENVELOPE', "Envelope",
-              "Bone envelope dimensions are used."),
-          ('BBONE', "BBone",
-              "BBone dimensions are used. "\
-              "(BBones can be scaled using Ctrl+Alt+S in armature edit mode.)"),
-          ],
-        default='BBONE')
-    
-    #Create the rigid body boxes
-    def create_boxes(self, armature):
-        bones = bone_group_list(armature)
-        
-        RB_dict = {}            #Dictionary of rigid body objects
-        
-        armature['brik_bone_driver_dict'] = {}
-        armature['brik_armature_locator_name'] = ''
-        
-        #All deforming bones within selected group(s) have boxes created for them
-        for bone in bones:
-
-            box = None
-            #Create boxes that do not exist
-            if self.box_type == 'BONE':
-                box, volume = create_box(self.prefix, self.driver_length, self.driver_width, armature, bone)
-            elif self.box_type == 'BBONE':
-                box, volume = create_box_bbone(self.prefix, armature, bone)
-            elif self.box_type == 'ENVELOPE':
-                box, volume = create_box_envelope(self.prefix, armature, bone)
-            
-            RB_dict[box.name] = box
-            armature['brik_bone_driver_dict'][bone.name] = box.name
-        
-            #Orientate and position the box
-            position_box(armature, bone, box)
-            box['brik_bone_name'] = bone.name
-            
-            #### Contributed by Wraaah #########
-#            box.game.physics_type = 'RIGID_BODY'
-            box.game.mass = volume
-            box.hide_render = self.invisible
-            ##############################
-        return RB_dict
-    
-    def make_bone_constraints(self, armature, RB_dict):
-        bones = bone_group_list(armature)
-        #bones_dict = armature.pose.bones
-        
-        #for bone in bones_dict:
-        for bone in bones:
-            if not 'brik_copy_rot' in bone.constraints:
-                constraint = bone.constraints.new(type='COPY_ROTATION')
-                constraint.name = 'brik_copy_rot'
-                constraint.target = RB_dict[armature['brik_bone_driver_dict'][bone.name]]
-                #Enable posing armature after creating brik structure
-                constraint.influence = 0.0
-            if not 'brik_copy_loc' in bone.constraints:
-            #Check if copy loc is needed
-                use_copy_loc = False
-                #rigid_body_name = rigid_bodies[bone_name]
-                if bone.parent:
-                    if bones.count(bone.parent) == 0:
-                        use_copy_loc = True
-                else:
-                    use_copy_loc = True
-
-                if use_copy_loc:
-                    RB_object = RB_dict[armature['brik_bone_driver_dict'][bone.name]]
-                    loc_targ_name = RB_object.name + "_loc"
-                    #print(bone.head, bone.tail)
-                    if bpy.data.objects.get(loc_targ_name, False):
-                        locator = bpy.data.objects[loc_targ_name]
-                        locator.location = (0.0,-bone.length/2,0.0)
-                        locator.parent = RB_object
-                    else:
-                        bpy.ops.object.add(type='EMPTY')
-                        locator = bpy.context.object
-                        locator.name = loc_targ_name
-                        locator.location = (0.0,-bone.length/2,0.0)
-                        locator.parent = RB_object
-                        #bpy.ops.object.select_all(action='DESELECT')
-                        #armature.select = True
-                        select_name(name=armature.name, extend=False)
-                    constraint = bone.constraints.new(type='COPY_LOCATION')
-                    constraint.name = 'brik_copy_loc'
-                    constraint.target = locator
-                    #Enable posing armature after creating brik structure
-                    constraint.influence = 0.0
-    
-    def reshape_boxes(self, armature):
-        """
-        Reshape an existing box based on parameter changes.
-        I introduced this as an attempt to improve responsiveness. This should
-        eliminate the overhead from creating completely new meshes or objects on
-        each refresh.
-        """
-        objects = bpy.context.scene.objects
-        
-        for bone_name in armature['brik_bone_driver_dict']:
-            bone = armature.bones[bone_name]
-            box = objects[armature['brik_bone_driver_dict'][bone_name]]
-        
-            height = bone.length
-            #gap = height * self.hit_box_length      #The distance between two boxes
-            box_length = bone.length*self.driver_length
-            width = bone.length * self.driver_width
-            
-            x = width/2
-            y = box_length/2
-            z = width/2
-            
-            verts = [[-x,y,-z],[-x,y,z],[x,y,z],[x,y,-z],\
-                     [x,-y,-z],[-x,-y,-z],[-x,-y,z],[x,-y,z]]
-            
-            #This could be a problem if custom object shapes are used...
-            count = 0
-            for vert in box.data.vertices:
-                vert.co = Vector(verts[count])
-                count += 1
-    
-    
-    #Set up the objects for rigid body physics and create rigid body joints.
-    def make_RB_constraints(self, armature, RB_dict):
-        bones_dict = armature.pose.bones
-        
-        for box in RB_dict:
-            bone = bones_dict[RB_dict[box]['brik_bone_name']]
-            
-            boxObj = RB_dict[box]
-            
-            #Make the radius half the length of the longest axis of the box
-            radius_driver_length = (bone.length*self.driver_length)/2
-            radius_driver_width = (bone.length*self.driver_width)/2
-            radius = radius_driver_length
-            if radius_driver_width > radius:
-                radius = radius_driver_width
-            
-            
-            #Set up game physics attributes
-            boxObj.game.use_actor = True
-            boxObj.game.use_ghost = False
-            boxObj.game.physics_type = 'RIGID_BODY'
-            boxObj.game.use_collision_bounds = True
-            boxObj.game.collision_bounds_type = 'BOX'
-            boxObj.game.radius = radius
-                
-            #Make the rigid body joints
-            if bone.parent:
-                #print(bone, bone.parent)
-                boxObj['brik_joint_target'] = armature['brik_bone_driver_dict'][bone.parent.name]
-                RB_joint = boxObj.constraints.new('RIGID_BODY_JOINT')
-                RB_joint.pivot_y = -bone.length/2
-                RB_joint.target = RB_dict[boxObj['brik_joint_target']]
-                RB_joint.use_linked_collision = True
-                RB_joint.pivot_type = ("GENERIC_6_DOF")
-                RB_joint.limit_angle_max_x = bone.ik_max_x
-                RB_joint.limit_angle_max_y = bone.ik_max_y
-                RB_joint.limit_angle_max_z = bone.ik_max_z
-                RB_joint.limit_angle_min_x = bone.ik_min_x
-                RB_joint.limit_angle_min_y = bone.ik_min_y
-                RB_joint.limit_angle_min_z = bone.ik_min_z
-                RB_joint.use_limit_x = True
-                RB_joint.use_limit_y = True
-                RB_joint.use_limit_z = True
-                RB_joint.use_angular_limit_x = True
-                RB_joint.use_angular_limit_y = True
-                RB_joint.use_angular_limit_z = True
-            else:
-                boxObj['brik_joint_target'] = 'None'
-    
-    def add_boxes_to_group(self, armature, RB_dict):
- 
-        #print("Adding boxes to group")
-        group_name = self.prefix+armature.name+"_Group"
-        if not group_name in bpy.data.groups:
-            group = bpy.data.groups.new(group_name)
-        else:
-            group = bpy.data.groups[group_name]
-        #print(group)
-        #print(RB_dict)
-        for box in RB_dict:
-            if not box in group.objects:
-                group.objects.link(bpy.context.scene.objects[box])
-            box_loc = box + "_loc"
-            print(box_loc)
-            if bpy.context.scene.objects.get(box_loc, None):
-                if not box_loc in group.objects:
-                    group.objects.link(bpy.context.scene.objects[box_loc])
-        
-        armature["ragdoll_group"] = group.name
-        return
-    
-    #Armature and mesh need to be set to either no collision or ghost. No collision
-    #is much faster.
-    #=> also affects Hitboxes & armature collision shape, need to be fixed/reconsidered
-    def set_armature_physics(self, armature):
-        armature.game.physics_type = 'NO_COLLISION'
-#        for child in armature.children:
-#            if hasattr(armature, "['brik_hit_boxes_created']"):
-#                if child.name in armature['brik_bone_hit_box_dict'].values():
-#                    continue
-#                else:
-#                    child.game.physics_type = 'NO_COLLISION'
-#            else:
-#                child.game.physics_type = 'NO_COLLISION'
-                
-
-    #The ui of the create operator that appears when the operator is called
-    def draw(self, context):
-        layout = self.layout
-
-        box = layout.box()
-        box.prop(self.properties, 'prefix')
-        box.prop(self.properties, 'add_to_group')
-        box.prop(self.properties, 'invisible')
-        box.prop(self.properties, 'box_type')
-        if self.box_type == 'BONE':
-            box.prop(self.properties, 'driver_length')
-            box.prop(self.properties, 'driver_width')
-            
-    #The main part of the create operator
-    def execute(self, context):
-        #print("\n##########\n")
-        #print("EXECUTING brik_create_structure\n")
-        
-        armature = context.object
-        
-        self.set_armature_physics(armature)
-        
-        
-        if 'brik_structure_created' in armature.keys()\
-                and armature['brik_structure_created'] == True\
-                and self.box_type == 'BONE':
-            
-            self.reshape_boxes(armature)
-            
-        else:
-            RB_dict = self.create_boxes(armature)
-            armature['brik_structure_created'] = True
-            armature['brik_prefix'] = self.prefix
-            
-            self.make_RB_constraints(armature, RB_dict)
-            self.make_bone_constraints(armature, RB_dict)
-            
-            if self.add_to_group:
-                self.add_boxes_to_group(armature, RB_dict)
-
-        calc_ragdoll_mass(self, context)
-        
-        return{'FINISHED'}
-
-class brik_destroy_structure(bpy.types.Operator):
-    bl_label = 'brik destroy structure operator'
-    bl_idname = 'object.brik_destroy_structure'
-    bl_description = 'Destroy a rigid body structure created by this brik.'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    """
-    For some reason the remove operators give a "cyclic" warning in the console.
-    
-    I have no idea what this means and have not been able to find out what this means.
-    """
-    
-    def execute(self, context):
-        print("\n##########\n")
-        print("EXECUTING brik_remove_structure")
-        armature = context.object
-        scene = context.scene
-        
-        bpy.ops.object.select_all(action='DESELECT')        
-        #Clean up all created objects, their meshes and bone constraints
-        for bone_name in armature['brik_bone_driver_dict']:
-            driver = scene.objects[armature['brik_bone_driver_dict'][bone_name]]
-            #Unlink and remove the mesh
-#            mesh = driver.data
-#            driver.data = None
-#            mesh.user_clear()
-#            bpy.data.meshes.remove(mesh)
-            select_name( name = armature['brik_bone_driver_dict'][bone_name], extend = True)
-            objects = bpy.data.objects
-            driver_loc = objects.get(driver.name + "_loc", None)
-            if driver_loc:
-                select_name( name = driver_loc.name, extend = True)
-            
-            #Unlink and remove the object
-#            scene.objects.unlink(driver)
-#            driver.user_clear()
-#            bpy.data.objects.remove(driver)
-            
-            #Remove bone constraints
-            bone = armature.pose.bones[bone_name]
-            if 'brik_copy_rot' in bone.constraints:
-                const = bone.constraints['brik_copy_rot']
-                bone.constraints.remove(const)
-            if 'brik_copy_loc' in bone.constraints:
-                const = bone.constraints['brik_copy_loc']
-                locator = const.target
-                bone.constraints.remove(const)
-        
-                #Remove armature locator
-                #locator = bpy.data.objects[armature['brik_armature_locator_name']]
-#                scene.objects.unlink(locator)
-#                locator.user_clear()
-#                bpy.data.objects.remove(locator)
-        bpy.ops.object.delete(use_global=False)
-        bpy.ops.object.select_all(action='DESELECT')        
-        scene.objects.active = armature
-        
-        #Remove driver group
-        group_name = armature['brik_prefix']+armature.name+'_Group'
-        if group_name in bpy.data.groups:
-            group = bpy.data.groups[group_name]
-            bpy.data.groups.remove(group)
-        
-        #Remove custom properties
-        #del armature['brik_armature_locator_name']
-        del armature['brik_structure_created']
-        del armature['brik_bone_driver_dict']
-        del armature['brik_prefix']
-    
-        return{'FINISHED'}
-        
-class brik_create_game_logic(bpy.types.Operator):
-    bl_label = 'brik create game logic operator'
-    bl_idname = 'object.brik_create_game_logic'
-    bl_description = 'Create the game logic for the created objects.'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    template_path = bpy.utils.script_paths()[0]+'\\addons_contrib\\game_engine_ragdolls_kit\\templates\\'
-    
-    game_script_list = ['brik_load.py', \
-                        'brik_init_ragdoll.py', \
-                        'brik_spawn.py']
-                            
-    
-    def set_up_armature_logic(self, armature):
-        
-        if not 'brik_use_ragdoll' in armature.game.properties:
-            
-            bpy.ops.object.game_property_new()
-            prop = armature.game.properties[-1]
-            prop.name = 'brik_use_ragdoll'
-            prop.type = 'BOOL'
-            prop.value = False
-            
-            bpy.ops.object.game_property_new()
-            prop = armature.game.properties[-1]
-            prop.name = 'brik_init_ragdoll'
-            prop.type = 'BOOL'
-            prop.value = True
-            #Add groups if needed
-            hitbox_group = armature["hitbox_group"]
-            if not(bpy.data.objects.get(hitbox_group, None)):
-                bpy.ops.object.group_instance_add(group=hitbox_group)
-            ragdoll_group = armature["ragdoll_group"]
-            if not(bpy.data.objects.get(ragdoll_group, None)):
-                bpy.ops.object.group_instance_add(group=ragdoll_group)
-            
-            #Logic to spawn the rigid body boxes
-            bpy.ops.logic.sensor_add(type='PROPERTY', name='brik_use_changed_sens', object=armature.name)
-            sens = armature.game.sensors[-1]
-            sens.property = 'brik_use_ragdoll'
-            sens.evaluation_type = 'PROPCHANGED'
-            
-            bpy.ops.logic.controller_add(type='PYTHON', name='brik_init_ragdoll_cont', object=armature.name)
-            cont = armature.game.controllers[-1]
-            cont.mode = 'MODULE'
-            cont.module = 'brik_init_ragdoll.main'
-            
-            bpy.ops.logic.actuator_add(type='EDIT_OBJECT', name='brik_spawn_boxes_act', object=armature.name)
-            act = armature.game.actuators[-1]
-            act.mode = 'ADDOBJECT'
-            act.object = (bpy.data.objects.get(ragdoll_group, None))
-            
-            cont.link(sens, act)
-            
-            #Logic to change the value of brik_use_ragdoll property
-            bpy.ops.logic.sensor_add(type='KEYBOARD', name='brik_set_use_ragdoll_sens', object=armature.name)
-            sens = armature.game.sensors[-1]
-            sens.key = 'SPACE'
-            
-            bpy.ops.logic.controller_add(type='LOGIC_AND', name='brik_set_use_ragdoll_cont', object=armature.name)
-            cont = armature.game.controllers[-1]
-            
-            bpy.ops.logic.actuator_add(type='PROPERTY', name='brik_set_use_ragdoll_act', object=armature.name)
-            act = armature.game.actuators[-1]
-            act.mode = 'ASSIGN'
-            act.property = 'brik_use_ragdoll'
-            act.value = "True"
-            
-            cont.link(sens, act)
-            
-            #Logic to use the ragdoll.
-            bpy.ops.logic.sensor_add(type='PROPERTY', name='brik_use_sens', object=armature.name)
-            sens = armature.game.sensors[-1]
-            sens.property = 'brik_use_ragdoll'
-            sens.value = 'True'
-#            sens.use_pulse_true_level = True
-            
-            bpy.ops.logic.controller_add(type='LOGIC_AND', name='brik_use_cont', object=armature.name)
-            cont = armature.game.controllers[-1]
-            
-            bpy.ops.logic.actuator_add(type='ACTION', name='brik_use_act', object=armature.name)
-            act = armature.game.actuators[-1]
-            act.type = 'ARMATURE'
-#            act.mode = 'RUN'
-            
-            cont.link(sens, act)
-    
-    def set_up_spawn_logic(self, armature):
-        print('SETTING UP SPAWN LOGIC')
-        scene = bpy.context.scene
-        
-        spawn_ob_name = armature.name + "_spawn"
-        #Need to use data to avoid naming conflicts
-        if not spawn_ob_name in bpy.data.objects:
-            bpy.ops.object.add()
-            spawn_object = bpy.context.object
-            spawn_object.name = spawn_ob_name
-
-            bpy.ops.object.game_property_new()
-            prop = spawn_object.game.properties[-1]
-            prop.name = "armature_name"
-            prop.type = 'STRING'
-#            prop.value = armature.name
-        else:
-            spawn_object = bpy.data.objects[spawn_ob_name]
-            
-        bpy.ops.object.select_all(action='DESELECT')
-        select_name(name=armature.name, extend=False)
-
-        prop = spawn_object.game.properties["armature_name"]
-        prop.value = armature.name
-
-        spawn_object.game.show_state_panel = False
-        
-        #Add groups if needed
-        hitbox_group = armature["hitbox_group"]
-        if not(bpy.data.objects.get(hitbox_group, None)):
-            bpy.ops.object.group_instance_add(group=hitbox_group)
-        ragdoll_group = armature["ragdoll_group"]
-        if not(bpy.data.objects.get(ragdoll_group, None)):
-            bpy.ops.object.group_instance_add(group=ragdoll_group)
-        
-        #Quick and dirty check to see if the spawn logic is already set up.
-        if not 'brik_spawn_cont' in spawn_object.game.controllers:
-            #The logic to spawn the mob
-            bpy.ops.logic.sensor_add(type='KEYBOARD', name='brik_Tab_sens', object=spawn_object.name)
-            sens = spawn_object.game.sensors[-1]
-            sens.key = 'TAB'
-            
-            bpy.ops.logic.controller_add(type='PYTHON', name='brik_spawn_cont', object=spawn_object.name)
-            cont = spawn_object.game.controllers[-1]
-            cont.mode = 'MODULE'
-            cont.module = 'brik_spawn.main'
-            
-            bpy.ops.logic.actuator_add(type='EDIT_OBJECT', name='brik_spawn_act', object=spawn_object.name)
-            act = spawn_object.game.actuators[-1]
-            act.object = bpy.data.objects.get(hitbox_group, None)
-            
-            cont.link(sens, act)
-            
-            #Logic to load structure information
-            bpy.ops.logic.sensor_add(type='ALWAYS', name='brik_load_sens', object=spawn_object.name)
-            sens = spawn_object.game.sensors[-1]
-            
-            bpy.ops.logic.controller_add(type='PYTHON', name='brik_load_cont', object=spawn_object.name)
-            cont = spawn_object.game.controllers[-1]
-            cont.text = bpy.data.texts['brik_load.py']
-            
-            sens.link(cont)
-            
-            #Logic to initialise the spawn point with object to add, added object list and added object count.
-            bpy.ops.logic.controller_add(type='PYTHON', name='brik_spawn_init_cont', object=spawn_object.name)
-            cont = spawn_object.game.controllers[-1]
-            cont.mode = 'MODULE'
-            cont.module = 'brik_spawn.initialize'
-            
-            sens.link(cont)
-        
-        #Properties and text files to define the mobs that can be spawned.
-        for text in bpy.data.texts:
-            
-            print('CONSIDERING TEXT '+text.name)
-            prefix = armature['brik_prefix']
-            print(text.name[len(prefix):-4])
-            
-            
-            #If there is an armature and text pair.
-            if text.name[len(prefix):-4] == armature.name:
-                #If no mobs have been accounted for yet.
-                if not 'brik_mob_count' in spawn_object.game.properties:
-                    print('CREATING PROPERTY brik_mob_count')
-                    bpy.ops.object.select_all(action='DESELECT')
-                    spawn_object.select = True
-                    scene.objects.active = spawn_object
-                    
-                    bpy.ops.object.game_property_new()
-                    count_prop = spawn_object.game.properties[-1]
-                    count_prop.name = 'brik_mob_count'
-                    count_prop.type = 'INT'
-                    count_prop.value = -1   #Initialised to -1 meaning no data controllers yet created.
-        
-                    bpy.ops.object.select_all(action='DESELECT')
-                    select_name(name=armature.name, extend=False)
-                else:
-                    count_prop = spawn_object.game.properties['brik_mob_count']
-                
-                #Find a list of armature texts currently accounted for in logic.
-                current_texts = []
-                for cont in spawn_object.game.controllers:
-                    if cont.name[:-1] == 'brik_ragdoll_data_':
-                        current_texts.append(cont.text)
-                
-                #Create a new data controller for any text not considered.
-                if not text in current_texts:
-                    count_prop.value += 1
-                    #Controller to store structure information.
-                    print('CREATING DATA CONTROLLER')
-                    bpy.ops.logic.controller_add(type='PYTHON', name='brik_ragdoll_data_'+str(int(count_prop.value)), object=spawn_object.name)
-                    cont = spawn_object.game.controllers[-1]
-                    cont.text = text
-        
-    
-    def set_up_hit_box_logic(self, armature, bone_name):
-        hit_box = bpy.data.objects[armature['brik_bone_hit_box_dict'][bone_name]]
-        scene = bpy.context.scene
-        
-        #Simply create a property for the ray cast to look for.
-        if not 'brik_can_hit' in hit_box.game.properties:
-            hit_box.select = True
-            scene.objects.active = hit_box
-            bpy.ops.object.game_property_new()
-            print(*hit_box.game.properties)
-            prop = hit_box.game.properties[-1]
-            prop.name = 'brik_can_hit'
-            prop.type = 'BOOL'
-            prop.value = True
-            scene.objects.active = armature
-            hit_box.select = False
-            
-        return
-    
-    def load_game_scripts(self):
-        
-        for script_name in self.game_script_list:
-            if not script_name in bpy.data.texts:
-                bpy.data.texts.load(self.template_path+script_name)
-                
-        return
-            
-    
-    def execute(self, context):
-        self.load_game_scripts()
-        
-        armature = context.object
-        
-        self.set_up_armature_logic(armature)
-        #Is ray property required?
-        #bones = bone_group_list(armature)
-        #for bone_name in bones:
-        #    self.set_up_hit_box_logic(armature, bone_name)
-        self.set_up_spawn_logic(armature)
-        
-        
-        
-        return{'FINISHED'}
-
-class brik_write_game_file(bpy.types.Operator):
-    bl_label = 'brik write game file operator'
-    bl_idname = 'object.brik_write_game_file'
-    bl_description = 'Write a file containing a description of the rigid body structure'
-    bl_options = {'REGISTER', 'UNDO'} 
-    
-    #Find the most efficient order to calculate bone rotations in the game engine
-    #Not used
-    def calculate_structure(self, armature):
-        bones = bone_group_list(armature)
-#        boneDict = armature.pose.bones
-        
-        boneChainsDict = {}
-        maxLength = 0       #This is the length of the longest chain of bones
-        
-        #Find the chains of bone parentage in the armature
-        for poseBone in boneDict:
-            bone = poseBone.bone
-            boneChain = []
-            while True:
-                boneChain.append(bone.name)
-                if bone.parent:
-                    bone = bone.parent
-                else:
-                    boneChainsDict[boneChain[0]] = boneChain
-                    if len(boneChain) > maxLength:
-                        maxLength = len(boneChain)
-                    break
-        
-        #Sort the bone chains to find which bone rotations to calculate first
-        optimalBoneOrder = self.find_optimal_bone_order(boneChainsDict, maxLength)
-        
-        return optimalBoneOrder, boneChainsDict
-    
-    #Not used
-    def find_optimal_bone_order(self, boneChainsDict, maxLength):
-        tempBoneChainsOrder = []
-        
-        #Reorder the bone chains so that shorter bone chains are at the start of the list
-        for n in range(1,maxLength+1):
-            for chain in boneChainsDict:
-                if len(boneChainsDict[chain]) == n:
-                    tempBoneChainsOrder.append(boneChainsDict[chain])
-        
-        #Create a final list of bones so that the bones that need to be calculated first are
-        #at the start
-        finalBoneOrder = []
-        for chain in tempBoneChainsOrder:
-            finalBoneOrder.append(chain[0])     
-        return finalBoneOrder
-    
-    """
-    I've found a method of reading from an internal text file in the game
-    engine... Place the text file in a python script controller set to 'script'
-    and it can be accessed as a string through cont.script. To avoid  throwing
-    a script compilation error on startup, all text must be enclosed within
-    triple quotation marks as a block comment.
-    There is no need to mess with different file systems and platforms... It can
-    all be done internally. =D
-    """
-    
-#    def save_structure_data(self, armature, optimalBoneOrder, boneChainsDict):
-    def save_structure_data(self, armature, bones):
-        
-        prefix = armature['brik_prefix']
-        #Create or clear the text file for this armature
-        texts = bpy.data.texts
-        if prefix+armature.name+".txt" not in texts:
-            dataFile = texts.new(prefix+armature.name+".txt")
-        else:
-            dataFile = texts[prefix+armature.name+".txt"]
-            dataFile.clear()
-        
-        #Write to the text file
-        dataFile.write("'''\n")
-        
-        dataFile.write(armature.name+"\n")
-        
-        dataFile.write("'' Bone : Hitbox : Rigid body : Location constraint (optional)\n")
-        #Write bone data to the file
-        rigid_bodies = armature['brik_bone_driver_dict']
-        hitboxes = armature['brik_bone_hit_box_dict']
-        for bone in bones:
-            #How to first bone => also copy locations needs to be activated
-            bone_name = bone.name
-            hitbox_name = hitboxes[bone_name]
-            rigid_body_name = rigid_bodies[bone_name]
-            text_str = " : ".join([bone_name, hitbox_name, rigid_body_name])
-            
-            if bone.parent:
-                if bones.count(bone.parent) == 0:
-                    text_str = text_str + " : " + rigid_bodies[bone_name] + "_loc"
-            else:
-                text_str = text_str + " : " + rigid_bodies[bone_name] + "_loc"
-
-            dataFile.write(text_str +"\n")
-        dataFile.write("'' 6DOF constraints\n")
-        dataFile.write("'' 6DOF parameters are optional, if not defined default values are used\n")
-        id_num = 1
-        for bone in bones:
-            if bone.parent:
-                bone_name = bone.name
-                bone_parent = bone.parent
-                parent_name = bone_parent.name
-                ob = rigid_bodies[bone_name]
-                targ = rigid_bodies[parent_name]
-            
-                #6DOF name
-#                dataFile.write("constraint_name = 6DOF" + str(id_num) + "\n")
-                dataFile.write("constraint_name = 6DOF_" + ob + "_" + targ + "\n")
-                id_num = id_num + 1
-                #ob name
-                dataFile.write("object = " + ob + "\n")
-                #targ name
-                dataFile.write("target = " + targ + "\n")
-                #optional
-                #x,y,z point, default 0.0
-                pivot_y = - bone.length * 0.5
-                dataFile.write("pivot_y = " + str(pivot_y) + "\n")
-                #Rx,Ry,Rz point, default 0.0
-                #min/max x,y,z limit, default 0.0
-                #min/max Rx,Ry,Rz limit, default off & Rx,Ry,Rz spring, default off
-                if bone.use_ik_limit_x == True:
-                    Rx_min = str(bone.ik_min_x)
-                    dataFile.write("Rx_min = " + Rx_min + "\n")
-                    Rx_max = str(bone.ik_max_x)
-                    dataFile.write("Rx_max = " + Rx_max + "\n")
-                    if bone.ik_stiffness_x != 0:
-                        Rx_spring = str(bone.ik_stiffness_x)
-                        dataFile.write("Rx_spring = " + Rx_spring + "\n")
-                if bone.use_ik_limit_y == True:
-                    Ry_min = str(bone.ik_min_y)
-                    dataFile.write("Ry_min = " + Ry_min + "\n")
-                    Ry_max = str(bone.ik_max_y)
-                    dataFile.write("Ry_max = " + Ry_max + "\n")
-                    if bone.ik_stiffness_y != 0:
-                        Ry_spring = str(bone.ik_stiffness_y)
-                        dataFile.write("Ry_spring = " + Ry_spring + "\n")
-                if bone.use_ik_limit_z == True:
-                    Rz_min = str(bone.ik_min_z)
-                    dataFile.write("Rz_min = " + Rz_min + "\n")
-                    Rz_max = str(bone.ik_max_z)
-                    dataFile.write("Rz_max = " + Rz_max + "\n")
-                    if bone.ik_stiffness_z != 0:
-                        Rz_spring = str(bone.ik_stiffness_z)
-                        dataFile.write("Rz_spring = " + Rz_spring + "\n")
-                #x,y,z spring, default off
-                #motors..., default off
-        dataFile.write("'''")
-        
-        return
-    
-    #Not used
-    def store_joint_data(self, armature):
-        """
-        Joint data is stored on the rigid body objects themselves. This will not be
-        necessary when the convertor is properly transferring these values from Blender
-        to the game engine.
-        """
-        for bone_name in armature['brik_optimal_order']:
-            box = bpy.data.objects[armature['brik_bone_driver_dict'][bone_name]]
-            if not box['brik_joint_target'] == 'None':
-                RB_joint = box.constraints[0]
-                bone = armature.pose.bones[box['brik_bone_name']]
-                
-                ###############################
-                #Required for dynamic creation of joint in game
-                box['joint_position_x'] = RB_joint.pivot_x
-                box['joint_position_y'] = RB_joint.pivot_y
-                box['joint_position_z'] = RB_joint.pivot_z
-            
-            
-                """
-                It would be nice to use IK limits to define rigid body joint limits,
-                but the limit arrays have not yet been wrapped in RNA apparently...
-                properties_object_constraint.py in ui directory, line 554 says:
-                Missing: Limit arrays (not wrapped in RNA yet)
-                
-                It is necessary to create the joint when spawning ragdolls anyway.
-                Joints can still be created in the game.
-                """
-            
-                box['rot_max_x'] = bone.ik_max_x
-                box['rot_max_y'] = bone.ik_max_y
-                box['rot_max_z'] = bone.ik_max_z
-                box['rot_min_x'] = bone.ik_min_x
-                box['rot_min_y'] = bone.ik_min_y
-                box['rot_min_z'] = bone.ik_min_z
-    
-    def execute(self, context):
-        armature = context.object
-        
-        bones = bone_group_list(armature)
-#        optimalBoneOrder, boneChainsDict = self.calculate_structure(armature)
-        
-#        armature['brik_optimal_order'] = optimalBoneOrder
-        
-#        self.store_joint_data(armature)
-        
-        self.save_structure_data( armature, bones)
-        
-        armature['brik_file_written'] = True
-        
-        
-        return{'FINISHED'}
-
-class brik_create_hit_boxes(bpy.types.Operator):
-    bl_label = 'brik create hit boxes operator'
-    bl_idname = 'object.brik_create_hit_boxes'
-    bl_description = 'Create hit boxes for each bone in an armature and parent them to the bones.'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    hit_box_prefix = StringProperty(name='Hit box prefix',\
-                            description='Prefix to be appended to the bone name that defines the hit box',\
-                            default='HIT')
-   
-    hit_box_length = FloatProperty(name='Hit box length',\
-                              description='Length of a hit box as a proportion of bone length.',\
-                              min=0.05,\
-                              max=1.0,\
-                              step=0.05,\
-                              default=0.8)
-    
-    hit_box_width = FloatProperty(name = 'Hit box width',\
-                                  description='Width of a hit box as a proportion of bone length.',\
-                                  min=0.05,\
-                                  max=1.0,\
-                                  step=0.05,\
-                                  default=0.2)
-    
-    add_to_group = BoolProperty(name='Add to group',\
-                                description='Add hit boxes to a group',\
-                                default=True)
-                                
-    invisible = BoolProperty(name='Invisible',\
-                                description='Make boxes invisible for rendering',\
-                                default=True)
-                                
-    box_type = EnumProperty(name="Box type",
-        description="Shape that hitbox objects are created from.",
-        items=[ \
-          ('BONE', "Bone",
-              "Plain bone dimensions are used."),
-          ('ENVELOPE', "Envelope",
-              "Bone envelope dimensions are used."),
-          ('BBONE', "BBone",
-              "BBone dimensions are used. "\
-              "(BBones can be scaled using Ctrl+Alt+S in armature edit mode.)"),
-          ],
-        default='BBONE')
-    
-    #Create the hit boxes
-    def create_hit_boxes(self, armature):
-        bones = bone_group_list(armature)
-        hit_box_dict = {}
-        scn = bpy.context.scene
-        
-        armature['brik_bone_hit_box_dict'] = {}
-#        armature['brik_bone_driver_dict'] = {}
-#        armature['brik_armature_locator_name'] = ''
-        
-        #All deforming bones within selected group(s) have boxes created for them
-        for bone in bones:
-
-            box = None
-            #Create boxes that do not exist
-            if self.box_type == 'BONE':
-                hit_box, volume = create_box(self.hit_box_prefix, self.hit_box_length, self.hit_box_width, armature, bone)
-            elif self.box_type == 'BBONE':
-                hit_box, volume = create_box_bbone(self.hit_box_prefix, armature, bone)
-            elif self.box_type == 'ENVELOPE':
-                hit_box, volume = create_box_envelope(self.hit_box_prefix, armature, bone)
-            
-            hit_box_dict[hit_box.name] = hit_box
- #            RB_dict[box.name] = box
-            armature['brik_bone_hit_box_dict'][bone.name] = hit_box.name
-#            armature['brik_bone_driver_dict'][bone.name] = box.name
-        
-            #Orientate and position the hitbox
-            self.parent_to_bone(armature, hit_box, bone.name)
-#            position_box(armature, bone, hit_box)
-#=> do not set location rotation, they are relative to the parent bone thus need to be zero delta
-
-            hit_box['brik_bone_name'] = bone.name
-            
-            hit_box.game.physics_type = 'STATIC'
-            hit_box.game.use_ghost = True
-            hit_box.hide_render = self.invisible
-
-            hit_box.game.mass = volume
-        return hit_box_dict
-        
-    #Reshape an existing box based on parameter changes.
-    #I introduced this as an attempt to improve responsiveness. This should
-    #eliminate the overhead from creating completely new meshes or objects on
-    #each refresh.
-    #NOT USED
-    def reshape_hit_box(self, armature, bone):
-        #print('RESHAPING BOX')
-        armature_object = bpy.context.object
-        scene = bpy.context.scene
-        hit_box = scene.objects[armature['brik_bone_hit_box_dict'][bone.name]]
-        
-        height = bone.length
-        box_length = bone.length*self.hit_box_length
-        width = bone.length * self.hit_box_width
-        
-        x = width/2
-        y = box_length/2
-        z = width/2
-        
-        verts = [[-x,y,-z],[-x,y,z],[x,y,z],[x,y,-z],\
-                 [x,-y,-z],[-x,-y,-z],[-x,-y,z],[x,-y,z]]
-        
-        #This could be a problem if custom object shapes are used...
-        count = 0
-        for vert in hit_box.data.vertices:
-            vert.co = Vector(verts[count])
-            count += 1
-        
-        return(hit_box)
-
-    def add_hit_boxes_to_group(self, armature):
-        #print("Adding hit boxes to group")
-        group_name = self.hit_box_prefix+armature.name+"_Group"
-        if not group_name in bpy.data.groups:
-            group = bpy.data.groups.new(group_name)
-        else:
-            group = bpy.data.groups[group_name]
-
-        bone_hitbox = armature['brik_bone_hit_box_dict']
-        #Add armature to group
-#        bone_hitbox["brik_armature_group"] = armature.name
-        for bone_name in bone_hitbox:
-            hit_box_name = bone_hitbox[bone_name]
-            if not hit_box_name in group.objects:
-                group.objects.link(bpy.data.objects[hit_box_name])
-        #Add armature to group
-        if not armature.name in group.objects:
-            group.objects.link( armature )
-
-        armature["hitbox_group"] = group.name
-        
-        return
-        
-    def parent_to_bone(self, armature, hit_box, bone_name):
-        #Thanks Uncle Entity. :)
-        hit_box.parent = armature
-        hit_box.parent_bone = bone_name
-        hit_box.parent_type = 'BONE'
-        
-        return
-    
-    #The ui of the create operator that appears when the operator is called
-    def draw(self, context):
-        layout = self.layout
-
-        box = layout.box()
-        box.prop(self.properties, 'hit_box_prefix')
-        box.prop(self.properties, 'add_to_group')
-        box.prop(self.properties, 'invisible')
-        box.prop(self.properties, 'box_type')
-        if self.box_type == 'BONE':
-            box.prop(self.properties, 'hit_box_length')
-            box.prop(self.properties, 'hit_box_width')
-    
-    #The main part of the create operator
-    def execute(self, context):
-        #print("\n##########\n")
-        #print("EXECUTING brik_create_structure\n")
-        
-        armature = context.object
-        
-        hit_box_dict = self.create_hit_boxes(armature)
-        
-        if self.add_to_group:
-            self.add_hit_boxes_to_group(armature)
-        
-        armature['brik_hit_box_prefix'] = self.hit_box_prefix
-        armature['brik_hit_boxes_created'] = True
-        
-        return{'FINISHED'}
-
-class brik_remove_hit_boxes(bpy.types.Operator):
-    bl_label = 'brik remove hit boxes operator'
-    bl_idname = 'object.brik_remove_hit_boxes'
-    bl_description = 'Remove hit boxes crested by this addon'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    """
-    For some reason the remove operators give a "cyclic" warning in the console.
-    
-    I have no idea what this means and have not been able to find out what this means.
-    """
-    
-    def remove_hit_box(self, scene, bone_name, armature):
-        #Function crashes with linked objects
-        hit_box = scene.objects[armature['brik_bone_hit_box_dict'][bone_name]]
-        #Unlink and remove the mesh
-#        mesh = hit_box.data
-#        hit_box.data = None
-#        mesh.user_clear()
-#        bpy.data.meshes.remove(mesh)
-        #Unlink and remove the object
-#        scene.objects.unlink(hit_box)
-#        hit_box.user_clear()
-#        bpy.data.objects.remove(hit_box)
-    
-    def draw(self, context):
-        pass
-    
-    def execute(self, context):
-        armature = context.object
-        scene = context.scene
- 
-        bpy.ops.object.select_all(action='DESELECT')        
-        for bone_name in armature['brik_bone_hit_box_dict']:
-            #hit_box = scene.objects[armature['brik_bone_hit_box_dict'][bone_name]]
-            select_name( name = armature['brik_bone_hit_box_dict'][bone_name], extend = True)
-#            self.remove_hit_box(scene, bone_name, armature)
-        bpy.ops.object.delete(use_global=False)
-        bpy.ops.object.select_all(action='DESELECT')        
-        scene.objects.active = armature
-        
-        group_name = armature['brik_hit_box_prefix']+armature.name+"_Group"
-        if group_name in bpy.data.groups:
-            group = bpy.data.groups[group_name]
-            bpy.data.groups.remove(group)
-        
-        del armature['brik_bone_hit_box_dict']
-        del armature['brik_hit_boxes_created']
-        del armature['brik_hit_box_prefix']
-        return{'FINISHED'}
-    
-  
-def calc_ragdoll_mass(self, context):
-    armature = context.object
-    set_mass = context.scene.brik_ragdoll_mass
-    brik_structure_created = armature.get('brik_structure_created', False)
-    if brik_structure_created:
-        RB_dict = armature['brik_bone_driver_dict']
-        objects = bpy.data.objects
-        tot_mass = 0
-        for bone in RB_dict:
-            box_name = RB_dict[bone]
-            ob = objects[box_name]
-            tot_mass = tot_mass + ob.game.mass
-        mass_scale = set_mass / tot_mass
-        for bone in RB_dict:
-            box_name = RB_dict[bone]
-            ob = objects[box_name]
-            ob.game.mass = ob.game.mass * mass_scale
-    return None
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik_funcs.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik_funcs.py
deleted file mode 100644
index 633250c..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/brik_funcs.py
+++ /dev/null
@@ -1,173 +0,0 @@
-#brik_funcs.py
-
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# Script copyright (C) Marcus Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-"""
-This will be a collection of useful functions that can be reused across the different operators.
-
-"""
-
-import bpy
-
-#Create a box based on envelope size (easier matching of box to model proportions)
-def create_box_bbone(prefix, armature, poseBone):
-    #Thanks to Wraaah for this function
-    
-    ########################
-    #INSERT SHAPE CODE HERE#
-    
-    #Strange looking code as I am referencing the editbone data from the posebone.
-    h = poseBone.bone.bbone_x
-    w = poseBone.bone.bbone_z
-    l = poseBone.bone.length/2.0
-    #The bone points along it's y axis so head is -y and tail is +y
-    verts = [[h,-l, w],[h,-l,-w],[-h,-l,-w],[-h,-l,w],\
-            [h,l,w],[h,l,-w],[-h,l,-w],[-h,l,w]]
-    edges = [[0,1],[1,2],[2,3],[3,0],\
-            [4,5],[5,6],[6,7],[7,4],\
-            [0,4],[1,5],[2,6],[3,7]]
-    faces = [[3,2,1,0],[4,5,6,7],[0,4,7,3],[1,5,4,0],[2,6,5,1],[3,7,6,2]]
-    
-    ########################
-    
-    #Create the mesh
-    mesh = bpy.data.meshes.new(prefix + poseBone.name)
-    mesh.from_pydata(verts, edges, faces)
-    
-    #Create an object for the mesh and link it to the scene
-    box = bpy.data.objects.new(prefix + poseBone.name, mesh)
-    bpy.context.scene.objects.link(box)
-    
-    #Move the hit box so that when parented the object centre is at the bone centre
-    box.location.y = -poseBone.length/2
-    volume = h * l * w * 8.0 
-    return(box, volume)
-    
-#Create a box based on envelope size (easier matching of box to model proportions)
-def create_box_envelope(prefix, armature, poseBone):
-    ########################
-    #INSERT SHAPE CODE HERE#
-    
-    #Strange looking code as I am referencing the editbone data from the posebone.
-    l = poseBone.bone.length/2
-    h = poseBone.bone.head_radius
-    t = poseBone.bone.tail_radius
-    #The bone points along it's y axis so head is -y and tail is +y
-    verts = [[h,-l, h],[h,-l,-h],[-h,-l,-h],[-h,-l,h],\
-            [t,l,t],[t,l,-t],[-t,l,-t],[-t,l,t]]
-    edges = [[0,1],[1,2],[2,3],[3,0],\
-            [4,5],[5,6],[6,7],[7,4],\
-            [0,4],[1,5],[2,6],[3,7]]
-    faces = [[3,2,1,0],[4,5,6,7],[0,4,7,3],[1,5,4,0],[2,6,5,1],[3,7,6,2]]
-    
-    ########################
-    
-    #Create the mesh
-    mesh = bpy.data.meshes.new(prefix + poseBone.name)
-    mesh.from_pydata(verts, edges, faces)
-    
-    #Create an object for the mesh and link it to the scene
-    box = bpy.data.objects.new(prefix + poseBone.name, mesh)
-    bpy.context.scene.objects.link(box)
-    
-    #Move the hit box so that when parented the object centre is at the bone centre
-    box.location.y = -poseBone.length/2
-    volume = (((2*h)**2 + (2*t)**2)/2) * (2*l)
-    return(box, volume)
-    
-#Create a box based on bone size (manual resizing of bones)
-def create_box(prefix, length, width, armature, bone):
-    scene = bpy.context.scene
-    
-    height = bone.length
-    #gap = height * self.hit_box_length      #The distance between two boxes
-    box_length = bone.length * length
-    box_width = bone.length * width
-    
-    x = box_width/2
-    y = box_length/2
-    z = box_width/2
-    
-    verts = [[x,-y,z],[x,-y,-z],[-x,-y,-z],[-x,-y,z],\
-             [x,y,z],[x,y,-z],[-x,y,-z],[-x,y,z]]
-    edges = [[0,1],[1,2],[2,3],[3,0],\
-            [4,5],[5,6],[6,7],[7,4],\
-            [0,4],[1,5],[2,6],[3,7]]
-    faces = [[3,2,1,0],[4,5,6,7],[0,4,7,3],[1,5,4,0],[2,6,5,1],[3,7,6,2]]
-    
-    #Create the mesh
-    mesh = bpy.data.meshes.new(prefix + bone.name)
-    mesh.from_pydata(verts, edges, faces)
-    
-    #Create an object for the mesh and link it to the scene
-    obj = bpy.data.objects.new(prefix + bone.name, mesh)
-    scene.objects.link(obj)
-    
-    volume = x*y*z
-    
-    return(obj, volume)
-
-#Function to select only the correct bones from an armature
-#so only deform bones in the selected bone group(s)
-def bone_group_list(armature):
-    bones = armature.pose.bones
-    scn = bpy.context.scene
-    bone_groups = scn.brik_bone_groups
-    
-    #Check if bone is part of the selected bone group(s)
-    bone_list = []
-    for bone in bones:
-        use_bone = True
-        #Check bone group membership
-        if bone_groups != "All":
-            if bone.bone_group:
-                if bone.bone_group.name != bone_groups:
-                    use_bone = False
-            else:
-                use_bone = False
-        #Check deform bone
-        if bone.bone.use_deform == False:
-            use_bone = False
-            
-        if use_bone == True:
-            bone_list = bone_list + [bone]
-        
-    #Return list of bones to be used
-    return bone_list
-
-#Orient the box to the bone and set the box object centre to the bone location
-def position_box( armature, bone, box):
-    #scene = bpy.context.scene
-    
-    #Set the box to the bone orientation and location
-    box.matrix_world = bone.matrix
-    box.location = armature.location + ( bone.bone.head_local + bone.bone.tail_local ) / 2
-
-
-        
-def select_name( name = "", extend = True ):
-    if extend == False:
-        bpy.ops.object.select_all(action='DESELECT')
-    ob = bpy.data.objects.get(name)
-    ob.select = True
-    bpy.context.scene.objects.active = ob
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_init_ragdoll.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_init_ragdoll.py
deleted file mode 100644
index e08c8de..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_init_ragdoll.py
+++ /dev/null
@@ -1,237 +0,0 @@
-#brik_init_ragdoll.py
-
-# ***** BEGIN MIT LICENSE BLOCK *****
-#
-#Script Copyright (c) 2010 Marcus P. Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-#Permission is hereby granted, free of charge, to any person obtaining a copy
-#of this software and associated documentation files (the "Software"), to deal
-#in the Software without restriction, including without limitation the rights
-#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-#copies of the Software, and to permit persons to whom the Software is
-#furnished to do so, subject to the following conditions:
-#
-#The above copyright notice and this permission notice shall be included in
-#all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#THE SOFTWARE.
-#
-# ***** END MIT LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-"""
-This script spawns rigid body objects when ragdoll physics is activated.
-
-It spawns the rigid body objects, turns off the mob collision object's dynamics
-and makes the mob collision object 'Ghost'.
-
-    Objects cannot have 'Ghost' toggled from within the game. :(
-        
-    Mobs can probably be static, ghost anyway. If a mob needs to be dynamic
-    then it can be parented to a physics mesh and then the physics mesh can be
-    removed from the scene by this script to avoid collision conflicts with
-    the rigid bodies.
-
-It then sets the orientation and position to that of the hit boxes and links
-the rigid body objects together with rigid body joints.
-
-Rest orientations can be taken from the rigid body objects that remain on the
-hidden layer. I thought this would be a problem to set. It's so nice when
-something turns out easier than expected for a change. :)
-"""
-debug = False
-
-import bge
-
-scene = bge.logic.getCurrentScene()
-
-objects = scene.objects
-hidden_objects = scene.objectsInactive
-
-"""
-NOTE:
-    If a collision box is used then this will be the main added object
-    that is added and so will have the spawn_point and spawn_id
-    properties.
-    The collision box would need to be removed here.
-    In this case, the spawn_id and spawn_point would need to be copied
-    to the armature in order to properly identify which object is to be
-    ultimately removed from the scene.
-"""
-
-def main():
-
-    """
-    Sensor disabled. Using brik_use_ragdoll 'changed' sensor
-    """
-    #sens = spawn_boxes_cont.sensors['brik_spawn_boxes_sens']
-    #if sens.getKeyStatus(sens.key) == 1:
-    
-    init_ragdoll_controller = bge.logic.getCurrentController()
-    spawn_boxes_act = init_ragdoll_controller.actuators['brik_spawn_boxes_act']
-    
-    armature = init_ragdoll_controller.owner
-    
-    
-    #########################
-#    hidden_armature = hidden_objects[armature.name]
-    #########################
-    
-    
-#    spawn_point = armature['spawn_point']
-#    spawn_id = armature['spawn_id']
-    
-    if armature['brik_use_ragdoll'] and armature['brik_init_ragdoll']:
-
-        print('#########################')
-        print('SPAWNING RIGID BODY OBJECTS')
-        spawn_boxes_act.instantAddObject()
-        scene = bge.logic.getCurrentScene()
-        objects = scene.objects
-        objects.reverse()
-        
-        #Expand existing group
-        group_objects = armature["group"]
-        
-        group = spawn_boxes_act.object
-        for ob in objects:
-            group_objects[ob.name] = ob
-            ob["pivot"] = armature
-            if ob.name == group.name:
-                #Stop for loop once group start point is found
-                break
-                
-#        armature_name = spawn_empty["armature_name"]
-#        armature = group_objects[ armature_name ]
-        armature["group"] = group_objects
-
-        #Set up constraints
-        constraints = armature["constraints"]
-        for constraint in constraints:
-            settings = constraints[constraint]
-            constraint_name = settings.get("constraint_name", None)
-            print("Create 6DOF constraint")
-            print(constraint_name)
-            object = group_objects[ settings.get("object", None) ]
-            object_id = object.getPhysicsId()
-            target = group_objects[ settings.get("target", None) ]
-            target_id = target.getPhysicsId()
-            print(object)
-            print(target)
-            
-            piv_x = float( settings.get("pivot_x", 0.0) )           
-            piv_y = float( settings.get("pivot_y", 0.0) )            
-            piv_z = float( settings.get("pivot_z", 0.0) )           
-
-            piv_Rx = float( settings.get("pivot_Rx", 0.0) )           
-            piv_Ry = float( settings.get("pivot_Ry", 0.0) )           
-            piv_Rz = float( settings.get("pivot_Rz", 0.0) )           
-                
-            constraint_type = 12 #6DoF joint
-            flag = 128 #No collision with joined object.
-            joint = bge.constraints.createConstraint(object_id, target_id, constraint_type, piv_x, piv_y, piv_z, piv_Rx, piv_Ry, piv_Rz, flag)
-            joint.setParam(0, float( settings.get("x_min", 0.0) ), float( settings.get("x_max", 0.0) ) )
-            joint.setParam(1, float( settings.get("y_min", 0.0) ), float( settings.get("y_max", 0.0) ) )
-            joint.setParam(2, float( settings.get("z_min", 0.0) ), float( settings.get("z_max", 0.0) ) )
-            #Parameters 3 = limit x rotation, 4 = limit y rotation, 5 = limit z rotation
-            if settings.get("Rx_min", None):
-                joint.setParam(3, float( settings.get("Rx_min", 0.0) ), float( settings.get("Rx_max", 0.0) ) )
-            if settings.get("Ry_min", None):
-                joint.setParam(4, float( settings.get("Ry_min", 0.0) ), float( settings.get("Ry_max", 0.0) ) )
-            if settings.get("Rz_min", None):
-                joint.setParam(5, float( settings.get("Rz_min", 0.0) ), float( settings.get("Rz_max", 0.0) ) )
-                
-            #Translational motor
-            #setParam(type, vel, maxForce)
-            if settings.get("x_mot", None):
-                joint.setParam(6, float( settings.get("x_mot", 0.0) ), float( settings.get("x_mot_max", 999.0) ) )
-            if settings.get("y_mot", None):
-                joint.setParam(7, float( settings.get("y_mot", 0.0) ), float( settings.get("y_mot_max", 999.0) ) )
-            if settings.get("z_mot", None):
-                joint.setParam(8, float( settings.get("z_mot", 0.0) ), float( settings.get("z_mot_max", 999.0) ) )
-            #Rotational motor
-            #setParam(type, angVel, maxForce)
-            if settings.get("Rx_mot", None):
-                joint.setParam(9, float( settings.get("Rx_mot", 0.0) ), float( settings.get("Rx_mot_max", 999.0) ) )
-            if settings.get("Ry_mot", None):
-                joint.setParam(10, float( settings.get("Ry_mot", 0.0) ), float( settings.get("Ry_mot_max", 999.0) ) )
-            if settings.get("Rz_mot", None):
-                joint.setParam(11, float( settings.get("Rz_mot", 0.0) ), float( settings.get("Rz_mot_max", 999.0) ) )
-
-            #Translational spring
-            #setParam(type, stiffness, reset)
-            if settings.get("x_spring", None):
-                joint.setParam(12, float( settings.get("x_spring", 0.0) ), float( settings.get("x_spring_reset", 0) ) )
-            if settings.get("y_spring", None):
-                joint.setParam(13, float( settings.get("y_spring", 0.0) ), float( settings.get("y_spring_reset", 0) ) )
-            if settings.get("z_spring", None):
-                joint.setParam(14, float( settings.get("z_spring", 0.0) ), float( settings.get("z_spring_reset", 0) ) )
-            #Rotational spring
-            #setParam(type, stiffness, reset)
-            if settings.get("Rx_spring", None):
-                joint.setParam(15, float( settings.get("Rx_spring", 0.0) ), float( settings.get("Rx_spring_reset", 0) ) )
-            if settings.get("Ry_spring", None):
-                joint.setParam(16, float( settings.get("Ry_spring", 0.0) ), float( settings.get("Ry_spring_reset", 0) ) )
-            if settings.get("Rz_spring", None):
-                joint.setParam(17, float( settings.get("Rz_spring", 0.0) ), float( settings.get("Rz_spring_reset", 0) ) )
-            
-            #Store joint in object, can be used to change the parameter settings
-            #For example when a joint is broken you can widen the angle rotations
-            #Also possible to sever the joint completely but CLEAR THE VARIABLE FIRST
-            #BEFORE REMOVING THE JOINT else BGE CRASHES
-            object[constraint_name] = joint
-
-        #Copy hitbox positions + remove hitboxes, activate armature constraints
-        bone_hitbox = armature["bone_hitbox"] 
-        bone_rigidbody = armature["bone_rigidbody"]
-        bone_loc = armature["bone_loc"]
-        
-        for bone_name in bone_hitbox:
-            hitbox = group_objects[ bone_hitbox[ bone_name ] ]
-            rigidbody = group_objects[ bone_rigidbody[ bone_name ] ]
-            
-            rigidbody.worldPosition = hitbox.worldPosition
-            rigidbody.worldOrientation = hitbox.worldOrientation
-            
-            #Set up the copy rotation bone constraint for this driver
-            print('######################')
-            print('SETTING UP ROT BONE CONSTRAINTS FOR '+rigidbody.name)
-            print('BONE NAME ' + bone_name)
-            constraint_rot = armature.constraints[bone_name+":brik_copy_rot"]
-            constraint_rot.target = rigidbody
-            constraint_rot.enforce = 1.0
-            
-            copy_loc_target = bone_loc.get(bone_name, None)
-            if copy_loc_target:
-                #Set up the copy location constraint 
-                constraint_loc = armature.constraints[bone_name+':brik_copy_loc']
-                constraint_loc.target = group_objects[ copy_loc_target ]
-                constraint_loc.enforce = 1.0
-            
-            rigidbody.worldLinearVelocity = hitbox.worldLinearVelocity
-            rigidbody.worldAngularVelocity = hitbox.worldAngularVelocity
-            
-            hitbox.endObject()
-            
-        #for act in armature.actuators:
-            #There appears to be no direct way of checking that an actuator is an action actuator.
-            #act.type would be nice.
-        #    if hasattr(act, 'action'):
-        #        if not act.name == 'brik_use_act':
-        #            init_ragdoll_controller.deactivate(act)
-        #==> Why needed?
-        
-        #Needed to prevent brik_use_changed_sens second pulse from re-triggering the script.
-        armature['brik_init_ragdoll'] = False
-            
-        #if debug == True:
-    
-if __name__ == '__main__':
-    main()
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_load.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_load.py
deleted file mode 100644
index b1ccb38..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_load.py
+++ /dev/null
@@ -1,141 +0,0 @@
-#brik_load_0_1.py
-
-# ***** BEGIN MIT LICENSE BLOCK *****
-#
-#Script Copyright (c) 2010 Marcus P. Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-#Permission is hereby granted, free of charge, to any person obtaining a copy
-#of this software and associated documentation files (the "Software"), to deal
-#in the Software without restriction, including without limitation the rights
-#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-#copies of the Software, and to permit persons to whom the Software is
-#furnished to do so, subject to the following conditions:
-#
-#The above copyright notice and this permission notice shall be included in
-#all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#THE SOFTWARE.
-#
-# ***** END MIT LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-"""
-This script loads the necessary data from a text file and stores it in the
-appropriate locations.
-
-It should run once at the very start of the game/level to avoid issues with
-frame rate later on.
-
-This is a load better than my first attempt at parsing a text file, but could
-probably still be optimised more.
-
-FOR MULTIPLE RAGDOLLS IN THE SAME SCENE:
-
-The correct armature data fileS need to be loaded at the start of the game.
-To do this, the name of the text file in the brik_ragdoll_data controller needs
-to be changed so it corresponds with the correct armature.
-
-This needs to be done when brik creates the logic.
-A separate spawn point should be created for each new ragdoll structure that is
-added to the scene. Each spawn point would load the data for it's corresponding
-ragdoll.
-    Alternatively, the brik_load.py script should iterate through all ragdoll
-    structures and load them in turn.
-    
-    The spawn point would need a new property that is a list of all ragdoll armatures
-    in the scene.
-    
-    For each ragdoll:
-        Set the data controller to use the correct data file.
-        Load the data.
-    
-    This would allow for a single spawn point to load all structure data.
-"""
-print('###########################')
-print('RUNNING brik_load_0_1.py')
-
-import bge
-import mathutils
-from mathutils import Vector, Quaternion
-    
-scene = bge.logic.getCurrentScene()
-cont = bge.logic.getCurrentController()
-
-objects = scene.objectsInactive
-
-spawn_point = cont.owner
-
-def load_data(data_cont):
-
-    data_file = data_cont.script
-    #remove whitespaces
-    data_file = data_file.replace(" ", "")
-    lines = data_file.splitlines(False)
-    
-    bone_hitbox = {}
-    bone_rigidbody = {}
-    bone_loc = {}
-    constraint_settings = {}
-    constraint_settings["constraint_name"] = ""
-    constraints = {}
-    
-    for line in lines:
-        
-        if (len(line) == 0) or (line.count("''") != 0):
-            #ignore short lines or lines (starting) with ''
-            pass
-        elif line.count(":") != 0:
-            #bone, hitbox, rigidbody link
-            items = line.split(":")
-            bone_name = items[0]
-            bone_hitbox[bone_name] = items[1]
-            bone_rigidbody[bone_name] = items[2]
-            if len(items) == 4:
-                bone_loc[bone_name] = items[3]
-            
-        elif line.count("=") == 1:
-            #Constraint settings
-            par, value = line.split("=")
-            if par == "constraint_name":
-                prev_name = constraint_settings["constraint_name"]
-                if prev_name != "":
-                    #save previous constraint
-                    constraints[prev_name] = constraint_settings
-                    
-                    constraint_settings = {}
-            constraint_settings[par] = value
-            
-        else:
-            #main settings
-            armature_name = line
-    #save last constraint
-    constraints[constraint_settings["constraint_name"]] = constraint_settings
-
-    return bone_hitbox, bone_rigidbody, bone_loc, constraints, armature_name
-#    spawn_point['mob_object'] = armature.name
-    
-def main():
-#    mob_total = spawn_point['brik_mob_count']
-            
-#    for count in range(0, mob_total+1):
-    
-    for cont in spawn_point.controllers:
-#       #if cont.name[:-8] == 'brik_ragdoll_data_'+str(count):
-        if cont.name[:] == 'brik_ragdoll_data_0':#removed -8,Wraaah
-            data_cont = cont
-                
-            bone_hitbox, bone_rigidbody, bone_loc, constraints, armature_name = load_data(data_cont)
-            armature = objects[armature_name]
-            armature["bone_hitbox"] = bone_hitbox
-            armature["bone_rigidbody"] = bone_rigidbody
-            armature["bone_loc"] = bone_loc
-            armature["constraints"] = constraints
-        
-if __name__ == '__main__':
-    main()
diff --git a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_spawn.py b/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_spawn.py
deleted file mode 100644
index 6789fef..0000000
--- a/release/scripts/addons_contrib/game_engine_ragdolls_kit/templates/brik_spawn.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#brik_spawn_init.py
-
-# ***** BEGIN MIT LICENSE BLOCK *****
-#
-#Script Copyright (c) 2010 Marcus P. Jenkins (Blenderartists user name FunkyWyrm)
-# Modified by Kees Brouwer (Blenderartists user name Wraaah)
-#
-#Permission is hereby granted, free of charge, to any person obtaining a copy
-#of this software and associated documentation files (the "Software"), to deal
-#in the Software without restriction, including without limitation the rights
-#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-#copies of the Software, and to permit persons to whom the Software is
-#furnished to do so, subject to the following conditions:
-#
-#The above copyright notice and this permission notice shall be included in
-#all copies or substantial portions of the Software.
-#
-#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-#THE SOFTWARE.
-#
-# ***** END MIT LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-import bge
-
-def initialize():
-    spawn_point = bge.logic.getCurrentController().owner
-    
-    #This is a list of all objects added by this spawn point.
-    spawn_point['added_objects'] = []
-    
-    #This is the total number of objects added by this spawn point.
-    #It is used to supply a unique Id to each added object.
-    spawn_point['add_count'] = 0
-    
-def main():
-
-    cont = bge.logic.getCurrentController()
-    #Best replace sensor with message?
-    sens = cont.sensors['brik_Tab_sens']
-    
-    if sens.getKeyStatus(sens.key) == 1:
-        print('#########################')
-        print('SPAWNING MOB AND HIT BOXES')
-        
-        spawn_act = cont.actuators['brik_spawn_act']
-        
-        #scene = bge.logic.getCurrentScene()
-        #objects = scene.objects
-        #hidden_objects = scene.objectsInactive
-        
-        spawn_empty = cont.owner
-        
-        #mob_object = hidden_objects[spawn_empty['mob_object']]
-        #mob_object = hidden_objects['Armature.001']
-        
-        #spawn_act.object = mob_object.name
-        spawn_act.instantAddObject()
-        scene = bge.logic.getCurrentScene()
-        objects = scene.objects
-        objects.reverse()
-
-        group_objects = {}
-        group = spawn_act.object
-        for ob in objects:
-            group_objects[ob.name] = ob
-#            ob["pivot"] = "test_pivot"
-            if ob.name == group.name:
-                #Stop for loop once group start point is found
-                break
-                
-        armature_name = spawn_empty["armature_name"]
-        armature = group_objects[ armature_name ]
-        armature["group"] = group_objects
-        
-        for ob_name in group_objects:
-            ob = group_objects[ob_name]
-            ob["pivot"] = armature
-            
-#        last_spawned = spawn_act.objectLastCreated
-        #print(dir(last_spawned))
-#        spawn_empty['added_objects'].append(last_spawned)
-#        spawn_empty['add_count'] += 1
-        
-        #This is used to identify which spawn point the spawned object was added by.
-#        last_spawned['spawn_point'] = spawn_empty.name
-        #This is a unique Id used to identify the added object.
-#        last_spawned['spawn_id'] = spawn_empty['add_count']
-        #This is the dictionary of drivers that are unique to the added object.
-        """
-        Originally this dictionary was defined in the brik_load.py script, but since
-        dictionaries are stored as a reference, and the added objects are copies of the
-        hidden object, the added objects had a copy of the reference to the dictionary
-        and all used the same dictionary.
-        Defining the dictionary after the objects are added to the scene ensures that
-        they each have a unique dictionary.
-        """
-#        last_spawned['driver_dict'] = {}
diff --git a/release/scripts/addons_contrib/geodesic_domes/__init__.py b/release/scripts/addons_contrib/geodesic_domes/__init__.py
deleted file mode 100644
index 086358a..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/__init__.py
+++ /dev/null
@@ -1,56 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Geodesic Domes",
-    "author": "PKHG , Meta Androcto, Kilon original for 2.49 from Andy Houston",
-    "version": (0,2,3),
-    "blender": (2, 6, 1),
-    "location": "View3D > UI > Geodesic...",
-    "description": "Choice for objects",
-    "warning": "not yet finished",
-    "wiki_url": "http://wiki.blender.org/index.php?title=Extensions:2.6/Py/Scripts/Modeling/Geodesic_Domes",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=29609",
-    "category": "Object"}
-
-"""
-Added save and load of parameters 14-12-2011 PKHG
-Added one possible *.bak for GD_0.GD (one time) 17-12-2011
-"""
-if "bpy" in locals():
-    import imp
-    imp.reload(third_domes_panel)
-    
-else:
-    from geodesic_domes import third_domes_panel
-   
-import bpy
-from bpy.props import *
-
-def register():
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
-
-
-
diff --git a/release/scripts/addons_contrib/geodesic_domes/add_shape_geodesic.py b/release/scripts/addons_contrib/geodesic_domes/add_shape_geodesic.py
deleted file mode 100644
index 1fe3183..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/add_shape_geodesic.py
+++ /dev/null
@@ -1,100 +0,0 @@
-import bpy
-import mathutils
-
-def reset_transform(ob):
-    m = mathutils.Matrix()
-    ob.matrix_local = m     
-
-def func_add_corrective_pose_shape_fast(source, target):
-    result = ""
-    reset_transform(target)
-    # If target object doesn't have Basis shape key, create it.
-    try:
-        num_keys = len( target.data.shape_keys.key_blocks )
-    except:
-        basis = target.shape_key_add()
-        basis.name = "Basis"
-        target.data.update()
-    key_index = target.active_shape_key_index
-    if key_index == 0:
-        # Insert new shape key
-        new_shapekey = target.shape_key_add()
-        new_shapekey.name = "Shape_" + source.name
-        new_shapekey_name = new_shapekey.name
-        key_index = len(target.data.shape_keys.key_blocks)-1
-        target.active_shape_key_index = key_index
-    # else, the active shape will be used (updated)
-    target.show_only_shape_key = True
-    shape_key_verts = target.data.shape_keys.key_blocks[ key_index ].data
-    try:
-        vgroup = target.active_shape_key.vertex_group
-        target.active_shape_key.vertex_group = ''
-    except:
-        print("blub")
-        result = "***ERROR*** blub"
-        pass
-    # copy the local vertex positions to the new shape
-    verts = source.data.vertices
-    try:
-        for n in range( len(verts)):
-            shape_key_verts[n].co = verts[n].co
-    # go to all armature modifies and unpose the shape
-    except:
-        message = "***ERROR***, meshes have different number of vertices"
-        result =  message
-    for n in target.modifiers:
-        if n.type == 'ARMATURE' and n.show_viewport:
-            #~ print("got one")
-            n.use_bone_envelopes = False
-            n.use_deform_preserve_volume = False
-            n.use_vertex_groups = True
-            armature = n.object
-            unposeMesh( shape_key_verts, target, armature)
-            break
-    
-    # set the new shape key value to 1.0, so we see the result instantly
-    target.data.shape_keys.key_blocks[ target.active_shape_key_index].value = 1.0
-    try:
-        target.active_shape_key.vertex_group = vgroup
-    except:
-        print("bluba")
-        result  = result + "bluba"
-        pass
-    target.show_only_shape_key = False
-    target.data.update()
-    return result
-    
-class add_corrective_pose_shape_fast(bpy.types.Operator):   
-    """Add 1st object as shape to 2nd object as pose shape (only 1 armature)"""
-    bl_idname = "object.add_corrective_pose_shape_fast"
-    bl_label = "Add object as corrective shape faster"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-    
-        if len(context.selected_objects) > 2:
-            print("Select source and target objects please")
-            return {'FINISHED'}
-
-        selection = context.selected_objects
-        target = context.active_object
-        if context.active_object == selection[0]:
-            source = selection[1]
-        else:
-            source = selection[0]
-        print(source)
-        print(target)
-        func_add_corrective_pose_shape_fast( source, target)
-        return {'FINISHED'}
-
-def register():
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/geodesic_domes/forms_259.py b/release/scripts/addons_contrib/geodesic_domes/forms_259.py
deleted file mode 100644
index 4e451a5..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/forms_259.py
+++ /dev/null
@@ -1,222 +0,0 @@
-import math
-from math import pi,sin,cos,atan,tan,fabs
-from geodesic_domes.vefm_259 import *
-class form(mesh):
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        mesh.__init__(self)
-        #PKHG alredey in vefm259 mesh: self.a360 = pi * 2.0
-        self.PKHG_parameters = [uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform]
-        self.ures = uresolution
-        self.vres = vresolution
-        
-        self.uscale = uscale
-        self.vscale = vscale
-        self.upart = upart
-        self.vpart = vpart
-        self.uphase = uphase * self.a360
-        self.vphase = vphase * self.a360
-        self.utwist = utwist
-        self.vtwist = vtwist
-        
-        self.xscale = xscale
-        self.yscale = yscale
-        self.sform = sform
-                
-        if self.upart != 1.0:    ## there is a gap in the major radius
-            self.uflag = 1
-        else:
-            self.uflag = 0
-        if self.vpart != 1.0:    ## there is a gap in the minor radius
-            self.vflag = 1
-        else:
-            self.vflag = 0
-        if self.uflag:
-            self.ufinish = self.ures + 1
-        else:
-            self.ufinish = self.ures
-        if self.vflag:
-            self.vfinish = self.vres + 1
-        else:
-            self.vfinish = self.vres
-        self.ustep = (self.a360 / self.ures) * self.upart
-        self.vstep = (self.a360 / self.vres) * self.vpart
-        if self.xscale != 1.0:
-            self.xscaleflag = 1
-        else:            
-            self.xscaleflag = 0        
-        if self.yscale != 1.0:            
-            self.yscaleflag = 1            
-        else:            
-            self.yscaleflag = 0                            
-        self.rowlist=[]
-
-    def generatepoints(self):
-        for i in range(self.ufinish):
-            row=[]
-            for j in range(self.vfinish):
-                u = self.ustep * i + self.uphase
-                v = self.vstep * j + self.vphase
-            #    if self.xscaleflag:
-            #        u = self.ellipsecomp(self.xscale,u) 
-            #    if self.yscaleflag:
-            #        v = self.ellipsecomp(self.yscale,v)            
-                if self.sform[12]:
-                    r1 = self.superform(self.sform[0],self.sform[1],self.sform[2],self.sform[3],self.sform[14] + u,self.sform[4],self.sform[5],self.sform[16] * v)
-                else:
-                    r1 = 1.0
-                if self.sform[13]:
-                    r2 = self.superform(self.sform[6],self.sform[7],self.sform[8],self.sform[9],self.sform[15] + v,self.sform[10],self.sform[11],self.sform[17] * v)
-                else:
-                    r2 = 1.0
-                x,y,z = self.formula(u,v,r1,r2)
-                point = vertex((x,y,z))
-                row.append(point)
-                self.verts.append(point)
-            self.rowlist.append(row)
-        if self.vflag:
-            pass
-        else:
-            for i in range(len(self.rowlist)):
-                self.rowlist[i].append(self.rowlist[i][0])
-        if  self.uflag:
-            pass
-        else:
-            self.rowlist.append(self.rowlist[0])
-
-#    def formula(self,u,v,r1,r2):
-#        pass
-
-    def generatefaces(self):
-        ufin = len(self.rowlist) - 1
-        vfin = len(self.rowlist[0]) - 1
-        for i in range(ufin):
-            for j in range(vfin):
-                top = i
-                bottom = i + 1
-                left = j
-                right = j + 1
-                a = self.rowlist[top][left]
-                b = self.rowlist[top][right]
-                c = self.rowlist[bottom][right]
-                d = self.rowlist[bottom][left]
-                face1 = face([a,b,c,d])
-                self.faces.append(face1)
-                edge1 = edge(a,b)
-                edge2 = edge(a,d)
-                self.edges.append(edge1)
-                self.edges.append(edge2)
-                if i + 1 == ufin:
-                    edge3 = edge(d,c)
-                    self.edges.append(edge3)
-                if j + 1 == vfin:
-                    edge4 = edge(b,c)
-                    self.edges.append(edge4)
-    
-class grid(form):
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        form.__init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform)
-        unit = 1.0 / self.a360
-        if self.ures == 1 :            
-            print("\n***ERRORin forms_259.grid L121***, ures is  1, changed into 2\n\n")
-            self.ures = 2
-        if self.vres == 1 :            
-            print("\n***ERROR in grid forms_259.grid L124***, vres is 1, changed into 2\n\n")
-            self.vres = 2            
-        self.ustep = self.a360 / (self.ures - 1)
-        self.vstep = self.a360 / (self.vres - 1)
-        
-        self.uflag = 1
-        self.vflag = 1
-            
-        self.xscaleflag = 0        
-        self.yscaleflag = 0
-        self.uexpand = unit * self.uscale
-        self.vexpand = unit * self.vscale
-        self.ushift = self.uscale * 0.5
-        self.vshift = self.vscale * 0.5
-        
-        self.generatepoints()
-        self.generatefaces()
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        self.connectivity()
-                
-    def formula(self,u,v,r1,r2):     
-        x = u * self.uexpand - self.ushift
-        y = v * self.vexpand - self.vshift
-        z = r1 * r2 - 1.0         
-        return x,y,z
-    
-    
-class cylinder(form):
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        form.__init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform)
-        unit = 1.0 / self.a360
-        self.vshift = self.vscale * 0.5
-        self.vexpand = unit * self.vscale
-        self.vflag = 1    
-        self.generatepoints()
-        self.generatefaces()
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        self.connectivity()    
-
-    def formula(self,u,v,r1,r2):
-        x = sin(u) * self.uscale * r1 * r2 * self.xscale
-        y = cos(u) * self.uscale * r1 * r2
-        z = v * self.vexpand - self.vshift
-        return x,y,z
-
-class parabola(form):
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        form.__init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform)
-        unit = 1.0 / self.a360
-        self.vshift = self.vscale * 0.5
-        self.vexpand = unit * self.vscale
-        self.vflag = 1
-        self.generatepoints()
-        self.generatefaces()
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        self.connectivity()        
-    
-    def formula(self,u,v,r1,r2):
-        factor = sqrt(v) + 0.001
-        x = sin(u) * factor * self.uscale * r1 * r2 * self.xscale
-        y = cos(u) * factor * self.uscale * r1 * r2
-        z = - v * self.vexpand + self.vshift
-        return x,y,z
-        
-class torus(form):    
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        form.__init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform)
-        self.generatepoints()
-        self.generatefaces()
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        self.connectivity()        
-                    
-    def formula(self,u,v,r1,r2):
-        z = sin(v) * self.uscale * r2 * self.yscale
-        y = (self.vscale + self.uscale * cos(v)) * cos(u) * r1 * r2
-        x = (self.vscale + self.uscale * cos(v)) * sin(u) * r1 * r2 * self.xscale
-        return x,y,z
-
-class sphere(form):
-    
-    def __init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform):
-        form.__init__(self,uresolution,vresolution,uscale,vscale,upart,vpart,uphase,vphase,utwist,vtwist,xscale,yscale,sform)
-        self.vstep = (self.a360 / (self.vres - 1)) * self.vpart
-        self.vflag = 1
-        self.generatepoints()
-        self.generatefaces()
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        self.connectivity()        
-        
-    def formula(self,u,v,r1,r2):
-        v = (v * 0.5) - (self.a360 * 0.25)
-        x = r1 * cos(u) * r2 * cos(v) * self.uscale * self.xscale
-        y = r1 * sin(u) * r2 * cos(v) * self.uscale
-        z = r2 * sin(v) * self.uscale * self.yscale
-        return x,y,z
diff --git a/release/scripts/addons_contrib/geodesic_domes/geodesic_classes_259.py b/release/scripts/addons_contrib/geodesic_domes/geodesic_classes_259.py
deleted file mode 100644
index 15378ce..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/geodesic_classes_259.py
+++ /dev/null
@@ -1,754 +0,0 @@
-#werkt from geodesic_domes.vefm_259 import *
-from geodesic_domes.vefm_259 import mesh, vertex, edge, face
-
-import math
-from math import pi,acos,sin,cos,atan,tan,fabs, sqrt
-
-def check_contains(cl,name , print_value = False):
-    dir_class = dir(cl)
-    for el in dir_class:
-        if el.startswith("_"):
-            pass
-        else:
-            if print_value:
-                tmp = getattr(cl,el)
-                print(name , " contains ==>",el," value = ", tmp)
-            else:
-                print(name , " contains ==>",el)
-    print("\ncheck_contains finished\n\n")
-
-class geodesic(mesh):
-    def __init__(self):
-        mesh.__init__(self)
-        self.PKHG_parameters = None
-#        print("\n------ geodesic L11 PKHG_parameters",PKHG_parameters)
-        self.panels = []
-        self.vertsdone = []
-        self.skeleton = []                ## List of verts in the full skeleton edges.
-        self.vertskeleton = [] # config needs this member
-        self.edgeskeleton = [] # config needs this member
-        self.sphericalverts = []
-        self.a45 = pi * 0.25
-        self.a90 = pi * 0.5
-        self.a180 = pi
-        self.a270 = pi * 1.5
-        self.a360 = pi * 2
-        #define members here
-        #setparams  needs:
-        self.frequency = None
-        self.eccentricity = None
-        self.squish = None
-        self.radius = None
-        self.square = None
-        self.squarez = None
-        self.cart = None
-        self.shape = None
-        self.baselevel = None
-        self.faceshape = None
-        self.dualflag = None
-        self.rotxy = None
-        self.rotz = None
-        self.klass = None
-        self.sform = None
-        self.super = None
-        self.odd = None
-        #config needs
-        self.panelpoints = None
-        self.paneledges = None
-        self.reversepanel = None
-        self.edgelength = None
-        self.vertsdone = None
-        self.panels = []
-    
-#PKHG because of unittest approach for a while the following three lines commentd
-#PKHG do not understand the problems with the next three lines
-#no does not work        self.setparameters()
-#        self.makegeodesic()
-#        self.connectivity()
-
-    def setparameters(self,params):
-        parameters = self.PKHG_parameters = params
-        self.frequency = parameters[0]    ## How many subdivisions - up to 20.
-        self.eccentricity = parameters[1]    ## Elliptical if >1.0.
-        self.squish = parameters[2]        ## Flattened if < 1.0.
-        self.radius = parameters[3]        ## Exactly what it says.
-        self.square = parameters[4]        ## Controls amount of superellipse in X/Y plane.
-        self.squarez = parameters[5]        ## Controls amount of superellipse in Z dimension.
-        self.cart = parameters[6]            ## Cuts out sphericalisation step.
-        self.shape = parameters[7]        ## Full sphere, dome, flatbase.
-        self.baselevel = parameters[8]        ## Where the base is cut on a flatbase dome.
-        self.faceshape = parameters[9]    ## Triangular, hexagonal, tri-hex.
-        self.dualflag = parameters[10]
-        self.rotxy = parameters[11]
-        self.rotz = parameters[12]
-        self.klass = parameters[13]
-        self.sform = parameters[14]
-        self.super = 0                    ## Toggles superellipse.
-        if self.square != 2.0 or self.squarez != 2.0:
-            self.super = 1
-        self.odd = 0                    ## Is the frequency odd. It matters for dome building.
-        if self.frequency % 2 != 0:
-            self.odd = 1
-
-    def makegeodesic(self):
-        self.vertedgefacedata() #PKHG only a pass 13okt11
-        self.config()                    ## Generate all the configuration information.
-        if self.klass:            
-            self.class2()
-        if self.faceshape == 1:
-            self.hexify()                ## Hexagonal faces
-        elif self.faceshape == 2:
-            self.starify()                ## Hex and Triangle faces
-        if self.dualflag:
-            self.dual()
-        if not self.cart:
-            self.sphericalize()    ##   Convert x,y,z positions into spherical u,v.
-        self.sphere2cartesian()    ##   Convert spherical uv back into cartesian x,y,z for final shape.
-        for i in range(len( self.verts)):
-            self.verts[i].index = i
-        for edg in self.edges:
-            edg.findvect()
-
-    def vertedgefacedata(self):
-        pass
-
-#PKHG 23.1    def config(self, frequency = 1): #???PKHG frequency problem  20 oct.
-    def config(self): #???PKHG frequency problem  20 oct.
-#PKHG_OK        print("\n20-11 >>>>>>>>>DBG geodesic_classes_259 config L117 called")
-        for i in range(len(self.vertskeleton)):
-            self.vertskeleton[i].index = i
-        for edges in self.edgeskeleton:
-#???PKHG TODO            s = skeletonrow(self.frequency, edges, 0, self) #self a geodesic
-            s = skeletonrow(self.frequency, edges, 0, self) #self a geodesic
-            self.skeleton.append(s)
-        for i in range(len( self.verts)):
-            self.verts[i].index = i
-        for i in range(len(self.panelpoints)):
-            a = self.vertsdone[self.panelpoints[i][0]][1]
-            b = self.vertsdone[self.panelpoints[i][1]][1]
-            c = self.vertsdone[self.panelpoints[i][2]][1]
-            panpoints = [    self.verts[a],
-                        self.verts[b],
-                        self.verts[c]]
-            panedges = [    self.skeleton[self.paneledges[i][0]],
-                        self.skeleton[self.paneledges[i][1]],
-                        self.skeleton[self.paneledges[i][2]]    ]
-            reverseflag = 0
-            for flag in self.reversepanel:
-                if flag == i:
-                    reverseflag = 1                     
-            p = panel(panpoints, panedges, reverseflag, self)
-#PKHG_panels not used?!            self.panels.append(p)
-        
-    def sphericalize(self):
-        if self.shape == 2:
-            self.cutbasecomp()
-        for vert in(self.verts):
-#PKHG test 20111030        
-#            x = vert.x
-#            y = vert.y
-#            z = vert.z
-            x = vert.vector.x
-            y = vert.vector.y
-            z = vert.vector.z
-
-            u = self.usphericalise(x,y,z)
-            v = self.vsphericalise(x,y,z)
-            self.sphericalverts.append([u,v])
-
-    def sphere2cartesian(self):
-#PKHG_TODOnot_now        check_contains(self,"sphereto self",True)
-        for i in range(len(self.verts)):
-            if self.cart:
-#PKHG test 20111030                        
-#                x = self.verts[i].x * self.radius * self.eccentricity
-#                y = self.verts[i].y * self.radius
-#                z = self.verts[i].z * self.radius * self.squish
-                x = self.verts[i].vector.x * self.radius * self.eccentricity
-                y = self.verts[i].vector.y * self.radius
-                z = self.verts[i].vector.z * self.radius * self.squish
-            else:
-                u = self.sphericalverts[i][0]
-                v = self.sphericalverts[i][1]
-                if self.squish != 1.0 or self.eccentricity>1.0:
-                    scalez = 1 / self.squish
-                    v = self.ellipsecomp(scalez,v)
-                    u = self.ellipsecomp(self.eccentricity,u)
-                if self.super:
-                    r1 = self.superell(self.square,u,self.rotxy)
-                    r2 = self.superell(self.squarez,v,self.rotz)
-                else:
-                    r1 = 1.0
-                    r2 = 1.0
-                
-            #    print "sform",self.sform,"  u",u,"  v",v
-                if self.sform[12]:
-                    
-                    r1 = r1 * self.superform(self.sform[0],self.sform[1],self.sform[2],self.sform[3],self.sform[14] + u,self.sform[4],self.sform[5],self.sform[16] * v)
-                if self.sform[13]:
-                
-                    r2 = r2 * self.superform(self.sform[6],self.sform[7],self.sform[8],self.sform[9],self.sform[15] + v,self.sform[10],self.sform[11],self.sform[17] * v)
-                x,y,z = self.cartesian(u,v,r1,r2)
-#PKHG test 20111030                        
-#            self.verts[i].x = x
-#            self.verts[i].y = y
-#            self.verts[i].z = z
-            self.verts[i] = vertex((x,y,z))
-        
-    def usphericalise(self,x,y,z):
-        if y == 0.0:
-            if x>0:
-                theta = 0.0
-            else:
-                theta = self.a180
-        elif x == 0.0:
-            if y>0:
-                theta = self.a90
-            else:
-                theta = self.a270
-                
-        else:
-            theta = atan(y / x)
-        if x < 0.0 and y < 0.0:
-            theta = theta + self.a180
-        elif x < 0.0 and y>0.0:
-            theta = theta + self.a180
-        u = theta
-        return u
-    
-    def vsphericalise(self,x,y,z) :
-        if z == 0.0:
-            phi = self.a90
-        else:
-            rho = sqrt(x ** 2 + y**2 + z**2)
-            phi = acos(z / rho)
-        v = phi
-        return v
-    def ellipsecomp(self,efactor,theta):
-        if theta == self.a90:
-            result = self.a90
-        elif theta == self.a270:
-            result = self.a270
-        else:
-            result = atan(tan(theta) / efactor**0.5)
-            if result>=0.0:
-                x = result
-                y = self.a180 + result
-                if fabs(x - theta) <= fabs(y - theta):
-                    result = x
-                else:
-                    result = y
-            else:
-                x = self.a180 + result
-                y = result
-            
-                if fabs(x - theta) <= fabs(y - theta):
-                    result = x
-                else:
-                    result = y
-        return result
-    def cutbasecomp(self):
-        pass
-
-    def cartesian(self,u,v,r1,r2):
-        x = r1 * cos(u) * r2 * sin(v) * self.radius * self.eccentricity
-        y = r1 * sin(u) * r2 * sin(v) * self.radius
-        z = r2 * cos(v) * self.radius * self.squish
-        return x,y,z
-#     def connectivity(self):
-# 
-#         self.dovertedge()
-#         self.dovertface()
-#         self.dofaceedge()
-
-class edgerow:
-    def __init__(self, count, anchor, leftindex, rightindex, stepvector, endflag, parentgeo):
-        self.points = []
-        self.edges = []
-        ## Make a row of evenly spaced points.
-        for i in range(count + 1):
-            if i == 0:
-                self.points.append(leftindex)
-            elif i == count and not endflag:
-                self.points.append(rightindex)
-            else: #PKHG Vectors added!
-                newpoint = anchor + (stepvector * i)
-                vertcount = len(parentgeo.verts)
-                self.points.append(vertcount)
-                newpoint.index = vertcount
-                parentgeo.verts.append(newpoint)
-        for i in range(count):
-            a = parentgeo.verts[self.points[i]]
-            b = parentgeo.verts[self.points[i + 1]]
-            line = edge(a,b)
-            self.edges.append(len(parentgeo.edges))
-            parentgeo.edges.append(line)
-
-class skeletonrow:
-    def __init__(self, count, skeletonedge, shortflag, parentgeo):
-        self.points = []
-        self.edges = []
-        self.vect = skeletonedge.vect
-        self.step = skeletonedge.vect / float(count)
-        ## Make a row of evenly spaced points.
-        for i in range(count + 1):
-            vert1 = skeletonedge.a
-            vert2 = skeletonedge.b
-            if i == 0:
-                if parentgeo.vertsdone[vert1.index][0]:
-                    self.points.append(parentgeo.vertsdone[vert1.index][1])
-                else:
-#PKHG test 20111030
-#                    newpoint = vertex((vert1.x, vert1.y, vert1.z))
-                    newpoint = vertex(vert1.vector)
-                    vertcount = len(parentgeo.verts)
-                    self.points.append(vertcount)
-                    newpoint.index = vertcount
-                    parentgeo.vertsdone[vert1.index] = [1,vertcount]
-                    parentgeo.verts.append(newpoint)                    
-                    
-            elif i == count:
-                if parentgeo.vertsdone[vert2.index][0]:
-                    self.points.append(parentgeo.vertsdone[vert2.index][1])
-                else:
-#PKHG test 20111030                    
-#                    newpoint = vertex((vert2.x, vert2.y, vert2.z))
-                    newpoint = vertex(vert2.vector)
-                    vertcount = len(parentgeo.verts)
-                    self.points.append(vertcount)
-                    newpoint.index = vertcount
-                    parentgeo.vertsdone[vert2.index] = [1,vertcount]
-                    parentgeo.verts.append(newpoint)                    
-            else:
-                newpoint = vertex(vert1.vector + (self.step * i)) #must be a vertex!
-                vertcount = len(parentgeo.verts)
-                self.points.append(vertcount)
-                newpoint.index = vertcount
-                parentgeo.verts.append(newpoint)
-        for i in range(count):
-            a = parentgeo.verts[self.points[i]]
-            b = parentgeo.verts[self.points[i + 1]]
-            line = edge(a,b)
-            self.edges.append(len(parentgeo.edges))
-            parentgeo.edges.append(line)
-
-class facefill:
-    def __init__(self, upper, lower, reverseflag, parentgeo, finish):
-        for i in range(finish):
-            a,b,c = upper.points[i],lower.points[i + 1],lower.points[i]
-            if reverseflag:
-                upface = face([parentgeo.verts[a],parentgeo.verts[c],parentgeo.verts[b]])
-            else:
-                upface = face([parentgeo.verts[a],parentgeo.verts[b],parentgeo.verts[c]])
-            parentgeo.faces.append(upface)
-            if i == finish - 1:
-                pass
-            else:
-                d = upper.points[i + 1]
-                if reverseflag:
-                    downface = face([parentgeo.verts[b],parentgeo.verts[d],parentgeo.verts[a]])
-                else:
-                    downface = face([parentgeo.verts[b],parentgeo.verts[a],parentgeo.verts[d]])
-                line = edge(parentgeo.verts[a],parentgeo.verts[b])
-                line2 = edge(parentgeo.verts[d],parentgeo.verts[b])
-                parentgeo.faces.append(downface)
-                parentgeo.edges.append(line)
-                parentgeo.edges.append(line2)
-class panel:
-    def __init__(self, points, edges, reverseflag, parentgeo):
-        self.cardinal = points[0]
-        self.leftv = points[1]
-        self.rightv = points[2]
-        self.leftedge = edges[0]
-        self.rightedge = edges[1]
-        self.baseedge = edges[2]
-        self.rows=[]
-        self.orient(parentgeo,edges)
-        self.createrows(parentgeo)
-        self.createfaces(parentgeo,reverseflag)
-
-    def orient(self,parentgeo,edges):
-        if self.leftedge.points[0] != self.cardinal.index:
-            self.leftedge.points.reverse()
-            self.leftedge.vect.negative()
-        
-        if self.rightedge.points[0] != self.cardinal.index:
-            self.rightedge.points.reverse()
-            self.rightedge.vect.negative()
-        
-        if self.baseedge.points[0] != self.leftv.index:
-        
-            self.baseedge.points.reverse()
-            self.baseedge.vect.negative()
-
-    def createrows(self, parentgeo):
-        for i in range(len(self.leftedge.points)):
-            if i == parentgeo.frequency:
-                newrow = self.baseedge
-            else:
-                newrow = edgerow(i, parentgeo.verts[self.leftedge.points[i]], self.leftedge.points[i], self.rightedge.points[i], self.baseedge.step, 0, parentgeo )
-            self.rows.append(newrow)
-    def createfaces(self, parentgeo,reverseflag):
-        for i in range(len(self.leftedge.points) - 1):
-            facefill(self.rows[i], self.rows[i + 1], reverseflag, parentgeo, len(self.rows[i].points))
-#############################
-#############################
-
-#for point on top?  YES!          
-class tetrahedron(geodesic,mesh):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-        
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0.0 , 0.0 , 1.73205080757 )),
-                            vertex(( 0.0 , -1.63299316185 , -0.577350269185 )),
-                            vertex(( 1.41421356237 , 0.816496580927 , -0.57735026919 )),
-                            vertex(( -1.41421356237 , 0.816496580927 , -0.57735026919 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3])    ]
-        
-### probably to be removed, other gui! : "#??? delete PKHG"
-        self.panelpoints=[[0,1,2],[0,2,3],[0,1,3],[1,2,3]]
-        self.paneledges=[[0,1,3],[1,2,4],[0,2,5],[3,5,4]]
-        self.reversepanel=[2,3]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-
-#for edge on top? YES
-class tetraedge(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0.0 , -1.41421356237 , 1.0 )),
-                            vertex(( 0.0 , 1.41421356237 , 1.0 )),
-                            vertex(( 1.41421356237 , 0.0 , -1.0 )),
-                            vertex(( -1.41421356237 , 0.0 , -1.0 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3])    ]
-        for i in range(len(self.vertskeleton)):
-            self.vertskeleton[i].index = i
-        self.panelpoints=[[0,1,2],[1,2,3],[0,1,3],[0,2,3]]
-        self.paneledges=[[0,1,4],[4,3,5],[0,2,3],[1,2,5]]
-        self.reversepanel=[0,3]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-
-#for face on top? YES
-class tetraface(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( -1.41421356237 , -0.816496580927 , 0.57735026919 )),
-                            vertex(( 1.41421356237 , -0.816496580927 , 0.57735026919 )),
-                            vertex(( 0.0 , 1.63299316185 , 0.577350269185 )),
-                            vertex(( 0.0 , 0.0 , -1.73205080757 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[0]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3])    ]
-        self.panelpoints=[[2,0,1],[0,1,3],[2,1,3],[2,0,3]]
-        self.paneledges=[[2,1,0],[0,3,4],[1,5,4],[2,5,3]]
-        self.reversepanel=[1,3]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-
-class octahedron(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex((0.0,0.0,1.0)),
-                            vertex((0.0,1.0,0.0)),
-                            vertex((-1.0,0.0,0.0)),
-                            vertex((0.0,-1.0,0.0)),
-                            vertex((1.0,0.0,0.0)),
-                            vertex((0.0,0.0,-1.0))    ]
-        for i in range(len(self.vertskeleton)):
-            self.vertskeleton[i].index = i
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[0],self.vertskeleton[4]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3]),
-                            edge(self.vertskeleton[3],self.vertskeleton[4]),
-                            edge(self.vertskeleton[4],self.vertskeleton[1]),
-                            edge(self.vertskeleton[1],self.vertskeleton[5]),
-                            edge(self.vertskeleton[2],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[5]),
-                            edge(self.vertskeleton[4],self.vertskeleton[5])    ]
-        self.panelpoints=[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,2,5],[2,3,5],[3,4,5],[4,1,5]]
-        self.paneledges=[[0,1,4],[1,2,5],[2,3,6],[3,0,7],[4,8,9],[5,9,10],[6,10,11],[7,11,8]]
-        self.reversepanel=[4,5,6,7]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-class octaedge(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0.0 , -0.707106781187 , 0.707106781187 )),
-                            vertex(( 0.0 , 0.707106781187 , 0.707106781187 )),
-                            vertex(( 1.0 , 0.0 , 0.0 )),
-                            vertex(( -1.0 , 0.0 , 0.0 )),
-                            vertex(( 0.0 , -0.707106781187 , -0.707106781187 )),
-                            vertex(( 0.0 , 0.707106781187 , -0.707106781187 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[4]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                               edge(self.vertskeleton[1],self.vertskeleton[5]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[2],self.vertskeleton[4]),
-                               edge(self.vertskeleton[2],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[4]),
-                            edge(self.vertskeleton[4],self.vertskeleton[5])    ]
-        self.panelpoints=[[0,1,2],[0,1,3],[0,2,4],[1,2,5],[1,3,5],[0,3,4],[2,4,5],[3,4,5]]
-        self.paneledges=[[0,2,3],[0,6,5],[2,1,7],[3,4,8],[5,4,9],[6,1,10],[7,8,11],[10,9,11]]
-        self.reversepanel=[0,2,4,7]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-class octaface(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0.408248458663 , -0.707106781187 , 0.577350150255 )),
-                            vertex(( 0.408248458663 , 0.707106781187 , 0.577350150255 )),
-                            vertex(( -0.816496412728 , 0.0 , 0.577350507059 )),
-                            vertex(( -0.408248458663 , -0.707106781187 , -0.577350150255 )),
-                            vertex(( 0.816496412728 , 0.0 , -0.577350507059 )),
-                            vertex(( -0.408248458663 , 0.707106781187 , -0.577350150255 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[0]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                             edge(self.vertskeleton[0],self.vertskeleton[4]),
-                            edge(self.vertskeleton[1],self.vertskeleton[4]),
-                            edge(self.vertskeleton[1],self.vertskeleton[5]),
-                            edge(self.vertskeleton[2],self.vertskeleton[5]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3]),
-                            edge(self.vertskeleton[3],self.vertskeleton[4]),
-                            edge(self.vertskeleton[4],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[5])    ]
-        self.panelpoints=[[2,0,1],[0,3,4],[0,1,4],[1,4,5],[2,1,5],[2,3,5],[2,0,3],[3,4,5]]
-        self.paneledges=[[2,1,0],[3,4,9],[0,4,5],[5,6,10],[1,7,6],[8,7,11],[2,8,3],[9,11,10]]
-        self.reversepanel=[2,5,6,7]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-class icosahedron(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0.0 , 0.0 , 0.587785252292 )),
-                            vertex(( 0.0 , -0.525731096637 , 0.262865587024 )),
-                            vertex(( 0.5 , -0.162459832634 , 0.262865565628 )),
-                            vertex(( 0.309016994375 , 0.425325419658 , 0.262865531009 )),
-                            vertex(( -0.309016994375 , 0.425325419658 , 0.262865531009 )),
-                            vertex(( -0.5 , -0.162459832634 , 0.262865565628 )),
-                            vertex(( 0.309016994375 , -0.425325419658 , -0.262865531009 )),
-                            vertex(( 0.5 , 0.162459832634 , -0.262865565628 )),
-                            vertex(( 0.0 , 0.525731096637 , -0.262865587024 )),
-                            vertex(( -0.5 , 0.162459832634 , -0.262865565628 )),
-                            vertex(( -0.309016994375 , -0.425325419658 , -0.262865531009 )),
-                            vertex(( 0.0 , 0.0 , -0.587785252292 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[0],self.vertskeleton[4]),
-                            edge(self.vertskeleton[0],self.vertskeleton[5]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                            edge(self.vertskeleton[2],self.vertskeleton[3]),
-                            edge(self.vertskeleton[3],self.vertskeleton[4]),
-                            edge(self.vertskeleton[4],self.vertskeleton[5]),
-                            edge(self.vertskeleton[5],self.vertskeleton[1]),
-                            edge(self.vertskeleton[1],self.vertskeleton[6]),
-                            edge(self.vertskeleton[2],self.vertskeleton[6]),
-                            edge(self.vertskeleton[2],self.vertskeleton[7]),
-                            edge(self.vertskeleton[3],self.vertskeleton[7]),
-                            edge(self.vertskeleton[3],self.vertskeleton[8]),
-                            edge(self.vertskeleton[4],self.vertskeleton[8]),
-                            edge(self.vertskeleton[4],self.vertskeleton[9]),
-                            edge(self.vertskeleton[5],self.vertskeleton[9]),
-                            edge(self.vertskeleton[5],self.vertskeleton[10]),
-                            edge(self.vertskeleton[1],self.vertskeleton[10]),
-                            edge(self.vertskeleton[6],self.vertskeleton[7]),
-                            edge(self.vertskeleton[7],self.vertskeleton[8]),
-                            edge(self.vertskeleton[8],self.vertskeleton[9]),
-                            edge(self.vertskeleton[9],self.vertskeleton[10]),
-                            edge(self.vertskeleton[10],self.vertskeleton[6]),
-                            edge(self.vertskeleton[6],self.vertskeleton[11]),
-                            edge(self.vertskeleton[7],self.vertskeleton[11]),
-                            edge(self.vertskeleton[8],self.vertskeleton[11]),
-                            edge(self.vertskeleton[9],self.vertskeleton[11]),
-                            edge(self.vertskeleton[10],self.vertskeleton[11])    ]
-        self.panelpoints=[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,2,6],[2,6,7],[2,3,7],[3,7,8],[3,4,8],[4,8,9],[4,5,9],[5,9,10],[5,1,10],[1,10,6],[6,7,11],[7,8,11],[8,9,11],[9,10,11],[10,6,11]]
-        self.paneledges=[[0,1,5],[1,2,6],[2,3,7],[3,4,8],[4,0,9],[5,10,11],[11,12,20],[6,12,13],[13,14,21],[7,14,15],[15,16,22],[8,16,17],[17,18,23],[9,18,19],[19,10,24],[20,25,26],[21,26,27],[22,27,28],[23,28,29],[24,29,25]]
-        self.reversepanel=[5,7,9,11,13,15,16,17,18,19]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-class icoedge(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( 0 , 0.309016994375 , 0.5 )),
-                            vertex(( 0 , -0.309016994375 , 0.5 )),
-                            vertex(( -0.5 , 0 , 0.309016994375 )),
-                            vertex(( 0.5 , 0 , 0.309016994375 )),
-                            vertex(( -0.309016994375 , -0.5 , 0 )),
-                            vertex(( 0.309016994375 , -0.5 , 0 )),
-                            vertex(( 0.309016994375 , 0.5 , 0 )),
-                            vertex(( -0.309016994375 , 0.5 , 0 )),
-                            vertex(( -0.5 , 0 , -0.309016994375 )),
-                            vertex(( 0.5 , 0 , -0.309016994375 )),
-                            vertex(( 0 , 0.309016994375 , -0.5 )),
-                            vertex(( 0 , -0.309016994375 , -0.5 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[0],self.vertskeleton[7]),
-                            edge(self.vertskeleton[0],self.vertskeleton[2]),
-                            edge(self.vertskeleton[1],self.vertskeleton[2]),
-                            edge(self.vertskeleton[1],self.vertskeleton[4]),
-                            edge(self.vertskeleton[1],self.vertskeleton[5]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[0],self.vertskeleton[6]),
-                            edge(self.vertskeleton[2],self.vertskeleton[7]),
-                            edge(self.vertskeleton[2],self.vertskeleton[8]),
-                            edge(self.vertskeleton[2],self.vertskeleton[4]),
-                            edge(self.vertskeleton[4],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[5]),
-                            edge(self.vertskeleton[3],self.vertskeleton[9]),
-                            edge(self.vertskeleton[3],self.vertskeleton[6]),
-                            edge(self.vertskeleton[6],self.vertskeleton[7]),
-                            edge(self.vertskeleton[7],self.vertskeleton[10]),
-                            edge(self.vertskeleton[7],self.vertskeleton[8]),
-                            edge(self.vertskeleton[4],self.vertskeleton[8]),
-                            edge(self.vertskeleton[4],self.vertskeleton[11]),
-                            edge(self.vertskeleton[5],self.vertskeleton[11]),
-                            edge(self.vertskeleton[5],self.vertskeleton[9]),
-                            edge(self.vertskeleton[6],self.vertskeleton[9]),
-                            edge(self.vertskeleton[6],self.vertskeleton[10]),
-                            edge(self.vertskeleton[8],self.vertskeleton[10]),
-                            edge(self.vertskeleton[8],self.vertskeleton[11]),
-                            edge(self.vertskeleton[9],self.vertskeleton[11]),
-                            edge(self.vertskeleton[9],self.vertskeleton[10]),
-                            edge(self.vertskeleton[10],self.vertskeleton[11])    ]
-        self.panelpoints=[    [0,1,2],[0,1,3],[0,2,7],[1,2,4],[1,4,5],[1,3,5],[0,3,6],[0,6,7],[2,7,8],[2,4,8],
-                        [3,5,9],[3,6,9],[7,8,10],[4,8,11],[4,5,11],[5,9,11],[6,9,10],[6,7,10],[8,10,11],[9,10,11]]
-        self.paneledges=[[0,2,3],[0,7,6],[2,1,9],[3,4,11],[4,5,12],[6,5,13],[7,8,15],[8,1,16],[9,10,18],[11,10,19],
-                    [13,14,22],[15,14,23],[18,17,25],[19,20,26],[12,20,21],[22,21,27],[23,24,28],[16,24,17],[25,26,29],[28,27,29]]
-        self.reversepanel=[0,2,5,9,11,12,14,15,17,19]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-class icoface(geodesic):
-    def __init__(self,parameter):
-        geodesic.__init__(mesh)
-        geodesic.setparameters(self,parameter)
-        self.set_vert_edge_skeleons()
-    def set_vert_edge_skeleons(self):
-        self.vertskeleton=[        vertex(( -0.17841104489 , 0.309016994375 , 0.46708617948 )),
-                            vertex(( -0.17841104489 , -0.309016994375 , 0.46708617948 )),
-                            vertex(( 0.35682208977 , 0.0 , 0.467086179484 )),
-                            vertex(( -0.57735026919 , 0.0 , 0.110264089705 )),
-                            vertex(( -0.288675134594 , -0.5 , -0.11026408971 )),
-                            vertex(( 0.288675134594 , -0.5 , 0.11026408971 )),
-                            vertex(( 0.57735026919 , 0.0 , -0.110264089705 )),
-                            vertex(( 0.288675134594 , 0.5 , 0.11026408971 )),
-                            vertex(( -0.288675134594 , 0.5 , -0.11026408971 )),
-                            vertex(( -0.35682208977 , 0.0 , -0.467086179484 )),
-                            vertex(( 0.17841104489 , -0.309016994375 , -0.46708617948 )),
-                            vertex(( 0.17841104489 , 0.309016994375 , -0.46708617948 ))    ]
-        self.edgeskeleton=[    edge(self.vertskeleton[0],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[1]),
-                            edge(self.vertskeleton[2],self.vertskeleton[0]),
-                            edge(self.vertskeleton[0],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[3]),
-                            edge(self.vertskeleton[1],self.vertskeleton[4]),
-                            edge(self.vertskeleton[1],self.vertskeleton[5]),
-                            edge(self.vertskeleton[2],self.vertskeleton[5]),
-                            edge(self.vertskeleton[2],self.vertskeleton[6]),
-                            edge(self.vertskeleton[2],self.vertskeleton[7]),
-                            edge(self.vertskeleton[0],self.vertskeleton[7]),
-                            edge(self.vertskeleton[0],self.vertskeleton[8]),
-                            edge(self.vertskeleton[3],self.vertskeleton[9]),
-                            edge(self.vertskeleton[3],self.vertskeleton[4]),
-                            edge(self.vertskeleton[5],self.vertskeleton[4]),
-                            edge(self.vertskeleton[5],self.vertskeleton[10]),
-                            edge(self.vertskeleton[5],self.vertskeleton[6]),
-                            edge(self.vertskeleton[7],self.vertskeleton[6]),
-                            edge(self.vertskeleton[7],self.vertskeleton[11]),
-                            edge(self.vertskeleton[7],self.vertskeleton[8]),
-                            edge(self.vertskeleton[3],self.vertskeleton[8]),
-                            edge(self.vertskeleton[4],self.vertskeleton[9]),
-                            edge(self.vertskeleton[4],self.vertskeleton[10]),
-                            edge(self.vertskeleton[6],self.vertskeleton[10]),
-                            edge(self.vertskeleton[6],self.vertskeleton[11]),
-                            edge(self.vertskeleton[8],self.vertskeleton[11]),
-                            edge(self.vertskeleton[8],self.vertskeleton[9]),
-                            edge(self.vertskeleton[9],self.vertskeleton[10]),
-                            edge(self.vertskeleton[11],self.vertskeleton[10]),
-                            edge(self.vertskeleton[11],self.vertskeleton[9])    ]
-        self.panelpoints=[[2,0,1],[0,1,3],[2,1,5],[2,0,7],[1,3,4],[1,5,4],[2,5,6],[2,7,6],[0,7,8],[0,3,8],[3,4,9],[5,4,10],[5,6,10],[7,6,11],[7,8,11],[3,8,9],[4,9,10],[6,11,10],[8,11,9],[11,9,10]]
-        self.paneledges=[[2,1,0],[0,3,4],[1,7,6],[2,9,10],[4,5,13],[6,5,14],[7,8,16],[9,8,17],[10,11,19],[3,11,20],
-                    [13,12,21],[14,15,22],[16,15,23],[17,18,24],[19,18,25],[20,12,26],[21,22,27],[24,23,28],[25,26,29],[29,28,27]]
-        self.reversepanel=[1,3,5,7,9,10,12,14,17,19]
-        self.edgelength=[]
-        self.vertsdone=[[0,0]] * len(self.vertskeleton)
-
-##???PKHG TODO this does not work yet ...
-def creategeo(geo,polytype,orientation,parameters):
-    
-    if polytype == 'Tetrahedron':
-        if orientation == 'PointUp':
-            #return
-            #geo(parameters)
-#            geo.setparameters()
-            my_tetrahedron = tetrahedron(geodesic)
-            my_tetrahedron.set_vert_edge_skeleons()
-            my_tetrahedron.config()            
-            check_contains(my_tetrahedron,"my_tetra",True)
-            vefm_add_object(geo)
-        elif orientation == 'EdgeUp':
-            geo = tetraedge(parameters)
-        else: # orientation==2:
-            geo=tetraface(parameters)
-    elif polytype == 'Octahedron':        # octahedron
-        if orientation == 'PointUp':
-            geo = octahedron(parameters)
-        elif orientation == 'EdgeUp':
-            geo = octaedge(parameters)
-        else: #if orientation==2:
-            geo = octaface(parameters)
-    elif polytype == 'Icosahedron':    # icosahedron
-        if orientation == 'PointUp':
-            geo = icosahedron(parameters)
-        elif orientation == 'EdgeUp':
-            geo = icoedge(parameters)
-        else: #if orientation==2:
-            geo = icoface(parameters)
-    return geo
diff --git a/release/scripts/addons_contrib/geodesic_domes/read_me.txt b/release/scripts/addons_contrib/geodesic_domes/read_me.txt
deleted file mode 100644
index ad20376..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/read_me.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Geodesic_Domes
-Based on a script by Andy Houston (serendipiti) for Blender 2.49
-Original Script Documentation:
-http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/Wizards/Geodesic_dome
-Licence:
-GPL
-
-PKHG (did the conversion)
-BIG change after revision 2551 GUI adjusted ...
-You should download anew if older then 24-november-2011
-
-In principle all parts work:
-the *hedrons with superformparameters
-Grid ... Sphere with superformparameters
-Faces  **
-Hubs   **
-Struts **
-
-** means will be adjusted ... at the moment you  have to name objects and
-execute eventually again ;-( ...
-
-but PKHG is content with a this nearly 95% converted version.
-
-TODO, ranges of parameters could be chosen differently. Inform PKHG!
-
-Uplaod will be done today (25-11 at about 19.30... GMT -+1)
-
-_259 in the names is not important ... but let it be so (now) ;-)
diff --git a/release/scripts/addons_contrib/geodesic_domes/third_domes_panel.py b/release/scripts/addons_contrib/geodesic_domes/third_domes_panel.py
deleted file mode 100644
index 171a96a..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/third_domes_panel.py
+++ /dev/null
@@ -1,1062 +0,0 @@
-import bpy
-import os
-from geodesic_domes import vefm_259 
-from geodesic_domes import forms_259
-from geodesic_domes import geodesic_classes_259
-from geodesic_domes import add_shape_geodesic
-
-from bpy.props import EnumProperty, IntProperty, FloatProperty, StringProperty, BoolProperty
-import math
-from math import pi
-from mathutils import Vector #needed to check vertex.vector values
-try:
-    breakpoint = bpy.types.bp.bp
-except:
-    print("add breakpoint addon!")
-        
-
-########global######
-last_generated_object = None
-last_imported_mesh = None
-basegeodesic = None
-imported_hubmesh_to_use = None
-########global end######
-
-########EIND FOR SHAPEKEYS######
-### error messages?!
-bpy.types.Scene.error_message = StringProperty(name="actual error", default = "")    
-
-
-bpy.types.Scene.geodesic_not_yet_called = BoolProperty(name="geodesic_not_called",default = True)
-
-bpy.types.Scene.gd_help_text_width = IntProperty(name = "Text Width" , description = "The width above which the text wraps" , default = 60 , max = 180 , min = 20)
-
-class Geodesic_Domes_Operator_Panel(bpy.types.Panel):
-    """start a GD object here"""
-    bl_label = "Geodesic Domes"
-    bl_region_type = "TOOLS" #UI possible too
-    bl_space_type = "VIEW_3D"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self,context):
-        sce = context.scene
-        layout = self.layout
-        col = layout.column()
-        col.label("To start an GD object: ")
-        col.operator(GenerateGeodesicDome.bl_idname,"execute me!")
-            
-class GenerateGeodesicDome(bpy.types.Operator):
-    bl_label = "Modify Geodesic Objects"
-    bl_idname = "mesh.generate_geodesic_dome"
-    bl_description = "Create object dependent on selection"
-    bl_options = {'REGISTER','UNDO'}
-
-#PKHG_NEW saving and loading parameters
-    save_parameters = BoolProperty(name = "save params",\
-           description = "activation save */tmp/GD_0.GD", default = False)
-    load_parameters  = BoolProperty(name = "load params",\
-           description = "read */tmp/GD_0.GD", default = False)
-
-    gd_help_text_width = IntProperty(name = "Text Width" , description = "The width above which the text wraps" , default = 60 , max = 180 , min = 20)
-
-    
-    mainpages = EnumProperty(
-    name="Menu",
-    description="Create Faces, Struts & Hubs",
-    items=[("Main","Main","Geodesic objects"),
-           ("Faces","Faces","Generate Faces"),
-           ("Struts","Struts","Generate Struts"),
-           ("Hubs","Hubs","Generate Hubs"),
-           ("Help","Help","Not implemented"),
-          ],
-    default='Main')
-
-#for Faces!
-    facetype_menu = EnumProperty(
-    name="Faces",
-    description="choose a facetype",
-    items=[("0","strip","strip"),
-           ("1","open vertical","vertical"),
-           ("2","opwn slanted","slanted"),
-           ("3","closed point","closed point"),
-           ("4","pillow","pillow"),
-           ("5","closed vertical","closed vertical"),
-           ("6","stepped","stepped"),
-           ("7","spikes","spikes"),
-           ("8","boxed","boxed"),
-           ("9","diamond","diamond"),
-           ("10","bar","bar"),
-          ],
-    default='0')
-
-    facetoggle = BoolProperty(name="Activate: Face Object", description = "Activate Faces for Geodesic object", default = False )
-#    faceimporttoggle = BoolProperty(name="faceimporttoggle", default = False )
-    face_use_imported_object = BoolProperty(name="Use: Imported Object",\
-                description = "Activate faces on your Imported object",	default = False)
-    facewidth = FloatProperty(name="facewidth", min = -8,   max = 8, default = .50)
-    fwtog = BoolProperty(name="fwtog", default = False )
-    faceheight = FloatProperty(name="faceheight", min = -8, max = 8, default = 1 )
-    fhtog = BoolProperty(name="fhtog", default = False )
-    face_detach = BoolProperty(name="face_detach", default = False )
-    fmeshname = StringProperty(name="fmeshname", default = "defaultface")
-
-
-    geodesic_types = EnumProperty(
-    name="Objects",
-    description="Choose Geodesic, Grid, Cylinder,Parabola, Torus, Sphere, Import your mesh or Superparameters",
-    items=[("Geodesic","Geodesic","Generate Geodesic"),
-           ("Grid","Grid","Generate Grid"),
-           ("Cylinder","Cylinder","Generate Cylinder"),
-           ("Parabola","Parabola","Generate Parabola"),
-           ("Torus","Torus","Generate Torus"),
-           ("Sphere","Sphere","Generate Sphere"),
-           ("Import your mesh","Import your mesh","Import Your Mesh"),
-          ],
-    default='Geodesic')
-
-    import_mesh_name = StringProperty(name = "mesh to import",\
-            description = "the name has to be the name of a meshobject", default = "None") 
-
-    base_type = EnumProperty(
-    name="Hedron",
-    description="Choose between Tetrahedron, Octahedron, Icosahedron ",
-    items=[("Tetrahedron","Tetrahedron","Generate Tetrahedron"),
-           ("Octahedron","Octahedron","Generate Octahedron"),
-           ("Icosahedron","Icosahedron","Generate Icosahedron"),
-          ],
-    default='Tetrahedron')
-
-    orientation = EnumProperty(
-    name="Point^",
-    description="Point (Vert), Edge or Face pointing upwards",
-    items=[("PointUp","PointUp","Point up"),
-           ("EdgeUp","EdgeUp","Edge up"),
-           ("FaceUp","FaceUp","Face up"),
-           ],
-    default='PointUp')
-
-    geodesic_class = EnumProperty(
-    name="Class",
-    description="Subdivide Basic/Triacon",
-    items=[("Class 1","Class 1","class one"),
-           ("Class 2","Class 2","class two"),
-           ],
-    default='Class 1')
-
-    tri_hex_star = EnumProperty(
-    name="Shape",
-    description="Choose between tri hex star face types",
-    items=[("tri","tri","tri faces"),
-           ("hex","hex","hex faces(by tri)"),
-           ("star","star","star faces(by tri)"),
-              ],
-    default='tri')
-
-    spherical_flat = EnumProperty(
-    name="Round",
-    description="Choose between spherical or flat ",
-    items=[("spherical","spherical","Generate spherical"),
-           ("flat","flat","Generate flat"),
-              ],
-    default='spherical')
-
-    use_imported_mesh = BoolProperty(name="use import",\
-                    description = "Use an imported mesh", default = False)
-
-#Cylinder
-    cyxres= IntProperty(name="Resolution x/y", min = 3, max = 32,\
-              description = "number of faces around x/y", default = 5 )
-    cyyres= IntProperty(name="Resolution z", min = 3, max = 32,\
-              description = "number of faces in z direction", default = 5 )
-    cyxsz= FloatProperty(name="Scale x/y", min = 0.01, max = 10,\
-	          description = "scale in x/y direction", default = 1 )
-    cyysz= FloatProperty(name="Scale z", min = 0.01, max = 10,\
-              description = "scale in z direction", default = 1 )    
-    cyxell= FloatProperty(name="Stretch x",  min = 0.001, max = 4,\
-              description = "stretch in x direction", default = 1 )
-    cygap= FloatProperty(name="Gap",  min = -2, max = 2, precision = 4,\
-              description = "shrink in % around radius", default = 1 )
-    cygphase= FloatProperty(name="Phase", min = -4, max = 4,\
-              description = "rotate around pivot x/y", default = 0 )
-#Parabola
-    paxres= IntProperty(name="Resolution x/y",  min = 3, max = 32,\
-           description = "number of faces around x/y", default = 5 )
-    payres= IntProperty(name="Resolution z",  min = 3, max = 32,\
-           description = "number of faces in z direction", default = 5 )
-    paxsz= FloatProperty(name="Scale x/y", min = 0.001, max = 10,\
-           description = "scale in x/y direction", default = 0.30)
-    paysz= FloatProperty(name="Scale z", min = 0.001, max = 10,\
-           description = "scale in z direction",	default = 1 )
-    paxell= FloatProperty(name="Stretch x", min = 0.001, max = 4,\
-           description = "stretch in x direction",	default = 1 )
-    pagap= FloatProperty(name="Gap", min = -2, max = 2,\
-           description = "shrink in % around radius", precision = 4, default = 1 )
-    pagphase= FloatProperty(name="Phase", min = -4, max = 4,\
-           description = "rotate around pivot x/y",	default = 0 )
-#Torus            
-    ures= IntProperty(name="Resolution x/y",min = 3, max = 32,\
-           description = "number of faces around x/y", default = 8 )
-    vres= IntProperty(name="Resolution z", min = 3, max = 32,\
-            description = "number of faces in z direction", default = 8 )
-    urad= FloatProperty(name="Radius x/y", min = 0.001, max = 10,\
-            description = "radius in x/y plane",	default = 1 )
-    vrad= FloatProperty(name="Radius z", min = 0.001, max = 10,\
-            description = "radius in z plane",	default = 0.250)
-    uellipse= FloatProperty(name="Stretch x", min = 0.001, max = 10,\
-            description = "number of faces in z direction",	default = 1 )
-    vellipse= FloatProperty(name="Stretch z", min = 0.001, max = 10,\
-            description = "number of faces in z direction",	default = 1 )
-    upart= FloatProperty(name="Gap x/y", min = -4, max = 4, precision = 4,\
-            description = "shrink faces around x/y",	default = 1 )
-    vpart= FloatProperty(name="Gap z", min = -4, max = 4,  precision = 4,\
-            description = "shrink faces in z direction",	default = 1 )
-    ugap= FloatProperty(name="Phase x/y",  min = -4, max = 4, precision = 4,\
-           description = "rotate around pivot x/y", default = 0 )
-    vgap= FloatProperty(name="Phase z",  min = -4, max = 4, precision = 4,\
-           description = "rotate around pivot z", default = 0 )
-    uphase= FloatProperty(name="uphase", min = -4, max = 4,\
-            description = "number of faces in z direction",	default = 0 )
-    vphase= FloatProperty(name="vphase",  min = -4, max = 4,\
-            description = "number of faces in z direction",	default = 0 )
-    uexp= FloatProperty(name="uexp",  min = -4, max = 4,\
-            description = "number of faces in z direction",	default = 0 )
-    vexp= FloatProperty(name="vexp",  min = -4, max = 4,\
-            description = "number of faces in z direction",	default = 0 )
-    usuper= FloatProperty(name="usuper", min = -4, max = 4,\
-           description = "first set of superform parameters",  default = 2 )
-    vsuper= FloatProperty(name="vsuper",  min = -4, max = 4,\
-            description = "second set of superform parameters", default = 2 )
-    utwist= FloatProperty(name="Twist x/y", min = -4, max = 4,\
-            description = " use with superformular u",	default = 0 )
-    vtwist= FloatProperty(name="Twist z", min = -4, max = 4,\
-            description = "use with superformular v",	default = 0 )
-
-#Sphere 
-    bures= IntProperty(name="Resolution x/y", min = 3, max = 32,\
-            description = "number of faces around x/y",	default = 8 )
-    bvres= IntProperty(name="Resolution z", min = 3, max = 32,\
-            description = "number of faces in z direction",	default = 8 )
-    burad= FloatProperty(name="Radius",  min = -4, max = 4,\
-            description = "overall radius",	default = 1 )
-    bupart= FloatProperty(name="Gap x/y", min = -4, max = 4, precision = 4,\
-            description = "shrink faces around x/y",	default = 1 )
-    bvpart= FloatProperty(name="Gap z", min = -4, max = 4, precision = 4,\
-            description = "shrink faces in z direction",	default = 1 )
-    buphase= FloatProperty(name="Phase x/y",  min = -4, max = 4,
-            description = "rotate around pivot x/y",	default = 0 )
-    bvphase= FloatProperty(name="Phase z", min = -4, max = 4,\
-            description = "rotate around pivot z",	default = 0 )
-    buellipse= FloatProperty(name="Stretch x", min = 0.001, max = 4,\
-            description = "stretch in the x direction",	default = 1 )
-    bvellipse= FloatProperty(name="Stretch z", min = 0.001, max = 4,\
-            description = "stretch in the z direction",	default = 1 )
-#Grid    
-    grxres = IntProperty(name="Resolution x", min = 2, soft_max = 10, max = 20,\
-                         description = "number of faces in x direction", default = 5 )
-    gryres = IntProperty(name="Resolution z",min = 2, soft_min = 2, soft_max=10, max = 20,\
-                         description = "number of faces in x direction", default = 2)
-    grxsz = FloatProperty(name = "X size", min = 1, soft_min=0.01, soft_max=5, max = 10,\
-                         description = "x size", default = 2.0)
-    grysz = FloatProperty(name="Y size",min = 1, soft_min=0.01, soft_max=5, max = 10,\
-                         description = "y size", default = 1.0)
-
-#PKHG_TODO_??? what means cart
-    cart = IntProperty(name = "cart",min = 0, max = 2,  default = 0)
-                         
-    frequency = IntProperty(name="Frequency", min = 1, max = 8,\
-                           description ="subdivide base triangles", default = 1 )
-    eccentricity = FloatProperty(name = "Eccentricity",  min = 0.01 , max = 4,\
-                 description = "scaling in x/y dimension", default = 1 )
-    squish = FloatProperty(name = "Squish",min = 0.01, soft_max = 4, max = 10,\
-                 description = "scaling in z dimension",  default = 1 )
-    radius = FloatProperty(name = "Radius",min = 0.01, soft_max = 4, max = 10,\
-                 description = "overall radius",  default = 1 )
-    squareness = FloatProperty(name="Square x/y", min = 0.1, max = 5,\
-                 description = "superelipse action in x/y", default = 2 )
-    squarez = FloatProperty(name="Square z", min = 0.1, soft_max = 5, max = 10,\
-                 description = "superelipse action in z", default = 2 )
-    baselevel = IntProperty(name="baselevel", default = 5 )
-    dual = BoolProperty(name="Dual", description = "faces become verts, verts become faces, edges flip", default = False)
-    rotxy = FloatProperty(name="Rotate x/y", min= -4, max = 4,\
-                 description = "rotate superelipse action in x/y", default = 0 )
-    rotz = FloatProperty(name="Rotate z",  min= -4, max = 4,\
-                 description = "rotate superelipse action in z", default = 0 )
-
-#for choice of superformula
-    uact = BoolProperty(name = 'superformula u (x/y)', description = "activate superformula u parameters", default = False)
-    vact = BoolProperty(name = 'superformula v (z)', description = "activate superformula v parameters", default = False)
-    um = FloatProperty(name = 'um', min = 0, soft_min=0.1, soft_max = 10, max = 20,\
-                 description = "to do",	default =  3)
-    un1 = FloatProperty(name = 'un1', min = 0, soft_min=0.1, soft_max = 10,max = 20,\
-                 description = "to do",	default =  1)
-    un2 = FloatProperty(name = 'un2', min = 0, soft_min=0.1, soft_max = 10,max = 20,\
-                 description = "to do",	default =  1)
-    un3 = FloatProperty(name = 'un3', min = 0,   soft_min=0.1, soft_max = 10, max = 20,\
-                 description = "to do",	default =  1)
-    ua = FloatProperty(name = 'ua', min = 0.01, soft_min=0.1, soft_max = 8, max = 16,\
-                 description = "semi-diameter (has both soft pars!)", default =  1.0)
-    ub = FloatProperty(name = 'ub', min = 0.01, soft_min = 0.1, soft_max = 8, max = 16,\
-                 description = "semi-diameter  (has both soft pars!)", default =  1.0)
-    vm = FloatProperty(name = 'vm', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-    vn1 = FloatProperty(name = 'vn1', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-    vn2 = FloatProperty(name = 'vn2', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-    vn3 = FloatProperty(name = 'vn3', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-    va = FloatProperty(name = 'va', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-    vb = FloatProperty(name = 'vb', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  1)
-
-    uturn = FloatProperty(name = 'uturn', min = -5, soft_min=0, soft_max=5,max = 10,\
-                 description = "to do",	default =  0)
-    vturn = FloatProperty(name = 'vturn', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  0)
-    utwist = FloatProperty(name = 'utwist', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  0)
-    vtwist = FloatProperty(name = 'vtwist', min = 0, soft_min=0.1, soft_max=5,max = 10,\
-                 description = "to do",	default =  0)
-
-#Strut
-    struttype= IntProperty(name="struttype", default= 0)
-    struttoggle = BoolProperty(name="struttoggle", default = False )
-    strutimporttoggle= BoolProperty(name="strutimporttoggle", default = False )
-    strutimpmesh= StringProperty(name="strutimpmesh", default = "None")
-    strutwidth= FloatProperty(name="strutwidth", min = -10, soft_min = 5, soft_max = 5, max = 10, default = 1 )
-    swtog= BoolProperty(name="swtog", default = False )
-    strutheight= FloatProperty(name="strutheight", min = -5, soft_min = -1, soft_max = 5, max = 10, default = 1 )
-    shtog= BoolProperty(name="shtog", default = False )
-    strutshrink= FloatProperty(name="strutshrink", min = 0.001, max = 4, default = 1 )
-    sstog= BoolProperty(name="sstog", default = False )
-    stretch= FloatProperty(name="stretch",  min= -4, max = 4, default = 1.0 )
-    lift= FloatProperty(name="lift", min = 0.001, max = 10, default = 0 )
-    smeshname= StringProperty(name="smeshname", default = "defaultstrut")
-
-#Hubs
-    hubtype = BoolProperty(name ="hubtype", description = "not used", default = True )
-    hubtoggle = BoolProperty(name ="hubtoggle", default = False )
-    hubimporttoggle = BoolProperty(name="new import", description = "import a mesh", default = False )
-    hubimpmesh = StringProperty(name="hubimpmesh",\
-                 description = "name of mesh to import",  default = "None")
-    hubwidth = FloatProperty(name="hubwidth", min = 0.01, max = 10,\
-                 default = 1 )
-    hwtog = BoolProperty(name="hwtog", default = False )
-    hubheight = FloatProperty(name="hubheight", min = 0.01, max = 10,\
-                 default = 1 )
-    hhtog = BoolProperty(name="hhtog", default = False )
-    hublength = FloatProperty(name ="hublength", min  = 0.1, max  = 10,\
-                 default  = 1 )
-    hstog= BoolProperty(name="hstog", default = False )
-    hmeshname= StringProperty(name="hmeshname", description = "Name of an existing mesh needed!", default = "None")
-
-    name_list = ['facetype_menu','facetoggle','face_use_imported_object',
-'facewidth','fwtog','faceheight','fhtog',
-'face_detach','fmeshname','geodesic_types','import_mesh_name',
-'base_type','orientation','geodesic_class','tri_hex_star',
-'spherical_flat','use_imported_mesh','cyxres','cyyres',
-'cyxsz','cyysz','cyxell','cygap',
-'cygphase','paxres','payres','paxsz',
-'paysz','paxell','pagap','pagphase',
-'ures','vres','urad','vrad',
-'uellipse','vellipse','upart','vpart',
-'ugap','vgap','uphase','vphase',
-'uexp','vexp','usuper','vsuper',
-'utwist','vtwist','bures','bvres',
-'burad','bupart','bvpart','buphase',
-'bvphase','buellipse','bvellipse','grxres',
-'gryres','grxsz','grysz',
-'cart','frequency','eccentricity','squish',
-'radius','squareness','squarez','baselevel',
-'dual','rotxy','rotz',
-'uact','vact','um','un1',
-'un2','un3','ua','ub',
-'vm','vn1','vn2','vn3',
-'va','vb','uturn','vturn',
-'utwist','vtwist','struttype','struttoggle',
-'strutimporttoggle','strutimpmesh','strutwidth','swtog',
-'strutheight','shtog','strutshrink','sstog',
-'stretch','lift','smeshname','hubtype',
-'hubtoggle','hubimporttoggle','hubimpmesh','hubwidth',
-'hwtog','hubheight','hhtog','hublength',
-'hstog','hmeshname']    
-
-    def write_params(self,filename):
-        file = open(filename, "w", encoding="utf8", newline="\n")
-        fw = file.write
-    #for Faces!
-        for el in self.name_list:
-            fw(el + ",")
-            fw(repr(getattr(self,el)))
-            fw(",\n")
-        file.close()
-
-    def read_file(self,filename):
-        file = open(filename, "r", newline="\n")
-        result = []
-        line = file.readline()
-        while(line):
-            tmp = line.split(",")
-            result.append(eval(tmp[1]))
-            line = file.readline()
-        return result
-    
-
-    def draw(self,context):
-        sce = context.scene
-        layout = self.layout
-        row = layout.row()
-        row.prop(self,"save_parameters")
-        row.prop(self,"load_parameters")
-        col = layout.column()
-        col.label(" ")
-        col.prop(self,"mainpages")
-        which_mainpages = self.mainpages
-        if which_mainpages == 'Main':
-            col = layout.column()
-            col.prop(self,"geodesic_types")
-            tmp = self.geodesic_types
-            if tmp == "Geodesic":
-                col.label(text="Geodesic Object Types:")
-                col.prop(self, "geodesic_class")                
-                col.prop(self, "base_type")
-                col.prop(self, "orientation")
-                col.prop(self, "tri_hex_star")
-                col.prop(self, "spherical_flat")
-                col.label("Geodesic Object Parameters:")
-                row = layout.row()
-                row.prop(self,"frequency")
-                row = layout.row()
-                row.prop(self,"radius")
-                row = layout.row()
-                row.prop(self,"eccentricity")
-                row = layout.row()
-                row.prop(self,"squish")
-                row = layout.row()
-                row.prop(self,"squareness")
-                row = layout.row()
-                row.prop(self,"squarez")
-                row = layout.row()
-                row.prop(self,"rotxy")
-                row = layout.row()
-                row.prop(self,"rotz")
-                row = layout.row()
-                row.prop(self,"dual")
-            elif tmp == 'Torus':
-                col.label("Torus Parameters")
-                row = layout.row()
-                row.prop(self, "ures")
-                row = layout.row()
-                row.prop(self, "vres")
-                row = layout.row()
-                row.prop(self, "urad")
-                row = layout.row()
-                row.prop(self, "vrad")
-                row = layout.row()
-                row.prop(self, "uellipse")
-                row = layout.row()
-                row.prop(self, "vellipse")
-                row = layout.row()
-                row.prop(self, "upart")
-                row = layout.row()
-                row.prop(self, "vpart")
-                row = layout.row()
-                row.prop(self, "ugap")
-                row.prop(self, "vgap")
-                row = layout.row()
-                row.prop(self, "uphase")
-                row.prop(self, "vphase")
-                row = layout.row()
-                row.prop(self, "uexp")
-                row.prop(self, "vexp")
-                row = layout.row()
-                row.prop(self, "usuper")
-                row.prop(self, "vsuper")
-                row = layout.row()
-                row.prop(self, "vgap")
-                row = layout.row()
-            elif tmp == 'Sphere':
-                col.label("Sphere Parameters")
-                row = layout.row()
-                row.prop(self,"bures")
-                row = layout.row()
-                row.prop(self,"bvres")
-                row = layout.row()
-                row.prop(self,"burad")
-                row = layout.row()                
-                row.prop(self,"bupart")
-                row = layout.row()
-                row.prop(self,"buphase")
-                row = layout.row()
-                row.prop(self,"bvpart")
-                row = layout.row()
-                row.prop(self,"bvphase")
-                row = layout.row()
-                row.prop(self,"buellipse")
-                row = layout.row()
-                row.prop(self,"bvellipse")
-            elif tmp == 'Parabola':
-                col.label("Parabola Parameters")
-                row = layout.row()
-                row.prop(self, "paxres")
-                row = layout.row()
-                row.prop(self, "payres")
-                row = layout.row()
-                row.prop(self, "paxsz")
-                row = layout.row()
-                row.prop(self, "paysz")
-                row = layout.row()
-                row.prop(self, "paxell")
-                row = layout.row()
-                row.prop(self, "pagap")
-                row = layout.row()
-                row.prop(self, "pagphase")
-            elif tmp == 'Cylinder':
-                col.label("Cylinder Parameters")
-                col.prop(self, "cyxres")
-                col.prop(self, "cyyres")
-                col.prop(self, "cyxsz")
-                col.prop(self, "cyysz")
-                col.prop(self, "cyxell")
-                col.prop(self, "cygap")
-                col.prop(self, "cygphase")
-            elif tmp == 'Grid':
-                col.label("Grid Parameters")
-                row = layout.row()
-                row.prop(self, "grxres")
-                row = layout.row()
-                row.prop(self, "gryres")
-                row = layout.row()
-                row.prop(self, "grxsz")
-                row = layout.row()
-                row.prop(self, "grysz")
-            elif tmp == 'Import your mesh':
-                col.prop(self,"use_imported_mesh")
-                col.prop(self, "import_mesh_name")
-#######superform parameters only where possible
-            row = layout.row()
-            row.prop(self,"uact")
-            row = layout.row()
-            row.prop(self,"vact")                
-            row = layout.row()
-            if not(tmp == 'Import your mesh'):
-                if (self.uact == False) and (self.vact == False):
-                    row.label("no checkbox active!")
-                else:
-                    row.label("Superform Parameters")
-                if self.uact:
-                    row = layout.row()
-                    row.prop(self,"um")
-                    row = layout.row()
-                    row.prop(self,"un1")
-                    row = layout.row()
-                    row.prop(self,"un2")
-                    row = layout.row()
-                    row.prop(self,"un3")
-                    row = layout.row()
-                    row.prop(self,"ua")
-                    row = layout.row()
-                    row.prop(self,"ub")
-                    row = layout.row()
-                    row.prop(self,"uturn")
-                    row = layout.row()
-                    row.prop(self,"utwist")
-                if self.vact:
-                    row = layout.row()
-                    row.prop(self,"vm")
-                    row = layout.row()
-                    row.prop(self,"vn1")
-                    row = layout.row()
-                    row.prop(self,"vn2")
-                    row = layout.row()
-                    row.prop(self,"vn3")
-                    row = layout.row()
-                    row.prop(self,"va")
-                    row = layout.row()
-                    row.prop(self,"vb")
-                    row = layout.row()
-                    row.prop(self,"vturn")
-                    row = layout.row()
-                    row.prop(self,"vtwist")                
-########einde superfo
-        elif  which_mainpages == "Hubs":
-            row = layout.row()
-            row.prop(self, "hubtoggle")
-#PKHG_NOT_USDED_YET_24-11            row.prop(self, "hubtype")
-            row = layout.row()            
-#25-11 not needed            row.prop(self, "hubimporttoggle")
-            row = layout.row()
-            if self.hubimpmesh == "None":
-                row = layout.row()
-                row.label("name of a hub to use")
-                row = layout.row()
-            row.prop(self, "hubimpmesh")
-            row = layout.row()
-            if self.hmeshname == "None":
-                row = layout.row()
-                row.label("name of mesh to be filled in!")
-                row = layout.row()
-            row.prop(self,"hmeshname")
-            row = layout.row()
-            row.prop(self, "hwtog")
-            if self.hwtog:
-                row.prop(self, "hubwidth")
-            row = layout.row()
-            row.prop(self, "hhtog")
-            if self.hhtog:
-                row.prop(self, "hubheight")
-            row = layout.row()
-            row.prop(self, "hublength")                
-        elif which_mainpages == "Struts":
-            row = layout.row()
-#            row.prop(self, "struttype")
-            row.prop(self, "struttoggle")
-#            row = layout.row()            
-#            row.prop(self, "strutimporttoggle")
-            row = layout.row()            
-            row.prop(self, "strutimpmesh")
-            row = layout.row()
-            row.prop(self, "swtog")
-            if self.swtog:
-                row.prop(self, "strutwidth")
-            row = layout.row()
-            row.prop(self, "shtog")
-            if self.shtog:
-                row.prop(self, "strutheight")
-            row = layout.row()
-            row.prop(self, "sstog")
-            if self.sstog:
-               row.prop(self, "strutshrink")
-            row = layout.row()               
-            row.prop(self, "stretch")
-            row = layout.row()            
-            row.prop(self, "lift")
-            row = layout.row()            
-            row.prop(self, "smeshname")
-        elif which_mainpages == "Faces":
-            row = layout.row()
-            row.prop(self,"facetoggle")
-            row = layout.row()
-            row.prop(self,"face_use_imported_object")
-            row = layout.row()
-            row.prop(self,"facetype_menu")
-            row = layout.row()
-            row.prop(self,"fwtog")
-            if self.fwtog:
-                row.prop(self,"facewidth")
-            row = layout.row()
-            row.prop(self,"fhtog")
-            if self.fhtog:
-                row.prop(self,"faceheight")
-            row = layout.row()
-            row.prop(self,"face_detach")
-            row = layout.row()
-            row.prop(self,"fmeshname")
-            row = layout.row()
-        
-        #help menu GUI
-        elif which_mainpages == "Help":
-            import textwrap
-
-            # a function that allows for multiple labels with text that wraps
-            # you can allow the user to set where the text wraps with the 
-            # text_width parameter
-            # other parameters are ui : here you usually pass layout
-            # text: is a list with each index representing a line of text
-            
-            def multi_label(text, ui,text_width=120):
-                for x in range(0,len(text)):
-                    el = textwrap.wrap(text[x], width = text_width )
-            
-                    for y in range(0,len(el)):
-                        ui.label(text=el[y])
-
-            box = layout.box() 
-            help_text = ["NEW! ", 
-                "New facility: save or load (nearly all) parameters ",
-                 "A file GD_0.GD will be used, living in: ",
-                 "geodesic_domes/tmp ",
-                 "and if possible two backups "
-                 "--------",
-                 "After loading you have to change a ",
-                 "parameter back and forth "
-                 "to see it"]
-            text_width = self.gd_help_text_width
-            box.prop(self,"gd_help_text_width",slider=True)
-            multi_label(help_text,box, text_width)
-
-    def execute(self, context):
-        global last_generated_object, last_imported_mesh, basegeodesic, imported_hubmesh_to_use 
-        #default superformparam = [3, 10, 10, 10, 1, 1, 4, 10, 10, 10, 1, 1, 0, 0, 0.0, 0.0, 0, 0]]
-        superformparam = [self.um, self.un1, self.un2, self.un3, self.ua,\
-                          self.ub, self.vm, self.vn1, self.vn2, self.vn3,\
-                          self.va, self.vb, self.uact, self.vact,\
-                          self.uturn*pi, self.vturn*pi, \
-                          self.utwist, self.vtwist]
-        context.scene.error_message = "" 
-        if self.mainpages == 'Main':
-            if self.geodesic_types == "Geodesic":
-                tmp_fs = self.tri_hex_star
-                faceshape = 0 # tri!
-                if tmp_fs == "hex":
-                    faceshape = 1
-                elif tmp_fs == "star":
-                    faceshape = 2
-                tmp_cl = self.geodesic_class
-                klass = 0
-                if tmp_cl == "Class 2":
-                    klass = 1
-                shape = 0 
-                parameters = [self.frequency, self.eccentricity, self.squish,\
-                          self.radius, self.squareness, self.squarez, 0,\
-                          shape, self.baselevel, faceshape, self.dual,\
-                          self.rotxy, self.rotz, klass, superformparam]               
-                basegeodesic =  creategeo(self.base_type,self.orientation,parameters)
-                basegeodesic.makegeodesic()
-                basegeodesic.connectivity()
-                mesh = vefm_259.mesh()                
-                vefm_259.finalfill(basegeodesic,mesh) #always! for hexifiy etc. necessarry!!!                     
-                vefm_259.vefm_add_object(mesh)
-                last_generated_object = context.active_object
-                last_generated_object.location  = (0,0,0)
-                context.scene.objects.active = last_generated_object            
-            elif self.geodesic_types == 'Grid':
-                basegeodesic = forms_259.grid(self.grxres,self.gryres,\
-                       self.grxsz,self.grysz,1.0,1.0,0,0,0,\
-                                      0,1.0,1.0,superformparam)
-                vefm_259.vefm_add_object(basegeodesic)
-                bpy.data.objects[-1].location = (0,0,0)
-            elif self.geodesic_types == "Cylinder":
-                basegeodesic = forms_259.cylinder(self.cyxres, self.cyyres, \
-                                   self.cyxsz, self.cyysz, self.cygap, \
-                                   1.0, self.cygphase, 0, 0, 0, self.cyxell,\
-                                   1.0, superformparam)
-                vefm_259.vefm_add_object(basegeodesic)
-                bpy.data.objects[-1].location = (0,0,0)                
-                
-            elif self.geodesic_types == "Parabola":
-                basegeodesic=forms_259.parabola(self.paxres, self.payres,\
-                    self.paxsz, self.paysz, self.pagap,1.0, self.pagphase,\
-                    0,0,0, self.paxell,1.0,superformparam)
-                vefm_259.vefm_add_object(basegeodesic)
-                bpy.data.objects[-1].location = (0,0,0)                
-            elif self.geodesic_types == "Torus":
-                basegeodesic = forms_259.torus(self.ures, self.vres,\
-                       self.vrad, self.urad, self.upart, self.vpart,\
-                       self.ugap, self.vgap,0,0, self.uellipse,\
-                       self.vellipse, superformparam)
-                vefm_259.vefm_add_object(basegeodesic)
-                bpy.data.objects[-1].location = (0,0,0)
-            elif self.geodesic_types == "Sphere":
-                basegeodesic=forms_259.sphere(self.bures, self.bvres,\
-                        self.burad,1.0, self.bupart, self.bvpart,\
-                        self.buphase, self.bvphase,0,0, self.buellipse,\
-                        self.bvellipse,superformparam)	
-
-                vefm_259.vefm_add_object(basegeodesic)
-                bpy.data.objects[-1].location = (0,0,0)                
-            elif self.geodesic_types == "Import your mesh":
-                obj_name = self.import_mesh_name
-                if obj_name == "None":
-                    message = "fill in a name \nof an existing mesh\nto be imported"
-                    context.scene.error_message = message
-                    self.report({'INFO'}, message)
-                    print("***INFO*** you have to fill in the name of an existing mesh")
-                else:
-#                    obj_in_scene = context.objects
-                    names = [el.name for el in context.scene.objects]
-                    if obj_name in names and context.scene.objects[obj_name].type == "MESH":
-                        obj = context.scene.objects[obj_name]
-#                        if obj.type == "MESH":                        
-                        your_obj = vefm_259.importmesh(obj.name,False)
-                        last_imported_mesh = your_obj
-                        vefm_259.vefm_add_object(your_obj)
-                        last_generated_object = bpy.context.active_object
-                        last_generated_object.name ="Imported mesh"
-                        bpy.context.active_object.location = (0,0,0)
-                    else:
-                        message = obj_name +" does not exist \nor is not a MESH"
-                        context.scene.error_message = message                
-                        bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-                        self.report({'ERROR'}, message)
-                        print("***ERROR***" + obj_name +" does not exist or is not a MESH")
-        elif self.mainpages == "Hubs":
-            hubtype = self.hubtype
-            hubtoggle =  self.hubtoggle
-            hubimporttoggle = self.hubimporttoggle
-            hubimpmesh = self.hubimpmesh
-            hubwidth = self.hubwidth
-            hwtog = self.hwtog
-            hubheight = self.hubheight
-            hhtog = self.hhtog
-            hublength = self.hublength
-            hstog =  self.hstog
-            hmeshname=  self.hmeshname
-#PKHG_TODO_27-11 better info!??
-            if not (hmeshname == "None") and not (hubimpmesh == "None") and  hubtoggle:                
-                try:                    
-                    hub_obj = vefm_259.importmesh(hmeshname,0)
-                    hub = vefm_259.hub(hub_obj, True,\
-                            hubwidth, hubheight, hublength,\
-                              hwtog, hhtog, hstog, hubimpmesh)
-                    mesh = vefm_259.mesh("test")
-                    vefm_259.finalfill(hub,mesh)
-                    vefm_259.vefm_add_object(mesh)
-                    bpy.data.objects[-1].location = (0,0,0)
-                except:
-                    message = "***ERROR*** \neither no mesh for hub\nor " + hmeshname +  " available"                    
-                    context.scene.error_message = message
-                    bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-                    print(message)                
-            else:
-                message = "***INFO***\nuse the hub toggle!"
-                context.scene.error_message = message
-                print("\n***INFO*** use the hub toggle!")
-        elif self.mainpages == "Struts":
-            struttype = self.struttype
-            struttoggle = self.struttoggle
-            strutimporttoggle = self.strutimporttoggle
-            strutimpmesh = self.strutimpmesh
-            strutwidth = self.strutwidth
-            swtog = self.swtog
-            strutheight = self.strutheight
-            shtog = self.shtog
-            strutshrink = self.strutshrink
-            sstog = self.sstog
-            stretch = self.stretch
-            lift = self.lift
-            smeshname = self.smeshname
-            if not (strutimpmesh == "None") and struttoggle:
-                names = [el.name for el in context.scene.objects]
-                if strutimpmesh in names and context.scene.objects[strutimpmesh].type == "MESH":
-                    strut = vefm_259.strut(basegeodesic, struttype,strutwidth,strutheight,stretch,swtog,shtog,swtog,strutimpmesh,sstog,lift)
-                    strutmesh = vefm_259.mesh()
-                    vefm_259.finalfill(strut,strutmesh)
-                    vefm_259.vefm_add_object(strutmesh)
-                    last_generated_object = context.active_object
-                    last_generated_object.name = smeshname
-                    last_generated_object.location  = (0,0,0)
-                else:
-                    message = "***ERROR***\n" + strutimpmesh + "\nis not a MESH"
-                    context.scene.error_message = message
-                    bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-                    print("***ERROR*** strut obj is not a MESH")
-            else:
-                vefm_259.vefm_add_object(basegeodesic)
-        elif self.mainpages == "Faces":
-            if self.facetoggle:
-                faceparams=[[self.face_detach,0,[[0.5,0.0]]], #0 strip
-                            [self.face_detach,0,[[0.0,0.5]]], #1 vertical
-                            [self.face_detach,0,[[0.5,0.5]]], #2 slanted
-                            [self.face_detach,1,[[0.25,0.25],[0.5,0.5]]], #3 closed point
-                            [self.face_detach,1,[[0.1,0.03],[0.33,0.06],[0.0,0.1]]], #4 pillow
-                            [self.face_detach,2,[[0.0,0.5]]], #5 closed vertical
-                            [self.face_detach,2,[[0.0,0.25],[0.25,0.25],[0.25,0.5]]], #6 stepped
-                            [self.face_detach,1,[[0.2,0.1],[0.4,0.2],[0.0,1.0]]], #7 spikes
-                            [self.face_detach,3,[[0.25,0.0],[0.25,0.5],[0.0,0.5]]], #8 boxed 
-                            [self.face_detach,3,[[0.25,0.5],[0.5,0.0],[0.25,-0.5]]], #9 diamond
-                            [self.face_detach,4,[[0.5,0.0],[0.5,0.5],[0.0,0.5]]],] #10 bar
-                facedata = faceparams[int(self.facetype_menu)]
-                if not self.face_use_imported_object:
-                    faceobject = vefm_259.facetype(basegeodesic,facedata,self.facewidth,self.faceheight,self.fwtog)
-                else:
-                    if last_imported_mesh: 
-                        faceobject = vefm_259.facetype(last_imported_mesh, facedata,self.facewidth,self.faceheight,self.fwtog)
-                    else:
-                        message = "***ERROR***\nno imported message available\n" + "last geodesic used"
-                        self.face_use_imported_object = False
-                        context.scene.error_message = message
-                        bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-                        print("\n***ERROR*** no imported mesh available")
-                        print("last geodesic used!")
-                        faceobject = vefm_259.facetype(basegeodesic,facedata,\
-                                     self.facewidth,self.faceheight,self.fwtog)
-                facemesh = vefm_259.mesh()
-                finalfill(faceobject,facemesh)
-
-                vefm_259.vefm_add_object(facemesh)
-                obj = bpy.data.objects[-1]
-                obj.name = self.fmeshname
-                obj.location = (0,0,0)
-#PKHG save or load (nearly) all parameters                
-        if self.save_parameters:
-            self.save_parameters = False
-            try:
-                print("DBG L884")
-                message = ""
-                scriptpath = bpy.utils.script_paths()[0]
-                sep = os.path.sep
-                tmpdir = os.path.join(scriptpath,"addons", "geodesic_domes" , "tmp")
-#scriptpath + sep + "addons" + sep + "geodesic_domes" + sep + "tmp"
-                print("tmpdirL890 = ",tmpdir)
-                if not os.path.isdir(tmpdir):
-                    message += "***ERROR***\n" + tmpdir + "\nnot (yet) available\n"
-                    print(message)
-                else:
-                    filename = tmpdir + sep + "GD_0.GD"
-                    filename_ren = tmpdir + sep + "GD_0.GD.bak"
-                    filename_ren2 = tmpdir + sep + "GD_0.GD.2bak"
-                    if os.path.isfile(filename_ren2):
-                        try:
-                            os.remove(filename_ren2)
-                            message = "***Info***\nGD_0.GD.2bak removed\n"
-                        except:
-                            message = "***ERROR***\n,GD_0.GD.2bak could not be removed\n"
-                        print(message)
-                    if os.path.isfile(filename_ren):
-                        try:
-                            os.rename(filename_ren,filename_ren2)
-                            message += "***INFO***\nGD_0.GD.bak renamed into GD_0.GD.2bak\n"
-                        except:
-                            message += "***Info***\nrenaming GD_0.GD.bak not possible\n"
-                    if os.path.isfile(filename):
-                        try:
-                            os.rename(filename,filename_ren)
-                            message += "***INFO***\nGD_0.GD renamed into GD_0.GD.bak\n"
-                        except:
-                            message += "***ERROR***\ncreation of GD_0.GD.bak not possible\n"
-                    try:
-                        print("DBG L921")
-                        self.write_params(filename)
-                        message += "***OK***\nparameters saved in\n" + filename
-                        print(message)
-                    except:
-                        message = "***ERRROR***\n" + "writing " + filename + "\nnot possible"
-                        print(message)                 
-            except:
-                
-                message += "***ERROR***\n Contakt PKHG, something wrong happened"
-                print(message)
-                
-            context.scene.error_message = message
-            bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-
-        if self.load_parameters:
-            self.load_parameters = False
-            try:
-                scriptpath = bpy.utils.script_paths()[0]
-                sep = os.path.sep
-                tmpdir = os.path.join(scriptpath,"addons", "geodesic_domes" , "tmp")
-#scriptpath + sep + "addons" + sep + "geodesic_domes" + sep + "tmp"                              
-                if not os.path.isdir(tmpdir):
-                    message = "***ERROR***\n" + tmpdir + "\nnot available"  
-                    print(message)
-                filename = tmpdir + sep + "GD_0.GD"
-#        self.read_file(filename)
-                try:
-                    res = self.read_file(filename)
-                    for i,el in enumerate(self.name_list):
-                        setattr(self,el,res[i])
-                        
-                    message = "***OK***\nparameters read from\n" + filename
-                    print(message)
-                    
-                except:
-                    message = "***ERRROR***\n" + "writing " + filename + "\nnot possible"
-                #bpy.context.scene.instant_filenames = filenames
-                
-            except:
-                message = "***ERROR***\n Contakt PKHG,\nsomething went wrong reading params happened"
-            context.scene.error_message = message
-            bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
-        return {'FINISHED'}
-    
-    def invoke(self, context, event):
-        global basegeodesic
-        bpy.ops.view3d.snap_cursor_to_center()
-        tmp = context.scene.geodesic_not_yet_called
-        if tmp:            
-            context.scene.geodesic_not_yet_called = False
-        self.execute(context)
-        return {'FINISHED'}
-
-def creategeo(polytype,orientation,parameters):
-    geo = None
-    if polytype == "Tetrahedron":
-        if orientation == "PointUp":
-            geo = geodesic_classes_259.tetrahedron(parameters)
-        elif orientation == "EdgeUp":
-            geo=geodesic_classes_259.tetraedge(parameters)
-        elif orientation == "FaceUp":
-            geo=geodesic_classes_259.tetraface(parameters)
-    elif polytype == "Octahedron": 
-        if orientation == "PointUp":
-            geo=geodesic_classes_259.octahedron(parameters)
-        elif orientation == "EdgeUp":
-            geo=geodesic_classes_259.octaedge(parameters)
-        elif orientation == "FaceUp":
-            geo=geodesic_classes_259.octaface(parameters)
-    elif polytype == "Icosahedron":
-        if orientation == "PointUp":
-            geo=geodesic_classes_259.icosahedron(parameters)
-        elif orientation == "EdgeUp":
-            geo=geodesic_classes_259.icoedge(parameters)
-        elif orientation == "FaceUp":
-            geo=geodesic_classes_259.icoface(parameters)
-    return geo
-    
-basegeodesic,fmeshname,smeshname,hmeshname,outputmeshname,strutimpmesh,hubimpmesh = [None]*7
-
-def finalfill(source,target):
-    count=0
-    for point in source.verts:
-        newvert = vefm_259.vertex(point.vector)
-        target.verts.append(newvert)
-        point.index = count
-        count  += 1 
-    for facey in source.faces:
-        row=len(facey.vertices)
-        if row >= 5:
-            newvert = vefm_259.average(facey.vertices).centroid()
-            centre = vefm_259.vertex(newvert.vector)
-            target.verts.append(centre)
-            for i in range(row):
-                if i == row - 1:
-                    a = target.verts[facey.vertices[-1].index]
-                    b = target.verts[facey.vertices[0].index]
-                else:
-                    a = target.verts[facey.vertices[i].index]
-                    b = target.verts[facey.vertices[i+1].index]
-                c = centre
-                f = [a,b,c]
-                target.faces.append(f)
-        else:
-            f = []
-            for j in range(len(facey.vertices)):
-
-                a = facey.vertices[j]
-                f.append(target.verts[a.index])
-            target.faces.append(f)
-        
-###for error messages         
-class DialogOperator(bpy.types.Operator):
-    bl_idname = "object.dialog_operator"
-    bl_label = "INFO"
-
-    def draw(self,context):
-        layout = self.layout
-        message = context.scene.error_message
-        col = layout.column()
-        tmp = message.split("\n")
-        for el in tmp:
-            col.label(el)
-        
-    def execute(self, context):
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        return wm.invoke_props_dialog(self)
-            
-
-######### register all
-def register():
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
-
diff --git a/release/scripts/addons_contrib/geodesic_domes/tmp/GD_0.GD b/release/scripts/addons_contrib/geodesic_domes/tmp/GD_0.GD
deleted file mode 100644
index cdf5422..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/tmp/GD_0.GD
+++ /dev/null
@@ -1,115 +0,0 @@
-facetype_menu,'3',
-facetoggle,True,
-face_use_imported_object,False,
-facewidth,0.26006004214286804,
-fwtog,True,
-faceheight,1.0,
-fhtog,False,
-face_detach,False,
-fmeshname,'defaultface',
-geodesic_types,'Geodesic',
-import_mesh_name,'None',
-base_type,'Octahedron',
-orientation,'EdgeUp',
-geodesic_class,'Class 1',
-tri_hex_star,'tri',
-spherical_flat,'spherical',
-use_imported_mesh,False,
-cyxres,5,
-cyyres,5,
-cyxsz,1.0,
-cyysz,1.0,
-cyxell,1.0,
-cygap,1.0,
-cygphase,0.0,
-paxres,5,
-payres,5,
-paxsz,0.30000001192092896,
-paysz,1.0,
-paxell,1.0,
-pagap,1.0,
-pagphase,0.0,
-ures,8,
-vres,8,
-urad,1.0,
-vrad,0.25,
-uellipse,1.0,
-vellipse,1.0,
-upart,1.0,
-vpart,1.0,
-ugap,0.0,
-vgap,0.0,
-uphase,0.0,
-vphase,0.0,
-uexp,0.0,
-vexp,0.0,
-usuper,2.0,
-vsuper,2.0,
-utwist,0.0,
-vtwist,0.0,
-bures,8,
-bvres,8,
-burad,1.0,
-bupart,1.0,
-bvpart,1.0,
-buphase,0.0,
-bvphase,0.0,
-buellipse,1.0,
-bvellipse,1.0,
-grxres,5,
-gryres,2,
-grxsz,2.0,
-grysz,1.0,
-cart,0,
-frequency,2,
-eccentricity,1.0,
-squish,1.0,
-radius,2.8912599086761475,
-squareness,2.0,
-squarez,2.0,
-baselevel,5,
-dual,False,
-rotxy,0.0,
-rotz,0.0,
-uact,False,
-vact,False,
-um,3.0,
-un1,1.0,
-un2,1.0,
-un3,1.0,
-ua,1.0,
-ub,4.0,
-vm,1.0,
-vn1,1.0,
-vn2,1.0,
-vn3,1.0,
-va,1.0,
-vb,1.0,
-uturn,0.0,
-vturn,0.0,
-utwist,0.0,
-vtwist,0.0,
-struttype,0,
-struttoggle,True,
-strutimporttoggle,False,
-strutimpmesh,'GD_mesh',
-strutwidth,1.0,
-swtog,False,
-strutheight,1.0,
-shtog,False,
-strutshrink,1.0,
-sstog,False,
-stretch,1.0,
-lift,0.0010000000474974513,
-smeshname,'defaultstrut',
-hubtype,True,
-hubtoggle,False,
-hubimporttoggle,False,
-hubimpmesh,'None',
-hubwidth,1.0,
-hwtog,False,
-hubheight,1.0,
-hhtog,False,
-hublength,1.0,
-hstog,False,
-hmeshname,'None',
diff --git a/release/scripts/addons_contrib/geodesic_domes/tmp/GD_start.GD b/release/scripts/addons_contrib/geodesic_domes/tmp/GD_start.GD
deleted file mode 100644
index a75eafb..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/tmp/GD_start.GD
+++ /dev/null
@@ -1,115 +0,0 @@
-facetype_menu,'0',
-facetoggle,False,
-face_use_imported_object,False,
-facewidth,0.5,
-fwtog,False,
-faceheight,1.0,
-fhtog,False,
-face_detach,False,
-fmeshname,'defaultface',
-geodesic_types,'Geodesic',
-import_mesh_name,'None',
-base_type,'Tetrahedron',
-orientation,'PointUp',
-geodesic_class,'Class 1',
-tri_hex_star,'tri',
-spherical_flat,'spherical',
-use_imported_mesh,False,
-cyxres,5,
-cyyres,5,
-cyxsz,1.0,
-cyysz,1.0,
-cyxell,1.0,
-cygap,1.0,
-cygphase,0.0,
-paxres,5,
-payres,5,
-paxsz,0.30000001192092896,
-paysz,1.0,
-paxell,1.0,
-pagap,1.0,
-pagphase,0.0,
-ures,8,
-vres,8,
-urad,1.0,
-vrad,0.25,
-uellipse,1.0,
-vellipse,1.0,
-upart,1.0,
-vpart,1.0,
-ugap,0.0,
-vgap,0.0,
-uphase,0.0,
-vphase,0.0,
-uexp,0.0,
-vexp,0.0,
-usuper,2.0,
-vsuper,2.0,
-utwist,0.0,
-vtwist,0.0,
-bures,8,
-bvres,8,
-burad,1.0,
-bupart,1.0,
-bvpart,1.0,
-buphase,0.0,
-bvphase,0.0,
-buellipse,1.0,
-bvellipse,1.0,
-grxres,5,
-gryres,2,
-grxsz,2.0,
-grysz,1.0,
-cart,0,
-frequency,1,
-eccentricity,1.0,
-squish,1.0,
-radius,1.0,
-squareness,2.0,
-squarez,2.0,
-baselevel,5,
-dual,False,
-rotxy,0.0,
-rotz,0.0,
-uact,False,
-vact,False,
-um,3.0,
-un1,1.0,
-un2,1.0,
-un3,1.0,
-ua,1.0,
-ub,4.0,
-vm,1.0,
-vn1,1.0,
-vn2,1.0,
-vn3,1.0,
-va,1.0,
-vb,1.0,
-uturn,0.0,
-vturn,0.0,
-utwist,0.0,
-vtwist,0.0,
-struttype,0,
-struttoggle,False,
-strutimporttoggle,False,
-strutimpmesh,'None',
-strutwidth,1.0,
-swtog,False,
-strutheight,1.0,
-shtog,False,
-strutshrink,1.0,
-sstog,False,
-stretch,1.0,
-lift,0.0,
-smeshname,'defaultstrut',
-hubtype,True,
-hubtoggle,False,
-hubimporttoggle,False,
-hubimpmesh,'None',
-hubwidth,1.0,
-hwtog,False,
-hubheight,1.0,
-hhtog,False,
-hublength,1.0,
-hstog,False,
-hmeshname,'None',
diff --git a/release/scripts/addons_contrib/geodesic_domes/vefm_259.py b/release/scripts/addons_contrib/geodesic_domes/vefm_259.py
deleted file mode 100644
index 986f97b..0000000
--- a/release/scripts/addons_contrib/geodesic_domes/vefm_259.py
+++ /dev/null
@@ -1,1218 +0,0 @@
-# vert class and overloading experiments
-import bpy
-import math
-from math import sqrt,acos,pi,sin,cos,atan,tan,fabs
-from mathutils import Vector
-
-#dbg = True
-sgn = lambda x : (x>0) - (x<0) #missing signum functin in Python
-try:
-    breakpoint = bpy.types.bp.bp
-except:
-    pass    
-
-from bpy_extras.object_utils import AddObjectHelper, object_data_add
-
-from collections import Counter
-
-'''PKHG not needed?
-def find_twice_vert(l1,l2):
-    tmp = [el for el in l1]
-    tmp.extend(l2)
-    tt = Counter(tmp)
-    result = max(tt.keys(),key = lambda k:tt[k])
-    print("twice give", result)
-    return result
-'''
-
-def vefm_add_object(selfobj):
-    for i in range(len(selfobj.verts)):
-        selfobj.verts[i].index = i
-    v = [el.vector for el in selfobj.verts]    
-#    e = [[edge.a.index,edge.b.index] for edge in selfobj.edges]
-    e = []
-    if type(selfobj.faces[0]) == type([]):
-#    print("\n=========== selfobj.faces[0]", selfobj.faces[0],type(selfobj.faces[0]))
-#PKHG should be a list of vertices, which have an index
-        f =  [[v.index for v in  face] for face in selfobj.faces]
-    else:
-        f =  [[v.index for v in  face.vertices] for face in selfobj.faces]
-#PKHG_DBG_25-11    print("dbg 25-11 f list =",f)
-#PKHG_DBG_25-11    print("dgb 25-11 v list +",v)
-    m = bpy.data.meshes.new(name= selfobj.name)
-    m.from_pydata(v, e, f )
-    # useful for development when the mesh may be invalid.
-#PKHG not needed, as ideasman_42 says    m.validate(verbose = False)
-    object_data_add(bpy.context, m, operator = None)
-#???ERROR PKHG in AddSelf    setMaterial(bpy.context.active_object,pkhg_red_color)
-
-#extra test phase
-
-
-
-
-class vertex:
-
-    def __init__(self,vec=(0,0,0)): #default x = 0,y = 0,z = 0):        
-        self.vector  = Vector(vec)
-        self.length = self.vector.length
-        self.index = 0
-        self.normal = 0
-        self.edges = []
-        self.faces = []
-        self.boundary = 0
-
-    def findlength(self):
-         self.length = self.vector.length
-
-    def normalize(self):
-        self.findlength()
-        if self.length > 0:
-            tmp = 1.0/self.length
-            self.vector  =  tmp * self.vector 
-#            self.x = self.vector[0] #(1.0/self.length)
-#            self.y = self.vector[1] #(1.0/self.length)
-#            self.z = self.vector[2] #(1.0/self.length)
-            self.length = 1.0
-
-    def findnormal(self):
-        target = []
-        if self.faces[:] == []:
-            print("vefm vertex L81 pkhg:*****ERROR**** findnormal has no faces")
-            return
-        for currentface in self.faces:
-            target.append(currentface.normal)
-        self.normal = average(target).centroid()
-        self.normal.findlength()
-        if self.length == 0:
-            print("******ERROR*** length zero in findnormal, j = (0,1,0) replcaced")
-            self.normal = vertex((0,1,0))
-        self.normal.normalize()
-
-    def clockwise(self): #PKHG self is a vertex
-        if self.boundary:
-            start = self.boundarystart() #???PKHG TODO error
-        else:
-            start = self.faces[0]
-#PKHG TODO do understand 21-11 solves starify of a normal tetrahedron
-#        start = self.faces[0]     #PKHG TODO see error above!
-#        start.docorners() #PKHG???? 
-        self.tempedges = []
-        self.tempfaces = []
-        for i in range(len(self.edges)):
-            #print("\n----------------------voor breakpunt pkhg in clockwise")
-            #breakpoint(locals(), self.index == 0)
-            self.tempfaces.append(start)
-            for corner in start.corners:
-                if corner[0] is not self:
-                    pass
-                elif corner[0] is self:
-                    self.tempedges.append(corner[1])
-                    nextedge = corner[2]
-            for facey in nextedge.faces:
-                if facey is not start:
-                    start = facey
-                    break
-        self.edges = self.tempedges
-        self.faces = self.tempfaces
-
-    def boundarystart(self):
-        #PKHG not implemented, needed?
-        pass
-
-#???PKHG TODO why are add and sub different? Solved check the two cases used 
-    def __add__(self,other):
-        if isinstance(other, Vector):
-            tmp = self.vector + other
-        else:
-            tmp = self.vector + other.vector
-        return vertex(tmp)
-
-    def __sub__(self,other):
-        if isinstance(other, Vector):
-            tmp = self.vector -  other
-        else:
-            tmp = self.vector - other.vector
-#        tmp = self.vector - other.vector
-        return vertex(tmp)
-
-    def __mul__(self,other):
-        tmp = self.vector * other
-        return vertex(tmp)
-
-    def __truediv__(self,other):
-        denom = 1.0/other
-        tmp = self.vector * denom
-        return (tmp)
-
-    def negative(self):
-        return vertex(-self.vector)
-
-class crossp:
-    ##   Takes in two vertices(vectors), returns the cross product.
-    def __init__(self,v1,v2):
-        self.v1 = v1
-        self.v2 = v2
-#
-    def docrossproduct(self):
-        tmp = self.v1.vector.cross(self.v2.vector)
-        return vertex(tmp)
-
-class average:
-    ##   Takes a list of vertices and returns the average. If two verts are passed, returns midpoint.
-    def __init__(self,vertlist):
-        self.vertlist = vertlist
- 
-    def centroid(self):
-        tmp  =  Vector()
-#PKHG avoid emptylist problems        
-        divisor = 1.0
-        nr_vertices = len(self.vertlist)
-        if nr_vertices > 1:
-            divisor = 1.0 / len(self.vertlist)
-        elif nr_vertices == 0:
-            print("\n***WARNING*** empty list in vefm_259.centroid! L180")
-        for vert in self.vertlist:
-            tmp = tmp + vert.vector
-        tmp = tmp * divisor
-        return vertex(tmp)
-
-class edge:
-    def __init__(self,a = 0,b = 0):
-        self.a = a
-        self.b = b
-        self.index = 0
-        self.normal = 0
-        self.cross = 0
-        self.unit = 0
-        self.faces = []
-        self.vect = 0  #PKHG becomes  b - a
-        self.vectb = 0 #PKHG becomes  a - b
-#        self.length = 0
-        self.boundary = 0
-        self.findvect()
-#        print("vect len before",self.vect.length)
-        self.findlength()
-#        print("vect after",self.vect.length)
-
-    def findvect(self):
-        self.vect = self.b - self.a
-        self.vectb = self.a - self.b
-
-    def findlength(self):
-        self.vect.findlength()
-        self.vectb.length = self.vect.length
-
-    def findnormal(self):
-                
-        if self.boundary:
-            self.normal = self.faces[0].normal    #average([self.a,self.b]).centroid()
-        else:
-            self.normal = average([self.faces[0].normal,self.faces[1].normal]).centroid()
-        self.normal.normalize()
-#     def findother(self,vertindex):
-#
-#         if vertindex==self.a:
-#
-#             return self.b
-#
-#         else:
-#             return self.a
-##        different classes for 3,4,> sides??
-
-class face:
-    def __init__(self,vertices=[]):
-#PKHG ok good for tri's at least        print("\n ========= vefm L226======dbg face vertices = ",vertices)
-        self.vertices = vertices    ##   List of vertex instances.
-        self.edges=[]            ##   Will be filled with the sides of the face.
-        self.boundary = 0        ##   When set will have bool and id of edge concerned.
-        self.normal = 0            ##   Face normal found through cross product.
-        self.corners=[]
-        self.spokes=[]            ##   Vectors of the bisecting angles from each corner to the centre + dotproduct.
-        self.index = 0
- 
- #dotproduct is misleading name, it is the hook between two vectors!
-    def dotproduct(self,v1,v2):
-        v1.findlength()
-        v2.findlength()
-        if v1.length == 0 or v2.length == 0:
-            print("\nPKHG warning, =====vefm_259 dotproduct L245====== at least one zero vector 0 used")         
-            return 0 # pi * 0.25 #PKHT_TEST04nov pi * 0.25  #45 degrees??? #PKHG???TODO
-        dot = v1.vector.dot(v2.vector)
-        costheta = dot / (v1.length * v2.length)
-        tmp = acos(costheta)
-        return tmp
-    
-    def orderedges(self):
-        temp=[]
-        finish = len(self.vertices)
-        for i in range(finish):
-            current = self.vertices[i]
-            if i==finish-1:
-                next = self.vertices[0]
-            else:
-                next = self.vertices[i+1]
-            for edge in face.edges:
-                if edge.a==current and edge.b==next:
-                    face.clockw.append(edge.vect)
-                    face.aclockw.append(edge.vectb)
-                    temp.append(edge)
-                if edge.b==current and edge.a==next:
-                    face.clockw.append(edge.vectb)
-                    face.aclockw.append(edge.vect)
-                    temp.append(edge)
-            for edge in face.edges:
-                if edge.a==current and edge.b==next:
-                    face.clockw.append(edge.vect)
-                    face.aclockw.append(edge.vectb)
-                    temp.append(edge)
-                if edge.b==current and edge.a==next:
-                    face.clockw.append(edge.vectb)
-                    face.aclockw.append(edge.vect)
-                    temp.append(edge)
-            face.vertices = temp
-    
-    
-    def docorners(self):
-        ##   This function identifies and stores the vectors coming from each vertex
-        ##   allowing easier calculation of cross and dot products.
-        finish = len(self.vertices)
-        '''
-        which = None
-        occur1 = None
-        occur2 = None
-        if finish == 3 and len(self.edges) == 2 :    
-            print("\n***ERROR*** only two edges should be three")
-      #      return        
-            occur1 = [self.vertices.index(self.edges[0].a),self.vertices.index(self.edges[0].b)]
-            occur2 = [self.vertices.index(self.edges[1].a),self.vertices.index(self.edges[1].b)]
-            #occur2 = [self.edges[1].a.index, self.edges[1].b.index]
-            twice = find_twice_vert(occur1,occur2)
-            occur1.remove(twice)
-            occur2.remove(twice)
-            #new_edge = edge(self.vertices[occur1[0]],self.vertices[occur2[0]])
-            #self.edges.append(new_edge)
-        '''
-        for i in range(finish):
-            current = self.vertices[i]
-            if i==finish-1:
-                next = self.vertices[0]
-            else:
-                next = self.vertices[i+1]
-            if i==0:
-                previous = self.vertices[-1]
-            else:
-                previous = self.vertices[i-1]
-            corner=[current] #PKHG new for each vertex = current
-            #corner = current
-            rightedge = None
-            leftedge = None
-            teller = -1
-            for edge in self.edges:
-        #        if finish == 3 and len(self.edges) == 2  and i == 2:
-        #            return    
-                teller += 1                                                        
-                currentinfo = (current, edge.a, edge.b, edge.a is current, edge.b is current)
-                #next and previous are vertex with respect to ith vertex
-                if edge.a is current or edge.b is current:    ##  does this edge contain our current vert
-                    if edge.a is current:
-                        if edge.b is next:
-                            rightedge = edge
-                            rightvect = edge.vect
-                        if edge.b is previous:
-                            leftedge = edge
-                            leftvect = edge.vect
-                    elif edge.b is current:
-                        if edge.a is next:
-                            rightedge = edge
-                            rightvect = edge.vectb
-                        if edge.a is previous:
-                            leftedge = edge
-                            leftvect = edge.vectb
-            corner.append(rightedge)
-            corner.append(leftedge)
-            if rightedge and leftedge:
-                '''
-                if rightedge:
-                    print("rightedge",rightedge.index)
-                if leftedge:
-                    print( "leftedge",leftedge.index)
-                print("corner",corner)
-                #'''
-                dotty = self.dotproduct(rightvect,leftvect)
-                corner.append(dotty)
-            self.corners.append(corner)
-     
-     
-    def findnormal(self):
-        one = self.corners[1][2]
-        two = self.corners[1][1]
-        if one.a is self.corners[1][0]:
-            one = one.vect
-        elif one.b is self.corners[1][0]:
-            one = one.vectb
-        if two.a is self.corners[1][0]:
-            two = two.vect
-        elif two.b is self.corners[1][0]:
-            two = two.vectb
-        self.normal = crossp(one,two).docrossproduct()
-        self.normal.findlength()
-        self.normal.normalize()
-
-    def dospokes(self):
-#PKHG_OK_24-11        print("\n============vefm L375==============dbg, dospokes called corners =", self.corners[:])
-        for corner in self.corners:
-            vert = corner[0]
-            right = corner[1]
-            left = corner[2]
-            if right.a is vert:
-                one = vertex(right.vect.vector)
-            elif right.b is vert:
-                one = vertex(right.vectb.vector)
-            if left.a is vert:
-                two = vertex(left.vect.vector)
-            elif left.b is vert:
-                two = vertex(left.vectb.vector)
-            
-            one.normalize()
-            two.normalize()
-            spoke = one+two
-            spoke.normalize()
-            self.spokes.append(spoke)
-
-    def artspokes(self):
-        centre = average(self.vertices).centroid()
-        for point in self.vertices:
-            newedge = edge(point,centre)
-            spokes.append(newedge)
-            
-class mesh:
-    def __init__(self , name="GD_mesh"):
-        self.name = name #pkhg test phase at least ;-)
-        self.verts=[]
-        self.edges=[]
-        self.faces=[]
-        self.edgeflag = 0
-        self.faceflag = 0
-        self.vertexflag = 0
-        self.vertedgeflag = 0
-        self.vertfaceflag = 0
-        self.faceedgeflag = 0
-        self.boundaryflag = 0
-        self.vertnormalflag = 0
-        self.edgenormalflag = 0
-        self.facenormalflag = 0
-        #found in geodesic.py ??? needed for test here!
-        self.a45 = pi * 0.25
-        self.a90 = pi * 0.5
-        self.a180 = pi
-        self.a270 = pi * 1.5
-        self.a360 = pi * 2        
-
-        
-    def power(self,a,b):         ## Returns a power, including negative numbers
-        result = sgn(a)*(abs(a)**b)
-        return result
-
-    def sign(self,d):    ## Works out the sign of a number.
-        return sgn(d)
-
-    def ellipsecomp(self,efactor,theta):
-        if theta==self.a90:
-            result = self.a90
-        elif theta==self.a180:
-            result = self.a180
-        elif theta==self.a270:
-            result = self.a270
-        elif theta==self.a360:
-            result = 0.0
-        else:                        
-            result = atan(tan(theta)/efactor**0.5)
-            if result<0.0:
-                if theta>self.a180:
-                    result = result+self.a180
-                elif theta<self.a180:
-                    result = result+self.a180
-    ##  Fishy - check this.
-            if result>0.0:
-                if theta>self.a180:
-                    result = result+self.a180
-                elif theta<self.a180:
-                    result = result
-        return result
-        
-    def connectivity(self):
-        self.dovertedge()
-        self.dovertface()
-        self.dofaceedge()
-        self.boundary()
-
-    def superell(self,n1,uv,turn):
-        t1 = sin(uv+turn)
-        t1 = abs(t1)
-        t1 = t1**n1
-        t2 = cos(uv+turn)
-        t2 = abs(t2)
-        t2 = t2**n1
-        r = self.power(1.0/(t1+t2),(1.0/n1))
-        return r
-
-#PKHG changed according to http://de.wikipedia.org/wiki/Superformel
-#a and b a semi-diameter
-    def superform(self,m,n1,n2,n3,uv,a,b,twist):
-        t1 = cos(m*(uv+twist)*.25) / a
-        t1 = abs(t1)
-        t1 = t1**n2
-        t2 = sin(m*(uv+twist)*.25) / b
-        t2 = abs(t2)
-        t2 = t2**n3
-        r = self.power(1.0/(t1+t2),n1)        
-        return r
-        
-    def dovertedge(self):
-        if not self.vertedgeflag:
-            for vert in self.verts:
-                vert.edges = []
-            for currentedge in self.edges:
-                currentedge.a.edges.append(currentedge)
-                currentedge.b.edges.append(currentedge)
-        self.vertedgeflag = 1
-        
-    def dovertface(self):
-        if not self.vertfaceflag:
-            for vert in self.verts:
-                vert.faces = []
-            for face in self.faces:
-                for vert in face.vertices:
-                    vert.faces.append(face)
-        self.vertfaceflag = 1
-        
-    def dofaceedge(self):
-        self.dovertedge()    ## just in case they haven't been done
-        self.dovertface()    ##
-        if not self.faceedgeflag:
-            for edge in self.edges:
-                edge.faces=[]
-            for face in self.faces:
-                face.edges = []
-            for face in self.faces:
-                finish = len(face.vertices)
-                for i in range(finish):
-                    current = face.vertices[i]
-                    if i == finish-1:
-                        next = face.vertices[0]
-                    else:
-                        next = face.vertices[i+1]
-                    for edge in current.edges:
-                        if edge.a is current or edge.b is current:
-                            if edge.b is next or edge.a is next:
-                                edge.faces.append(face)
-                                face.edges.append(edge)
-        self.faceedgeflag = 1
- 
-    def boundary(self):
-        if not self.boundaryflag:
-            for edge in self.edges:
-                if len(edge.faces) < 2:
-                    edge.boundary = 1
-                    edge.faces[0].boundary = 1
-                    edge.a.boundary = 1
-                    edge.b.boundary = 1
-                    
-##   The functions below turn the basic triangular faces into
-##   hexagonal faces, creating the buckyball effect.
-#PKHG seems to work only for meshes with tri's ;-) ??!!
-    def hexify(self):
-        self.hexverts=[]
-        self.hexedges=[]
-        self.hexfaces=[]
-        #PKHG renumbering the index of the verts
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        #PKHG renumbering the index of the edges
-        for i in range(len(self.edges)):
-            self.edges[i].index = i
-        #PKHG  self=> dovertedge, dovertface, dofaceedge, boundary()
-        self.connectivity()
-        hexvert_counter = 0
-        for edge in self.edges:
-#            print("21-11 >>>>>>>>>>>>>>dbg hexify L552")
-#            breakpoint(locals(),True)
-            self.hexshorten(edge,hexvert_counter)
-            hexvert_counter += 2 #PKHG two new vertices done
-#PKHG 21-11            print("21-11 <<<<<<<<<<<<<<< na hexshorten L557", hexvert_counter)
-#PKHG 21-11            breakpoint(locals(),True)
-
-        for face in self.faces:
-            self.makehexfaces(face)
-        
-        for vert in self.verts:
-            vert.clockwise()
-            self.hexvertface(vert)
-        self.verts = self.hexverts
-        self.edges = self.hexedges
-        self.faces = self.hexfaces
-        self.vertedgeflag = 0
-        self.vertfaceflag = 0
-        self.faceedgeflag = 0
-#PKHG_DBG        print("\n ==========================self hexified I hope")
-        #breakpoint(locals(),True)
- 
-    def hexshorten(self,currentedge, hexvert_counter):
-        third = vertex(currentedge.vect/3.0)
-        newvert1 = vertex(currentedge.a.vector)
-        newvert2 = vertex(currentedge.b.vector)
-        newvert1 = newvert1 + third
-        newvert1.index = hexvert_counter
-        newvert2 = newvert2 - third
-        newvert2.index = hexvert_counter + 1 #PKHG caller adjusts +=2 
-        newedge = edge(newvert1,newvert2)
-        newedge.index = currentedge.index
-        self.hexverts.append(newvert1)
-        self.hexverts.append(newvert2)
-        self.hexedges.append(newedge)
- 
-    def makehexfaces(self,currentface):
-        vertices=[]
-        currentface.docorners()
-        for corner in currentface.corners:
-            vert = corner[0]
-            rightedge = corner[1]
-            leftedge = corner[2]
-            lid = leftedge.index
-            rid = rightedge.index
-            
-            if leftedge.a is vert:
-                vertices.append(self.hexedges[lid].a)
-            elif leftedge.b is vert:
-                vertices.append(self.hexedges[lid].b)
-                
-            if rightedge.a is vert:
-                vertices.append(self.hexedges[rid].a)
-            elif rightedge.b is vert:
-                vertices.append(self.hexedges[rid].b)
-                
-        newface = face(vertices)
-        newedge1 = edge(vertices[0],vertices[1])
-        newedge2 = edge(vertices[2],vertices[3])
-        newedge3 = edge(vertices[4],vertices[5])
-        self.hexfaces.append(newface)
-        self.hexedges.append(newedge1)
-        self.hexedges.append(newedge2)
-        self.hexedges.append(newedge3)
-
-    def hexvertface(self,vert):
-        vertices=[]
-        for edge in vert.edges:
-            eid = edge.index
-            if edge.a is vert:
-                vertices.append(self.hexedges[eid].a)
-            elif edge.b is vert:
-                vertices.append(self.hexedges[eid].b)
-        newface = face(vertices)
-        self.hexfaces.append(newface)
- 
-    def starify(self):
-        self.starverts=[]
-        self.staredges=[]
-        self.starfaces=[]
-        for i in range(len(self.verts)):
-            self.verts[i].index = i
-        for i in range(len(self.edges)):
-            self.edges[i].index = i
-        self.connectivity()
-        star_vert_counter = 0
-        for currentedge in self.edges:
-            newvert = average([currentedge.a,currentedge.b]).centroid()
-            newvert.index = star_vert_counter
-            star_vert_counter += 1
-            self.starverts.append(newvert)
-        star_face_counter = 0
-        star_edge_counter = 0
-        for currentface in self.faces:
-            currentface.docorners()
-            vertices=[]
-            for corner in currentface.corners:
-                vert = self.starverts[corner[1].index]
-#                vert.index = star_vert_counter
-#                star_vert_counter += 1
-                vertices.append(vert)
-            newface = face(vertices)
-            newface.index = star_face_counter
-            star_face_counter += 1
-            newedge1 = edge(vertices[0],vertices[1])
-            newedge1.index = star_edge_counter
-            newedge2 = edge(vertices[1],vertices[2])
-            newedge2.index = star_edge_counter + 1
-            newedge3 = edge(vertices[2],vertices[0])
-            newedge3.index = star_edge_counter + 2
-            star_edge_counter += 3
-            self.starfaces.append(newface)
-            self.staredges.append(newedge1)
-            self.staredges.append(newedge2)
-            self.staredges.append(newedge3)
-        for vert in self.verts:
-            vertices=[]
-            vert.clockwise()
-            for currentedge in vert.edges:
-                eid = currentedge.index
-                vertices.append(self.starverts[eid])
-            newface = face(vertices)
-            newface.index = star_face_counter
-            star_face_counter += 1
-            self.starfaces.append(newface)
-        self.verts = self.starverts
-        self.edges = self.staredges
-        self.faces = self.starfaces
-        self.vertedgeflag = 0
-        self.vertfaceflag = 0
-        self.faceedgeflag = 0
-
-    def class2(self):
-        self.class2verts=[] #PKHG_??? used?
-        self.class2edges=[] #PKHG_??? used?
-        self.class2faces=[]
-        
-        newvertstart = len(self.verts)
-        newedgestart = len(self.edges)
-        counter_verts = len(self.verts) #PKHG
-#        for i in range(len(self.verts)):
-        for i in range(counter_verts):
-            self.verts[i].index = i
-        for i in range(len(self.edges)):
-            self.edges[i].index = i
-        for i in range(len(self.faces)):
-            self.faces[i].index = i
-        self.connectivity()
-        for currentface in self.faces:
-            currentface.docorners()
-            newvert = average(currentface.vertices).centroid()
-            newvert.index = counter_verts
-#PKHG_??? 20-11
-            counter_verts += 1
-            self.verts.append(newvert)
-            newedge1 = edge(currentface.vertices[0],newvert)
-            newedge2 = edge(currentface.vertices[1],newvert)
-            newedge3 = edge(currentface.vertices[2],newvert)
-            self.edges.append(newedge1)
-            self.edges.append(newedge2)
-            self.edges.append(newedge3)
-        for currentedge in range(newedgestart):
-            self.edges[currentedge].a = self.verts[self.edges[currentedge].faces[0].index+newvertstart]
-            self.edges[currentedge].b = self.verts[self.edges[currentedge].faces[1].index+newvertstart]
-            self.edges[currentedge].findvect()
-        #breakpoint(locals(),True)                
-        for currentvert in range(newvertstart):
-            vert = self.verts[currentvert]
-            vertices=[]
-            vert.clockwise()
-            for currentface in vert.faces:
-                eid = currentface.index
-#PKHG_OK                print(">>>>eid = ", eid,newvertstart + eid)
-                vertices.append(self.verts[newvertstart + eid])
-            #print("21-11 L710  currentvert is=", currentvert)
-            #breakpoint(locals(),True)    
-            for i in range(len(vertices)):
-                if i == len(vertices) - 1:
-                    next = vertices[0]
-                else:
-                    next = vertices[i+1]
-                #print("21-11 L710  i is=", i)
-                #breakpoint(locals(),True)    
-                newface = face([vert,vertices[i],next])
-                self.class2faces.append(newface)
-        #self.verts = self.class2verts
-        #self.edges = self.class2edges
-        self.faces = self.class2faces
-        self.vertedgeflag = 0
-        self.vertfaceflag = 0
-        self.faceedgeflag = 0    
-        
-    def dual(self):
-        self.dualverts=[]
-#        self.dualedges=[]
-        self.dualfaces=[]
-#PKHG 21-11 dual problem?!        
-        counter_verts = len(self.verts)
-        for i in range(counter_verts):
-            self.verts[i].index = i
-        for i in range(len(self.edges)):
-            self.edges[i].index = i
-        for i in range(len(self.faces)):
-            self.faces[i].index = i
-        self.connectivity()
-        counter_verts = 0
-        for currentface in self.faces:
-            currentface.docorners()
-            newvert = average(currentface.vertices).centroid()
-            newvert.index = counter_verts #PKHG needed in >= 2.59 
-            counter_verts += 1            
-            self.dualverts.append(newvert)
-        for vert in self.verts:
-            vertices=[]
-            vert.clockwise()
-            for currentface in vert.faces:
-                eid = currentface.index
-                vertices.append(self.dualverts[eid])
-            newface = face(vertices)
-            self.dualfaces.append(newface)
-        for currentedge in self.edges:
-            currentedge.a = self.dualverts[currentedge.faces[0].index]
-            currentedge.b = self.dualverts[currentedge.faces[1].index]
-        self.verts = self.dualverts
-#        self.edges = self.staredges
-        self.faces = self.dualfaces
-        self.vertedgeflag = 0
-        self.vertfaceflag = 0
-        self.faceedgeflag = 0
- 
-class facetype(mesh):
-    def __init__(self,basegeodesic,parameters,width,height,relative):
-        mesh.__init__(self)
-        self.detatch = parameters[0]
-        self.endtype = parameters[1]
-        self.coords = parameters[2]
-        self.base = basegeodesic
-        self.relative = relative
-        self.width = width
-    
-        if not self.relative:
-            newwidth = self.findrelative()
-            self.width = width*newwidth
-        self.height = height
-        self.base.connectivity()
-        for coord in self.coords:
-            coord[0]=coord[0]*self.width
-            coord[1]=coord[1]*self.height
-        if not self.base.facenormalflag:
-            for currentface in self.base.faces:
-            #    print("face normal ",currentface.normal)
-                currentface.docorners()
-                currentface.findnormal()
-            #    print("face normal ",currentface.normal.x,currentface.normal.y,currentface.normal.z)
-            self.base.facenormalflag = 1
-        if self.endtype==4 and not self.base.vertnormalflag:
-            for currentvert in self.base.verts:
-                currentvert.findnormal()
-            self.base.vertnormalflag = 1
-        self.createfaces()
- 
-    def findrelative(self):
-        centre = average(self.base.faces[0].vertices).centroid()
-        edgelist=[]
-        for point in self.base.faces[0].vertices:
-            newedge = edge(centre,point)
-            edgelist.append(newedge)
-        length = 0
-        for edg in edgelist:
-            extra = edg.vect.length
-            length = length+extra
-        #    print("length",length,"extra",extra)
-        length = length/len(edgelist)
-    #    print("find relative",length)
-        return length
- 
-    def createfaces(self):
-        if not self.detatch:
-            for point in self.base.verts:
-                self.verts.append(point)
-        if self.endtype==4:
-            self.createghostverts()
-        for currentface in self.base.faces:
-            self.doface(currentface)
-
-    def createghostverts(self):
-        self.ghoststart = len(self.verts)
-        for vert in self.base.verts:
-            newvert = vert + (vert.normal * self.coords[-1][1])
-            self.verts.append(newvert)
-        
-    def doface(self,candidate):
-        grid=[]
-        candidate.dospokes()
-    #    print("Candidate normal",candidate.normal.x,candidate.normal.y,candidate.normal.z)
-        if not self.detatch:
-            line=[]
-            for vert in candidate.vertices:
-                line.append(vert)
-            grid.append(line)
-        else:
-            line=[]
-            for point in candidate.vertices:
-                newvert = vertex(point.vector)
-                self.verts.append(newvert)
-                line.append(newvert)
-            grid.append(line)
-        finish = len(self.coords)
-        if self.endtype==1 or self.endtype==4:
-            finish = finish-1
-        for i in range(finish):
-            up = candidate.normal*self.coords[i][1]
-            line=[]
-            for j in range(len(candidate.vertices)):
-                dotfac = candidate.corners[j][3]*0.5
-                vec=(candidate.spokes[j]*(self.coords[i][0]/sin(dotfac)))        #self.coords[i][0])#(self.coords[i][0]/sin(dotfac)))#+up
-                newvert = candidate.vertices[j]+vec+up
-                line.append(newvert)
-                self.verts.append(newvert)
-            grid.append(line)
-        if self.endtype==4:
-            line=[]
-            for i in range(len(candidate.vertices)):
-                vert = self.verts[candidate.vertices[i].index+self.ghoststart]
-                line.append(vert)
-            #    self.verts.append(vert)
-            grid.append(line)
-        for line in grid:
-            line.append(line[0])
-        if self.endtype==3:
-            grid.append(grid[0])
-        for i in range(len(grid)-1):
-            for j in range(len(grid[i])-1):
-                one = grid[i][j]
-                two = grid[i][j+1]
-                three = grid[i+1][j+1]
-                four = grid[i+1][j]
-                newface = face([one, two, three, four])
-                self.faces.append(newface)
-        if self.endtype==2:
-            finalfaceverts = grid[-1]
-            newface = face(finalfaceverts[:-1])
-            self.faces.append(newface)
-        if self.endtype==1:
-            lastvert = average(candidate.vertices).centroid()
-            up = candidate.normal*self.coords[-1][1]
-            newvert = lastvert+up
-            self.verts.append(newvert)
-            ring = grid[-1]
-            for i in range(len(ring)-1):
-                newface = face([newvert,ring[i],ring[i+1]])
-                self.faces.append(newface)
-
-class importmesh(mesh):
-    def __init__(self,meshname,breakquadflag):    
-        mesh.__init__(self)
-#        print("mesh and breakquad",meshname,breakquadflag)
-#        impmesh = NMesh.GetRawFromObject(meshname)
-        impmesh = bpy.data.objects[meshname]
-        copied_mesh = None
-        if breakquadflag:
-            name = impmesh.name
-#PKHG???needed???NO 3-11-2011            impmesh.name = "Original_" + name
-            impmesh.name =  name
-#PKHG TODO use a copy?   no not necessary         bpy.ops.object.duplicate_move(OBJECT_OT_duplicate={"linked":False, "mode":'TRANSLATION'}, TRANSFORM_OT_translate={"value":(0, 0,0}))
-#PKHG TODO use a copy?            copied_mesh = bpy.context.active_object
-            bpy.ops.object.mode_set(mode='EDIT')
-            bpy.ops.mesh.quads_convert_to_tris()
-            bpy.ops.object.mode_set(mode='OBJECT')
-
-        for v in impmesh.data.vertices:
-            vert = vertex(v.co)
-            vert.index = v.index
-            self.verts.append(vert)
-#PKHG verts is now a list of vertex, so to say a copy of the Vectors
-
-#PKHG edges
-        for e in impmesh.data.edges:
-            tmp = []
-            for vert in e.vertices:
-                a = self.verts[vert]
-                tmp.append(a)
-            newedge = edge(tmp[0],tmp[1])
-            newedge.index = e.index
-            self.edges.append(newedge)            
-#PKHG faces with out bmesh replace next line polygons by faces
-        for f in impmesh.data.polygons:
-            temp=[]
-            for vert in f.vertices:  #PKHG a list! of indices 
-                a = self.verts[vert] #PKHG verts contains already vertex objects
-                temp.append(a)
-            newface = face(temp)
-            newface.index = f.index #indexcount
-            self.faces.append(newface)
-        self.dovertedge()
-        self.dovertface()
-        self.temp=[]    
-
-        for i in range(len(self.verts)):
-            self.temp.append([])
-            self.verts[i].index = i
-        for i in range(len(self.verts)):
-            target = self.surroundingverts(self.verts[i])    
-            for j in range(len(target)):                ## go through those verts
-                temptarg = self.temp[target[j].index]        
-                flag = 0                    ## set a flag up
-        
-                for k in range(len(temptarg)):        ## go through temp list for each of those verts
-                    
-                    if temptarg[k]==i:            ## if we find a match to the current vert...
-                        flag = 1            ## raise the flag
-            
-                if flag==0:                ## if there is no flag after all that...
-                    self.temp[target[j].index].append(i)    ## add current vert to temp list of this surrounding vert
-                    self.temp[i].append(target[j].index)    ## add this surrounding vert to the current temp list
-                    newedge = edge(self.verts[i],self.verts[target[j].index])
-                    self.edges.append(newedge)    ## add the newly found edge to the edges list
-        
-        for edg in self.edges:
-            edg.findvect()
-        self.vertedgeflag = 0    
-        self.vertedgeflag = 0    
-        self.connectivity()
-#PKHG_DBG_OK        print("\n======= mesh imported")
-                                                    
-    def surroundingverts(self,vert):
-        """ Find the verts surrounding vert"""        
-        surround=[]                    ## list to be filled and returned        
-        for faces in vert.faces:        ## loop through faces attached to vert
-            finish = len(faces.vertices)
-            for i in range(finish):            
-                if i==finish-1:
-                    next = faces.vertices[0]
-                else:
-                    next = faces.vertices[i+1]
-                if vert == faces.vertices[i]:
-                    surround.append(next)                                    
-        return surround
-
-    def breakquad(self,quad_face):
-        """ turn quads into triangles"""
-        distance1 = quad_face.vertices[0]-quad_face.vertices[2]
-        distance2 = quad_face.vertices[1]-quad_face.vertices[3]        
-        distance1.findlength()
-        distance2.findlength()        
-        if abs(distance1.length)<abs(distance2.length):
-            self.faces[quad_face.index]=face([quad_face.vertices[0],quad_face.vertices[1],quad_face.vertices[2]])
-            self.faces.append(face([quad_face.vertices[0],quad_face.vertices[2],quad_face.vertices[3]]))
-        else:
-            self.faces[quad_face.index]=face([quad_face.vertices[0],quad_face.vertices[1],quad_face.vertices[3]])
-            self.faces.append(face([quad_face.vertices[1],quad_face.vertices[2],quad_face.vertices[3]]))            
-        
-                        
-class strut(mesh):
-    def __init__(self,base,struttype,width,height,length,widthtog,heighttog,lengthtog,meshname,stretchflag,lift):
-        mesh.__init__(self)
-        ## put in strut prep stuff here
-        if struttype==None:
-            return
-        total = 0
-        divvy = len(base.faces[0].edges)
-        for lengf in base.faces[0].edges:
-            lengf.vect.findlength()
-            total = total+lengf.vect.length
-        yardstick = total/divvy
-        if widthtog:
-            self.width = width
-        else:
-            self.width = width * yardstick
-        if heighttog:
-            self.height = height
-        else:
-            self.height = height*yardstick
-        if lengthtog:
-            self.shrink = length
-        else:
-            self.shrink = length * yardstick        
-        if not base.facenormalflag:
-            for currentface in base.faces:
-                currentface.docorners()
-                currentface.findnormal()
-            base.facenormalflag = 1
-        for edj in base.edges:
-            edj.findnormal()
-            side = edge(edj.a,edj.b)
-            edj.unit = side.vect
-            edj.unit.normalize()    
-            edj.cross = crossp(edj.normal,edj.unit).docrossproduct()
-        template = importmesh(meshname,0)
-        maxx = 0
-        minx = 0
-        for vert in template.verts:
-#            if vert.x>maxx:
-            if vert.vector.x > maxx:
-#                maxx = vert.x
-                maxx = vert.vector.x
-#            if vert.x<minx:
-            if vert.vector.x < minx:
-#                minx = vert.x
-                minx = vert.vector.x
-        for edj in base.edges:
-            start = len(self.verts)
-            centre = average([edj.a,edj.b]).centroid()
-            split = edj.vect.length/2
-            #PKHG no division by zero!!
-            tmp = 1.0
-            if maxx != minx:
-                tmp = 1.0/(maxx - minx)
-#            dubbl = edj.vect.length/(maxx-minx)
-            dubbl = edj.vect.length * tmp
-            #PKHG end no division by zero!!
-            diffplus = split-maxx
-            diffminus=-split-minx
-            for point in template.verts:
-#                ay=(edj.normal*point.z*self.height)+(edj.normal*lift)
-                ay=(edj.normal * point.vector.z * self.height) + (edj.normal * lift)
-#                ce = edj.cross * point.y * self.width
-                ce = edj.cross * point.vector.y * self.width
-                if stretchflag:
-#                    be = edj.unit*self.shrink*dubbl*point.x
-                    be = edj.unit * self.shrink * dubbl * point.vector.x
-                else:
-#                    if point.x > 0.0:
-                    if point.vector.x > 0.0:    
-#                        be = edj.unit * self.shrink * (point.x + diffplus)
-                        be = edj.unit * self.shrink * (point.vector.x + diffplus)
-#                    elif point.x < 0.0:
-                    elif point.vector.x < 0.0:    
-#                        be = edj.unit * self.shrink * (point.x + diffminus)
-                        be = edj.unit * self.shrink * (point.vector.x + diffminus)
-#                    elif point.x == 0.0:
-                    elif point.vector.x == 0.0:
-#                        be = edj.unit * self.shrink * point.x
-                        be = edj.unit * self.shrink * point.vector.x
-                de = ay + be + ce
-                newvert = centre + de
-                self.verts.append(newvert)
-            for edjy in template.edges:
-                one = edjy.a.index+start
-                two = edjy.b.index+start
-                newedge = edge(self.verts[one],self.verts[two])
-                self.edges.append(newedge)
-            for facey in template.faces:
-                faceverts=[]
-                for verty in facey.vertices:
-                    index = verty.index+start
-                    faceverts.append(self.verts[index])
-                newface = face(faceverts)
-                self.faces.append(newface)
-        self.vertedgeflag = 0    
-        self.vertedgeflag = 0                        
-        self.connectivity()    
-        
-class hub(mesh):
-    def __init__(self,base,hubtype,width,height,length,widthtog,heighttog,lengthtog,meshname):
-        mesh.__init__(self)
-        self.width = 1.0
-        self.height = 1.0
-        self.shrink = 1.0
-        ## put in strut prep stuff here
-        if hubtype==None:
-            return
-        total = 0
-        divvy = len(base.faces[0].edges)
-        for lengf in base.verts[0].edges:
-            lengf.vect.findlength()
-            total = total+lengf.vect.length
-        yardstick = total / divvy
-        if widthtog:
-            self.width = width
-        else:
-            self.width = width * yardstick
-        if heighttog:
-            self.height = height
-        else:
-            self.height = height * yardstick
-        if lengthtog:
-            self.shrink = length
-        else:
-            self.shrink = length * yardstick
-            
-        if not base.facenormalflag:
-            for currentface in base.faces:
-                currentface.docorners()
-                currentface.findnormal()
-            base.facenormalflag = 1
-#PKHG_2411        breakpoint(locals(),True) #PKHG_DBG 24-11 reason ERROR**** findnormal has no faces
-
-            
-        for apex in base.verts:
-            apex.findnormal()
-            side = edge(apex.edges[0].a,apex.edges[0].b)
-            apex.unit = side.vect #PKHG is Vector: b -a
-            apex.unit.normalize()    
-            apex.cross = crossp(apex.normal,apex.unit).docrossproduct()
-            apex.unit = crossp(apex.cross,apex.normal).docrossproduct()
-            
-        template = importmesh(meshname,0)
-        for apex in base.verts:
-            start = len(self.verts)
-            centre = apex    
-            for point in template.verts:
-                ay = apex.normal * point.vector.z * self.height
-                ce = apex.cross * point.vector.y * self.width
-                be = apex.unit * point.vector.x * self.shrink
-                de = ay+be+ce
-                newvert = centre+de
-                self.verts.append(newvert)
-            for edjy in template.edges:
-                one = edjy.a.index+start
-                two = edjy.b.index+start
-                newedge = edge(self.verts[one],self.verts[two])
-                self.edges.append(newedge)
-            for facey in template.faces:
-                faceverts=[]
-                for verty in facey.vertices:
-                    index = verty.index+start
-                    faceverts.append(self.verts[index])
-                newface = face(faceverts)
-                self.faces.append(newface)
-        self.vertedgeflag = 0    
-        self.vertedgeflag = 0                        
-        self.connectivity()
-
-#???PKHG TODO Nmesh used yet wrong!            
-def finalfill(source,target):
-    if source == target: #PKHG: otherewise >infinite< loop
-        print("\n***WARNING*** vefm_259.finalfill L1148 source == target empty mesh used")
-        target = mesh() #
-#PKHG_??? maybe renumverting and checkkin faces wiht >=4 5 vertices?        
-    count = 0
-#PKHG_OK    print("\n>>>>>>>>20-11 DBG vefm_259 in finalfill L1152, len(source.verts) =",len(source.verts))
-    for point in source.verts:
-#        newvert = NMesh.Vert(point.x,point.y,point.z)
-        newvert = vertex(point.vector)
-#PKHG_??? needed???
-        newvert.index = count 
-        target.verts.append(newvert)
-        point.index = count  #PKHG_INFO source renumbered too!
-#PKHG_OK        print("test gelijk",newvert.vector == point.vector)
-        count += 1 #count+1
-    
-    #PKHG indices of the vertex in faceyvertices are renumbered!
-#PKHG_OK    print("\n>>>>>>>>20-11 DBG vefm_259 in finalfill L1163, len(source.faces) =",len(source.faces))    
-    for facey in source.faces:
-        row = len(facey.vertices)
-        if row >= 5:
-#PKHG does not take the good vectors???            newvert = average(facey.vertices).centroid()
-            tmp = Vector()
-            for el in facey.vertices:
-                tmp = tmp +  target.verts[el.index].vector
-            tmp = tmp / row
-            centre = vertex(tmp) #does not work here!==>  average(facey.vertices).centroid()
-            centre.index = count #PKHG_??? give it a good index
-            count += 1
-#PKHG_DBG 21-11
-            #breakpoint(locals(),True)
-            
-            target.verts.append(centre)
-            for i in range(row):
-                if i == row - 1:
-                    a = target.verts[facey.vertices[-1].index]
-                    b = target.verts[facey.vertices[0].index]
-                else:
-                    a = target.verts[facey.vertices[i].index]
-                    b = target.verts[facey.vertices[i+1].index]
-                target.faces.append([a,b,centre])
-        else:
-            f = []
-#PKHG_DBG 21-11
-#            print("\n-----++++ L1217 dbg final dual", facey )
-#PKHG_DBG 21-11
-#            breakpoint(locals(),True)
-
-            for j in range(len(facey.vertices)):
-                a = facey.vertices[j]
-#PKHG_NOTNEEDED                tmp = a.index
-                f.append(target.verts[a.index])
-            target.faces.append(f)
-
diff --git a/release/scripts/addons_contrib/gpencil_retopo/__init__.py b/release/scripts/addons_contrib/gpencil_retopo/__init__.py
deleted file mode 100644
index 6585184..0000000
--- a/release/scripts/addons_contrib/gpencil_retopo/__init__.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-
-bl_info = {
-    "name": "Grease Pencil Retopology",
-    "author": "Campbell Barton, Bart Crouch",
-    "version": (1, 0, 0),
-    "blender": (2, 5, 7),
-    "location": "View3D > Properties > Grease Pencil",
-    "warning": "",
-    "description": "Use Grease Pencil to retopologise a mesh.",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Mesh"}
-
-
-import bpy
-
-
-# retopo operator
-class Retopo(bpy.types.Operator):
-    bl_idname = "mesh.gp_retopo"
-    bl_label = "Retopo"
-    bl_description = "Convert Grease Pencil drawings to a mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    precision = bpy.props.IntProperty(name="Precision",
-        description="Lower values result in more removed doubles and "
-                    "smoother less precise results",
-        default=40,
-        min=2,
-        soft_max=100)
-
-    @classmethod
-    def poll(cls, context):
-        return context.object
-
-    def execute(self, context):
-        from . import retopo
-        scene, gp = retopo.initialise(context)
-        if not gp:
-            self.report({'WARNING'}, "No grease pencil data found")
-            return {'CANCELLED'}
-
-        obj_new = retopo.calculate(gp, self.precision)
-
-        bpy.ops.object.select_all(action='DESELECT')
-        scene.objects.active = obj_new
-        obj_new.select = True
-
-        # nasty, recalc normals
-        bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-        bpy.ops.mesh.normals_make_consistent(inside=False)
-        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-
-        return {'FINISHED'}
-
-
-# draw function for integration in panels
-def panel_func(self, context):
-    self.layout.operator("mesh.gp_retopo")
-
-
-# define classes and panels for registration
-classes = [Retopo]
-panels = [bpy.types.VIEW3D_PT_tools_objectmode,
-    bpy.types.VIEW3D_PT_tools_meshedit,
-    bpy.types.VIEW3D_PT_tools_curveedit,
-    bpy.types.VIEW3D_PT_tools_surfaceedit,
-    bpy.types.VIEW3D_PT_tools_armatureedit,
-    bpy.types.VIEW3D_PT_tools_mballedit,
-    bpy.types.VIEW3D_PT_tools_latticeedit,
-    bpy.types.VIEW3D_PT_tools_posemode]
-
-
-# registering and menu integration
-def register():
-    for c in classes:
-        bpy.utils.register_class(c)
-    for panel in panels:
-        panel.append(panel_func)
-
-
-# unregistering and removing menus
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-    for panel in panels:
-        panel.remove(panel_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/gpencil_retopo/retopo.py b/release/scripts/addons_contrib/gpencil_retopo/retopo.py
deleted file mode 100644
index b164bf4..0000000
--- a/release/scripts/addons_contrib/gpencil_retopo/retopo.py
+++ /dev/null
@@ -1,522 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-import bpy
-from math import radians
-from mathutils.geometry import intersect_point_line, intersect_line_line
-
-
-# gather initial data and prepare for retopologising
-def initialise(context):
-    scene = context.scene
-    obj = context.object
-
-    gp = None
-    if obj:
-        gp = obj.grease_pencil
-    if not gp:
-        gp = scene.grease_pencil
-
-    if gp:
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-    return(scene, gp)
-
-
-def get_hub(co, _hubs, EPS_SPLINE):
-
-    if 1:
-        for hub in _hubs.values():
-            if (hub.co - co).length < EPS_SPLINE:
-                return hub
-
-        key = co.to_tuple(3)
-        hub = _hubs[key] = Hub(co, key, len(_hubs))
-        return hub
-    else:
-        pass
-
-        '''
-        key = co.to_tuple(3)
-        try:
-            return _hubs[key]
-        except:
-            hub = _hubs[key] = Hub(co, key, len(_hubs))
-            return hub
-        '''
-
-
-class Hub(object):
-    __slots__ = "co", "key", "index", "links"
-
-    def __init__(self, co, key, index):
-        self.co = co.copy()
-        self.key = key
-        self.index = index
-        self.links = []
-
-    def get_weight(self):
-        f = 0.0
-
-        for hub_other in self.links:
-            f += (self.co - hub_other.co).length
-
-    def replace(self, other):
-        for hub in self.links:
-            try:
-                hub.links.remove(self)
-            except:
-                pass
-            if other not in hub.links:
-                hub.links.append(other)
-
-    def dist(self, other):
-        return (self.co - other.co).length
-
-    def calc_faces(self, hub_ls):
-        faces = []
-        # first tris
-        for l_a in self.links:
-            for l_b in l_a.links:
-                if l_b is not self and l_b in self.links:
-                    # will give duplicates
-                    faces.append((self.index, l_a.index, l_b.index))
-
-        # now quads, check which links share 2 different verts directly
-        def validate_quad(face):
-            if len(set(face)) != len(face):
-                return False
-            if hub_ls[face[0]] in hub_ls[face[2]].links:
-                return False
-            if hub_ls[face[2]] in hub_ls[face[0]].links:
-                return False
-
-            if hub_ls[face[1]] in hub_ls[face[3]].links:
-                return False
-            if hub_ls[face[3]] in hub_ls[face[1]].links:
-                return False
-
-            return True
-
-        for i, l_a in enumerate(self.links):
-            links_a = {l.index for l in l_a.links}
-            for j in range(i):
-                l_b = self.links[j]
-
-                links_b = {l.index for l in l_b.links}
-
-                isect = links_a.intersection(links_b)
-                if len(isect) == 2:
-                    isect = list(isect)
-
-                    # check there are no diagonal lines
-                    face = (isect[0], l_a.index, isect[1], l_b.index)
-                    if validate_quad(face):
-
-                        faces.append(face)
-
-        return faces
-
-
-class BBox(object):
-    __slots__ = "xmin", "ymin", "zmin", "xmax", "ymax", "zmax"
-
-    def __init__(self):
-        self.xmin = self.ymin = self.zmin = 100000000.0
-        self.xmax = self.ymax = self.zmax = -100000000.0
-
-    @property
-    def xdim(self):
-        return self.xmax - self.xmin
-
-    @property
-    def ydim(self):
-        return self.ymax - self.ymin
-
-    @property
-    def zdim(self):
-        return self.zmax - self.zmin
-
-    def calc(self, points):
-        xmin = ymin = zmin = 100000000.0
-        xmax = ymax = zmax = -100000000.0
-
-        for pt in points:
-            x, y, z = pt
-            if x < xmin:
-                xmin = x
-            if y < ymin:
-                ymin = y
-            if z < zmin:
-                zmin = z
-
-            if x > xmax:
-                xmax = x
-            if y > ymax:
-                ymax = y
-            if z > zmax:
-                zmax = z
-
-        self.xmin, self.ymin, self.zmin = xmin, ymin, zmin
-        self.xmax, self.ymax, self.zmax = xmax, ymax, zmax
-
-    def xsect(self, other, margin=0.0):
-        if margin == 0.0:
-            if self.xmax < other.xmin:
-                return False
-            if self.ymax < other.ymin:
-                return False
-            if self.zmax < other.zmin:
-                return False
-
-            if self.xmin > other.xmax:
-                return False
-            if self.ymin > other.ymax:
-                return False
-            if self.zmin > other.zmax:
-                return False
-
-        else:
-            xmargin = ((self.xdim + other.xdim) / 2.0) * margin
-            ymargin = ((self.ydim + other.ydim) / 2.0) * margin
-            zmargin = ((self.zdim + other.zdim) / 2.0) * margin
-
-            if self.xmax < other.xmin - xmargin:
-                return False
-            if self.ymax < other.ymin - ymargin:
-                return False
-            if self.zmax < other.zmin - zmargin:
-                return False
-
-            if self.xmin > other.xmax + xmargin:
-                return False
-            if self.ymin > other.ymax + ymargin:
-                return False
-            if self.zmin > other.zmax + zmargin:
-                return False
-        return True
-
-    def __iadd__(self, other):
-        self.xmin = min(self.xmin, other.xmin)
-        self.ymin = min(self.ymin, other.ymin)
-        self.zmin = min(self.zmin, other.zmin)
-
-        self.xmax = max(self.xmax, other.xmax)
-        self.ymax = max(self.ymax, other.ymax)
-        self.zmax = max(self.zmax, other.zmax)
-        return self
-
-
-class Spline(object):
-    __slots__ = "points", "hubs", "closed", "length", "bb"
-
-    def __init__(self, points, precision):
-        self.points = points
-        self.hubs = []
-        self.calc_length()
-        self.closed = self.calc_closed(precision)
-        self.bb = BBox()
-        self.bb.calc(points)
-
-    def calc_length(self):
-        # calc length
-        f = 0.0
-        co_prev = self.points[0]
-        for co in self.points[1:]:
-            f += (co - co_prev).length
-            co_prev = co
-        self.length = f
-
-    def calc_closed(self, precision):
-        return (self.points[0] - self.points[-1]).length < (self.length / precision)
-
-    def link(self):
-        if len(self.hubs) < 2:
-            return
-
-        edges = list(set([i for i, hub in self.hubs]))
-        edges.sort()
-
-        edges_order = {}
-        for i in edges:
-            edges_order[i] = []
-
-        # self.hubs.sort()
-        for i, hub in self.hubs:
-            edges_order[i].append(hub)
-
-        hubs_order = []
-        for i in edges:
-            ls = edges_order[i]
-            edge_start = self.points[i]
-            ls.sort(key=lambda hub: (hub.co - edge_start).length)
-            hubs_order.extend(ls)
-
-        # Now we have the order, connect the hubs
-        hub_prev = hubs_order[0]
-
-        for hub in hubs_order[1:]:
-            hub.links.append(hub_prev)
-            hub_prev.links.append(hub)
-            hub_prev = hub
-
-        if self.closed:
-            hubs_order[0].links.append(hubs_order[-1])
-            hubs_order[-1].links.append(hubs_order[0])
-
-
-def get_points(stroke):
-    return [point.co.copy() for point in stroke.points]
-
-
-def get_splines(gp, precision):
-    l = gp.layers.active
-    if l:
-        frame = l.active_frame
-        return [Spline(get_points(stroke), precision) for stroke in frame.strokes if len(stroke.points) > 1]
-    else:
-        return []
-
-
-def xsect_spline(sp_a, sp_b, _hubs, precision):
-    pt_a_prev = pt_b_prev = None
-    EPS_SPLINE = min(sp_a.length, sp_b.length) / precision
-    pt_a_prev = sp_a.points[0]
-    for a, pt_a in enumerate(sp_a.points[1:]):
-        pt_b_prev = sp_b.points[0]
-        for b, pt_b in enumerate(sp_b.points[1:]):
-
-            # Now we have 2 edges
-            # print(pt_a, pt_a_prev, pt_b, pt_b_prev)
-            xsect = intersect_line_line(pt_a, pt_a_prev, pt_b, pt_b_prev)
-            if xsect is not None:
-                if (xsect[0] - xsect[1]).length <= EPS_SPLINE:
-                    f = intersect_point_line(xsect[1], pt_a, pt_a_prev)[1]
-                    # if f >= 0.0-EPS_SPLINE and f <= 1.0+EPS_SPLINE:
-                        # for some reason doesnt work so well, same below
-                    if f >= 0.0 and f <= 1.0:
-                        f = intersect_point_line(xsect[0], pt_b, pt_b_prev)[1]
-                        # if f >= 0.0-EPS_SPLINE and f <= 1.0+EPS_SPLINE:
-                        if f >= 0.0 and f <= 1.0:
-                            # This wont happen often
-                            co = xsect[0].lerp(xsect[1], 0.5)
-                            hub = get_hub(co, _hubs, EPS_SPLINE)
-
-                            sp_a.hubs.append((a, hub))
-                            sp_b.hubs.append((b, hub))
-
-            pt_b_prev = pt_b
-
-        pt_a_prev = pt_a
-
-
-def connect_splines(splines, precision):
-    HASH_PREC = 8
-    ANG_LIMIT = radians(25.0)  # limit for joining splines into 1
-
-    def sort_pair(a, b):
-        if a < b:
-            return a, b
-        else:
-            return b, a
-
-    #def test_join(p1a, p1b, p2a, p2b, length_average):
-    def test_join(s1, s2, dir1, dir2, length_average):
-        if dir1 is False:
-            p1a = s1.points[0]
-            p1b = s1.points[1]
-        else:
-            p1a = s1.points[-1]
-            p1b = s1.points[-2]
-
-        if dir2 is False:
-            p2a = s2.points[0]
-            p2b = s2.points[1]
-        else:
-            p2a = s2.points[-1]
-            p2b = s2.points[-2]
-
-        v1 = p1a - p1b
-        v2 = p2b - p2a
-
-        if v1.angle(v2, ANG_LIMIT) >= ANG_LIMIT:
-            return False
-
-        # trim s2, allow overlapping line.
-        v2_test_1 = p2b - p2a
-        if dir2 is False:
-            i = 2
-            while (p2b - p1a).length < (p2a - p1a).length and i < len(s2.points):
-                p2a = p2b
-                p2b = s2.points[i]
-                i += 1
-        else:
-            i = -3
-            while (p2b - p1a).length < (p2a - p1a).length and -i <= len(s2.points):
-                p2a = p2b
-                p2b = s2.points[i]
-                i -= 1
-
-        # when trimming did we we turn a corner?
-        v2_test_2 = p2b - p2a
-        if v2_test_1.angle(v2_test_2, ANG_LIMIT) >= ANG_LIMIT:
-            return False
-        del v2_test_1
-        del v2_test_2
-        # end trimming
-
-        # compare length between tips
-        if (p1a - p2a).length > (length_average / precision):
-            return False
-
-        # print("joining!")
-        return True
-
-    # lazy, hash the points that have been compared.
-    comparisons = set()
-
-    do_join = True
-    while do_join:
-        do_join = False
-        for i, s1 in enumerate(splines):
-            key1a = s1.points[0].to_tuple(HASH_PREC)
-            key1b = s1.points[-1].to_tuple(HASH_PREC)
-
-            for j, s2 in enumerate(splines):
-                if s1 is s2:
-                    continue
-
-                length_average = min(s1.length, s2.length)
-
-                key2a = s2.points[0].to_tuple(HASH_PREC)
-                key2b = s2.points[-1].to_tuple(HASH_PREC)
-
-                # there are 4 ways this may be joined
-                key_pair = sort_pair(key1a, key2a)
-                if key_pair not in comparisons:
-                    comparisons.add(key_pair)
-                    if test_join(s1, s2, False, False, length_average):
-                        s1.points[:0] = reversed(s2.points)
-                        s1.bb += s2.bb
-                        s1.calc_length()
-                        del splines[j]
-                        do_join = True
-                        break
-
-                key_pair = sort_pair(key1a, key2b)
-                if key_pair not in comparisons:
-                    comparisons.add(key_pair)
-                    if test_join(s1, s2, False, True, length_average):
-                        s1.points[:0] = s2.points
-                        s1.bb += s2.bb
-                        s1.calc_length()
-                        del splines[j]
-                        do_join = True
-                        break
-
-                key_pair = sort_pair(key1b, key2b)
-                if key_pair not in comparisons:
-                    comparisons.add(key_pair)
-                    if test_join(s1, s2, True, True, length_average):
-                        s1.points += list(reversed(s2.points))
-                        s1.bb += s2.bb
-                        s1.calc_length()
-                        del splines[j]
-                        do_join = True
-                        break
-
-                key_pair = sort_pair(key1b, key2a)
-                if key_pair not in comparisons:
-                    comparisons.add(key_pair)
-                    if test_join(s1, s2, True, False, length_average):
-                        s1.points += s2.points
-                        s1.bb += s2.bb
-                        s1.calc_length()
-                        del splines[j]
-                        do_join = True
-                        break
-
-            if do_join:
-                break
-
-
-def calculate(gp, precision):
-    # note, this precision is for closed lines, it could be a different arg.
-    splines = get_splines(gp, precision)
-
-    # spline endpoints may be co-linear, join these into single splines
-    connect_splines(splines, precision)
-
-    _hubs = {}
-
-    for i, sp in enumerate(splines):
-        for j, sp_other in enumerate(splines):
-            if j <= i:
-                continue
-
-            if sp.bb.xsect(sp_other.bb, margin=0.1):
-                xsect_spline(sp, sp_other, _hubs, precision)
-
-    for sp in splines:
-        sp.link()
-
-    # remove these
-    hubs_ls = [hub for hub in _hubs.values() if hub.index != -1]
-
-    _hubs.clear()
-    _hubs = None
-
-    for i, hub in enumerate(hubs_ls):
-        hub.index = i
-
-    # Now we have connected hubs, write all edges!
-    def order(i1, i2):
-        if i1 > i2:
-            return i2, i1
-        return i1, i2
-
-    edges = {}
-
-    for hub in hubs_ls:
-        i1 = hub.index
-        for hub_other in hub.links:
-            i2 = hub_other.index
-            edges[order(i1, i2)] = None
-
-    verts = []
-    edges = edges.keys()
-    faces = []
-
-    for hub in hubs_ls:
-        verts.append(hub.co)
-        faces.extend(hub.calc_faces(hubs_ls))
-
-    # remove double faces
-    faces = dict([(tuple(sorted(f)), f) for f in faces]).values()
-
-    mesh = bpy.data.meshes.new("Retopo")
-    mesh.from_pydata(verts, [], faces)
-
-    scene = bpy.context.scene
-    mesh.update()
-    obj_new = bpy.data.objects.new(name="Retopo", object_data=mesh)
-    scene.objects.link(obj_new)
-
-    return obj_new
diff --git a/release/scripts/addons_contrib/gyes/__init__.py b/release/scripts/addons_contrib/gyes/__init__.py
deleted file mode 100644
index 221d105..0000000
--- a/release/scripts/addons_contrib/gyes/__init__.py
+++ /dev/null
@@ -1,89 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-""" Copyright  Kilon 2011 GPL licence applies"""
-
-bl_info = {
-    "name": "Gyes (Random Materials and Textures Generator)",
-    "description": "GYES is an addon that can produce Random Materials and Textures . The randomization is controlled by the user and so the user can set what is randomized and how much .",
-    "author": "Kilon",
-    "version": (1, 0, 0),
-    "blender": (2, 6, 0),
-    "location": "View3D > Left panel ",
-    "warning": '',  # used for warning icon and text in addons panel
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/System/Gyes",
-    "tracker_url": "https://github.com/kilon/Gyes",
-    "category": "Material"}
-
-if "bpy" in locals():
-    import imp
-    imp.reload(random_material_generator)
-    imp.reload(random_texture_generator)
-    #imp.reload(random_landscape_generator)
-else:
-    from gyes import random_material_generator
-    from gyes import random_texture_generator
-    #from gyes import random_landscape_generator
-import bpy
-from bpy.props import *
-
-
-# Choose the tool you want to use
-bpy.types.Scene.tool = EnumProperty(attr='tool', name='Tool', items=(
-('RMG', 'RMG', 'Random Material Generator'),
-('RTG', 'RTG', 'Random Texture Generator')), default='RMG')
-
-rm = random_material_generator.rm
-rt = random_texture_generator.rt
-
-
-# this the main panel
-class gyes_panel(bpy.types.Panel):
-    bl_label = "Gyes"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-    bl_options = {'DEFAULT_CLOSED'}   
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row.prop(context.scene , "tool" )
-        
-        # check which tool the user has selected (RGM is the default one) and display the appropriate gui
-        
-        if context.scene.tool == 'RMG':
-            rm.draw_gui(context,self)
-        
-        if context.scene.tool == 'RTG':
-            rt.draw_gui(context,self,rm)
- 
-        r = layout.row()
-        if context.scene.tool == 'RLG':
-            r.label(text="WIP not finished yet")
-        if context.scene.tool == 'TARTARA':
-            r.label(text="WIP not finished yet")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
- 
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/gyes/random_material_generator.py b/release/scripts/addons_contrib/gyes/random_material_generator.py
deleted file mode 100644
index a6647a6..0000000
--- a/release/scripts/addons_contrib/gyes/random_material_generator.py
+++ /dev/null
@@ -1,734 +0,0 @@
-# -*- coding: UTF-8 -*-
-# first we import all the required modules
-
-import bpy ,random , copy 
-from bpy.props import *
-import textwrap
-
-def h_names(self,contex):
-    h_list=list(rm.rm_history)
-    h_list.sort()
-    names=[]
-    for x in h_list:
-        names=names+[(x,x,x)]
-    return names 
-
-class random_material_class:
-    """ this class contains all fuctions and variables concerning generation of random material """
-    
-    def __init__(self):
-        """ several fuctions can be found here . All options for random generation . The History dictionary and several others."""
-                   
-        # various gui modes (simple, template etc)
-        bpy.types.Scene.gui_mode = EnumProperty(attr='mode', name='Mode', items=(
-('enable', 'Enable', 'Enable Disable material parameters for randomisation'),
-('percentage', 'Percentage' , 'here you define the percentage randomisation for each parameter'),
-('help', 'Help', 'Help documentation')), default='enable')
-
-        # Here I define the selective areas that the user can enable or disable for randomisation in simple mode               
-                     
-        bpy.types.Scene.rdiffuse_shader = BoolProperty(name= "Diffuse Shader" ,description = "Enable/Disable Randomisation for the  Diffuse Shader " , default = True)
-        bpy.types.Scene.rdiffuse_color = BoolProperty(name= "Diffuse Color" ,description = "Enable/Disable Randomisation for the Diffuse Color", default = True  )
-        bpy.types.Scene.rdiffuse_intensity = BoolProperty(name= "Diffuse Intensity" ,description = "Enable/Disable Randomisation for the Diffuse Intensity" , default = True )    
-        bpy.types.Scene.rspecular_color = BoolProperty(name= "Specular Color" ,description = "Enable/Disable Randomisation for the Specular Color" , default = True)
-        bpy.types.Scene.rspecular_shader = BoolProperty(name= "Specular Shader" ,description = "Enable/Disable Randomisation for the Specular Shader" , default = True)
-        bpy.types.Scene.rspecular_intensity = BoolProperty(name= "Specular Intensity" ,description = "Enable/Disable Randomisation for the Specular Intensity" , default = True)
-        bpy.types.Scene.rspecular_hardness = BoolProperty(name= "Specular Hardness" ,description = "Enable/Disable Randomisation for the Specular Hardness" , default = True)
-        bpy.types.Scene.rtransparency = BoolProperty(name= "Transparency" ,description = "Use and Randomise Transparency" , default = True)
-        bpy.types.Scene.rtexture = BoolProperty(name= "Texture" ,description = "Use and Randomise Textures" , default = True)
-        
-        # Percentage randomisation
-        bpy.types.Scene.general_percentage = IntProperty(name="General percentage", description = " General percentage of randomisation" , min = 0 , max = 100 , default = 100, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rdiffuse_shader_percentage =  IntProperty(name="Diffuse shader", description = " Diffuse shader percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rdiffuse_color_percentage =  IntProperty(name="Diffuse Color", description = " Diffuse Color percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rdiffuse_intensity_percentage =  IntProperty(name="Diffuse Intensity", description = " Diffuse Intensity percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rspecular_color_percentage =  IntProperty(name="Specular Color", description = " Specular Color percentage of randomisation" , min = 0 , max = 100 , default = 0 , subtype = 'PERCENTAGE')
-        bpy.types.Scene.rspecular_shader_percentage =  IntProperty(name="Specular Shader", description = " Specular Shader percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rspecular_intensity_percentage =  IntProperty(name="Specular Intensity", description = " Specular Intensity percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rspecular_hardness_percentage =  IntProperty(name="Specular Hardness", description = " Specular Hardness percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtransparency_percentage =  IntProperty(name="Transparency", description = " Transparency percentage of randomisation" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        
-        # this is the dictionary that stores history
-        bpy.types.Scene.history_index = IntProperty(name= "History Index" ,description = "The Number of Random Material Assigned to the Active MAterial of the Selected Object from the history" , default = 1, min = 1 )
-        bpy.types.Scene.filter = StringProperty(name="Filter", description ="Filter text , only if the text matches even partially with the material name will be stored")
-        self.rm_history={"slot 01":{1:{}} , "slot 02":{1:{}} , "slot 03":{1:{}} ,"slot 04":{1:{}} ,"slot 05":{1:{}} ,"slot 06":{1:{}} ,
-                         "slot 07":{1:{}} ,"slot 08":{1:{}} , "slot 09":{1:{}} , "slot 10":{1:{}} ,"slot 11":{1:{}} ,"slot 12":{1:{}} }
-        self.delete_start_index=1
-        bpy.types.Scene.h_selected = EnumProperty(attr='name', name='Name :', items=h_names)
-        
-        
-        # the prop that controls the text wrap in help menu
-        bpy.types.Scene.text_width = IntProperty(name = "Text Width" , description = "The width above which the text wraps" , default = 20 , max = 180 , min = 1)
-        
-        # here is where history dictionary is saved with the blend file
-        # if the backup is already saved with the blend file it is used 
-        # to restory the history dictionary , if not it is created
-        
-        if hasattr(bpy.context.scene , "historybak")==False:
-            bpy.types.Scene.historybak = StringProperty()
-            print("Gyes log : created history backup")
-            
-         # non read only material properties where keyframes can be inserted or removed
-        self.animated_properties=["alpha",
-        "ambient",
-        "darkness",
-        "diffuse_color",
-        "diffuse_fresnel",
-        "diffuse_fresnel_factor",
-        "diffuse_intensity",
-        "diffuse_ramp_blend",
-        "diffuse_ramp_factor",
-        "diffuse_ramp_input",
-        "diffuse_shader",
-        "diffuse_toon_size",
-        "diffuse_toon_smooth",
-        "emit",
-        "invert_z",
-        "mirror_color",
-        "offset_z",
-        "preview_render_type",
-        "roughness",
-        "shadow_buffer_bias",
-        "shadow_cast_alpha",
-        "shadow_only_type",
-        "shadow_ray_bias",
-        "specular_alpha",
-        "specular_color",
-        "specular_hardness",
-        "specular_intensity",
-        "specular_ior",
-        "specular_ramp_blend",
-        "specular_ramp_factor",
-        "specular_ramp_input",
-        "specular_shader",
-        "specular_slope",
-        "specular_toon_size",
-        "specular_toon_smooth",
-        "translucency",
-        "transparency_method",
-        "type",
-        "use_cast_approximate",
-        "use_cast_buffer_shadows",
-        "use_cast_shadows_only",
-        "use_cubic",
-        "use_diffuse_ramp",
-        "use_face_texture",
-        "use_face_texture_alpha",
-        "use_full_oversampling",
-        "use_light_group_exclusive",
-        "use_mist",
-        "use_nodes",
-        "use_object_color",
-        "use_only_shadow",
-        "use_ray_shadow_bias",
-        "use_raytrace",
-        "use_shadeless",
-        "use_shadows",
-        "use_sky",
-        "use_specular_ramp",
-        "use_tangent_shading",
-        "use_textures",
-        "use_transparency",
-        "use_transparent_shadows",
-        "use_vertex_color_paint"]
-            
-    
-       
-    # compute randomisation based on the general or specific percentage chosen
-    # if the specific percentage is zero then the general percentage is used
-    def compute_percentage(self,min,max,value,percentage):
-        range = max-min
-        general_percentage = bpy.context.scene.general_percentage
-        
-        if percentage == 0:
-            percentage_random = ( value -((range*(general_percentage/100))/2) )+ (range * (general_percentage / 100) * random.random())
-        else:
-            percentage_random = ( value - ((range*(percentage/100))/2)) + (range * (percentage / 100) * random.random())
-             
-        if percentage_random > max:
-            percentage_random = max
-        if percentage_random < min:
-            percentage_random = min
-        
-        return percentage_random 
-    
-    #deletes from history an index but without leaving empty spaces, everythings is pushed back    
-    def delete_from_history(self):
-        h_name = bpy.context.scene.h_selected
-        length = len(self.rm_history[h_name])
-        index = bpy.context.scene.history_index
-        for x in range(index , length):
-            if index != length :
-                self.rm_history[h_name][x]= self.rm_history[h_name][x+1] 
-        del self.rm_history[h_name][length]
-        length = len(self.rm_history[h_name]) 
-        if index <= length:
-            self.activate()
-            
-        bpy.context.scene.historybak = str(self.rm_history)
-    
-    # the fuction that randomises the material 
-    def random_material(self,active_material,name):
-        mat = active_material
-        scn = bpy.context.scene
-             
-        #checks that the user has allowed the randomisation of that specific parameter            
-        if scn.rdiffuse_color:
-            rand_perc = scn.rdiffuse_color_percentage
-            mat.diffuse_color = (self.compute_percentage(0,1,mat.diffuse_color[0],rand_perc),
-            self.compute_percentage(0,1,mat.diffuse_color[1],rand_perc),
-            self.compute_percentage(0,1,mat.diffuse_color[2],rand_perc))
-            
- 
-        if scn.rdiffuse_shader:
-            mat.diffuse_shader = random.choice(['LAMBERT','FRESNEL','TOON','MINNAERT'])
-    
-        if scn.rdiffuse_intensity:
-            mat.diffuse_intensity = self.compute_percentage(0,1, mat.diffuse_intensity , scn.rdiffuse_intensity_percentage) 
-    
-        if scn.rspecular_color:
-            rand_perc = scn.rspecular_color_percentage
-            mat.specular_color = (self.compute_percentage(0,1,mat.specular_color[0],rand_perc),
-            self.compute_percentage(0,1,mat.specular_color[1],rand_perc),
-            self.compute_percentage(0,1,mat.specular_color[2],rand_perc))
-    
-        if scn.rspecular_shader:
-            mat.specular_shader = random.choice(['COOKTORR','WARDISO','TOON','BLINN','PHONG'])
-    
-        if scn.rspecular_intensity:
-            mat.specular_intensity =  self.compute_percentage(0,1, mat.specular_intensity , scn.rspecular_intensity_percentage)
-    
-        if scn.rspecular_hardness:
-            mat.specular_hardness =  round(self.compute_percentage(1,511, mat.specular_hardness, scn.rspecular_shader_percentage))
-            
-        mat.use_transparency = scn.rtransparency 
-        
-        if mat.use_transparency == True :
-            mat.transparency_method == random.choice(['MASK', 'Z_TRANSPARENCY', 'RAYTRACE'])
-            mat.alpha = self.compute_percentage(0,1, mat.alpha, scn.rtransparency_percentage)
-  
-            if mat.transparency_method == 'MASK' :
-                bing =0     # dummy code
-                
-            if mat.transparency_method == 'Z_TRANSPARENCY' :
-                bing =0     # dummy code
-                mat.specular_alpha= random.random()
-        
-        if scn.rtexture :
-            bpy.ops.gyes.random_texture()
-            
-        mat.ambient = self.compute_percentage(0,1, mat.ambient, scn.general_percentage)
-        
-        # after you finishes randomisation store the random material to history
-        self.store_to_history(mat)
-          
-        return mat
-
-   
-    #store active material to history
-    def store_to_history(self, mat):
-        scn = bpy.context.scene
-        history_index = scn.history_index
-        h_name = scn.h_selected
-        self.rm_history[h_name][history_index]={"name" : mat.name}
-        print("Gyes log : mat stored : "+self.rm_history[h_name][history_index]["name"]+" in history name : "+h_name+" in index : "+str(history_index))
-        mat.use_fake_user = True
-                 
-        bpy.context.scene.historybak = str(self.rm_history)
-        
-    # Activate. Make active material the particular history index the user has chosen
-    def activate(self, random_assign = False):
-        h_name = bpy.context.scene.h_selected
-        for i in bpy.context.selected_objects :
-            
-            if random_assign == False and ( bpy.context.scene.history_index in rm.rm_history[h_name] ) and rm.rm_history[h_name][bpy.context.scene.history_index] and rm.rm_history[h_name][bpy.context.scene.history_index]["name"]:                
-                scn = bpy.context.scene
-                mat = i.active_material
-                index = scn.history_index
-                
-                if len(i.material_slots) == 0:
-                    print("Gyes log : no slot found creating a new one")
-                    i.active_material= bpy.data.materials[self.rm_history[h_name][index]["name"]]
-                else:
-                    print("Gyes log : found slot assigning material")
-                    i.material_slots[i.active_material_index].material= bpy.data.materials[self.rm_history[h_name][index]["name"]]
-                
-            if random_assign == True and ( bpy.context.scene.history_index in rm.rm_history[h_name] ) and rm.rm_history[h_name][bpy.context.scene.history_index] and rm.rm_history[h_name][bpy.context.scene.history_index]["name"]:
-            
-                index = round(len(self.rm_history) * random.random())
-                
-                if index == 0 :
-                    index = 1
-                    
-                scn = bpy.context.scene
-                mat = i.active_material
-                scn.history_index=index
-                
-                if len(i.material_slots) == 0:
-                    print("Gyes log : no slot found creating a new one")
-                    i.active_material= bpy.data.materials[self.rm_history[h_name][index]["name"]]
-                else:
-                    print("Gyes log : found slot assigning material")
-                    i.material_slots[i.active_material_index].material= bpy.data.materials[self.rm_history[h_name][index]["name"]]
-              
-            
-            
-                   
-    # a nice multi label                        
-    def multi_label(self, text, ui,text_width):
-        
-        for x in range(0,len(text)):
-            el = textwrap.wrap(text[x], width = text_width)
-            
-            for y in range(0,len(el)):
-                ui.label(text=el[y])
-                
-    def draw_gui(self ,context,panel):
-        layout = panel.layout
-        row = layout.row()
-        
-        row.prop(context.scene , "gui_mode" )
-        
-        # check which Gui mode the user has selected (Simple is the default one and display the appropriate gui
-        
-        if context.scene.gui_mode == 'enable' :
-            
-            box = layout.box()
-            
-            box.prop(context.scene,"rdiffuse_shader", toggle = True)
-            box.prop(context.scene,"rdiffuse_color", toggle = True)
-            box.prop(context.scene,"rdiffuse_intensity", toggle = True)
-            box.prop(context.scene,"rspecular_shader", toggle = True)
-            box.prop(context.scene,"rspecular_color", toggle = True)
-            box.prop(context.scene,"rspecular_intensity", toggle = True)
-            box.prop(context.scene,"rspecular_hardness", toggle = True)
-            box.prop(context.scene,"rtransparency", toggle = True)
-            box.prop(context.scene,"rtexture", toggle = True)
-            
-            box.prop(context.scene,"general_percentage", slider = True)           
-            layout.operator("gyes.random_material")
-            
-        if context.scene.gui_mode == 'percentage' :
-            box = layout.box()
-            
-            if context.scene.rdiffuse_shader :
-                box.prop(context.scene,"rdiffuse_shader_percentage", slider = True)
-            else:
-                box.label(text="Diffuse Shader is disabled ")
-                
-            if context.scene.rdiffuse_color :
-                box.prop(context.scene,"rdiffuse_color_percentage", slider = True)
-            else:
-                box.label(text="Diffuse Color is disabled ")
-                
-            if context.scene.rdiffuse_intensity :
-                box.prop(context.scene,"rdiffuse_intensity_percentage", slider = True)
-            else:
-                box.label(text="Diffuse Intensity is disabled ")
-                
-            if context.scene.rspecular_shader :
-                box.prop(context.scene,"rspecular_shader_percentage", slider = True)
-            else:
-                box.label(text="Specular Shader is disabled ")
-                
-            if context.scene.rspecular_color :
-                box.prop(context.scene,"rspecular_color_percentage", slider = True)
-            else:
-                box.label(text="Specular Color is disabled ")
-                
-            if context.scene.rspecular_intensity :
-                box.prop(context.scene,"rspecular_intensity_percentage", slider = True)
-            else:
-                box.label(text="Specular Intensity is disabled ")
-                
-            if context.scene.rspecular_hardness :
-                box.prop(context.scene,"rspecular_hardness_percentage", slider = True)
-            else:
-                box.label(text="Specular Hardness is disabled ")
-            
-            if context.scene.rtransparency :
-                box.prop(context.scene,"rtransparency_percentage", slider = True)
-            else:
-                box.label(text="Transparency is disabled ")
-                
-            box.prop(context.scene,"general_percentage", slider = True)
-            layout.operator("gyes.random_material")
-        
-                           
-        if context.scene.gui_mode== 'help' :
-            box = layout.box()
-            help_text=["","Copyright 2011 Kilon  ",
-            "GYES - RGM",    
-            "Random Material  Generator",
-            "A tool that generates random materials.",
-            "",
-            "Simple Mode",
-            "--------------------------",
-            "In this mode you can do basic randomisation. Choose parameters you want to randomise by turning them on or off with clicking on them. Hit the random button when you are ready. Each time you hit the button the new random material is stored in a history index",
-            "",
-            "History",
-            "--------------------------",
-            "History index -> choose index",
-            "( < ) -> Previous index (activate)",
-            "( > ) -> Next index (activate)",
-            "( |< ) -> First history index",
-            "( >| ) -> Last history index",
-            "Activate -> use this index as active material",
-            "Animate -> Insert a keyframe in the current frame for every singly non read only material property",
-            "X -> Remove a keyframe in the current frame for every singly non read only material property",
-            "R -> works just like activate but instead of using the current selected index use a randomly selected one",
-            "Delete -> delete this index",
-            "Del start -> start deletion from here",
-            "Del end -> end deletion here",
-            "Restore -> restores history from the saved blend file",
-            "",
-            "Percentage",
-            "--------------------------",
-            "Percentage randomisation means that the parameter is randomised inside a range of percentage of the full range of the value. When a specific percentage is zero, the general percentage is used instead for that area. When a specific percentage is not zero then general percentage is ignored and specific percentage is used instead. If you dont want to randomise that area at all, in Simple Mode use the corresponding button to completely disable that area , the percentage slider will also be disable in the percentage mode. Randomisation takes always the current value as starting point so the next randomisation will use the current randomised value. Randomisation is always 50% of the specific percentage bellow the current value and 50% above . If the percentage exceeed minimum and maximum values of the full range, then it will default to minimum and maximum accordingly. "]
-            w=bpy.context.scene.text_width
-            box.prop(context.scene,"text_width", slider =True)
-            self.multi_label(help_text,box,w) 
-                                
-        # Display the History Gui for all modes
-        h_name=bpy.context.scene.h_selected
-        layout.label(text="History (RMG + RTG)")
-        history_box= layout.box()
-        history_box.prop(context.scene, "h_selected")
-        history_box.prop(context.scene, "history_index")
-        row = history_box.row()
-        row.operator("gyes.first")
-        row.operator("gyes.previous")
-        row.operator("gyes.next")
-        row.operator("gyes.last")
-        rm_index = context.scene.history_index
-        
-        if rm_index in self.rm_history[h_name] and self.rm_history[h_name][rm_index] :
-            row = history_box.row()
-            a = row.split(percentage = 0.3, align = True)
-            a.operator("gyes.activate")
-            a.operator("gyes.animate")
-            b=a.split(percentage = 0.3, align = True)
-            b.operator("gyes.x")
-            b.operator("gyes.random_activate")                       
-        else:
-            
-            row = history_box.row()
-            a = row.split(percentage = 0.3, align = True)
-            a.label(text= "Empty Index ! ")
-            a.operator("gyes.animate")
-            b=a.split(percentage = 0.3, align = True)
-            b.operator("gyes.x")
-            b.operator("gyes.random_activate")  
-        
-        if context.scene.history_index < len(self.rm_history[h_name])+2:
-            history_box.operator("gyes.store")
-        else:
-            history_box.label(text= "Not the first Empty Index")
-            
-        if rm_index in self.rm_history[h_name] and self.rm_history[h_name][rm_index] :
-            history_box.operator("gyes.delete")
-            row2 = history_box.row()
-            row2.operator("gyes.delete_start")
-            row2.operator("gyes.delete_end")
-            
-        if hasattr(bpy.context.scene,"historybak") and bpy.context.scene.historybak!='':
-            history_box.operator("gyes.restore")
-        else:
-            history_box.label(text="Backup not Found")
-        history_box.prop(context.scene,"filter")
-        history_box.operator("gyes.import_materials")                            
-# create the instance class for randomisation   
-rm =random_material_class()
-
-            
-        
-# Generate the random material button
-class gyes_random_material(bpy.types.Operator):
-    
-    bl_idname = "gyes.random_material"
-    bl_label = "Random Material"
-    label = bpy.props.StringProperty()
-    bl_description = "Generate the random material"
-    
-    def execute(self, context):
-        for i in context.selected_objects :
-            if not i.material_slots:
-                print("Gyes log : no material_slot found , creating new with material")
-                new_random = bpy.data.materials.new("Random")
-                i.active_material=new_random
-                rm.random_material(i.active_material,'Random')
-
-
-            if i.material_slots[0].material:
-                print("Gyes log : found an existing material, using this one ")
-                rm.random_material(i.active_material,'Random')
-
-            if not i.material_slots[0].material:
-                print("Gyes log : no material found , creating new")
-                new_random = bpy.data.materials.new("Random")
-                i.active_material=new_random
-                rm.random_material(i.active_material,'Random')
-
-        return{'FINISHED'}
-
-# Move to the first history index and activate it
-class history_first(bpy.types.Operator):
-    
-    bl_label = "|<"
-    bl_idname = "gyes.first"
-    bl_description = "Move to the first history index and activate it"
-    
-    def execute(self, context):
-        context.scene.history_index = 1 
-        rm.activate()
-        
-        return{'FINISHED'}
-
-# Move to the previous hisory index and activate it
-class history_previous(bpy.types.Operator):
-    
-    bl_label = "<"
-    bl_idname = "gyes.previous"
-    bl_description = "Move to the previous history index and activate it"
-    
-    def execute(self, context):
-        if context.scene.history_index > 1 :
-            context.scene.history_index = context.scene.history_index -1
-            rm_index = context.scene.history_index
-            h_name = bpy.context.scene.h_selected
-            if rm_index in rm.rm_history[h_name] and rm.rm_history[h_name][rm_index]:
-                rm.activate()
-        
-        return{'FINISHED'}
-
-# Move to the next hisory index and activate it
-class history_next(bpy.types.Operator):
-    
-    bl_label = ">"
-    bl_idname = "gyes.next"
-    bl_description = "Move to the next history index and activate it"
-    
-    def execute(self, context):
-        if context.scene.history_index > 0 :
-            context.scene.history_index = context.scene.history_index +1
-            rm_index = context.scene.history_index
-            h_name = bpy.context.scene.h_selected
-            if rm_index in rm.rm_history[h_name] and rm.rm_history[h_name][rm_index]:
-                rm.activate()
-        
-        return{'FINISHED'}
-    
-
-# Move to the last hisory index and activate it
-class history_last(bpy.types.Operator):
-    
-    bl_label = ">|"
-    bl_idname = "gyes.last"
-    bl_description = "Move to the last history index and activate it"
-    
-    def execute(self, context):
-        h_name= bpy.context.scene.h_selected
-        index = rm.rm_history[h_name] 
-        context.scene.history_index = len(index) 
-        rm.activate()
-        
-        return{'FINISHED'}
-
-# The current history index becomes the active material 
-class history_activate(bpy.types.Operator):
-    
-    bl_label = "Activate"
-    bl_idname = "gyes.activate"
-    bl_description = "The current history index becomes the active material"
-    
-    def execute(self, context):
-        rm_index = context.scene.history_index
-        h_name = bpy.context.scene.h_selected
-        if rm.rm_history[h_name][rm_index] != {}:
-            rm.activate()
-        
-        return{'FINISHED'}
-
-# A random history index becomes the active material 
-class history_random_activate(bpy.types.Operator):
-    
-    bl_label = "R"
-    bl_idname = "gyes.random_activate"
-    bl_description = "A random history index becomes the active material"
-    
-    def execute(self, context):
-        rm_index = context.scene.history_index
-        h_name = bpy.context.scene.h_selected
-        if rm.rm_history[h_name][rm_index] != {}:
-            rm.activate(random_assign = True)
-        
-        return{'FINISHED'}
-
-
-# It stores current active material to the selected history index
-class store_to_history(bpy.types.Operator):
-    
-    bl_label = "Store"
-    bl_idname = "gyes.store"
-    bl_description = " It stores current active material to the selected history index"
-    
-    def execute(self, context):
-        mat = context.selected_objects[0].active_material
-        rm.store_to_history(mat)
-                 
-        return{'FINISHED'}
-
-# Delete selected history index from history
-class delete_from_history(bpy.types.Operator):
-    
-    bl_label = "Delete"
-    bl_idname = "gyes.delete"
-    bl_description = "Delete selected history index from history"
-    
-    def execute(self, context):
-        rm.delete_from_history()
-        
-        return{'FINISHED'}
-               
-# Start deletion from this index
-class delete_from_history_start(bpy.types.Operator):
-    
-    bl_label = "Del Start"
-    bl_idname = "gyes.delete_start"
-    bl_description = "Start deletion from this index"
-    
-    def execute(self, context):
-        rm_index = context.scene.history_index
-        rm.delete_start_index = rm_index
-        
-        return{'FINISHED'}   
-
-# End deletion here and delete all selected indices
-class delete_from_history_end(bpy.types.Operator):
-    
-    bl_label = "Del End"
-    bl_idname = "gyes.delete_end"
-    bl_description = "End deletion here and delete all selected indices"
-    
-    def execute(self, context):
-        delete_end_index = context.scene.history_index
-        context.scene.history_index = rm.delete_start_index
-        for x in range ( rm.delete_start_index , delete_end_index):
-            rm.delete_from_history()
-        
-        return{'FINISHED'} 
-    
-# End deletion here and delete all selected indices
-class restore_history(bpy.types.Operator):
-    
-    bl_label = "Restore"
-    bl_idname = "gyes.restore"
-    bl_description = "Restore history"
-    
-    def execute(self, context):
-        
-        s=""
-        s = bpy.context.scene.historybak
-       
-        rm.rm_history=eval(s)
-        
-        print("Gyes log : restored history dictionary") 
-        
-        return{'FINISHED'} 
-    
-# Animate inserts a keyframe for every randomised material parameter except nodes
-class animate(bpy.types.Operator):
-    
-    bl_label = "Animate"
-    bl_idname = "gyes.animate"
-    bl_description = "Animate inserts a keyframe for every non read only material parameter"
-    
-    def execute(self, context):
-        framen = bpy.context.scene.frame_current
-        for i in range(0,len(bpy.context.selected_objects)):
-            mat = bpy.context.selected_objects[i].active_material
-                        
-            for y in range(0,len(rm.animated_properties)):
-                mat.keyframe_insert(data_path = rm.animated_properties[y], frame = framen)
-        
-        return{'FINISHED'}
- 
-# Remove Animation
-class x(bpy.types.Operator):
-    
-    bl_label = "X"
-    bl_idname = "gyes.x"
-    bl_description = "Reverse Animate by deleting every keyframe inserted by animate for every non read only material parameter"
-    
-    def execute(self, context):
-        framen = bpy.context.scene.frame_current
-        for i in range(0,len(bpy.context.selected_objects)):
-            mat = bpy.context.selected_objects[i].active_material
-            
-            for y in range(0,len(rm.animated_properties)):
-                mat.keyframe_delete(data_path = rm.animated_properties[y], frame = framen)
-        
-        return{'FINISHED'}
-
-# Move to the first history index and activate it
-class import_materials(bpy.types.Operator):
-    
-    bl_label = "Import"
-    bl_idname = "gyes.import_materials"
-    bl_description = "Import all materials matching filter in the active history"
-    
-    def execute(self, context):
-        filter = bpy.context.scene.filter
-        h_name = bpy.context.scene.h_selected
-        bpy.context.scene.history_index = len(rm.rm_history[h_name])+1
-        for mat in bpy.data.materials:
-            if filter in mat.name:
-                rm.store_to_history(mat)
-                bpy.context.scene.history_index = bpy.context.scene.history_index+1
-                    
-                
-                
-        
-        return{'FINISHED'}
-
-
-
-
-
-#registration is necessary for the script to appear in the GUI
-def register():
-    bpy.utils.register_class(gyes_panel)
-    bpy.utils.register_class(gyes_random_material)
-    bpy.utils.register_class(history_previous)
-    bpy.utils.register_class(history_next)
-    bpy.utils.register_class(history_activate)
-    bpy.utils.register_class(history_random_activate)
-    bpy.utils.register_class(store_to_history)
-    bpy.utils.register_class(delete_from_history)
-    bpy.utils.register_class(delete_from_history_start)
-    bpy.utils.register_class(delete_from_history_end)
-    bpy.utils.register_class(history_first)
-    bpy.utils.register_class(history_last)
-    bpy.utils.register_class(restore_history)
-    bpy.utils.register_class(animate)
-    bpy.utils.register_class(x)
-    bpy.utils.register_class(import_materials)
-def unregister():
-    bpy.utils.unregister_class(gyes_panel)
-    bpy.utils.unregister_class(gyes_random_material)
-    bpy.utils.unregister_class(history_previous)
-    bpy.utils.unregister_class(history_next)
-    bpy.utils.unregister_class(history_activate)
-    bpy.utils.unregister_class(history_random_activate)
-    bpy.utils.unregister_class(store_to_history)
-    bpy.utils.unregister_class(delete_from_history)
-    bpy.utils.unregister_class(delete_from_history_start)
-    bpy.utils.unregister_class(delete_from_history_end)
-    bpy.utils.unregister_class(history_first)
-    bpy.utils.unregister_class(history_last)
-    bpy.utils.unregister_class(restore_history)
-    bpy.utils.unregister_class(animate)
-    bpy.utils.unregister_class(x)
-    bpy.utils.unregister_class(import_materials)
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/gyes/random_texture_generator.py b/release/scripts/addons_contrib/gyes/random_texture_generator.py
deleted file mode 100644
index c3e33fc..0000000
--- a/release/scripts/addons_contrib/gyes/random_texture_generator.py
+++ /dev/null
@@ -1,791 +0,0 @@
-# -*- coding: UTF-8 -*-
-# first we import all the required modules
-
-import bpy ,random , copy 
-from bpy.props import *
-import textwrap
-
-class random_texture_class:
-    """ this class contains all fuctions and variables concerning generation of random material """
-    
-    def __init__(self):
-        """ several fuctions can be found here . All options for random generation . The History dictionary and several others."""
-                   
-        # various gui modes (simple, template etc)
-        bpy.types.Scene.rtexture_gui_mode = EnumProperty(attr='mode', name='Mode', items=(
-('enable', 'Enable', 'Enable Disable texture parameters for randomisation'),
-('percentage', 'Percentage' , 'here you define percentage of randomisation for each texture parameters'),
-('help', 'Help', 'Help documentation')), default='enable')
-
-        # Here I define the selective areas that the user can enable or disable for randomisation in simple mode               
-        bpy.types.Scene.rtexture_type = EnumProperty(attr='type', name='type', items=(
-('RANDOM','RANDOM','RANDOM'),
-('BLEND','BLEND','BLEND'),
-('CLOUDS','CLOUDS','CLOUDS'),
-('DISTORTED_NOISE','DISTORTED_NOISE','DISTORTED_NOISE'),
-#('ENVIRONMENT_MAP','ENVIRONMENT_MAP','ENVIRONMENT_MAP'),
-#('IMAGE','IMAGE','IMAGE'),
-('MAGIC','MAGIC','MAGIC'),
-('MARBLE','MARBLE','MARBLE'),
-('MUSGRAVE','MUSGRAVE','MUSGRAVE'),
-('NOISE','NOISE','NOISE'),
-#('POINT_DENSITY','POINT_DENSITY','POINT_DENSITY'),
-('STUCCI','STUCCI','STUCCI'),
-('VORONOI','VORONOI','VORONOI'),
-('WOOD','WOOD','WOOD')), default='RANDOM')
-#('VOXEL_DATA','VOXEL_DATA','VOXEL_DATA') 
-
-        bpy.types.Scene.rtexture_color = BoolProperty(name= "Color Factor" ,description = "Color factor of the texture" , default = True)    
-        bpy.types.Scene.rtexture_intensity = BoolProperty(name= "Intensity" ,description = "Intensity of the texture" , default = True)
-        bpy.types.Scene.rtexture_contrast = BoolProperty(name= "Contrast" ,description = "Contrast of the texture" , default = True)
-        bpy.types.Scene.rtexture_saturation = BoolProperty(name= "Saturation" ,description = "Saturation of the texture" , default = True)
-        bpy.types.Scene.rtexture_progression = BoolProperty(name= "Progression" ,description = "Progression of the texture" , default = True)
-        bpy.types.Scene.rtexture_axis = BoolProperty(name= "Progr. Axis" ,description = "Progression of the texture" , default = True)
-        bpy.types.Scene.rtexture_cloud_type = BoolProperty(name= "Cloud Type" ,description = "Cloud Type of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_type = BoolProperty(name= "Noise Type" ,description = "Noise Type of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_basis = BoolProperty(name= "Noise Basis" ,description = "Noise Basis of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_scale = BoolProperty(name= "Noise Scale" ,description = "Noise Scale of the texture" , default = True)
-        bpy.types.Scene.rtexture_nabla = BoolProperty(name= "Nabla" ,description = "Nabla of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_depth = BoolProperty(name= "Noise Depth" ,description = "Noise Depth of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_distortion = BoolProperty(name= "Noise Distortion" ,description = "Noise Distortion of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_intensity = BoolProperty(name= "Noise Intensity" ,description = "Noise Intensity of the texture" , default = True)
-        bpy.types.Scene.rtexture_distortion = BoolProperty(name= "Distortion" ,description = "Distortion of the texture" , default = True)
-        bpy.types.Scene.rtexture_turbulence = BoolProperty(name= "Turbulence" ,description = "Turbulence of the texture" , default = True)
-        bpy.types.Scene.rtexture_marble_type = BoolProperty(name= "Marble Type" ,description = "Marble type of the texture" , default = True)
-        bpy.types.Scene.rtexture_noise_basis_2 = BoolProperty(name= "Noise Basis" ,description = "Noise Basis of the texture" , default = True)
-        bpy.types.Scene.rtexture_musgrave_type = BoolProperty(name= "Musgrave Type" ,description = "Musgrave Type of the texture" , default = True)
-        bpy.types.Scene.rtexture_lacunarity = BoolProperty(name= "Dimension Max" ,description = "Dimension Max of the texture" , default = True)
-        bpy.types.Scene.rtexture_octaves = BoolProperty(name= "Dimension Max" ,description = "Dimension Max of the texture" , default = True)
-        bpy.types.Scene.rtexture_dimension_max = BoolProperty(name= "Dimension Max" ,description = "Dimension Max of the texture" , default = True)
-        bpy.types.Scene.rtexture_offset = BoolProperty(name= "Offset" ,description = "Offset of the texture" , default = True)
-        bpy.types.Scene.rtexture_gain = BoolProperty(name= "Gain" ,description = "Gain of the texture" , default = True)
-        bpy.types.Scene.rtexture_stucci_type = BoolProperty(name= "Type" ,description = "Stucci type of the texture" , default = True)
-        bpy.types.Scene.rtexture_dist_metric = BoolProperty(name= "Metric" ,description = "Distance Metric of the texture" , default = True)
-        bpy.types.Scene.rtexture_exponent = BoolProperty(name= "Exponent" ,description = "Minkowski Exponent of the texture" , default = True)
-        bpy.types.Scene.rtexture_color_mode = BoolProperty(name= "Color Mode" ,description = "Color Mode of the texture" , default = True)
-        bpy.types.Scene.rtexture_weight_1 = BoolProperty(name= "Weight 1" ,description = "Weight 1 of the texture" , default = True)
-        bpy.types.Scene.rtexture_weight_2 = BoolProperty(name= "Weight 2" ,description = "Weight 2 of the texture" , default = True)
-        bpy.types.Scene.rtexture_weight_3 = BoolProperty(name= "Weight 3" ,description = "Weight 3 of the texture" , default = True)
-        bpy.types.Scene.rtexture_weight_4 = BoolProperty(name= "Weight 4" ,description = "Weight 4 of the texture" , default = True)
-        bpy.types.Scene.rtexture_wood_type = BoolProperty(name= "Wood Type" ,description = "Wood Type of the texture" , default = True)
-        
-        # Percentage randomisation
-        bpy.types.Scene.rtexture_general_percentage = IntProperty(name="General percentage", description = " General percentage of randomisation" , min = 0 , max = 100 , default = 100, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_color_percentage = IntProperty(name="Color Factor", description = " Color factor percentage of randomisation" , min = 0 , max = 100 , default = 100, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_intensity_percentage = IntProperty(name="Intensity", description = " Intensity of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_contrast_percentage = IntProperty(name="Contrast", description = " Contrast of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_saturation_percentage = IntProperty(name="Saturation", description = " Saturation of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_noise_scale_percentage = IntProperty(name="Noise Scale", description = " Noise Scale of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_nabla_percentage = IntProperty(name="Nabla", description = " Nabla of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_noise_depth_percentage = IntProperty(name="Noise Depth", description = " Noise Depth of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_noise_int_percentage = IntProperty(name="Noise Intensity", description = " Noise Intensity of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_distortion_percentage = IntProperty(name="Distortion", description = "Distortion of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_turbulence_percentage = IntProperty(name="Turbulence", description = "Turbulence of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_dimension_percentage = IntProperty(name="Dimension", description = "Dimension of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_lacunarity_percentage = IntProperty(name="Lacunarity", description = "Lacunarity of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_octaves_percentage = IntProperty(name="Octaves", description = "Octaves of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_offset_percentage = IntProperty(name="Offset", description = "Offset of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_gain_percentage = IntProperty(name="Gain", description = "Gain of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_exponent_percentage = IntProperty(name="Exponent", description = "Exponent of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_weight_1_percentage = IntProperty(name="Weight 1", description = "Weight 1 of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_weight_2_percentage = IntProperty(name="Weight 2", description = "Weight 2 of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_weight_3_percentage = IntProperty(name="Weight 3", description = "Weight 3 of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-        bpy.types.Scene.rtexture_weight_4_percentage = IntProperty(name="Weight 4", description = "Weight 4 of the texture" , min = 0 , max = 100 , default = 0, subtype = 'PERCENTAGE')
-       
-        
-        
-        # the prop that controls the text wrap in help menu
-        bpy.types.Scene.text_width = IntProperty(name = "Text Width" , description = "The width above which the text wraps" , default = 20 , max = 180 , min = 1)
-        
-        
-            
-         # non read only material properties where keyframes can be inserted or removed
-        self.animated_properties=["alpha",
-        "use_vertex_color_paint"]
-            
-        
-    # compute randomisation based on the general or specific percentage chosen
-    # if the specific percentage is zero then the general percentage is used
-    def compute_percentage(self,min,max,value,percentage):
-        range = max-min
-        general_percentage = bpy.context.scene.rtexture_general_percentage
-        
-        if percentage == 0:
-            percentage_random = ( value -((range*(general_percentage/100))/2) )+ (range * (general_percentage / 100) * random.random())
-        else:
-            percentage_random = ( value - ((range*(percentage/100))/2)) + (range * (percentage / 100) * random.random())
-             
-        if percentage_random > max:
-            percentage_random = max
-        if percentage_random < min:
-            percentage_random = min
-        
-        return percentage_random 
-    
-    #deletes from history an index but without leaving empty spaces, everythings is pushed back    
-    def delete_from_history(self):
-        
-        length = len(self.history)
-        index = bpy.context.scene.texture_history_index
-        for x in range(index , length):
-            if index != length :
-                self.history[x]= self.history[x+1] 
-        del self.history[length]
-        length = len(self.history) 
-        if index <= length:
-            self.activate()
-            
-        bpy.context.scene.texture_historybak = str(self.rm_history)
-    
-    # the fuction that randomises the material 
-    
-    def random_texture_color(self,texture):
-        scn = bpy.context.scene
-        if scn.rtexture_color:
-            texture.factor_red = self.compute_percentage(0,2,texture.factor_red,scn.rtexture_color_percentage)
-            texture.factor_green = self.compute_percentage(0,2,texture.factor_green,scn.rtexture_color_percentage)
-            texture.factor_blue = self.compute_percentage(0,2,texture.factor_blue,scn.rtexture_color_percentage)
-        if scn.rtexture_intensity:
-            texture.intensity = self.compute_percentage(0,2,texture.intensity,scn.rtexture_intensity_percentage)
-        if scn.rtexture_contrast:
-            texture.contrast = self.compute_percentage(0,5,texture.contrast,scn.rtexture_contrast_percentage)
-        if scn.rtexture_saturation:
-            texture.saturation = self.compute_percentage(0,2,texture.saturation,scn.rtexture_saturation_percentage)        
-    
-    def random_texture(self,material):
-        scn = bpy.context.scene
-        
-        # if the texture exists use that for randomisation if not then create a new one
-        if material.texture_slots[material.active_texture_index] and material.texture_slots[material.active_texture_index].texture:
-            texture = material.texture_slots[material.active_texture_index].texture
-            if not scn.rtexture_type=='RANDOM':
-               texture.type = scn.rtexture_type
-            else:
-               texture.type = random.choice(['BLEND','CLOUDS','DISTORTED_NOISE','MAGIC','MARBLE','MUSGRAVE','NOISE','STUCCI','VORONOI','WOOD'])
-            material.texture_slots[material.active_texture_index].texture = texture 
-        else:
-            material.texture_slots.create(material.active_texture_index)           
-            if not scn.rtexture_type=='RANDOM':
-                texture = bpy.data.textures.new('Rand_tex_',scn.rtexture_type)
-            else:
-                texture = bpy.data.textures.new('Rand_tex_','NOISE')
-            material.texture_slots[material.active_texture_index].texture = texture
-        
-        # randomise parameters depending on the type of the texture
-        
-        if scn.rtexture_type == 'BLEND':
-            
-            self.random_texture_color(texture)
-            
-            if scn.rtexture_progression:
-                texture.progression = random.choice(['LINEAR', 'QUADRATIC', 'EASING', 'DIAGONAL', 'SPHERICAL', 'QUADRATIC_SPHERE', 'RADIAL'])
-            if scn.rtexture_axis and not (texture.progression=='DIAGONAL' or texture.progression=='SPHERICAL' or texture.progression=='QUADRATIC_SPHERE'):
-                texture.use_flip_axis = random.choice(['HORIZONTAL', 'VERTICAL'])
-        
-        if scn.rtexture_type == 'CLOUDS':
-            
-            self.random_texture_color(texture)
-            
-            if scn.rtexture_cloud_type:
-                texture.cloud_type = random.choice(['GREYSCALE', 'COLOR'])
-            if scn.rtexture_noise_type:
-                texture.noise_type = random.choice(['SOFT_NOISE', 'HARD_NOISE'])
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL', 'ORIGINAL_PERLIN', 'IMPROVED_PERLIN', 'VORONOI_F1', 'VORONOI_F2', 'VORONOI_F3',    'VORONOI_F4', 'VORONOI_F2_F1', 'BLENDER_ORIGINAL', 'VORONOI_CRACKLE', 'CELL_NOISE'])
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-            if scn.rtexture_noise_depth:
-                texture.noise_depth = int(self.compute_percentage(0,24,texture.noise_depth,scn.rtexture_noise_depth_percentage))
-        
-        if scn.rtexture_type == 'DISTORTED_NOISE':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_noise_distortion:
-                texture.noise_distortion = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN', 'IMPROVED_PERLIN', 'VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4', 'VORONOI_F2_F1', 'BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN','IMPROVED_PERLIN','VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4','VORONOI_F2_F1','BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_distortion:
-                texture.distortion = self.compute_percentage(0,10,texture.distortion,scn.rtexture_distortion_percentage)
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-        
-        if scn.rtexture_type == 'MAGIC':
-            
-            self.random_texture_color(texture)
-            
-            if scn.rtexture_noise_depth:
-                texture.noise_depth = int(self.compute_percentage(0,24,texture.noise_depth,scn.rtexture_noise_depth_percentage))
-            if scn.rtexture_turbulence:
-                texture.turbulence = int(self.compute_percentage(0,1000,texture.turbulence,scn.rtexture_turbulence_percentage))    
-            
-        if scn.rtexture_type == 'MARBLE':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_marble_type:
-                texture.marble_type = random.choice(['SOFT', 'SHARP', 'SHARPER'])
-            if scn.rtexture_noise_basis_2:
-                texture.noise_basis_2 = random.choice(['SIN', 'SAW', 'TRI'])
-            if scn.rtexture_noise_type:
-                texture.noise_type = random.choice(['SOFT_NOISE', 'HARD_NOISE'])
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN','IMPROVED_PERLIN','VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4','VORONOI_F2_F1','BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_turbulence:
-                texture.turbulence = int(self.compute_percentage(0,1000,texture.turbulence,scn.rtexture_turbulence_percentage))    
-            if scn.rtexture_noise_depth:
-                texture.noise_depth = int(self.compute_percentage(0,24,texture.noise_depth,scn.rtexture_noise_depth_percentage))
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-            
-        if scn.rtexture_type == 'MUSGRAVE':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_musgrave_type:
-                texture.musgrave_type = random.choice(['MULTIFRACTAL','RIDGED_MULTIFRACTAL','HYBRID_MULTIFRACTAL','FBM','HETERO_TERRAIN'])
-            if scn.rtexture_dimension_max:
-                texture.dimension_max = self.compute_percentage(0,2,texture.dimension_max,scn.rtexture_dimension_percentage)
-            if scn.rtexture_noise_intensity:
-                texture.noise_intensity = self.compute_percentage(0,10,texture.noise_intensity,scn.rtexture_noise_int_percentage)
-            if scn.rtexture_lacunarity:
-                texture.lacunarity= self.compute_percentage(0,6,texture.lacunarity,scn.rtexture_lacunarity_percentage)
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN','IMPROVED_PERLIN','VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4','VORONOI_F2_F1','BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-            if scn.rtexture_offset:
-                texture.offset = self.compute_percentage(0,6,texture.offset,scn.rtexture_offset_percentage)
-            if scn.rtexture_gain:
-                texture.offset = self.compute_percentage(0,6,texture.gain,scn.rtexture_gain_percentage)
-            if scn.rtexture_octaves:
-                texture.octaves = self.compute_percentage(0,8,texture.octaves,scn.rtexture_octaves_percentage)      
-        
-        if scn.rtexture_type == 'STUCCI':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_stucci_type:
-                texture.stucci_type = random.choice(['PLASTIC', 'WALL_IN', 'WALL_OUT'])
-            if scn.rtexture_noise_type:
-                texture.noise_type = random.choice(['SOFT_NOISE', 'HARD_NOISE'])
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN','IMPROVED_PERLIN','VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4','VORONOI_F2_F1','BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_turbulence:
-                texture.turbulence = int(self.compute_percentage(0,1000,texture.turbulence,scn.rtexture_turbulence_percentage))    
-        
-        
-        if scn.rtexture_type == 'VORONOI':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_dist_metric:
-                texture.distance_metric = random.choice(['DISTANCE', 'DISTANCE_SQUARED', 'MANHATTAN', 'CHEBYCHEV', 'MINKOVSKY_HALF', 'MINKOVSKY_FOUR', 'MINKOVSKY'])
-            if scn.rtexture_noise_type:
-                texture.color_mode = random.choice(['INTENSITY', 'POSITION', 'POSITION_OUTLINE', 'POSITION_OUTLINE_INTENSITY'])
-            if scn.rtexture_exponent:
-                texture.minkovsky_exponent = self.compute_percentage(0,2,texture.minkovsky_exponent ,scn.rtexture_exponent_percentage)
-            if scn.rtexture_noise_intensity:
-                texture.noise_intensity = self.compute_percentage(0,10,texture.noise_intensity,scn.rtexture_noise_int_percentage)
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-            if scn.rtexture_weight_1:
-                texture.weight_1 = self.compute_percentage(-2,2,texture.weight_1,scn.rtexture_weight_1_percentage)
-            if scn.rtexture_weight_2:
-                texture.weight_2 = self.compute_percentage(-2,2,texture.weight_2,scn.rtexture_weight_2_percentage)
-            if scn.rtexture_weight_3:
-                texture.weight_3 = self.compute_percentage(-2,2,texture.weight_3,scn.rtexture_weight_3_percentage)
-            if scn.rtexture_weight_4:
-                texture.weight_4 = self.compute_percentage(-2,2,texture.weight_4,scn.rtexture_weight_4_percentage) 
-        
-        if scn.rtexture_type == 'WOOD':
-            
-            self.random_texture_color(texture)
-            if scn.rtexture_wood_type:
-                texture.wood_type = random.choice(['BANDS', 'RINGS', 'BANDNOISE', 'RINGNOISE'])
-            if scn.rtexture_noise_basis_2:
-                texture.noise_basis_2 = random.choice(['SIN', 'SAW', 'TRI'])
-            if scn.rtexture_noise_type:
-                texture.noise_type = random.choice(['SOFT_NOISE', 'HARD_NOISE'])
-            if scn.rtexture_noise_basis:
-                texture.noise_basis = random.choice(['BLENDER_ORIGINAL','ORIGINAL_PERLIN','IMPROVED_PERLIN','VORONOI_F1', 'VORONOI_F2','VORONOI_F3','VORONOI_F4','VORONOI_F2_F1','BLENDER_ORIGINAL','VORONOI_CRACKLE','CELL_NOISE'])
-            if scn.rtexture_noise_scale:
-                texture.noise_scale = self.compute_percentage(0,2,texture.noise_scale,scn.rtexture_noise_scale_percentage)
-            if scn.rtexture_turbulence:
-                texture.turbulence = int(self.compute_percentage(0,1000,texture.turbulence,scn.rtexture_turbulence_percentage))    
-            if scn.rtexture_nabla:
-                texture.nabla = self.compute_percentage(0,0.10,texture.nabla,scn.rtexture_nabla_percentage)
-                   
-        if scn.rtexture_type == 'NOISE':
-            
-            self.random_texture_color(texture)
-          
-        #self.store_to_history(texture)
-          
-        return texture
-
-    
-    # a nice multi label                        
-    def multi_label(self, text, ui,text_width):
-        
-        for x in range(0,len(text)):
-            el = textwrap.wrap(text[x], width = text_width)
-            
-            for y in range(0,len(el)):
-                ui.label(text=el[y])
-    
-    def draw_gui_simple_texture_color(self,context,box):
-        box.prop(context.scene,"rtexture_color", toggle = True)
-        box.prop(context.scene,"rtexture_intensity", toggle = True)
-        box.prop(context.scene,"rtexture_contrast", toggle = True)
-        box.prop(context.scene,"rtexture_saturation", toggle = True)
-       
-    def draw_gui_percentage_texture_color(self,context,box):
-        if context.scene.rtexture_color:
-            box.prop(context.scene,"rtexture_color_percentage", slider = True)
-        else:
-            box.label(text="Texture Intensity disabled ")
-                    
-        if context.scene.rtexture_intensity:
-            box.prop(context.scene,"rtexture_intensity_percentage", slider = True)
-        else:
-            box.label(text="Texture Intensity disabled ")
-                
-        if context.scene.rtexture_intensity: 
-            box.prop(context.scene,"rtexture_contrast_percentage", slider = True)
-        else:
-            box.label(text="Texture Contrast disabled ")
-                
-        if context.scene.rtexture_saturation: 
-            box.prop(context.scene,"rtexture_saturation_percentage", slider = True)
-        else:
-            box.label(text="Texture Saturation disabled ")
-    
-        
-            
-    def draw_gui(self ,context,panel,rm):
-        layout = panel.layout
-        row = layout.row()
-        row.prop(context.scene , "rtexture_gui_mode" )
-        
-        # check which Gui mode the user has selected (Simple is the default one and display the appropriate gui
-        
-        if context.scene.rtexture_gui_mode == 'enable' :
-            box = layout.box()
-            box.prop(context.scene,"rtexture_type")
-            
-            if context.scene.rtexture_type=='BLEND':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_progression", toggle = True)
-                box.prop(context.scene,"rtexture_axis", toggle = True)
-            
-            if context.scene.rtexture_type=='CLOUDS':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_noise_type", toggle = True)
-                box.prop(context.scene,"rtexture_cloud_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_nabla", toggle = True)
-                box.prop(context.scene,"rtexture_noise_depth", toggle = True)
-            
-            if context.scene.rtexture_type=='DISTORTED_NOISE':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_noise_distortion", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_distortion", toggle = True)
-                box.prop(context.scene,"rtexture_nabla", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)   
-            
-            if context.scene.rtexture_type=='MAGIC':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_turbulence", toggle = True)
-                box.prop(context.scene,"rtexture_noise_depth", toggle = True)
-            
-            if context.scene.rtexture_type=='MARBLE':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_marble_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis_2", toggle = True)
-                box.prop(context.scene,"rtexture_noise_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_turbulence", toggle = True)
-                box.prop(context.scene,"rtexture_noise_depth", toggle = True)
-                box.prop(context.scene,"rtexture_nabla", toggle = True)
-               
-            if context.scene.rtexture_type=='MUSGRAVE':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_musgrave_type", toggle = True)
-                box.prop(context.scene,"rtexture_dimension_max", toggle = True)
-                box.prop(context.scene,"rtexture_noise_intensity", toggle = True)
-                box.prop(context.scene,"rtexture_lacunarity", toggle = True)
-                box.prop(context.scene,"rtexture_octaves", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_offset", toggle = True)
-                box.prop(context.scene,"rtexture_gain", toggle = True)
-            
-            if context.scene.rtexture_type=='STUCCI':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_stucci_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_turbulence", toggle = True)
-            
-            if context.scene.rtexture_type=='VORONOI':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_metric", toggle = True)
-                box.prop(context.scene,"rtexture_exponent", toggle = True)
-                box.prop(context.scene,"rtexture_noise_intensity", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_nablae", toggle = True)
-                box.prop(context.scene,"rtexture_weight_1", toggle = True)
-                box.prop(context.scene,"rtexture_weight_2", toggle = True)
-                box.prop(context.scene,"rtexture_weight_3", toggle = True)
-                box.prop(context.scene,"rtexture_weight_4", toggle = True)
-            
-            if context.scene.rtexture_type=='WOOD':
-                self.draw_gui_simple_texture_color(context,box)
-                box.prop(context.scene,"rtexture_wood_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis_2", toggle = True)
-                box.prop(context.scene,"rtexture_noise_type", toggle = True)
-                box.prop(context.scene,"rtexture_noise_basis", toggle = True)
-                box.prop(context.scene,"rtexture_noise_scale", toggle = True)
-                box.prop(context.scene,"rtexture_turbulence", toggle = True)
-                box.prop(context.scene,"rtexture_nabla", toggle = True)
-            
-            if context.scene.rtexture_type=='NOISE':
-                self.draw_gui_simple_texture_color(context,box)
-               
-                           
-            box.prop(context.scene,"rtexture_general_percentage", slider = True)
-            layout.operator("gyes.random_texture")
-            
-        if context.scene.rtexture_gui_mode == 'percentage' :
-            box = layout.box()
-            
-            if context.scene.rtexture_type=='BLEND':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                            
-            if context.scene.rtexture_type=='CLOUDS':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Nabla disabled ")
-                    
-                if context.scene.rtexture_noise_depth: 
-                    box.prop(context.scene,"rtexture_noise_depth_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Depth disabled ")
-            
-            if context.scene.rtexture_type=='DISTORTED NOISE':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                    
-                if context.scene.rtexture_distortion: 
-                    box.prop(context.scene,"rtexture_distortion_percentage", slider = True)
-                else:
-                    box.label(text="Texture Distortion disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Nabla disabled ")
-                    
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-            
-            if context.scene.rtexture_type=='MAGIC':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_turbulence: 
-                    box.prop(context.scene,"rtexture_turbulence_percentage", slider = True)
-                else:
-                    box.label(text="Texture Turbulence disabled ")
-                    
-                if context.scene.rtexture_noise_depth: 
-                    box.prop(context.scene,"rtexture_noise_depth_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Depth disabled ")
-            
-            if context.scene.rtexture_type=='MARBLE':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_turbulence: 
-                    box.prop(context.scene,"rtexture_turbulence_percentage", slider = True)
-                else:
-                    box.label(text="Texture Turbulence disabled ")
-                
-                if context.scene.rtexture_noise_depth: 
-                    box.prop(context.scene,"rtexture_noise_depth_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Depth disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Nabla disabled ")
-                    
-               
-            if context.scene.rtexture_type=='MUSGRAVE':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_dimension_max: 
-                    box.prop(context.scene,"rtexture_dimension_percentage", slider = True)
-                else:
-                    box.label(text="Texture Dimension Max disabled ")
-                
-                if context.scene.rtexture_noise_intensity: 
-                    box.prop(context.scene,"rtexture_noise_int_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Intensity disabled ")
-                
-                if context.scene.rtexture_lacunarity: 
-                    box.prop(context.scene,"rtexture_lacunarity_percentage", slider = True)
-                else:
-                    box.label(text="Texture Lacunarity disabled ")
-                    
-                if context.scene.rtexture_octaves: 
-                    box.prop(context.scene,"rtexture_octaves_percentage", slider = True)
-                else:
-                    box.label(text="Texture Lacunarity disabled ")
-                        
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Nabla disabled ")
-                    
-                if context.scene.rtexture_offset: 
-                    box.prop(context.scene,"rtexture_offset_percentage", slider = True)
-                else:
-                    box.label(text="Texture Offset disabled ")
-                    
-                if context.scene.rtexture_gain: 
-                    box.prop(context.scene,"rtexture_gain_percentage", slider = True)
-                else:
-                    box.label(text="Texture Gain disabled ")
-            
-            if context.scene.rtexture_type=='STUCCI':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_turbulence: 
-                    box.prop(context.scene,"rtexture_turbulence_percentage", slider = True)
-                else:
-                    box.label(text="Texture Turbulence disabled ")
-                    
-            if context.scene.rtexture_type=='VORONOI':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_exponent: 
-                    box.prop(context.scene,"rtexture_exponent_percentage", slider = True)
-                else:
-                    box.label(text="Texture Exponent disabled ")
-                
-                if context.scene.rtexture_noise_intensity: 
-                    box.prop(context.scene,"rtexture_noise_int_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Intensity disabled ")
-                    
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Weight 1 disabled ")
-                    
-                if context.scene.rtexture_weight_1: 
-                    box.prop(context.scene,"rtexture_weight_1_percentage", slider = True)
-                else:
-                    box.label(text="Texture Weight 1 disabled ")
-                    
-                if context.scene.rtexture_weight_2: 
-                    box.prop(context.scene,"rtexture_weight_2_percentage", slider = True)
-                else:
-                    box.label(text="Texture Weight 2 disabled ")
-                
-                if context.scene.rtexture_weight_3: 
-                    box.prop(context.scene,"rtexture_weight_3_percentage", slider = True)
-                else:
-                    box.label(text="Texture Weight 3 disabled ")
-                
-                if context.scene.rtexture_weight_4: 
-                    box.prop(context.scene,"rtexture_weight_4_percentage", slider = True)
-                else:
-                    box.label(text="Texture Weight 4 disabled ")
-            
-            if context.scene.rtexture_type=='WOOD':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-                
-                if context.scene.rtexture_noise_scale: 
-                    box.prop(context.scene,"rtexture_noise_scale_percentage", slider = True)
-                else:
-                    box.label(text="Texture Noise Scale disabled ")
-                
-                if context.scene.rtexture_turbulence: 
-                    box.prop(context.scene,"rtexture_turbulence_percentage", slider = True)
-                else:
-                    box.label(text="Texture Turbulence disabled ")
-                
-                if context.scene.rtexture_nabla: 
-                    box.prop(context.scene,"rtexture_nabla_percentage", slider = True)
-                else:
-                    box.label(text="Texture Nabla disabled ")
-            
-            if context.scene.rtexture_type=='NOISE':
-            
-                self.draw_gui_percentage_texture_color(context,box)
-               
-            box.prop(context.scene,"rtexture_general_percentage", slider = True)
-            layout.operator("gyes.random_texture")
-        
-        if context.scene.rtexture_gui_mode== 'templates' : 
-            box = layout.box()
-            box.label(text="Not yet implemented")
-                    
-        if context.scene.rtexture_gui_mode== 'help' :
-            box = layout.box()
-            help_text=["","Copyright 2011 Kilon  ",
-            "GYES - RTG",    
-            "Random Material  Generator",
-            "A tool that generates random materials.",
-            "",
-            "Simple Mode",
-            "--------------------------",
-            "In this mode you can do basic randomisation. Choose parameters you want to randomise by turning them on or off with clicking on them. Hit the random button when you are ready. Each time you hit the button a new random texture is generated using existing texture or if there is not one it creates a new one",
-            "",
-            "History",
-            "--------------------------",
-            "History index -> choose index",
-            "( < ) -> Previous index (activate)",
-            "( > ) -> Next index (activate)",
-            "( |< ) -> First history index",
-            "( >| ) -> Last history index",
-            "Activate -> use this index as active material",
-            "Animate -> Insert a keyframe in the current frame for every singly non read only material property",
-            "X -> Remove a keyframe in the current frame for every singly non read only material property",
-            "R -> works just like activate but instead of using the current selected index use a randomly selected one",
-            "Delete -> delete this index",
-            "Del start -> start deletion from here",
-            "Del end -> end deletion here",
-            "Restore -> restores history from the saved blend file",
-            "Filter -> Text that used to filter material selection for import",
-            "Import -> import materials that match the filter even partially and store them one by one in history "
-            "Percentage",
-            "--------------------------",
-            "Percentage randomisation means that the parameter is randomised inside a range of percentage of the full range of the value. When a specific percentage is zero, the general percentage is used instead for that area. When a specific percentage is not zero then general percentage is ignored and specific percentage is used instead. If you don't want to randomise that parameter at all, in Simple Mode use the corresponding button to completely disable that parameter , the percentage slider will also be disabled in the percentage mode. Randomization takes always the current value as starting point so the next randomization will use the current randomized value. Randomization is always 50% of the specific percentage bellow the current value and 50% above . If the percentage exceeds minimum and maximum values of the full range, then it will default to minimum and maximum accordingly. "]
-            w=bpy.context.scene.text_width
-            box.prop(context.scene,"text_width", slider =True)
-            self.multi_label(help_text,box,w) 
-        
-        # Display the History Gui for all modes
-        
-        layout.label(text="History (RMG + RTG)")
-        history_box= layout.box()
-        history_box.prop(context.scene, "history_index")
-        row = history_box.row()
-        row.operator("gyes.first")
-        row.operator("gyes.previous")
-        row.operator("gyes.next")
-        row.operator("gyes.last")
-        rm_index = context.scene.history_index
-        
-        if rm_index in rm.rm_history and rm.rm_history[rm_index] :
-            row = history_box.row()
-            a = row.split(percentage = 0.3, align = True)
-            a.operator("gyes.activate")
-            a.operator("gyes.animate")
-            b=a.split(percentage = 0.3, align = True)
-            b.operator("gyes.x")
-            b.operator("gyes.random_activate")                       
-        else: 
-            row = history_box.row()
-            a = row.split(percentage = 0.3, align = True)
-            a.label(text= "Empty Index ! ")
-            a.operator("gyes.animate")
-            b=a.split(percentage = 0.3, align = True)
-            b.operator("gyes.x")
-            b.operator("gyes.random_activate")  
-        
-        if context.scene.history_index < len(rm.rm_history)+2:
-            history_box.operator("gyes.store")
-        else:
-            history_box.label(text= "Not the first Empty Index")
-            
-        if rm_index in rm.rm_history and rm.rm_history[rm_index] :
-            history_box.operator("gyes.delete")
-            row2 = history_box.row()
-            row2.operator("gyes.delete_start")
-            row2.operator("gyes.delete_end")
-            
-        if hasattr(bpy.context.scene,"historybak") and bpy.context.scene.historybak!='':
-            history_box.operator("gyes.restore")
-        else:
-            history_box.label(text="Backup not Found")
-                                
-rt =random_texture_class()
-
-            
-        
-# Generate the random material button
-class gyes_random_texture(bpy.types.Operator):
-    
-    bl_idname = "gyes.random_texture"
-    bl_label = "Random Texture"
-    label = bpy.props.StringProperty()
-    bl_description = "Generate the random texture"
-    
-    def execute(self, context):
-        for i in context.selected_objects :
-            rt.random_texture(i.active_material)
-
-        return{'FINISHED'}
-
-#registration is necessary for the script to appear in the GUI
-def register():
-    bpy.utils.register_class(gyes_random_texture)
-def unregister():
-    bpy.utils.unregister_class(gyes_random_texture)
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/io_atomblend_utilities/__init__.py b/release/scripts/addons_contrib/io_atomblend_utilities/__init__.py
deleted file mode 100644
index dbd82d0..0000000
--- a/release/scripts/addons_contrib/io_atomblend_utilities/__init__.py
+++ /dev/null
@@ -1,267 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#
-#
-#  Authors           : Clemens Barth (Blendphys at root-1.de), ...
-#
-#  Homepage(Wiki)    : http://development.root-1.de/Atomic_Blender.php
-#
-#  Start of project              : 2011-12-01 by Clemens Barth
-#  First publication in Blender  : 2012-11-03
-#  Last modified                 : 2012-11-09
-#
-#  Acknowledgements 
-#  ================
-#
-#  Blender: ideasman, meta_androcto, truman, kilon, CoDEmanX, dairin0d, PKHG, 
-#           Valter, ...
-#  Other: Frank Palmino
-#
-
-bl_info = {
-    "name": "Atomic Blender - Utilities",
-    "description": "Utilities for manipulating atom structures",
-    "author": "Clemens Barth",
-    "version": (0,6),
-    "blender": (2,6),
-    "location": "Panel: View 3D - Tools",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/"
-                "Py/Scripts/Import-Export/PDB",
-    "tracker_url": "http://projects.blender.org/tracker/"
-                   "index.php?func=detail&aid=33071&group_id=153&atid=467",
-    "category": "Import-Export"
-}
-
-import bpy
-from bpy.types import Operator, Panel
-from bpy.props import (StringProperty,
-                       EnumProperty,
-                       FloatProperty)
-
-from . import io_atomblend_utilities
-
-# -----------------------------------------------------------------------------
-#                                                                           GUI
-
-# This is the panel, which can be used to prepare the scene.
-# It is loaded after the file has been chosen via the menu 'File -> Import'
-class PreparePanel(Panel):
-    bl_label       = "Atomic Blender Utilities"
-    bl_space_type  = "VIEW_3D"
-    bl_region_type = "TOOL_PROPS"
-
-    def draw(self, context):
-        layout = self.layout
-        scn    = context.scene.atom_blend[0]
-
-        row = layout.row()
-        row.label(text="Custom data file")
-        box = layout.box()
-        row = box.row()
-        row.label(text="Custom data file")
-        row = box.row()
-        col = row.column()
-        col.prop(scn, "datafile")
-        col.operator("atom_blend.datafile_apply")
-        row = box.row()
-        row.operator("atom_blend.button_distance")
-        row.prop(scn, "distance")
-        row = layout.row()
-        row.label(text="Choice of atom radii")
-        box = layout.box()
-        row = box.row()
-        row.label(text="All changes concern:")
-        row = box.row()
-        row.prop(scn, "radius_how")
-        row = box.row()
-        row.label(text="1. Change type of radii")
-        row = box.row()
-        row.prop(scn, "radius_type")
-        row = box.row()
-        row.label(text="2. Change atom radii in pm")
-        row = box.row()
-        row.prop(scn, "radius_pm_name")
-        row = box.row()
-        row.prop(scn, "radius_pm")
-        row = box.row()
-        row.label(text="3. Change atom radii by scale")
-        row = box.row()
-        col = row.column()
-        col.prop(scn, "radius_all")
-        col = row.column(align=True)
-        col.operator( "atom_blend.radius_all_bigger" )
-        col.operator( "atom_blend.radius_all_smaller" )
-
-        layout.separator()
-        row = box.row()
-        row.active = (bpy.context.mode == 'EDIT_MESH')
-        row.operator( "atom_blend.separate_atom" )
-
-
-class PanelProperties(bpy.types.PropertyGroup):
-
-    def Callback_radius_type(self, context):
-        scn = bpy.context.scene.atom_blend[0]
-        io_atomblend_utilities.choose_objects("radius_type", 
-                                              scn.radius_how, 
-                                              None,
-                                              None,
-                                              scn.radius_type) 
-    def Callback_radius_pm(self, context):
-        scn = bpy.context.scene.atom_blend[0]
-        io_atomblend_utilities.choose_objects("radius_pm", 
-                                              scn.radius_how, 
-                                              None,
-                                              [scn.radius_pm_name,
-                                              scn.radius_pm],
-                                              None) 
-        
-    datafile = StringProperty(
-        name = "", description="Path to your custom data file",
-        maxlen = 256, default = "", subtype='FILE_PATH')
-    XYZ_file = StringProperty(
-        name = "Path to file", default="",
-        description = "Path of the XYZ file")
-    number_atoms = StringProperty(name="",
-        default="Number", description = "This output shows "
-        "the number of atoms which have been loaded")
-    distance = StringProperty(
-        name="", default="Distance (A)",
-        description="Distance of 2 objects in Angstrom")
-    radius_how = EnumProperty(
-        name="",
-        description="Which objects shall be modified?",
-        items=(('ALL_ACTIVE',"all active objects", "in the current layer"),
-               ('ALL_IN_LAYER',"all"," in active layer(s)")),
-               default='ALL_ACTIVE',)
-    radius_type = EnumProperty(
-        name="Type",
-        description="Which type of atom radii?",
-        items=(('0',"predefined", "Use pre-defined radii"),
-               ('1',"atomic", "Use atomic radii"),
-               ('2',"van der Waals","Use van der Waals radii")),
-               default='0',update=Callback_radius_type)
-    radius_pm_name = StringProperty(
-        name="", default="Atom name",
-        description="Put in the name of the atom (e.g. Hydrogen)")
-    radius_pm = FloatProperty(
-        name="", default=100.0, min=0.0,
-        description="Put in the radius of the atom (in pm)",
-        update=Callback_radius_pm)
-    radius_all = FloatProperty(
-        name="Scale", default = 1.05, min=1.0, max=5.0,
-        description="Put in the scale factor")
-
-
-
-# Button loading a custom data file
-class DatafileApply(Operator):
-    bl_idname = "atom_blend.datafile_apply"
-    bl_label = "Apply"
-    bl_description = "Use color and radii values stored in the custom file"
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_blend[0]
-
-        if scn.datafile == "":
-            return {'FINISHED'}
-
-        io_atomblend_utilities.custom_datafile(scn.datafile)
-        io_atomblend_utilities.custom_datafile_change_atom_props()
-
-        return {'FINISHED'}
-
-
-# Button for separating a single atom from a structure
-class SeparateAtom(Operator):
-    bl_idname = "atom_blend.separate_atom"
-    bl_label = "Separate atoms"
-    bl_description = ("Separate atoms you have selected. "
-                      "You have to be in the 'Edit Mode'")
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_blend[0]
-
-        io_atomblend_utilities.separate_atoms(scn)
-
-        return {'FINISHED'}
-
-
-# Button for measuring the distance of the active objects
-class DistanceButton(Operator):
-    bl_idname = "atom_blend.button_distance"
-    bl_label = "Measure ..."
-    bl_description = "Measure the distance between two objects"
-
-    def execute(self, context):
-        scn  = bpy.context.scene.atom_blend[0]
-        dist = io_atomblend_utilities.distance()
-
-        # Put the distance into the string of the output field.
-        scn.distance = dist
-        return {'FINISHED'}
-
-
-# Button for increasing the radii of all atoms
-class RadiusAllBiggerButton(Operator):
-    bl_idname = "atom_blend.radius_all_bigger"
-    bl_label = "Bigger ..."
-    bl_description = "Increase the radii of the atoms"
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_blend[0]     
-        io_atomblend_utilities.choose_objects("radius_all", 
-                                              scn.radius_how, 
-                                              scn.radius_all, 
-                                              None,
-                                              None)        
-        return {'FINISHED'}
-
-
-# Button for decreasing the radii of all atoms
-class RadiusAllSmallerButton(Operator):
-    bl_idname = "atom_blend.radius_all_smaller"
-    bl_label = "Smaller ..."
-    bl_description = "Decrease the radii of the atoms"
-
-    def execute(self, context):
-        scn = bpy.context.scene.atom_blend[0]
-        io_atomblend_utilities.choose_objects("radius_all", 
-                                              scn.radius_how, 
-                                              1.0/scn.radius_all, 
-                                              None,
-                                              None)                                     
-        return {'FINISHED'}
-
-
-def register():
-    io_atomblend_utilities.read_elements()  
-    bpy.utils.register_module(__name__)
-    bpy.types.Scene.atom_blend = bpy.props.CollectionProperty(type=
-                                                   PanelProperties)
-    bpy.context.scene.atom_blend.add()
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-
-    register()
diff --git a/release/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py b/release/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py
deleted file mode 100644
index ae8d531..0000000
--- a/release/scripts/addons_contrib/io_atomblend_utilities/io_atomblend_utilities.py
+++ /dev/null
@@ -1,465 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import os
-import bpy
-import bmesh
-
-# This variable contains the path of the XYZ file.
-# It is used almost everywhere, which explains why it
-# should stay global. First, it is empty and gets 'filled' directly
-# after having chosen the XYZ file (see 'class LoadXYZ' further below).
-
-
-# -----------------------------------------------------------------------------
-#                                                  Atom and element data
-
-
-# This is a list that contains some data of all possible elements. The structure
-# is as follows:
-#
-# 1, "Hydrogen", "H", [0.0,0.0,1.0], 0.32, 0.32, 0.32 , -1 , 1.54   means
-#
-# No., name, short name, color, radius (used), radius (covalent), radius (atomic),
-#
-# charge state 1, radius (ionic) 1, charge state 2, radius (ionic) 2, ... all
-# charge states for any atom are listed, if existing.
-# The list is fixed and cannot be changed ... (see below)
-
-ELEMENTS_DEFAULT = (
-( 1,      "Hydrogen",        "H", (  1.0,   1.0,   1.0), 0.32, 0.32, 0.79 , -1 , 1.54 ),
-( 2,        "Helium",       "He", ( 0.85,   1.0,   1.0), 0.93, 0.93, 0.49 ),
-( 3,       "Lithium",       "Li", (  0.8,  0.50,   1.0), 1.23, 1.23, 2.05 ,  1 , 0.68 ),
-( 4,     "Beryllium",       "Be", ( 0.76,   1.0,   0.0), 0.90, 0.90, 1.40 ,  1 , 0.44 ,  2 , 0.35 ),
-( 5,         "Boron",        "B", (  1.0,  0.70,  0.70), 0.82, 0.82, 1.17 ,  1 , 0.35 ,  3 , 0.23 ),
-( 6,        "Carbon",        "C", ( 0.56,  0.56,  0.56), 0.77, 0.77, 0.91 , -4 , 2.60 ,  4 , 0.16 ),
-( 7,      "Nitrogen",        "N", ( 0.18,  0.31,  0.97), 0.75, 0.75, 0.75 , -3 , 1.71 ,  1 , 0.25 ,  3 , 0.16 ,  5 , 0.13 ),
-( 8,        "Oxygen",        "O", (  1.0,  0.05,  0.05), 0.73, 0.73, 0.65 , -2 , 1.32 , -1 , 1.76 ,  1 , 0.22 ,  6 , 0.09 ),
-( 9,      "Fluorine",        "F", ( 0.56,  0.87,  0.31), 0.72, 0.72, 0.57 , -1 , 1.33 ,  7 , 0.08 ),
-(10,          "Neon",       "Ne", ( 0.70,  0.89,  0.96), 0.71, 0.71, 0.51 ,  1 , 1.12 ),
-(11,        "Sodium",       "Na", ( 0.67,  0.36,  0.94), 1.54, 1.54, 2.23 ,  1 , 0.97 ),
-(12,     "Magnesium",       "Mg", ( 0.54,   1.0,   0.0), 1.36, 1.36, 1.72 ,  1 , 0.82 ,  2 , 0.66 ),
-(13,     "Aluminium",       "Al", ( 0.74,  0.65,  0.65), 1.18, 1.18, 1.82 ,  3 , 0.51 ),
-(14,       "Silicon",       "Si", ( 0.94,  0.78,  0.62), 1.11, 1.11, 1.46 , -4 , 2.71 , -1 , 3.84 ,  1 , 0.65 ,  4 , 0.42 ),
-(15,    "Phosphorus",        "P", (  1.0,  0.50,   0.0), 1.06, 1.06, 1.23 , -3 , 2.12 ,  3 , 0.44 ,  5 , 0.35 ),
-(16,        "Sulfur",        "S", (  1.0,   1.0,  0.18), 1.02, 1.02, 1.09 , -2 , 1.84 ,  2 , 2.19 ,  4 , 0.37 ,  6 , 0.30 ),
-(17,      "Chlorine",       "Cl", ( 0.12,  0.94,  0.12), 0.99, 0.99, 0.97 , -1 , 1.81 ,  5 , 0.34 ,  7 , 0.27 ),
-(18,         "Argon",       "Ar", ( 0.50,  0.81,  0.89), 0.98, 0.98, 0.88 ,  1 , 1.54 ),
-(19,     "Potassium",        "K", ( 0.56,  0.25,  0.83), 2.03, 2.03, 2.77 ,  1 , 0.81 ),
-(20,       "Calcium",       "Ca", ( 0.23,   1.0,   0.0), 1.74, 1.74, 2.23 ,  1 , 1.18 ,  2 , 0.99 ),
-(21,      "Scandium",       "Sc", ( 0.90,  0.90,  0.90), 1.44, 1.44, 2.09 ,  3 , 0.73 ),
-(22,      "Titanium",       "Ti", ( 0.74,  0.76,  0.78), 1.32, 1.32, 2.00 ,  1 , 0.96 ,  2 , 0.94 ,  3 , 0.76 ,  4 , 0.68 ),
-(23,      "Vanadium",        "V", ( 0.65,  0.65,  0.67), 1.22, 1.22, 1.92 ,  2 , 0.88 ,  3 , 0.74 ,  4 , 0.63 ,  5 , 0.59 ),
-(24,      "Chromium",       "Cr", ( 0.54,   0.6,  0.78), 1.18, 1.18, 1.85 ,  1 , 0.81 ,  2 , 0.89 ,  3 , 0.63 ,  6 , 0.52 ),
-(25,     "Manganese",       "Mn", ( 0.61,  0.47,  0.78), 1.17, 1.17, 1.79 ,  2 , 0.80 ,  3 , 0.66 ,  4 , 0.60 ,  7 , 0.46 ),
-(26,          "Iron",       "Fe", ( 0.87,   0.4,   0.2), 1.17, 1.17, 1.72 ,  2 , 0.74 ,  3 , 0.64 ),
-(27,        "Cobalt",       "Co", ( 0.94,  0.56,  0.62), 1.16, 1.16, 1.67 ,  2 , 0.72 ,  3 , 0.63 ),
-(28,        "Nickel",       "Ni", ( 0.31,  0.81,  0.31), 1.15, 1.15, 1.62 ,  2 , 0.69 ),
-(29,        "Copper",       "Cu", ( 0.78,  0.50,   0.2), 1.17, 1.17, 1.57 ,  1 , 0.96 ,  2 , 0.72 ),
-(30,          "Zinc",       "Zn", ( 0.49,  0.50,  0.69), 1.25, 1.25, 1.53 ,  1 , 0.88 ,  2 , 0.74 ),
-(31,       "Gallium",       "Ga", ( 0.76,  0.56,  0.56), 1.26, 1.26, 1.81 ,  1 , 0.81 ,  3 , 0.62 ),
-(32,     "Germanium",       "Ge", (  0.4,  0.56,  0.56), 1.22, 1.22, 1.52 , -4 , 2.72 ,  2 , 0.73 ,  4 , 0.53 ),
-(33,       "Arsenic",       "As", ( 0.74,  0.50,  0.89), 1.20, 1.20, 1.33 , -3 , 2.22 ,  3 , 0.58 ,  5 , 0.46 ),
-(34,      "Selenium",       "Se", (  1.0,  0.63,   0.0), 1.16, 1.16, 1.22 , -2 , 1.91 , -1 , 2.32 ,  1 , 0.66 ,  4 , 0.50 ,  6 , 0.42 ),
-(35,       "Bromine",       "Br", ( 0.65,  0.16,  0.16), 1.14, 1.14, 1.12 , -1 , 1.96 ,  5 , 0.47 ,  7 , 0.39 ),
-(36,       "Krypton",       "Kr", ( 0.36,  0.72,  0.81), 1.31, 1.31, 1.24 ),
-(37,      "Rubidium",       "Rb", ( 0.43,  0.18,  0.69), 2.16, 2.16, 2.98 ,  1 , 1.47 ),
-(38,     "Strontium",       "Sr", (  0.0,   1.0,   0.0), 1.91, 1.91, 2.45 ,  2 , 1.12 ),
-(39,       "Yttrium",        "Y", ( 0.58,   1.0,   1.0), 1.62, 1.62, 2.27 ,  3 , 0.89 ),
-(40,     "Zirconium",       "Zr", ( 0.58,  0.87,  0.87), 1.45, 1.45, 2.16 ,  1 , 1.09 ,  4 , 0.79 ),
-(41,       "Niobium",       "Nb", ( 0.45,  0.76,  0.78), 1.34, 1.34, 2.08 ,  1 , 1.00 ,  4 , 0.74 ,  5 , 0.69 ),
-(42,    "Molybdenum",       "Mo", ( 0.32,  0.70,  0.70), 1.30, 1.30, 2.01 ,  1 , 0.93 ,  4 , 0.70 ,  6 , 0.62 ),
-(43,    "Technetium",       "Tc", ( 0.23,  0.61,  0.61), 1.27, 1.27, 1.95 ,  7 , 0.97 ),
-(44,     "Ruthenium",       "Ru", ( 0.14,  0.56,  0.56), 1.25, 1.25, 1.89 ,  4 , 0.67 ),
-(45,       "Rhodium",       "Rh", ( 0.03,  0.49,  0.54), 1.25, 1.25, 1.83 ,  3 , 0.68 ),
-(46,     "Palladium",       "Pd", (  0.0,  0.41,  0.52), 1.28, 1.28, 1.79 ,  2 , 0.80 ,  4 , 0.65 ),
-(47,        "Silver",       "Ag", ( 0.75,  0.75,  0.75), 1.34, 1.34, 1.75 ,  1 , 1.26 ,  2 , 0.89 ),
-(48,       "Cadmium",       "Cd", (  1.0,  0.85,  0.56), 1.48, 1.48, 1.71 ,  1 , 1.14 ,  2 , 0.97 ),
-(49,        "Indium",       "In", ( 0.65,  0.45,  0.45), 1.44, 1.44, 2.00 ,  3 , 0.81 ),
-(50,           "Tin",       "Sn", (  0.4,  0.50,  0.50), 1.41, 1.41, 1.72 , -4 , 2.94 , -1 , 3.70 ,  2 , 0.93 ,  4 , 0.71 ),
-(51,      "Antimony",       "Sb", ( 0.61,  0.38,  0.70), 1.40, 1.40, 1.53 , -3 , 2.45 ,  3 , 0.76 ,  5 , 0.62 ),
-(52,     "Tellurium",       "Te", ( 0.83,  0.47,   0.0), 1.36, 1.36, 1.42 , -2 , 2.11 , -1 , 2.50 ,  1 , 0.82 ,  4 , 0.70 ,  6 , 0.56 ),
-(53,        "Iodine",        "I", ( 0.58,   0.0,  0.58), 1.33, 1.33, 1.32 , -1 , 2.20 ,  5 , 0.62 ,  7 , 0.50 ),
-(54,         "Xenon",       "Xe", ( 0.25,  0.61,  0.69), 1.31, 1.31, 1.24 ),
-(55,       "Caesium",       "Cs", ( 0.34,  0.09,  0.56), 2.35, 2.35, 3.35 ,  1 , 1.67 ),
-(56,        "Barium",       "Ba", (  0.0,  0.78,   0.0), 1.98, 1.98, 2.78 ,  1 , 1.53 ,  2 , 1.34 ),
-(57,     "Lanthanum",       "La", ( 0.43,  0.83,   1.0), 1.69, 1.69, 2.74 ,  1 , 1.39 ,  3 , 1.06 ),
-(58,        "Cerium",       "Ce", (  1.0,   1.0,  0.78), 1.65, 1.65, 2.70 ,  1 , 1.27 ,  3 , 1.03 ,  4 , 0.92 ),
-(59,  "Praseodymium",       "Pr", ( 0.85,   1.0,  0.78), 1.65, 1.65, 2.67 ,  3 , 1.01 ,  4 , 0.90 ),
-(60,     "Neodymium",       "Nd", ( 0.78,   1.0,  0.78), 1.64, 1.64, 2.64 ,  3 , 0.99 ),
-(61,    "Promethium",       "Pm", ( 0.63,   1.0,  0.78), 1.63, 1.63, 2.62 ,  3 , 0.97 ),
-(62,      "Samarium",       "Sm", ( 0.56,   1.0,  0.78), 1.62, 1.62, 2.59 ,  3 , 0.96 ),
-(63,      "Europium",       "Eu", ( 0.38,   1.0,  0.78), 1.85, 1.85, 2.56 ,  2 , 1.09 ,  3 , 0.95 ),
-(64,    "Gadolinium",       "Gd", ( 0.27,   1.0,  0.78), 1.61, 1.61, 2.54 ,  3 , 0.93 ),
-(65,       "Terbium",       "Tb", ( 0.18,   1.0,  0.78), 1.59, 1.59, 2.51 ,  3 , 0.92 ,  4 , 0.84 ),
-(66,    "Dysprosium",       "Dy", ( 0.12,   1.0,  0.78), 1.59, 1.59, 2.49 ,  3 , 0.90 ),
-(67,       "Holmium",       "Ho", (  0.0,   1.0,  0.61), 1.58, 1.58, 2.47 ,  3 , 0.89 ),
-(68,        "Erbium",       "Er", (  0.0,  0.90,  0.45), 1.57, 1.57, 2.45 ,  3 , 0.88 ),
-(69,       "Thulium",       "Tm", (  0.0,  0.83,  0.32), 1.56, 1.56, 2.42 ,  3 , 0.87 ),
-(70,     "Ytterbium",       "Yb", (  0.0,  0.74,  0.21), 1.74, 1.74, 2.40 ,  2 , 0.93 ,  3 , 0.85 ),
-(71,      "Lutetium",       "Lu", (  0.0,  0.67,  0.14), 1.56, 1.56, 2.25 ,  3 , 0.85 ),
-(72,       "Hafnium",       "Hf", ( 0.30,  0.76,   1.0), 1.44, 1.44, 2.16 ,  4 , 0.78 ),
-(73,      "Tantalum",       "Ta", ( 0.30,  0.65,   1.0), 1.34, 1.34, 2.09 ,  5 , 0.68 ),
-(74,      "Tungsten",        "W", ( 0.12,  0.58,  0.83), 1.30, 1.30, 2.02 ,  4 , 0.70 ,  6 , 0.62 ),
-(75,       "Rhenium",       "Re", ( 0.14,  0.49,  0.67), 1.28, 1.28, 1.97 ,  4 , 0.72 ,  7 , 0.56 ),
-(76,        "Osmium",       "Os", ( 0.14,   0.4,  0.58), 1.26, 1.26, 1.92 ,  4 , 0.88 ,  6 , 0.69 ),
-(77,       "Iridium",       "Ir", ( 0.09,  0.32,  0.52), 1.27, 1.27, 1.87 ,  4 , 0.68 ),
-(78,     "Platinium",       "Pt", ( 0.81,  0.81,  0.87), 1.30, 1.30, 1.83 ,  2 , 0.80 ,  4 , 0.65 ),
-(79,          "Gold",       "Au", (  1.0,  0.81,  0.13), 1.34, 1.34, 1.79 ,  1 , 1.37 ,  3 , 0.85 ),
-(80,       "Mercury",       "Hg", ( 0.72,  0.72,  0.81), 1.49, 1.49, 1.76 ,  1 , 1.27 ,  2 , 1.10 ),
-(81,      "Thallium",       "Tl", ( 0.65,  0.32,  0.30), 1.48, 1.48, 2.08 ,  1 , 1.47 ,  3 , 0.95 ),
-(82,          "Lead",       "Pb", ( 0.34,  0.34,  0.38), 1.47, 1.47, 1.81 ,  2 , 1.20 ,  4 , 0.84 ),
-(83,       "Bismuth",       "Bi", ( 0.61,  0.30,  0.70), 1.46, 1.46, 1.63 ,  1 , 0.98 ,  3 , 0.96 ,  5 , 0.74 ),
-(84,      "Polonium",       "Po", ( 0.67,  0.36,   0.0), 1.46, 1.46, 1.53 ,  6 , 0.67 ),
-(85,      "Astatine",       "At", ( 0.45,  0.30,  0.27), 1.45, 1.45, 1.43 , -3 , 2.22 ,  3 , 0.85 ,  5 , 0.46 ),
-(86,         "Radon",       "Rn", ( 0.25,  0.50,  0.58), 1.00, 1.00, 1.34 ),
-(87,      "Francium",       "Fr", ( 0.25,   0.0,   0.4), 1.00, 1.00, 1.00 ,  1 , 1.80 ),
-(88,        "Radium",       "Ra", (  0.0,  0.49,   0.0), 1.00, 1.00, 1.00 ,  2 , 1.43 ),
-(89,      "Actinium",       "Ac", ( 0.43,  0.67,  0.98), 1.00, 1.00, 1.00 ,  3 , 1.18 ),
-(90,       "Thorium",       "Th", (  0.0,  0.72,   1.0), 1.65, 1.65, 1.00 ,  4 , 1.02 ),
-(91,  "Protactinium",       "Pa", (  0.0,  0.63,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.13 ,  4 , 0.98 ,  5 , 0.89 ),
-(92,       "Uranium",        "U", (  0.0,  0.56,   1.0), 1.42, 1.42, 1.00 ,  4 , 0.97 ,  6 , 0.80 ),
-(93,     "Neptunium",       "Np", (  0.0,  0.50,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.10 ,  4 , 0.95 ,  7 , 0.71 ),
-(94,     "Plutonium",       "Pu", (  0.0,  0.41,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.08 ,  4 , 0.93 ),
-(95,     "Americium",       "Am", ( 0.32,  0.36,  0.94), 1.00, 1.00, 1.00 ,  3 , 1.07 ,  4 , 0.92 ),
-(96,        "Curium",       "Cm", ( 0.47,  0.36,  0.89), 1.00, 1.00, 1.00 ),
-(97,     "Berkelium",       "Bk", ( 0.54,  0.30,  0.89), 1.00, 1.00, 1.00 ),
-(98,   "Californium",       "Cf", ( 0.63,  0.21,  0.83), 1.00, 1.00, 1.00 ),
-(99,   "Einsteinium",       "Es", ( 0.70,  0.12,  0.83), 1.00, 1.00, 1.00 ),
-(100,       "Fermium",       "Fm", ( 0.70,  0.12,  0.72), 1.00, 1.00, 1.00 ),
-(101,   "Mendelevium",       "Md", ( 0.70,  0.05,  0.65), 1.00, 1.00, 1.00 ),
-(102,      "Nobelium",       "No", ( 0.74,  0.05,  0.52), 1.00, 1.00, 1.00 ),
-(103,    "Lawrencium",       "Lr", ( 0.78,   0.0,   0.4), 1.00, 1.00, 1.00 ),
-(104,       "Vacancy",      "Vac", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-(105,       "Default",  "Default", (  1.0,   1.0,   1.0), 1.00, 1.00, 1.00),
-(106,         "Stick",    "Stick", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-)
-
-# This list here contains all data of the elements and will be used during
-# runtime. It is a list of classes.
-# During executing Atomic Blender, the list will be initialized with the fixed
-# data from above via the class structure below (ElementProp). We
-# have then one fixed list (above), which will never be changed, and a list of
-# classes with same data. The latter can be modified via loading a separate
-# custom data file for instance.
-ELEMENTS = []
-
-# This is the class, which stores the properties for one element.
-class ElementProp(object):
-    __slots__ = ('number', 'name', 'short_name', 'color', 'radii', 'radii_ionic')
-    def __init__(self, number, name, short_name, color, radii, radii_ionic):
-        self.number = number
-        self.name = name
-        self.short_name = short_name
-        self.color = color
-        self.radii = radii
-        self.radii_ionic = radii_ionic
-
-
-# -----------------------------------------------------------------------------
-#                                                          Some small routines
-
-# This function measures the distance between two objects (atoms),
-# which are active.
-def distance():
-
-    # In the 'Edit mode'
-    if bpy.context.mode == 'EDIT_MESH':
-
-        obj = bpy.context.edit_object
-        bm = bmesh.from_edit_mesh(obj.data)
-        locations = []
-
-        for v in bm.verts:
-            if v.select:
-                locations.append(obj.matrix_world * v.co)
-                
-        if len(locations) > 1:
-            location1 = locations[0]
-            location2 = locations[1]        
-        else:
-            return "N.A"
-    # In the object mode
-    else:
-
-        if len(bpy.context.selected_bases) > 1:
-            location1 = bpy.context.selected_objects[0].location
-            location2 = bpy.context.selected_objects[1].location
-        else:
-            return "N.A."
-
-    dv = location2 - location1
-    dist = str(dv.length)
-    pos = str.find(dist, ".")
-    dist = dist[:pos+4]
-    dist = dist + " A"
-  
-    return dist
-
-
-def choose_objects(how, who, radius_all, radius_pm, radius_type):
-
-    if who == "ALL_IN_LAYER":
-
-        # Determine all selected layers.
-        layers = []
-        for i, layer in enumerate(bpy.context.scene.layers):
-            if layer == True:
-                layers.append(i)
-                
-        # Put all objects, which are in the layers, into a list.
-        change_objects = []
-        for obj in bpy.context.scene.objects:
-            for layer in layers:
-                if obj.layers[layer] == True:
-                    change_objects.append(obj)
-                    
-        # Consider all objects, which are in the list 'change_objects'.
-        for obj in change_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type in {'SURFACE', 'MESH', 'META'}:
-                    modify_objects(how, 
-                                   obj.children[0],
-                                   radius_all, 
-                                   radius_pm, 
-                                   radius_type)
-            else:
-                if obj.type in {'SURFACE', 'MESH', 'META'}:
-                    modify_objects(how, 
-                                   obj,  
-                                   radius_all, 
-                                   radius_pm, 
-                                   radius_type)
-    if who == "ALL_ACTIVE":
-        for obj in bpy.context.selected_objects:
-            if len(obj.children) != 0:
-                if obj.children[0].type in {'SURFACE', 'MESH', 'META'}:
-                    modify_objects(how, 
-                                   obj.children[0],
-                                   radius_all, 
-                                   radius_pm, 
-                                   radius_type)
-            else:
-                if obj.type in {'SURFACE', 'MESH', 'META'}:
-                    modify_objects(how, 
-                                   obj,
-                                   radius_all, 
-                                   radius_pm, 
-                                   radius_type)
-
-
-
-# Routine to modify the radii in picometer of a specific type of atom
-def modify_objects(how, obj, radius_all, radius_pm, radius_type):
-
-    # Radius pm 
-    if how == "radius_pm":
-        if radius_pm[0] in obj.name:
-            obj.scale = (radius_pm[1]/100,) * 3
-            
-    # Radius all 
-    if how == "radius_all":
-        obj.scale *= radius_all      
-              
-    # Radius type 
-    if how == "radius_type":
-        for element in ELEMENTS:
-            if element.name in obj.name:
-                obj.scale = (element.radii[int(radius_type)],) * 3
-
-
-# Read the default element list.
-def read_elements():
-
-    del ELEMENTS[:]
-
-    for item in ELEMENTS_DEFAULT:
-
-        # All three radii into a list
-        radii = [item[4],item[5],item[6]]
-        # The handling of the ionic radii will be done later. So far, it is an
-        # empty list.
-        radii_ionic = []
-
-        li = ElementProp(item[0],item[1],item[2],item[3],
-                                     radii,radii_ionic)
-        ELEMENTS.append(li)
-
-
-# Change color and radii by uisnf the list of elements.
-def custom_datafile_change_atom_props():
-
-    for obj in bpy.context.selected_objects:
-        if len(obj.children) != 0:
-            child = obj.children[0]
-            if child.type in {'SURFACE', 'MESH', 'META'}:
-                for element in ELEMENTS:
-                    if element.name in obj.name:
-                        child.scale = (element.radii[0],) * 3
-                        child.active_material.diffuse_color = element.color
-        else:
-            if obj.type in {'SURFACE', 'MESH', 'META'}:
-                for element in ELEMENTS:
-                    if element.name in obj.name:
-                        obj.scale = (element.radii[0],) * 3
-                        obj.active_material.diffuse_color = element.color
-
-
-# This reads a custom data file.
-def custom_datafile(path_datafile):
-
-    if path_datafile == "":
-        return False
-
-    path_datafile = bpy.path.abspath(path_datafile)
-
-    if os.path.isfile(path_datafile) == False:
-        return False
-
-    # The whole list gets deleted! We build it new.
-    del ELEMENTS[:]
-
-    # Read the data file, which contains all data
-    # (atom name, radii, colors, etc.)
-    data_file_p = open(path_datafile, "r")
-
-    for line in data_file_p:
-
-        if "Atom" in line:
-
-            line = data_file_p.readline()
-            # Number
-            line = data_file_p.readline()
-            number = line[19:-1]
-            # Name
-            line = data_file_p.readline()
-            name = line[19:-1]
-            # Short name
-            line = data_file_p.readline()
-            short_name = line[19:-1]
-            # Color
-            line = data_file_p.readline()
-            color_value = line[19:-1].split(',')
-            color = [float(color_value[0]),
-                     float(color_value[1]),
-                     float(color_value[2])]
-            # Used radius
-            line = data_file_p.readline()
-            radius_used = float(line[19:-1])
-            # Atomic radius
-            line = data_file_p.readline()
-            radius_atomic = float(line[19:-1])
-            # Van der Waals radius
-            line = data_file_p.readline()
-            radius_vdW = float(line[19:-1])
-            radii = [radius_used,radius_atomic,radius_vdW]
-            radii_ionic = []
-
-            element = ElementProp(number,name,short_name,color,
-                                              radii, radii_ionic)
-
-            ELEMENTS.append(element)
-
-    data_file_p.close()
-
-    return True
-
-
-# Routine for separating atoms from a dupliverts strucutre.
-def separate_atoms(scn):
-
-    # Get first all important properties from the atoms, which the user
-    # has chosen: location, color, scale
-    obj = bpy.context.edit_object
-        
-    # Do nothing if it is not a dupliverts structure.
-    if not obj.dupli_type == "VERTS":
-       return {'FINISHED'}
-        
-    bm = bmesh.from_edit_mesh(obj.data)
-
-    locations = []
-
-    for v in bm.verts:
-        if v.select:
-            locations.append(obj.matrix_world * v.co)
-
-    bm.free()
-    del(bm)
-
-    name  = obj.name
-    scale = obj.children[0].scale
-    material = obj.children[0].active_material
-
-    # Separate the vertex from the main mesh and create a new mesh.
-    bpy.ops.mesh.separate()
-    new_object = bpy.context.scene.objects[0]
-    # And now, switch to the OBJECT mode such that we can ...
-    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-    # ... delete the new mesh including the separated vertex
-    bpy.ops.object.select_all(action='DESELECT')
-    new_object.select = True
-    bpy.ops.object.delete()  
-
-    # Create new atoms/vacancies at the position of the old atoms
-    current_layers=bpy.context.scene.layers
-
-    # For all selected positions do:
-    for location in locations:
-        # For any ball do ...
-        if "Vacancy" not in name:
-            # NURBS ball
-            if obj.children[0].type == "SURFACE":
-                bpy.ops.surface.primitive_nurbs_surface_sphere_add(
-                                    view_align=False, enter_editmode=False,
-                                    location=location,
-                                    rotation=(0.0, 0.0, 0.0),
-                                    layers=current_layers)
-                # Mesh ball                    
-            elif obj.children[0].type == "MESH":
-                bpy.ops.mesh.primitive_uv_sphere_add(
-                                segments=32,
-                                ring_count=32,                    
-                                #segments=scn.mesh_azimuth,
-                                #ring_count=scn.mesh_zenith,
-                                size=1, view_align=False, enter_editmode=False,
-                                location=location,
-                                rotation=(0, 0, 0),
-                                layers=current_layers)
-                # Metaball
-            elif obj.children[0].type == "META":
-                bpy.ops.object.metaball_add(type='BALL', view_align=False, 
-                            enter_editmode=False, location=location, 
-                            rotation=(0, 0, 0), layers=current_layers)
-        # If it is a vacancy create a cube ...                    
-        else:
-            bpy.ops.mesh.primitive_cube_add(
-                           view_align=False, enter_editmode=False,
-                           location=location,
-                           rotation=(0.0, 0.0, 0.0),
-                           layers=current_layers)
-                               
-        new_atom = bpy.context.scene.objects.active
-        # Scale, material and name it.
-        new_atom.scale = scale
-        new_atom.active_material = material
-        new_atom.name = name + "_sep"
-        new_atom.select = True
-
-    bpy.context.scene.objects.active = obj
-    #bpy.ops.object.select_all(action='DESELECT')
diff --git a/release/scripts/addons_contrib/io_directx_bel/README b/release/scripts/addons_contrib/io_directx_bel/README
deleted file mode 100644
index 2867827..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/README
+++ /dev/null
@@ -1,266 +0,0 @@
-a DirectX importer addon for Blender 2.6
-
-first goals :
-
-. to import anything from an .x file.
-  obviously verts, faces but uv, armatures, weights, normals...
-. import .x in binary format too
-
-horizon :
-. export to .x or mod/co-maintain the existing x exporter.
-. this project is also a prototype for a 'Blender Exchange Layer' project.
-  BEL would be a common layer logically located between an importer/exporter
-  addon and the blender data format, that would allow :
-    . to provide a common set of methods to retrieve/inject objects in Blender
-    . to provide a common set of transformation and selection tools between an
-      import/export script and Blender datas (rotate, rescale, filters...)
-    . to provide a common set of parsing helpers for new io addons
-
-PLY won't be used unfortunately (it's way too slow as far as I tested)
-
-
-TO TEST THE SCRIPT :
-  . copy the 'io_directx_bel' in /scripts/addons or addons_contrib
-  . start blender
-  . enable then addon in  user prefs > addons
-  . run the script with file > import > directX
- 
-25/01/12 0.18
-  . code rewrite according to api bmesh changes (me.polygon and uv layers essentially)
-  . implemented foreachset() call for uv import (faster)
-  
-25/01/12 0.17
-  . faster, 60% faster in some case : various loops improvements, infile templates parsing disabled by default
-    saw another bottleneck about data chunks as string but will wait for binary support for better point of view.
-  . interface cosmetics
-    
-23/01/12 rc 0.16
-. committed to svn (and littleneo git as usual)
-. corrected a bug about referenced token parenting
-. corrected a bug about non parented meshes
-. armatures/empties importation enabled by default
-. last run importer options are saved in a 'last_run' preset,
-  so it can be replayed or saved under another name once a
-  particular .x profile has been defined
-. tagged script for 2.6.1
-
-12/01/12 rc 0.15 :)
-. name conversion changed from 5 to 4 digits
-. matname, imagename and texturename fixes :
-. a path test is made at image import time with any existing data images, 
-  so a same file cant be loaded twice wathever the naming method, / or \, rel or abs etc 
-  (bel.material.new() and after line 835)
-. image and texture names should be ok now (tested with : incrediblylongname.x)
-. materials are replaced accordingly in existing objs when using the 'replace' naming method
-. fyi, the Dx exporter has the following inconveniences :
-    . split linked faces into individual faces
-    . inversed uvmapping (y axis) ?
-    -> see testfiles/blender_x_export/incrediblylongname.x
-   
-29 and 31/12/11
-. Cosmetics, code cleaning and optimizations
-. bpy.ops.object.select_name methods replaced with
-    ob.select = True
-    bpy.context.scene.objects.active = ob
-. corrected a big bug about tokens info appending in dXtree()
-. new bpyname() method in bel module. removed bel.common
-
-26/12/11
-. armature import and bone max. length option
-
-23/11/11
-. contrib candidate :)
-. solved some naming cases, added bel methods.
-. added experimental option about parenting (no armature yet just empties, when needed)
-. a bit faster
-. added some test files (empty parenting, armature etc)
-
-22/11/11
-campbell feedback (cont):
-. added naming methods as options (default is blender name inc. if name exists)
-  me and ob remove() should be ok with special cases (empties, mesh with multi-users)
-. improved ui
-
-
-21/11/11
-campbell feedback :
-. converted immutables to tuples : templates_x.py and some other vars.
-  http://stackoverflow.com/questions/3340539/why-tuple-is-faster-than-list
-. dprint() (console debug) removed, replaced by a inloop tests (a bit faster)
-  I'd like to keep it for now for easier debug (eg user feedbacks with 'processing' option)
-  
-19/11/11
-. object parenting support. parsing the x tree from roots using import_dxtree()
-  actually faster than before
-  
-16/11/11
-. weight group import
-. improved ui a bit and console logs
-. x matrices to blender ones conversion
-
-14/11/11
-. global matrix options
-. added messy code about binary (not working)
-
-11/11/11
-. import materials and textures (basics) : uv and image mapped (multitex mode)
-  and material created with tex slot if any. alpha should be ok.. ?
-. added a smooth options
-. better tolerance with faulty .x (upper/lower case of template names)
-. token names length from x to blender conversion should be ok also (long name cases)
-. corrected a parser pointer error after one array parsing case.
-. added more templates (for mat and tex support)
-. removed texture files from repo in testfile (tex does not match meshes )
-  added some other x files for further tests in binary and compressed format
-  ( http://assimp.svn.sourceforge.net/viewvc/assimp/trunk/test/models/X/ )
-  
-08/11/11
-. turned into an addon (fork from obj import so unused functions atm)
-  enable it in addon, then file > import > directx
-. splitted directx parser (io_directx_bel folder) and bel draft 
-  the bel folder is intended to be located in /scripts/modules (shared components)
-  but it's ok in scripts/addons too (tbd)
-  bel folder (will) includes anything related to blender data helper (read/write)
-. corrected duplicated quotes for x string type
-
-07/11/11
-. uv import
-. generic directx token parser. templates items are used to read datas of any token type
-  a bit slower but cool since it should support non strict standard directx files
-  virtually it can retrieve everything from now supposing the template is know
-  by default or given in the file. calls are now like :
-		nbslots, mats = readToken('MeshMaterialList001') or
-		uv = readToken('uv001') or
-		nVerts, verts, nFaces, faces = readToken('Hydralisk_backbone1') etc
-. removed the specific mesh parser the 'rigid' file is the last before mutation to
-  generic parser. a bit faster but harder to make evolve or adapt. keep it as a faster
-  strict 'branch'
-. added some default templates
-  goals / wip :
-  . to compare template declaration in file and default one.
-    so either use the default one (strict) or the .x one (could differ)
-  . use by the generic data parser to avoid a parser for each kind of token
-. cleaner code (grouping methods, function names, docs etc) 
-  functions separated from calls
-  renamed token dict as tokens etc
-. added tweaks at the beginning of the file :
-	chunksize = 1024     # size of file streams red in a row
-	quickmode = False    # this to only find meshes (no parenting, no other tokens than Mesh ones)
-	showtree = False     # display the entire token tree in the console
-	showtemplate = True  # display template datas found in file
-. added a patch for malformed datas of vertices (meshFaces) :
-	# patch for malformed datas not completely clear yet ( I guess
-	# there's bunch of us when looking at meshface syntax in .x files) :
-	# when array members are like 3;v0,v1,v2;,
-	# and not like 3;v0;v1;v2;, depending on template declarations.
-	# http://paulbourke.net/dataformats/directx/#xfilefrm_Use_of_commas
-. the script now generates linked faces (was not my fault !)
-  > it seems Dx always separate each face :
-  so it defines (vert * linked faces) verts for one needed vert
-  the readvertices loop now remove duplicates at source
-  it uses a verts lookup list to redirect vert id defined in faces
-
-06/11/11
-. vertices and faces imported from each test files
-. added some info to test yourself in README 
-. switched to binary for .x as text to retrieve eol (pointer bugs). should be ok whatever it's win, mac or unix text format,
-  also works with mixed eol.
-  it seems python 3.1 can't return a 'line' when data.realine() when read mode is 'rb' (U default and universal ? really ? ;) ) 
-  when file has mac eol (\r)
-  -> read(1024) in binary, decode, and replace any \r with \n. yes, it doubles lines for windows and lines value is wrong for now
-  -> but the used pointer value is always ok now whatever the file format and still way faster than a data.tell()
-  see CRCF folder to compare output wispwind.x by format.
-. files are still splitted into chunks (1024 B) and readable as lines
-. references : added 'user' fields when token is used. users store a reference with their childs but with a '*' tag at chr0.
-  the tree reflects the changes
-. now read anything and add it to the 'tree'. this includes unknow tokens.
-. references are recognized. by reference I mean fields like { cube0 } rather than an inline frame cube0 {
-  declaration.
-  I don't know if one item can be referenced several time or referenced before declaration
-  should be.. waiting for a case. for now only one 'parent' token, messages will show up
-  multi references to one token if cases arise. 
-. more permissive syntax : 'frame spam{', 'frame     spam   egg{', 'frame spam egg  {'..
-. comments are recognized (inlines ones not done yet, since still no useful data red :) )
-. header is red
-. found other .x test files here :
-  http://www.xbdev.net/3dformats/x/xfileformat.php
-  created from 3ds max
-. added .x files in repo. line 70 and following to switch.
-. some token comes with no names, add a noname<00000> to them
-. console gives line number (more useful than char position I guess)
-
-
-05/11/11	day 0 :
-
-. made some disapointing test with ply (from a speed point of view, else it looks really cool)
-. made my own parser
-. nothing imported for now, it's more about self-eduction to .x and concept
-. but it reads the .x structure and can gather some info
-
-resource gathered :
-
-http://paulbourke.net/dataformats/directx/
-http://www.informikon.com/various/the-simplest-skeletal-animation-possible.html
-http://msdn.microsoft.com/en-us/library/windows/desktop/bb173011%28v=VS.85%29.aspx
-http://www.toymaker.info/Games/index.html
-
-
-
-step 1 : read main structure :
-
-    read main token names (any 'template', any 'frame', any 'mesh')
-    stores names in a token directory :
-        token['template'] for templates :
-            token['template'][templatename]
-            token['template'][templatename]['pointer']          (int) chr position in .x file (tell() like*)
-            token['template'][templatename]['line']             (int) line number in .x file
-        token['frame'] for frame and mesh type :
-            token['template'][frame or mesh name]
-            token['template'][frame or mesh name]['pointer']    (int) chr position in .x file (tell() like*)
-            token['template'][frame or mesh name]['line']       (int) line number in .x file
-            token['template'][frame or mesh name]['type']       (str) 'ob/bone' or 'mesh'
-            token['template'][frame or mesh name]['parent']     (str) frame parent of current item
-            token['template'][frame or mesh name]['childs']     (str list) list of child frame or mesh names
-            token['template'][frame or mesh name]['matrix']     (int) for now chr position of FrameTransformMatrix
-
-at the end of step 1 the script prints a tree of these datas
-
-step 2 : read template definitions :
-
-    for each template in dict, populate definitions in it.
-    it creates new fields in each token['template'][templatename]
-    according to values found in .x :
-        token['template'][templatename]['uuid']                 (str) <universally unique identifier>
-        token['template'][templatename]['members']['name']      (str) member name
-        token['template'][templatename]['members']['type']      (str) DWORD,FLOAT etc keywords or template name
-        token['template'][templatename]['restriction']          (str) 'open' , 'closed' , or the specidied (restricted) value
-
-that's all for now.
-
-idea would be to allow 2 steps importation and random access to file :
-
-    . first the file is quickly parsed. we only retrieve main info, nothing about verts, faces etc
-    info like number of mats, textures, objects/mesh/bone trees
-    for now : 150000 lines in 5 secs for step 1
-    . then user select what to import
-    . then the script retrieve selected datas according to selection, using the 'pointer' value
-      to seek() to the needed data, then grab/parse/translate in something usable.
-    . template are used at this point to know how to parse a specific part (adaptive parser)
-	  
-    so far this looks fast.
-	
-tested on windows. can be important because of eol and the code I wrote to compute pointer value.
-(data.tell() is slow)
-only one .x file tested, header is : xof 0303txt 0032 (windows \r\n eol)
-
-don't know a lot about .x format :
-
-uuid : 
-  are the member/restriction always the same for a same uuid/template ?
-  template name can vary for a same uuid ?
-syntax :
-  blank lines IN a stream of a {} section, after ; ?
-  comments // and # IN a stream of data ?
-  '{' and '<something>' and '}' on the same line or '{' '}' are always unique ?
-  
- 
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/__init__.py b/release/scripts/addons_contrib/io_directx_bel/__init__.py
deleted file mode 100644
index 2b707a5..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/__init__.py
+++ /dev/null
@@ -1,296 +0,0 @@
-# Blender directX importer
-bl_info = {
-    "name": "DirectX Importer",
-    "description": "Import directX Model Format (.x)",
-    "author": "Littleneo (Jerome Mahieux)",
-    "version": (0, 18),
-    "blender": (2, 6, 3),
-    "api": 42615,
-    "location": "File > Import > DirectX (.x)",
-    "warning": "",
-    "wiki_url": "https://github.com/littleneo/directX_blender/wiki",
-    "tracker_url": "https://github.com/littleneo/directX_blender/issues",
-    "category": "Import-Export",
-    "dependencies": ""
-}
-
-if "bpy" in locals():
-    import imp
-    if "import_x" in locals():
-        imp.reload(import_x)
-    #if "export_x" in locals():
-    #    imp.reload(export_x)
-
-
-import bpy
-from bpy.props import (BoolProperty,
-                       FloatProperty,
-                       StringProperty,
-                       EnumProperty,
-                       )
-from bpy_extras.io_utils import (ExportHelper,
-                                 ImportHelper,
-                                 path_reference_mode,
-                                 axis_conversion,
-                                 )
-try : import bel
-except : import io_directx_bel.bel
-    
-class ImportX(bpy.types.Operator, ImportHelper):
-    '''Load a Direct x File'''
-    bl_idname = "import_scene.x"
-    bl_label = "Import X"
-    bl_options = {'PRESET', 'UNDO'}
-
-    filename_ext = ".x"
-    filter_glob = StringProperty(
-            default="*.x",
-            options={'HIDDEN'},
-            )
-    show_tree = BoolProperty(
-            name="Show x tokens tree",
-            description="display relationships between x items in the console",
-            default=False,
-            )
-    show_templates = BoolProperty(
-            name="Show x templates",
-            description="display templates defined in the .x file",
-            default=False,
-            )
-    show_geninfo = BoolProperty(
-            name="Show processing",
-            description="display details for each imported thing",
-            default=False,
-            )
-    
-    quickmode = BoolProperty(
-            name="Quick mode",
-            description="only retrieve mesh basics",
-            default=False,
-            )
-    
-    parented = BoolProperty(
-            name="Object Relationships",
-            description="import armatures, empties, rebuild parent-childs relations",
-            default=True,
-            )
-    
-    bone_maxlength = FloatProperty(
-            name="Bone length",
-            description="Bones max length",
-            min=0.1, max=10.0,
-            soft_min=0.1, soft_max=10.0,
-            default=1.0,
-            )
-    
-    chunksize = EnumProperty(
-            name="Chunksize",
-            items=(('0', "all", ""),
-                   ('4096', "4KB", ""),
-                   ('2048', "2KB", ""),
-                   ('1024', "1KB", ""),
-                   ),
-            default='2048',
-            description="number of bytes red in a row",
-            )
-    naming_method = EnumProperty(
-            name="Naming method",
-            items=(('0', "increment name if exists", "blender default"),
-                   ('1', "use existing", "this only append new elements"),
-                   ('2', "rename existing", "names are forced"),
-                   ('3', "replace existing", ""),
-                   ),
-            default='0',
-            description="behaviour when a name already exists in Blender Data",
-            )
-    use_ngons = BoolProperty(
-            name="NGons",
-            description="Import faces with more then 4 verts as fgons",
-            default=True,
-            )
-    use_edges = BoolProperty(
-            name="Lines",
-            description="Import lines and faces with 2 verts as edge",
-            default=True,
-            )
-    use_smooth_groups = BoolProperty(
-            name="Smooth Groups",
-            description="Surround smooth groups by sharp edges",
-            default=True,
-            )
-
-    use_split_objects = BoolProperty(
-            name="Object",
-            description="Import OBJ Objects into Blender Objects",
-            default=True,
-            )
-    use_split_groups = BoolProperty(
-            name="Group",
-            description="Import OBJ Groups into Blender Objects",
-            default=True,
-            )
-
-    use_groups_as_vgroups = BoolProperty(
-            name="Poly Groups",
-            description="Import OBJ groups as vertex groups",
-            default=False,
-            )
-
-    use_image_search = BoolProperty(
-            name="Image Search",
-            description="Search subdirs for any assosiated images " \
-                        "(Warning, may be slow)",
-            default=True,
-            )
-
-    split_mode = EnumProperty(
-            name="Split",
-            items=(('ON', "Split", "Split geometry, omits unused verts"),
-                   ('OFF', "Keep Vert Order", "Keep vertex order from file"),
-                   ),
-            )
-
-    global_clamp_size = FloatProperty(
-            name="Clamp Scale",
-            description="Clamp the size to this maximum (Zero to Disable)",
-            min=0.0, max=1000.0,
-            soft_min=0.0, soft_max=1000.0,
-            default=0.0,
-            )
-    
-    axis_forward = EnumProperty(
-            name="Forward",
-            items=(('X', "Left (x)", ""),
-                   ('Y', "Same (y)", ""),
-                   ('Z', "Bottom (z)", ""),
-                   ('-X', "Right (-x)", ""),
-                   ('-Y', "Back (-y)", ""),
-                   ('-Z', "Up (-z)", ""),
-                   ),
-            default='-Z',
-            )
-
-    axis_up = EnumProperty(
-            name="Up",
-            items=(('X', "Right (x)", ""),
-                   ('Y', "Back (y)", ""),
-                   ('Z', "Same (z)", ""),
-                   ('-X', "Left (-x)", ""),
-                   ('-Y', "Front (-y)", ""),
-                   ('-Z', "Bottom (-z)", ""),
-                   ),
-            default='Y',
-            )
-
-    def execute(self, context):
-        from . import import_x
-        if self.split_mode == 'OFF':
-            self.use_split_objects = False
-            self.use_split_groups = False
-        else:
-            self.use_groups_as_vgroups = False
-            
-        keywords = self.as_keywords(ignore=("axis_forward",
-                                            "axis_up",
-                                            "filter_glob",
-                                            "split_mode",
-                                            ))
-
-        keywords["naming_method"] = int(self.naming_method)
-        
-        global_matrix = axis_conversion(from_forward=self.axis_forward,
-                                        from_up=self.axis_up,
-                                        ).to_4x4()
-        keywords["global_matrix"] = global_matrix
-
-    
-        bel.fs.saveOptions(self,'import_scene.x', self.as_keywords(ignore=(
-                                            "filter_glob",
-                                            "filepath",
-                                            )))
-        return import_x.load(self, context, **keywords)
-
-    def draw(self, context):
-        layout = self.layout
-        
-        # import box
-        box = layout.box()
-        col = box.column(align=True)
-        col.label('Import Options :')  
-        col.prop(self, "chunksize")
-        col.prop(self, "use_smooth_groups")
-        actif = not(self.quickmode)
-        row = col.row()
-        row.enabled = actif
-        row.prop(self, "parented")
-        if self.parented :
-            row = col.row()
-            row.enabled = actif
-            row.prop(self, "bone_maxlength")      
-        col.prop(self, "quickmode")
-        
-        # source orientation box
-        box = layout.box()
-        col = box.column(align=True)
-        col.label('Source Orientation :')      
-        col.prop(self, "axis_forward")
-        col.prop(self, "axis_up")
-
-        # naming methods box
-        box = layout.box()
-        col = box.column(align=True)
-        col.label('Naming Method :')
-        col.props_enum(self,"naming_method")
-
-        # info/debug box
-        box = layout.box()
-        col = box.column(align=True)
-        col.label('Info / Debug :')
-        col.prop(self, "show_tree")
-        col.prop(self, "show_templates")
-        col.prop(self, "show_geninfo")
-        
-        #row = layout.row(align=True)
-        #row.prop(self, "use_ngons")
-        #row.prop(self, "use_edges")
-        
-        '''
-        box = layout.box()
-        row = box.row()
-        row.prop(self, "split_mode", expand=True)
-
-        row = box.row()
-        if self.split_mode == 'ON':
-            row.label(text="Split by:")
-            row.prop(self, "use_split_objects")
-            row.prop(self, "use_split_groups")
-        else:
-            row.prop(self, "use_groups_as_vgroups")
-
-        row = layout.split(percentage=0.67)
-        row.prop(self, "global_clamp_size")
-
-        layout.prop(self, "use_image_search")
-        '''
-
-def menu_func_import(self, context):
-    self.layout.operator(ImportX.bl_idname, text="DirectX (.x)")
-
-#def menu_func_export(self, context):
-#    self.layout.operator(ExportX.bl_idname, text="DirectX (.x)")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_file_import.append(menu_func_import)
-    #bpy.types.INFO_MT_file_export.append(menu_func_export)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_file_import.remove(menu_func_import)
-    #bpy.types.INFO_MT_file_export.remove(menu_func_export)
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/__init__.py b/release/scripts/addons_contrib/io_directx_bel/bel/__init__.py
deleted file mode 100644
index fcc6a5c..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/__init__.py
+++ /dev/null
@@ -1,23 +0,0 @@
-# set a given name to a unique
-# blender data name in its collection
-def bpyname(name,collection,limit=63,suffix=4) :
-    name = name[:limit-suffix]
-    tpl = '%s.%.'+str(suffix)+'d'
-    bname = name
-    id = 0
-    while bname in collection :
-        id += 1
-        bname = tpl%(name,id)
-    return bname
-
-## check if there's nested lists in a list. used by functions that need
-# list(s) of vertices/faces/edges etc as input
-# @param lst a list of vector or a list of list of vectors
-# @returns always nested list(s)
-# a boolean True if was nested, False if was not
-def nested(lst) :
-    try :
-        t = lst[0][0][0]
-        return lst, True
-    except :
-        return [lst], False
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/fs.py b/release/scripts/addons_contrib/io_directx_bel/bel/fs.py
deleted file mode 100644
index 18e2b2c..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/fs.py
+++ /dev/null
@@ -1,73 +0,0 @@
-# v0.1
-import bpy
-from os import path as os_path, listdir as os_listdir
-from bpy import path as bpy_path
-
-# cross platform paths (since ms conform to / path ;) )
-# maybe add utf8 replace to old ascii blender builtin
-# // can be omitted for relative
-def clean(path) :
-    path = path.strip().replace('\\','/')
-    if ('/') not in path : path = '//'+path
-    return path
-    
-## test for existence of a file or a dir
-def exist(path) :
-    if isfile(path) or isdir(path) : return True
-    return False
-
-## test for existence of a file
-def isfile(path) :
-    if os_path.isfile(path) : return True
-    # could be blender relative
-    path = bpy_path.abspath(path)
-    if os_path.isfile(path) : return True
-    return False
-
-## test for existence of a dir
-def isdir(path) :
-    if os_path.isdir(path) : return True
-    # could be blender relative
-    path = bpy_path.abspath(path)
-    if os_path.isdir(path) : return True
-    return False
-
-## returns a list of every absolute filepath
-# to each file within the 'ext' extensions
-# from a folder and its subfolders
-def scanDir(path,ext='all') :
-    files = []
-    fields = os_listdir(path)
-    if ext != 'all' and type(ext) != list : ext = [ext]
-    for item in fields :
-        if os_path.isfile(path + '/' + item) and (ext == 'all' or item.split('.')[-1] in ext) :
-            #print('  file %s'%item)
-            files.append(path + '/' + item)
-        elif os_path.isdir(path + '/' + item) :
-            print('folder %s/%s :'%(path,item))
-            files.extend(scanDir(path + '/' + item))
-    return files
-
-def saveOptions(op,operator_name, tokens, filename='last_run'):
-    #print(op.as_keywords())
-    #print(dir(op))
-    target_path = os_path.join("operator", operator_name)
-    target_path = os_path.join("presets", target_path)
-    target_path = bpy.utils.user_resource('SCRIPTS',target_path,create=True)
-    if target_path:
-        filepath = os_path.join(target_path, filename) + ".py"
-        file_preset = open(filepath, 'w')
-        file_preset.write("import bpy\nop = bpy.context.active_operator\n\n")
-        properties_blacklist = bpy.types.Operator.bl_rna.properties.keys()
-        for key, value in tokens.items() :
-            if key not in properties_blacklist :
-                # convert thin wrapped sequences to simple lists to repr()
-                try:
-                    value = value[:]
-                except:
-                    pass
-    
-                file_preset.write("op.%s = %r\n" % (key, value))
-
-        file_preset.close()
-    
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/image.py b/release/scripts/addons_contrib/io_directx_bel/bel/image.py
deleted file mode 100644
index f4a6179..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/image.py
+++ /dev/null
@@ -1,265 +0,0 @@
-import bpy
-import bpy.path
-
-from . import __init__ as bel
-from . import fs
-
-debuglevel = 0
-
-def dprint(str,l=2) :
-    if l <= debuglevel :
-        print(str)
-
-# create or retrieve a bdata image
-# given its path 
-def new(path, name=False, relative = True, premul = True) :
-    path = fs.clean(path)
-    # check file
-    if fs.isfile(path) == False :
-        dprint('Texture image not found')
-        return False
-
-    if relative :
-        try :
-            path = bpy.path.relpath(path)
-            path = fs.clean(path)
-        except : 
-            print('cant turn path into relative one (.blend and img path drive letters ?) ')
-        
-    # retrieve paths to image file from existing image slot
-    # returns img if paths match
-    for img in bpy.data.images :
-        if img.filepath != '' :
-            if bpy.path.abspath(path) == bpy.path.abspath(fs.clean(img.filepath)) :
-                return img
-
-    # create a unique name in image slot
-    if name == False : 
-        name = bpy.path.basename(path)
-    name = bel.bpyname(name,bpy.data.images.keys())
-
-    # finally :
-    img = bpy.data.images.load(filepath=path)
-    img.name = name
-    img.use_premultiply = premul
-    return img
-
-
-def applyShader(mat,config) :
-
-    # matslot.link = 'DATA'
-    #mat = bpy.data.materials['Female_Body']
-
-    texslot = mat.texture_slots[0]
-    tex = texslot.texture
-    img = tex.image
-    
-    #config = shaders[shadername]
-    alpha = True if 'alpha' in config else False
-
-    ## MAT
-
-    mat.type = 'SURFACE'
-    # diffuse
-    mat.diffuse_color = Color((0.6, 0.6, 0.6))
-    mat.diffuse_intensity = 0.8
-    mat.diffuse_shader = 'LAMBERT'
-    mat.use_diffuse_ramp = False
-
-    # specular
-    mat.specular_color = Color((1.0, 1.0, 1.0))
-    mat.specular_intensity = 0.25
-    mat.specular_shader = 'COOKTORR'
-    mat.use_specular_ramp = False
-    mat.specular_hardness = 1.0
-
-    # shading
-    mat.emit = 0.0
-    mat.ambient = 0.5
-    mat.translucency = 0.0
-    mat.use_shadeless = False
-    mat.use_tangent_shading = False
-    mat.use_cubic = False
-
-    # transparency
-    mat.use_transparency = alpha
-    mat.transparency_method = 'Z_TRANSPARENCY'
-    mat.alpha = not(alpha)
-    mat.specular_alpha = not(alpha)
-    mat.raytrace_transparency.fresnel = 0.0
-    mat.raytrace_transparency.fresnel_factor = 1.25
-
-    # mirror
-    mat.raytrace_mirror.use = False
-
-    # subsurface_scattering
-    mat.subsurface_scattering.use
-
-    # strand
-    # options
-    # shadow
-    mat.use_shadows = True
-    mat.use_transparent_shadows = True
-    mat.use_cast_shadows_only = False
-    mat.shadow_cast_alpha = 1.0
-    mat.use_only_shadow = False
-    mat.shadow_only_type = 'SHADOW_ONLY_OLD'
-    mat.use_cast_buffer_shadows = True
-    mat.shadow_buffer_bias = 0.0
-    mat.use_ray_shadow_bias = True
-    mat.shadow_ray_bias = 0.0
-    mat.use_cast_approximate = True
-
-    # TEXTURE SLOT 0
-
-    # diffuse
-    texslot.diffuse_factor = 1.0
-    texslot.use_map_diffuse = True
-    texslot.diffuse_color_factor = 1.0
-    texslot.use_map_color_diffuse = True
-    texslot.alpha_factor = 1.0
-    texslot.use_map_alpha = alpha
-    texslot.translucency_factor = 0.0
-    texslot.use_map_translucency = False
-
-    # specular
-    texslot.specular_factor = 0.3
-    texslot.use_map_specular = True
-    texslot.specular_color_factor = 1.0
-    texslot.use_map_color_spec = True
-    texslot.hardness_factor = 0.1
-    texslot.use_map_hardness = True
-
-    # shading
-    texslot.ambient_factor = 0.0
-    texslot.use_map_ambient = False
-    texslot.emit_factor = 0.1
-    texslot.use_map_emit = True
-    texslot.mirror_factor = 0.0
-    texslot.use_map_mirror = False
-    texslot.raymir_factor = 0.0
-    texslot.use_map_raymir = False
-
-    # geometry
-    texslot.normal_factor = 0.0
-    texslot.use_map_normal = False
-    texslot.warp_factor = 0.1
-    texslot.use_map_warp = False
-    texslot.displacement_factor = 0.0
-    texslot.use_map_displacement = False
-
-    texslot.blend_type = 'MIX'
-    texslot.invert = False
-    texslot.use_rgb_to_intensity = False
-    texslot.color = Color((1.0, 0.0, 1.0)) # default
-    texslot.use_stencil = False
-    texslot.default_value = 1.0
-
-    # TEXTURE
-    tex.use_alpha = alpha
-    tex.use_preview_alpha = alpha
-
-    # IMAGE
-    if type(img) != type(None) :
-        img.use_premultiply = True
-
-def BSshader(nodes,pointer) :
-    tkm = bpy.context.scene.tkm
-    typ, nodename = pointer.split(' ')
-    RenderShader = nodes[typ][nodename]
-    name = BSname(nodename,RenderShader['Object.Name'])
-    if name in bpy.data.materials :
-        mat = bpy.data.materials[name]
-    else :
-        mat = bpy.data.materials.new(name=name)
-        # Unused
-        DepthWriteEnable = RenderShader['DepthWriteEnable'] if 'DepthWriteEnable' in RenderShader else False # an integer
-        ShaderTransparency = RenderShader['MultiDrawLayer'] if 'MultiDrawLayer' in RenderShader else False # an integer
-        LightEnable = RenderShader['LightEnable'] if 'LightEnable' in RenderShader else False # an integer
-
-        ShaderPhong = BSnode(nodes,RenderShader['Surface'])
-        #print('mat : %s'%ShaderPhong['Material'])
-        RenderMaterial = BSnode(nodes,ShaderPhong['Material'])
-        DiffuseColor = RenderMaterial['DiffuseColor'] if 'DiffuseColor' in RenderMaterial else False
-        SpecularColor = RenderMaterial['SpecularColor'] if 'SpecularColor' in RenderMaterial else False
-        AmbientColor = RenderMaterial['AmbientColor'] if 'AmbientColor' in RenderMaterial else False
-        EmissionColor = RenderMaterial['Shininess'] if 'EmissionColor' in RenderMaterial else False
-        Shininess = RenderMaterial['Shininess'] if 'Shininess' in RenderMaterial else False
-        Transparency = RenderMaterial['Transparency'] if 'Transparency' in RenderMaterial else False
-        for key in RenderMaterial.keys() :
-            if key not in ['DiffuseColor','SpecularColor','AmbientColor','EmissionColor','Shininess','Transparency'] :
-                print('NEW RENDERMATERIAL PROP ! : %s'%key)
-        
-        #print(AmbientColor)
-        if DiffuseColor : mat.diffuse_color = Color(DiffuseColor) #[0][0],DiffuseColor[0][1],DiffuseColor[0][2])
-        if SpecularColor : mat.specular_color = Color(SpecularColor)#[0][0],SpecularColor[0][1],SpecularColor[0][2])
-        if AmbientColor : mat.ambient = AmbientColor[0] # source value is a vector3f with x=y=z 
-        if EmissionColor : mat.emit = EmissionColor[0] # source value is a vector3f with x=y=z 
-        #if Shininess : mat.
-        #alpha is a boolean, whereas Transparency is a float or False
-        if Transparency :
-            mat.use_transparency = True
-            mat.transparency_method = 'Z_TRANSPARENCY'
-            mat.alpha = Transparency
-            mat.specular_alpha = 0
-            alpha = True
-        else : alpha = False
-        texinfluence = False
-        if 'Color' in ShaderPhong :
-            ShaderTexture = BSnode(nodes,ShaderPhong['Color'])
-            texinfluence = 'Color'
-        if 'Reflection' in ShaderPhong :
-            ShaderTexture = BSnode(nodes,ShaderPhong['Reflection'])
-            texinfluence = 'Reflection'
-        if texinfluence == False :
-            print('neither color nor refl. in ShaderPhong %s'%RenderShader['Surface'])
-            print('other props are : %s'%ShaderPhong.keys())
-            return mat
-
-        ShaderTextureName = ShaderTexture['Object.Name']
-
-        Texture2D = BSnode(nodes,ShaderTexture['Texture'])
-        Texture2DName = Texture2D['Object.Name']
-
-        FileObject = BSnode(nodes,Texture2D['Texture.FileObject'])
-        imgpath = FileObject['FileName']
-        imgname = imgpath.split('/')[-1]
-        imgpath = tkm.path_archives+'/Images/Q=Tex032M/'+imgpath
-
-        if imgname not in bpy.data.images :        
-            if os.path.isfile(imgpath+'.png') : ext = '.png'
-            elif os.path.isfile(imgpath+'.jp2') : ext = '.jp2'
-            else :
-                print('Texture image not found ! %s'%Texture2D['Texture.FileObject'])
-                print('path : %s.png or .jp2 '%imgpath)
-                return mat
-            img = bpy.data.images.load(filepath=imgpath+ext)
-            img.name = imgname
-            img.use_premultiply = True
-        else : img = bpy.data.images[imgname]
-        
-        '''
-        texslot = mat.texture_slots[0]
-        mat.texture_slots[0]
-        tex = texslot.texture
-        tex.type = 'IMAGE'
-        img = tex.image        
-        img.name
-        '''
-        #img = bpy.data.images.new(name='imgname',width=640, height=512)
-
-        if ShaderTextureName not in bpy.data.textures :
-            tex = bpy.data.textures.new(name=ShaderTextureName,type='IMAGE')
-            tex.image = img
-            tex.use_alpha = alpha
-            tex.use_preview_alpha = alpha
-        else : tex = bpy.data.textures[ShaderTextureName]
-
-        texslot = mat.texture_slots.create(index=0)
-        texslot.texture = tex
-        texslot.texture_coords = 'UV'
-        texslot.uv_layer = 'UV0'
-        texslot.use_map_alpha = alpha
-        texslot.alpha_factor = 1.0
-
-    return mat
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/material.py b/release/scripts/addons_contrib/io_directx_bel/bel/material.py
deleted file mode 100644
index d39f32c..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/material.py
+++ /dev/null
@@ -1,32 +0,0 @@
-import bpy
-
-'''
-given name < 21
-if material name exists :
-naming_method = 0   blender default (increment name)
-naming_method = 1   do nothing, abort creation and use existing
-naming_method = 2   create new, rename existing, 
-naming_method = 3   create new, replace existing
-'''
-
-def new(name, naming_method=0) :
-    if name not in bpy.data.materials or naming_method == 0:
-        return bpy.data.materials.new(name=name)
-    
-    elif naming_method == 1 :
-        return bpy.data.materials[name]
-    
-    mat = bpy.data.materials.new(name=name)
-    
-    if naming_method == 2 :
-        mat.name = name
-        return mat
-    
-    # naming_method = 3 : replace 
-    prevmat = bpy.data.materials[name]
-    for ob in bpy.data.objects :
-        for matslot in ob.material_slots :
-            if matslot.material == prevmat :
-                matslot.material = mat
-    bpy.data.materials.remove(prevmat)
-    return mat
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/mesh.py b/release/scripts/addons_contrib/io_directx_bel/bel/mesh.py
deleted file mode 100644
index eee416c..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/mesh.py
+++ /dev/null
@@ -1,208 +0,0 @@
-##\file
-# raw extract quick cleaning from blended cities2.6 project. thanks to myself for cooperation, but what a messy code we have here.
-import bpy
-import mathutils
-from mathutils import *
-
-from . import uv as buv
-from . import ob as bob
-
-debuglevel = 0
-'''
-wip.. naming behaviour previous to any data
-name exist ?
-no : create
-yes :
-    naming_method = 0   blender default (increment name)
-    naming_method = 1   do nothing, abort creation and use existing
-    naming_method = 2   create new, rename existing, 
-    naming_method = 3   create new, remove existing
-    
-for now, and mesh data, 0 2 or 3
-'''
-
-## material listed in matslots must exist before creation of material slots
-
-def write(obname,name, 
-          verts=[], edges=[], faces=[], 
-          matslots=[], mats=[], uvs=[], 
-          groupnames=[], vindices=[], vweights=[],
-          smooth=False,
-          naming_method = 0,
-          ) :
-
-    
-    obj = bpy.data.objects[obname] if obname in bpy.data.objects else False
-    me = bpy.data.meshes[name] if name in bpy.data.meshes else False
-
-    #print(naming_method,type(obj),type(me))
-    #print(obj,me)
-    #print()
-    if naming_method == 1 and me and obj and obj.data == me :
-        #print('%s and %s exist, reuse'%(obj.name,me.name))
-        return obj
-       
-    if naming_method == 3 :
-        if obj : 
-            #print('remove ob %s'%obj.name)
-            bob.remove(obj,False)
-        if me :
-            #print('remove me %s'%me.name)
-            bob.removeData(me)
-    
-
-    me = bpy.data.meshes.new(name)
-    if naming_method == 2 : me.name = name
-    
-    me.from_pydata(verts, edges, faces)
-    me.update()
-
-    if smooth : shadesmooth(me)
-
-    # material slots
-    matimage=[]
-    if len(matslots) > 0 :
-        for matname in matslots :
-            '''
-            if matname not in bpy.data.materials :
-                mat = bpy.data.materials.new(name=matname)
-                mat.diffuse_color=( random.uniform(0.0,1.0),random.uniform(0.0,1.0),random.uniform(0.0,1.0))
-                mat.use_fake_user = True
-                warn.append('Created missing material : %s'%matname)
-            else :
-            '''
-            mat = bpy.data.materials[matname]
-            me.materials.append(mat)
-            texslot_nb = len(mat.texture_slots)
-            if texslot_nb :
-                texslot = mat.texture_slots[0]
-                if type(texslot) != type(None) :
-                    tex = texslot.texture
-                    if tex.type == 'IMAGE' :
-                        img = tex.image
-                        if type(img) != type(None) :
-                            matimage.append(img)
-                            continue
-            matimage.append(False)
-
-    # uvs
-    if len(uvs) > 0 :
-        #buv.write(me, uvs, matimage)
-        buv.flatwrite(me, uvs)
-
-    # map a material to each face
-    if len(mats) > 0 :
-        for fi,f in enumerate(me.polygons) :
-            f.material_index = mats[fi]
-
-    obj = bpy.data.objects.new(name=obname, object_data=me)
-    if naming_method != 0 :
-        obj.name = obname
-            
-    '''
-    else :
-        ob = bpy.data.objects[name]
-        ob.data = me
-        if naming_method == 2 : ob.name = 
-        ob.parent = None
-        ob.matrix_local = Matrix()
-        print('  reuse object %s'%ob.name)
-    '''
-            
-    # vertexgroups
-    if len(groupnames) > 0 :
-        for gpi, groupname in enumerate(groupnames) :
-            weightsadd(obj, groupname, vindices[gpi], vweights[gpi])
-    
-    # scene link check
-    if obj.name not in bpy.context.scene.objects.keys() :
-        bpy.context.scene.objects.link(obj)
-        
-    return obj
-
-def shadesmooth(me,lst=True) :
-    if type(lst) == list :
-        for fi in lst :
-            me.polygons[fi].use_smooth = True
-    else :
-        for fi,face in enumerate(me.polygons) :
-            face.use_smooth = True
- 
-def shadeflat(me,lst=True) :
-    if type(lst) == list :
-        for fi in lst :
-            me.polygons[fi].use_smooth = False
-    else :
-        for fi,face in enumerate(me.polygons) :
-            face.use_smooth = False
-
-def weightsadd(ob, groupname, vindices, vweights=False) :
-    if vweights == False : vweights = [1.0 for i in range(len(vindices))]
-    elif type(vweights) == float : vweights = [vweights for i in range(len(vindices))]
-    group = ob.vertex_groups.new(groupname)
-    for vi,v in enumerate(vindices) :
-        group.add([v], vweights[vi], 'REPLACE')
-
-def matToString(mat) :
-    #print('*** %s %s'%(mat,type(mat)))
-    return str(mat).replace('\n       ','')[6:]
-
-def stringToMat(string) :
-    return Matrix(eval(string))
-
-
-def objectBuild(elm, verts, edges=[], faces=[], matslots=[], mats=[], uvs=[] ) :
-    #print('build element %s (%s)'%(elm,elm.className()))
-    dprint('object build',2)
-    city = bpy.context.scene.city
-    # apply current scale
-    verts = metersToBu(verts)
-    
-    if type(elm) != str :
-        obname = elm.objectName()
-        if obname == 'not built' :
-            obname = elm.name
-    else : obname= elm
-
-    obnew = createMeshObject(obname, True, verts, edges, faces, matslots, mats, uvs)
-    #elm.asElement().pointer = str(ob.as_pointer())
-    if type(elm) != str :
-        if elm.className() == 'outlines' :
-            obnew.lock_scale[2] = True
-            if elm.parent :
-                obnew.parent = elm.Parent().object()
-        else :
-            #otl = elm.asOutline()
-            #ob.parent = otl.object()
-            objectLock(obnew,True)
-        #ob.matrix_local = Matrix() # not used
-        #ob.matrix_world = Matrix() # world
-    return obnew
-
-def dprint(str,l=2) :
-    if l <= debuglevel :
-        print(str)
-
-
-def materialsCheck(bld) :
-    if hasattr(bld,'materialslots') == False :
-        #print(bld.__class__.__name__)
-        builderclass = eval('bpy.types.%s'%(bld.__class__.__name__))
-        builderclass.materialslots=[bld.className()]
-
-    matslots = bld.materialslots
-    if len(matslots) > 0 :
-        for matname in matslots :
-            if matname not in bpy.data.materials :
-                mat = bpy.data.materials.new(name=matname)
-                mat.use_fake_user = True
-                if hasattr(bld,'mat_%s'%(matname)) :
-                    method = 'defined by builder'
-                    matdef = eval('bld.mat_%s'%(matname))
-                    mat.diffuse_color = matdef['diffuse_color']
-                else :
-                    method = 'random'
-                    mat.diffuse_color=( random.uniform(0.0,1.0),random.uniform(0.0,1.0),random.uniform(0.0,1.0))
-                dprint('Created missing material %s (%s)'%(matname,method),2)
-
-
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/ob.py b/release/scripts/addons_contrib/io_directx_bel/bel/ob.py
deleted file mode 100644
index 486bced..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/ob.py
+++ /dev/null
@@ -1,116 +0,0 @@
-import bpy
-from bpy.types import Mesh, PointLamp, SpotLamp, HemiLamp, AreaLamp, SunLamp, Camera, TextCurve, MetaBall, Lattice, Armature
-
-
-def new(name,datatype,naming_method):
-    if name in bpy.data.objects and naming_method :
-        ob = bpy.data.objects[name]
-        if naming_method == 1 :
-            ob.parent = None
-            ob.user_clear()
-        elif naming_method == 2 :
-            ob = bpy.data.objects.new(name,datatype)
-            ob.name = name
-        elif naming_method == 3 :
-            bpy.context.scene.objects.unlink(ob)
-            ob.user_clear()
-            bpy.data.objects.remove(ob)
-            ob = bpy.data.objects.new(name,datatype)
-    else :
-        ob = bpy.data.objects.new(name,datatype)
-    if ob.name not in bpy.context.scene.objects.keys() :
-        bpy.context.scene.objects.link(ob)
-    return ob
-
-## returns an object or a list of objects
-# @param ob 'all', 'active', 'selected', <object>, 'objectname'
-# @return a list of objects or an empty list
-def get(ob) :
-    if type(ob) == str :
-        if ob == 'all' : return bpy.context.scene.objects
-        elif ob == 'active' : return [bpy.context.active_object] if bpy.context.active_object != None else []
-        elif ob == 'selected' : return bpy.context.selected_objects
-        else :
-            try : return [bpy.data.objects[ob]]
-            except : return []
-    return [ob]
-
-
-## remove an object from blender internal
-def remove(ob,with_data=True) :
-    objs = get(ob)
-    #if objs :
-    #    if type(objs) == bpy.types.Object : objs = [objs]
-    for ob in objs :
-            data = ob.data
-            #and_data=False
-            # never wipe data before unlink the ex-user object of the scene else crash (2.58 3 770 2)
-            # if there's more than one user for this data, never wipeOutData. will be done with the last user
-            # if in the list
-            and_data = with_data
-            try :
-                if data.users > 1 :
-                    and_data=False
-            except :
-                and_data=False # empties
-                
-            # odd (pre 2.60) :
-            # ob=bpy.data.objects[ob.name]
-            # if the ob (board) argument comes from bpy.data.groups['aGroup'].objects,
-            #  bpy.data.groups['board'].objects['board'].users_scene
-            ob.name = '_dead'
-            for sc in ob.users_scene :
-                sc.objects.unlink(ob)
-
-            #try :
-                #print('  removing object %s...'%(ob.name)),
-            bpy.data.objects.remove(ob)
-                #print('  done.')
-            #except :
-            #    print('removing failed, but renamed %s and unlinked'%ob.name)
-
-            # never wipe data before unlink the ex-user object of the scene else crash (2.58 3 770 2)
-            if and_data :
-                wipeOutData(data)
-
-
-## remove an object data from blender internal
-## or rename it _dead if there's still users
-def removeData(data) :
-    #print('%s has %s user(s) !'%(data.name,data.users))
-    
-    if data.users <= 0 :
-
-            #data.user_clear()
-            data_type = type(data)
-            
-            # mesh
-            if data_type == Mesh :
-                bpy.data.meshes.remove(data)
-            # lamp
-            elif data_type in [ PointLamp, SpotLamp, HemiLamp, AreaLamp, SunLamp ] :
-                bpy.data.lamps.remove(data)
-            # camera
-            elif data_type == Camera :
-                bpy.data.cameras.remove(data)
-            # Text, Curve
-            elif data_type in [ Curve, TextCurve ] :
-                bpy.data.curves.remove(data)
-            # metaball
-            elif data_type == MetaBall :
-                bpy.data.metaballs.remove(data)
-            # lattice
-            elif data_type == Lattice :
-                bpy.data.lattices.remove(data)
-            # armature
-            elif data_type == Armature :
-                bpy.data.armatures.remove(data)
-            else :
-                print('  data still here : forgot %s type'%type(data))
-        #except :
-            # empty, field
-        #    print('%s has no user_clear attribute ? (%s).'%(data.name,type(data)))
-    else :
-        #print('  not done, %s has %s user'%(data.name,data.users))
-        data.name = '_dead'
-        
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/bel/uv.py b/release/scripts/addons_contrib/io_directx_bel/bel/uv.py
deleted file mode 100644
index 2827819..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/bel/uv.py
+++ /dev/null
@@ -1,109 +0,0 @@
-from mathutils import Vector
-from .__init__ import *
-from time import clock
-
-# uvs :
-# 
-def write(me, uvs, matimage = False) :
-    t = clock()
-    uvs, nest = nested(uvs)
-    newuvs = []
-    # uvi : uvlayer id  uvlist : uv coordinates list
-    for uvi, uvlist in enumerate(uvs) :
-
-        uv = me.uv_textures.new()
-        uv.name = 'UV%s'%uvi
-        
-        uvlayer = me.uv_layers[-1].data
-        
-        for uvfi, uvface in enumerate(uvlist) :
-            #uv.data[uvfi].use_twoside = True # 2.60 changes mat ways
-            mslotid = me.polygons[uvfi].material_index
-            #mat = mesh.materials[mslotid]
-            if matimage :
-                if matimage[mslotid] :
-                    img = matimage[mslotid]
-                    uv.data[uvfi].image=img
-            
-            vi = 0
-            for fi in me.polygons[uvfi].loop_indices :
-                uvlayer[fi].uv = Vector((uvface[vi],uvface[vi+1]))
-                vi += 2
-                
-        newuvs.append(uv)
-    print('uvs in ',clock() - t)
-    if nest : return newuvs
-    return newuvs[0]
-    
-## WAY faster
-def flatwrite(me, uvs, matimage = False) :
-    #t = clock()
-    newuvs = []
-    #print('uv funcinput : %s'%(len(uvs)))
-    # uvi : uvlayer id  uvlist : uv coordinates list
-    for uvi, uvlist in enumerate(uvs) :
-        #print('uvlist input : %s'%(len(uvlist)))
-        #print(uvlist[0:5])
-        uv = me.uv_textures.new()
-        uv.name = 'UV%s'%uvi
-        uvlayer = me.uv_layers[-1].data
-        # flatuv = awaited uvlist length
-        #flatuv = list( range(len(uvlayer) * 2) )
-        #print('uvlist need : %s'%(len(flatuv)))
-        uvlayer.foreach_set('uv',uvlist)
-
-        newuvs.append(uv)
-    #print('uvs in ',clock() - t)
-    return newuvs
-
-# face are squared or rectangular, 
-# any orientation
-# vert order width then height 01 and 23 = x 12 and 03 = y
-# normal default when face has been built
-def row(vertices,faces,normals=True) :
-    uvs = []
-    for face in faces :
-        v0 = vertices[face[0]]
-        v1 = vertices[face[1]]
-        v2 = vertices[face[-1]]
-        print(v0,v1)
-        lx = (v1 - v0).length
-        ly = (v2 - v0).length
-        # init uv
-        if len(uvs) == 0 :
-            x = 0
-            y = 0
-        elif normals :
-            x = uvs[-1][2]
-            y = uvs[-1][3]
-        else :
-            x = uvs[-1][0]
-            y = uvs[-1][1]
-        if normals : uvs.append([x,y,x+lx,y,x+lx,y+ly,x,y+ly])
-        else : uvs.append([x+lx,y,x,y,x,y+ly,x+lx,y+ly])
-    return uvs
-
-## convert UV given as verts location to blender format
-# eg : [ [v0x,v0y] , [vnx , vny] ... ] -> [ [ v1x,v1y,v0x,v0y,v4x,v4y] ... ]
-# found in directx
-def asVertsLocation(verts2d, faces) :
-    t = clock()
-    uv = []
-    for f in faces :
-        uvface = []
-        for vi in f :
-            uvface.extend(verts2d[vi])
-        uv.append(uvface)
-    print('uvs convert in ',clock() - t)
-    return uv
-
-## Dx to flat
-#eg : [ [v0x,v0y] ,[v1x,v1y] , [vnx , vny] ] -> [ v0x,v0y,v1x,v1y,vnx,vny ]
-def asFlatList(uvlist,faces) :
-    #t = clock()
-    uv = []
-    for f in faces :
-        for vi in f :
-            uv.extend(uvlist[vi])
-    #print('uvs convert in %s len : %s'%(str(clock() - t),len(uv)))
-    return uv
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/import_x.py b/release/scripts/addons_contrib/io_directx_bel/import_x.py
deleted file mode 100644
index f96dc7e..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/import_x.py
+++ /dev/null
@@ -1,971 +0,0 @@
-# Blender directX importer
-# version baby
-
-# litterature explaining the parser directions :
-
-# I don't want to load the whole file as it can be huge : go chunks
-# also I want random access to 3d datas to import pieces, not always everything
-# so step1 is a whole file fast parsing, retrieving tokens name and building en empty internal dict
-# with only pointers and no 3d datas.
-# step 2 is to call any token by their names and retrieve the 3d datas thanks to pointers stored in dicts
-# between step 1 and step 2 a script ui should be provided to select, transform etc before import.
-# > I need to know the pointer position of tokens but data.tell() is slow
-# a += pointer computed from line length is way faster. so I need eol -> rb mode
-# and readline() is ok in binary mode 'rb' with \r\n (win) \n (unix) but not \r mac..
-# 2chrs for windows, 1 for mac and lunix > win eol \r\n becomes \n\n (add a line)
-# mac eol \r becomes \n so win lines info are wrong
-# this also allows support for wrong files format (mixed \r and \r\n)
-# for now it only works for text format, but the used methods will be independant of the container type.
-
-# TEST FILES
-# http://assimp.svn.sourceforge.net/viewvc/assimp/trunk/test/models/X/
-
-
-import os
-import re
-import struct, binascii
-import time
-
-import bpy
-import mathutils as bmat
-from mathutils import Vector, Matrix
-
-try :
-	import bel
-	import bel.mesh
-	import bel.image
-	import bel.uv
-	import bel.material
-	import bel.ob
-	import bel.fs
-except :
-	import io_directx_bel.bel as bel
-	from .bel import mesh,image,uv,material,ob,fs
-
-from .templates_x import *
-
-'''
-# just a temp hack to reload bel everytime
-import imp
-imp.reload(bel)
-imp.reload(bel.fs)
-imp.reload(bel.image)
-imp.reload(bel.material)
-imp.reload(bel.mesh)
-imp.reload(bel.ob)
-imp.reload(bel.uv)
-'''
-
-###################################################
-
-def load(operator, context, filepath,
-         global_clamp_size=0.0,
-         show_tree=False,
-         show_templates=False,
-         show_geninfo=False,
-         quickmode=False,
-         parented=False,
-         bone_maxlength=1.0,
-         chunksize=False,
-         naming_method=0,
-         use_ngons=True,
-         use_edges=True,
-         use_smooth_groups=True,
-         use_split_objects=True,
-         use_split_groups=True,
-         use_groups_as_vgroups=False,
-         use_image_search=True,
-         global_matrix=None,
-         ):
-    
-    
-    if quickmode :
-        parented = False
-    
-    bone_minlength = bone_maxlength / 100.0
-    
-    #global templates, tokens
-    rootTokens = []
-    namelookup = {}
-    imgnamelookup = {}
-    chunksize = int(chunksize)
-    reserved_type = (
-        'dword',
-        'float',
-        'string'
-    )
-
-    '''
-        'array',
-        'Matrix4x4',
-        'Vector',
-    '''
-    '''
-    with * : defined in dXdata
-    
-    WORD     16 bits
-    * DWORD     32 bits
-    * FLOAT     IEEE float
-    DOUBLE     64 bits
-    CHAR     8 bits
-    UCHAR     8 bits
-    BYTE     8 bits
-    * STRING     NULL-terminated string
-    CSTRING     Formatted C-string (currently unsupported)
-    UNICODE     UNICODE string (currently unsupported)
-
-BINARY FORMAT
-# TOKENS in little-endian WORDs
-#define TOKEN_NAME         1
-#define TOKEN_STRING       2
-#define TOKEN_INTEGER      3
-#define TOKEN_GUID         5
-#define TOKEN_INTEGER_LIST 6
-#define TOKEN_FLOAT_LIST   7
-#define TOKEN_OBRACE      10
-#define TOKEN_CBRACE      11
-#define TOKEN_OPAREN      12
-#define TOKEN_CPAREN      13
-#define TOKEN_OBRACKET    14
-#define TOKEN_CBRACKET    15
-#define TOKEN_OANGLE      16
-#define TOKEN_CANGLE      17
-#define TOKEN_DOT         18
-#define TOKEN_COMMA       19
-#define TOKEN_SEMICOLON   20
-#define TOKEN_TEMPLATE    31
-#define TOKEN_WORD        40
-#define TOKEN_DWORD       41
-#define TOKEN_FLOAT       42
-#define TOKEN_DOUBLE      43
-#define TOKEN_CHAR        44
-#define TOKEN_UCHAR       45
-#define TOKEN_SWORD       46
-#define TOKEN_SDWORD      47
-#define TOKEN_VOID        48
-#define TOKEN_LPSTR       49
-#define TOKEN_UNICODE     50
-#define TOKEN_CSTRING     51
-#define TOKEN_ARRAY       52
-    
-    '''
-    
-    # COMMON REGEX
-    space = '[\ \t]{1,}' # at least one space / tab
-    space0 = '[\ \t]{0,}' # zero or more space / tab
-    
-    # DIRECTX REGEX TOKENS
-    r_template = r'template' + space + '[\w]*' + space0 + '\{'
-    if quickmode :
-        r_sectionname = r'Mesh' + space + '[\W-]*'
-    else :
-        r_sectionname = r'[\w]*' + space + '[\w-]*' + space0 + '\{'
-    r_refsectionname = r'\{' + space0 + '[\w-]*' + space0 + '\}'
-    r_endsection = r'\{|\}'
-    
-    # dX comments
-    r_ignore = r'#|//'
-    
-    #r_frame = r'Frame' + space + '[\w]*'
-    #r_matrix = r'FrameTransformMatrix' + space + '\{[\s\d.,-]*'
-    #r_mesh = r'Mesh' + space + '[\W]*'
-
-    ###################
-    ## STEP 1 FUNCTIONS
-    ###################
-    
-    ## HEADER
-    # returns header values or False if directx reco tag is missing
-    # assuming there's never comment header and that xof if the 1st
-    # string of the file
-    '''
-     they look like xof 0303txt 0032
-     4       Magic Number (required) "xof "
-     2       Minor Version 03
-     2       Major Version 02
-     4       Format Type (required) 
-        "txt " Text File
-        "bin " Binary File  
-        "tzip" MSZip Compressed Text File
-        "bzip" MSZip Compressed Binary File
-     4       Float Accuracy "0032" 32 bit or "0064" 64 bit
-    '''
-    def dXheader(data) :
-        l = data.read(4)
-        if l != b'xof ' :
-            print ('no header found !')
-            data.seek(0)
-            return False
-        minor = data.read(2).decode()
-        major = data.read(2).decode()
-        format = data.read(4).decode().strip()
-        accuracy = int(data.read(4).decode())
-        data.seek(0)
-        return ( minor, major, format, accuracy )
-        
-    
-    ##
-    def dXtree(data,quickmode = False) :
-        tokens = {}
-        templates = {}
-        tokentypes = {}
-        c = 0
-        lvl = 0
-        tree = ['']
-        ptr = 0
-        eol = 0
-        trunkated = False
-        previouslvl = False
-        while True :
-        #for l in data.readlines() :
-            lines, trunkated = nextFileChunk(data,trunkated)
-            if lines == None : break
-            for l in lines :
-                
-                # compute pointer position
-                ptr += eol
-                c += 1
-                eol = len(l) + 1
-                #print(c,data.tell(),ptr+eol)
-                #if l != '' : print('***',l)
-                #if l == ''  : break
-                l = l.strip()
-                
-                # remove blank and comment lines
-                if l == '' or re.match(r_ignore,l) :
-                    continue
-                
-                # one line token cases level switch
-                if previouslvl :
-                    lvl -= 1
-                    previouslvl = False
-                
-                #print('%s lines in %.2f\''%(c,time.clock()-t),end='\r')
-                #print(c,len(l)+1,ptr,data.tell())
-                if '{' in l :
-                    lvl += 1
-                    if '}' in l : previouslvl = True #; print('got one line token : \n%s'%l)
-                elif '}' in l :
-                    lvl -= 1
-                #print(c,lvl,tree)
-                
-                if quickmode == False :
-                    ## look for templates
-                    if re.match(r_template,l) :
-                        tname = l.split(' ')[1]
-                        templates[tname] = {'pointer' : ptr, 'line' : c}
-                        continue
-    
-                    ## look for {references}
-                    if re.match(r_refsectionname,l) :
-                        refname = namelookup[ l[1:-1].strip() ]
-                        #print('FOUND reference to %s in %s at line %s (level %s)'%(refname,tree[lvl-1],c,lvl))
-                        #tree = tree[0:lvl]
-                        parent = tree[lvl-1]
-                        # tag it as a reference, since it's not exactly a child.
-                        # put it in childs since order can matter in sub tokens declaration
-                        tokens[parent]['childs'].append('*'+refname)
-                        if refname not in tokens :
-                            print('reference to %s done before its declaration (line %s)\ncreated dummy'%(refname,c))
-                            tokens[refname] = {}
-                        if 'user' not in tokens[refname] : tokens[refname]['users'] = [parent]
-                        else : tokens[refname]['users'].append(parent)
-                        continue
-    
-                ## look for any token or only Mesh token in quickmode
-                if re.match(r_sectionname,l) :
-                    tokenname = getName(l,tokens)
-                    #print('FOUND %s %s %s %s'%(tokenname,c,lvl,tree))
-                    #print('pointer %s %s'%(data.tell(),ptr))
-                    if lvl == 1 : rootTokens.append(tokenname)
-                    typ = l.split(' ')[0].strip().lower()
-                    tree = tree[0:lvl]
-                    if typ not in tokentypes : tokentypes[typ] = [tokenname]
-                    else : tokentypes[typ].append(tokenname)
-                    parent = tree[-1]
-                    if tokenname in tokens :
-                        tokens[tokenname]['pointer'] = ptr
-                        tokens[tokenname]['line'] = c
-                        tokens[tokenname]['parent'] = parent
-                        tokens[tokenname]['childs'] = []
-                        tokens[tokenname]['type'] = typ
-                        
-                    else : tokens[tokenname] = {'pointer': ptr,
-                                                'line'   : c,
-                                                'parent' : parent,
-                                                'childs' : [],
-                                                'users'  : [],
-                                                'type'   : typ
-                                                }
-                    tree.append(tokenname)
-                    if lvl > 1 and quickmode == False :
-                        tokens[parent]['childs'].append(tokenname)
-                    
-        return tokens, templates, tokentypes
-        
-    ## returns file binary chunks
-    def nextFileChunk(data,trunkated=False,chunksize=1024) :
-        if chunksize == 0 : chunk = data.read()
-        else : chunk = data.read(chunksize)
-        if format == 'txt' :
-            lines = chunk.decode('utf-8', errors='ignore')
-            #if stream : return lines.replace('\r','').replace('\n','')
-            lines = lines.replace('\r','\n').split('\n')
-            if trunkated : lines[0] = trunkated + lines[0]
-            if len(lines) == 1 : 
-                if lines[0] == '' : return None, None
-                return lines, False
-            return lines, lines.pop()
-        # wip, todo for binaries
-        else :
-            print(chunk)
-            for word in range(0,len(chunk)) :
-                w = chunk[word:word+4]
-                print(word,w,struct.unpack("<l", w),binascii.unhexlify(w))
-
-    
-    # name unnamed tokens, watchout for x duplicate
-    # for blender, referenced token in x should be named and unique..
-    def getName(l,tokens) :
-        xnam = l.split(' ')[1].strip()
-        
-        #if xnam[0] == '{' : xnam = ''
-        if xnam and xnam[-1] == '{' : xnam = xnam[:-1]
-        
-        name = xnam
-        if len(name) == 0 : name = l.split(' ')[0].strip()
-        
-        namelookup[xnam] = bel.bpyname(name,tokens,4)
-
-        return namelookup[xnam]
-    
-    
-    ###################
-    ## STEP 2 FUNCTIONS
-    ###################
-    # once the internal dict is populated the functions below can be used
-    
-    ## from a list of tokens, displays every child, users and references
-    '''
-      walk_dxtree( [ 'Mesh01', 'Mesh02' ] ) # for particular pieces
-      walk_dxtree(tokens.keys()) for the whole tree
-    '''
-    def walk_dXtree(field,lvl=0,tab='') :
-        for fi, tokenname in enumerate(field) :
-            if lvl > 0 or tokens[tokenname]['parent'] == '' :
-                if tokenname not in tokens :
-                    tokenname = tokenname[1:]
-                    ref = 'ref: '
-                else : ref = False
-                
-                frame_type = tokens[tokenname]['type']
-                line = ('{:7}'.format(tokens[tokenname]['line']))
-                log = ' %s%s (%s)'%( ref if ref else '', tokenname, frame_type )
-                print('%s.%s%s'%(line, tab, log))
-                if fi == len(field) - 1 : tab = tab[:-3] + '   '
-    
-                if ref == False :
-                    for user in tokens[tokenname]['users'] :
-                         print('%s.%s |__ user: %s'%(line, tab.replace('_',' '), user))
-                    walk_dXtree(tokens[tokenname]['childs'],lvl+1,tab.replace('_',' ')+' |__')
-                
-                if fi == len(field) - 1 and len(tokens[tokenname]['childs']) == 0 :
-                    print('%s.%s'%(line,tab))
-    
-    ## remove eol, comments, spaces from a raw block of datas
-    def cleanBlock(block) :
-        while '//' in block :
-            s = block.index('//')
-            e = block.index('\n',s+1)
-            block = block[0:s] + block[e:]
-        while '#' in block :
-            s = block.index('#')
-            e = block.index('\n',s+1)
-            block = block[0:s] + block[e:]
-        block = block.replace('\n','').replace(' ','').replace('\t ','')
-        return block
-        
-    def readToken(tokenname) :
-        token = tokens[tokenname]
-        datatype = token['type'].lower()
-        if datatype in templates : tpl = templates[datatype]
-        elif datatype in defaultTemplates : tpl = defaultTemplates[datatype]
-        else :
-            print("can't find any template to read %s (type : %s)"%(tokenname,datatype))
-            return False
-        #print('> use template %s'%datatype)
-        block = readBlock(data,token)
-        ptr = 0
-        #return dXtemplateData(tpl,block)
-        fields, ptr = dXtemplateData(tpl,block)
-        if datatype in templatesConvert :
-            fields = eval( templatesConvert[datatype] )
-        return fields
-    
-    def dXtemplateData(tpl,block,ptr=0) :
-        #print('dxTPL',block[ptr])
-        pack = []
-        for member in tpl['members'] :
-            #print(member)
-            dataname = member[-1]
-            datatype = member[0].lower()
-            if datatype ==  'array' :
-                datatype = member[1].lower()
-                s = dataname.index('[') + 1
-                e = dataname.index(']')
-                #print(dataname[s:e])
-                length = eval(dataname[s:e])
-                #print("array %s type %s length defined by '%s' : %s"%(dataname[:s-1],datatype,dataname[s:e],length))
-                dataname = dataname[:s-1]
-                datavalue, ptr = dXarray(block, datatype, length, ptr)
-                #print('back to %s'%(dataname))
-            else :
-                length = 1
-                datavalue, ptr = dXdata(block, datatype, length, ptr)
-    
-            #if len(str(datavalue)) > 50 : dispvalue = str(datavalue[0:25]) + ' [...] ' + str(datavalue[-25:])
-            #else : dispvalue = str(datavalue)
-            #print('%s :  %s %s'%(dataname,dispvalue,type(datavalue)))
-            exec('%s = datavalue'%(dataname))
-            pack.append( datavalue )
-        return pack, ptr + 1
-    
-    def dXdata(block,datatype,length,s=0,eof=';') :
-        #print('dxDTA',block[s])
-        # at last, the data we need
-        # should be a ';' but one meet ',' often, like in meshface
-        if datatype == 'dword' :
-            e = block.index(';',s+1)
-            try : field = int(block[s:e])
-            except :
-                e = block.index(',',s+1)
-                field = int(block[s:e])
-            return field, e+1
-        elif datatype == 'float' :
-            e = block.index(eof,s+1)
-            return float(block[s:e]), e+1
-        elif datatype == 'string' :
-            e = block.index(eof,s+1)
-            return str(block[s+1:e-1]) , e+1
-        else :
-            if datatype in templates : tpl = templates[datatype]
-            elif datatype in defaultTemplates : tpl = defaultTemplates[datatype]
-            else :
-                print("can't find any template for type : %s"%(datatype))
-                return False
-            #print('> use template %s'%datatype)
-            fields, ptr = dXtemplateData(tpl,block,s)
-            if datatype in templatesConvert :
-                fields = eval( templatesConvert[datatype] )
-            return fields, ptr
-    
-    def dXarray(block, datatype, length, s=0) :
-        #print('dxARR',block[s])
-        lst = []
-        if datatype in reserved_type :
-            eoi=','
-            for i in range(length) :
-                if i+1 == length : eoi = ';'
-                datavalue, s = dXdata(block,datatype,1,s,eoi)
-                lst.append( datavalue )
-            
-        else :
-            eoi = ';,'
-            for i in range(length) :
-                if i+1 == length : eoi = ';;'
-                #print(eoi)
-                e = block.index(eoi,s)
-                #except : print(block,s) ; popo()
-                datavalue, na = dXdata(block[s:e+1],datatype,1)
-                lst.append( datavalue )
-                s = e + 2
-        return lst, s
-    
-    ###################################################
-
-    ## populate a template with its datas
-    # this make them available in the internal dict. should be used in step 2 for unknown data type at least
-    def readTemplate(data,tpl_name,display=False) :
-        ptr = templates[tpl_name]['pointer']
-        line = templates[tpl_name]['line']
-        #print('> %s at line %s (chr %s)'%(tpl_name,line,ptr))
-        data.seek(ptr)
-        block = ''
-        trunkated = False
-        go = True
-        while go :
-            lines, trunkated = nextFileChunk(data,trunkated,chunksize) # stream ?
-            if lines == None : 
-                break
-            for l in lines :
-                #l = data.readline().decode().strip()
-                block += l.strip()
-                if '}' in l :
-                    go = False
-                    break
-        
-        uuid = re.search(r'<.+>',block).group()
-        templates[tpl_name]['uuid'] = uuid.lower()
-        templates[tpl_name]['members'] = []
-        templates[tpl_name]['restriction'] = 'closed'
-        
-        members = re.search(r'>.+',block).group()[1:-1].split(';')
-        for member in members :
-            if member == '' : continue
-            if member[0] == '[' :
-                templates[tpl_name]['restriction'] = member
-                continue  
-            templates[tpl_name]['members'].append( member.split(' ') )
-    
-        if display : 
-            print('\ntemplate %s :'%tpl_name)
-            for k,v in templates[tpl_name].items() :
-                if k != 'members' :
-                    print('  %s : %s'%(k,v))
-                else :
-                    for member in v :
-                        print('  %s'%str(member)[1:-1].replace(',',' ').replace("'",''))
-                
-            if tpl_name in defaultTemplates :
-                defaultTemplates[tpl_name]['line'] = templates[tpl_name]['line']
-                defaultTemplates[tpl_name]['pointer'] = templates[tpl_name]['pointer']
-                if defaultTemplates[tpl_name] != templates[tpl_name] :
-                    print('! DIFFERS FROM BUILTIN TEMPLATE :')
-                    print('raw template %s :'%tpl_name)
-                    print(templates[tpl_name])
-                    print('raw default template %s :'%tpl_name)
-                    print(defaultTemplates[tpl_name])
-                    #for k,v in defaultTemplates[tpl_name].items() :
-                    #    if k != 'members' :
-                    #        print('  %s : %s'%(k,v))
-                    #    else :
-                    #        for member in v :
-                    #            print('  %s'%str(member)[1:-1].replace(',',' ').replace("'",''))
-                else :
-                    print('MATCHES BUILTIN TEMPLATE')
-    
-            
-    ##  read any kind of token data block
-    # by default the block is cleaned from inline comment space etc to allow data parsing
-    # useclean = False (retrieve all bytes) if you need to compute a file byte pointer
-    # to mimic the file.tell() function and use it with file.seek()
-    def readBlock(data,token, clean=True) :
-        ptr = token['pointer']
-        data.seek(ptr)
-        block = ''
-        #lvl = 0
-        trunkated = False
-        go = True
-        while go :
-            lines, trunkated = nextFileChunk(data,trunkated,chunksize)
-            if lines == None : break
-            for l in lines :
-                #eol = len(l) + 1
-                l = l.strip()
-                #c += 1
-                block += l+'\n'
-                if re.match(r_endsection,l) :
-                    go = False
-                    break
-        s = block.index('{') + 1
-        e = block.index('}')
-        block = block[s:e]
-        if clean : block = cleanBlock(block)
-        return block
-    
-    def getChilds(tokenname) :
-        childs = []
-        # '*' in childname means it's a reference. always perform this test
-        # when using the childs field
-        for childname in tokens[tokenname]['childs'] :
-            if childname[0] == '*' : childname = childname[1:]
-            childs.append( childname )
-        return childs
-    
-    # the input nested list of [bonename, matrix, [child0,child1..]] is given by import_dXtree()
-    def buildArm(armdata, child,lvl=0,parent_matrix=False) :
-        
-        bonename, bonemat, bonechilds = child
-        
-        if lvl == 0 :
-            armname = armdata
-            armdata = bpy.data.armatures.new(name=armname)
-            arm = bpy.data.objects.new(armname,armdata)
-            bpy.context.scene.objects.link(arm)
-            arm.select = True
-            bpy.context.scene.objects.active = arm
-            bpy.ops.object.mode_set(mode='EDIT')
-            parent_matrix = Matrix()
-        
-        bone = armdata.edit_bones.new(name=bonename)
-        bonematW = parent_matrix * bonemat
-        bone.head = bonematW.to_translation()
-        #bone.roll.. ?
-        bone_length = bone_maxlength
-        for bonechild in bonechilds :
-            bonechild = buildArm(armdata,bonechild,lvl+1,bonematW)
-            bonechild.parent = bone
-            bone_length = min((bonechild.head - bone.head).length, bone_length)
-        bone.tail = bonematW * Vector((0,bone_length,0))
-        if lvl == 0 :
-            bpy.ops.object.mode_set(mode='OBJECT')
-            return arm
-        return bone
-    
-    def import_dXtree(field,lvl=0) :
-        tab = ' '*lvl*2
-        if field == [] : 
-            if show_geninfo : print('%s>> no childs, return False'%(tab))
-            return False
-        ob = False
-        mat = False
-        is_root = False
-        frames = []
-        obs = []
-        
-        parentname = tokens[field[0]]['parent']
-        if show_geninfo : print('%s>>childs in frame %s :'%(tab,parentname))
-        
-        for tokenname in field :
-
-            tokentype = tokens[tokenname]['type']
-            
-            # frames can contain more than one mesh
-            if tokentype  == 'mesh' :
-                # object and mesh naming :
-                # if parent frame has several meshes : obname = meshname = mesh token name,
-                # if parent frame has only one mesh  : obname = parent frame name, meshname =  mesh token name.
-                if parentname :
-                    meshcount = 0
-                    for child in getChilds(parentname) :
-                        if tokens[child]['type'] == 'mesh' : 
-                            meshcount += 1
-                            if meshcount == 2 :
-                                parentname = tokenname
-                                break
-                else : parentname = tokenname
-                
-                ob = getMesh(parentname,tokenname)
-                obs.append(ob)
-
-                if show_geninfo : print('%smesh : %s'%(tab,tokenname))
-            
-            # frames contain one matrix (empty or bone)
-            elif tokentype  == 'frametransformmatrix' :
-                [mat] = readToken(tokenname)
-                if show_geninfo : print('%smatrix : %s'%(tab,tokenname))
-            
-            # frames can contain 0 or more frames
-            elif tokentype  == 'frame' :
-                frames.append(tokenname)
-                if show_geninfo : print('%sframe : %s'%(tab,tokenname))
-        
-        # matrix is used for mesh transform if some mesh(es) exist(s)      
-        if ob :
-            is_root = True
-            if mat == False :
-                mat = Matrix()
-                if show_geninfo : print('%smesh token without matrix, set it to default\n%splease report in bug tracker if you read this !'%(tab,tab))
-            if parentname == '' : 
-                mat = mat * global_matrix
-            if len(obs) == 1 :
-                ob.matrix_world = mat
-            else :
-                ob = bel.ob.new(parentname, None, naming_method)
-                ob.matrix_world = mat
-                for child in obs :
-                    child.parent = ob
-        
-        # matrix only, store it as a list as we don't know if
-        # it's a bone or an empty yet
-        elif mat :
-            ob = [parentname, mat,[]]
-
-        # nothing case ?
-        else :
-            ob = [parentname, Matrix() * global_matrix,[]]
-            if show_geninfo : print('%snothing here'%(tab))
-
-        childs = []
-        
-        for tokenname in frames :
-            if show_geninfo : print('%s<Begin %s :'%(tab,tokenname))
-            
-            # child is either False, empty, object, or a list or undefined name matrices hierarchy
-            child = import_dXtree(getChilds(tokenname),lvl+1)
-            if child and type(child) != list :
-                is_root = True
-            childs.append( [tokenname, child] )
-            if show_geninfo : print('%sEnd %s>'%(tab,tokenname))
-        
-        if is_root and parentname != '' :
-            
-            if show_geninfo : print('%send of tree a this point'%(tab))
-            if type(ob) == list :
-                mat = ob[1]
-                ob = bel.ob.new(parentname, None, naming_method)
-            ob.matrix_world = mat
-            
-        for tokenname, child in childs :
-            if show_geninfo : print('%sbegin2 %s>'%(tab,tokenname))
-            # returned a list of object(s) or matrice(s)
-            if child :
-
-                # current frame is an object or an empty, we parent this frame to it
-                #if eot or (ob and ( type(ob.data) == type(None) or type(ob.data) == bpy.types.Mesh ) ) :
-                if is_root :
-                    # this branch is an armature, convert it
-                    if type(child) == list :
-                        if show_geninfo : print('%sconvert to armature %s'%(tab,tokenname))
-                        child = buildArm(tokenname, child)
-                        
-                    # parent the obj/empty/arm to current
-                    # or apply the global user defined matrix to the object root
-                    if parentname != '' :
-                        child.parent = ob
-                    else :
-                        child.matrix_world = global_matrix
-                        
-                # returned a list of parented matrices. append it in childs list
-                elif type(child[0]) == str :
-                    ob[2].append(child)
-
-                # child is an empty or a mesh, so current frame is an empty, not an armature
-                elif ob and ( type(child.data) == type(None) or type(child.data) == bpy.types.Mesh ) :
-                    #print('  child data type: %s'%type(child.data))
-                    child.parent = ob
-                    #print('%s parented to %s'%(child.name,ob.name))
-                
-            # returned False
-            else :
-                 if show_geninfo : print('%sreturned %s, nothing'%(tab,child))
-
-        #print('>> %s return %s'%(field,ob))
-        return ob# if ob else False
-
-    # build from mesh token type
-    def getMesh(obname,tokenname,debug = False):
-    
-        if debug : print('\nmesh name : %s'%tokenname)
-        
-        verts = []
-        edges = []
-        faces = []
-        matslots = []
-        facemats = []
-        uvs = []
-        groupnames = []
-        groupindices = []
-        groupweights = []
-
-        nVerts, verts, nFaces, faces = readToken(tokenname) 
-
-        if debug :
-            print('verts    : %s %s\nfaces    : %s %s'%(nVerts, len(verts),nFaces, len(faces)))
-        
-        #for childname in token['childs'] :
-        for childname in getChilds(tokenname) :
-            
-            tokentype = tokens[childname]['type']
-            
-            # UV
-            if tokentype == 'meshtexturecoords' :
-                uv = readToken(childname)
-                #uv = bel.uv.asVertsLocation(uv, faces)
-                uv = bel.uv.asFlatList(uv, faces)
-                uvs.append(uv)
-                
-                if debug : print('uv       : %s'%(len(uv)))
-            
-            # MATERIALS
-            elif tokentype == 'meshmateriallist' :
-                nbslots, facemats = readToken(childname)
-                
-                if debug : print('facemats : %s'%(len(facemats)))
-                
-                # mat can exist but with no datas so we prepare the mat slot
-                # with dummy ones
-                for slot in range(nbslots) :
-                    matslots.append('dXnoname%s'%slot )
-        
-                # length does not match (could be tuned more, need more cases)
-                if len(facemats) != len(faces) :
-                    facemats = [ facemats[0] for i in faces ]
-
-                # seek for materials then textures if any mapped in this mesh.
-                # no type test, only one option type in token meshmateriallist : 'Material'
-                for slotid, matname in enumerate(getChilds(childname)) :
-                    
-                    # rename dummy mats with the right name
-                    matslots[slotid] = matname
-
-                    # blender material creation (need tuning)
-                    mat = bel.material.new(matname,naming_method)
-                    matslots[slotid] = mat.name
-                    
-                    if naming_method != 1 :
-                        #print('matname : %s'%matname)
-                        (diffuse_color,alpha), power, specCol, emitCol = readToken(matname)
-                        #if debug : print(diffuse_color,alpha, power, specCol, emitCol)
-                        mat.diffuse_color = diffuse_color
-                        mat.diffuse_intensity = power
-                        mat.specular_color = specCol
-                        # dX emit don't use diffuse color but is a color itself
-                        # convert it to a kind of intensity 
-                        mat.emit = (emitCol[0] + emitCol[1] + emitCol[2] ) / 3
-                        
-                        if alpha != 1.0 :
-                            mat.use_transparency = True
-                            mat.transparency_method = 'Z_TRANSPARENCY'
-                            mat.alpha = alpha
-                            mat.specular_alpha = 0
-                            transp = True
-                        else : transp = False
-            
-                        # texture
-                        # only 'TextureFilename' can be here, no type test
-                        # textures have no name in .x so we build 
-                        # image and texture names from the image file name
-                        # bdata texture slot name = bdata image name
-                        btexnames = []
-                        for texname in getChilds(matname) :
-                            
-                            # create/rename/reuse etc corresponding data image
-                            # (returns False if not found)
-                            [filename] = readToken(texname)
-                            img = bel.image.new(path+'/'+filename)
-                            
-                            if img == False :
-                                imgname = 'not_found'
-                            else :
-                                imgname = img.name
-                                
-                            #print('texname : %s'%texname)
-                            #print('filename : %s'%filename)
-                            #print('btex/img name : %s'%imgname)
-                            
-                            # associated texture (no naming check.. maybe tune more)
-                            # tex and texslot are created even if img not found
-                            if imgname in bpy.data.textures and ( img == False or bpy.data.textures[imgname].image == img ) :
-                                tex = bpy.data.textures[imgname]
-                            else :
-                                tex = bpy.data.textures.new(name=imgname,type='IMAGE')
-                                if img : tex.image = img
-                                
-                            tex.use_alpha = transp
-                            tex.use_preview_alpha = transp
-                                
-                            # then create texture slot
-                            texslot = mat.texture_slots.create(index=0)
-                            texslot.texture = tex
-                            texslot.texture_coords = 'UV'
-                            texslot.uv_layer = 'UV0'
-                            texslot.use_map_alpha = transp
-                            texslot.alpha_factor = alpha
-
-                # create remaining dummy mat
-                for slotid, matname in enumerate(matslots) :
-                    if matname not in bpy.data.materials :
-                        mat = bel.material.new(matname,naming_method)
-                        matslots[slotid] = mat.name
-                        
-                if debug : print('matslots : %s'%matslots)
-                
-            # VERTICES GROUPS/WEIGHTS
-            elif tokentype == 'skinweights' :
-                groupname, nverts, vindices, vweights, mat = readToken(childname)
-                groupname = namelookup[groupname]
-                if debug : 
-                    print('vgroup    : %s (%s/%s verts) %s'%(groupname,len(vindices),len(vweights),'bone' if groupname in tokens else ''))
-
-                #if debug : print('matrix : %s\n%s'%(type(mat),mat))
-                
-                groupnames.append(groupname)
-                groupindices.append(vindices)
-                groupweights.append(vweights)
-                
-        ob = bel.mesh.write(obname,tokenname, 
-                            verts, edges, faces, 
-                            matslots, facemats, uvs, 
-                            groupnames, groupindices, groupweights,
-                            use_smooth_groups,
-                            naming_method)
-        
-        return ob
-                           
-    ## here we go
-     
-    file = os.path.basename(filepath)
-    
-    print('\nimporting %s...'%file)
-    start = time.clock()
-    path = os.path.dirname(filepath)
-    filepath = os.fsencode(filepath)
-    data = open(filepath,'rb')
-    header = dXheader(data)
-
-    if global_matrix is None:
-        global_matrix = mathutils.Matrix()
-
-    if header :
-        minor, major, format, accuracy = header
-        
-        if show_geninfo :
-            print('\n%s directX header'%file)
-            print('  minor  : %s'%(minor))
-            print('  major  : %s'%(major))
-            print('  format : %s'%(format))
-            print('  floats are %s bits'%(accuracy))
-
-        if format in [ 'txt' ] : #, 'bin' ] :
-
-            ## FILE READ : STEP 1 : STRUCTURE
-            if show_geninfo : print('\nBuilding internal .x tree')
-            t = time.clock()
-            tokens, templates, tokentypes = dXtree(data,quickmode)
-            readstruct_time = time.clock()-t
-            if show_geninfo : print('builded tree in %.2f\''%(readstruct_time)) # ,end='\r')
-
-            ## populate templates with datas
-            for tplname in templates :
-                readTemplate(data,tplname,show_templates)
-
-            ## DATA TREE CHECK
-            if show_tree :
-                print('\nDirectX Data Tree :\n')
-                walk_dXtree(tokens.keys())
-            
-            ## DATA IMPORTATION
-            if show_geninfo : 
-                #print(tokens)
-                print('Root frames :\n %s'%rootTokens)
-            if parented :
-                import_dXtree(rootTokens)
-            else :
-                for tokenname in tokentypes['mesh'] :
-                    obname = tokens[tokenname]['parent']
-                    # object and mesh naming :
-                    # if parent frame has several meshes : obname = meshname = mesh token name,
-                    # if parent frame has only one mesh  : obname = parent frame name, meshname =  mesh token name.
-                    if obname :
-                        meshcount = 0
-                        for child in getChilds(obname) :
-                            if tokens[child]['type'] == 'mesh' : 
-                                meshcount += 1
-                                if meshcount == 2 :
-                                    obname = tokenname
-                                    break
-                    else : obname = tokenname
-
-                    ob = getMesh(obname,tokenname,show_geninfo)
-                    ob.matrix_world = global_matrix
-                    
-            print('done in %.2f\''%(time.clock()-start)) # ,end='\r')
-            
-        else :
-            print('only .x files in text format are currently supported')
-            print('please share your file to make the importer evolve')
-
-
-        return {'FINISHED'}
-        
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/io_directx_bel/templates_x.py b/release/scripts/addons_contrib/io_directx_bel/templates_x.py
deleted file mode 100644
index 7b51e0c..0000000
--- a/release/scripts/addons_contrib/io_directx_bel/templates_x.py
+++ /dev/null
@@ -1,162 +0,0 @@
-# dx 'strict' templates
-# lower() since some apps does not respect it,
-# and to keep the 'as it should be' syntax
-
-defaultTemplates={}
-templatesConvert={}
-
-# mesh template
-defaultTemplates['Mesh'.lower()] = {
-    'uuid' : '<3d82ab44-62da-11cf-ab39-0020af71e433>',
-    'restriction' : '[...]',
-    'members' : (
-        ('dword', 'nVertices'),
-        ('array', 'vector', 'vertices[nVertices]'),
-        ('dword', 'nFaces'),
-        ('array', 'MeshFace', 'faces[nFaces]'),
-    )
-}
-
-defaultTemplates['FrameTransformMatrix'.lower()] = {
-    'uuid' : '<f6f23f41-7686-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('matrix4x4', 'frameMatrix'),
-    )
-}
-
-templatesConvert['matrix4x4'] = 'Matrix( [fields[0][0:4], fields[0][4:8] , fields[0][8:12] , fields[0][12:16]] )'
-defaultTemplates['matrix4x4'.lower()] = {
-    'uuid' : '<f6f23f45-7686-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('array', 'float', 'matrix[16]'),
-    )
-}
-
-#returns [ [vid0,vid1,vid2], [vid1,vid2,vid3,vid4] .. ]
-templatesConvert['meshface'] = 'fields[1]'
-defaultTemplates['MeshFace'.lower()] = {
-    'uuid' : '<3d82ab5f-62da-11cf-ab39-0020af71e433>',
-    'restriction' : 'closed',
-    'members' : (
-        ('dword', 'nFaceVertexIndices'),
-        ('array', 'dword', 'faceVertexIndices[nFaceVertexIndices]')
-    )
-}
-
-defaultTemplates['vector'.lower()] = {
-    'uuid' : '<3d82ab5e-62da-11cf-ab39-0020af71e433>',
-    'restriction' : 'closed',
-    'members' : (
-        ('float', 'x'),
-        ('float', 'y'),
-        ('float', 'z')
-    )
-}
-
-defaultTemplates['Coords2d'.lower()] = {
-    'uuid' : '<f6f23f44-7686-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('float', 'u'),
-        ('float', 'v')
-    )
-}
-
-# returns [ uvAsVertsLocation ]
-templatesConvert['meshtexturecoords'] = 'fields[1]'
-defaultTemplates['MeshTextureCoords'.lower()] = {
-    'uuid' : '<f6f23f40-7686-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('dword', 'nTextureCoords'),
-        ('array', 'Coords2d', 'textureCoords[nTextureCoords]')
-    )
-}
-
-defaultTemplates['meshnormals'.lower()] = {
-    'uuid' : '<f6f23f43-7686-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('dword', 'nNormals'),
-        ('array', 'vector', 'normals[nNormals]'),
-        ('dword', 'nFaceNormals'),
-        ('array', 'MeshFace', 'faceNormals[nFaceNormals]')
-    )
-}
-
-# returns [ nMaterials, [ materialindex of each face ] ]
-templatesConvert['meshmateriallist'] = '[fields[0],fields[2]]'
-defaultTemplates['MeshMaterialList'.lower()] = {
-    'uuid' : '<f6f23f42-7686-11cf-8f52-0040333594a3>',
-    'restriction' : '[Material]',
-    'members' : (
-        ('dword', 'nMaterials'),
-        ('dword', 'nFaceIndexes'),
-        ('array', 'dword', 'faceIndexes[nFaceIndexes]')
-    )
-}
-
-defaultTemplates['Material'.lower()] = {
-    'uuid' : '<3d82ab4d-62da-11cf-ab39-0020af71e433>',
-    'restriction' : '[...]',
-    'members' : (
-        ('colorrgba', 'faceColor'),
-        ('float', 'power'),
-        ('colorrgb', 'specularColor'),
-        ('colorrgb', 'emissiveColor')
-    )
-}
-
-templatesConvert['colorrgba'] = 'fields[:3],fields[3]'
-defaultTemplates['colorrgba'.lower()] = {
-    'uuid' : '<35ff44e0-6c7c-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('float', 'red'),
-        ('float', 'green'),
-        ('float', 'blue'),
-        ('float', 'alpha')
-    )
-}
-
-defaultTemplates['colorrgb'.lower()] = {
-    'uuid' : '<d3e16e81-7835-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('float', 'red'),
-        ('float', 'green'),
-        ('float', 'blue')
-    )
-}
-
-defaultTemplates['TextureFilename'.lower()] = {
-    'uuid' : '<a42790e1-7810-11cf-8f52-0040333594a3>',
-    'restriction' : 'closed',
-    'members' : (
-        ('string', 'filename'),
-    )
-}
-
-defaultTemplates['SkinWeights'.lower()] = {
-    'uuid' : '<6f0d123b-bad2-4167-a0d0-80224f25fabb>',
-    'restriction' : 'closed',
-    'members' : (
-        ('string', 'transformNodeName'),
-        ('dword', 'nWeights'),
-        ('array', 'dword', 'vertexIndices[nWeights]'),
-        ('array', 'float', 'weights[nWeights]'),
-        ('matrix4x4', 'matrixOffset')
-    )
-}
-
-defaultTemplates['XSkinMeshHeader'.lower()] = {
-    'uuid' : '3cf169ce-ff7c-44ab-93c0-f78f62d172e2',
-    'restriction' : 'closed',
-    'members' : (
-        ('word', 'nMaxSkinWeightsPerVertex'),
-        ('word', 'nMaxSkinWeightsPerFace'),
-        ('word', 'nBones')
-    )
-}
diff --git a/release/scripts/addons_contrib/io_export_marmalade.py b/release/scripts/addons_contrib/io_export_marmalade.py
deleted file mode 100644
index 61a89e8..0000000
--- a/release/scripts/addons_contrib/io_export_marmalade.py
+++ /dev/null
@@ -1,1479 +0,0 @@
-# ***** GPL LICENSE BLOCK *****
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-# All rights reserved.
-# ***** GPL LICENSE BLOCK *****
-
-# Marmalade SDK is not responsible in any case of the following code.
-# This Blender add-on is freely shared for the Blender and Marmalade user communities.
-
-
-bl_info = {
-    "name": "Marmalade Cross-platform Apps (.group)",
-    "author": "Benoit Muller",
-    "version": (0, 6, 2),
-    "blender": (2, 6, 3),
-    "location": "File > Export > Marmalade cross-platform Apps (.group)",
-    "description": "Export Marmalade Format files (.group)",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Import-Export/Marmalade_Exporter",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "",
-    "category": "Import-Export"}
-
-import os
-import shutil
-from math import radians
-
-import bpy
-from mathutils import Matrix
-
-import mathutils
-import math
-
-import datetime
-
-import subprocess
-
-
-#Container for the exporter settings
-class MarmaladeExporterSettings:
-
-    def __init__(self,
-                 context,
-                 FilePath,
-                 CoordinateSystem=1,
-                 FlipNormals=False,
-                 ApplyModifiers=False,
-                 Scale=100,
-                 AnimFPS=30,
-                 ExportVertexColors=True,
-                 ExportMaterialColors=True,
-                 ExportTextures=True,
-                 CopyTextureFiles=True,
-                 ExportArmatures=False,
-                 ExportAnimationFrames=0,
-                 ExportAnimationActions=0,
-                 ExportMode=1,
-                 MergeModes=0,
-                 Verbose=False):
-        self.context = context
-        self.FilePath = FilePath
-        self.CoordinateSystem = int(CoordinateSystem)
-        self.FlipNormals = FlipNormals
-        self.ApplyModifiers = ApplyModifiers
-        self.Scale = Scale
-        self.AnimFPS = AnimFPS
-        self.ExportVertexColors = ExportVertexColors
-        self.ExportMaterialColors = ExportMaterialColors
-        self.ExportTextures = ExportTextures
-        self.CopyTextureFiles = CopyTextureFiles
-        self.ExportArmatures = ExportArmatures
-        self.ExportAnimationFrames = int(ExportAnimationFrames)
-        self.ExportAnimationActions = int(ExportAnimationActions)
-        self.ExportMode = int(ExportMode)
-        self.MergeModes = int(MergeModes)
-        self.Verbose = Verbose
-        self.WarningList = []
-
-
-def ExportMadeWithMarmaladeGroup(Config):
-    print("----------\nExporting to {}".format(Config.FilePath))
-    if Config.Verbose:
-        print("Opening File...")
-    Config.File = open(Config.FilePath, "w")
-
-    if Config.Verbose:
-        print("Done")
-
-    if Config.Verbose:
-        print("writing group header")
-
-    Config.File.write('// Marmalade group file exported from : %s\n' % bpy.data.filepath)
-    Config.File.write('// Exported %s\n' % str(datetime.datetime.now()))
-    Config.File.write("CIwResGroup\n{\n\tname \"%s\"\n" % bpy.path.display_name_from_filepath(Config.FilePath))
-
-    if Config.Verbose:
-        print("Generating Object list for export... (Root parents only)")
-    if Config.ExportMode == 1:
-        Config.ExportList = [Object for Object in Config.context.scene.objects
-                             if Object.type in {'ARMATURE', 'EMPTY', 'MESH'}
-                             and Object.parent is None]
-    else:
-        ExportList = [Object for Object in Config.context.selected_objects
-                      if Object.type in {'ARMATURE', 'EMPTY', 'MESH'}]
-        Config.ExportList = [Object for Object in ExportList
-                             if Object.parent not in ExportList]
-    if Config.Verbose:
-        print("  List: {}\nDone".format(Config.ExportList))
-
-    if Config.Verbose:
-        print("Setting up...")
-
-    if Config.ExportAnimationFrames:
-        if Config.Verbose:
-            print(bpy.context.scene)
-            print(bpy.context.scene.frame_current)
-        CurrentFrame = bpy.context.scene.frame_current
-        #comment because it crashes Blender on some old blend file: bpy.context.scene.frame_current = bpy.context.scene.frame_current
-    if Config.Verbose:
-        print("Done")
-    
-    Config.ObjectList = []
-    if Config.Verbose:
-        print("Writing Objects...")
-    WriteObjects(Config, Config.ExportList)
-    if Config.Verbose:
-        print("Done")
-
-    if Config.Verbose:
-        print("Objects Exported: {}".format(Config.ExportList))
-
-    if Config.ExportAnimationFrames:
-        if Config.Verbose:
-            print("Writing Animation...")
-        WriteKeyedAnimationSet(Config, bpy.context.scene)
-        bpy.context.scene.frame_current = CurrentFrame
-        if Config.Verbose:
-            print("Done")
-    Config.File.write("}\n")
-    CloseFile(Config)
-    print("Finished")
-
-
-def GetObjectChildren(Parent):
-    return [Object for Object in Parent.children
-            if Object.type in {'ARMATURE', 'EMPTY', 'MESH'}]
-
-
-#Returns the file path of first image texture from Material.
-def GetMaterialTextureFullPath(Config, Material):
-    if Material:
-        #Create a list of Textures that have type "IMAGE"
-        ImageTextures = [Material.texture_slots[TextureSlot].texture for TextureSlot in Material.texture_slots.keys() if Material.texture_slots[TextureSlot].texture.type == "IMAGE"]
-        #Refine a new list with only image textures that have a file source
-        TexImages = [Texture.image for Texture in ImageTextures if getattr(Texture.image, "source", "") == "FILE"]
-        ImageFiles = [Texture.image.filepath for Texture in ImageTextures if getattr(Texture.image, "source", "") == "FILE"]
-        if TexImages:
-            filepath = TexImages[0].filepath
-            if TexImages[0].packed_file:
-                TexImages[0].unpack()
-            if not os.path.exists(filepath):
-                #try relative path to the blend file
-                filepath = os.path.dirname(bpy.data.filepath) + filepath
-            #Marmalade doesn't like jpeg/tif so try to convert in png on the fly
-            if (TexImages[0].file_format == 'JPEG' or TexImages[0].file_format == 'TIFF') and os.path.exists(filepath):
-                marmaladeConvert = os.path.expandvars("%S3E_DIR%\\..\\tools\\ImageMagick\\win32\\convert.exe")
-                if (os.path.exists(marmaladeConvert)):
-                    srcImagefilepath = filepath
-                    filepath = os.path.splitext(filepath)[0] + '.png'
-                    if Config.Verbose:
-                        print("  /!\\ Converting Texture %s in PNG: %s{}..." % (TexImages[0].file_format, filepath))
-                        print('"%s" "%s" "%s"' % (marmaladeConvert, srcImagefilepath, filepath))
-                    subprocess.call([marmaladeConvert, srcImagefilepath, filepath])
-            return filepath
-    return None
-
-
-def WriteObjects(Config, ObjectList, geoFile=None, mtlFile=None, GeoModel=None,  bChildObjects=False):
-    Config.ObjectList += ObjectList
-
-    if bChildObjects == False and Config.MergeModes > 0:
-        if geoFile == None:
-            #we merge objects, so use name of group file for the name of Geo
-            geoFile, mtlFile = CreateGeoMtlFiles(Config, bpy.path.display_name_from_filepath(Config.FilePath))
-            GeoModel = CGeoModel(bpy.path.display_name_from_filepath(Config.FilePath))
-
-    for Object in ObjectList:
-        if Config.Verbose:
-            print("  Writing Object: {}...".format(Object.name))
-        
-        if Config.ExportArmatures and Object.type == "ARMATURE":           
-            Armature = Object.data
-            ParentList = [Bone for Bone in Armature.bones if Bone.parent is None]
-            if Config.Verbose:
-                print("    Writing Armature Bones...")
-            #Create the skel file
-            skelfullname = os.path.dirname(Config.FilePath) + os.sep + "models" + os.sep + "%s.skel" % (StripName(Object.name))
-            ensure_dir(skelfullname)
-            if Config.Verbose:
-                print("      Creating skel file %s" % (skelfullname))
-
-            skelFile = open(skelfullname, "w")
-            skelFile.write('// skel file exported from : %r\n' % os.path.basename(bpy.data.filepath))   
-            skelFile.write("CIwAnimSkel\n")
-            skelFile.write("{\n")
-            skelFile.write("\tnumBones %d\n" % (len(Armature.bones)))
-            Config.File.write("\t\".\models\%s.skel\"\n" % (StripName(Object.name)))
-
-            WriteArmatureParentRootBones(Config, Object, ParentList, skelFile)
-
-            skelFile.write("}\n")
-            skelFile.close()
-            if Config.Verbose:
-                print("    Done")
-
-        ChildList = GetObjectChildren(Object)
-        if Config.ExportMode == 2:  # Selected Objects Only
-            ChildList = [Child for Child in ChildList
-                         if Child in Config.context.selected_objects]
-        if Config.Verbose:
-            print("    Writing Children...")
-        WriteObjects(Config, ChildList, geoFile, mtlFile, GeoModel, True)
-        if Config.Verbose:
-            print("    Done Writing Children")
-
-        if Object.type == "MESH":
-            if Config.Verbose:
-                print("    Generating Mesh...")
-            if Config.ApplyModifiers:
-                if Config.ExportArmatures:
-                    #Create a copy of the object and remove all armature modifiers so an unshaped
-                    #mesh can be created from it.
-                    Object2 = Object.copy()
-                    for Modifier in [Modifier for Modifier in Object2.modifiers if Modifier.type == "ARMATURE"]:
-                        Object2.modifiers.remove(Modifier)
-                    Mesh = Object2.to_mesh(bpy.context.scene, True, "PREVIEW")
-                else:
-                    Mesh = Object.to_mesh(bpy.context.scene, True, "PREVIEW")
-            else:
-                Mesh = Object.to_mesh(bpy.context.scene, False, "PREVIEW")
-            if Config.Verbose:
-                print("    Done")
-                print("    Writing Mesh...")
-
-            # Flip ZY axis (Blender Z up: Marmalade: Y up) ans Scale appropriately
-            X_ROT = mathutils.Matrix.Rotation(-math.pi / 2, 4, 'X')
-
-            if Config.MergeModes == 0:
-                # No merge, so all objects are exported in MODEL SPACE and not in world space
-                # Calculate Scale of the Export
-                meshScale = Object.matrix_world.to_scale()  # Export is working, even if user doesn't have use apply scale in Edit mode.
-
-                scalematrix = Matrix()
-                scalematrix[0][0] = meshScale.x * Config.Scale
-                scalematrix[1][1] = meshScale.y * Config.Scale
-                scalematrix[2][2] = meshScale.z * Config.Scale
-
-                meshRot = Object.matrix_world.to_quaternion()  # Export is working, even if user doesn't have use apply Rotation in Edit mode.
-                Mesh.transform(X_ROT * meshRot.to_matrix().to_4x4() * scalematrix)
-            else:
-                # In Merge mode, we need to keep relative postion of each objects, so we export in WORLD SPACE
-                SCALE_MAT = mathutils.Matrix.Scale(Config.Scale, 4)
-                Mesh.transform(SCALE_MAT * X_ROT * Object.matrix_world)
-
-             # manage merge options
-   
-            if Config.MergeModes == 0:
-                #one geo per Object, so use name of Object for the Geo file
-                geoFile, mtlFile = CreateGeoMtlFiles(Config, StripName(Object.name))
-                GeoModel = CGeoModel(StripName(Object.name))  
-                
-            # Write the Mesh in the Geo file   
-            WriteMesh(Config, Object, Mesh, geoFile, mtlFile, GeoModel)
-
-            if Config.MergeModes == 0:
-                # no merge so finalize the file, and discard the file and geo class
-                FinalizeGeoMtlFiles(Config, geoFile, mtlFile)
-                geoFile = None
-                mtlFile = None
-                GeoModel = None
-            elif Config.MergeModes == 1:
-                # merge in one Mesh, so keep the Geo class and prepare to change object
-                GeoModel.NewObject() 
-            elif Config.MergeModes == 2:
-                # merge several Meshes in one file: so clear the mesh data that we just written in the file,
-                # but keep Materials info that need to be merged across objects
-                GeoModel.ClearAllExceptMaterials()
-
-            if Config.Verbose:
-                print("    Done")
-
-            if Config.ApplyModifiers and Config.ExportArmatures:
-                bpy.data.objects.remove(Object2)
-            bpy.data.meshes.remove(Mesh)
-
-        if Config.Verbose:
-            print("  Done Writing Object: {}".format(Object.name))
-
-    if bChildObjects == False:
-        # we have finish to do all objects
-        if GeoModel:
-            if Config.MergeModes == 1:
-                # we have Merges all objects in one Mesh, so time to write this big mesh in the file
-                GeoModel.PrintGeoMesh(geoFile)
-                # time to write skinfile if any
-                if len(GeoModel.useBonesDict) > 0:
-                    # some mesh was not modified by the armature. so we must skinned the merged mesh.
-                    # So unskinned vertices from unarmatured meshes, are assigned to the root bone of the armature
-                    for i in range(0, len(GeoModel.vList)):
-                        if not i in GeoModel.skinnedVertices:
-                            GeoModel.skinnedVertices.append(i)
-                            useBonesKey = pow(2, GeoModel.armatureRootBoneIndex)
-                            vertexGroupIndices = list((GeoModel.armatureRootBoneIndex,))
-                            if useBonesKey not in GeoModel.useBonesDict:                          
-                                GeoModel.mapVertexGroupNames[GeoModel.armatureRootBoneIndex] = StripBoneName(GeoModel.armatureRootBone.name)
-                                VertexList = []
-                                VertexList.append("\t\tvertWeights { %d, 1.0}" % i)
-                                GeoModel.useBonesDict[useBonesKey] = (vertexGroupIndices, VertexList)
-                            else:
-                                pair_ListGroupIndices_ListAssignedVertices = GeoModel.useBonesDict[useBonesKey]
-                                pair_ListGroupIndices_ListAssignedVertices[1].append("\t\tvertWeights { %d, 1.0}" % i)
-                                GeoModel.useBonesDict[useBonesKey] = pair_ListGroupIndices_ListAssignedVertices
-                    # now generates the skin file
-                    PrintSkinWeights(Config, GeoModel.armatureObjectName, GeoModel.useBonesDict, GeoModel.mapVertexGroupNames, GeoModel.name)
-            if Config.MergeModes > 0:
-                WriteMeshMaterialsForGeoModel(Config, mtlFile, GeoModel)
-                FinalizeGeoMtlFiles(Config, geoFile, mtlFile)
-        geoFile = None
-        mtlFile = None
-        GeoModel = None
-
-
-def CreateGeoMtlFiles(Config, Name):
-    #Create the geo file
-    geofullname = os.path.dirname(Config.FilePath) + os.sep + "models" + os.sep + "%s.geo" % Name
-    ensure_dir(geofullname)
-    if Config.Verbose:
-        print("      Creating geo file %s" % (geofullname))  
-    geoFile = open(geofullname, "w")
-    geoFile.write('// geo file exported from : %r\n' % os.path.basename(bpy.data.filepath))
-    geoFile.write("CIwModel\n")
-    geoFile.write("{\n")
-    geoFile.write("\tname \"%s\"\n" % Name)
-    # add it to the group
-    Config.File.write("\t\".\models\%s.geo\"\n" % Name)
-
-    # Create the mtl file
-    mtlfullname = os.path.dirname(Config.FilePath) + os.sep + "models" + os.sep + "%s.mtl" % Name
-    ensure_dir(mtlfullname)
-    if Config.Verbose:
-        print("      Creating mtl file %s" % (mtlfullname))
-    mtlFile = open(mtlfullname, "w")
-    mtlFile.write('// mtl file exported from : %r\n' % os.path.basename(bpy.data.filepath))   
-    return geoFile, mtlFile
-
-
-def FinalizeGeoMtlFiles(Config, geoFile, mtlFile):
-    if Config.Verbose:
-        print("      Closing geo file")  
-    geoFile.write("}\n")
-    geoFile.close()
-    if Config.Verbose:
-        print("      Closing mtl file")  
-    mtlFile.close()
-
-
-def WriteMesh(Config, Object, Mesh,  geoFile=None, mtlFile=None, GeoModel=None):
-    if geoFile == None or mtlFile == None:
-        print (" ERROR not geo file arguments in WriteMesh method")
-        return
-
-    if GeoModel == None:
-        print (" ERROR not GeoModel arguments in WriteMesh method")
-        return
-
-    BuildOptimizedGeo(Config, Object, Mesh, GeoModel)
-    if Config.MergeModes == 0 or Config.MergeModes == 2:
-        #if we don't merge, or if we write several meshes into one file ... write the mesh everytime we do an object
-        GeoModel.PrintGeoMesh(geoFile)
- 
-    if Config.Verbose:
-        print("      Done\n      Writing Mesh Materials...")
-
-    if Config.MergeModes == 0:
-        #No merge, so we can diretly write the Mtl file associated to this object
-        WriteMeshMaterialsForGeoModel(Config, mtlFile, GeoModel)
-
-    if Config.Verbose:
-        print("      Done")
-  
-    if Config.ExportArmatures:
-        if Config.Verbose:
-            print("      Writing Mesh Weights...")
-        WriteMeshSkinWeightsForGeoModel(Config, Object, Mesh, GeoModel)
-        if Config.Verbose:
-            print("      Done")
-
-
-###### optimized version fo Export, can be used also to merge several object in one single geo File ######
-
-# CGeoModel
-#  -> List Vertices
-#  -> List Normales
-#  -> List uv 0
-#  -> List uv 1
-#  -> List Vertex Colors
-#  -> List Materials
-#       -> Material name
-#       -> Blender Material Object
-#       -> List Tris -> Stream Indices v,vn,uv0,uv1,vc
-#       -> List Quads -> Stream Indices v,vn,uv0,uv1,vc
-
-
-#############
-#Store one Point of a Quad or Tri in marmalade geo format: //index-list is: { <int> <int> <int> <int> <int> }   //v,vn,uv0,uv1,vc
-#############                           
-class CGeoIndexList:
-    __slots__ = "v", "vn", "uv0", "uv1", "vc"
-    
-    def __init__(self, v, vn, uv0, uv1, vc):
-        self.v = v
-        self.vn = vn
-        self.uv0 = uv0
-        self.uv1 = uv1
-        self.vc = vc
-
-        
-#############
-#Store a Quad or a Tri in marmalade geo format : 3 or 4 CIndexList depending it is a Tri or a Quad
-#############                        
-class CGeoPoly:
-    __slots__ = "pointsList",
-    
-    def __init__(self):
-        self.pointsList = []
-
-    def AddPoint(self, v, vn, uv0, uv1, vc):
-        self.pointsList.append( CGeoIndexList(v, vn, uv0, uv1, vc))
-
-    def PointsCount(self):
-        return len(self.pointsList)
-
-    def PrintPoly(self, geoFile):
-        if len(self.pointsList) == 3:
-            geoFile.write("\t\t\t\tt ")
-        if len(self.pointsList) == 4:
-            geoFile.write("\t\t\t\tq ")
-        for point in self.pointsList:
-            geoFile.write(" {%d, %d, %d, %d, %d}" % (point.v, point.vn, point.uv0, point.uv1, point.vc))
-        geoFile.write("\n")
-
-
-#############
-#Store all the poly (tri or quad) assigned to a Material in marmalade geo format
-#############                        
-class CGeoMaterialPolys:
-    __slots__ = "name", "material", "quadList", "triList", "currentPoly"
-    
-    def __init__(self, name, material=None):
-        self.name = name
-        self.material = material
-        self.quadList = []
-        self.triList = []
-        self.currentPoly = None
-
-    def BeginPoly(self):
-        self.currentPoly = CGeoPoly()
-
-    def AddPoint(self, v, vn, uv0, uv1, vc):
-        self.currentPoly.AddPoint(v, vn, uv0, uv1, vc)       
-             
-    def EndPoly(self):
-        if (self.currentPoly.PointsCount() == 3):
-            self.triList.append(self.currentPoly)
-        if (self.currentPoly.PointsCount() == 4):
-            self.quadList.append(self.currentPoly)
-        self.currentPoly = None
-
-    def ClearPolys(self):
-        self.quadList = []
-        self.triList = []
-        self.currentPoly = None
-
-    def PrintMaterialPolys(self, geoFile):
-        geoFile.write("\t\tCSurface\n")
-        geoFile.write("\t\t{\n")
-        geoFile.write("\t\t\tmaterial \"%s\"\n" % self.name)
-        if self.triList:
-            geoFile.write("\t\t\tCTris\n")
-            geoFile.write("\t\t\t{\n")
-            geoFile.write("\t\t\t\tnumTris %d\n" % (len(self.triList)))
-            for poly in self.triList:
-                poly.PrintPoly(geoFile)
-            geoFile.write("\t\t\t}\n")
-
-        if self.quadList:
-            geoFile.write("\t\t\tCQuads\n")
-            geoFile.write("\t\t\t{\n")
-            geoFile.write("\t\t\t\tnumQuads %d\n" % (len(self.quadList)))
-            for poly in self.quadList:
-                poly.PrintPoly(geoFile)
-            geoFile.write("\t\t\t}\n")
-        geoFile.write("\t\t}\n")
-
-
-#############
-#Store all the information on a Model/Mesh (vertices, normal, certcies color, uv0, uv1, TRI, QUAD) in marmalade geo format
-#############  
-class CGeoModel:
-    __slots__ = ("name", "MaterialsDict", "vList", "vnList", "vcList", "uv0List", "uv1List",
-                "currentMaterialPolys", "vbaseIndex","vnbaseIndex", "uv0baseIndex", "uv1baseIndex",
-                "armatureObjectName", "useBonesDict", "mapVertexGroupNames", "armatureRootBone", "armatureRootBoneIndex", "skinnedVertices")
-                
-    def __init__(self, name):
-        self.name = name
-        self.MaterialsDict = {}
-        self.vList = []
-        self.vnList = []
-        self.vcList = []
-        self.uv0List = []
-        self.uv1List = []
-        self.currentMaterialPolys = None
-        #used xx baseIndex are used when merging several blender objects into one Mesh in the geo file (internal offset)
-        self.vbaseIndex = 0
-        self.vnbaseIndex = 0
-        self.uv0baseIndex = 0
-        self.uv1baseIndex = 0
-
-        # Store some information for skin management , when we merge several object in one big mesh (MergeModes 1)
-        # can only work if in the object list only one is rigged with an armature... and if it is located in 0,0,0
-        self.armatureObjectName = ""
-        #useBonesKey : bit field, where each bit is a VertexGroup.Index): Sum(2^VertGroupIndex).
-        #useBonesDict[useBonesKey] = tuple(VertexGroups.group, list(Vertex))
-        self.useBonesDict = {}
-        self.mapVertexGroupNames = {}
-        self.armatureRootBone = None
-        self.armatureRootBoneIndex = 0
-        self.skinnedVertices = []
-
-
-
-    def AddVertex(self, vertex):
-        self.vList.append(vertex.copy())
-
-    def AddVertexNormal(self, vertexN):
-        self.vnList.append(vertexN.copy())
-
-    # add a uv coordiantes and return the current Index in the stream (index is local to the object, when we merge several object into a one Mesh)
-    def AddVertexUV0(self, u, v):
-        self.uv0List.append((u, v))
-        return len(self.uv0List) - 1 - self.uv0baseIndex 
-
-    def AddVertexUV1(self, u, v):
-        self.uv1List.append((u, v))
-        return len(self.uv1List) - 1 - self.uv1baseIndex 
-
-    # add a vertexcolor if it doesn't already exist and return the current Index in the stream (index is global to all objects, when we merge several object into a one Mesh)
-    def AddVertexColor(self, r, g, b, a):
-        for i in range(0, len(self.vcList)):
-            col = self.vcList[i]
-            if col[0] == r and col[1] == g and col[2] == b and col[3] == a:
-                return i
-
-        self.vcList.append((r, g, b, a))
-        return len(self.vcList)-1
-
-    def BeginPoly(self, MaterialName, material=None):
-        if MaterialName not in self.MaterialsDict:
-            self.currentMaterialPolys = CGeoMaterialPolys(MaterialName, material)
-        else:
-            self.currentMaterialPolys = self.MaterialsDict[MaterialName]
-        self.currentMaterialPolys.BeginPoly()
-
-    def AddPoint(self, v, vn, uv0, uv1, vc):
-        if v != -1:
-            v += self.vbaseIndex
-        if vn != -1:
-            vn += self.vnbaseIndex
-        if uv0 != -1:
-            uv0 += self.uv0baseIndex
-        if uv1 != -1:
-            uv1 += self.uv1baseIndex
-                
-        self.currentMaterialPolys.AddPoint(v, vn, uv0, uv1, vc)       
-                              
-    def EndPoly(self):
-        self.currentMaterialPolys.EndPoly()
-        self.MaterialsDict[self.currentMaterialPolys.name] = self.currentMaterialPolys
-        self.currentMaterialPolys = None
-
-    def NewObject(self):
-        #used in Merge mode 1: allows to merge several blender objects into one Mesh.
-        self.vbaseIndex = len(self.vList)
-        self.vnbaseIndex = len(self.vnList)
-        self.uv0baseIndex = len(self.uv0List)
-        self.uv1baseIndex = len(self.uv1List)
-
-    def ClearAllExceptMaterials(self):
-        #used in Merge mode 2: one geo with several mesh
-        self.vList = []
-        self.vnList = []
-        self.vcList = []
-        self.uv0List = []
-        self.uv1List = []
-        self.currentMaterialPolys = None
-        self.vbaseIndex = 0
-        self.vnbaseIndex = 0
-        self.uv0baseIndex = 0
-        self.uv1baseIndex = 0
-        for GeoMaterialPolys in self.MaterialsDict.values():
-            GeoMaterialPolys.ClearPolys()
-        self.useBonesDict = {}
-        self.mapVertexGroupNames = {}
-        self.armatureObjectName = ""
-        self.armatureRootBone = None
-        self.armatureRootBoneIndex = 0
-        self.skinnedVertices = []
-
-    def PrintGeoMesh(self, geoFile):
-        geoFile.write("\tCMesh\n")
-        geoFile.write("\t{\n")
-        geoFile.write("\t\tname \"%s\"\n" % (StripName(self.name)))
-
-        if self.vList:
-            geoFile.write("\t\tCVerts\n")
-            geoFile.write("\t\t{\n")
-            geoFile.write("\t\t\tnumVerts %d\n" % len(self.vList))
-            for vertex in self.vList:
-                geoFile.write("\t\t\tv { %.9f, %.9f, %.9f }\n" % (vertex[0], vertex[1], vertex[2]))                      
-            geoFile.write("\t\t}\n")
-
-        if self.vnList:
-            geoFile.write("\t\tCVertNorms\n")
-            geoFile.write("\t\t{\n")
-            geoFile.write("\t\t\tnumVertNorms  %d\n" % len(self.vnList))
-            for vertexn in self.vnList:
-                geoFile.write("\t\t\tvn { %.9f, %.9f, %.9f }\n" % (vertexn[0], vertexn[1], vertexn[2]))                      
-            geoFile.write("\t\t}\n")
-
-        if self.vcList:
-            geoFile.write("\t\tCVertCols\n")
-            geoFile.write("\t\t{\n")
-            geoFile.write("\t\t\tnumVertCols %d\n" % len(self.vcList))
-            for color in self.vcList:
-                geoFile.write("\t\t\tcol { %.6f, %.6f, %.6f, %.6f }\n" % (color[0], color[1], color[2], color[3])) #alpha is not supported on blender for vertex colors           
-            geoFile.write("\t\t}\n")
-
-        if self.uv0List:
-            geoFile.write("\t\tCUVs\n")
-            geoFile.write("\t\t{\n")
-            geoFile.write("\t\t\tsetID 0\n")
-            geoFile.write("\t\t\tnumUVs %d\n" % len(self.uv0List))
-            for uv in self.uv0List:
-                 geoFile.write("\t\t\tuv { %.9f, %.9f }\n" % (uv[0], uv[1]))                       
-            geoFile.write("\t\t}\n")
-
-        if self.uv1List:
-            geoFile.write("\t\tCUVs\n")
-            geoFile.write("\t\t{\n")
-            geoFile.write("\t\t\tsetID 1\n")
-            geoFile.write("\t\t\tnumUVs %d\n" % len(self.uv1List))
-            for uv in self.uv1List:
-                 geoFile.write("\t\t\tuv { %.9f, %.9f }\n" % (uv[0], uv[1]))                       
-            geoFile.write("\t\t}\n")
-
-        for GeoMaterialPolys in self.MaterialsDict.values():
-            GeoMaterialPolys.PrintMaterialPolys(geoFile)
-        geoFile.write("\t}\n")
-
-    def GetMaterialList(self):
-        return list(self.MaterialsDict.keys())
-
-    def GetMaterialByName(self, name):
-        if name in self.MaterialsDict:
-            return self.MaterialsDict[name].material
-        else:
-            return None       
-
-
-
-#############
-# iterates faces, vertices ... and store the information in the GeoModel container
-def BuildOptimizedGeo(Config, Object, Mesh, GeoModel):
-    if GeoModel == None:
-        GeoModel = CGeoModel(filename, Object.name)
-
-    #Ensure tessfaces data are here
-    Mesh.update (calc_tessface=True)
-    
-    #Store Vertex stream, and Normal stream (use directly the order from blender collection
-    for Vertex in Mesh.vertices:
-        GeoModel.AddVertex(Vertex.co)
-        Normal = Vertex.normal
-        if Config.FlipNormals:
-            Normal = -Normal
-        GeoModel.AddVertexNormal(Normal)
-    #Check if some colors have been defined
-    vertexColors = None
-    if Config.ExportVertexColors and (len(Mesh.vertex_colors) > 0):
-        vertexColors = Mesh.tessface_vertex_colors[0].data
-
-    #Check if some uv coordinates have been defined
-    UVCoordinates = None
-    if Config.ExportTextures and (len(Mesh.uv_textures) > 0):
-        for UV in Mesh.tessface_uv_textures:
-            if UV.active_render:
-                UVCoordinates = UV.data
-                break
-
-    #Iterate on Faces and Store the poly (quad or tri) and the associate colors,UVs
-    for Face in Mesh.tessfaces:
-        # stream for vertex (we use the same for normal)
-        Vertices = list(Face.vertices)
-        if Config.CoordinateSystem == 1:
-            Vertices = Vertices[::-1]
-        # stream for vertex colors
-        if vertexColors:
-            MeshColor = vertexColors[Face.index]
-            if len(Vertices) == 3:
-                FaceColors = list((MeshColor.color1, MeshColor.color2, MeshColor.color3))
-            else:
-                FaceColors = list((MeshColor.color1, MeshColor.color2, MeshColor.color3, MeshColor.color4))
-            if Config.CoordinateSystem == 1:
-                FaceColors = FaceColors[::-1]
-            colorIndex = []
-            for color in FaceColors:
-                index = GeoModel.AddVertexColor(color[0], color[1], color[2], 1)  #rgba => no alpha on vertex color in Blender so use 1
-                colorIndex.append(index)
-        else:
-            colorIndex = list((-1,-1,-1,-1))
-
-        # stream for UV0 coordinates
-        if UVCoordinates:
-            uvFace = UVCoordinates[Face.index]
-            uvVertices = []
-            for uvVertex in uvFace.uv:
-                uvVertices.append(tuple(uvVertex))
-            if Config.CoordinateSystem == 1:
-                uvVertices = uvVertices[::-1]
-            uv0Index = []
-            for uvVertex in uvVertices:
-                index = GeoModel.AddVertexUV0(uvVertex[0], 1 - uvVertex[1]) 
-                uv0Index.append(index)
-        else:
-            uv0Index = list((-1, -1, -1, -1))
-
-        # stream for UV1 coordinates
-        uv1Index = list((-1, -1, -1, -1))
-
-        mat = None
-        # find the associated material
-        if Face.material_index < len(Mesh.materials):
-            mat = Mesh.materials[Face.material_index]
-        if mat:
-            matName =  mat.name
-        else:
-            matName = "NoMaterialAssigned"  # There is no material assigned in blender !!!, exporter have generated a default one          
-            
-        # now on the material, generates the tri/quad in v,vn,uv0,uv1,vc stream index
-        GeoModel.BeginPoly(matName, mat)
-
-        for i in range(0, len(Vertices)):
-            GeoModel.AddPoint(Vertices[i], Vertices[i], uv0Index[i], uv1Index[i], colorIndex[i])
-
-        GeoModel.EndPoly()
-
-
-                              
-#############
-# Get the list of Material in use by the CGeoModel
-def WriteMeshMaterialsForGeoModel(Config, mtlFile, GeoModel):
-    for matName in GeoModel.GetMaterialList():
-        Material = GeoModel.GetMaterialByName(matName)
-        WriteMaterial(Config, mtlFile, Material)
-
-
-def WriteMaterial(Config, mtlFile, Material=None):
-    mtlFile.write("CIwMaterial\n")
-    mtlFile.write("{\n")
-    if Material:
-        mtlFile.write("\tname \"%s\"\n" % Material.name)
-
-        if Config.ExportMaterialColors:
-            #if bpy.context.scene.world:
-            #    MatAmbientColor = Material.ambient * bpy.context.scene.world.ambient_color
-            MatAmbientColor = Material.ambient * Material.diffuse_color
-            mtlFile.write("\tcolAmbient {%.2f,%.2f,%.2f,%.2f} \n" % (min(255, MatAmbientColor[0] * 255), min(255, MatAmbientColor[1] * 255), min(255, MatAmbientColor[2] * 255), min(255, Material.alpha * 255)))
-            MatDiffuseColor = 255 * Material.diffuse_intensity * Material.diffuse_color
-            MatDiffuseColor = min((255, 255, 255)[:],MatDiffuseColor[:])
-            mtlFile.write("\tcolDiffuse  {%.2f,%.2f,%.2f} \n" % (MatDiffuseColor[:]))
-            MatSpecularColor = 255 * Material.specular_intensity * Material.specular_color
-            MatSpecularColor = min((255, 255, 255)[:],MatSpecularColor[:])
-            mtlFile.write("\tcolSpecular  {%.2f,%.2f,%.2f} \n" % (MatSpecularColor[:]))
-            # EmitColor = Material.emit * Material.diffuse_color
-            # mtlFile.write("\tcolEmissive {%.2f,%.2f,%.2f} \n" % (EmitColor* 255)[:])    
-    else:
-        mtlFile.write("\tname \"NoMaterialAssigned\" // There is no material assigned in blender !!!, exporter have generated a default one\n")
-
-    #Copy texture
-    if Config.ExportTextures:
-        Texture = GetMaterialTextureFullPath(Config, Material)
-        if Texture:
-            mtlFile.write("\ttexture0 .\\textures\\%s\n" % (bpy.path.basename(Texture)))
-            
-            if Config.CopyTextureFiles:
-                if not os.path.exists(Texture):
-                    #try relative path to the blend file
-                    Texture = os.path.dirname(bpy.data.filepath) + Texture
-                if os.path.exists(Texture):
-                    textureDest = os.path.dirname(Config.FilePath) + os.sep + "models" + os.sep + "textures" + os.sep + ("%s" % bpy.path.basename(Texture))
-                    ensure_dir(textureDest)
-                    if Config.Verbose:
-                        print("      Copying the texture file %s ---> %s" % (Texture, textureDest))
-                    shutil.copy(Texture, textureDest)
-                else:
-                    if Config.Verbose:
-                        print("      CANNOT Copy texture file (not found) %s" % (Texture))
-    mtlFile.write("}\n")
-
-def GetFirstRootBone(ArmatureObject):
-    ArmatureBones = ArmatureObject.data.bones
-    ParentBoneList = [Bone for Bone in ArmatureBones if Bone.parent is None]
-    if ParentBoneList:
-        return ParentBoneList[0]
-    return None
-
-
-def GetVertexGroupFromBone(Object, Bone):
-    if Bone:
-        vertexGroupList = [VertexGroup for VertexGroup in Object.vertex_groups  if VertexGroup.name == Bone.name]
-        if vertexGroupList:
-            return vertexGroupList[0]
-    return None
-
-
-def GetBoneListNames(Bones):
-    boneList = []
-    for Bone in Bones:
-        boneList.append(Bone.name)
-        boneList += GetBoneListNames(Bone.children)
-    return boneList
-
-
-def FindUniqueIndexForRootBone(Object, RootVertexGroup):
-    if RootVertexGroup:
-        return RootVertexGroup.index
-    else:
-        #If there is not VertexGroup associated to the root bone name, we don't have a vertex index.
-        #so use the next available free index
-        return len(Object.vertex_groups)
-
-         
-def WriteMeshSkinWeightsForGeoModel(Config, Object, Mesh, GeoModel):
-    ArmatureList = [Modifier for Modifier in Object.modifiers if Modifier.type == "ARMATURE"]
-    if ArmatureList:
-        ArmatureObject = ArmatureList[0].object
-        if ArmatureObject is None:
-            return
-        RootBone = GetFirstRootBone(ArmatureObject)
-        RootVertexGroup = GetVertexGroupFromBone(Object, RootBone)
-        BoneNames = GetBoneListNames(ArmatureObject.data.bones)
-
-        GeoModel.armatureObjectName = StripName(ArmatureObject.name)
-        if RootBone:
-            GeoModel.armatureRootBone = RootBone
-            GeoModel.armatureRootBoneIndex = FindUniqueIndexForRootBone(Object, RootVertexGroup)
-
-        # Marmalade need to declare a vertex per list of affected bones
-        # so first we have to get all the combinations of affected bones that exist in the mesh
-        # to build thoses groups, we build a unique key (like a bit field, where each bit is a VertexGroup.Index): Sum(2^VertGroupIndex)... so we have a unique Number per combinations
-        
-        for Vertex in Mesh.vertices:
-            VertexIndex = Vertex.index + GeoModel.vbaseIndex
-            AddVertexToDicionarySkinWeights(Config, Object, Mesh, Vertex, GeoModel.useBonesDict, GeoModel.mapVertexGroupNames, VertexIndex, RootBone, RootVertexGroup, BoneNames)
-            GeoModel.skinnedVertices.append(VertexIndex)
-
-        if Config.MergeModes != 1:
-            # write skin file directly
-            PrintSkinWeights(Config, GeoModel.armatureObjectName, GeoModel.useBonesDict, GeoModel.mapVertexGroupNames, StripName(Object.name))
-
-
-def PrintSkinWeights(Config, ArmatureObjectName, useBonesDict, mapVertexGroupNames, GeoName):        
-        #Create the skin file
-        skinfullname = os.path.dirname(Config.FilePath) + os.sep + "models" + os.sep + "%s.skin" % GeoName
-        ensure_dir(skinfullname)
-        if Config.Verbose:
-            print("      Creating skin file %s" % (skinfullname))
-        skinFile = open(skinfullname, "w")
-        skinFile.write('// skin file exported from : %r\n' % os.path.basename(bpy.data.filepath))   
-        skinFile.write("CIwAnimSkin\n")
-        skinFile.write("{\n")
-        skinFile.write("\tskeleton \"%s\"\n" % ArmatureObjectName)
-        skinFile.write("\tmodel \"%s\"\n" % GeoName)
-
-        # now we have Bones grouped in the dictionary , along with the associated influenced vertex weighting
-        # So simply iterate the dictionary
-        Config.File.write("\t\".\models\%s.skin\"\n" % GeoName)
-        for pair_ListGroupIndices_ListAssignedVertices in useBonesDict.values():
-            skinFile.write("\tCIwAnimSkinSet\n")
-            skinFile.write("\t{\n")
-            skinFile.write("\t\tuseBones {")
-            for vertexGroupIndex in pair_ListGroupIndices_ListAssignedVertices[0]:
-                skinFile.write(" %s" % mapVertexGroupNames[vertexGroupIndex])
-            skinFile.write(" }\n")
-            skinFile.write("\t\tnumVerts %d\n" % len(pair_ListGroupIndices_ListAssignedVertices[1]))
-            for VertexWeightString in pair_ListGroupIndices_ListAssignedVertices[1]:
-                skinFile.write(VertexWeightString)
-            skinFile.write("\t}\n")
-
-        skinFile.write("}\n")
-        skinFile.close()
-
-
-def AddVertexToDicionarySkinWeights(Config, Object, Mesh, Vertex, useBonesDict, mapVertexGroupNames, VertexIndex, RootBone, RootVertexGroup, BoneNames):
-    #build useBones
-    useBonesKey = 0
-    vertexGroupIndices = []
-    weightTotal = 0.0
-    if (len(Vertex.groups)) > 4:
-        print ("ERROR Vertex %d is influenced by more than 4 bones\n" % (VertexIndex))
-    for VertexGroup in Vertex.groups:
-        if (VertexGroup.weight > 0):
-            groupName = Object.vertex_groups[VertexGroup.group].name
-            if groupName in BoneNames:
-                mapVertexGroupNames[VertexGroup.group] = StripBoneName(groupName)
-                if (len(vertexGroupIndices))<4:  #ignore if more 4 bones are influencing the vertex
-                    useBonesKey = useBonesKey + pow(2, VertexGroup.group)
-                    vertexGroupIndices.append(VertexGroup.group)
-                    weightTotal = weightTotal + VertexGroup.weight
-    if (weightTotal == 0):
-        bWeightTotZero = True  #avoid divide by zero later on
-        if (RootBone):
-            if Config.Verbose:
-                print(" Warning Weight is ZERO for vertex %d => Add it to the root bone" % (VertexIndex))
-            RootBoneGroupIndex = FindUniqueIndexForRootBone(Object, RootVertexGroup)
-            mapVertexGroupNames[RootBoneGroupIndex] = StripBoneName(RootBone.name)
-            useBonesKey = pow(2, RootBoneGroupIndex)
-            vertexGroupIndices = list((RootBoneGroupIndex,))
-
-            weightTotal = 1
-    else:
-        bWeightTotZero = False
-    
-    if len(vertexGroupIndices) > 0:
-        vertexGroupIndices.sort();
-           
-        #build the vertex weight string: vertex indices, followed by influence weight for each bone
-        VertexWeightString = "\t\tvertWeights { %d" % (VertexIndex)
-        for vertexGroupIndex in vertexGroupIndices:
-            #get the weight of this specific VertexGroup (aka bone)
-            boneWeight = 1
-            for VertexGroup in Vertex.groups:
-                if VertexGroup.group == vertexGroupIndex:
-                    boneWeight = VertexGroup.weight
-            #calculate the influence of this bone compared to the total of weighting applied to this Vertex
-            if not bWeightTotZero:
-                VertexWeightString += ", %.7f" % (boneWeight / weightTotal)
-            else:
-                VertexWeightString += ", %.7f" % (1.0 / len(vertexGroupIndices))
-        VertexWeightString += "}"
-        if bWeightTotZero:
-            VertexWeightString += " // total weight was zero in blender , export assign it to the RootBone with weight 1." 
-        if (len(Vertex.groups)) > 4:
-            VertexWeightString += " // vertex is associated to more than 4 bones in blender !! skip some bone association (was associated to %d bones)." % (len(Vertex.groups))
-        VertexWeightString += "\n"
-           
-        #store in dictionnary information
-        if useBonesKey not in useBonesDict:
-            VertexList = []
-            VertexList.append(VertexWeightString)
-            useBonesDict[useBonesKey] = (vertexGroupIndices, VertexList)
-        else:
-            pair_ListGroupIndices_ListAssignedVertices = useBonesDict[useBonesKey]
-            pair_ListGroupIndices_ListAssignedVertices[1].append(VertexWeightString)
-            useBonesDict[useBonesKey] = pair_ListGroupIndices_ListAssignedVertices
-    else:
-        print ("ERROR Vertex %d is not skinned (it doesn't belong to any vertex group\n" % (VertexIndex)) 
-
-
-
-############# ARMATURE: Bone export, and Bone animation export 
-
-         
-def WriteArmatureParentRootBones(Config, Object, RootBonesList, skelFile):
-
-    if len(RootBonesList) > 1:
-        print(" /!\\  WARNING ,Marmelade need only one ROOT bone per armature, there is %d root bones " % len(RootBonesList))
-        print(RootBonesList)
-        
-    PoseBones = Object.pose.bones
-    for Bone in RootBonesList:
-        if Config.Verbose:
-            print("      Writing Root Bone: {}...".format(Bone.name))
-
-        PoseBone = PoseBones[Bone.name]
-        WriteBonePosition(Config, Object, Bone, PoseBones, PoseBone, skelFile, True)
-        if Config.Verbose:
-            print("      Done")
-        WriteArmatureChildBones(Config, Object, Bone.children, skelFile)
-
-            
-def WriteArmatureChildBones(Config, Object, BonesList, skelFile):
-    PoseBones = Object.pose.bones
-    for Bone in BonesList:
-        if Config.Verbose:
-            print("      Writing Child Bone: {}...".format(Bone.name))
-        PoseBone = PoseBones[Bone.name]
-        WriteBonePosition(Config, Object, Bone, PoseBones, PoseBone, skelFile, True)
-        if Config.Verbose:
-            print("      Done")
-            
-        WriteArmatureChildBones(Config, Object, Bone.children, skelFile)
-
-
-def WriteBonePosition(Config, Object, Bone, PoseBones, PoseBone, File, isRestPoseNotAnimPose):
-    # Compute armature scale : 
-    # Many others exporter require sthe user to do Apply Scale in Object Mode to have 1,1,1 scale and so that anim data are correctly scaled
-    # Here we retreive the Scale of the Armture Object.matrix_world.to_scale() and we use it to scale the bones :-)
-    # So new Blender user should not complain about bad animation export if they forgot to apply the Scale to 1,1,1
-    
-    armScale = Object.matrix_world.to_scale()
-    armRot = Object.matrix_world.to_quaternion()
-    if isRestPoseNotAnimPose:
-        #skel file, bone header
-        File.write("\tCIwAnimBone\n")
-        File.write("\t{\n")
-        File.write("\t\tname \"%s\"\n" % StripBoneName(Bone.name))
-        #get bone local matrix for rest pose
-        if Bone.parent:
-            File.write("\t\tparent \"%s\"\n" % StripBoneName(Bone.parent.name))
-            localmat = Bone.parent.matrix_local.inverted() * Bone.matrix_local
-        else:
-            localmat = Bone.matrix_local
-    else:
-        #anim file, bone header
-        File.write("\t\t\n")
-        File.write("\t\tbone \"%s\" \n" % StripBoneName(Bone.name))
-        localmat = PoseBone.matrix
-        #get bone local matrix for current anim pose
-        if Bone.parent:
-            ParentPoseBone = PoseBones[Bone.parent.name]
-            localmat = ParentPoseBone.matrix.inverted() * PoseBone.matrix
-        else:
-            localmat = PoseBone.matrix
-
-    if not Bone.parent:
-        #Flip Y Z axes (only on root bone, other bones are local to root bones, so no need to rotate)
-        X_ROT = mathutils.Matrix.Rotation(-math.pi / 2, 4, 'X')
-        if Config.MergeModes > 0:
-            # Merge mode is in world coordinates and not in model coordinates: so apply the world coordinate on the rootbone
-            localmat = X_ROT * Object.matrix_world * localmat
-            armScale.x =  armScale.y = armScale.z = 1
-        else:
-            localmat= X_ROT * armRot.to_matrix().to_4x4() * localmat #apply the armature rotation on the root bone
-
-    
-    loc = localmat.to_translation()
-    quat = localmat.to_quaternion()
-
-    #Scale the bone
-    loc.x *= (armScale.x * Config.Scale)
-    loc.y *= (armScale.y * Config.Scale)
-    loc.z *= (armScale.z * Config.Scale)
-    
-    File.write("\t\tpos { %.9f, %.9f, %.9f }\n" % (loc[0], loc[1], loc[2]))
-    File.write("\t\trot { %.9f, %.9f, %.9f, %.9f }\n" % (quat.w, quat.x, quat.y, quat.z))
-
-    if isRestPoseNotAnimPose:
-        File.write("\t}\n")
-
-      
-def WriteKeyedAnimationSet(Config, Scene):  
-    for Object in [Object for Object in Config.ObjectList if Object.animation_data]:
-        if Config.Verbose:
-            print("  Writing Animation Data for Object: {}".format(Object.name))
-        actions = []
-        if Config.ExportAnimationActions == 0 and Object.animation_data.action:
-            actions.append(Object.animation_data.action)
-        else:
-            actions = bpy.data.actions[:]   
-            DefaultAction = Object.animation_data.action
-        
-        for Action in actions:
-            if Config.ExportAnimationActions == 0:
-                animFileName = StripName(Object.name)
-            else:
-                Object.animation_data.action = Action
-                animFileName = "%s_%s" % (StripName(Object.name),StripName(Action.name))
-                          
-            #Object animated (aka single bone object)
-            #build key frame time list
-
-            keyframeTimes = set()
-            if Config.ExportAnimationFrames == 1:
-                # Exports only key frames
-                for FCurve in Action.fcurves:
-                    for Keyframe in FCurve.keyframe_points:
-                        if Keyframe.co[0] < Scene.frame_start:
-                            keyframeTimes.add(Scene.frame_start)
-                        elif Keyframe.co[0] > Scene.frame_end:
-                            keyframeTimes.add(Scene.frame_end)
-                        else:
-                            keyframeTimes.add(int(Keyframe.co[0]))
-            else:
-                # Exports all frames
-                keyframeTimes.update(range(Scene.frame_start, Scene.frame_end + 1, 1))
-            keyframeTimes = list(keyframeTimes)
-            keyframeTimes.sort()
-            if len(keyframeTimes):
-                #Create the anim file for offset animation (or single bone animation
-                animfullname = os.path.dirname(Config.FilePath) + os.sep + "anims" + os.sep + "%s_offset.anim" % animFileName
-                #not yet supported
-                """
-                ##    ensure_dir(animfullname)
-                ##    if Config.Verbose:
-                ##        print("      Creating anim file (single bone animation) %s" % (animfullname))
-                ##    animFile = open(animfullname, "w")
-                ##    animFile.write('// anim file exported from : %r\n' % os.path.basename(bpy.data.filepath))   
-                ##    animFile.write("CIwAnim\n")
-                ##    animFile.write("{\n")
-                ##    animFile.write("\tent \"%s\"\n" % (StripName(Object.name)))
-                ##    animFile.write("\tskeleton \"SingleBone\"\n")
-                ##    animFile.write("\t\t\n")
-                ##
-                ##    Config.File.write("\t\".\\anims\\%s_offset.anim\"\n" % animFileName))
-                ##
-                ##    for KeyframeTime in keyframeTimes:
-                ##        #Scene.frame_set(KeyframeTime)    
-                ##        animFile.write("\tCIwAnimKeyFrame\n")
-                ##        animFile.write("\t{\n")
-                ##        animFile.write("\t\ttime %.2f // frame num %d \n" % (KeyframeTime/Config.AnimFPS, KeyframeTime))
-                ##        animFile.write("\t\t\n")
-                ##        animFile.write("\t\tbone \"SingleBone\" \n")
-                ##        #postion
-                ##        posx = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "location" and FCurve.array_index == 0: posx = FCurve.evaluate(KeyframeTime)
-                ##        posy = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "location" and FCurve.array_index == 1: posy = FCurve.evaluate(KeyframeTime)
-                ##        posz = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "location" and FCurve.array_index == 2: posz = FCurve.evaluate(KeyframeTime)
-                ##        animFile.write("\t\tpos {%.9f,%.9f,%.9f}\n" % (posx, posy, posz))
-                ##        #rotation
-                ##        rot = Euler()
-                ##        rot[0] = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "rotation_euler" and FCurve.array_index == 1: rot[0] = FCurve.evaluate(KeyframeTime)
-                ##        rot[1] = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "rotation_euler" and FCurve.array_index == 2: rot[1] = FCurve.evaluate(KeyframeTime)
-                ##        rot[2] = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "rotation_euler" and FCurve.array_index == 3: rot[2] = FCurve.evaluate(KeyframeTime)
-                ##        rot = rot.to_quaternion()
-                ##        animFile.write("\t\trot {%.9f,%.9f,%.9f,%.9f}\n" % (rot[0], rot[1], rot[2], rot[3]))
-                ##        #scale
-                ##        scalex = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "scale" and FCurve.array_index == 0: scalex = FCurve.evaluate(KeyframeTime)
-                ##        scaley = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "scale" and FCurve.array_index == 1: scaley = FCurve.evaluate(KeyframeTime)
-                ##        scalez = 0
-                ##        for FCurve in Action.fcurves:
-                ##            if FCurve.data_path == "scale" and FCurve.array_index == 2: scalez = FCurve.evaluate(KeyframeTime)
-                ##        animFile.write("\t\t//scale {%.9f,%.9f,%.9f}\n" % (scalex, scaley, scalez))
-                ##        #keyframe done
-                ##        animFile.write("\t}\n")
-                ##    animFile.write("}\n")
-                ##    animFile.close()
-                """
-            else:
-                if Config.Verbose:
-                    print("    Object %s has no useable animation data." % (StripName(Object.name)))
-
-            if Config.ExportArmatures and Object.type == "ARMATURE":
-                if Config.Verbose:
-                    print("    Writing Armature Bone Animation Data...\n")
-                PoseBones = Object.pose.bones
-                Bones = Object.data.bones
-                #riged bones animated 
-                #build key frame time list
-                keyframeTimes = set()
-                if Config.ExportAnimationFrames == 1:
-                    # Exports only key frames
-                    for FCurve in Action.fcurves:
-                        for Keyframe in FCurve.keyframe_points:
-                            if Keyframe.co[0] < Scene.frame_start:
-                                keyframeTimes.add(Scene.frame_start)
-                            elif Keyframe.co[0] > Scene.frame_end:
-                                keyframeTimes.add(Scene.frame_end)
-                            else:
-                                keyframeTimes.add(int(Keyframe.co[0]))
-                else:
-                    # Exports all frame
-                    keyframeTimes.update(range(Scene.frame_start, Scene.frame_end + 1, 1))
-                   
-                keyframeTimes = list(keyframeTimes)
-                keyframeTimes.sort()
-                if Config.Verbose:
-                    print("Exporting frames: ")
-                    print(keyframeTimes)
-                    if (Scene.frame_preview_end > Scene.frame_end):
-                        print(" WARNING: END Frame of animation in UI preview is Higher than the Scene Frame end:\n Scene.frame_end %d versus Scene.frame_preview_end %d.\n"
-                              % (Scene.frame_end, Scene.frame_preview_end))
-                        print(" => You might need to change the Scene End Frame, to match the current UI preview frame end...\n=> if you don't want to miss end of animation.\n")
-
-                if len(keyframeTimes):
-                    #Create the anim file
-                    animfullname = os.path.dirname(Config.FilePath) + os.sep + "anims" + os.sep + "%s.anim" % animFileName
-                    ensure_dir(animfullname)
-                    if Config.Verbose:
-                        print("      Creating anim file (bones animation) %s\n" % (animfullname))
-                        print("      Frame count %d \n" % (len(keyframeTimes)))
-                    animFile = open(animfullname, "w")
-                    animFile.write('// anim file exported from : %r\n' % os.path.basename(bpy.data.filepath))   
-                    animFile.write("CIwAnim\n")
-                    animFile.write("{\n")
-                    animFile.write("\tskeleton \"%s\"\n" % (StripName(Object.name)))
-                    animFile.write("\t\t\n")
-
-                    Config.File.write("\t\".\\anims\\%s.anim\"\n" % animFileName)
-
-                    for KeyframeTime in keyframeTimes:
-                        if Config.Verbose:
-                            print("     Writing Frame %d:" % KeyframeTime)
-                        animFile.write("\tCIwAnimKeyFrame\n")
-                        animFile.write("\t{\n")
-                        animFile.write("\t\ttime %.2f // frame num %d \n" % (KeyframeTime / Config.AnimFPS, KeyframeTime))
-                        #for every frame write bones positions
-                        Scene.frame_set(KeyframeTime)
-                        for PoseBone in PoseBones:
-                            if Config.Verbose:
-                                print("      Writing Bone: {}...".format(PoseBone.name))
-                            animFile.write("\t\t\n")
-
-                            Bone = Bones[PoseBone.name]
-                            WriteBonePosition(Config, Object, Bone, PoseBones, PoseBone, animFile, False)
-                        #keyframe done
-                        animFile.write("\t}\n")
-                    animFile.write("}\n")
-                    animFile.close()
-            else:
-                if Config.Verbose:
-                    print("    Object %s has no useable animation data." % (StripName(Object.name)))
-        if Config.ExportAnimationActions == 1:
-            #set back the original default animation
-            Object.animation_data.action = DefaultAction
-        if Config.Verbose:
-            print("  Done") #Done with Object
- 
-
-                                
- 
-################## Utilities
-            
-def StripBoneName(name):
-    return name.replace(" ", "")
-
-
-def StripName(Name):
-    
-    def ReplaceSet(String, OldSet, NewChar):
-        for OldChar in OldSet:
-            String = String.replace(OldChar, NewChar)
-        return String
-    
-    import string
-    
-    NewName = ReplaceSet(Name, string.punctuation + " ", "_")
-    return NewName
-
-
-def ensure_dir(f):
-    d = os.path.dirname(f)
-    if not os.path.exists(d):
-        os.makedirs(d)
-        
-
-def CloseFile(Config):
-    if Config.Verbose:
-        print("Closing File...")
-    Config.File.close()
-    if Config.Verbose:
-        print("Done")
-
-
-CoordinateSystems = (
-    ("1", "Left-Handed", ""),
-    ("2", "Right-Handed", ""),
-    )
-
-
-AnimationFrameModes = (
-    ("0", "None", ""),
-    ("1", "Keyframes Only", ""),
-    ("2", "Full Animation", ""),
-    )
-
-AnimationActions = (
-    ("0", "Default Animation", ""),
-    ("1", "All Animations", ""),
-    )
-
-ExportModes = (
-    ("1", "All Objects", ""),
-    ("2", "Selected Objects", ""),
-    )
-
-MergeModes = (
-    ("0", "None", ""),
-    ("1", "Merge in one big Mesh", ""),
-    ("2", "Merge in unique Geo File containing several meshes", ""),
-    )
-
-
-from bpy.props import StringProperty, EnumProperty, BoolProperty, IntProperty
-
-
-class MarmaladeExporter(bpy.types.Operator):
-    """Export to the Marmalade model format (.group)"""
-
-    bl_idname = "export.marmalade"
-    bl_label = "Export Marmalade"
-
-    filepath = StringProperty(subtype='FILE_PATH')
-     #Export Mode
-    ExportMode = EnumProperty(
-        name="Export",
-        description="Select which objects to export. Only Mesh, Empty, " \
-                    "and Armature objects will be exported",
-        items=ExportModes,
-        default="1")
-
-    MergeModes = EnumProperty(
-        name="Merge",
-        description="Select if objects should be merged in one Geo File (it can be usefull if a scene is done by several cube/forms)." \
-                    "Do not merge rigged character that have an armature.",
-        items=MergeModes,
-        default="0")
-    
-    #General Options
-    Scale = IntProperty(
-        name="Scale Percent",
-        description="Scale percentage applied for export",
-        default=100, min=1, max=1000)
-    
-    FlipNormals = BoolProperty(
-        name="Flip Normals",
-        description="",
-        default=False)
-    ApplyModifiers = BoolProperty(
-        name="Apply Modifiers",
-        description="Apply object modifiers before export",
-        default=False)
-    ExportVertexColors = BoolProperty(
-        name="Export Vertices Colors",
-        description="Export colors set on vertices, if any",
-        default=True)
-    ExportMaterialColors = BoolProperty(
-        name="Export Material Colors",
-        description="Ambient color is exported on the Material",
-        default=True)
-    ExportTextures = BoolProperty(
-        name="Export Textures and UVs",
-        description="Exports UVs and Reference external image files to be used by the model",
-        default=True)
-    CopyTextureFiles = BoolProperty(
-        name="Copy Textures Files",
-        description="Copy referenced Textures files in the models\\textures directory",
-        default=True)
-    ExportArmatures = BoolProperty(
-        name="Export Armatures",
-        description="Export the bones of any armatures to deform meshes",
-        default=True)
-    ExportAnimationFrames = EnumProperty(
-        name="Animations Frames",
-        description="Select the type of animations to export. Only object " \
-                    "and armature bone animations can be exported. Keyframes exports only the keyed frames" \
-                    "Full Animation exports every frames, None disables animationq export. ",
-        items=AnimationFrameModes,
-        default="1")
-    ExportAnimationActions = EnumProperty(
-        name="Animations Actions",
-        description="By default only the Default Animation Action assoiated to an armature is exported." \
-                    "However if you have defined several animations on the same armature,"\
-                    "you can select to export all animations. You can see the list of animation actions in the DopeSheet window.",
-        items=AnimationActions,
-        default="0")
-    if bpy.context.scene:
-        defFPS = bpy.context.scene.render.fps
-    else:
-        defFPS = 30                 
-    AnimFPS = IntProperty(
-        name="Animation FPS",
-        description="Frame rate used to export animation in seconds (can be used to artficially slow down the exported animation, or to speed up it",
-        default=defFPS, min=1, max=300)
-
-    #Advance Options
-    CoordinateSystem = EnumProperty(
-        name="System",
-        description="Select a coordinate system to export to",
-        items=CoordinateSystems,
-        default="1")
-    
-    Verbose = BoolProperty(
-        name="Verbose",
-        description="Run the exporter in debug mode. Check the console for output",
-        default=True)
-
-    def execute(self, context):
-        #Append .group
-        FilePath = bpy.path.ensure_ext(self.filepath, ".group")
-
-        Config = MarmaladeExporterSettings(context,
-                                         FilePath,
-                                         CoordinateSystem=self.CoordinateSystem,
-                                         FlipNormals=self.FlipNormals,
-                                         ApplyModifiers=self.ApplyModifiers,
-                                         Scale=self.Scale,
-                                         AnimFPS=self.AnimFPS,
-                                         ExportVertexColors=self.ExportVertexColors,
-                                         ExportMaterialColors=self.ExportMaterialColors,
-                                         ExportTextures=self.ExportTextures,
-                                         CopyTextureFiles=self.CopyTextureFiles,
-                                         ExportArmatures=self.ExportArmatures,
-                                         ExportAnimationFrames=self.ExportAnimationFrames,
-                                         ExportAnimationActions=self.ExportAnimationActions,
-                                         ExportMode=self.ExportMode,
-                                         MergeModes=self.MergeModes,
-                                         Verbose=self.Verbose)
-
-        # Exit edit mode before exporting, so current object states are exported properly.
-        if bpy.ops.object.mode_set.poll():
-            bpy.ops.object.mode_set(mode='OBJECT')
-
-        ExportMadeWithMarmaladeGroup(Config)
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        if not self.filepath:
-            self.filepath = bpy.path.ensure_ext(bpy.data.filepath, ".group")
-        WindowManager = context.window_manager
-        WindowManager.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
-
-def menu_func(self, context):
-    self.layout.operator(MarmaladeExporter.bl_idname, text="Marmalade cross-platform Apps (.group)")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_file_export.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_file_export.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_export_md3.py b/release/scripts/addons_contrib/io_export_md3.py
deleted file mode 100644
index 64876ac..0000000
--- a/release/scripts/addons_contrib/io_export_md3.py
+++ /dev/null
@@ -1,694 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': 'Quake Model 3 (.md3)',
-    'author': 'Xembie',
-    'version': (0, 7),
-    'blender': (2, 5, 3),
-    'location': 'File > Export',
-    'description': 'Save a Quake Model 3 File)',
-    'warning': '', # used for warning icon and text in addons panel
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/'\
-        'Scripts/',
-    'tracker_url': 'http://projects.blender.org/tracker/index.php?'\
-        'func=detail&aid=23160',
-    'category': 'Import-Export'}
-
-
-import bpy,struct,math,os
-
-MAX_QPATH = 64
-
-MD3_IDENT = "IDP3"
-MD3_VERSION = 15
-MD3_MAX_TAGS = 16
-MD3_MAX_SURFACES = 32
-MD3_MAX_FRAMES = 1024
-MD3_MAX_SHADERS = 256
-MD3_MAX_VERTICES = 4096
-MD3_MAX_TRIANGLES = 8192
-MD3_XYZ_SCALE = 64.0
-
-class md3Vert:
-    xyz = []
-    normal = 0
-    binaryFormat = "<3hH"
-    
-    def __init__(self):
-        self.xyz = [0.0, 0.0, 0.0]
-        self.normal = 0
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-    
-    # copied from PhaethonH <phaethon at linux.ucla.edu> md3.py
-    def Decode(self, latlng):
-        lat = (latlng >> 8) & 0xFF;
-        lng = (latlng) & 0xFF;
-        lat *= math.pi / 128;
-        lng *= math.pi / 128;
-        x = math.cos(lat) * math.sin(lng)
-        y = math.sin(lat) * math.sin(lng)
-        z =                 math.cos(lng)
-        retval = [ x, y, z ]
-        return retval
-    
-    # copied from PhaethonH <phaethon at linux.ucla.edu> md3.py
-    def Encode(self, normal):
-        x = normal[0]
-        y = normal[1]
-        z = normal[2]
-        # normalize
-        l = math.sqrt((x*x) + (y*y) + (z*z))
-        if l == 0:
-            return 0
-        x = x/l
-        y = y/l
-        z = z/l
-        
-        if (x == 0.0) & (y == 0.0) :
-            if z > 0.0:
-                return 0
-            else:
-                return (128 << 8)
-        
-        lng = math.acos(z) * 255 / (2 * math.pi)
-        lat = math.atan2(y, x) * 255 / (2 * math.pi)
-        retval = ((int(lat) & 0xFF) << 8) | (int(lng) & 0xFF)
-        return retval
-        
-    def Save(self, file):
-        tmpData = [0] * 4
-        tmpData[0] = int(self.xyz[0] * MD3_XYZ_SCALE)
-        tmpData[1] = int(self.xyz[1] * MD3_XYZ_SCALE)
-        tmpData[2] = int(self.xyz[2] * MD3_XYZ_SCALE)
-        tmpData[3] = self.normal
-        data = struct.pack(self.binaryFormat, tmpData[0], tmpData[1], tmpData[2], tmpData[3])
-        file.write(data)
-        
-class md3TexCoord:
-    u = 0.0
-    v = 0.0
-
-    binaryFormat = "<2f"
-
-    def __init__(self):
-        self.u = 0.0
-        self.v = 0.0
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-
-    def Save(self, file):
-        tmpData = [0] * 2
-        tmpData[0] = self.u
-        tmpData[1] = 1.0 - self.v
-        data = struct.pack(self.binaryFormat, tmpData[0], tmpData[1])
-        file.write(data)
-
-class md3Triangle:
-    indexes = []
-
-    binaryFormat = "<3i"
-
-    def __init__(self):
-        self.indexes = [ 0, 0, 0 ]
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-
-    def Save(self, file):
-        tmpData = [0] * 3
-        tmpData[0] = self.indexes[0]
-        tmpData[1] = self.indexes[2] # reverse
-        tmpData[2] = self.indexes[1] # reverse
-        data = struct.pack(self.binaryFormat,tmpData[0], tmpData[1], tmpData[2])
-        file.write(data)
-
-class md3Shader:
-    name = ""
-    index = 0
-    
-    binaryFormat = "<%dsi" % MAX_QPATH
-
-    def __init__(self):
-        self.name = ""
-        self.index = 0
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-
-    def Save(self, file):
-        tmpData = [0] * 2
-        tmpData[0] = self.name
-        tmpData[1] = self.index
-        data = struct.pack(self.binaryFormat, tmpData[0], tmpData[1])
-        file.write(data)
-
-class md3Surface:
-    ident = ""
-    name = ""
-    flags = 0
-    numFrames = 0
-    numShaders = 0
-    numVerts = 0
-    numTriangles = 0
-    ofsTriangles = 0
-    ofsShaders = 0
-    ofsUV = 0
-    ofsVerts = 0
-    ofsEnd = 0
-    shaders = []
-    triangles = []
-    uv = []
-    verts = []
-    
-    binaryFormat = "<4s%ds10i" % MAX_QPATH  # 1 int, name, then 10 ints
-    
-    def __init__(self):
-        self.ident = ""
-        self.name = ""
-        self.flags = 0
-        self.numFrames = 0
-        self.numShaders = 0
-        self.numVerts = 0
-        self.numTriangles = 0
-        self.ofsTriangles = 0
-        self.ofsShaders = 0
-        self.ofsUV = 0
-        self.ofsVerts = 0
-        self.ofsEnd
-        self.shaders = []
-        self.triangles = []
-        self.uv = []
-        self.verts = []
-        
-    def GetSize(self):
-        sz = struct.calcsize(self.binaryFormat)
-        self.ofsTriangles = sz
-        for t in self.triangles:
-            sz += t.GetSize()
-        self.ofsShaders = sz
-        for s in self.shaders:
-            sz += s.GetSize()
-        self.ofsUV = sz
-        for u in self.uv:
-            sz += u.GetSize()
-        self.ofsVerts = sz
-        for v in self.verts:
-            sz += v.GetSize()
-        self.ofsEnd = sz
-        return self.ofsEnd
-    
-    def Save(self, file):
-        self.GetSize()
-        tmpData = [0] * 12
-        tmpData[0] = self.ident
-        tmpData[1] = self.name
-        tmpData[2] = self.flags
-        tmpData[3] = self.numFrames
-        tmpData[4] = self.numShaders
-        tmpData[5] = self.numVerts
-        tmpData[6] = self.numTriangles
-        tmpData[7] = self.ofsTriangles
-        tmpData[8] = self.ofsShaders
-        tmpData[9] = self.ofsUV
-        tmpData[10] = self.ofsVerts
-        tmpData[11] = self.ofsEnd
-        data = struct.pack(self.binaryFormat, tmpData[0],tmpData[1],tmpData[2],tmpData[3],tmpData[4],tmpData[5],tmpData[6],tmpData[7],tmpData[8],tmpData[9],tmpData[10],tmpData[11])
-        file.write(data)
-
-        # write the tri data
-        for t in self.triangles:
-            t.Save(file)
-
-        # save the shader coordinates
-        for s in self.shaders:
-            s.Save(file)
-
-        # save the uv info
-        for u in self.uv:
-            u.Save(file)
-
-        # save the verts
-        for v in self.verts:
-            v.Save(file)
-
-class md3Tag:
-    name = ""
-    origin = []
-    axis = []
-    
-    binaryFormat="<%ds3f9f" % MAX_QPATH
-    
-    def __init__(self):
-        self.name = ""
-        self.origin = [0, 0, 0]
-        self.axis = [0, 0, 0, 0, 0, 0, 0, 0, 0]
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-        
-    def Save(self, file):
-        tmpData = [0] * 13
-        tmpData[0] = self.name
-        tmpData[1] = float(self.origin[0])
-        tmpData[2] = float(self.origin[1])
-        tmpData[3] = float(self.origin[2])
-        tmpData[4] = float(self.axis[0])
-        tmpData[5] = float(self.axis[1])
-        tmpData[6] = float(self.axis[2])
-        tmpData[7] = float(self.axis[3])
-        tmpData[8] = float(self.axis[4])
-        tmpData[9] = float(self.axis[5])
-        tmpData[10] = float(self.axis[6])
-        tmpData[11] = float(self.axis[7])
-        tmpData[12] = float(self.axis[8])
-        data = struct.pack(self.binaryFormat, tmpData[0],tmpData[1],tmpData[2],tmpData[3],tmpData[4],tmpData[5],tmpData[6], tmpData[7], tmpData[8], tmpData[9], tmpData[10], tmpData[11], tmpData[12])
-        file.write(data)
-    
-class md3Frame:
-    mins = 0
-    maxs = 0
-    localOrigin = 0
-    radius = 0.0
-    name = ""
-    
-    binaryFormat="<3f3f3ff16s"
-    
-    def __init__(self):
-        self.mins = [0, 0, 0]
-        self.maxs = [0, 0, 0]
-        self.localOrigin = [0, 0, 0]
-        self.radius = 0.0
-        self.name = ""
-        
-    def GetSize(self):
-        return struct.calcsize(self.binaryFormat)
-
-    def Save(self, file):
-        tmpData = [0] * 11
-        tmpData[0] = self.mins[0]
-        tmpData[1] = self.mins[1]
-        tmpData[2] = self.mins[2]
-        tmpData[3] = self.maxs[0]
-        tmpData[4] = self.maxs[1]
-        tmpData[5] = self.maxs[2]
-        tmpData[6] = self.localOrigin[0]
-        tmpData[7] = self.localOrigin[1]
-        tmpData[8] = self.localOrigin[2]
-        tmpData[9] = self.radius
-        tmpData[10] = self.name
-        data = struct.pack(self.binaryFormat, tmpData[0],tmpData[1],tmpData[2],tmpData[3],tmpData[4],tmpData[5],tmpData[6],tmpData[7], tmpData[8], tmpData[9], tmpData[10])
-        file.write(data)
-
-class md3Object:
-    # header structure
-    ident = ""            # this is used to identify the file (must be IDP3)
-    version = 0            # the version number of the file (Must be 15)
-    name = ""
-    flags = 0
-    numFrames = 0
-    numTags = 0
-    numSurfaces = 0
-    numSkins = 0
-    ofsFrames = 0
-    ofsTags = 0
-    ofsSurfaces = 0
-    ofsEnd = 0
-    frames = []
-    tags = []
-    surfaces = []
-
-    binaryFormat="<4si%ds9i" % MAX_QPATH  # little-endian (<), 17 integers (17i)
-
-    def __init__(self):
-        self.ident = 0
-        self.version = 0
-        self.name = ""
-        self.flags = 0
-        self.numFrames = 0
-        self.numTags = 0
-        self.numSurfaces = 0
-        self.numSkins = 0
-        self.ofsFrames = 0
-        self.ofsTags = 0
-        self.ofsSurfaces = 0
-        self.ofsEnd = 0
-        self.frames = []
-        self.tags = []
-        self.surfaces = []
-
-    def GetSize(self):
-        self.ofsFrames = struct.calcsize(self.binaryFormat)
-        self.ofsTags = self.ofsFrames
-        for f in self.frames:
-            self.ofsTags += f.GetSize()
-        self.ofsSurfaces += self.ofsTags
-        for t in self.tags:
-            self.ofsSurfaces += t.GetSize()
-        self.ofsEnd = self.ofsSurfaces
-        for s in self.surfaces:
-            self.ofsEnd += s.GetSize()
-        return self.ofsEnd
-        
-    def Save(self, file):
-        self.GetSize()
-        tmpData = [0] * 12
-        tmpData[0] = self.ident
-        tmpData[1] = self.version
-        tmpData[2] = self.name
-        tmpData[3] = self.flags
-        tmpData[4] = self.numFrames
-        tmpData[5] = self.numTags
-        tmpData[6] = self.numSurfaces
-        tmpData[7] = self.numSkins
-        tmpData[8] = self.ofsFrames
-        tmpData[9] = self.ofsTags
-        tmpData[10] = self.ofsSurfaces
-        tmpData[11] = self.ofsEnd
-
-        data = struct.pack(self.binaryFormat, tmpData[0],tmpData[1],tmpData[2],tmpData[3],tmpData[4],tmpData[5],tmpData[6],tmpData[7], tmpData[8], tmpData[9], tmpData[10], tmpData[11])
-        file.write(data)
-
-        for f in self.frames:
-            f.Save(file)
-            
-        for t in self.tags:
-            t.Save(file)
-            
-        for s in self.surfaces:
-            s.Save(file)
-
-
-def message(log,msg):
-  if log:
-    log.write(msg + "\n")
-  else:
-    print(msg)
-
-class md3Settings:
-  def __init__(self,
-               savepath,
-               name,
-               logpath,
-               overwrite=True,
-               dumpall=False,
-               ignoreuvs=False,
-               scale=1.0,
-               offsetx=0.0,
-               offsety=0.0,
-               offsetz=0.0):
-    self.savepath = savepath
-    self.name = name
-    self.logpath = logpath
-    self.overwrite = overwrite
-    self.dumpall = dumpall
-    self.ignoreuvs = ignoreuvs
-    self.scale = scale
-    self.offsetx = offsetx
-    self.offsety = offsety
-    self.offsetz = offsetz
-
-def print_md3(log,md3,dumpall):
-  message(log,"Header Information")
-  message(log,"Ident: " + str(md3.ident))
-  message(log,"Version: " + str(md3.version))
-  message(log,"Name: " + md3.name)
-  message(log,"Flags: " + str(md3.flags))
-  message(log,"Number of Frames: " + str(md3.numFrames))
-  message(log,"Number of Tags: " + str(md3.numTags))
-  message(log,"Number of Surfaces: " + str(md3.numSurfaces))
-  message(log,"Number of Skins: " + str(md3.numSkins))
-  message(log,"Offset Frames: " + str(md3.ofsFrames))
-  message(log,"Offset Tags: " + str(md3.ofsTags))
-  message(log,"Offset Surfaces: " + str(md3.ofsSurfaces))
-  message(log,"Offset end: " + str(md3.ofsEnd))
-  if dumpall:
-    message(log,"Frames:")
-    for f in md3.frames:
-      message(log," Mins: " + str(f.mins[0]) + " " + str(f.mins[1]) + " " + str(f.mins[2]))
-      message(log," Maxs: " + str(f.maxs[0]) + " " + str(f.maxs[1]) + " " + str(f.maxs[2]))
-      message(log," Origin(local): " + str(f.localOrigin[0]) + " " + str(f.localOrigin[1]) + " " + str(f.localOrigin[2]))
-      message(log," Radius: " + str(f.radius))
-      message(log," Name: " + f.name)
-
-    message(log,"Tags:")
-    for t in md3.tags:
-      message(log," Name: " + t.name)
-      message(log," Origin: " + str(t.origin[0]) + " " + str(t.origin[1]) + " " + str(t.origin[2]))
-      message(log," Axis[0]: " + str(t.axis[0]) + " " + str(t.axis[1]) + " " + str(t.axis[2]))
-      message(log," Axis[1]: " + str(t.axis[3]) + " " + str(t.axis[4]) + " " + str(t.axis[5]))
-      message(log," Axis[2]: " + str(t.axis[6]) + " " + str(t.axis[7]) + " " + str(t.axis[8]))
-
-    message(log,"Surfaces:")
-    for s in md3.surfaces:
-      message(log," Ident: " + s.ident)
-      message(log," Name: " + s.name)
-      message(log," Flags: " + str(s.flags))
-      message(log," # of Frames: " + str(s.numFrames))
-      message(log," # of Shaders: " + str(s.numShaders))
-      message(log," # of Verts: " + str(s.numVerts))
-      message(log," # of Triangles: " + str(s.numTriangles))
-      message(log," Offset Triangles: " + str(s.ofsTriangles))
-      message(log," Offset UVs: " + str(s.ofsUV))
-      message(log," Offset Verts: " + str(s.ofsVerts))
-      message(log," Offset End: " + str(s.ofsEnd))
-      message(log," Shaders:")
-      for shader in s.shaders:
-        message(log,"  Name: " + shader.name)
-        message(log,"  Index: " + str(shader.index))
-      message(log," Triangles:")
-      for tri in s.triangles:
-        message(log,"  Indexes: " + str(tri.indexes[0]) + " " + str(tri.indexes[1]) + " " + str(tri.indexes[2]))
-      message(log," UVs:")
-      for uv in s.uv:
-        message(log,"  U: " + str(uv.u))
-        message(log,"  V: " + str(uv.v)) 
-      message(log," Verts:")
-      for vert in s.verts:
-        message(log,"  XYZ: " + str(vert.xyz[0]) + " " + str(vert.xyz[1]) + " " + str(vert.xyz[2]))
-        message(log,"  Normal: " + str(vert.normal))
-
-  shader_count = 0
-  vert_count = 0
-  tri_count = 0
-  for surface in md3.surfaces:
-    shader_count += surface.numShaders
-    tri_count += surface.numTriangles
-    vert_count += surface.numVerts
-
-  if md3.numTags >= MD3_MAX_TAGS:
-    message(log,"!Warning: Tag limit reached! " + str(md3.numTags))
-  if md3.numSurfaces >= MD3_MAX_SURFACES:
-    message(log,"!Warning: Surface limit reached! " + str(md3.numSurfaces))
-  if md3.numFrames >= MD3_MAX_FRAMES:
-    message(log,"!Warning: Frame limit reached! " + str(md3.numFrames))
-  if shader_count >= MD3_MAX_SHADERS:
-    message(log,"!Warning: Shader limit reached! " + str(shader_count))
-  if vert_count >= MD3_MAX_VERTICES:
-    message(log,"!Warning: Vertex limit reached! " + str(vert_count))
-  if tri_count >= MD3_MAX_TRIANGLES:
-    message(log,"!Warning: Triangle limit reached! " + str(tri_count))
-
-def save_md3(settings):
-  if settings.logpath:
-    if settings.overwrite:
-      log = open(settings.logpath,"w")
-    else:
-      log = open(settings.logpath,"a")
-  else:
-    log = 0
-  message(log,"##########Exporting MD3##########")
-  bpy.ops.object.mode_set(mode='OBJECT')
-  md3 = md3Object()
-  md3.ident = MD3_IDENT
-  md3.version = MD3_VERSION
-  md3.name = settings.name
-  md3.numFrames = (bpy.context.scene.frame_end + 1) - bpy.context.scene.frame_start
-
-  for obj in bpy.context.selected_objects:
-    if obj.type == 'MESH':
-      nsurface = md3Surface()
-      nsurface.name = obj.name
-      nsurface.ident = MD3_IDENT
- 
-      vertlist = []
-
-      for f,face in enumerate(obj.data.faces):
-        ntri = md3Triangle()
-        if len(face.verts) != 3:
-          message(log,"Found a nontriangle face in object " + obj.name)
-          continue
-
-        for v,vert_index in enumerate(face.verts):
-          uv_u = round(obj.data.active_uv_texture.data[f].uv[v][0],5)
-          uv_v = round(obj.data.active_uv_texture.data[f].uv[v][1],5)
-
-          match = 0
-          match_index = 0
-          for i,vi in enumerate(vertlist):
-            if vi == vert_index:
-              if settings.ignoreuvs:
-                match = 1#there is a uv match for all
-                match_index = i
-              else:
-                if nsurface.uv[i].u == uv_u and nsurface.uv[i].v == uv_v:
-                  match = 1
-                  match_index = i
-
-          if match == 0:
-            vertlist.append(vert_index)
-            ntri.indexes[v] = nsurface.numVerts
-            ntex = md3TexCoord()
-            ntex.u = uv_u
-            ntex.v = uv_v
-            nsurface.uv.append(ntex)
-            nsurface.numVerts += 1
-          else:
-            ntri.indexes[v] = match_index
-        nsurface.triangles.append(ntri)
-        nsurface.numTriangles += 1
-
-      if obj.data.active_uv_texture:
-        nshader = md3Shader()
-        nshader.name = obj.data.active_uv_texture.name
-        nshader.index = nsurface.numShaders
-        nsurface.shaders.append(nshader)
-        nsurface.numShaders += 1
-      if nsurface.numShaders < 1: #we should add a blank as a placeholder
-        nshader = md3Shader()
-        nshader.name = "NULL"
-        nsurface.shaders.append(nshader)
-        nsurface.numShaders += 1
-
-      for frame in range(bpy.context.scene.frame_start,bpy.context.scene.frame_end + 1):
-        bpy.context.scene.set_frame(frame)
-        fobj = obj.create_mesh(bpy.context.scene,True,'PREVIEW')
-        fobj.calc_normals()
-        nframe = md3Frame()
-        nframe.name = str(frame)
-        for vi in vertlist:
-            vert = fobj.verts[vi]
-            nvert = md3Vert()
-            nvert.xyz = vert.co * obj.matrix_world
-            nvert.xyz[0] = (round(nvert.xyz[0] + obj.matrix_world[3][0],5) * settings.scale) + settings.offsetx
-            nvert.xyz[1] = (round(nvert.xyz[1] + obj.matrix_world[3][1],5) * settings.scale) + settings.offsety
-            nvert.xyz[2] = (round(nvert.xyz[2] + obj.matrix_world[3][2],5) * settings.scale) + settings.offsetz
-            nvert.normal = nvert.Encode(vert.normal)
-            for i in range(0,3):
-              nframe.mins[i] = min(nframe.mins[i],nvert.xyz[i])
-              nframe.maxs[i] = max(nframe.maxs[i],nvert.xyz[i])
-            minlength = math.sqrt(math.pow(nframe.mins[0],2) + math.pow(nframe.mins[1],2) + math.pow(nframe.mins[2],2))
-            maxlength = math.sqrt(math.pow(nframe.maxs[0],2) + math.pow(nframe.maxs[1],2) + math.pow(nframe.maxs[2],2))
-            nframe.radius = round(max(minlength,maxlength),5)
-            nsurface.verts.append(nvert) 
-        md3.frames.append(nframe)
-        nsurface.numFrames += 1
-        bpy.data.meshes.remove(fobj)
-      md3.surfaces.append(nsurface)
-      md3.numSurfaces += 1
-
-    elif obj.type == 'EMPTY':
-      md3.numTags += 1
-      for frame in range(bpy.context.scene.frame_start,bpy.context.scene.frame_end + 1):
-        bpy.context.scene.set_frame(frame)
-        ntag = md3Tag()
-        ntag.origin[0] = (round(obj.matrix_world[3][0] * settings.scale,5)) + settings.offsetx
-        ntag.origin[1] = (round(obj.matrix_world[3][1] * settings.scale,5)) + settings.offsety
-        ntag.origin[2] = (round(obj.matrix_world[3][2] * settings.scale,5)) + settings.offsetz
-        ntag.axis[0] = obj.matrix_world[0][0]
-        ntag.axis[1] = obj.matrix_world[0][1]
-        ntag.axis[2] = obj.matrix_world[0][2]
-        ntag.axis[3] = obj.matrix_world[1][0]
-        ntag.axis[4] = obj.matrix_world[1][1]
-        ntag.axis[5] = obj.matrix_world[1][2]
-        ntag.axis[6] = obj.matrix_world[2][0]
-        ntag.axis[7] = obj.matrix_world[2][1]
-        ntag.axis[8] = obj.matrix_world[2][2]
-        md3.tags.append(ntag)
-  
-  if md3.numSurfaces < 1:
-    message(log,"Select a mesh to export!")
-    if log:
-      log.close()
-    return
-
-  file = open(settings.savepath, "wb")
-  md3.Save(file)
-  print_md3(log,md3,settings.dumpall)
-  file.close()
-
-  message(log,"MD3: " + settings.name + " saved to " + settings.savepath)
-  if log:
-    print("Logged to",settings.logpath)
-    log.close()
-
-from bpy.props import *
-class ExportMD3(bpy.types.Operator):
-  """Export to Quake Model 3 (.md3)"""
-  bl_idname = "export.md3"
-  bl_label = 'Export MD3'
-
-  filepath = StringProperty(subtype = 'FILE_PATH',name="File Path", description="Filepath for exporting", maxlen= 1024, default= "")
-  md3name = StringProperty(name="MD3 Name", description="MD3 header name / skin path (64 bytes)",maxlen=64,default="")
-  md3log = StringProperty(name="MD3 Log", description="MD3 log file path",maxlen=1024,default="export_md3.log")
-  md3overwritelog = BoolProperty(name="Overwrite log", description="Overwrite log (off == append)", default=True)
-  md3dumpall = BoolProperty(name="Dump all", description="Dump all data for md3 to log",default=False)
-  md3ignoreuvs = BoolProperty(name="Ignore UVs", description="Ignores uv influence on mesh generation. Use if uv map not made.",default=False)
-  md3scale = FloatProperty(name="Scale", description="Scale all objects from world origin (0,0,0)",default=1.0,precision=5)
-  md3offsetx = FloatProperty(name="Offset X", description="Transition scene along x axis",default=0.0,precision=5)
-  md3offsety = FloatProperty(name="Offset Y", description="Transition scene along y axis",default=0.0,precision=5)
-  md3offsetz = FloatProperty(name="Offset Z", description="Transition scene along z axis",default=0.0,precision=5)
-
-  def execute(self, context):
-   settings = md3Settings(savepath = self.properties.filepath,
-                          name = self.properties.md3name,
-                          logpath = self.properties.md3log,
-                          overwrite = self.properties.md3overwritelog,
-                          dumpall = self.properties.md3dumpall,
-                          ignoreuvs = self.properties.md3ignoreuvs,
-                          scale = self.properties.md3scale,
-                          offsetx = self.properties.md3offsetx,
-                          offsety = self.properties.md3offsety,
-                          offsetz = self.properties.md3offsetz)
-   save_md3(settings)
-   return {'FINISHED'}
-
-  def invoke(self, context, event):
-    wm = context.window_manager
-    wm.fileselect_add(self)
-    return {'RUNNING_MODAL'}
-
-  @classmethod
-  def poll(cls, context):
-    return context.active_object is not None
-
-def menu_func(self, context):
-  newpath = os.path.splitext(bpy.context.blend_data.filepath)[0] + ".md3"
-  self.layout.operator(ExportMD3.bl_idname, text="Quake Model 3 (.md3)").filepath = newpath 
-
-def register():
-  bpy.types.INFO_MT_file_export.append(menu_func)
-
-def unregister():
-  bpy.types.INFO_MT_file_export.remove(menu_func)
-
-if __name__ == "__main__":
-  register()
diff --git a/release/scripts/addons_contrib/io_import_BrushSet.py b/release/scripts/addons_contrib/io_import_BrushSet.py
deleted file mode 100644
index 80da37c..0000000
--- a/release/scripts/addons_contrib/io_import_BrushSet.py
+++ /dev/null
@@ -1,144 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-# ----------------------------------------------------------------------------#    
-
-"""
-todo:
-- add file selection for single and multiple files
-
-changelog:
-    "version": (1,1,4),
-        filename will be used as texture name (still limited by stringlength)
-
-
-    "version": (1,1,3),
-    fixed operator and registration
-    added tracker and wiki url\
-    
-version": (1,1,2)
-    replaced image.new() with image.load()
-    changed addon category
-    removed some unused/old code    
-    
-version":1.11:
-    added type arg to texture.new() [L48]
-    cleared default filename
-""" 
-
-# ----------------------------------------------------------------------------#    
-
-import bpy
-import os
-from bpy.props import *
-
-#addon description
-bl_info = {
-    "name": "import BrushSet",
-    "author": "Daniel Grauer",
-    "version": (1, 1, 5),
-    "blender": (2, 5, 6),
-    "category": "Import-Export",
-    "location": "File > Import > BrushSet",
-    "description": "imports all image files from a folder",
-    "warning": '', # used for warning icon and text in addons panel
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/BrushSet",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=25702&group_id=153&atid=467",
-    }
-
-print(" ")
-print("*------------------------------------------------------------------------------*")
-print("*                          initializing BrushSet import                        *")
-print("*------------------------------------------------------------------------------*")
-print(" ")
-
-#extension filter (alternative use mimetypes)
-ext_list = ['jpg',
-            'bmp',
-            'iris',
-            'png',
-            'jpeg',
-            'targa',
-            'tga'];
-
-def LoadBrushSet(filepath, filename):
-    for file in os.listdir(filepath):
-        path = (filepath + file)
-        #get folder name
-        (f1, f2) = os.path.split(filepath)
-        (f3, foldername) = os.path.split(f1)
-        
-        texturename = foldername         # file        "texture"    foldername
-        
-        #filter ext_list
-        if file.split('.')[-1].lower() in ext_list: 
-            #create new texture
-            texture = bpy.data.textures.new(texturename, 'IMAGE')    #watch it, string limit 21 ?!
-
-            #create new image
-            image = bpy.data.images.load(path)
-            image.source = "FILE"
-            image.filepath = path
-            bpy.data.textures[texture.name].image = image
-            
-            print("imported: " + file)
-    print("Brush Set imported!")  
-
-# ----------------------------------------------------------------------------#    
-
-class BrushSetImporter(bpy.types.Operator):
-    """Load Brush Set"""
-    bl_idname = "import_image.brushset"
-    bl_label = "Import BrushSet"
-
-    filename = StringProperty(name="File Name", description="filepath", default="", maxlen=1024, options={'ANIMATABLE'}, subtype='NONE')
-    filepath = StringProperty(name="File Name", description="filepath", default="", maxlen=1024, options={'ANIMATABLE'}, subtype='NONE')
-    
-    def execute(self, context):
-        LoadBrushSet(self.properties.filepath, self.properties.filename)
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        wm.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
-# ----------------------------------------------------------------------------#    
-
-def menu_func(self, context):
-    #clear the default name for import
-    default_name = "" 
-
-    self.layout.operator(BrushSetImporter.bl_idname, text="Brush Set").filename = default_name
-
-# ----------------------------------------------------------------------------#    
-
-def register():    
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_file_import.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_file_import.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
-
-print(" ")
-print("*------------------------------------------------------------------------------*")
-print(" ")
diff --git a/release/scripts/addons_contrib/io_import_LRO_Lola_MGS_Mola_img.py b/release/scripts/addons_contrib/io_import_LRO_Lola_MGS_Mola_img.py
deleted file mode 100644
index ec3c379..0000000
--- a/release/scripts/addons_contrib/io_import_LRO_Lola_MGS_Mola_img.py
+++ /dev/null
@@ -1,640 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "LRO Lola & MGS Mola img Importer",
-    "author": "Valter Battioli (ValterVB)",
-    "version": (1, 1, 8),
-    "blender": (2, 5, 8),
-    "location": "3D window > Tool Shelf",
-    "description": "Import DTM from LRO Lola and MGS Mola",
-    "warning": "May consume a lot of memory",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Import-Export/NASA_IMG_Importer",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=25462",
-    "category": "Import-Export"}
-
-
-#***********************************************************************
-#ver. 0.0.1: -First version
-#ver. 0.0.2: -Add check on path and file
-#            -Check on selected coordinates more complete
-#ver. 1.1.0: -Optimized for less memory
-#ver. 1.1.1: -Correct bug for real value of the High (bad error).
-#             now it's less artistic, bat more real Always possible use
-#             the old formula. check Magnify (x4)
-#            -Correct the bug for directory with dot in the name
-#            -Add some warning and more information
-#            -Add slider for the scale and info on it
-#ver. 1.1.2: -Word correction
-#            -Correct the problem for Unix (Upper lower case)
-#              If the Ext of the file selected from user is upper
-#              than the second file is Upper and Viceversa.
-#              (I can't verify because i have Win)
-#ver. 1.1.3: -Little fix for previous fix on upper/lower case
-#ver. 1.1.4: -Fix for recent API changes. Thanks to Filiciss.
-#            -Some code cleaning (PEP8)
-#ver. 1.1.5: -Fix for recent API changes. Thanks to Filiciss.
-#ver. 1.1.6: -Fix for API changes, and restore Scale factor
-#ver. 1.1.7: -Fix for API changes. Move some code out of draw
-#ver. 1.1.8: -Add a reset button
-#************************************************************************
-
-import bpy
-import os.path
-import math
-import array
-import mathutils
-from mathutils import *
-
-TO_RAD = math.pi / 180  # From degrees to radians
-
-# turning off relative path - it causes an error if it was true
-if bpy.context.user_preferences.filepaths.use_relative_paths == True:
-    bpy.context.user_preferences.filepaths.use_relative_paths = False
-
-
-# A very simple "bridge" tool.
-# Connects two equally long vertex rows with faces.
-# Returns a list of the new faces (list of  lists)
-#
-# vertIdx1 ... First vertex list (list of vertex indices).
-# vertIdx2 ... Second vertex list (list of vertex indices).
-# closed ... Creates a loop (first & last are closed).
-# flipped ... Invert the normal of the face(s).
-#
-# Note: You can set vertIdx1 to a single vertex index to create a fan/star
-#       of faces.
-# Note: If both vertex idx list are the same length they have to have at
-#       least 2 vertices.
-def createFaces(vertIdx1, vertIdx2, closed=False, flipped=False):
-    faces = []
-
-    if not vertIdx1 or not vertIdx2:
-        return None
-
-    if len(vertIdx1) < 2 and len(vertIdx2) < 2:
-        return None
-
-    fan = False
-    if (len(vertIdx1) != len(vertIdx2)):
-        if (len(vertIdx1) == 1 and len(vertIdx2) > 1):
-            fan = True
-        else:
-            return None
-
-    total = len(vertIdx2)
-
-    if closed:
-        # Bridge the start with the end.
-        if flipped:
-            face = [
-                vertIdx1[0],
-                vertIdx2[0],
-                vertIdx2[total - 1]]
-            if not fan:
-                face.append(vertIdx1[total - 1])
-            faces.append(face)
-
-        else:
-            face = [vertIdx2[0], vertIdx1[0]]
-            if not fan:
-                face.append(vertIdx1[total - 1])
-            face.append(vertIdx2[total - 1])
-            faces.append(face)
-
-    # Bridge the rest of the faces.
-    for num in range(total - 1):
-        if flipped:
-            if fan:
-                face = [vertIdx2[num], vertIdx1[0], vertIdx2[num + 1]]
-            else:
-                face = [vertIdx2[num], vertIdx1[num],
-                    vertIdx1[num + 1], vertIdx2[num + 1]]
-            faces.append(face)
-        else:
-            if fan:
-                face = [vertIdx1[0], vertIdx2[num], vertIdx2[num + 1]]
-            else:
-                face = [vertIdx1[num], vertIdx2[num],
-                    vertIdx2[num + 1], vertIdx1[num + 1]]
-            faces.append(face)
-    return faces
-
-
-#Utility Function ********************************************************
-#
-#Input: Latitude Output: Number of the line (1 to n)
-def LatToLine(Latitude):
-    tmpLines = round((MAXIMUM_LATITUDE - Latitude) * MAP_RESOLUTION + 1.0)
-    if tmpLines > LINES:
-        tmpLines = LINES
-    return tmpLines
-
-
-#Input: Number of the line (1 to n) Output: Latitude
-def LineToLat(Line):
-    if MAP_RESOLUTION == 0:
-        return 0
-    else:
-        return float(MAXIMUM_LATITUDE - (Line - 1) / MAP_RESOLUTION)
-
-
-#Input: Longitude Output: Number of the point (1 to n)
-def LongToPoint(Longitude):
-    tmpPoints = round((Longitude - WESTERNMOST_LONGITUDE) *
-                       MAP_RESOLUTION + 1.0)
-    if tmpPoints > LINE_SAMPLES:
-        tmpPoints = LINE_SAMPLES
-    return tmpPoints
-
-
-#Input: Number of the Point (1 to n) Output: Longitude
-def PointToLong(Point):
-    if MAP_RESOLUTION == 0:
-        return 0
-    else:
-        return float(WESTERNMOST_LONGITUDE + (Point - 1) / MAP_RESOLUTION)
-
-
-#Input: Latitude Output: Neareast real Latitude on grid
-def RealLat(Latitude):
-    return float(LineToLat(LatToLine(Latitude)))
-
-
-#Input: Longitude Output: Neareast real Longitude on grid
-def RealLong(Longitude):
-    return float(PointToLong(LongToPoint(Longitude)))
-#**************************************************************************
-
-
-def MakeMaterialMars(obj):
-    #Copied from io_convert_image_to_mesh_img
-    mat = bpy.data.materials.new("Mars")
-    mat.diffuse_shader = 'MINNAERT'
-    mat.diffuse_color = (0.426, 0.213, 0.136)
-    mat.darkness = 0.8
-
-    mat.specular_shader = 'WARDISO'
-    mat.specular_color = (1.000, 0.242, 0.010)
-    mat.specular_intensity = 0.010
-    mat.specular_slope = 0.100
-    obj.data.materials.append(mat)
-
-
-def MakeMaterialMoon(obj):
-    #Same as Mars Material, but i have canged the color
-    mat = bpy.data.materials.new("Moon")
-    mat.diffuse_shader = 'MINNAERT'
-    mat.diffuse_color = (0.426, 0.426, 0.426)
-    mat.darkness = 0.8
-
-    mat.specular_shader = 'WARDISO'
-    mat.specular_color = (0.6, 0.6, 0.6)
-    mat.specular_intensity = 0.010
-    mat.specular_slope = 0.100
-    obj.data.materials.append(mat)
-
-
-#Read the LBL file
-def ReadLabel(FileName):
-    global FileAndPath
-    global LINES, LINE_SAMPLES, SAMPLE_TYPE, SAMPLE_BITS, UNIT, MAP_RESOLUTION
-    global MAXIMUM_LATITUDE, MINIMUM_LATITUDE, WESTERNMOST_LONGITUDE
-    global EASTERNMOST_LONGITUDE, SCALING_FACTOR, OFFSET, RadiusUM, TARGET_NAME
-    global Message
-
-    if FileName == '':
-        return
-    LINES = LINE_SAMPLES = SAMPLE_BITS = MAP_RESOLUTION = 0
-    MAXIMUM_LATITUDE = MINIMUM_LATITUDE = 0.0
-    WESTERNMOST_LONGITUDE = EASTERNMOST_LONGITUDE = 0.0
-    OFFSET = SCALING_FACTOR = 0.0
-    SAMPLE_TYPE = UNIT = TARGET_NAME = RadiusUM = Message = ""
-
-    FileAndPath = FileName
-    FileAndExt = os.path.splitext(FileAndPath)
-    try:
-        #Check for UNIX that is case sensitive
-        #If the Ext of the file selected from user is Upper, than the second
-        #file is Upper and Viceversa
-        if FileAndExt[1].isupper():
-            f = open(FileAndExt[0] + ".LBL", 'r')  # Open the label file
-        else:
-            f = open(FileAndExt[0] + ".lbl", 'r')  # Open the label file
-        Message = ""
-    except:
-        Message = "FILE LBL NOT AVAILABLE OR YOU HAVEN'T SELECTED A FILE"
-        return
-
-    block = ""
-    OFFSET = 0
-    for line in f:
-        tmp = line.split("=")
-        if tmp[0].strip() == "OBJECT" and tmp[1].strip() == "IMAGE":
-            block = "IMAGE"
-        elif tmp[0].strip() == "OBJECT" and tmp[1].strip() == "IMAGE_MAP_PROJECTION":
-            block = "IMAGE_MAP_PROJECTION"
-        elif tmp[0].strip() == "END_OBJECT" and tmp[1].strip() == "IMAGE":
-            block = ""
-        elif tmp[0].strip() == "END_OBJECT" and tmp[1].strip() == "IMAGE_MAP_PROJECTION":
-            block = ""
-        elif tmp[0].strip() == "TARGET_NAME":
-            block = ""
-            TARGET_NAME = tmp[1].strip()
-        if block == "IMAGE":
-            if line.find("LINES") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                LINES = int(tmp[1].strip())
-            elif line.find("LINE_SAMPLES") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                LINE_SAMPLES = int(tmp[1].strip())
-            elif line.find("UNIT") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                UNIT = tmp[1].strip()
-            elif line.find("SAMPLE_TYPE") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                SAMPLE_TYPE = tmp[1].strip()
-            elif line.find("SAMPLE_BITS") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                SAMPLE_BITS = int(tmp[1].strip())
-            elif line.find("SCALING_FACTOR") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                SCALING_FACTOR = float(tmp[0].replace(" ", ""))
-            elif line.find("OFFSET") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                if tmp[0].find("OFFSET") != -1 and len(tmp) > 1:
-                    tmp = tmp[1].split("<")
-                    tmp[0] = tmp[0].replace(".", "")
-                    OFFSET = float(tmp[0].replace(" ", ""))
-        elif block == "IMAGE_MAP_PROJECTION":
-            if line.find("A_AXIS_RADIUS") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                A_AXIS_RADIUS = float(tmp[0].replace(" ", ""))
-                RadiusUM = tmp[1].rstrip().replace(">", "")
-            elif line.find("B_AXIS_RADIUS") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                B_AXIS_RADIUS = float(tmp[0].replace(" ", ""))
-            elif line.find("C_AXIS_RADIUS") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                C_AXIS_RADIUS = float(tmp[0].replace(" ", ""))
-            elif line.find("MAXIMUM_LATITUDE") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                MAXIMUM_LATITUDE = float(tmp[0].replace(" ", ""))
-            elif line.find("MINIMUM_LATITUDE") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                MINIMUM_LATITUDE = float(tmp[0].replace(" ", ""))
-            elif line.find("WESTERNMOST_LONGITUDE") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                WESTERNMOST_LONGITUDE = float(tmp[0].replace(" ", ""))
-            elif line.find("EASTERNMOST_LONGITUDE") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                EASTERNMOST_LONGITUDE = float(tmp[0].replace(" ", ""))
-            elif line.find("MAP_RESOLUTION") != -1 and not(line.startswith("/*")):
-                tmp = line.split("=")
-                tmp = tmp[1].split("<")
-                MAP_RESOLUTION = float(tmp[0].replace(" ", ""))
-    f.close
-    MAXIMUM_LATITUDE = MAXIMUM_LATITUDE - 1 / MAP_RESOLUTION / 2
-    MINIMUM_LATITUDE = MINIMUM_LATITUDE + 1 / MAP_RESOLUTION / 2
-    WESTERNMOST_LONGITUDE = WESTERNMOST_LONGITUDE + 1 / MAP_RESOLUTION / 2
-    EASTERNMOST_LONGITUDE = EASTERNMOST_LONGITUDE - 1 / MAP_RESOLUTION / 2
-    if OFFSET == 0:  # When OFFSET isn't available I use the medium of the radius
-        OFFSET = (A_AXIS_RADIUS + B_AXIS_RADIUS + C_AXIS_RADIUS) / 3
-    else:
-        OFFSET = OFFSET / 1000  # Convert m to Km
-    if SCALING_FACTOR == 0:
-        SCALING_FACTOR = 1.0  # When isn'tavailable I set it to 1
-
-
-def update_fpath(self, context):
-    global start_up
-    start_up=False
-    ReadLabel(bpy.context.scene.fpath)
-    if Message != "":
-        start_up=True
-    else:
-        typ = bpy.types.Scene
-        var = bpy.props
-        typ.FromLat = var.FloatProperty(description="From Latitude", min=float(MINIMUM_LATITUDE), max=float(MAXIMUM_LATITUDE), precision=3, default=0.0)
-        typ.ToLat = var.FloatProperty(description="To Latitude", min=float(MINIMUM_LATITUDE), max=float(MAXIMUM_LATITUDE), precision=3)
-        typ.FromLong = var.FloatProperty(description="From Longitude", min=float(WESTERNMOST_LONGITUDE), max=float(EASTERNMOST_LONGITUDE), precision=3)
-        typ.ToLong = var.FloatProperty(description="To Longitude", min=float(WESTERNMOST_LONGITUDE), max=float(EASTERNMOST_LONGITUDE), precision=3)
-        typ.Scale = var.IntProperty(description="Scale", min=1, max=100, default=1)
-        typ.Magnify = var.BoolProperty(description="Magnify", default=False)
-
-
-#Import the data and draw the planet
-class Import(bpy.types.Operator):
-    bl_idname = 'import.lro_and_mgs'
-    bl_label = 'Start Import'
-    bl_description = 'Import the data'
-
-    def execute(self, context):
-        From_Lat = RealLat(bpy.context.scene.FromLat)
-        To_Lat = RealLat(bpy.context.scene.ToLat)
-        From_Long = RealLong(bpy.context.scene.FromLong)
-        To_Long = RealLong(bpy.context.scene.ToLong)
-        BlenderScale = bpy.context.scene.Scale
-        Exag = bpy.context.scene.Magnify
-        Vertex = []  # Vertex array
-        Faces = []  # Faces arrays
-        FirstRow = []
-        SecondRow = []
-        print('*** Start create vertex ***')
-        FileAndPath = bpy.context.scene.fpath
-        FileAndExt = os.path.splitext(FileAndPath)
-        #Check for UNIX that is case sensitive
-        #If the Ext of the file selected from user is Upper, than the second file is Upper and Viceversa
-        if FileAndExt[1].isupper():
-            FileName = FileAndExt[0] + ".IMG"
-        else:
-            FileName = FileAndExt[0] + ".img"
-        f = open(FileName, 'rb')
-        f.seek(int((int(LatToLine(From_Lat)) - 1) * (LINE_SAMPLES * (SAMPLE_BITS / 8))), 1)  # Skip the first n line of point
-        SkipFirstPoint = int((LongToPoint(From_Long) - 1) * (SAMPLE_BITS / 8))  # Nunmber of points to skip
-        PointsToRead = (LongToPoint(To_Long) - LongToPoint(From_Long) + 1) * (int(SAMPLE_BITS) / 8)  # Number of points to be read
-        SkipLastPoint = (LINE_SAMPLES * (SAMPLE_BITS / 8)) - PointsToRead - SkipFirstPoint  # Nunmber of points to skip
-        LatToRead = From_Lat
-        while (LatToRead >= To_Lat):
-            f.seek(SkipFirstPoint, 1)  # Skip the first n point
-            Altitudes = f.read(int(PointsToRead))  # Read all the point
-            Altitudes = array.array("h", Altitudes)  # Change to Array of signed short
-            if SAMPLE_TYPE == "MSB_INTEGER":
-                Altitudes.byteswap()  # Change from MSB (big endian) to LSB (little endian)
-            LongToRead = From_Long
-            PointToRead = 0
-            while (LongToRead <= To_Long):
-                if Exag:
-                    tmpRadius = (Altitudes[PointToRead] / SCALING_FACTOR / 1000 + OFFSET) / BlenderScale  # Old formula (High*4)
-                else:
-                    tmpRadius = ((Altitudes[PointToRead] * SCALING_FACTOR) / 1000 + OFFSET) / BlenderScale  # Correct scale
-                CurrentRadius = tmpRadius * (math.cos(LatToRead * TO_RAD))
-                X = CurrentRadius * (math.sin(LongToRead * TO_RAD))
-                Y = tmpRadius * math.sin(LatToRead * TO_RAD)
-                Z = CurrentRadius * math.cos(LongToRead * TO_RAD)
-                Vertex.append(Vector((float(X), float(Y), float(Z))))
-                LongToRead += (1 / MAP_RESOLUTION)
-                PointToRead += 1
-            f.seek(int(SkipLastPoint), 1)
-            LatToRead -= (1 / MAP_RESOLUTION)
-        f.close
-        del Altitudes
-        print('*** End create Vertex   ***')
-
-        print('*** Start create faces ***')
-        LinesToRead = int(LatToLine(To_Lat) - LatToLine(From_Lat) + 1)   # Number of the lines to read
-        PointsToRead = int(LongToPoint(To_Long) - LongToPoint(From_Long) + 1)  # Number of the points to read
-        for Point in range(0, PointsToRead):
-            FirstRow.append(Point)
-            SecondRow.append(Point + PointsToRead)
-        if int(PointsToRead) == LINE_SAMPLES:
-            FaceTemp = createFaces(FirstRow, SecondRow, closed=True, flipped=True)
-        else:
-            FaceTemp = createFaces(FirstRow, SecondRow, closed=False, flipped=True)
-        Faces.extend(FaceTemp)
-
-        FaceTemp = []
-        for Line in range(1, (LinesToRead - 1)):
-            FirstRow = SecondRow
-            SecondRow = []
-            FacesTemp = []
-            for Point in range(0, PointsToRead):
-                SecondRow.append(Point + (Line + 1) * PointsToRead)
-            if int(PointsToRead) == LINE_SAMPLES:
-                FaceTemp = createFaces(FirstRow, SecondRow, closed=True, flipped=True)
-            else:
-                FaceTemp = createFaces(FirstRow, SecondRow, closed=False, flipped=True)
-            Faces.extend(FaceTemp)
-        del FaceTemp
-        print('*** End create faces   ***')
-
-        print ('*** Start draw ***')
-        mesh = bpy.data.meshes.new(TARGET_NAME)
-        mesh.from_pydata(Vertex, [], Faces)
-        del Faces
-        del Vertex
-        mesh.update()
-        ob_new = bpy.data.objects.new(TARGET_NAME, mesh)
-        ob_new.data = mesh
-        scene = bpy.context.scene
-        scene.objects.link(ob_new)
-        scene.objects.active = ob_new
-        ob_new.select = True
-        print ('*** End draw   ***')
-        print('*** Start Smooth ***')
-        bpy.ops.object.shade_smooth()
-        print('*** End Smooth   ***')
-        if TARGET_NAME == "MOON":
-            MakeMaterialMoon(ob_new)
-        elif TARGET_NAME == "MARS":
-            MakeMaterialMars(ob_new)
-        print('*** FINISHED ***')
-        return {'FINISHED'}
-
-
-# User inteface
-class Img_Importer(bpy.types.Panel):
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOL_PROPS"
-    bl_label = "LRO Lola & MGS Mola IMG Importer"
-    
-    def __init__(self):
-        typ = bpy.types.Scene
-        var = bpy.props
-
-    def draw(self, context):
-        layout = self.layout
-        if start_up:
-            layout.prop(context.scene, "fpath")
-            col = layout.column()
-            split = col.split(align=True)
-            if Message != "":
-                split.label("Message: " + Message)
-        else:
-            col = layout.column()
-            split = col.split(align=True)
-            split.label("Minimum Latitude: " + str(MINIMUM_LATITUDE) + " deg")
-            split.label("Maximum Latitude: " + str(MAXIMUM_LATITUDE) + " deg")
-
-            split = col.split(align=True)
-            split.label("Westernmost Longitude: " + str(WESTERNMOST_LONGITUDE) + " deg")
-            split.label("Easternmost Longitude: " + str(EASTERNMOST_LONGITUDE) + " deg")
-
-            split = col.split(align=True)
-            split.label("Lines: " + str(LINES))
-            split.label("Line samples: " + str(LINE_SAMPLES))
-
-            split = col.split(align=True)
-            split.label("Sample type: " + str(SAMPLE_TYPE))
-            split.label("Sample bits: " + str(SAMPLE_BITS))
-
-            split = col.split(align=True)
-            split.label("Unit: " + UNIT)
-            split.label("Map resolution: " + str(MAP_RESOLUTION) + " pix/deg")
-
-            split = col.split(align=True)
-            split.label("Radius: " + str(OFFSET) + " " + RadiusUM)
-            split.label("Scale: " + str(SCALING_FACTOR))
-
-            split = col.split(align=True)
-            split.label("Target: ")
-            split.label(TARGET_NAME)
-
-            col = layout.column()
-            split = col.split(align=True)
-            split.prop(context.scene, "FromLat", "Northernmost Lat.")
-            split.prop(context.scene, "ToLat", "Southernmost Lat.")
-            if bpy.context.scene.FromLat < bpy.context.scene.ToLat:
-                col = layout.column()
-                split = col.split(align=True)
-                split.label("Warning: Northernmost must be greater than Southernmost")
-
-            col = layout.column()
-            split = col.split(align=True)
-            split.prop(context.scene, "FromLong", "Westernmost Long.")
-            split.prop(context.scene, "ToLong", "Easternmost Long.")
-            if bpy.context.scene.FromLong > bpy.context.scene.ToLong:
-                col = layout.column()
-                split = col.split(align=True)
-                split.label("Warning: Easternmost must be greater than Westernmost")
-
-            col = layout.column()
-            split = col.split(align=True)
-            split.prop(context.scene, "Scale", "Scale")
-            split.prop(context.scene, "Magnify", "Magnify (x4)")
-            if bpy.context.scene.fpath != "":
-                col = layout.column()
-                split = col.split(align=True)
-                split.label("1 Blender unit = " + str(bpy.context.scene.Scale) + RadiusUM)
-
-            if Message != "":
-                col = layout.column()
-                split = col.split(align=True)
-                split.label("Message: " + Message)
-
-            if bpy.context.scene.fpath.upper().endswith(("IMG", "LBL")):  # Check if is selected the correct file
-                VertNumbers = (((RealLat(bpy.context.scene.FromLat) - RealLat(bpy.context.scene.ToLat)) * MAP_RESOLUTION) + 1) * ((RealLong(bpy.context.scene.ToLong) - RealLong(bpy.context.scene.FromLong)) * MAP_RESOLUTION + 1)
-            else:
-                VertNumbers = 0
-            #If I have 4 or plus vertex and at least 2 row and at least 2 point, I can import
-            if VertNumbers > 3 and (RealLat(bpy.context.scene.FromLat) > RealLat(bpy.context.scene.ToLat)) and (RealLong(bpy.context.scene.FromLong) < RealLong(bpy.context.scene.ToLong)):  # If I have 4 or plus vertex I can import
-                split = col.split(align=True)
-                split.label("Map resolution on the equator: ")
-                split.label(str(2 * math.pi * OFFSET / 360 / MAP_RESOLUTION) + " " + RadiusUM + "/pix")
-                col = layout.column()
-                split = col.split(align=True)
-                split.label("Real Northernmost Lat.: " + str(RealLat(bpy.context.scene.FromLat)) + " deg")
-                split.label("Real Southernmost Long.: " + str(RealLat(bpy.context.scene.ToLat)) + " deg")
-                split = col.split(align=True)
-                split.label("Real Westernmost Long.: " + str(RealLong(bpy.context.scene.FromLong)) + " deg")
-                split.label("Real Easternmost Long.: " + str(RealLong(bpy.context.scene.ToLong)) + "deg")
-                split = col.split(align=True)
-                split.label("Numbers of vertex to be imported: " + str(int(VertNumbers)))
-                col.separator()
-                col.operator('import.lro_and_mgs', text='Import')
-                col.separator()
-                col.operator('import.reset', text='Reset')
-
-
-#Reset the UI
-class Reset(bpy.types.Operator):
-    bl_idname = 'import.reset'
-    bl_label = 'Start Import'
-
-    def execute(self, context):
-        clear_properties()
-        return {'FINISHED'}
-
-
-def initialize():
-    global MAXIMUM_LATITUDE, MINIMUM_LATITUDE
-    global WESTERNMOST_LONGITUDE, EASTERNMOST_LONGITUDE
-    global LINES, LINE_SAMPLES, SAMPLE_BITS, MAP_RESOLUTION
-    global OFFSET, SCALING_FACTOR
-    global SAMPLE_TYPE, UNIT, TARGET_NAME, RadiusUM, Message
-    global start_up
-
-    LINES = LINE_SAMPLES = SAMPLE_BITS = MAP_RESOLUTION = 0
-    MAXIMUM_LATITUDE = MINIMUM_LATITUDE = 0.0
-    WESTERNMOST_LONGITUDE = EASTERNMOST_LONGITUDE = 0.0
-    OFFSET = SCALING_FACTOR = 0.0
-    SAMPLE_TYPE = UNIT = TARGET_NAME = RadiusUM = Message = ""
-    start_up=True
-            
-    bpy.types.Scene.fpath = bpy.props.StringProperty(
-        name="Import File ", 
-        description="Select your img file", 
-        subtype="FILE_PATH", 
-        default="", 
-        update=update_fpath)
-
-def clear_properties():
-    # can happen on reload
-    if bpy.context.scene is None:
-        return
-    global MAXIMUM_LATITUDE, MINIMUM_LATITUDE
-    global WESTERNMOST_LONGITUDE, EASTERNMOST_LONGITUDE
-    global LINES, LINE_SAMPLES, SAMPLE_BITS, MAP_RESOLUTION
-    global OFFSET, SCALING_FACTOR
-    global SAMPLE_TYPE, UNIT, TARGET_NAME, RadiusUM, Message
-    global start_up
-
-    LINES = LINE_SAMPLES = SAMPLE_BITS = MAP_RESOLUTION = 0
-    MAXIMUM_LATITUDE = MINIMUM_LATITUDE = 0.0
-    WESTERNMOST_LONGITUDE = EASTERNMOST_LONGITUDE = 0.0
-    OFFSET = SCALING_FACTOR = 0.0
-    SAMPLE_TYPE = UNIT = TARGET_NAME = RadiusUM = Message = ""
-    start_up=True
-
-    props = ["FromLat", "ToLat", "FromLong", "ToLong", "Scale", "Magnify", "fpath"]
-    for p in props:
-        if p in bpy.types.Scene.bl_rna.properties:
-            exec("del bpy.types.Scene." + p)
-        if p in bpy.context.scene:
-            del bpy.context.scene[p]
-    bpy.types.Scene.fpath = bpy.props.StringProperty(
-        name="Import File ", 
-        description="Select your img file", 
-        subtype="FILE_PATH", 
-        default="", 
-        update=update_fpath)
-
-
-# registering the script
-def register():
-    initialize()
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    clear_properties()
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_import_fbx.py b/release/scripts/addons_contrib/io_import_fbx.py
deleted file mode 100644
index c147939..0000000
--- a/release/scripts/addons_contrib/io_import_fbx.py
+++ /dev/null
@@ -1,510 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Import: Autodesk FBX",
-    "author": "Campbell Barton",
-    "version": (0, 0, 1),
-    "blender": (2, 5, 6),
-    "location": "File > Import ",
-    "description": "This script is WIP and not intended for general use yet!",
-    "warning": "Work in progress",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Import-Export"}
-
-
-def parse_fbx(path, fbx_data):
-    DEBUG = False
-
-    f = open(path, "rU", encoding="utf-8")
-    lines = f.readlines()
-
-    # remove comments and \n
-    lines = [l[:-1].rstrip() for l in lines if not l.lstrip().startswith(";")]
-
-    # remove whitespace
-    lines = [l for l in lines if l]
-
-    # remove multiline float lists
-    def unmultiline(i):
-        lines[i - 1] = lines[i - 1] + lines.pop(i).lstrip()
-
-    # Multiline floats, used for verts and matricies, this is harderto read so detect and make into 1 line.
-    i = 0
-    while i < len(lines):
-        l = lines[i].strip()
-        if l.startswith(","):
-            unmultiline(i)
-            i -= 1
-        try:
-            float(l.split(",", 1)[0])
-            unmultiline(i)
-            i -= 1
-        except:
-            pass
-
-        i += 1
-
-    CONTAINER = [None]
-
-    def is_int(val):
-        try:
-            CONTAINER[0] = int(val)
-            return True
-        except:
-            return False
-
-    def is_int_array(val):
-        try:
-            CONTAINER[0] = tuple([int(v) for v in val.split(",")])
-            return True
-        except:
-            return False
-
-    def is_float(val):
-        try:
-            CONTAINER[0] = float(val)
-            return True
-        except:
-            return False
-
-    def is_float_array(val):
-        try:
-            CONTAINER[0] = tuple([float(v) for v in val.split(",")])
-            return True
-        except:
-            return False
-
-    def read_fbx(i, ls):
-        if DEBUG:
-            print("LINE:", lines[i])
-
-        tag, val = lines[i].split(":", 1)
-        tag = tag.lstrip()
-        val = val.strip()
-
-        if val == "":
-            ls.append((tag, None, None))
-        if val.endswith("{"):
-            name = val[:-1].strip()  # remove the trailing {
-            if name == "":
-                name = None
-
-            sub_ls = []
-            ls.append((tag, name, sub_ls))
-
-            i += 1
-            while lines[i].strip() != "}":
-                i = read_fbx(i, sub_ls)
-
-        elif val.startswith('"') and val.endswith('"'):
-            ls.append((tag, None, val[1:-1]))  # remove quotes
-        elif is_int(val):
-            ls.append((tag, None, CONTAINER[0]))
-        elif is_float(val):
-            ls.append((tag, None, CONTAINER[0]))
-        elif is_int_array(val):
-            ls.append((tag, None, CONTAINER[0]))
-        elif is_float_array(val):
-            ls.append((tag, None, CONTAINER[0]))
-        elif tag == 'Property':
-            ptag, ptype, punknown, pval = val.split(",", 3)
-            ptag = ptag.strip().strip("\"")
-            ptype = ptype.strip().strip("\"")
-            punknown = punknown.strip().strip("\"")
-            pval = pval.strip()
-
-            if val.startswith('"') and val.endswith('"'):
-                pval = pval[1:-1]
-            elif is_int(pval):
-                pval = CONTAINER[0]
-            elif is_float(pval):
-                pval = CONTAINER[0]
-            elif is_int_array(pval):
-                pval = CONTAINER[0]
-            elif is_float_array(pval):
-                pval = CONTAINER[0]
-
-            ls.append((tag, None, (ptag, ptype, punknown, pval)))
-        else:
-            # IGNORING ('Property', None, '"Lcl Scaling", "Lcl Scaling", "A+",1.000000000000000,1.000000000000000,1.000000000000000')
-            print("\tParser Skipping:", (tag, None, val))
-
-        # name = .lstrip()[0]
-        if DEBUG:
-            print("TAG:", tag)
-            print("VAL:", val)
-        return i + 1
-
-    i = 0
-    while i < len(lines):
-        i = read_fbx(i, fbx_data)
-
-
-def parse_connections(fbx_data):
-    c = {}
-    for tag, name, value in fbx_data:
-        type, child, parent = [i.strip() for i in value.replace('"', '').split(',')]
-        if type == "OO":
-            parent = parent.replace('Model::', '').replace('Material::', '')
-            child = child.replace('Model::', '').replace('Material::', '')
-
-            c[child] = parent
-
-    return c
-
-# Blender code starts here:
-import bpy
-
-
-def import_fbx(path):
-    import math
-    import mathutils
-
-    mtx_x90 = mathutils.Matrix.Rotation(math.pi / 2.0, 3, 'X')
-
-    fbx_data = []
-    objects = {}
-    materials = {}
-    parse_fbx(path, fbx_data)
-    # Now lets get in the mesh data for fun.
-
-    def tag_get_iter(data, tag):
-        for tag_iter, name, value in data:
-            if tag_iter == tag:
-                yield (name, value)
-
-    def tag_get_single(data, tag):
-        for tag_iter, name, value in data:
-            if tag_iter == tag:
-                return (name, value)
-        return (None, None)
-
-    def tag_get_prop(data, prop):
-        for tag_iter, name, value in data:
-            if tag_iter == "Property":
-                if value[0] == prop:
-                    return value[3]
-        return None
-
-    scene = bpy.context.scene
-
-    connections = parse_connections(tag_get_single(fbx_data, "Connections")[1])
-
-    for tag1, name1, value1 in fbx_data:
-        if tag1 == "Objects":
-            for tag2, name2, value2 in value1:
-                if tag2 == "Model":
-                    '''
-                    print("")
-                    print(tag2)
-                    print(name2)
-                    print(value2)
-                    '''
-
-                    # check we import an object
-                    obj = None
-
-                    # "Model::MyCamera", "Camera"  -->  MyCamera
-                    fbx_name = name2.split(',')[0].strip()[1:-1].split("::", 1)[-1]
-                    # we dont parse this part properly
-                    # the name2 can be somtrhing like
-                    # Model "Model::kimiko", "Mesh"
-                    if name2.endswith(" \"Mesh\""):
-
-                        verts = tag_get_single(value2, "Vertices")[1]
-                        faces = tag_get_single(value2, "PolygonVertexIndex")[1]
-                        edges = tag_get_single(value2, "Edges")[1]
-
-                        # convert odd fbx verts and faces to a blender mesh.
-                        if verts and faces:
-                            me = bpy.data.meshes.new(name=fbx_name)
-                            # get a list of floats as triples
-                            blen_verts = [verts[i - 3:i] for i in range(3, len(verts) + 3, 3)]
-
-                            # get weirdo face indices and proper edge indexs
-                            # edge_points Collects faces index, first and last verts.
-
-                            face = []
-                            edge_points = {}
-                            blen_faces = [face]
-                            blen_faces_edges = []  # faces that have a length of 2
-                            blen_poly_mapping = {}
-                            poly_idx = 0
-
-                            for idx, f in enumerate(faces):
-
-                                if f < 0:
-                                    face.append(f ^ -1)
-                                    edge_points[idx] = [face[-1], face[0]]
-                                    face = []
-
-                                    if len(blen_faces[-1]) == 2:
-                                        blen_faces_edges.append(blen_faces.pop())
-                                    else:
-                                        blen_poly_mapping[poly_idx] = len(blen_faces) - 1
-
-                                    blen_faces.append(face)
-                                    poly_idx += 1
-                                else:
-                                    face.append(f)
-
-                            edge_final = []
-
-                            if len(faces) == 2:  # Special case if there is only one edge in scene.
-                                edge1 = faces[0]
-                                if edge1 < 0:
-                                    edge1 ^= -1
-                                edge2 = faces[1]
-                                if edge2 < 0:
-                                    edge2 ^= -1
-                                edge_final.append((edge1, edge2))
-
-                            else:  # More than one edges
-                                for idx, e in enumerate(edges):
-
-                                    if faces[e] < 0:  # If this is the faces last point, use edge_points to create edge between last and first points of face
-                                        edge1 = edge_points[e][0]
-                                        edge2 = edge_points[e][1]
-                                    else:
-                                        edge1 = faces[e]
-                                        edge2 = faces[e + 1]
-                                        if edge2 < 0:
-                                            edge2 ^= -1
-
-                                    edge_final.append((edge1, edge2))
-
-                            if not blen_faces[-1]:
-                                del blen_faces[-1]
-
-                            me.from_pydata(blen_verts, edge_final, blen_faces)
-                            me.update()
-
-                            # Handle smoothing
-                            for i in tag_get_iter(value2, "LayerElementSmoothing"):
-                                i = i[1]
-                                type = tag_get_single(i, "MappingInformationType")[1]
-
-                                if type == "ByPolygon":
-                                    smooth_faces = tag_get_single(i, "Smoothing")[1]
-
-                                    for idx, val in enumerate(smooth_faces):
-                                        new_idx = blen_poly_mapping.get(idx)
-                                        if new_idx is not None:
-                                            me.faces[new_idx].use_smooth = val
-                                elif type == "ByEdge":
-                                    smooth_edges = tag_get_single(i, "Smoothing")[1]
-
-                                    for idx, ed in enumerate(me.edges):
-                                        ed.use_edge_sharp = smooth_edges[idx]
-                                else:
-                                    print("WARNING: %s, unsupported smoothing type: %s" % (fbx_name, type))
-
-                            # Handle edge weighting
-                            for i in tag_get_iter(value2, "LayerElementEdgeCrease"):
-                                i = i[1]
-                                type = tag_get_single(i, "MappingInformationType")[1]
-
-                                if type == "ByPolygon":
-                                    crease_faces = tag_get_single(i, "Smoothing")[1]
-
-                                    for idx, f in enumerate(me.faces):
-                                        poly_idx = blen_poly_mapping.get(idx)
-                                        if poly_idx is not None:
-                                            f.use_smooth = crease_faces[idx]
-                                elif type == "ByEdge":
-                                    crease_edges = tag_get_single(i, "EdgeCrease")[1]
-
-                                    for idx, ed in enumerate(me.edges):
-                                        ed.crease = crease_edges[idx]
-                                else:
-                                    print("WARNING: %s, unsupported smoothing type: %s" % (fbx_name, type))
-
-                            # Create the Uv-sets
-                            for i in tag_get_iter(value2, "LayerElementUV"):
-                                i = i[1]
-                                uv_in = 0
-                                uv_face = []
-                                uv_name = tag_get_single(i, "Name")[1]
-                                print(uv_name)
-                                uv_verts = tag_get_single(i, "UV")[1]
-                                uv_index = tag_get_single(i, "UVIndex")[1]
-
-                                if(uv_verts):
-                                    blen_uv_verts = [uv_verts[i - 2:i] for i in range(2, len(uv_verts) + 2, 2)]
-
-                                    for ind, uv_i in enumerate(uv_index):
-                                        if(uv_i == -1):
-                                            uv_face.append([-0.1, -0.1])
-                                        else:
-                                            uv_face.append(blen_uv_verts[uv_i])
-                                            uv_in += 1
-
-                                    me.uv_textures.new(uv_name)
-                                    uv_layer = me.uv_textures[-1].data
-                                    uv_counter = 0
-                                    if uv_layer:
-                                        for fi, uv in enumerate(uv_layer):
-                                            if(len(me.faces[fi].vertices) == 4):
-                                                uv.uv1 = uv_face[uv_counter]
-                                                uv.uv2 = uv_face[uv_counter + 1]
-                                                uv.uv3 = uv_face[uv_counter + 2]
-                                                uv.uv4 = uv_face[uv_counter + 3]
-                                                uv_counter += 4
-                                            else:
-                                                uv.uv1 = uv_face[uv_counter]
-                                                uv.uv2 = uv_face[uv_counter + 1]
-                                                uv.uv3 = uv_face[uv_counter + 2]
-                                                uv_counter += 3
-
-                            obj = bpy.data.objects.new(fbx_name, me)
-                            base = scene.objects.link(obj)
-
-                    elif name2.endswith(" \"Camera\""):
-
-                        camera = bpy.data.cameras.new(name=fbx_name)
-
-                        props = tag_get_single(value2, "Properties60")[1]
-                        camera.angle = math.radians(tag_get_prop(props, "FieldOfView"))
-
-                        obj = bpy.data.objects.new(fbx_name, camera)
-                        base = scene.objects.link(obj)
-
-                    elif name2.endswith(" \"Light\""):
-
-                        light = bpy.data.lamps.new(name=fbx_name)
-
-                        props = tag_get_single(value2, "Properties60")[1]
-
-                        # Lamp types
-                        light_types = {0: 'POINT', 1: 'SUN', 2: 'SPOT'}
-
-                        light.type = light_types[tag_get_prop(props, "LightType")]
-                        light.energy = max(tag_get_prop(props, "Intensity") / 100.0, 0)
-                        light.color = tag_get_prop(props, "Color")
-                        light.distance = tag_get_prop(props, "DecayStart")
-
-                        if light.type == 'SPOT':
-                            light.spot_size = math.rad(tag_get_prop(props, "Cone angle"))
-
-                        # Todo: shadows
-
-                        obj = bpy.data.objects.new(fbx_name, light)
-                        base = scene.objects.link(obj)
-
-                    if obj:
-                        # Update our object dict
-                        objects[fbx_name] = obj
-
-                        # Take care of parenting (we assume the parent has already been processed)
-                        parent = connections.get(fbx_name)
-                        if parent and parent != "Scene" and not parent.startswith("DisplayLayer"):
-                            obj.parent = objects[parent]
-                            parent = obj.parent
-                        else:
-                            parent = None
-
-                        # apply transformation
-                        props = tag_get_single(value2, "Properties60")[1]
-
-                        loc = tag_get_prop(props, "Lcl Translation")
-                        rot = tag_get_prop(props, "Lcl Rotation")
-                        sca = tag_get_prop(props, "Lcl Scaling")
-
-                        # Convert rotation
-                        rot_mat = mathutils.Euler([math.radians(i) for i in rot]).to_matrix()
-                        if parent:
-                            rot_mat = parent.matrix_world.to_3x3().inverted() * rot_mat
-
-                        obj.location = loc
-                        obj.rotation_euler = rot_mat.to_euler()[:]
-                        obj.scale = sca
-
-                elif tag2 == "Material":
-
-                    # "Material::MyMaterial", ""  -->  MyMaterial
-                    fbx_name = name2.split(',')[0].strip()[1:-1].split("::", 1)[-1]
-
-                    mat = bpy.data.materials.new(name=fbx_name)
-
-                    props = tag_get_single(value2, "Properties60")[1]
-
-                    # We always use Lambert diffuse shader for now
-                    mat.diffuse_shader = 'LAMBERT'
-
-                    mat.diffuse_color = tag_get_prop(props, "DiffuseColor")
-                    mat.diffuse_intensity = tag_get_prop(props, "DiffuseFactor")
-                    mat.alpha = 1 - tag_get_prop(props, "TransparencyFactor")
-                    mat.specular_color = tag_get_prop(props, "SpecularColor")
-                    mat.specular_intensity = tag_get_prop(props, "SpecularFactor") * 2.0
-                    mat.specular_hardness = (tag_get_prop(props, "Shininess") * 5.10) + 1
-                    mat.ambient = tag_get_prop(props, "AmbientFactor")
-
-                    # Update material dict
-                    materials[fbx_name] = mat
-
-                    # Map to an object (we assume models are done before materials)
-                    obj = connections.get(fbx_name)
-                    if obj:
-                        obj = objects[obj]
-                        obj.data.materials.append(mat)
-
-    return {'FINISHED'}
-
-
-# Operator
-from bpy.props import StringProperty
-from bpy_extras.io_utils import ImportHelper
-
-
-class ImportFBX(bpy.types.Operator, ImportHelper):
-    """"""
-    bl_idname = "import_scene.fbx"
-    bl_label = "Import FBX"
-
-    filename_ext = ".fbx"
-    filter_glob = StringProperty(default="*.fbx", options={'HIDDEN'})
-
-    def execute(self, context):
-        return import_fbx(self.filepath)
-
-
-# Registering / Unregister
-def menu_func(self, context):
-    self.layout.operator(ImportFBX.bl_idname, icon='PLUGIN')
-
-
-def register():
-    bpy.utils.register_class(ImportFBX)
-    bpy.types.INFO_MT_file_import.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_class(ImportFBX)
-    bpy.types.INFO_MT_file_import.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
-
-
-if __name__ == "__main__":
-    import_fbx("/test.fbx")
diff --git a/release/scripts/addons_contrib/io_import_lipSync_Importer.py b/release/scripts/addons_contrib/io_import_lipSync_Importer.py
deleted file mode 100644
index 88057dc..0000000
--- a/release/scripts/addons_contrib/io_import_lipSync_Importer.py
+++ /dev/null
@@ -1,483 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "LipSync Importer & Blinker",
-    "author": "Yousef Harfoush - bat3a ;)",
-    "version": (0, 5, 0),
-    "blender": (2, 6, 2),
-    "location": "3D window > Tool Shelf",
-    "description": "Plot Moho (Papagayo, Jlipsync, Yolo) file to frames and adds automatic blinking",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php?title=Extensions:2.6/Py/Scripts/Import-Export/Lipsync Importer",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=24080&group_id=153&atid=468",
-    "category": "Import-Export"}
-
-
-import bpy, re
-from random import random
-from bpy.props import *
-from bpy.props import IntProperty, FloatProperty, StringProperty
-
-global lastPhoneme
-lastPhoneme="nothing"
-
-# truning off relative path - it causes an error if it was true
-if bpy.context.user_preferences.filepaths.use_relative_paths == True:
-    bpy.context.user_preferences.filepaths.use_relative_paths = False
-
-# add blinking
-def blinker():
-    
-    scn = bpy.context.scene
-    obj = bpy.context.object
-
-    if scn.regMenuTypes.enumBlinkTypes == '0':
-        modifier = 0
-    elif scn.regMenuTypes.enumBlinkTypes == '1':
-        modifier = scn.blinkMod
-    
-    #creating keys with blinkNm count
-    for y in range(scn.blinkNm):
-        frame = y * scn.blinkSp + int(random()*modifier)
-        createShapekey('blink', frame)
-
-# -----------code contributed by dalai felinto adds armature support modified by me-------------------
-
-bone_keys = {
-"AI":   ('location', 0),
-"E":    ('location', 1),
-"FV":   ('location', 2),
-"L":    ('rotation_euler', 0),
-"MBP":  ('rotation_euler', 1),
-"O":    ('rotation_euler', 2),
-"U":    ('scale', 0),
-"WQ":   ('scale', 1),
-"etc":  ('scale', 2),
-"rest": ('ik_stretch', -1)
-}
-
-def lipsyncerBone():
-    # reading imported file & creating keys
-    object = bpy.context.object
-    scene = bpy.context.scene
-    bone = bpy.context.active_pose_bone
-    
-    resetBoneScale(bone)
-    
-    f=open(scene.fpath) # importing file
-    f.readline() # reading the 1st line that we don"t need
-    
-    for line in f:
-        # removing new lines
-        lsta = re.split("\n+", line)
-
-        # building a list of frames & shapes indexes
-        lst = re.split(":? ", lsta[0])# making a list of a frame & number 
-        frame = int(lst[0])
-        
-        for key,attribute in bone_keys.items():
-            if lst[1] == key:
-                createBoneKeys(key, bone, attribute, frame)
-
-def resetBoneScale(bone):
-    # set the attributes used by papagayo to 0.0
-    for attribute,index in bone_keys.values():
-        if index != -1:
-            #bone.location[0] = 0.0
-            exec("bone.%s[%d] = %f" % (attribute, index, 0.0))
-        else:
-            exec("bone.%s = %f" % (attribute, 0.0))
-
-def addBoneKey(bone, data_path, index=-1, value=None, frame=bpy.context.scene.frame_current, group=""):
-    # set a value and keyframe for the bone
-    # it assumes the 'bone' variable was defined before
-    # and it's the current selected bone
-
-    if value != None:
-        if index != -1:
-            # bone.location[0] = 0.0
-            exec("bone.%s[%d] = %f" % (data_path, index, value))
-        else:
-            exec("bone.%s = %f" % (data_path, value))
-
-    # bone.keyframe_insert("location", 0, 10.0, "Lipsync")
-    exec('bone.keyframe_insert("%s", %d, %f, "%s")' % (data_path, index, frame, group))
-
-# creating keys with offset and eases for a phonem @ the Skframe
-def createBoneKeys(phoneme, bone, attribute, frame):
-    global lastPhoneme
-    
-    scene = bpy.context.scene
-    object = bpy.context.object
-    
-    offst = scene.offset     # offset value
-    skVlu = scene.skscale    # shape key value
-    
-    #in case of Papagayo format
-    if scene.regMenuTypes.enumFileTypes == '0' :
-        frmIn = scene.easeIn     # ease in value
-        frmOut = scene.easeOut   # ease out value
-        hldIn = scene.holdGap    # holding time value
-        
-    #in case of Jlipsync format or Yolo
-    elif scene.regMenuTypes.enumFileTypes == '1' :
-        frmIn = 1
-        frmOut = 1
-        hldIn = 0
-
-    # inserting the In key only when phonem change or when blinking
-    if lastPhoneme!=phoneme or eval(scene.regMenuTypes.enumModeTypes) == 1:
-        addBoneKey(bone, attribute[0], attribute[1], 0.0, offst+frame-frmIn, "Lipsync")
-
-    addBoneKey(bone, attribute[0], attribute[1], skVlu, offst+frame, "Lipsync")
-    addBoneKey(bone, attribute[0], attribute[1], skVlu, offst+frame+hldIn, "Lipsync")
-    addBoneKey(bone, attribute[0], attribute[1], 0.0, offst+frame+hldIn+frmOut, "Lipsync")
-    
-    lastPhoneme=phoneme
-
-# -------------------------------------------------------------------------------
-
-# reading imported file & creating keys
-def lipsyncer():
-    
-    obj = bpy.context.object
-    scn = bpy.context.scene
-    
-    f=open(scn.fpath) # importing file
-    f.readline() # reading the 1st line that we don"t need
-    
-    for line in f:
-
-        # removing new lines
-        lsta = re.split("\n+", line)
-
-        # building a list of frames & shapes indexes
-        lst = re.split(":? ", lsta[0])# making a list of a frame & number 
-        frame = int(lst[0])
-        
-        for key in obj.data.shape_keys.key_blocks:
-            if lst[1] == key.name:
-                createShapekey(key.name, frame)
-
-# creating keys with offset and eases for a phonem @ the frame
-def createShapekey(phoneme, frame):
-    
-    global lastPhoneme
-    
-    scn = bpy.context.scene
-    obj = bpy.context.object
-    objSK = obj.data.shape_keys
-    
-    offst = scn.offset     # offset value
-    skVlu = scn.skscale    # shape key value
-    
-    #in case of Papagayo format
-    if scn.regMenuTypes.enumFileTypes == '0' :
-        frmIn = scn.easeIn     # ease in value
-        frmOut = scn.easeOut   # ease out value
-        hldIn = scn.holdGap    # holding time value
-        
-    #in case of Jlipsync format or Yolo
-    elif scn.regMenuTypes.enumFileTypes == '1' :
-        frmIn = 1
-        frmOut = 1
-        hldIn = 0
-
-    # inserting the In key only when phonem change or when blinking
-    if lastPhoneme!=phoneme or eval(scn.regMenuTypes.enumModeTypes) == 1:
-        objSK.key_blocks[phoneme].value=0.0
-        objSK.key_blocks[phoneme].keyframe_insert("value",
-            -1, offst+frame-frmIn, "Lipsync")
-            
-    objSK.key_blocks[phoneme].value=skVlu
-    objSK.key_blocks[phoneme].keyframe_insert("value", 
-        -1, offst+frame, "Lipsync")
-    
-    objSK.key_blocks[phoneme].value=skVlu
-    objSK.key_blocks[phoneme].keyframe_insert("value", 
-        -1, offst+frame+hldIn, "Lipsync")
-            
-    objSK.key_blocks[phoneme].value=0.0
-    objSK.key_blocks[phoneme].keyframe_insert("value", 
-    -1, offst+frame+hldIn+frmOut, "Lipsync")
-    
-    lastPhoneme = phoneme
-
-# lipsyncer operation start
-class btn_lipsyncer(bpy.types.Operator):
-    bl_idname = 'lipsync.go'
-    bl_label = 'Start Processing'
-    bl_description = 'Plots the voice file keys to timeline'
-
-    def execute(self, context):
-
-        scn = context.scene
-        obj = context.active_object
-
-        # testing if object is valid
-        if obj!=None:
-            if obj.type=="MESH":
-                if obj.data.shape_keys!=None:
-                    if scn.fpath!='': lipsyncer()
-                    else: print ("select a Moho file")
-                else: print("No shape keys")
-    
-            elif obj.type=="ARMATURE":
-                if 1:#XXX add prop test
-                    if scn.fpath!='': lipsyncerBone()
-                    else: print ("select a Moho file")
-                else: print("Create Pose properties")
-                
-            else: print ("Object is not a mesh ot bone")
-        else: print ("Select object")
-        return {'FINISHED'}
-
-# blinker operation start
-class btn_blinker(bpy.types.Operator):
-    bl_idname = 'blink.go'
-    bl_label = 'Start Processing'
-    bl_description = 'Add blinks at random or specifice frames'
-
-    def execute(self, context):
-        
-        scn = context.scene
-        obj = context.object
-
-         # testing if object is valid
-        if obj!=None:
-            if obj.type=="MESH":
-                if obj.data.shape_keys!=None:
-                    for key in obj.data.shape_keys.key_blocks:
-                        if key.name=='blink':
-                            blinker()
-                            #return
-                else: print("No shape keys")
-            else: print ("Object is not a mesh ot bone")
-        else: print ("Select object")
-        return {'FINISHED'}
-
-
-#defining custom enumeratos
-class menuTypes(bpy.types.PropertyGroup):
-
-    enumFileTypes = EnumProperty(items =(('0', 'Papagayo', ''), 
-                                         ('1', 'Jlipsync Or Yolo', '')
-                                       #,('2', 'Retarget', '')
-                                         ),
-                                 name = 'Choose FileType',
-                                 default = '0')
-
-    enumBlinkTypes = EnumProperty(items =(('0', 'Specific', ''),
-                                          ('1', 'Random','')),
-                                  name = 'Choose BlinkType',
-                                  default = '0')
-
-    enumModeTypes = EnumProperty(items =(('0', 'Lipsyncer',''),
-                                         ('1', 'Blinker','')),
-                                 name = 'Choose Mode',
-                                 default = '0')
-                                 
-# drawing the user interface
-class LipSyncBoneUI(bpy.types.Panel):
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "UI"
-    bl_label = "Phonemes"
-    
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column()
-
-        bone = bpy.context.active_pose_bone
-        
-        #showing the current object type
-        if bone: #and if scn.regMenuTypes.enumModeTypes == '0':
-            col.prop(bone, "location", index=0, text="AI")
-            col.prop(bone, "location", index=1, text="E")
-            col.prop(bone, "location", index=2, text="FV")
-            if bpy.context.scene.unit_settings.system_rotation == 'RADIANS':
-                col.prop(bone, "rotation_euler", index=0, text="L")
-                col.prop(bone, "rotation_euler", index=1, text="MBP")
-                col.prop(bone, "rotation_euler", index=2, text="O")
-            else:
-                row=col.row()
-                row.prop(bone, "rotation_euler", index=0, text="L")
-                row.label(text=str("%4.2f" % (bone.rotation_euler.x)))
-                row=col.row()
-                row.prop(bone, "rotation_euler", index=1, text="MBP")
-                row.label(text=str("%4.2f" % (bone.rotation_euler.y)))
-                row=col.row()
-                row.prop(bone, "rotation_euler", index=2, text="O")
-                row.label(text=str("%4.2f" % (bone.rotation_euler.z)))
-            col.prop(bone, "scale", index=0, text="U")
-            col.prop(bone, "scale", index=1, text="WQ")
-            col.prop(bone, "scale", index=2, text="etc")
-        else:
-            layout.label(text="No good bone is selected")
-            
-# drawing the user interface
-class LipSyncUI(bpy.types.Panel):
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOL_PROPS"
-    bl_label = "LipSync Importer & Blinker"
-    
-    newType= bpy.types.Scene
-    scn = bpy.context.scene
-    
-    newType.fpath = StringProperty(name="Import File ", description="Select your voice file", subtype="FILE_PATH")
-    newType.skscale = FloatProperty(description="Smoothing shape key values", min=0.1, max=1.0, default=0.8)
-    newType.offset = IntProperty(description="Offset your frames", default=0)
-
-    newType.easeIn = IntProperty(description="Smoothing In curve", min=1, default=3)
-    newType.easeOut = IntProperty(description="Smoothing Out curve", min=1, default=3)
-    newType.holdGap = IntProperty(description="Holding for slow keys", min=0, default=0)
-
-    newType.blinkSp = IntProperty(description="Space between blinks", min=1, default=100)
-    newType.blinkNm = IntProperty(description="Number of blinks", min=1, default=10)
-    
-    newType.blinkMod = IntProperty(description="Randomzing keyframe placment", min=1, default=10)
-    
-    def draw(self, context):
-        
-        obj = bpy.context.active_object
-        scn = bpy.context.scene
-        
-        layout = self.layout
-        col = layout.column()
-
-        # showing the current object type
-        if obj != None:
-            if obj.type == "MESH":
-                split = col.split(align=True)
-                split.label(text="The active object is: ", icon="OBJECT_DATA")
-                split.label(obj.name, icon="EDITMODE_HLT")
-            elif obj.type == "ARMATURE": # bone needs to be selected
-                if obj.mode == "POSE": # mode needs to be pose
-                    split = col.split(align=True)
-                    split.label(text="The active object is: ", icon="ARMATURE_DATA")
-                    split.label(obj.name, icon="EDITMODE_HLT")
-                else:
-                    col.label(text="You need to select Pose mode!", icon="OBJECT_DATA")
-            else:
-                col.label(text="The active object is not a Mesh or Armature!", icon="OBJECT_DATA")
-        else:
-            layout.label(text="No object is selected", icon="OBJECT_DATA")
-            
-        col.row().prop(scn.regMenuTypes, 'enumModeTypes')
-        col.separator()
-        
-        # the lipsyncer panel 
-        if scn.regMenuTypes.enumModeTypes == '0':
-            # choose the file format
-            col.row().prop(scn.regMenuTypes, 'enumFileTypes', text = ' ', expand = True)
-                
-            # Papagayo panel
-            if scn.regMenuTypes.enumFileTypes == '0':
-                col.prop(context.scene, "fpath")
-                split = col.split(align=True)
-                split.label("Key Value :")
-                split.prop(context.scene, "skscale")
-                split = col.split(align=True)
-                split.label("Frame Offset :")
-                split.prop(context.scene, "offset")
-                split = col.split(align=True)
-                split.prop(context.scene, "easeIn", "Ease In")
-                split.prop(context.scene, "holdGap", "Hold Gap")
-                split.prop(context.scene, "easeOut", "Ease Out")
-                
-                col.operator('lipsync.go', text='Plot Keys to the Timeline')
-
-            # Jlipsync & Yolo panel
-            elif scn.regMenuTypes.enumFileTypes == '1':
-                col.prop(context.scene, "fpath")
-                split = col.split(align=True)
-                split.label("Key Value :")
-                split.prop(context.scene, "skscale")
-                split = col.split(align=True)
-                split.label("Frame Offset :")
-                split.prop(context.scene, "offset")
-                
-                col.operator('lipsync.go', text='Plot Keys to the Timeline')
-        
-        # the blinker panel
-        elif scn.regMenuTypes.enumModeTypes == '1':
-            # choose blink type
-            col.row().prop(scn.regMenuTypes, 'enumBlinkTypes', text = ' ', expand = True)
-            
-            # specific panel
-            if scn.regMenuTypes.enumBlinkTypes == '0':
-                split = col.split(align=True)
-                split.label("Key Value :")
-                split.prop(context.scene, "skscale")
-                split = col.split(align=True)
-                split.label("Frame Offset :")
-                split.prop(context.scene, "offset")
-                split = col.split(align=True)
-                split.prop(context.scene, "easeIn", "Ease In")
-                split.prop(context.scene, "holdGap", "Hold Gap")
-                split.prop(context.scene, "easeOut", "Ease Out")
-                col.prop(context.scene, "blinkSp", "Spacing")
-                col.prop(context.scene, "blinkNm", "Times")
-                col.operator('blink.go', text='Add Keys to the Timeline')
-            
-            # Random panel
-            elif scn.regMenuTypes.enumBlinkTypes == '1':
-                split = col.split(align=True)
-                split.label("Key Value :")
-                split.prop(context.scene, "skscale")
-                split = col.split(align=True)
-                split.label("Frame Start :")
-                split.prop(context.scene, "offset")
-                split = col.split(align=True)
-                split.prop(context.scene, "easeIn", "Ease In")
-                split.prop(context.scene, "holdGap", "Hold Gap")
-                split.prop(context.scene, "easeOut", "Ease Out")
-                split = col.split(align=True)
-                split.prop(context.scene, "blinkSp", "Spacing")
-                split.prop(context.scene, "blinkMod", "Random Modifier")
-                col.prop(context.scene, "blinkNm", "Times")
-                col.operator('blink.go', text='Add Keys to the Timeline')
-        
-        
-# clearing vars
-def clear_properties():
-
-    # can happen on reload
-    if bpy.context.scene is None:
-        return
-     
-    props = ["fpath", "skscale", "offset", "easeIn", "easeOut", "holdGap", "blinkSp", "blinkNm", "blinkMod"]
-    for p in props:
-        if p in bpy.types.Scene.bl_rna.properties:
-            exec("del bpy.types.Scene."+p)
-        if p in bpy.context.scene:
-            del bpy.context.scene[p]
-
-# registering the script
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.Scene.regMenuTypes = PointerProperty(type = menuTypes)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    del bpy.context.scene.regMenuTypes
-
-    clear_properties()
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_import_sound_to_anim.py b/release/scripts/addons_contrib/io_import_sound_to_anim.py
deleted file mode 100644
index abfc4d0..0000000
--- a/release/scripts/addons_contrib/io_import_sound_to_anim.py
+++ /dev/null
@@ -1,1930 +0,0 @@
-#!/usr/bin/python3
-# To change this template, choose Tools | Templates
-# and open the template in the editor.
-#  ***** GPL LICENSE BLOCK *****
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#  All rights reserved.
-#  ***** GPL LICENSE BLOCK *****
-
-bl_info = {
-    "name": "Import: Sound to Animation",
-    "author": "Vlassius",
-    "version": (0, 70),
-    "blender": (2, 64, 9),
-    "api": 52100,
-    "location": "Select a object -> go to the Object tab ->  Import Movement From Wav File",
-    "description": "Extract movement from sound file. See the Object Panel at the end.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Import_Movement_From_Audio_File",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=23565&group_id=153&atid=467",
-    "category": "Import-Export"}
-
-"""
--- Extract movement from sound file, to help in animation - import script --<br>
-
-- NOTES:
-- This script takes a wav file and get sound "movement" to help you in sync the movement to words in the wave file. <br>
-- Supported Audio: .wav (wave) 8 bits and 16 bits - mono and multichanel file<br>
-- At least Blender 2.64.9 is necessary to run this program.
-- Curitiba - Brasil
-
-
--v 0.70Beta-
-    Included: SmartRender - Render just the frames that has changes
-    Included: Options to check SmartRender for Blender Internal Render Engine:LocRotScale, Material, Transp, Mirror
-    Included: User can Cancel all functions with CANCEL button- Extensive Code and flux change (bugs expected)
-    Included: User can Cancel all functions with ESC
-    Inclused: User friendly messages into UI while running (its no more necessary to look at terminal window to most users)
-    Cleanup:  Non Stardard Chars in coments
-    To Do:    Decrease overhead of timer loops
-    To Do:    Try to implement Smart Render for Cycles
-
--v 0.60Beta-
-    Included: Option to use just the beat from the audio sound
-    Included: Option to exclude the beat from the audio sound
-    Included: More or less sensibility options when using the beat
-    Included: Audio Channel Select option
-
--v 0.50Beta-
-    Included: Auto Adjust Audio Sensity option
-    Included: 8 bits .wav file support
-    Recalibrated: Manual audio sense 1
-    Cosmetic: Many changes in panel and terminal window info
-    Corrected: Tracker_url
-    Corrected: a few bytes in Memory Leaks
-    work around: memory leak in function: bpy.ops.transform.rotate
-    work around: memory leak in function: bpy.ops.anim.keyframe_insert
-
--v 0.22Beta-
-    Included:
-    Camera Rotation
-    Empty Location-Rotation-Scale
-
--v 0.21Beta-
-    Changed just the meta informations like version and wiki page.
-
--v 0.20 Beta-
-    New Panel
-
--v 0.1.5 Beta-
-    Change in API-> Properties
-    Included the button "Get FPS from Scene" due to a problem to get it in the start
-    Return to Frame 1 after import
-    Filter .wav type file (by batFINGER)
-
--v 0.1.4 Beta-
-    If choose negative in rotation, auto check the rotation negative to Bones
-    change in register()  unregister():
-
--v 0.1.3 Beta-
-    File Cleanup
-    Change to bl_info.
-    Cosmetic Changes.
-    Minor change in API in how to define buttons.
-    Adjust in otimization.
-
--v 0.1.2 Beta
-change in API- Update function bpy.ops.anim.keyframe_insert_menu
-
--v 0.1.1 Beta
-change in API- Update property of  window_manager.fileselect_add
-
--v 0.1.0 Beta
-new - Added support to LAMP object
-new - improved flow to import
-new - check the type of object before show options
-bug - option max. and min. values
-change- Updated scene properties for changes in property API.
-        See http://lists.blender.org/pipermail/bf-committers/2010-September/028654.html
-new flow: 1) Process the sound file    2) Show Button to import key frames
-
-- v0.0.4 ALPHA
-new - Added destructive optimizer option - LostLestSignificativeDigit lost/total -> 10/255 default
-new - Visual Graph to samples
-new - Option to just process audio file and do not import - this is to help adjust the audio values
-new - Get and show automatically the FPS (in proper field) information taking the information from scene
-bug- Display sensitivity +1
-bug - Corrected location of the script in description
-
-- v0.0.3
-Main change: Corrected to work INSIDE dir /install/linux2/2.53/scripts/addons
-Corrected position of label "Rotation Negative"
-Added correct way to deal with paths in Python os.path.join - os.path.normpath
-
-- v0.0.2
-Corrected initial error (Register() function)
-Corrected some labels R. S. L.
-Turned off "object field" for now
-Changed target default to Z location
-
-- v0.0.1
-Initial version
-
-Credit to:
-Vlassius
-
-- http://vlassius.com.br
-- vlassius at vlassius.com.br
-- Curitiba - Brasil
-
-"""
-
-import bpy
-from bpy.props import *
-#from io_utils import ImportHelper
-import wave
-
-#para deixar global
-def _Interna_Globals(BytesDadosTotProcess, context):
-    global array
-    global arrayAutoSense
-
-    array= bytearray(BytesDadosTotProcess)  # cria array
-    arrayAutoSense= bytearray((BytesDadosTotProcess)*2)  # cria array para AutoAudioSense
-    context.scene.imp_sound_to_anim.bArrayCriado=True
-
-#
-#==================================================================================================
-# BLENDER UI Panel
-#==================================================================================================
-#
-class VIEW3D_PT_CustomMenuPanel(bpy.types.Panel):
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "object"
-    bl_label = "Import Movement From Wav File"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        b=bpy.context.active_object.type=='EMPTY' or bpy.context.active_object.type=='ARMATURE' or \
-                                                            bpy.context.active_object.type=='MESH' or \
-                                                            bpy.context.active_object.type=='CAMERA' or \
-                                                            bpy.context.active_object.type=='LAMP'
-        if not b:
-            row=layout.row()
-            row.label(text="The Selected Object is: type \"" + bpy.context.active_object.type + \
-                                                                    "\", and it is not supported.")
-            row=layout.row()
-            row.label(text="Supported Object are Type: Armature, Mesh, Camera and Lamp")
-            row=layout.row()
-        else:
-            #print(context.scene.imp_sound_to_anim.bTypeImport)
-            if context.scene.imp_sound_to_anim.bTypeImport == 0:
-                #mount panel to Direct animation
-                row=layout.row()
-                layout.operator("import.sound_animation_botao_udirect")
-
-            # monta as telas quando está rodando
-            elif context.scene.imp_sound_to_anim.Working!="":   #its running
-                row=layout.row()
-                row=layout.row()
-
-                if context.scene.imp_sound_to_anim.Working== "CheckSmartRender":
-                    #context.scene.imp_sound_to_anim.Info_check_smartrender=
-                    row=layout.row()
-                    row.label(text="Checking for Smart Render...")
-                    row=layout.row()
-                    row.label(text=context.scene.imp_sound_to_anim.Info_check_smartrender)
-                    row=layout.row()
-
-                elif context.scene.imp_sound_to_anim.Working== "SmartRender":
-                    #context.scene.imp_sound_to_anim.Info_check_smartrender=
-                    row=layout.row()
-                    row.label(text="Processing Smart Render...")
-                    row=layout.row()
-                    row.label(text=context.scene.imp_sound_to_anim.Info_check_smartrender)
-                    row=layout.row()
-
-                elif context.scene.imp_sound_to_anim.Working== "ProcessaSom":
-                    #context.scene.imp_sound_to_anim.Info_Import=
-                    row=layout.row()
-                    row.label(text="Processing Sound File...")
-                    row=layout.row()
-                    row.label(text=context.scene.imp_sound_to_anim.Info_Import)
-
-                elif context.scene.imp_sound_to_anim.Working== "wavimport":
-                    #context.scene.imp_sound_to_anim.Info_Import=
-                    row=layout.row()
-                    row.label(text="Importing Keys...")
-                    row=layout.row()
-                    row.label(text=context.scene.imp_sound_to_anim.Info_Import)
-                    row=layout.row()
-
-                # botao cancel
-                layout.operator(OBJECT_OT_Botao_Cancel.bl_idname)
-                row=layout.row()
-
-            elif context.scene.imp_sound_to_anim.bTypeImport == 1:
-                row=layout.row()
-                row.label(text="1)Click button \"Process Wav\",")
-                row=layout.row()
-                row.label(text="2)Click Button \"Import Key Frames\",")
-                row=layout.row()
-                row.label(text="Run the animation (alt A) and Enjoy!")
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_auto_audio_sense")
-                row=layout.row()
-                if context.scene.imp_sound_to_anim.action_auto_audio_sense == 0:   # se auto audio sense desligado
-                    row.prop(context.scene.imp_sound_to_anim,"audio_sense")
-                    row=layout.row()
-
-                else: #somente se autosense ligado
-                    if context.scene.imp_sound_to_anim.remove_beat == 0 :
-                        row.prop(context.scene.imp_sound_to_anim,"use_just_beat")
-
-                    if context.scene.imp_sound_to_anim.use_just_beat == 0:
-                        row.prop(context.scene.imp_sound_to_anim,"remove_beat")
-
-                    if context.scene.imp_sound_to_anim.use_just_beat or context.scene.imp_sound_to_anim.remove_beat:
-                        if not context.scene.imp_sound_to_anim.beat_less_sensible and not context.scene.imp_sound_to_anim.beat_more_sensible:
-                            row=layout.row()
-                        if context.scene.imp_sound_to_anim.beat_less_sensible ==0:
-                            row.prop(context.scene.imp_sound_to_anim,"beat_more_sensible")
-
-                        if context.scene.imp_sound_to_anim.beat_more_sensible ==0:
-                            row.prop(context.scene.imp_sound_to_anim,"beat_less_sensible")
-
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_per_second")
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_escale")
-
-                #row=layout.row()
-                row.label(text="Result from 0 to " + str(round(255/context.scene.imp_sound_to_anim.action_escale,4)) + "")
-
-                row=layout.row()
-                row.label(text="Property to Change:")
-                row.prop(context.scene.imp_sound_to_anim,"import_type")
-
-                #coluna
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"import_where1")
-                row.prop(context.scene.imp_sound_to_anim,"import_where2")
-                row.prop(context.scene.imp_sound_to_anim,"import_where3")
-
-                row=layout.row()
-                row.label(text='Optional Configurations:')
-                row=layout.row()
-
-                row.prop(context.scene.imp_sound_to_anim,"frames_per_second")
-                row=layout.row()
-                #coluna
-                column= layout.column()
-                split=column.split(percentage=0.5)
-                col=split.column()
-
-                row=col.row()
-                row.prop(context.scene.imp_sound_to_anim,"frames_initial")
-
-                row=col.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_min_value")
-
-                col=split.column()
-
-                row=col.row()
-                row.prop(context.scene.imp_sound_to_anim,"optimization_destructive")
-
-                row=col.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_max_value")
-
-                row=layout.row()
-
-                row.prop(context.scene.imp_sound_to_anim,"action_offset_x")
-                row.prop(context.scene.imp_sound_to_anim,"action_offset_y")
-                row.prop(context.scene.imp_sound_to_anim,"action_offset_z")
-
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"audio_channel_select")
-                row.prop(context.scene.imp_sound_to_anim,"action_valor_igual")
-
-                #operator button
-                #OBJECT_OT_Botao_Go => Botao_GO
-                row=layout.row()
-                layout.operator(OBJECT_OT_Botao_Go.bl_idname)
-
-                row=layout.row()
-                row.label(text=context.scene.imp_sound_to_anim.Info_Import)
-
-                # preciso garantir a existencia do array porque o Blender salva no arquivo como existente sem o array existir
-                try:
-                    array
-                except NameError:
-                    nada=0 #dummy
-                else:
-                    if context.scene.imp_sound_to_anim.bArrayCriado:
-                        layout.operator(OBJECT_OT_Botao_Import.bl_idname)
-                        row=layout.row()
-
-                #Layout SmartRender, somente para Blender_render
-                if bpy.context.scene.render.engine == "BLENDER_RENDER":
-                    row=layout.row()
-                    row.label(text="----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")
-                    row=layout.row()
-                    if context.scene.imp_sound_to_anim.Info_check_smartrender!= "":
-                        row=layout.row()
-                        row.label(text=context.scene.imp_sound_to_anim.Info_check_smartrender)
-
-                    row=layout.row()
-                    row.operator(OBJECT_OT_Botao_Check_SmartRender.bl_idname)
-                    if context.scene.imp_sound_to_anim.Info_check_smartrender!= "":
-                        row.operator(OBJECT_OT_Botao_SmartRender.bl_idname)
-
-                    row=layout.row()
-                    row.prop(context.scene.imp_sound_to_anim,"check_smartrender_loc_rot_sc")
-                    row.prop(context.scene.imp_sound_to_anim,"check_smartrender_material_basic")
-                    row=layout.row()
-                    row.prop(context.scene.imp_sound_to_anim,"check_smartrender_material_transparence")
-                    row.prop(context.scene.imp_sound_to_anim,"check_smartrender_material_mirror")
-
-            #-----------------------------
-            #Use Driver
-            #-----------------------------
-            if context.scene.imp_sound_to_anim.bTypeImport == 2:
-
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"audio_sense")
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"frames_per_second")
-                row=layout.row()
-                row.prop(context.scene.imp_sound_to_anim,"action_per_second")
-                row=layout.row()
-                layout.operator(ImportWavFile.bl_idname)
-
-
-#
-#==================================================================================================
-# BLENDER UI PropertyGroup
-#==================================================================================================
-#
-class ImpSoundtoAnim(bpy.types.PropertyGroup):
-
-        #Array created
-        bArrayCriado = IntProperty(name="",
-            description="Avisa que rodou process de som",
-            default=0)
-
-        #Script Running
-        Working = StringProperty(name="",
-            description="Script esta trabalhando",
-            maxlen= 1024,
-            default="")
-
-        #Nome do objeto
-        Info_Import = StringProperty(name="",
-            description="Info about Import",
-            maxlen= 1024,
-            default= "")#this set the initial text
-
-        #Mensagem Smart Render
-        Info_check_smartrender = StringProperty(name="",
-            description="Smart Render Message",
-            maxlen= 1024,
-            default= "")#this set the initial text
-
-        #iAudioSensib=0    #sensibilidade volume do audio 0 a 5. Quanto maior, mais sensibilidade
-        audio_sense = IntProperty(name="Audio Sens",
-            description="Audio Sensibility.",
-            min=1,
-            max=6,
-            step=1,
-            default= 1)
-
-        #iFramesPorSeg=15  #Frames por segundo para key frame
-        #fps= (bpy.types.Scene) bpy.context.scene.render.fps
-        frames_per_second = IntProperty(name="#Frames/s",
-            description="Frames you want per second. Better match your set up in Blender scene.",
-            min=1,
-            max=120,
-            step=1)
-
-        #iMovPorSeg=1      #Sensibilidade de movimento. 3= 3 movimentos por segundo
-        action_per_second = IntProperty(name="Act/s",
-            description="Actions per second. From 1 to #Frames/s",
-            min=1,
-            max=120,
-            step=1,
-            default= 4)#this set the initial text
-
-        #iDivScala=200
-        #scala do valor do movimento. [se =1 - 0 a 255 ] [se=255 - 0,00000 a 1,00000] [se=1000 - 0 a 0.255]
-        action_escale = IntProperty(name="Scale",
-            description="Scale the result values. See the text at right side of the field",
-            min=1,
-            max=99999,
-            step=100,
-            default= 100)#this set the initial text
-
-        #iMaxValue=255
-        action_max_value = IntProperty(name="Clip Max",
-            description="Set the max value (clip higher values).",
-            min=1,
-            max=255,
-            step=1,
-            default= 255)#this set the initial text
-
-        #iMinValue=0
-        action_min_value = IntProperty(name="Clip Min",
-            description="Set the min value. (clip lower values)",
-            min=0,
-            max=255,
-            step=1,
-            default= 0)#this set the initial text
-
-        #iStartFrame=0#
-        frames_initial = IntProperty(name="Frame Ini",
-            description="Where to start to put the computed values.",
-            min=0,
-            max=999999999,
-            step=1,
-            default= 0)
-
-        audio_channel_select = IntProperty(name="Audio Channel",
-            description="Choose the audio channel to use",
-            min=1,
-            max=10,
-            step=1,
-            default= 1)
-
-        action_offset_x = FloatProperty(name="XOffset",
-            description="Offset X Values",
-            min=-999999,
-            max=999999,
-            step=1,
-            default= 0)
-
-        action_offset_y = FloatProperty(name="YOffset",
-            description="Offset Y Values",
-            min=-999999,
-            max=999999,
-            step=1,
-            default= 0)
-
-        action_offset_z = FloatProperty(name="ZOffset",
-            description="Offset Z Values",
-            min=-999999,
-            max=999999,
-            step=1,
-            default= 0)
-
-        import_type= EnumProperty(items=(('imp_t_Scale', "Scale", "Apply to Scale"),
-                                         ('imp_t_Rotation', "Rotation", "Apply to Rotation"),
-                                         ('imp_t_Location', "Location", "Apply to Location")
-                                        ),
-                                 name="",
-                                 description= "Property to Import Values",
-                                 default='imp_t_Location')
-
-        import_where1= EnumProperty(items=(('imp_w_-z', "-z", "Apply to -z"),
-                                          ('imp_w_-y', "-y", "Apply to -y"),
-                                          ('imp_w_-x', "-x", "Apply to -x"),
-                                          ('imp_w_z', "z", "Apply to z"),
-                                          ('imp_w_y', "y", "Apply to y"),
-                                          ('imp_w_x', "x", "Apply to x")
-                                        ),
-                                 name="",
-                                 description= "Where to Import",
-                                 default='imp_w_z')
-
-        import_where2= EnumProperty(items=(('imp_w_none', "None", ""),
-                                          ('imp_w_-z', "-z", "Apply to -z"),
-                                          ('imp_w_-y', "-y", "Apply to -y"),
-                                          ('imp_w_-x', "-x", "Apply to -x"),
-                                          ('imp_w_z', "z", "Apply to z"),
-                                          ('imp_w_y', "y", "Apply to y"),
-                                          ('imp_w_x', "x", "Apply to x")
-                                        ),
-                                 name="",
-                                 description= "Where to Import",
-                                 default='imp_w_none')
-
-        import_where3= EnumProperty(items=(('imp_w_none', "None", ""),
-                                          ('imp_w_-z', "-z", "Apply to -z"),
-                                          ('imp_w_-y', "-y", "Apply to -y"),
-                                          ('imp_w_-x', "-x", "Apply to -x"),
-                                          ('imp_w_z', "z", "Apply to z"),
-                                          ('imp_w_y', "y", "Apply to y"),
-                                          ('imp_w_x', "x", "Apply to x")
-                                        ),
-                                 name="",
-                                 description= "Where to Import",
-                                 default='imp_w_none')
-
-
-        #========== Propriedades boolean  =============#
-
-        #  INVERTIDO!!!  bNaoValorIgual=True    # nao deixa repetir valores     INVERTIDO!!!
-        action_valor_igual = BoolProperty(name="Hard Transition",
-            description="Use to movements like a mouth, to a arm movement, maybe you will not use this.",
-            default=1)
-
-        action_auto_audio_sense = BoolProperty(name="Auto Audio Sensitivity",
-            description="Try to discover best audio scale. ",
-            default=1)
-
-        use_just_beat=BoolProperty(name="Just Use The Beat",
-            description="Try to use just the beat to extract movement.",
-            default=0)
-
-        remove_beat=BoolProperty(name="Remove The Beat",
-            description="Try to remove the beat to extract movement.",
-            default=0)
-
-        beat_more_sensible=BoolProperty(name="More Sensible",
-            description="Try To be more sensible about the beat.",
-            default=0)
-
-        beat_less_sensible=BoolProperty(name="Less Sensible",
-            description="Try to be less sensible about the beat.",
-            default=0)
-
-        check_smartrender_loc_rot_sc=BoolProperty(name="Loc Rot Scale",
-            description="Find changes in Location, Rotation and Scale Frame by Frame.",
-            default=1)
-
-        check_smartrender_material_basic=BoolProperty(name="Basic Material",
-            description="Find changes in basic material settings Frame by Frame.",
-            default=1)
-
-        check_smartrender_material_transparence=BoolProperty(name="Material Transparence",
-            description="Find changes in material transparence settings Frame by Frame.",
-            default=0)
-
-        check_smartrender_material_mirror=BoolProperty(name="Material Mirror",
-            description="Find changes in material mirror settings Frame by Frame.",
-            default=0)
-
-        timer_reset_func=BoolProperty(name="Reset Counters",
-            description="Reset Counters after stop",
-            default=0)
-
-        cancel_button_hit=BoolProperty(name="Cancel Hit",
-            description="Cancel Hit",
-            default=0)
-
-        #  Optimization
-        optimization_destructive = IntProperty(name="Optimization",
-            description="Hi value = Hi optimization -> Hi loss of information.",
-            min=0,
-            max=254,
-            step=10,
-            default= 10)
-
-        # import as driver or direct   NOT IN USE!!
-        # not defined
-        # Direct=1
-        # Driver=2
-        bTypeImport = IntProperty(name="",
-            description="Import Direct or Driver",
-            default=0)
-
-        # globais do dialog open wave
-        filter_glob = StringProperty(default="*.wav", options={'HIDDEN'})
-        path =        StringProperty(name="File Path", description="Filepath used for importing the WAV file", \
-                                                                                        maxlen= 1024, default= "")
-        filename =    StringProperty(name="File Name", description="Name of the file")
-        directory =   StringProperty(name="Directory", description="Directory of the file")
-
-from bpy.props import *
-
-def WavFileImport(self, context):
-    self.layout.operator(ImportWavFile.bl_idname, text="Import a wav file", icon='PLUGIN')
-
-
-#
-#==================================================================================================
-# Use Direct
-#==================================================================================================
-#
-class OBJECT_OT_Botao_uDirect(bpy.types.Operator):
-    '''Import as Direct Animation'''
-    bl_idname = "import.sound_animation_botao_udirect"
-    bl_label = "Direct to a Property"
-
-    def execute(self, context):
-        context.scene.imp_sound_to_anim.bTypeImport= 1
-        if context.scene.imp_sound_to_anim.frames_per_second == 0:
-             context.scene.imp_sound_to_anim.frames_per_second= bpy.context.scene.render.fps
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
-
-#
-#==================================================================================================
-# Button - Import
-#==================================================================================================
-#
-class OBJECT_OT_Botao_Import(bpy.types.Operator):
-    '''Import Key Frames to Blender'''
-    bl_idname = "import.sound_animation_botao_import"
-    bl_label = "Import Key Frames"
-
-    RunFrom=0
-    iSumImportFrames=0
-    iSumOptimizerP1=0
-    iSumOptimizerP2=0
-    iSumOptimizerP3=0
-
-    def wavimport(context, loop):
-        obi=OBJECT_OT_Botao_Import
-
-        # para de entrar no timer
-        context.scene.imp_sound_to_anim.Working=""
-        #reseta contadores caso seja pedido
-        if context.scene.imp_sound_to_anim.timer_reset_func:
-            obi.RunFrom=0
-            obi.iSumOptimizerP1=0
-            obi.iSumOptimizerP2=0
-            obi.iSumOptimizerP3=0
-            obi.iSumImportFrames=0
-            context.scene.imp_sound_to_anim.timer_reset_func=False
-
-        #limita o loop se estiver no fim
-        tot=len(array)-1
-        if obi.RunFrom+loop > tot:
-            loop= tot - obi.RunFrom
-
-        #scala do valor do movimento. [se =1 - 0 a 255 ] [se=255 - 0,00000 a 1,00000] [se=1000 - 0 a 0.255]
-        iDivScala= int(context.scene.imp_sound_to_anim.action_escale)
-
-        # nao deixa repetir valores
-        bNaoValorIgual=True
-        if context.scene.imp_sound_to_anim.action_valor_igual: bNaoValorIgual= False
-
-        # inicia no inicio pedido pelo usuario mais ponteiro RunFrom
-        iStartFrame= int(context.scene.imp_sound_to_anim.frames_initial) + obi.RunFrom
-
-        iMaxValue= context.scene.imp_sound_to_anim.action_max_value
-        iMinValue= context.scene.imp_sound_to_anim.action_min_value
-
-        bEscala=bRotacao=bEixo=False
-        if context.scene.imp_sound_to_anim.import_type=='imp_t_Scale':
-            bEscala=True;
-
-        if context.scene.imp_sound_to_anim.import_type=='imp_t_Rotation':
-            bRotacao=True;
-
-        if context.scene.imp_sound_to_anim.import_type=='imp_t_Location':
-            bEixo=True;
-
-        # atencao, nao eh boolean
-        iEixoXneg= iEixoYneg= iEixoZneg=1
-        # atencao, nao eh boolean
-        iRotationNeg=1
-        # atencao, nao eh boolean
-        iEscalaYneg= iEscalaZneg= iEscalaXneg=1
-        bEixoX=bEixoY=bEixoZ=bEscalaX=bEscalaY=bEscalaZ=bRotationX=bRotationY=bRotationZ=False
-
-        # LOCAL 1
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-            iEixoXneg=-1
-            iEscalaXneg=-1
-            iRotationNeg=-1
-
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-            iEixoYneg=-1
-            iRotationNeg=-1
-            iEscalaYneg=-1
-
-        if context.scene.imp_sound_to_anim.import_where1== 'imp_w_-z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-            iEixoZneg=-1
-            iRotationNeg=-1
-            iEscalaZneg=-1
-
-
-        # LOCAL 2
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-            iEixoXneg=-1
-            iEscalaXneg=-1
-            iRotationNeg=-1
-
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-            iEixoYneg=-1
-            iRotationNeg=-1
-            iEscalaYneg=-1
-
-        if context.scene.imp_sound_to_anim.import_where2== 'imp_w_-z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-            iEixoZneg=-1
-            iRotationNeg=-1
-            iEscalaZneg=-1
-
-
-        # LOCAL 3
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-x':
-            bEixoX=True
-            bEscalaX=True
-            bRotationX=True
-            iEixoXneg=-1
-            iEscalaXneg=-1
-            iRotationNeg=-1
-
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-y':
-            bEixoY=True
-            bEscalaY=True
-            bRotationY=True
-            iEixoYneg=-1
-            iRotationNeg=-1
-            iEscalaYneg=-1
-
-        if context.scene.imp_sound_to_anim.import_where3== 'imp_w_-z':
-            bEixoZ=True
-            bEscalaZ=True
-            bRotationZ=True
-            iEixoZneg=-1
-            iRotationNeg=-1
-            iEscalaZneg=-1
-
-        iMinBaseX=iMinScaleBaseX=context.scene.imp_sound_to_anim.action_offset_x
-        iMinBaseY=iMinScaleBaseY=context.scene.imp_sound_to_anim.action_offset_y
-        iMinBaseZ=iMinScaleBaseZ=context.scene.imp_sound_to_anim.action_offset_z
-
-        #escala inicia com 1 e nao com zero
-        iRotationAxisBaseX=context.scene.imp_sound_to_anim.action_offset_x  +1
-        iRotationAxisBaseY=context.scene.imp_sound_to_anim.action_offset_y  +1
-        iRotationAxisBaseZ=context.scene.imp_sound_to_anim.action_offset_z  +1
-
-        #Added destructive optimizer option - LostLestSignificativeDigit lost/total
-        iDestructiveOptimizer=context.scene.imp_sound_to_anim.optimization_destructive
-
-        #limita ou nao o valor - velocidade
-        bLimitValue=False
-
-        if iMinValue<0: iMinValue=0
-        if iMaxValue>255: iMaxValue=255
-        if iMinValue>255: iMinValue=255
-        if iMaxValue<0: iMaxValue=0
-        if iMinValue!= 0: bLimitValue= True
-        if iMaxValue!= 255: bLimitValue= True
-
-        if obi.RunFrom==0:
-            print('')
-            print("================================================================")
-            from time import strftime
-            print(strftime("Start Import:  %H:%M:%S"))
-            print("================================================================")
-            print('')
-
-        ilocationXAnt=0
-        ilocationYAnt=0
-        ilocationZAnt=0
-        iscaleXAnt=0
-        iscaleYAnt=0
-        iscaleZAnt=0
-        iRotateValAnt=0
-
-        # variavel global _Interna_Globals
-        if context.scene.imp_sound_to_anim.bArrayCriado:
-            for i in range(loop):
-                ival=array[i+obi.RunFrom]/iDivScala
-                #valor pequeno demais, vai dar zero na hora de aplicar
-                if ival < 0.001:
-                     array[i+obi.RunFrom]=0
-                     ival=0
-
-                # to increase performance and legibility
-                arrayI= array[i+obi.RunFrom]
-                arrayIP1= array[i+1+obi.RunFrom]
-                arrayIL1= array[i-1+obi.RunFrom]
-
-                # opcao de NAO colocar valores iguais sequenciais
-                if i>0 and bNaoValorIgual and arrayIL1== arrayI:
-                    print("Importing Blender Frame: "+str(i+obi.RunFrom+1)+"\tof "+str(len(array)-1) + \
-                                                                            "\t(skipped by optimizer)")
-                    obi.iSumOptimizerP3+=1
-                else:
-                    # otimizacao - nao preciso mais que 2 valores iguais.
-                    # pular key frame intermediario - Ex b, a, -, -, -, a
-                    # tambem otimiza pelo otimizador com perda
-                    # valor atual == anterior e posterior -> pula
-                    if i>0 and i< len(array)-1 and abs(arrayI - arrayIL1)<=iDestructiveOptimizer and \
-                                                        abs(arrayI - arrayIP1)<=iDestructiveOptimizer:
-                            print("Importing Blender Frame: "+str(i+obi.RunFrom+1)+"\tof "+str(len(array)-1) + \
-                                                                                    "\t(skipped by optimizer)")
-                            if iDestructiveOptimizer>0 and arrayI != arrayIL1 or arrayI != arrayIP1:
-                                obi.iSumOptimizerP1+=1
-                            else: obi.iSumOptimizerP2+=1
-                    else:
-                            if bLimitValue:
-                                if arrayI > iMaxValue: array[i+obi.RunFrom]=iMaxValue
-                                if arrayI < iMinValue: array[i+obi.RunFrom]=iMinValue
-
-                            ival=array[i+obi.RunFrom]/iDivScala
-                            #passa para float com somente 3 digitos caso seja float
-                            m_ival=ival*1000
-                            if int(m_ival) != m_ival:
-                                ival= int(m_ival)
-                                ival = ival /1000
-
-                            bpy.context.scene.frame_current = i+iStartFrame
-
-                            #precisa fazer objeto ativo
-                            if bpy.context.active_object.type=='MESH' or bpy.context.active_object.type=='CAMERA' or \
-                                                                            bpy.context.active_object.type=='EMPTY':
-                                if bEixo:
-                                    if bEixoX: bpy.context.active_object.location.x = ival*iEixoXneg+iMinBaseX
-                                    if bEixoY: bpy.context.active_object.location.y = ival*iEixoYneg+iMinBaseY
-                                    if bEixoZ: bpy.context.active_object.location.z = ival*iEixoZneg+iMinBaseZ
-
-                                if bEscala:
-                                    if bEscalaX: bpy.context.active_object.scale.x = ival*iEscalaXneg+iMinScaleBaseX
-                                    if bEscalaY: bpy.context.active_object.scale.y = ival*iEscalaYneg+iMinScaleBaseY
-                                    if bEscalaZ: bpy.context.active_object.scale.z = ival*iEscalaZneg+iMinScaleBaseZ
-
-                            # 'ARMATURE' or ('MESH' and bRotacao) or ('CAMERA' and bRotacao) or 'LAMP' or 'EMPTY' and bRotacao)
-                            if bpy.context.active_object.type=='ARMATURE' or (bpy.context.active_object.type=='MESH' and bRotacao) or \
-                                                                            (bpy.context.active_object.type=='CAMERA' and bRotacao) or \
-                                                                            bpy.context.active_object.type=='LAMP' or \
-                                                                            (bpy.context.active_object.type=='EMPTY' and bRotacao):
-
-                                    #===========  BONE ===========#
-                                    if bpy.context.active_object.type=='ARMATURE':   #precisa ser objeto ativo. Nao achei como passar para editmode
-                                        if bpy.context.mode!= 'POSE':    #posemode
-                                            bpy.ops.object.posemode_toggle()
-
-                                    #============= ALL ===========#
-                                    if bEixo:
-                                        if ilocationXAnt!=0 or ilocationYAnt!=0 or ilocationZAnt!=0:
-
-                                            bpy.ops.transform.translate(value=(ilocationXAnt*-1,                ilocationYAnt*-1, \
-                                                                                ilocationZAnt*-1),               constraint_axis=(bEixoX, bEixoY,bEixoZ), \
-                                                                                constraint_orientation='GLOBAL', mirror=False, \
-                                                                                proportional='DISABLED',         proportional_edit_falloff='SMOOTH', \
-                                                                                proportional_size=1,             snap=False, \
-                                                                                snap_target='CLOSEST',           snap_point=(0, 0, 0), \
-                                                                                snap_align=False,               snap_normal=(0, 0, 0), \
-                                                                                release_confirm=False)
-
-                                        ilocationX=ilocationY=ilocationZ=0
-                                        if bEixoX: ilocationX = ival*iEixoXneg+iMinBaseX
-                                        if bEixoY: ilocationY = ival*iEixoYneg+iMinBaseY
-                                        if bEixoZ: ilocationZ = ival*iEixoZneg+iMinBaseZ
-
-                                        bpy.ops.transform.translate(value=(ilocationX,                       ilocationY, \
-                                                                            ilocationZ),                      constraint_axis=(bEixoX, bEixoY,bEixoZ), \
-                                                                            constraint_orientation='GLOBAL',  mirror=False, \
-                                                                            proportional='DISABLED',          proportional_edit_falloff='SMOOTH', \
-                                                                            proportional_size=1,              snap=False, \
-                                                                            snap_target='CLOSEST',            snap_point=(0, 0, 0), snap_align=False, \
-                                                                            snap_normal=(0, 0, 0),           release_confirm=False)
-                                        ilocationXAnt= ilocationX
-                                        ilocationYAnt= ilocationY
-                                        ilocationZAnt= ilocationZ
-
-                                    if bEscala:
-                                        if iscaleXAnt!=0 or iscaleYAnt!=0 or iscaleZAnt!=0:
-                                            tmpscaleXAnt=0
-                                            tmpscaleYAnt=0
-                                            tmpscaleZAnt=0
-                                            if iscaleXAnt: tmpscaleXAnt=1/iscaleXAnt
-                                            if iscaleYAnt: tmpscaleYAnt=1/iscaleYAnt
-                                            if iscaleZAnt: tmpscaleZAnt=1/iscaleZAnt
-
-                                            bpy.ops.transform.resize(value=(tmpscaleXAnt,                    tmpscaleYAnt, \
-                                                                            tmpscaleZAnt ),                   constraint_axis=(False, False, False), \
-                                                                            constraint_orientation='GLOBAL',  mirror=False, \
-                                                                            proportional='DISABLED',          proportional_edit_falloff='SMOOTH', \
-                                                                            proportional_size=1, snap=False, snap_target='CLOSEST', \
-                                                                            snap_point=(0, 0, 0),             snap_align=False, \
-                                                                            snap_normal=(0, 0, 0),            release_confirm=False)
-
-                                        iscaleX=iscaleY=iscaleZ=0
-                                        if bEscalaX: iscaleX = ival*iEscalaXneg+iMinScaleBaseX
-                                        if bEscalaY: iscaleY = ival*iEscalaYneg+iMinScaleBaseY
-                                        if bEscalaZ: iscaleZ = ival*iEscalaZneg+iMinScaleBaseZ
-
-                                        bpy.ops.transform.resize(value=(iscaleX,                        iscaleY, \
-                                                                        iscaleZ),                        constraint_axis=(False, False, False), \
-                                                                        constraint_orientation='GLOBAL', mirror=False, \
-                                                                        proportional='DISABLED',         proportional_edit_falloff='SMOOTH', \
-                                                                        proportional_size=1,             snap=False, \
-                                                                        snap_target='CLOSEST',           snap_point=(0, 0, 0), \
-                                                                        snap_align=False,               snap_normal=(0, 0, 0), \
-                                                                        release_confirm=False)
-                                        iscaleXAnt= iscaleX
-                                        iscaleYAnt= iscaleY
-                                        iscaleZAnt= iscaleZ
-
-                                    if bRotacao:
-                                        if iRotateValAnt!=0:
-                                            bpy.context.active_object.rotation_euler= ((iRotateValAnt*-1)+    iRotationAxisBaseX) *bRotationX , \
-                                                                                        ((iRotateValAnt*-1)+  iRotationAxisBaseY) *bRotationY , \
-                                                                                        ((iRotateValAnt*-1)+  iRotationAxisBaseZ) *bRotationZ
-
-                                        bpy.context.active_object.rotation_euler= ((ival*iRotationNeg)+   iRotationAxisBaseX) * bRotationX, \
-                                                                                    ((ival*iRotationNeg)+ iRotationAxisBaseY)  * bRotationY, \
-                                                                                    ((ival*iRotationNeg)+ iRotationAxisBaseZ)  * bRotationZ
-                                        iRotateValAnt= ival*iRotationNeg
-
-                            ob = bpy.context.active_object
-
-                            if bEixo:
-                                ob.keyframe_insert(data_path="location")
-
-                            if bRotacao:
-                                ob.keyframe_insert(data_path="rotation_euler")
-
-                            if bEscala:
-                                ob.keyframe_insert(data_path="scale")
-
-                            print("Importing Blender Frame: "+str(i+obi.RunFrom+1)+"\tof "+str(len(array)-1) + "\tValue: "+ str(ival))
-
-                            obi.iSumImportFrames+=1
-                    # Fim do ELSE otimizador
-                # Fim bNaoValorIgual
-
-            if obi.RunFrom>= tot:
-                bpy.context.scene.frame_current = 1
-                context.scene.imp_sound_to_anim.Info_Import="Done. Imported " + str(obi.iSumImportFrames) + " Frames"
-                from time import strftime
-                print('')
-                print("================================================================")
-                print("Imported: " +str(obi.iSumImportFrames) + " Key Frames")
-                print("Optimizer Pass 1 prepared to optimize: " +str(obi.iSumOptimizerP1) + " blocks of Frames")
-                print("Optimizer Pass 2 has optimized: " +str(obi.iSumOptimizerP2) + " Frames")
-                print("Optimizer Pass 3 has optimized: " +str(obi.iSumOptimizerP3) + " Frames")
-                print("Optimizer has optimized: " +str(obi.iSumOptimizerP1 + obi.iSumOptimizerP2 + obi.iSumOptimizerP3) + " Frames")
-                print(strftime("End Import:  %H:%M:%S - by Vlassius"))
-                print("================================================================")
-                print('')
-                obi.RunFrom=0
-                obi.iSumImportFrames=0
-                obi.iSumOptimizerP1=0
-                obi.iSumOptimizerP2=0
-                obi.iSumOptimizerP3=0
-                return obi.RunFrom
-            else:
-                obi.RunFrom+= loop
-                context.scene.imp_sound_to_anim.Info_Import="Processing Frame " + str(obi.RunFrom+loop) + \
-                                                                            " of " + str(tot-1) + " Frames"
-                return obi.RunFrom
-
-
-    def execute(self, context):
-        #wavimport(context)
-        #return{'FINISHED'}
-        context.scene.imp_sound_to_anim.Working= "wavimport"
-        bpy.ops.wm.modal_timer_operator()
-
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
-
-
-
-#
-#==================================================================================================
-# Button - Sound Process
-#==================================================================================================
-#
-class OBJECT_OT_Botao_Go(bpy.types.Operator):
-    ''''''
-    bl_idname = "import.sound_animation_botao_go"
-    # change in API
-    bl_description = "Process a .wav file, take movement from the sound and import to the scene as Key"
-    bl_label = "Process Wav"
-
-    filter_glob = StringProperty(default="*.wav", options={'HIDDEN'})
-    path = StringProperty(name="File Path", description="Filepath used for importing the WAV file", \
-                                                                            maxlen= 1024, default= "")
-    filename = StringProperty(name="File Name", description="Name of the file")
-    directory = StringProperty(name="Directory", description="Directory of the file")
-
-    RunFrom=0
-    Wave_read=0
-    MaxAudio=0
-
-
-    def SoundConv(File, DivSens, Sensibil, Resol, context, bAutoSense, bRemoveBeat, bUseBeat, bMoreSensible, \
-                                                                            bLessSensible, AudioChannel, loop):
-        obg= OBJECT_OT_Botao_Go
-        #reseta contadores caso seja pedido
-        if context.scene.imp_sound_to_anim.timer_reset_func:
-            obc.RunFrom=0
-            Wave_read=0
-            MaxAudio=0
-            context.scene.imp_sound_to_anim.timer_reset_func=False
-
-        #abre arquivo se primeira rodada
-        if obg.RunFrom==0:
-            try:
-                obg.Wave_read= wave.open(File, 'rb')
-            except IOError as e:
-                print("File Open Error: ", e)
-                return False
-
-        NumCh=      obg.Wave_read.getnchannels()
-        SampW=      obg.Wave_read.getsampwidth() # 8, 16, 24 32 bits
-        FrameR=     obg.Wave_read.getframerate()
-        NumFr=      obg.Wave_read.getnframes()
-        ChkCompr=   obg.Wave_read.getcomptype()
-
-        if ChkCompr != "NONE":
-            print('Sorry, this compressed Format is NOT Supported ', ChkCompr)
-            context.scene.imp_sound_to_anim.Info_Import= "Sorry, this compressed Format is NOT Supported "
-            return False
-
-        if SampW > 2:
-            context.scene.imp_sound_to_anim.Info_Import= "Sorry, supported .wav files 8 and 16 bits only"
-            print('Sorry, supported .wav files 8 and 16 bits only')
-            return False
-
-        context.scene.imp_sound_to_anim.Info_Import=""
-
-        # controla numero do canal
-        if AudioChannel > NumCh:
-            if obg.RunFrom==0:
-                print("Channel number " + str(AudioChannel) + " is selected but this audio file has just " + \
-                                                            str(NumCh) + " channels, so selecting channel " \
-                                                                                            + str(NumCh) + "!")
-            AudioChannel = NumCh
-
-        # apenas para por na tela
-        tmpAudioChannel= AudioChannel
-
-        #used in index sum to find the channe, adjust to first byte sample index
-        AudioChannel -= 1
-
-        # se dois canais, AudioChannel=4 porque sao 4 bytes
-        if SampW ==2:  AudioChannel*=2
-
-        # usado para achar contorno da onda - achando picos
-        # numero de audio frames para cada video frame
-        BytesResol= int(FrameR/Resol)
-
-        # com 8 bits/S - razao Sample/s por resolucao
-        # tamanho do array
-        BytesDadosTotProcess= NumFr // BytesResol
-
-        if obg.RunFrom==0:   # primeira rodada
-            # inicia array
-            _Interna_Globals(BytesDadosTotProcess, context)
-            print('')
-            print("================================================================")
-            from time import strftime
-            print(strftime("Go!  %H:%M:%S"))
-            print("================================================================")
-            print('')
-            print('Total Audio Time: \t ' + str(NumFr//FrameR) + 's (' + str(NumFr//FrameR//60) + 'min)')
-            print('Total # Interactions: \t', BytesDadosTotProcess)
-            print('Total Audio Frames: \t', NumFr)
-            print('Frames/s: \t\t ' + str(FrameR))
-            print('# Chanels in File: \t', NumCh)
-            print('Channel to use:\t\t', tmpAudioChannel)
-            print('Bit/Sample/Chanel: \t ' + str(SampW*8))
-            print('# Frames/Act: \t\t', DivSens)
-
-            if bAutoSense==0:
-                print('Audio Sensitivity: \t', Sensibil+1)
-            else:
-                print('Using Auto Audio Sentivity. This is pass 1 of 2.')
-
-            print('')
-            print ("Sample->[value]\tAudio Frame #   \t\t[Graph Value]")
-
-        if obg.RunFrom==0 and bAutoSense!=0:
-            Sensibil=0  # if auto sense, Sensibil must be zero here
-            obg.MaxAudio=0  # valor maximo de audio encontrado
-
-        # verifica limite total do audio
-        looptot= int(BytesDadosTotProcess // DivSens)
-        if obg.RunFrom+loop > looptot:
-            loop= looptot-obg.RunFrom
-
-        j=0  # usado de indice
-        # laco total leitura bytes
-        # armazena dado de pico
-        for jj in range(loop):
-            # caso de 2 canais (esterio)
-            # uso apenas 2 bytes em 16 bits, ie, apenas canal esquerdo
-            # [0] e [1] para CH L
-            # [2] e [3] para CH R   and so on
-            # mono:1 byte to 8 bits, 2 bytes to 16 bits
-            # sterio: 2 byte to 8 bits, 4 bytes to 16 bits
-            ValorPico=0
-            # leio o numero de frames de audio para cada frame de video, valor em torno de 1000
-            for i in range(BytesResol):
-                #loop exterior copia DivSens frames a cada frame calculado
-                frame = obg.Wave_read.readframes(DivSens)
-
-                if len(frame)==0: break
-
-                if bAutoSense==0:    # AutoAudioSense Desligado
-                    if SampW ==1:
-                        if Sensibil ==5:
-                            frame0= frame[AudioChannel] << 6 & 255
-
-                        elif Sensibil ==4:
-                            frame0= frame[AudioChannel] << 5 & 255
-
-                        elif Sensibil ==3:
-                            frame0= frame[AudioChannel] << 4 & 255
-
-                        elif Sensibil ==2:
-                            frame0= frame[AudioChannel] << 3 & 255
-
-                        elif Sensibil ==1:
-                            frame0= frame[AudioChannel] << 2 & 255
-
-                        elif Sensibil ==0:
-                            frame0= frame[AudioChannel]
-
-                        if frame0> ValorPico:
-                            ValorPico= frame0
-
-                    if SampW ==2:   # frame[0] baixa       frame[1] ALTA BIT 1 TEM SINAL!
-                        if frame[1+AudioChannel] <127:    # se bit1 =0, usa o valor - se bit1=1 quer dizer numero negativo
-                            if Sensibil ==0:
-                                frame0= frame[1+AudioChannel]
-
-                            elif Sensibil ==4:
-                                frame0= ((frame[AudioChannel] & 0b11111100) >> 2) | ((frame[1+AudioChannel] & 0b00000011) << 6)
-
-                            elif Sensibil ==3:
-                                frame0= ((frame[AudioChannel] & 0b11110000) >> 4) | ((frame[1+AudioChannel] & 0b00001111) << 4)
-
-                            elif Sensibil ==2:
-                                frame0= ((frame[AudioChannel] & 0b11100000) >> 5) | ((frame[1+AudioChannel] & 0b00011111) << 3)
-
-                            elif Sensibil ==1:
-                                frame0= ((frame[AudioChannel] & 0b11000000) >> 6) | ((frame[1+AudioChannel] & 0b00111111) << 2)
-
-                            elif Sensibil ==5:
-                                frame0=frame[AudioChannel]
-
-                            if frame0 > ValorPico:
-                                ValorPico= frame0
-
-                else:   # AutoAudioSense Ligado
-                    if SampW ==1:
-                        if frame[AudioChannel]> obg.MaxAudio:
-                            obg.MaxAudio = frame[AudioChannel]
-
-                        if frame[AudioChannel]> ValorPico:
-                            ValorPico=frame[AudioChannel]
-
-                    if SampW ==2:
-                        if frame[1+AudioChannel] < 127:
-                            tmpValorPico= frame[1+AudioChannel] << 8
-                            tmpValorPico+=  frame[AudioChannel]
-
-                            if tmpValorPico > obg.MaxAudio:
-                                obg.MaxAudio = tmpValorPico
-
-                            if tmpValorPico > ValorPico:
-                                ValorPico= tmpValorPico
-
-            if bAutoSense==0:    #autoaudiosense desligado
-                # repito o valor de frames por actions (OTIMIZAR)
-                for ii in range(DivSens):
-                    array[j+obg.RunFrom]=ValorPico  # valor de pico encontrado
-                    j +=1           # incrementa indice prox local
-            else:
-                idx=obg.RunFrom*2 # porque sao dois bytes
-                arrayAutoSense[j+idx]= (ValorPico & 0b0000000011111111) #copia valores baixos
-                arrayAutoSense[j+1+idx]= (ValorPico & 0b1111111100000000) >> 8   #copia valores altos
-                j+=2
-
-            if bAutoSense==0:    #autoaudiosense desligado
-                igraph= ValorPico//10
-            else:
-                if SampW ==2:
-                    igraph= ValorPico//1261
-
-                else:
-                    igraph= ValorPico//10
-
-            stgraph="["
-            for iii in range(igraph):
-                stgraph+="+"
-
-            for iiii in range(26-igraph):
-                stgraph+=" "
-            stgraph+="]"
-
-            print ("Sample-> " + str(ValorPico) + "\tAudio Frame #  " + str(jj+obg.RunFrom) + " of " + str(looptot-1) + "\t"+ stgraph)
-
-        # acabou primeira fase roda toda de uma vez
-        if obg.RunFrom+loop == looptot:
-            if bAutoSense==1:
-                print("")
-                print("================================================================")
-                print('Calculating Auto Audio Sentivity, pass 2 of 2.')
-                print("================================================================")
-
-                # caso usar batida, procurar por valores proximos do maximo e zerar restante.
-                # caso retirar batida, zerar valores proximos do maximo
-                UseMinim=0
-                UseMax=0
-
-                if bUseBeat==1:
-                    print("Trying to use just the beat.")
-                    UseMinim= obg.MaxAudio*0.8
-                    if bMoreSensible:
-                        UseMinim= obg.MaxAudio*0.7
-                    elif bLessSensible:
-                        UseMinim= obg.MaxAudio*0.9
-
-                if bRemoveBeat==1:
-                    print("Trying to exclude the beat.")
-                    UseMax= obg.MaxAudio*0.7
-                    if bMoreSensible:
-                        UseMax= obg.MaxAudio*0.8
-                    elif bLessSensible:
-                        UseMax= obg.MaxAudio*0.7
-
-                print("")
-                # para transformar 15 bits em 8 calibrando valor maximo -> fazer regra de 3
-                # obg.MaxAudio -> 255
-                # outros valores => valor calibrado= (255 * Valor) / obg.MaxAudio
-                scale= 255/obg.MaxAudio
-
-                j=0
-                jj=0
-                print ("Sample->[value]\tAudio Frame #    \t\t[Graph Value]")
-
-                for i in range(BytesDadosTotProcess // DivSens):
-
-                    ValorOriginal= arrayAutoSense[j+1] << 8
-                    ValorOriginal+= arrayAutoSense[j]
-
-                    if bUseBeat==1:
-                        if ValorOriginal < UseMinim:
-                            ValorOriginal = 0
-
-                    elif bRemoveBeat==1:
-                        if ValorOriginal > UseMax:
-                            ValorOriginal = 0
-
-                    ValorOriginal= ((round(ValorOriginal * scale)) & 0b11111111)    #aplica a escala
-
-                    for ii in range(DivSens):
-                        array[jj] = ValorOriginal
-                        jj += 1   # se autoaudiosense, o array tem dois bytes para cada valor
-
-                    j+=2
-                    igraph= round(array[jj-1]/10)
-                    stgraph="["
-                    for iii in range(igraph):
-                        stgraph+="+"
-
-                    for iiii in range(26-igraph):
-                        stgraph+=" "
-                    stgraph+="]"
-                    print ("Sample-> " + str(array[jj-1]) + "\tAudio Frame #  " + str(i) + " of " + str(looptot-1) + "\t"+ stgraph)
-
-                #limpa array tmp
-                del arrayAutoSense[:]
-
-            # mensagens finais
-            context.scene.imp_sound_to_anim.Info_Import= "Click \"Import Key frames\" to begin import" #this set the initial text
-
-            print("================================================================")
-            from time import strftime
-            print(strftime("End Process:  %H:%M:%S"))
-            print("================================================================")
-
-            try:
-                obg.Wave_read.close()
-            except:
-                print('File Close Error')
-
-            obg.RunFrom=0
-            return obg.RunFrom   # acabou tudo
-
-        else:#ainda nao acabou o arquivo todo if RunFrom+loop = looptot:
-            context.scene.imp_sound_to_anim.Info_Import="Processing " + str(obg.RunFrom) + " of " + str(looptot) +" Audio Frames"
-            # force update info text in UI
-            bpy.context.scene.frame_current= bpy.context.scene.frame_current
-            obg.RunFrom+=loop
-            return obg.RunFrom
-
-
-
-
-    def ProcessaSom(context, loop):
-        obg= OBJECT_OT_Botao_Go
-        # para de entrar o timer
-        context.scene.imp_sound_to_anim.Working=""
-        #reseta contadores caso seja pedido
-        if context.scene.imp_sound_to_anim.timer_reset_func:
-            obg.RunFrom=0
-            context.scene.imp_sound_to_anim.timer_reset_func=False
-
-        import os
-        f= os.path.join(context.scene.imp_sound_to_anim.directory, context.scene.imp_sound_to_anim.filename)
-        f= os.path.normpath(f)
-
-        if obg.RunFrom==0:
-            print ("")
-            print ("")
-            print ("Selected file = ",f)
-        checktype = f.split('\\')[-1].split('.')[1]
-        if checktype.upper() != 'WAV':
-            print ("ERROR!! Selected file = ", f)
-            print ("ERROR!! Its not a .wav file")
-            return
-
-        #sensibilidade volume do audio 0 a 5. Quanto maior, mais sensibilidade
-        iAudioSensib= int(context.scene.imp_sound_to_anim.audio_sense)-1
-        if iAudioSensib <0: iAudioSensib=0
-        elif iAudioSensib>5: iAudioSensib=5
-
-        #act/s nao pode se maior que frames/s
-        if context.scene.imp_sound_to_anim.action_per_second > context.scene.imp_sound_to_anim.frames_per_second:
-            context.scene.imp_sound_to_anim.action_per_second = context.scene.imp_sound_to_anim.frames_per_second
-
-        #Frames por segundo para key frame
-        iFramesPorSeg= int(context.scene.imp_sound_to_anim.frames_per_second)
-
-        #Sensibilidade de movimento. 3= 3 movimentos por segundo
-        iMovPorSeg= int(context.scene.imp_sound_to_anim.action_per_second)
-
-        #iDivMovPorSeg Padrao - taxa 4/s ou a cada 0,25s  => iFramesPorSeg/iDivMovPorSeg= ~0.25
-        for i in range(iFramesPorSeg):
-            iDivMovPorSeg=iFramesPorSeg/(i+1)
-            if iFramesPorSeg/iDivMovPorSeg >=iMovPorSeg:
-                break
-
-        bRemoveBeat=    context.scene.imp_sound_to_anim.remove_beat
-        bUseBeat=       context.scene.imp_sound_to_anim.use_just_beat
-        bLessSensible=  context.scene.imp_sound_to_anim.beat_less_sensible
-        bMoreSensible=  context.scene.imp_sound_to_anim.beat_more_sensible
-        AudioChannel=   context.scene.imp_sound_to_anim.audio_channel_select
-
-        # chama funcao de converter som, retorna preenchendo _Interna_Globals.array
-        index= OBJECT_OT_Botao_Go.SoundConv(f, int(iDivMovPorSeg), iAudioSensib, iFramesPorSeg, context, \
-                                    context.scene.imp_sound_to_anim.action_auto_audio_sense, bRemoveBeat, \
-                                    bUseBeat, bMoreSensible, bLessSensible, AudioChannel, loop)
-        return index
-
-
-    def execute(self, context):
-
-        # copia dados dialof open wave
-        context.scene.imp_sound_to_anim.filter_glob= self.filter_glob
-        context.scene.imp_sound_to_anim.path = self.path
-        context.scene.imp_sound_to_anim.filename = self.filename
-        context.scene.imp_sound_to_anim.directory = self.directory
-
-        context.scene.imp_sound_to_anim.Working= "ProcessaSom"
-        bpy.ops.wm.modal_timer_operator()
-        #ProcessaSom(context)
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        #need to set a path so so we can get the file name and path
-        wm = context.window_manager
-        wm.fileselect_add(self)
-
-        return {'RUNNING_MODAL'}
-
-
-#
-#==================================================================================================
-# Button - Check Smart Render
-#==================================================================================================
-#
-class OBJECT_OT_Botao_Check_SmartRender(bpy.types.Operator):
-    '''Check for Reduction'''
-    bl_idname = "import.sound_animation_botao_check_smartrender"
-    bl_label = "Check Smart Render"
-
-    RunFrom=0
-    Frames_Renderizar=0
-    Frames_Pular=0
-
-    def CheckSmartRender(context, loop):
-        obc= OBJECT_OT_Botao_Check_SmartRender
-
-        #reseta contadores caso seja pedido
-        if context.scene.imp_sound_to_anim.timer_reset_func:
-            obc.RunFrom=0
-            obc.Frames_Pular=0
-            obc.Frames_Renderizar=0
-            context.scene.imp_sound_to_anim.timer_reset_func=False
-
-        if obc.RunFrom==0:
-            if loop !=1: # loop==1 quando estou chamando de dentro da funcao render
-                print("")
-                print("================================================================")
-                print('Running Check Smart Render...')
-
-        #garante ao menos locrotscale ligado
-        if context.scene.imp_sound_to_anim.check_smartrender_loc_rot_sc==False and \
-                        context.scene.imp_sound_to_anim.check_smartrender_material_basic==False and \
-                        context.scene.imp_sound_to_anim.check_smartrender_material_transparence==False and \
-                        context.scene.imp_sound_to_anim.check_smartrender_material_mirror==False:
-            context.scene.imp_sound_to_anim.check_smartrender_loc_rot_sc=True
-
-        chkLocRotSc=  context.scene.imp_sound_to_anim.check_smartrender_loc_rot_sc
-        chkMatBas=    context.scene.imp_sound_to_anim.check_smartrender_material_basic
-        chkMatTransp= context.scene.imp_sound_to_anim.check_smartrender_material_transparence
-        chkMatMirror= context.scene.imp_sound_to_anim.check_smartrender_material_mirror
-
-        ToRender=[]
-        origloop=loop
-        from copy import copy
-        RunMax= bpy.context.scene.frame_end - bpy.context.scene.frame_start+1
-        if obc.RunFrom+loop > RunMax:
-            loop= RunMax-obc.RunFrom
-            if loop<=0:   #acabou
-                if origloop !=1: # loop==1 quando estou chamando de dentro da funcao render
-                    print("")
-                    print("Frames to copy: " + str(obc.Frames_Pular) + " Frames to really render= " + str(obc.Frames_Renderizar))
-                    print("================================================================")
-                    print("")
-                obc.RunFrom=0
-                obc.Frames_Pular=0
-                obc.Frames_Renderizar=0
-                return (ToRender, obc.RunFrom)
-
-        #move para o primeiro frame a renderizar
-        #RunFrom inicia em zero - frames inicia em 1
-        bpy.context.scene.frame_current = obc.RunFrom+bpy.context.scene.frame_start
-
-        for k in range(loop):
-            if obc.RunFrom==0 and k==0: #primeiro sempre renderiza
-                ToRender.append(bpy.context.scene.frame_current)
-                obc.Frames_Renderizar+=1
-                bpy.context.scene.frame_set(bpy.context.scene.frame_current + 1)
-            else:
-                if origloop !=1: # loop==1 quando estou chamando de dentro da funcao render
-                    import sys
-                    sys.stdout.write("\rChecking Frame "+str(bpy.context.scene.frame_current) + "  ")
-                    sys.stdout.flush()
-                #buffer de todos os objetos
-                a=[]
-                for obj in bpy.data.objects:
-                    if chkLocRotSc:
-                        # loc rot scale
-                        a.append(copy(obj.location))
-                        a.append(copy(obj.rotation_euler))
-                        a.append(copy(obj.scale))
-                    if hasattr(obj.data, 'materials') and obj.data.materials.keys()!=[] :
-                        if bpy.context.scene.render.engine == "BLENDER_RENDER":
-                            #pega somente primeiro material sempre
-                            if chkMatBas:
-                                # cores
-                                a.append(copy(obj.data.materials[0].type))
-                                a.append(copy(obj.data.materials[0].emit))
-                                a.append(copy(obj.data.materials[0].diffuse_color))
-                                a.append(copy(obj.data.materials[0].diffuse_intensity))
-                                a.append(copy(obj.data.materials[0].specular_intensity))
-                                a.append(copy(obj.data.materials[0].specular_color))
-                                a.append(copy(obj.data.materials[0].alpha))
-                                a.append(copy(obj.data.materials[0].diffuse_shader))
-                                a.append(copy(obj.data.materials[0].specular_shader))
-                                a.append(copy(obj.data.materials[0].specular_hardness))
-
-                            if chkMatTransp:
-                                # transp
-                                a.append(copy(obj.data.materials[0].transparency_method))
-                                a.append(copy(obj.data.materials[0].specular_alpha))
-                                a.append(copy(obj.data.materials[0].raytrace_transparency.fresnel))
-                                a.append(copy(obj.data.materials[0].raytrace_transparency.ior))
-                                a.append(copy(obj.data.materials[0].raytrace_transparency.filter))
-                                a.append(copy(obj.data.materials[0].raytrace_transparency.depth))
-                                a.append(copy(obj.data.materials[0].translucency))
-                                a.append(copy(obj.data.materials[0].specular_alpha))
-
-                            if chkMatMirror:
-                                #mirror
-                                a.append(copy(obj.data.materials[0].raytrace_mirror.reflect_factor))
-                                a.append(copy(obj.data.materials[0].raytrace_mirror.fresnel))
-                                a.append(copy(obj.data.materials[0].raytrace_mirror.fresnel_factor))
-                                a.append(copy(obj.data.materials[0].mirror_color))
-                                a.append(copy(obj.data.materials[0].raytrace_mirror.depth))
-                                a.append(copy(obj.data.materials[0].raytrace_mirror.gloss_factor))
-
-                # tenho todos os objetos em a[]
-                # incrementar um frame e checar se eh igual
-                bpy.context.scene.frame_set(bpy.context.scene.frame_current + 1)
-
-                j=0
-                dif=0
-                for obj in bpy.data.objects:
-                    if chkLocRotSc:
-                        if a[j]!= obj.location or a[j+1]!= obj.rotation_euler or a[j+2]!= obj.scale:
-                            dif=1
-                            #break
-                        j+=3
-
-                    if hasattr(obj.data, 'materials') and obj.data.materials.keys()!=[] :
-                        if bpy.context.scene.render.engine == "BLENDER_RENDER":
-                            if chkMatBas:
-                                # cores
-                                if a[j]!= obj.data.materials[0].type or   a[j+1]!= obj.data.materials[0].emit or \
-                                                                            a[j+2]!= obj.data.materials[0].diffuse_color or \
-                                                                            a[j+3]!= obj.data.materials[0].diffuse_intensity or \
-                                                                            a[j+4]!= obj.data.materials[0].specular_intensity or \
-                                                                            a[j+5]!= obj.data.materials[0].specular_color or \
-                                                                            a[j+6]!= obj.data.materials[0].alpha or \
-                                                                            a[j+7]!= obj.data.materials[0].diffuse_shader or \
-                                                                            a[j+8]!= obj.data.materials[0].specular_shader or \
-                                                                            a[j+9]!= obj.data.materials[0].specular_hardness:
-                                    dif=1
-                                    print("mat")
-                                    j+= 10  # ajusta ponteiro j
-                                    if chkMatTransp: j+=8
-                                    if chkMatMirror: j+=6
-                                    break
-                                j+=10
-
-                            if chkMatTransp:
-                                #transp
-                                if a[j]!= obj.data.materials[0].transparency_method or    a[j+1]!= obj.data.materials[0].specular_alpha or \
-                                                                                            a[j+2]!= obj.data.materials[0].raytrace_transparency.fresnel or \
-                                                                                            a[j+3]!= obj.data.materials[0].raytrace_transparency.ior or \
-                                                                                            a[j+4]!= obj.data.materials[0].raytrace_transparency.filter or \
-                                                                                            a[j+5]!= obj.data.materials[0].raytrace_transparency.depth or \
-                                                                                            a[j+6]!= obj.data.materials[0].translucency or \
-                                                                                            a[j+7]!= obj.data.materials[0].specular_alpha:
-                                    dif=1
-                                    j+= 8     # ajusta ponteiro j
-                                    if chkMatMirror: j+=6
-
-                                    break
-                                j+=8
-
-                            if chkMatMirror:
-                                #mirror
-                                if a[j]!= obj.data.materials[0].raytrace_mirror.reflect_factor or a[j+1]!= obj.data.materials[0].raytrace_mirror.fresnel or \
-                                                                                                    a[j+2]!= obj.data.materials[0].raytrace_mirror.fresnel_factor or \
-                                                                                                    a[j+3]!= obj.data.materials[0].mirror_color or \
-                                                                                                    a[j+4]!= obj.data.materials[0].raytrace_mirror.depth or \
-                                                                                                    a[j+5]!= obj.data.materials[0].raytrace_mirror.gloss_factor:
-                                    dif=1
-                                    j+= 6     # ajusta ponteiro j
-                                    break
-                                j+=6
-                # finaliza
-                if dif==0:
-                    obc.Frames_Pular+=1
-                else:
-                    obc.Frames_Renderizar+=1
-                    ToRender.append(bpy.context.scene.frame_current)
-
-                del a
-        # para nao sair do index - nunca chega nesse frame
-        ToRender.append(bpy.context.scene.frame_end+1)
-
-        if obc.RunFrom+loop < RunMax:
-            context.scene.imp_sound_to_anim.Info_check_smartrender= "["+str(obc.RunFrom+loop) + "/" + \
-                                        str(RunMax) + "] Frames to Render= " + str(obc.Frames_Renderizar) + \
-                                        " -> Reduction " + str(round((obc.Frames_Pular/RunMax)*100,1)) + "%"
-        else:
-            context.scene.imp_sound_to_anim.Info_check_smartrender= "Frames to Render= " + str(obc.Frames_Renderizar) + \
-                                                    " -> Reduction " + str(round((obc.Frames_Pular/RunMax)*100,1)) + "%"
-
-        #incrementa indice
-        obc.RunFrom+= loop
-        return (ToRender, obc.RunFrom)
-
-    def execute(self, context):
-        context.scene.imp_sound_to_anim.Working= "CheckSmartRender"
-        #context.scene.imp_sound_to_anim.timer_reset_func=True
-        bpy.ops.wm.modal_timer_operator()
-        #CheckSmartRender(context)
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
-
-
-#
-#==================================================================================================
-# Button - Smart Render
-#==================================================================================================
-#
-class OBJECT_OT_Botao_SmartRender(bpy.types.Operator):
-    '''Render Only Modified Frames and Copy the Others'''
-    bl_idname = "import.sound_animation_smart_render"
-    bl_label = "Smart Render"
-
-    BaseRenderToCopy=0
-
-    def SmartRender(context):
-        obs=OBJECT_OT_Botao_SmartRender
-
-        index=0
-        pad=4
-        #calcula zero pad
-        if bpy.context.scene.frame_end //1000000 > 0:  #default 999999 1000000//1000000=1
-            pad=7
-        elif bpy.context.scene.frame_end //100000 > 0:  #default 99999 100000//100000=1
-            pad=6
-        elif bpy.context.scene.frame_end //10000 > 0:  #default 9999 10000//10000=1
-            pad=5
-
-        #bpy.data.images['Render Result'].file_format ='PNG'
-        bpy.context.scene.render.image_settings.file_format = 'PNG'
-
-        #info dos arquivos
-        path= bpy.context.scene.render.filepath
-
-        import shutil
-
-        tot=bpy.context.scene.frame_end - bpy.context.scene.frame_start+1
-        i=0
-        # checa apenas 1 frame    o indice é interno em ChackSmartRender
-        r= OBJECT_OT_Botao_Check_SmartRender.CheckSmartRender(context, 1)
-        ToRender= r[0] # tem numero do frame se for para renderizar
-        index= r[1]
-
-        #copia frame atual  #se o frame ja não foi renderizado
-        if (obs.BaseRenderToCopy!=(index+bpy.context.scene.frame_start-1)) and index > 1:   #index!=1 and index !=0:
-            print("Copying: " + str(obs.BaseRenderToCopy) + "-> " + str(index+bpy.context.scene.frame_start-1) + \
-                                "  To " + path + str(index+bpy.context.scene.frame_start-1).zfill(pad)  + ".png")
-            shutil.copy2(path + str(obs.BaseRenderToCopy).zfill(pad)  + ".png", path + \
-                        str(index+bpy.context.scene.frame_start-1).zfill(pad)  + ".png")
-
-        if ToRender.__len__()>1:   #renderizar 1 item em ToRender nao renderiza, (sempre vem com no minimo 1)
-            if index==1:
-                print("================================================================")
-                from time import strftime
-                print(strftime("Running Smart Render:  %H:%M:%S"))
-                print("================================================================")
-                BaseRenderToCopy=0
-
-            if ToRender[0] <= bpy.context.scene.frame_end:
-                #renderiza proximo frame
-                print("Rendering-> " + str(ToRender[0]))
-                obs.BaseRenderToCopy= ToRender[0]
-                bpy.ops.render.render(animation=False, write_still=False)
-                bpy.data.images['Render Result'].save_render(filepath=path + str(ToRender[0]).zfill(pad)  + ".png")
-                i+=1
-
-        if index==tot:
-            print("================================================================")
-            from time import strftime
-            print(strftime("Finish Render:  %H:%M:%S"))
-            print("================================================================")
-            print(".")
-
-        if index==tot+1:
-            obs.BaseRenderToCopy=0
-            return 0
-
-        return index
-
-
-    def execute(self, context):
-        # se for CYCLES, nao funciona com timer, preciso rodar direto
-        context.scene.imp_sound_to_anim.Working= "SmartRender"
-        bpy.ops.wm.modal_timer_operator()
-        #SmartRender(context)
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
-
-
-
-#
-#==================================================================================================
-# Button - Cancel
-#==================================================================================================
-#
-class OBJECT_OT_Botao_Cancel(bpy.types.Operator):
-    '''Cancel Actual Operation'''
-    bl_idname = "import.sound_animation_botao_cancel"
-    bl_label = "CANCEL"
-
-    def execute(self, context):
-        context.scene.imp_sound_to_anim.cancel_button_hit=True
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
-
-
-#
-#==================================================================================================
-#     TIMER - controla a execucao das funcoes
-#           Responsavel por rodar em partes usando o timer e possibilitando
-#           o cancelamento e textos informativos
-#==================================================================================================
-#
-class ModalTimerOperator(bpy.types.Operator):
-    """Internal Script Control"""
-    bl_idname = "wm.modal_timer_operator"
-    bl_label = "Internal Script Control"
-
-    _timer = None
-    Running= False
-
-    def CheckRunStop(self, context, func, index):
-        # forca update do UI
-        bpy.context.scene.frame_set(bpy.context.scene.frame_current)
-        if index!=0:
-            #configura timer para a funcao
-            context.scene.imp_sound_to_anim.Working= func
-            self.Running=True
-            return {'PASS_THROUGH'}
-        else: # posso desligar o timer e modal
-            if self._timer!= None:
-                context.window_manager.event_timer_remove(self._timer)
-                self._timer= None
-            return {'FINISHED'}
-
-
-    def modal(self, context, event):
-        if event.type == 'ESC'and self.Running:
-            print("-- ESC Pressed --")
-            self.cancel(context)
-            context.scene.imp_sound_to_anim.Working=""
-            self.Running=False
-            #reseta contadores
-            context.scene.imp_sound_to_anim.timer_reset_func=True
-            # forca update do UI
-            bpy.context.scene.frame_set(bpy.context.scene.frame_current)
-            return {'CANCELLED'}
-
-        if event.type == 'TIMER':
-            #print("timer")
-            #CheckSmartRender
-            if context.scene.imp_sound_to_anim.Working== "CheckSmartRender":
-                self.parar(context)
-                #5= frames para rodar antes de voltar    [1]= indice de posicao atual
-                index= OBJECT_OT_Botao_Check_SmartRender.CheckSmartRender(context, 5)[1]
-                return self.CheckRunStop(context, "CheckSmartRender", index)
-
-            #SmartRender
-            elif context.scene.imp_sound_to_anim.Working== "SmartRender":
-                self.parar(context)
-                #render/copia 1 e volta     index>=0 indice posicao atual
-                index= OBJECT_OT_Botao_SmartRender.SmartRender(context)
-                return self.CheckRunStop(context, "SmartRender", index)
-
-            #ProcessaSom
-            elif context.scene.imp_sound_to_anim.Working== "ProcessaSom":
-                self.parar(context)
-                # loop = numero de frames de audio    index=0 se terminou ou >0 se não acabou
-                index= OBJECT_OT_Botao_Go.ProcessaSom(context, 50)
-                return self.CheckRunStop(context, "ProcessaSom", index)
-
-            #wavimport(context)
-            elif context.scene.imp_sound_to_anim.Working== "wavimport":
-                self.parar(context)
-                # 5= numero de frames to import por timer
-                index=OBJECT_OT_Botao_Import.wavimport(context, 50)
-                return self.CheckRunStop(context, "wavimport", index)
-
-            #passa por aqui quando as funcoes estao sendo executadas mas
-            #configuradas para nao entrar porque  context.scene.imp_sound_to_anim.Working== ""
-            return {'PASS_THROUGH'}
-
-        # reseta e para tudo botao CANCEL pressionado
-        if context.scene.imp_sound_to_anim.cancel_button_hit==True:
-            context.scene.imp_sound_to_anim.Working=""
-            #pede reset contadores
-            context.scene.imp_sound_to_anim.timer_reset_func=True
-            if self._timer!= None:
-                context.window_manager.event_timer_remove(self._timer)
-                self._timer= None
-            print("-- Cancel Pressed --")
-            context.scene.imp_sound_to_anim.cancel_button_hit=False
-            return {'FINISHED'}
-
-        #print("modal")
-
-        # se o timer esta ativado, continua, (senao termina).
-        # desligar a chamada ao modal se caso chegar aqui (nao deveria)
-        if self._timer!= None:
-            return{'PASS_THROUGH'}
-        else:
-            return {'FINISHED'}
-
-    def execute(self, context):
-        if self._timer==None:
-            self._timer = context.window_manager.event_timer_add(0.2, context.window)
-            context.window_manager.modal_handler_add(self)
-        #para deixar rodar sem deligar o timer
-        context.scene.imp_sound_to_anim.timer_desligar=False
-        self.Running=True
-        return {'RUNNING_MODAL'}
-
-    def cancel(self, context):
-        if self._timer!= None:
-            context.window_manager.event_timer_remove(self._timer)
-        self._timer= None
-        return {'CANCELLED'}
-
-    def parar(self, context):
-        if self.Running:
-            context.scene.imp_sound_to_anim.Working=""
-            self.Running=False
-
-
-
-#
-#==================================================================================================
-#     Register - Unregister - MAIN
-#==================================================================================================
-#
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.Scene.imp_sound_to_anim = PointerProperty(type=ImpSoundtoAnim, name="Import: Sound to Animation", description="Extract movement from sound file. See the Object Panel at the end.")
-    bpy.types.INFO_MT_file_import.append(WavFileImport)
-
-def unregister():
-
-    try:
-        bpy.utils.unregister_module(__name__)
-    except:
-        pass
-
-    try:
-        bpy.types.INFO_MT_file_import.remove(WavFileImport)
-    except:
-        pass
-
-
-
-if __name__ == "__main__":
-    register()
-
-
-
-
diff --git a/release/scripts/addons_contrib/io_import_voodoo_camera.py b/release/scripts/addons_contrib/io_import_voodoo_camera.py
deleted file mode 100644
index 887cc60..0000000
--- a/release/scripts/addons_contrib/io_import_voodoo_camera.py
+++ /dev/null
@@ -1,331 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Import Voodoo camera",
-    "author": "Fazekas Laszlo",
-    "version": (0, 8),
-    "blender": (2, 6, 3),
-    "location": "File > Import > Voodoo camera",
-    "description": "Imports a Blender (2.4x or 2.5x) Python script from the Voodoo (version 1.1 or 1.2) camera tracker software.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Import-Export/Voodoo_camera",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=22510",
-    "category": "Import-Export"}
-
-"""
-This script loads a Blender Python script from the Voodoo camera
-tracker program into Blender 2.5x+.
-
-It processes the script as a text file and not as a Python executable
-because of the incompatible Python APIs of Blender 2.4x/2.5x/2.6x.
-"""
-
-import bpy
-from bpy.props import *
-import mathutils
-import os
-import string
-import math
-
-def voodoo_import(infile,ld_cam,ld_points):
-
-    checktype = os.path.splitext(infile)[1]
-
-    if checktype.upper() != '.PY':
-        print ("Selected file: ",infile)
-        raise IOError("The selected input file is not a *.py file")
-        return
-
-    print ("--------------------------------------------------")
-    print ("Importing Voodoo file: ", infile)
-
-    file = open(infile,'rU')
-    scene = bpy.context.scene
-    initfr = scene.frame_current
-    b24= True
-    voodoo_import.frwas= False
-
-    dummy = bpy.data.objects.new('voodoo_scene', None)
-    dummy.location = (0.0, 0.0, 0.0)
-    dummy.rotation_euler = ( -3.141593/2, 0.0, 0.0)
-    dummy.scale = (0.2, 0.2, 0.2)
-    scene.objects.link(dummy)
-
-    if ld_cam:
-        data = bpy.data.cameras.new('voodoo_render_cam')
-        data.lens_unit= 'DEGREES'
-        vcam = bpy.data.objects.new('voodoo_render_cam', data)
-        vcam.location = (0.0, 0.0, 0.0)
-        vcam.rotation_euler = (0.0, 0.0, 0.0)
-        vcam.scale = (1.0, 1.0, 1.0)
-        data.lens = 35.0
-        data.shift_x = 0.0
-        data.shift_y = 0.0
-        data.dof_distance = 0.0
-        data.clip_start = 0.1
-        data.clip_end = 1000.0
-        data.draw_size = 0.5
-        scene.objects.link(vcam)
-        vcam.parent = dummy
-
-    if ld_points:
-        data = bpy.data.meshes.new('voodoo_FP3D_cloud')
-        mesh = bpy.data.objects.new('voodoo_FP3D_cloud', data)
-        mesh.location = (0.0, 0.0, 0.0)
-        # before 6.3
-        # mesh.rotation_euler = (3.141593/2, 0.0, 0.0)
-        # mesh.scale = (5.0, 5.0, 5.0)
-        mesh.rotation_euler = (0.0, 0.0, 0.0)
-        mesh.scale = (1.0, 1.0, 1.0)
-        scene.objects.link(mesh)
-        mesh.parent = dummy
-
-    verts = []
-
-    def stri(s):
-        try:
-            ret= int(s,10)
-
-        except ValueError :
-            ret= -1
-
-        return ret
-
-    def process_line(line):
-        lineSplit = line.split()
-
-        if (len(lineSplit) < 1): return
-
-        if (line[0] == '#'): return
-
-        if b24:
-
-            # Blender 2.4x mode
-            # process camera commands
-
-            if ld_cam:
-                if (line[0] == 'c' and line[1] != 'r'):
-                    pos= line.find('.lens')
-
-                    if (pos != -1):
-                        fr = stri(lineSplit[0][1:pos])
-
-                        if (fr >= 0):
-                            scene.frame_current = fr
-                            vcam.data.lens= float(lineSplit[2])
-                            vcam.data.keyframe_insert('lens')
-                            return
-
-                if (line[0] == 'o'):
-                    pos= line.find('.setMatrix')
-
-                    if (pos != -1):
-                        fr = stri(lineSplit[0][1:pos])
-
-                        if (fr >= 0):
-                            scene.frame_current = fr
-                            # for up to 2.55
-                            # vcam.matrix_world = eval('mathutils.' + line.rstrip()[pos+21:-1])
-                            # for 2.56, from Michael (Meikel) Oetjen 
-                            # vcam.matrix_world = eval('mathutils.Matrix(' + line.rstrip()[pos+28:-2].replace('[','(',4).replace(']',')',4) + ')')
-                            # for 2.57
-                            # vcam.matrix_world = eval('mathutils.Matrix([' + line.rstrip()[pos+28:-2] + '])')
-                            # for 2.63
-                            vcam.matrix_world = eval('(' + line.rstrip()[pos+27:-1] + ')')
-                            vcam.keyframe_insert('location')
-                            vcam.keyframe_insert('scale')
-                            vcam.keyframe_insert('rotation_euler')
-                            return
-
-            # process mesh commands
-
-            if ld_points:
-                if (line[0] == 'v'):
-                    pos= line.find('NMesh.Vert')
-
-                    if (pos != -1):
-                        verts.append(eval(line[pos+10:]))
-
-            return
-
-        # Blender 2.5x mode
-        # process camera commands
-
-        if ld_cam:
-            pos= line.find('set_frame')
-
-            if (pos == -1):
-                pos= line.find('frame_set')
-
-                if (pos == -1):
-                    pos= lineSplit[0].find('frame_current')
-
-                    if (pos != -1):
-                        fr= stri(lineSplit[2])
-
-                        if (fr >= 0):
-                            scene.frame_current = fr
-                            voodoo_import.frwas= True
-
-                        return
-
-            if (pos != -1):
-                fr= stri(line[pos+10:-2])
-
-                if (fr >= 0):
-                    scene.frame_current = fr
-                    voodoo_import.frwas= True
-                    return
-
-            if voodoo_import.frwas:
-
-                pos= line.find('data.lens')
-
-                if (pos != -1):
-                    vcam.data.lens= float(lineSplit[2])
-                    vcam.data.keyframe_insert('lens')
-                    return
-
-                pos= line.find('.Matrix')
-
-                if (pos != -1):
-
-                    # for up to 2.55
-                    # vcam.matrix_world = eval('mathutils' + line[pos:])
-
-                    # for 2.56
-                    # if (line[pos+8] == '['):
-                    # # from Michael (Meikel) Oetjen
-                    #     vcam.matrix_world = eval('mathutils.Matrix((' + line.rstrip()[pos+9:-1].replace('[','(',3).replace(']',')',4) + ')')
-                    # else:
-                    #   vcam.matrix_world = eval('mathutils' + line[pos:])
-
-                    # for 2.57
-                    # vcam.matrix_world = eval('mathutils.Matrix([' + line.rstrip()[pos+8:-1] + '])')
-
-                    # for 2.63
-                    vcam.matrix_world = eval('(' + line.rstrip()[pos+7:] + ')')
-                    return
-
-                pos= line.find('.matrix_world')
-
-                if (pos != -1):
-                    vcam.matrix_world = eval(line.rstrip()[line.find('=')+1:])
-                    return
-
-                pos= line.find('.location')
-
-                if (pos != -1):
-                    vcam.location = eval(line[line.find('=')+1:])
-                    return
-
-                pos= line.find('.rotation_euler')
-
-                if (pos != -1):
-                    vcam.rotation_euler = eval(line[line.find('=')+1:])
-                    return
-
-                pos= line.find('.data.keyframe_insert')
-
-                if (pos != -1):
-                    vcam.data.keyframe_insert(eval(line[pos+22:-2]))
-                    return
-
-                pos= line.find('.keyframe_insert')
-
-                if (pos != -1):
-                    vcam.keyframe_insert(eval(line[pos+17:-2]))
-                    return
-
-        # process mesh commands
-
-        if ld_points:
-            pos= line.find('.append')
-
-            if (pos != -1):
-                verts.append(eval(line[pos+8:-2]))
-
-    #read lines
-
-    for line in file.readlines():
-
-        if (b24 and (line.find('import') != -1) and (line.find('bpy') != -1)):
-            b24= False
-
-        process_line(line)
-
-    scene.frame_set(initfr)
-
-    if ld_points:
-        mesh.data.from_pydata(verts, [], [])
-
-    mesh.data.update()
-
-
-# Operator
-class ImportVoodooCamera(bpy.types.Operator):
-    """"""
-    bl_idname = "import.voodoo_camera"
-    bl_label = "Import Voodoo camera"
-    bl_description = "Load a Blender export script from the Voodoo motion tracker"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    filepath = StringProperty(name="File Path",
-        description="Filepath used for processing the script",
-        maxlen= 1024,default= "")
-
-    # filter_python = BoolProperty(name="Filter python",
-    # description="",default=True,options={'HIDDEN'})
-
-    load_camera = BoolProperty(name="Load camera",
-        description="Load the camera",
-        default=True)
-    load_points = BoolProperty(name="Load points",
-        description="Load the FP3D point cloud",
-        default=True)
-
-    def execute(self, context):
-        voodoo_import(self.filepath,self.load_camera,self.load_points)
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        wm.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
-
-# Registering / Unregister
-def menu_func(self, context):
-    self.layout.operator(ImportVoodooCamera.bl_idname, text="Voodoo camera", icon='PLUGIN')
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_file_import.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_file_import.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_mesh_gwyddion/__init__.py b/release/scripts/addons_contrib/io_mesh_gwyddion/__init__.py
deleted file mode 100644
index e3ce7da..0000000
--- a/release/scripts/addons_contrib/io_mesh_gwyddion/__init__.py
+++ /dev/null
@@ -1,184 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#
-#
-#  Authors           : Clemens Barth (Blendphys at root-1.de), ...
-#
-#  Homepage          : http://development.root-1.de/Atomic_Blender.php
-#
-#  Start of project              : 2012-11-12 by Clemens Barth
-#  First publication in Blender  : 2012-11-19
-#  Last modified                 : 2012-11-19
-#
-#  Acknowledgements 
-#  ================
-#
-#  Other: Frank Palmino
-#
-
-bl_info = {
-    "name": "Atomic Blender - Gwyddion",
-    "description": "Loading Gwyddion Atomic Force Microscopy images",
-    "author": "Clemens Barth",
-    "version": (0,1),
-    "blender": (2,6),
-    "location": "File -> Import -> Gwyddion (.gwy)",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
-                "Scripts/Import-Export/Gwyddion",
-    "tracker_url": "http://projects.blender.org/tracker/"
-                   "index.php?func=detail&aid=33236&group_id=153&atid=469",
-    "category": "Import-Export"
-}
-
-import bpy
-from bpy.types import Operator
-from bpy_extras.io_utils import ImportHelper
-from bpy.props import (BoolProperty, 
-                       StringProperty, 
-                       EnumProperty,
-                       FloatProperty)
-
-from . import import_gwyddion
-
-# -----------------------------------------------------------------------------
-#                                                                           GUI
-
-# This is the class for the file dialog of the importer.
-class ImportGwyddion(Operator, ImportHelper):
-    bl_idname = "import_mesh.gwy"
-    bl_label  = "Import Gwyddion (*.gwy)"
-    bl_options = {'PRESET', 'UNDO'}
-
-    filename_ext = ".gwy"
-    filter_glob  = StringProperty(default="*.gwy", options={'HIDDEN'},)
-
-    use_camera = BoolProperty(
-        name="Camera", default=False,
-        description="Do you need a camera?")
-    use_lamp = BoolProperty(
-        name="Lamp", default=False,
-        description = "Do you need a lamp?")             
-    use_smooth = BoolProperty(
-        name="Smooth image data", default=False,
-        description = "Smooth the images")
-    scale_size = FloatProperty (
-        name = "Scale xy", default=0.5,
-        description = "Scale the lateral size")    
-    scale_height = FloatProperty (
-        name = "Scale h", default=3.0,
-        description = "Scale the height")    
-    use_all_channels = BoolProperty(
-        name="All channels", default=False,
-        description = "Load all images")        
-    use_c1 = BoolProperty(
-        name="1", default=True,
-        description = "Channel 1")
-    use_c2 = BoolProperty(
-        name="2", default=False,
-        description = "Channel 2")        
-    use_c3 = BoolProperty(
-        name="3", default=False,
-        description = "Channel 3")
-    use_c4 = BoolProperty(
-        name="4", default=False,
-        description = "Channel 4")       
-    use_c5 = BoolProperty(
-        name="5", default=False,
-        description = "Channel 5")
-    use_c6 = BoolProperty(
-        name="6", default=False,
-        description = "Channel 6")        
-    use_c7 = BoolProperty(
-        name="7", default=False,
-        description = "Channel 7")
-    use_c8 = BoolProperty(
-        name="8", default=False,
-        description = "Channel 8")       
- 
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row.prop(self, "use_camera")
-        row.prop(self, "use_lamp")   
-        row = layout.row()
-        row.prop(self, "use_smooth")
-        row = layout.row()
-        row.prop(self, "scale_size")
-        row.prop(self, "scale_height")
-        row = layout.row()
-        row.label(text="Channels")
-        row.prop(self, "use_all_channels")
-        row = layout.row()
-        row.prop(self, "use_c1")
-        row.prop(self, "use_c2")
-        row.prop(self, "use_c3")
-        row.prop(self, "use_c4")
-        row = layout.row()
-        row.prop(self, "use_c5")
-        row.prop(self, "use_c6")
-        row.prop(self, "use_c7")
-        row.prop(self, "use_c8")
-        
-        if self.use_all_channels:
-            self.use_c1, self.use_c2, self.use_c3, self.use_c4, \
-            self.use_c5, self.use_c6, self.use_c7, self.use_c8  \
-            = True, True, True, True, True, True, True, True
-        
-    def execute(self, context):
-        # This is in order to solve this strange 'relative path' thing.
-        filepath_par = bpy.path.abspath(self.filepath)
-
-        channels = [self.use_c1, self.use_c2, self.use_c3, self.use_c4,
-                    self.use_c5, self.use_c6, self.use_c7, self.use_c8]
-
-        # Execute main routine   
-        #print("passed - 1")
-        images, AFMdata = import_gwyddion.load_gwyddion_images(filepath_par, 
-                                                               channels) 
-
-        #print("passed - 3")
-        import_gwyddion.create_mesh(images, 
-                                 AFMdata,
-                                 self.use_smooth,
-                                 self.scale_size,
-                                 self.scale_height,
-                                 self.use_camera,
-                                 self.use_lamp)  
-        #print("passed - 4")
-        
-        return {'FINISHED'}
-
-
-# The entry into the menu 'file -> import'
-def menu_func_import(self, context):
-    self.layout.operator(ImportGwyddion.bl_idname, text="Gwyddion (.gwy)")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_file_import.append(menu_func_import)
-    
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_file_import.remove(menu_func_import)
-
-if __name__ == "__main__":
-
-    register()
diff --git a/release/scripts/addons_contrib/io_mesh_gwyddion/import_gwyddion.py b/release/scripts/addons_contrib/io_mesh_gwyddion/import_gwyddion.py
deleted file mode 100644
index 896a3f3..0000000
--- a/release/scripts/addons_contrib/io_mesh_gwyddion/import_gwyddion.py
+++ /dev/null
@@ -1,309 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-import os
-import re
-from math import pi, sqrt
-from mathutils import Vector, Matrix
-import struct
-
-# All data for the images. Basically, each variable is a list with a length,
-# which equals the number of images.
-# Some of the variables are still not used. However, I keep them for purposes
-# in future.  
-class AFMData(object):
-    def __init__(self, date, x_size, y_size, x_pixel, y_pixel, x_off, y_off, 
-                 voltage, feedback, gain, speed, amplitude, angle, datfile, 
-                 channel, unit, z_factor, spec_x_unit, spec_x_label, spec_y_unit, 
-                 spec_y_label, spec_y_factor, spec_points, spec_feedback, 
-                 spec_acquisition, spec_delay):
-        self.date = date
-        self.x_size = x_size
-        self.y_size = y_size
-        self.x_pixel = x_pixel
-        self.y_pixel = y_pixel
-        self.x_off = x_off
-        self.y_off = y_off
-        self.voltage = voltage
-        self.feedback = feedback
-        self.gain = gain
-        self.speed = speed
-        self.amplitude = amplitude
-        self.angle = angle
-        self.datfile = datfile
-        self.channel = channel
-        self.unit = unit
-        self.z_factor = z_factor
-        self.spec_x_unit = spec_x_unit    
-        self.spec_x_label = spec_x_label     
-        self.spec_y_unit = spec_y_unit
-        self.spec_y_label = spec_y_label
-        self.spec_y_factor = spec_y_factor      
-        self.spec_points = spec_points
-        self.spec_feedback = spec_feedback
-        self.spec_acquisition = spec_acquisition
-        self.spec_delay = spec_delay     
-      
-
-# For loading the Gwyddion images. I basically have followed rules described 
-# here: http://gwyddion.net/documentation/user-guide-en/gwyfile-format.html
-def load_gwyddion_images(data_file, channels):
-   
-    if not os.path.isfile(data_file):
-        return False  
-
-    AFMdata = AFMData([],[],[],[],[],[],[],
-                      [],[],[],[],[],[],[],
-                      [],[],[],[],[],[],[],
-                      [],[],[],[],[])
-    AFMdata.datfile = data_file
-    
-    datafile = open(data_file, 'rb')
-    data = datafile.read()
-    datafile.close()   
-    
-    # Search the title of each image
-    for a in list(re.finditer(b"data/title\x00", data)):    
-            
-        pos = a.start()
-        channel_number = int(data[pos-2:pos-1])
-        
-        if channels[channel_number] == False:
-            continue
-                
-        pos1 = data[pos:].find(b"\x00") + pos + len("\x00") + 1
-        pos2 = data[pos1:].find(b"\x00") + pos1
-
-        channel_name = data[pos1:pos2].decode("utf-8")
-        
-        AFMdata.channel.append([channel_number, channel_name])    
-        
-    # Search important parameters and finally the image data.    
-    images = []    
-    for a in list(re.finditer(b"/data\x00", data)):
-    
-        pos = a.start()    
-
-        channel_number = int(data[pos-1:pos])
-        
-        if channels[channel_number] == False:
-            continue
-
-        # Find the image size in pixel (x direction)
-        pos1 = data[pos:].find(b"xres") + pos+len("xres")
-        size_x_pixel = struct.unpack("i",data[pos1+2:pos1+4+2])[0]
-
-        # ... the image size in pixel (y direction)
-        pos1 = data[pos:].find(b"yres") + pos+len("yres")
-        size_y_pixel = struct.unpack("i",data[pos1+2:pos1+4+2])[0]
-
-        # ... the real image size (x direction)
-        pos1 = data[pos:].find(b"xreal") + pos+len("xreal")
-        size_x_real = struct.unpack("d",data[pos1+2:pos1+8+2])[0]
-
-        # ... the real image size (y direction)
-        pos1 = data[pos:].find(b"yreal") + pos+len("yreal")
-        size_y_real = struct.unpack("d",data[pos1+2:pos1+8+2])[0]
-
-        # If it is a z image, multiply with 10^9 nm
-        factor = 1.0        
-        pos1 = data[pos:].find(b"si_unit_z") + pos
-        unit = data[pos1+34:pos1+36].decode("utf-8")
-        if "m" in unit:
-            factor = 1000000000.0
-        
-        # Now, find the image data and store it
-        pos1 = data[pos:].find(b"\x00data\x00") + pos + len("\x00data\x00") + 5
-
-        image = []        
-        for i in range(size_y_pixel):
-            line = []
-            for j in range(size_x_pixel):
-                # The '8' is for the double values
-                k = pos1 + (i*size_x_pixel+j)   * 8
-                l = pos1 + (i*size_x_pixel+j+1) * 8
-                line.append(struct.unpack("d",data[k:l])[0]*factor)
-            image.append(line)     
-            
-        images.append(image)
-   
-        # Note all parameters of the image.
-        AFMdata.x_pixel.append(int(size_x_pixel))
-        AFMdata.y_pixel.append(int(size_y_pixel))
-        AFMdata.x_size.append(size_x_real * 1000000000.0)
-        AFMdata.y_size.append(size_y_real * 1000000000.0)
-    
-    return (images, AFMdata)
-
-# Routine to create the mesh and finally the image
-def create_mesh(data_list, 
-                AFMdata, 
-                use_smooth, 
-                scale_size,
-                scale_height,
-                use_camera,
-                use_lamp):
-    # This is for the image name.       
-    path_list = AFMdata.datfile.strip('/').split('/') 
-
-    number_img = len(data_list)
-    image_x_offset_gap = 10.0 * scale_size
-    image_x_all = sum(AFMdata.x_size)*scale_size 
-    image_x_offset = -(image_x_all+image_x_offset_gap*(number_img-1)) / 2.0
-                                
-    # For each image do:
-    for k, data in enumerate(data_list):
-      
-        size_x = AFMdata.x_pixel[k]
-        size_y = AFMdata.y_pixel[k]
-        
-        image_scale = AFMdata.x_size[k] / float(AFMdata.x_pixel[k])    
-        image_scale = image_scale * scale_size    
-        image_x_size = AFMdata.x_size[k] * scale_size        
-        image_x_offset += image_x_size / 2.0
-      
-        image_name = path_list[-1] + "_" + AFMdata.channel[k][1]
-        
-        data_mesh = []
-        data_faces = []
-
-        #print("passed - create_mesh ---- 1")
-
-        for i, line in enumerate(data):
-            for j, pixel in enumerate(line):
-            
-               # The vertices
-               data_mesh.append(Vector((float(i) * image_scale, 
-                                        float(j) * image_scale, 
-                                        float(pixel)*scale_height)))
-               
-               # The faces
-               if i < size_y-1 and j < size_x-1:
-                   data_faces.append( [size_x*i+j      , size_x*(i+1)+j, 
-                                       size_x*(i+1)+j+1, size_x*i+j+1    ]) 
-
-        #print("passed - create_mesh ---- 2")
-               
-        # Build the mesh
-        surface_mesh = bpy.data.meshes.new("Mesh")
-        surface_mesh.from_pydata(data_mesh, [], data_faces)
-        surface_mesh.update()
-        surface = bpy.data.objects.new(image_name, surface_mesh)
-        bpy.context.scene.objects.link(surface)
-        bpy.ops.object.select_all(action='DESELECT')        
-        surface.select = True 
-
-        bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY')
-        # sum((v.co for v in mesh.vertices), Vector()) / len(mesh.vertices)
-
-        if use_smooth:
-            for polygon in surface.data.polygons:
-                polygon.use_smooth = True
-
-        surface.location = Vector((0.0, image_x_offset, 0.0)) 
-        image_x_offset += image_x_size / 2.0 + image_x_offset_gap
-
-        #print("passed - create_mesh ---- 3")
-
-
-        
-    object_center_vec = Vector((0.0,0.0,0.0))
-    object_size = (sum(AFMdata.x_size) * scale_size 
-                   +image_x_offset_gap * (len(data_list)-1))
-
-    # ------------------------------------------------------------------------
-    # CAMERA AND LAMP
-    camera_factor = 20.0
-    
-    # If chosen a camera is put into the scene.
-    if use_camera == True:
-
-        # Assume that the object is put into the global origin. Then, the
-        # camera is moved in x and z direction, not in y. The object has its
-        # size at distance sqrt(object_size) from the origin. So, move the
-        # camera by this distance times a factor of camera_factor in x and z.
-        # Then add x, y and z of the origin of the object.
-        object_camera_vec = Vector((sqrt(object_size) * camera_factor,
-                                    0.0,
-                                    sqrt(object_size) * camera_factor))
-        camera_xyz_vec = object_center_vec + object_camera_vec
-
-        # Create the camera
-        current_layers=bpy.context.scene.layers 
-        camera_data = bpy.data.cameras.new("A_camera")
-        camera_data.lens = 45
-        camera_data.clip_end = 50000.0
-        camera = bpy.data.objects.new("A_camera", camera_data)
-        camera.location = camera_xyz_vec
-        camera.layers = current_layers
-        bpy.context.scene.objects.link(camera) 
-
-        # Here the camera is rotated such it looks towards the center of
-        # the object. The [0.0, 0.0, 1.0] vector along the z axis
-        z_axis_vec             = Vector((0.0, 0.0, 1.0))
-        # The angle between the last two vectors
-        angle                  = object_camera_vec.angle(z_axis_vec, 0)
-        # The cross-product of z_axis_vec and object_camera_vec
-        axis_vec               = z_axis_vec.cross(object_camera_vec)
-        # Rotate 'axis_vec' by 'angle' and convert this to euler parameters.
-        # 4 is the size of the matrix.
-        camera.rotation_euler  = Matrix.Rotation(angle, 4, axis_vec).to_euler()
-
-        # Rotate the camera around its axis by 90° such that we have a nice
-        # camera position and view onto the object.
-        bpy.ops.object.select_all(action='DESELECT')        
-        camera.select = True         
-        bpy.ops.transform.rotate(value=(90.0*2*pi/360.0),
-                                 axis=object_camera_vec,
-                                 constraint_axis=(False, False, False),
-                                 constraint_orientation='GLOBAL',
-                                 mirror=False, proportional='DISABLED',
-                                 proportional_edit_falloff='SMOOTH',
-                                 proportional_size=1, snap=False,
-                                 snap_target='CLOSEST', snap_point=(0, 0, 0),
-                                 snap_align=False, snap_normal=(0, 0, 0),
-                                 release_confirm=False)
-
-    # Here a lamp is put into the scene, if chosen.
-    if use_lamp == True:
-
-        # This is the distance from the object measured in terms of %
-        # of the camera distance. It is set onto 50% (1/2) distance.
-        lamp_dl = sqrt(object_size) * 15 * 0.5
-        # This is a factor to which extend the lamp shall go to the right
-        # (from the camera  point of view).
-        lamp_dy_right = lamp_dl * (3.0/4.0)
-
-        # Create x, y and z for the lamp.
-        object_lamp_vec = Vector((lamp_dl,lamp_dy_right,lamp_dl))
-        lamp_xyz_vec = object_center_vec + object_lamp_vec
-
-        # Create the lamp
-        current_layers=bpy.context.scene.layers
-        lamp_data = bpy.data.lamps.new(name="A_lamp", type="POINT")
-        lamp_data.distance = 5000.0
-        lamp_data.energy = 3.0
-        lamp_data.shadow_method = 'RAY_SHADOW'        
-        lamp = bpy.data.objects.new("A_lamp", lamp_data)
-        lamp.location = lamp_xyz_vec
-        lamp.layers = current_layers
-        bpy.context.scene.objects.link(lamp)         
-
-        bpy.context.scene.world.light_settings.use_ambient_occlusion = True
-        bpy.context.scene.world.light_settings.ao_factor = 0.1      
diff --git a/release/scripts/addons_contrib/io_mesh_xyz/__init__.py b/release/scripts/addons_contrib/io_mesh_xyz/__init__.py
deleted file mode 100644
index 0868368..0000000
--- a/release/scripts/addons_contrib/io_mesh_xyz/__init__.py
+++ /dev/null
@@ -1,250 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-#
-#
-#  Authors           : Clemens Barth (Blendphys at root-1.de), ...
-#
-#  Homepage(Wiki)    : http://development.root-1.de/Atomic_Blender.php
-#
-#  Start of project              : 2011-12-01 by Clemens Barth
-#  First publication in Blender  : 2011-12-18
-#  Last modified                 : 2012-11-10
-#
-#  Acknowledgements 
-#  ================
-#
-#  Blender: ideasman, meta_androcto, truman, kilon, CoDEmanX, dairin0d, PKHG, 
-#           Valter, ...
-#  Other: Frank Palmino
-#
-
-bl_info = {
-    "name": "Atomic Blender - XYZ",
-    "description": "Import/export of atoms described in .xyz files",
-    "author": "Clemens Barth",
-    "version": (1,0),
-    "blender": (2,6),
-    "location": "File -> Import -> XYZ (.xyz)",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/"
-                "Import-Export/XYZ",
-    "tracker_url": "http://projects.blender.org/tracker/"
-                   "index.php?func=detail&aid=29646&group_id=153&atid=468",
-    "category": "Import-Export"
-}
-
-import bpy
-from bpy.types import Operator
-from bpy_extras.io_utils import ImportHelper, ExportHelper
-from bpy.props import (StringProperty,
-                       BoolProperty,
-                       EnumProperty,
-                       IntProperty,
-                       FloatProperty)
-
-from . import import_xyz
-from . import export_xyz
-
-# -----------------------------------------------------------------------------
-#                                                                           GUI
-
-
-# This is the class for the file dialog.
-class ImportXYZ(Operator, ImportHelper):
-    bl_idname = "import_mesh.xyz"
-    bl_label  = "Import XYZ (*.xyz)"
-    bl_options = {'PRESET', 'UNDO'}
-    
-    filename_ext = ".xyz"
-    filter_glob  = StringProperty(default="*.xyz", options={'HIDDEN'},)
-
-    use_camera = BoolProperty(
-        name="Camera", default=False,
-        description="Do you need a camera?")
-    use_lamp = BoolProperty(
-        name="Lamp", default=False,
-        description = "Do you need a lamp?")
-    ball = EnumProperty(
-        name="Type of ball",
-        description="Choose ball",
-        items=(('0', "NURBS", "NURBS balls"),
-               ('1', "Mesh" , "Mesh balls"),
-               ('2', "Meta" , "Metaballs")),
-               default='0',) 
-    mesh_azimuth = IntProperty(
-        name = "Azimuth", default=32, min=1,
-        description = "Number of sectors (azimuth)")
-    mesh_zenith = IntProperty(
-        name = "Zenith", default=32, min=1,
-        description = "Number of sectors (zenith)")
-    scale_ballradius = FloatProperty(
-        name = "Balls", default=1.0, min=0.0001,
-        description = "Scale factor for all atom radii")
-    scale_distances = FloatProperty (
-        name = "Distances", default=1.0, min=0.0001,
-        description = "Scale factor for all distances")
-    atomradius = EnumProperty(
-        name="Type of radius",
-        description="Choose type of atom radius",
-        items=(('0', "Pre-defined", "Use pre-defined radius"),
-               ('1', "Atomic", "Use atomic radius"),
-               ('2', "van der Waals", "Use van der Waals radius")),
-               default='0',)            
-    use_center = BoolProperty(
-        name = "Object to origin (first frames)", default=False,
-        description = "Put the object into the global origin, the first frame only")           
-    use_center_all = BoolProperty(
-        name = "Object to origin (all frames)", default=True,
-        description = "Put the object into the global origin, all frames") 
-    datafile = StringProperty(
-        name = "", description="Path to your custom data file",
-        maxlen = 256, default = "", subtype='FILE_PATH')    
-    use_frames = BoolProperty(
-        name = "Load all frames?", default=False,
-        description = "Do you want to load all frames?") 
-    skip_frames = IntProperty(
-        name="", default=0, min=0,
-        description="Number of frames you want to skip.")
-    images_per_key = IntProperty(
-        name="", default=1, min=1,
-        description="Choose the number of images between 2 keys.")
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row.prop(self, "use_camera")
-        row.prop(self, "use_lamp")
-        row = layout.row()
-        col = row.column()
-        col.prop(self, "ball")
-        row = layout.row()
-        row.active = (self.ball == "1")
-        col = row.column(align=True)        
-        col.prop(self, "mesh_azimuth")
-        col.prop(self, "mesh_zenith")
-        row = layout.row()
-        col = row.column()
-        col.label(text="Scaling factors")
-        col = row.column(align=True)
-        col.prop(self, "scale_ballradius")
-        col.prop(self, "scale_distances")
-        row = layout.row()
-        row.prop(self, "use_center")
-        row = layout.row()
-        row.prop(self, "use_center_all")
-        row = layout.row()
-        row.prop(self, "atomradius")
-        
-        row = layout.row()
-        row.prop(self, "use_frames")        
-        row = layout.row()        
-        row.active = self.use_frames        
-        col = row.column()
-        col.label(text="Skip frames")
-        col = row.column()
-        col.prop(self, "skip_frames")
-        row = layout.row()
-        row.active = self.use_frames
-        col = row.column()
-        col.label(text="Frames/key")
-        col = row.column()
-        col.prop(self, "images_per_key")            
-        
-    def execute(self, context):
-
-        del import_xyz.ALL_FRAMES[:]
-        del import_xyz.ELEMENTS[:]
-        del import_xyz.STRUCTURE[:]
-
-        # This is to determine the path.
-        filepath_xyz = bpy.path.abspath(self.filepath)
-
-        # Execute main routine
-        import_xyz.import_xyz(
-                      self.ball,
-                      self.mesh_azimuth,
-                      self.mesh_zenith,
-                      self.scale_ballradius,
-                      self.atomradius,
-                      self.scale_distances,
-                      self.use_center,
-                      self.use_center_all,
-                      self.use_camera,
-                      self.use_lamp,
-                      filepath_xyz)   
-
-        # Load frames                  
-        if len(import_xyz.ALL_FRAMES) > 1 and self.use_frames:  
-                  
-            import_xyz.build_frames(self.images_per_key, 
-                                    self.skip_frames)
-        
-        return {'FINISHED'}
-        
-
-# This is the class for the file dialog of the exporter.
-class ExportXYZ(Operator, ExportHelper):
-    bl_idname = "export_mesh.xyz"
-    bl_label  = "Export XYZ (*.xyz)"
-    filename_ext = ".xyz"
-
-    filter_glob  = StringProperty(
-        default="*.xyz", options={'HIDDEN'},)
-
-    atom_xyz_export_type = EnumProperty(
-        name="Type of Objects",
-        description="Choose type of objects",
-        items=(('0', "All", "Export all active objects"),
-               ('1', "Elements", "Export only those active objects which have"
-                                 " a proper element name")),
-               default='1',) 
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row.prop(self, "atom_xyz_export_type")
-
-    def execute(self, context):
-        export_xyz.export_xyz(self.atom_xyz_export_type, 
-                              bpy.path.abspath(self.filepath))
-
-        return {'FINISHED'}
-
-
-# The entry into the menu 'file -> import'
-def menu_func(self, context):
-    self.layout.operator(ImportXYZ.bl_idname, text="XYZ (.xyz)")
-
-# The entry into the menu 'file -> export'
-def menu_func_export(self, context):
-    self.layout.operator(ExportXYZ.bl_idname, text="XYZ (.xyz)")
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_file_import.append(menu_func)
-    bpy.types.INFO_MT_file_export.append(menu_func_export) 
-    
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_file_import.remove(menu_func)
-    bpy.types.INFO_MT_file_export.remove(menu_func_export)
-
-if __name__ == "__main__":
-
-    register()
diff --git a/release/scripts/addons_contrib/io_mesh_xyz/atom_info.dat b/release/scripts/addons_contrib/io_mesh_xyz/atom_info.dat
deleted file mode 100644
index 5e00a5f..0000000
--- a/release/scripts/addons_contrib/io_mesh_xyz/atom_info.dat
+++ /dev/null
@@ -1,1536 +0,0 @@
-Atom
-====
-Number           : 1
-Name             : Hydrogen
-Short name       : H
-Color            : 0.99,0.99,0.99
-Radius used      : 0.320000
-Radius, covalent : 0.320000
-Radius, atomic   : 0.790000
-Charge state     : -1
-Radius, ionic    : 1.540000
-
-
-Atom
-====
-Number           : 2
-Name             : Helium
-Short name       : He
-Color            : 0.84,0.99,0.99
-Radius used      : 0.930000
-Radius, covalent : 0.930000
-Radius, atomic   : 0.490000
-
-
-Atom
-====
-Number           : 3
-Name             : Lithium
-Short name       : Li
-Color            : 0.79,0.5,0.99
-Radius used      : 1.230000
-Radius, covalent : 1.230000
-Radius, atomic   : 2.050000
-Charge state     : 1
-Radius, ionic    : 0.680000
-
-
-Atom
-====
-Number           : 4
-Name             : Beryllium
-Short name       : Be
-Color            : 0.75,0.99,0.0
-Radius used      : 0.900000
-Radius, covalent : 0.900000
-Radius, atomic   : 1.400000
-Charge state     : 1
-Radius, ionic    : 0.440000
-Charge state     : 2
-Radius, ionic    : 0.350000
-
-
-Atom
-====
-Number           : 5
-Name             : Boron
-Short name       : B
-Color            : 0.99,0.70,0.70
-Radius used      : 0.820000
-Radius, covalent : 0.820000
-Radius, atomic   : 1.170000
-Charge state     : 1
-Radius, ionic    : 0.350000
-Charge state     : 3
-Radius, ionic    : 0.230000
-
-
-Atom
-====
-Number           : 6
-Name             : Carbon
-Short name       : C
-Color            : 0.3,0.3,0.3
-Radius used      : 0.910000
-Radius, covalent : 0.770000
-Radius, atomic   : 0.910000
-Charge state     : -4
-Radius, ionic    : 2.600000
-Charge state     : 4
-Radius, ionic    : 0.160000
-
-
-Atom
-====
-Number           : 7
-Name             : Nitrogen
-Short name       : N
-Color            : 0.18,0.31,0.96
-Radius used      : 0.750000
-Radius, covalent : 0.750000
-Radius, atomic   : 0.750000
-Charge state     : -3
-Radius, ionic    : 1.710000
-Charge state     : 1
-Radius, ionic    : 0.250000
-Charge state     : 3
-Radius, ionic    : 0.160000
-Charge state     : 5
-Radius, ionic    : 0.130000
-
-
-Atom
-====
-Number           : 8
-Name             : Oxygen
-Short name       : O
-Color            : 0.99,0.05,0.05
-Radius used      : 0.730000
-Radius, covalent : 0.730000
-Radius, atomic   : 0.650000
-Charge state     : -2
-Radius, ionic    : 1.320000
-Charge state     : -1
-Radius, ionic    : 1.760000
-Charge state     : 1
-Radius, ionic    : 0.220000
-Charge state     : 6
-Radius, ionic    : 0.090000
-
-
-Atom
-====
-Number           : 9
-Name             : Fluorine
-Short name       : F
-Color            : 0.0,1.0,0.0
-Radius used      : 1.330000
-Radius, covalent : 0.720000
-Radius, atomic   : 0.570000
-Charge state     : -1
-Radius, ionic    : 1.330000
-Charge state     : 7
-Radius, ionic    : 0.080000
-
-
-Atom
-====
-Number           : 10
-Name             : Neon
-Short name       : Ne
-Color            : 0.69,0.88,0.95
-Radius used      : 0.710000
-Radius, covalent : 0.710000
-Radius, atomic   : 0.510000
-Charge state     : 1
-Radius, ionic    : 1.120000
-
-
-Atom
-====
-Number           : 11
-Name             : Sodium
-Short name       : Na
-Color            : 0.5,0.5,0.5
-Radius used      : 0.970000
-Radius, covalent : 1.540000
-Radius, atomic   : 2.230000
-Charge state     : 1
-Radius, ionic    : 0.970000
-
-
-Atom
-====
-Number           : 12
-Name             : Magnesium
-Short name       : Mg
-Color            : 0.38,0.066,1.0
-Radius used      : 0.660000
-Radius, covalent : 1.360000
-Radius, atomic   : 1.720000
-Charge state     : 1
-Radius, ionic    : 0.820000
-Charge state     : 2
-Radius, ionic    : 0.660000
-
-
-Atom
-====
-Number           : 13
-Name             : Aluminium
-Short name       : Al
-Color            : 0.74,0.64,0.64
-Radius used      : 1.180000
-Radius, covalent : 1.180000
-Radius, atomic   : 1.820000
-Charge state     : 3
-Radius, ionic    : 0.510000
-
-
-Atom
-====
-Number           : 14
-Name             : Silicon
-Short name       : Si
-Color            : 0.93,0.78,0.62
-Radius used      : 1.110000
-Radius, covalent : 1.110000
-Radius, atomic   : 1.460000
-Charge state     : -4
-Radius, ionic    : 2.710000
-Charge state     : -1
-Radius, ionic    : 3.840000
-Charge state     : 1
-Radius, ionic    : 0.650000
-Charge state     : 4
-Radius, ionic    : 0.420000
-
-
-Atom
-====
-Number           : 15
-Name             : Phosphorus
-Short name       : P
-Color            : 0.99,0.5,0.0
-Radius used      : 1.060000
-Radius, covalent : 1.060000
-Radius, atomic   : 1.230000
-Charge state     : -3
-Radius, ionic    : 2.120000
-Charge state     : 3
-Radius, ionic    : 0.440000
-Charge state     : 5
-Radius, ionic    : 0.350000
-
-
-Atom
-====
-Number           : 16
-Name             : Sulfur
-Short name       : S
-Color            : 0.99,0.99,0.18
-Radius used      : 1.020000
-Radius, covalent : 1.020000
-Radius, atomic   : 1.090000
-Charge state     : -2
-Radius, ionic    : 1.840000
-Charge state     : 2
-Radius, ionic    : 2.190000
-Charge state     : 4
-Radius, ionic    : 0.370000
-Charge state     : 6
-Radius, ionic    : 0.300000
-
-
-Atom
-====
-Number           : 17
-Name             : Chlorine
-Short name       : Cl
-Color            : 0.095,0.411,1.0
-Radius used      : 1.810000
-Radius, covalent : 0.990000
-Radius, atomic   : 0.970000
-Charge state     : -1
-Radius, ionic    : 1.810000
-Charge state     : 5
-Radius, ionic    : 0.340000
-Charge state     : 7
-Radius, ionic    : 0.270000
-
-
-Atom
-====
-Number           : 18
-Name             : Argon
-Short name       : Ar
-Color            : 0.5,0.81,0.88
-Radius used      : 0.980000
-Radius, covalent : 0.980000
-Radius, atomic   : 0.880000
-Charge state     : 1
-Radius, ionic    : 1.540000
-
-
-Atom
-====
-Number           : 19
-Name             : Potassium
-Short name       : K
-Color            : 0.55,0.25,0.82
-Radius used      : 2.030000
-Radius, covalent : 2.030000
-Radius, atomic   : 2.770000
-Charge state     : 1
-Radius, ionic    : 0.810000
-
-
-Atom
-====
-Number           : 20
-Name             : Calcium
-Short name       : Ca
-Color            : 0.23,0.99,0.0
-Radius used      : 1.740000
-Radius, covalent : 1.740000
-Radius, atomic   : 2.230000
-Charge state     : 1
-Radius, ionic    : 1.180000
-Charge state     : 2
-Radius, ionic    : 0.990000
-
-
-Atom
-====
-Number           : 21
-Name             : Scandium
-Short name       : Sc
-Color            : 0.89,0.89,0.89
-Radius used      : 1.440000
-Radius, covalent : 1.440000
-Radius, atomic   : 2.090000
-Charge state     : 3
-Radius, ionic    : 0.732000
-
-
-Atom
-====
-Number           : 22
-Name             : Titanium
-Short name       : Ti
-Color            : 0.74,0.75,0.77
-Radius used      : 1.320000
-Radius, covalent : 1.320000
-Radius, atomic   : 2.000000
-Charge state     : 1
-Radius, ionic    : 0.960000
-Charge state     : 2
-Radius, ionic    : 0.940000
-Charge state     : 3
-Radius, ionic    : 0.760000
-Charge state     : 4
-Radius, ionic    : 0.680000
-
-
-Atom
-====
-Number           : 23
-Name             : Vanadium
-Short name       : V
-Color            : 0.64,0.64,0.66
-Radius used      : 1.220000
-Radius, covalent : 1.220000
-Radius, atomic   : 1.920000
-Charge state     : 2
-Radius, ionic    : 0.880000
-Charge state     : 3
-Radius, ionic    : 0.740000
-Charge state     : 4
-Radius, ionic    : 0.630000
-Charge state     : 5
-Radius, ionic    : 0.590000
-
-
-Atom
-====
-Number           : 24
-Name             : Chromium
-Short name       : Cr
-Color            : 0.53,0.59,0.77
-Radius used      : 1.180000
-Radius, covalent : 1.180000
-Radius, atomic   : 1.850000
-Charge state     : 1
-Radius, ionic    : 0.810000
-Charge state     : 2
-Radius, ionic    : 0.890000
-Charge state     : 3
-Radius, ionic    : 0.630000
-Charge state     : 6
-Radius, ionic    : 0.520000
-
-
-Atom
-====
-Number           : 25
-Name             : Manganese
-Short name       : Mn
-Color            : 0.60,0.47,0.77
-Radius used      : 1.170000
-Radius, covalent : 1.170000
-Radius, atomic   : 1.790000
-Charge state     : 2
-Radius, ionic    : 0.800000
-Charge state     : 3
-Radius, ionic    : 0.660000
-Charge state     : 4
-Radius, ionic    : 0.600000
-Charge state     : 7
-Radius, ionic    : 0.460000
-
-
-Atom
-====
-Number           : 26
-Name             : Iron
-Short name       : Fe
-Color            : 0.87,0.39,0.19
-Radius used      : 1.170000
-Radius, covalent : 1.170000
-Radius, atomic   : 1.720000
-Charge state     : 2
-Radius, ionic    : 0.740000
-Charge state     : 3
-Radius, ionic    : 0.640000
-
-
-Atom
-====
-Number           : 27
-Name             : Cobalt
-Short name       : Co
-Color            : 0.93,0.56,0.62
-Radius used      : 1.160000
-Radius, covalent : 1.160000
-Radius, atomic   : 1.670000
-Charge state     : 2
-Radius, ionic    : 0.720000
-Charge state     : 3
-Radius, ionic    : 0.630000
-
-
-Atom
-====
-Number           : 28
-Name             : Nickel
-Short name       : Ni
-Color            : 0.31,0.81,0.31
-Radius used      : 1.150000
-Radius, covalent : 1.150000
-Radius, atomic   : 1.620000
-Charge state     : 2
-Radius, ionic    : 0.690000
-
-
-Atom
-====
-Number           : 29
-Name             : Copper
-Short name       : Cu
-Color            : 0.78,0.5,0.19
-Radius used      : 1.170000
-Radius, covalent : 1.170000
-Radius, atomic   : 1.570000
-Charge state     : 1
-Radius, ionic    : 0.960000
-Charge state     : 2
-Radius, ionic    : 0.720000
-
-
-Atom
-====
-Number           : 30
-Name             : Zinc
-Short name       : Zn
-Color            : 0.48,0.5,0.68
-Radius used      : 1.250000
-Radius, covalent : 1.250000
-Radius, atomic   : 1.530000
-Charge state     : 1
-Radius, ionic    : 0.880000
-Charge state     : 2
-Radius, ionic    : 0.740000
-
-
-Atom
-====
-Number           : 31
-Name             : Gallium
-Short name       : Ga
-Color            : 0.75,0.55,0.55
-Radius used      : 1.260000
-Radius, covalent : 1.260000
-Radius, atomic   : 1.810000
-Charge state     : 1
-Radius, ionic    : 0.810000
-Charge state     : 3
-Radius, ionic    : 0.620000
-
-
-Atom
-====
-Number           : 32
-Name             : Germanium
-Short name       : Ge
-Color            : 0.39,0.55,0.55
-Radius used      : 1.220000
-Radius, covalent : 1.220000
-Radius, atomic   : 1.520000
-Charge state     : -4
-Radius, ionic    : 2.720000
-Charge state     : 2
-Radius, ionic    : 0.730000
-Charge state     : 4
-Radius, ionic    : 0.530000
-
-
-Atom
-====
-Number           : 33
-Name             : Arsenic
-Short name       : As
-Color            : 0.73,0.5,0.88
-Radius used      : 1.200000
-Radius, covalent : 1.200000
-Radius, atomic   : 1.330000
-Charge state     : -3
-Radius, ionic    : 2.220000
-Charge state     : 3
-Radius, ionic    : 0.580000
-Charge state     : 5
-Radius, ionic    : 0.460000
-
-
-Atom
-====
-Number           : 34
-Name             : Selenium
-Short name       : Se
-Color            : 0.99,0.62,0.0
-Radius used      : 1.160000
-Radius, covalent : 1.160000
-Radius, atomic   : 1.220000
-Charge state     : -2
-Radius, ionic    : 1.910000
-Charge state     : -1
-Radius, ionic    : 2.320000
-Charge state     : 1
-Radius, ionic    : 0.660000
-Charge state     : 4
-Radius, ionic    : 0.500000
-Charge state     : 6
-Radius, ionic    : 0.420000
-
-
-Atom
-====
-Number           : 35
-Name             : Bromine
-Short name       : Br
-Color            : 0.64,0.16,0.16
-Radius used      : 1.140000
-Radius, covalent : 1.140000
-Radius, atomic   : 1.120000
-Charge state     : -1
-Radius, ionic    : 1.960000
-Charge state     : 5
-Radius, ionic    : 0.470000
-Charge state     : 7
-Radius, ionic    : 0.390000
-
-
-Atom
-====
-Number           : 36
-Name             : Krypton
-Short name       : Kr
-Color            : 0.35,0.71,0.81
-Radius used      : 1.310000
-Radius, covalent : 1.310000
-Radius, atomic   : 1.240000
-
-
-Atom
-====
-Number           : 37
-Name             : Rubidium
-Short name       : Rb
-Color            : 0.43,0.17,0.68
-Radius used      : 2.160000
-Radius, covalent : 2.160000
-Radius, atomic   : 2.980000
-Charge state     : 1
-Radius, ionic    : 1.470000
-
-
-Atom
-====
-Number           : 38
-Name             : Strontium
-Short name       : Sr
-Color            : 0.0,0.99,0.0
-Radius used      : 1.910000
-Radius, covalent : 1.910000
-Radius, atomic   : 2.450000
-Charge state     : 2
-Radius, ionic    : 1.120000
-
-
-Atom
-====
-Number           : 39
-Name             : Yttrium
-Short name       : Y
-Color            : 0.57,0.99,0.99
-Radius used      : 1.620000
-Radius, covalent : 1.620000
-Radius, atomic   : 2.270000
-Charge state     : 3
-Radius, ionic    : 0.893000
-
-
-Atom
-====
-Number           : 40
-Name             : Zirconium
-Short name       : Zr
-Color            : 0.57,0.87,0.87
-Radius used      : 1.450000
-Radius, covalent : 1.450000
-Radius, atomic   : 2.160000
-Charge state     : 1
-Radius, ionic    : 1.090000
-Charge state     : 4
-Radius, ionic    : 0.790000
-
-
-Atom
-====
-Number           : 41
-Name             : Niobium
-Short name       : Nb
-Color            : 0.44,0.75,0.78
-Radius used      : 1.340000
-Radius, covalent : 1.340000
-Radius, atomic   : 2.080000
-Charge state     : 1
-Radius, ionic    : 1.000000
-Charge state     : 4
-Radius, ionic    : 0.740000
-Charge state     : 5
-Radius, ionic    : 0.690000
-
-
-Atom
-====
-Number           : 42
-Name             : Molybdenum
-Short name       : Mo
-Color            : 0.32,0.70,0.70
-Radius used      : 1.300000
-Radius, covalent : 1.300000
-Radius, atomic   : 2.010000
-Charge state     : 1
-Radius, ionic    : 0.930000
-Charge state     : 4
-Radius, ionic    : 0.700000
-Charge state     : 6
-Radius, ionic    : 0.620000
-
-
-Atom
-====
-Number           : 43
-Name             : Technetium
-Short name       : Tc
-Color            : 0.23,0.61,0.61
-Radius used      : 1.270000
-Radius, covalent : 1.270000
-Radius, atomic   : 1.950000
-Charge state     : 7
-Radius, ionic    : 0.979000
-
-
-Atom
-====
-Number           : 44
-Name             : Ruthenium
-Short name       : Ru
-Color            : 0.14,0.55,0.55
-Radius used      : 1.250000
-Radius, covalent : 1.250000
-Radius, atomic   : 1.890000
-Charge state     : 4
-Radius, ionic    : 0.670000
-
-
-Atom
-====
-Number           : 45
-Name             : Rhodium
-Short name       : Rh
-Color            : 0.03,0.48,0.54
-Radius used      : 1.250000
-Radius, covalent : 1.250000
-Radius, atomic   : 1.830000
-Charge state     : 3
-Radius, ionic    : 0.680000
-
-
-Atom
-====
-Number           : 46
-Name             : Palladium
-Short name       : Pd
-Color            : 0.0,0.41,0.51
-Radius used      : 1.280000
-Radius, covalent : 1.280000
-Radius, atomic   : 1.790000
-Charge state     : 2
-Radius, ionic    : 0.800000
-Charge state     : 4
-Radius, ionic    : 0.650000
-
-
-Atom
-====
-Number           : 47
-Name             : Silver
-Short name       : Ag
-Color            : 0.75,0.75,0.75
-Radius used      : 1.340000
-Radius, covalent : 1.340000
-Radius, atomic   : 1.750000
-Charge state     : 1
-Radius, ionic    : 1.260000
-Charge state     : 2
-Radius, ionic    : 0.890000
-
-
-Atom
-====
-Number           : 48
-Name             : Cadmium
-Short name       : Cd
-Color            : 0.99,0.84,0.55
-Radius used      : 1.480000
-Radius, covalent : 1.480000
-Radius, atomic   : 1.710000
-Charge state     : 1
-Radius, ionic    : 1.140000
-Charge state     : 2
-Radius, ionic    : 0.970000
-
-
-Atom
-====
-Number           : 49
-Name             : Indium
-Short name       : In
-Color            : 0.64,0.45,0.44
-Radius used      : 1.440000
-Radius, covalent : 1.440000
-Radius, atomic   : 2.000000
-Charge state     : 3
-Radius, ionic    : 0.810000
-
-
-Atom
-====
-Number           : 50
-Name             : Tin
-Short name       : Sn
-Color            : 0.39,0.5,0.5
-Radius used      : 1.410000
-Radius, covalent : 1.410000
-Radius, atomic   : 1.720000
-Charge state     : -4
-Radius, ionic    : 2.940000
-Charge state     : -1
-Radius, ionic    : 3.700000
-Charge state     : 2
-Radius, ionic    : 0.930000
-Charge state     : 4
-Radius, ionic    : 0.710000
-
-
-Atom
-====
-Number           : 51
-Name             : Antimony
-Short name       : Sb
-Color            : 0.61,0.38,0.70
-Radius used      : 1.400000
-Radius, covalent : 1.400000
-Radius, atomic   : 1.530000
-Charge state     : -3
-Radius, ionic    : 2.450000
-Charge state     : 3
-Radius, ionic    : 0.760000
-Charge state     : 5
-Radius, ionic    : 0.620000
-
-
-Atom
-====
-Number           : 52
-Name             : Tellurium
-Short name       : Te
-Color            : 0.82,0.47,0.0
-Radius used      : 1.360000
-Radius, covalent : 1.360000
-Radius, atomic   : 1.420000
-Charge state     : -2
-Radius, ionic    : 2.110000
-Charge state     : -1
-Radius, ionic    : 2.500000
-Charge state     : 1
-Radius, ionic    : 0.820000
-Charge state     : 4
-Radius, ionic    : 0.700000
-Charge state     : 6
-Radius, ionic    : 0.560000
-
-
-Atom
-====
-Number           : 53
-Name             : Iodine
-Short name       : I
-Color            : 0.57,0.0,0.57
-Radius used      : 1.330000
-Radius, covalent : 1.330000
-Radius, atomic   : 1.320000
-Charge state     : -1
-Radius, ionic    : 2.200000
-Charge state     : 5
-Radius, ionic    : 0.620000
-Charge state     : 7
-Radius, ionic    : 0.500000
-
-
-Atom
-====
-Number           : 54
-Name             : Xenon
-Short name       : Xe
-Color            : 0.25,0.61,0.68
-Radius used      : 1.310000
-Radius, covalent : 1.310000
-Radius, atomic   : 1.240000
-
-
-Atom
-====
-Number           : 55
-Name             : Caesium
-Short name       : Cs
-Color            : 0.33,0.08,0.55
-Radius used      : 2.350000
-Radius, covalent : 2.350000
-Radius, atomic   : 3.350000
-Charge state     : 1
-Radius, ionic    : 1.670000
-
-
-Atom
-====
-Number           : 56
-Name             : Barium
-Short name       : Ba
-Color            : 0.0,0.78,0.0
-Radius used      : 1.980000
-Radius, covalent : 1.980000
-Radius, atomic   : 2.780000
-Charge state     : 1
-Radius, ionic    : 1.530000
-Charge state     : 2
-Radius, ionic    : 1.340000
-
-
-Atom
-====
-Number           : 57
-Name             : Lanthanum
-Short name       : La
-Color            : 0.43,0.82,0.99
-Radius used      : 1.690000
-Radius, covalent : 1.690000
-Radius, atomic   : 2.740000
-Charge state     : 1
-Radius, ionic    : 1.390000
-Charge state     : 3
-Radius, ionic    : 1.061000
-
-
-Atom
-====
-Number           : 58
-Name             : Cerium
-Short name       : Ce
-Color            : 0.99,0.99,0.77
-Radius used      : 1.650000
-Radius, covalent : 1.650000
-Radius, atomic   : 2.700000
-Charge state     : 1
-Radius, ionic    : 1.270000
-Charge state     : 3
-Radius, ionic    : 1.034000
-Charge state     : 4
-Radius, ionic    : 0.920000
-
-
-Atom
-====
-Number           : 59
-Name             : Praseodymium
-Short name       : Pr
-Color            : 0.84,0.99,0.77
-Radius used      : 1.650000
-Radius, covalent : 1.650000
-Radius, atomic   : 2.670000
-Charge state     : 3
-Radius, ionic    : 1.013000
-Charge state     : 4
-Radius, ionic    : 0.900000
-
-
-Atom
-====
-Number           : 60
-Name             : Neodymium
-Short name       : Nd
-Color            : 0.77,0.99,0.77
-Radius used      : 1.640000
-Radius, covalent : 1.640000
-Radius, atomic   : 2.640000
-Charge state     : 3
-Radius, ionic    : 0.995000
-
-
-Atom
-====
-Number           : 61
-Name             : Promethium
-Short name       : Pm
-Color            : 0.63,0.99,0.77
-Radius used      : 1.630000
-Radius, covalent : 1.630000
-Radius, atomic   : 2.620000
-Charge state     : 3
-Radius, ionic    : 0.979000
-
-
-Atom
-====
-Number           : 62
-Name             : Samarium
-Short name       : Sm
-Color            : 0.55,0.99,0.77
-Radius used      : 1.620000
-Radius, covalent : 1.620000
-Radius, atomic   : 2.590000
-Charge state     : 3
-Radius, ionic    : 0.964000
-
-
-Atom
-====
-Number           : 63
-Name             : Europium
-Short name       : Eu
-Color            : 0.37,0.99,0.77
-Radius used      : 1.850000
-Radius, covalent : 1.850000
-Radius, atomic   : 2.560000
-Charge state     : 2
-Radius, ionic    : 1.090000
-Charge state     : 3
-Radius, ionic    : 0.950000
-
-
-Atom
-====
-Number           : 64
-Name             : Gadolinium
-Short name       : Gd
-Color            : 0.26,0.99,0.77
-Radius used      : 1.610000
-Radius, covalent : 1.610000
-Radius, atomic   : 2.540000
-Charge state     : 3
-Radius, ionic    : 0.938000
-
-
-Atom
-====
-Number           : 65
-Name             : Terbium
-Short name       : Tb
-Color            : 0.18,0.99,0.77
-Radius used      : 1.590000
-Radius, covalent : 1.590000
-Radius, atomic   : 2.510000
-Charge state     : 3
-Radius, ionic    : 0.923000
-Charge state     : 4
-Radius, ionic    : 0.840000
-
-
-Atom
-====
-Number           : 66
-Name             : Dysprosium
-Short name       : Dy
-Color            : 0.12,0.99,0.77
-Radius used      : 1.590000
-Radius, covalent : 1.590000
-Radius, atomic   : 2.490000
-Charge state     : 3
-Radius, ionic    : 0.908000
-
-
-Atom
-====
-Number           : 67
-Name             : Holmium
-Short name       : Ho
-Color            : 0.0,0.99,0.60
-Radius used      : 1.580000
-Radius, covalent : 1.580000
-Radius, atomic   : 2.470000
-Charge state     : 3
-Radius, ionic    : 0.894000
-
-
-Atom
-====
-Number           : 68
-Name             : Erbium
-Short name       : Er
-Color            : 0.0,0.89,0.45
-Radius used      : 1.570000
-Radius, covalent : 1.570000
-Radius, atomic   : 2.450000
-Charge state     : 3
-Radius, ionic    : 0.881000
-
-
-Atom
-====
-Number           : 69
-Name             : Thulium
-Short name       : Tm
-Color            : 0.0,0.82,0.32
-Radius used      : 1.560000
-Radius, covalent : 1.560000
-Radius, atomic   : 2.420000
-Charge state     : 3
-Radius, ionic    : 0.870000
-
-
-Atom
-====
-Number           : 70
-Name             : Ytterbium
-Short name       : Yb
-Color            : 0.0,0.74,0.21
-Radius used      : 1.740000
-Radius, covalent : 1.740000
-Radius, atomic   : 2.400000
-Charge state     : 2
-Radius, ionic    : 0.930000
-Charge state     : 3
-Radius, ionic    : 0.858000
-
-
-Atom
-====
-Number           : 71
-Name             : Lutetium
-Short name       : Lu
-Color            : 0.0,0.66,0.14
-Radius used      : 1.560000
-Radius, covalent : 1.560000
-Radius, atomic   : 2.250000
-Charge state     : 3
-Radius, ionic    : 0.850000
-
-
-Atom
-====
-Number           : 72
-Name             : Hafnium
-Short name       : Hf
-Color            : 0.30,0.75,0.99
-Radius used      : 1.440000
-Radius, covalent : 1.440000
-Radius, atomic   : 2.160000
-Charge state     : 4
-Radius, ionic    : 0.780000
-
-
-Atom
-====
-Number           : 73
-Name             : Tantalum
-Short name       : Ta
-Color            : 0.30,0.64,0.99
-Radius used      : 1.340000
-Radius, covalent : 1.340000
-Radius, atomic   : 2.090000
-Charge state     : 5
-Radius, ionic    : 0.680000
-
-
-Atom
-====
-Number           : 74
-Name             : Tungsten
-Short name       : W
-Color            : 0.12,0.57,0.83
-Radius used      : 1.300000
-Radius, covalent : 1.300000
-Radius, atomic   : 2.020000
-Charge state     : 4
-Radius, ionic    : 0.700000
-Charge state     : 6
-Radius, ionic    : 0.620000
-
-
-Atom
-====
-Number           : 75
-Name             : Rhenium
-Short name       : Re
-Color            : 0.14,0.48,0.66
-Radius used      : 1.280000
-Radius, covalent : 1.280000
-Radius, atomic   : 1.970000
-Charge state     : 4
-Radius, ionic    : 0.720000
-Charge state     : 7
-Radius, ionic    : 0.560000
-
-
-Atom
-====
-Number           : 76
-Name             : Osmium
-Short name       : Os
-Color            : 0.14,0.39,0.58
-Radius used      : 1.260000
-Radius, covalent : 1.260000
-Radius, atomic   : 1.920000
-Charge state     : 4
-Radius, ionic    : 0.880000
-Charge state     : 6
-Radius, ionic    : 0.690000
-
-
-Atom
-====
-Number           : 77
-Name             : Iridium
-Short name       : Ir
-Color            : 0.08,0.32,0.52
-Radius used      : 1.270000
-Radius, covalent : 1.270000
-Radius, atomic   : 1.870000
-Charge state     : 4
-Radius, ionic    : 0.680000
-
-
-Atom
-====
-Number           : 78
-Name             : Platinium
-Short name       : Pt
-Color            : 0.81,0.81,0.87
-Radius used      : 1.300000
-Radius, covalent : 1.300000
-Radius, atomic   : 1.830000
-Charge state     : 2
-Radius, ionic    : 0.800000
-Charge state     : 4
-Radius, ionic    : 0.650000
-
-
-Atom
-====
-Number           : 79
-Name             : Gold
-Short name       : Au
-Color            : 0.99,0.81,0.13
-Radius used      : 1.340000
-Radius, covalent : 1.340000
-Radius, atomic   : 1.790000
-Charge state     : 1
-Radius, ionic    : 1.370000
-Charge state     : 3
-Radius, ionic    : 0.850000
-
-
-Atom
-====
-Number           : 80
-Name             : Mercury
-Short name       : Hg
-Color            : 0.71,0.71,0.81
-Radius used      : 1.490000
-Radius, covalent : 1.490000
-Radius, atomic   : 1.760000
-Charge state     : 1
-Radius, ionic    : 1.270000
-Charge state     : 2
-Radius, ionic    : 1.100000
-
-
-Atom
-====
-Number           : 81
-Name             : Thallium
-Short name       : Tl
-Color            : 0.64,0.32,0.30
-Radius used      : 1.480000
-Radius, covalent : 1.480000
-Radius, atomic   : 2.080000
-Charge state     : 1
-Radius, ionic    : 1.470000
-Charge state     : 3
-Radius, ionic    : 0.950000
-
-
-Atom
-====
-Number           : 82
-Name             : Lead
-Short name       : Pb
-Color            : 0.33,0.34,0.37
-Radius used      : 1.470000
-Radius, covalent : 1.470000
-Radius, atomic   : 1.810000
-Charge state     : 2
-Radius, ionic    : 1.200000
-Charge state     : 4
-Radius, ionic    : 0.840000
-
-
-Atom
-====
-Number           : 83
-Name             : Bismuth
-Short name       : Bi
-Color            : 0.61,0.30,0.70
-Radius used      : 1.460000
-Radius, covalent : 1.460000
-Radius, atomic   : 1.630000
-Charge state     : 1
-Radius, ionic    : 0.980000
-Charge state     : 3
-Radius, ionic    : 0.960000
-Charge state     : 5
-Radius, ionic    : 0.740000
-
-
-Atom
-====
-Number           : 84
-Name             : Polonium
-Short name       : Po
-Color            : 0.66,0.35,0.0
-Radius used      : 1.460000
-Radius, covalent : 1.460000
-Radius, atomic   : 1.530000
-Charge state     : 6
-Radius, ionic    : 0.670000
-
-
-Atom
-====
-Number           : 85
-Name             : Astatine
-Short name       : At
-Color            : 0.45,0.30,0.26
-Radius used      : 1.450000
-Radius, covalent : 1.450000
-Radius, atomic   : 1.430000
-Charge state     : -3
-Radius, ionic    : 2.220000
-Charge state     : 3
-Radius, ionic    : 0.850000
-Charge state     : 5
-Radius, ionic    : 0.460000
-
-
-Atom
-====
-Number           : 86
-Name             : Radon
-Short name       : Rn
-Color            : 0.25,0.50,0.58
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.340000
-
-
-Atom
-====
-Number           : 87
-Name             : Francium
-Short name       : Fr
-Color            : 0.25,0.0,0.39
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 1
-Radius, ionic    : 1.800000
-
-
-Atom
-====
-Number           : 88
-Name             : Radium
-Short name       : Ra
-Color            : 0.0,0.48,0.0
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 2
-Radius, ionic    : 1.430000
-
-
-Atom
-====
-Number           : 89
-Name             : Actinium
-Short name       : Ac
-Color            : 0.43,0.66,0.97
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 3
-Radius, ionic    : 1.180000
-
-
-Atom
-====
-Number           : 90
-Name             : Thorium
-Short name       : Th
-Color            : 0.0,0.72,0.99
-Radius used      : 1.650000
-Radius, covalent : 1.650000
-Radius, atomic   : 1.000000
-Charge state     : 4
-Radius, ionic    : 1.020000
-
-
-Atom
-====
-Number           : 91
-Name             : Protactinium
-Short name       : Pa
-Color            : 0.0,0.62,0.99
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 3
-Radius, ionic    : 1.130000
-Charge state     : 4
-Radius, ionic    : 0.980000
-Charge state     : 5
-Radius, ionic    : 0.890000
-
-
-Atom
-====
-Number           : 92
-Name             : Uranium
-Short name       : U
-Color            : 0.0,0.55,0.99
-Radius used      : 1.420000
-Radius, covalent : 1.420000
-Radius, atomic   : 1.000000
-Charge state     : 4
-Radius, ionic    : 0.970000
-Charge state     : 6
-Radius, ionic    : 0.800000
-
-
-Atom
-====
-Number           : 93
-Name             : Neptunium
-Short name       : Np
-Color            : 0.0,0.5,0.99
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 3
-Radius, ionic    : 1.100000
-Charge state     : 4
-Radius, ionic    : 0.950000
-Charge state     : 7
-Radius, ionic    : 0.710000
-
-
-Atom
-====
-Number           : 94
-Name             : Plutonium
-Short name       : Pu
-Color            : 0.0,0.41,0.99
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 3
-Radius, ionic    : 1.080000
-Charge state     : 4
-Radius, ionic    : 0.930000
-
-
-Atom
-====
-Number           : 95
-Name             : Americium
-Short name       : Am
-Color            : 0.32,0.35,0.94
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-Charge state     : 3
-Radius, ionic    : 1.070000
-Charge state     : 4
-Radius, ionic    : 0.920000
-
-
-Atom
-====
-Number           : 96
-Name             : Curium
-Short name       : Cm
-Color            : 0.46,0.35,0.88
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 97
-Name             : Berkelium
-Short name       : Bk
-Color            : 0.53,0.30,0.88
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 98
-Name             : Californium
-Short name       : Cf
-Color            : 0.62,0.21,0.82
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 99
-Name             : Einsteinium
-Short name       : Es
-Color            : 0.69,0.12,0.82
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 100
-Name             : Fermium
-Short name       : Fm
-Color            : 0.69,0.12,0.72
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 101
-Name             : Mendelevium
-Short name       : Md
-Color            : 0.69,0.05,0.64
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 102
-Name             : Nobelium
-Short name       : No
-Color            : 0.73,0.05,0.52
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 103
-Name             : Lawrencium
-Short name       : Lr
-Color            : 0.77,0.0,0.39
-Radius used      : 1.000000
-Radius, covalent : 1.000000
-Radius, atomic   : 1.000000
-
-
-Atom
-====
-Number           : 104
-Name             : Vacancy
-Short name       : Vac
-Color            : 0.5,0.5,0.5
-Radius used      : 1.2
-Radius, covalent : 1.0
-Radius, atomic   : 1.0
-
-
-Atom
-====
-Number           : 105
-Name             : Default
-Short name       : Default
-Color            : 0.5,0.5,0.5
-Radius used      : 1.0
-Radius, covalent : 1.0
-Radius, atomic   : 1.0
-
-
-Atom
-====
-Number           : 106
-Name             : Stick
-Short name       : Stick
-Color            : 0.5,0.5,0.5
-Radius used      : 1.0
-Radius, covalent : 1.0
-Radius, atomic   : 1.0
diff --git a/release/scripts/addons_contrib/io_mesh_xyz/export_xyz.py b/release/scripts/addons_contrib/io_mesh_xyz/export_xyz.py
deleted file mode 100644
index 093d6e9..0000000
--- a/release/scripts/addons_contrib/io_mesh_xyz/export_xyz.py
+++ /dev/null
@@ -1,85 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-from . import import_xyz
-
-
-class AtomsExport(object):  
-    __slots__ = ('element', 'location')
-    def __init__(self, element, location):
-        self.element  = element
-        self.location = location
-
-
-def export_xyz(obj_type, filepath_xyz):
-
-    list_atoms = []
-    counter = 0
-    for obj in bpy.context.selected_objects:
-    
-        if "Stick" in obj.name:
-            continue
-            
-        if obj.type not in {'MESH', 'SURFACE', 'META'}:
-            continue 
-       
-        name = ""
-        for element in import_xyz.ELEMENTS_DEFAULT:
-            if element[1] in obj.name:
-                if element[2] == "Vac":
-                    name = "X"
-                else:
-                    name = element[2]
-        
-        if name == "":
-            if obj_type == "0":
-                name = "?"
-            else:
-                continue
-
-        if len(obj.children) != 0:
-            for vertex in obj.data.vertices:
-                location = obj.matrix_world*vertex.co
-                list_atoms.append(AtomsExport(name, location))
-                counter += 1                                       
-        else:
-            if not obj.parent:
-                location = obj.location
-                list_atoms.append(AtomsExport(name, location))                                   
-                counter += 1                                               
-
-    xyz_file_p = open(filepath_xyz, "w")
-    xyz_file_p.write("%d\n" % counter)
-    xyz_file_p.write("This XYZ file has been created with Blender "
-                     "and the addon Atomic Blender - XYZ. "
-                     "For more details see: wiki.blender.org/index.php/"
-                     "Extensions:2.6/Py/Scripts/Import-Export/XYZ\n")
-
-    for i, atom in enumerate(list_atoms):
-        string = "%3s%15.5f%15.5f%15.5f\n" % (
-                                      atom.element,
-                                      atom.location[0],
-                                      atom.location[1],
-                                      atom.location[2])
-        xyz_file_p.write(string)
-
-    xyz_file_p.close()
-
-    return True
-
diff --git a/release/scripts/addons_contrib/io_mesh_xyz/import_xyz.py b/release/scripts/addons_contrib/io_mesh_xyz/import_xyz.py
deleted file mode 100644
index 9a575f2..0000000
--- a/release/scripts/addons_contrib/io_mesh_xyz/import_xyz.py
+++ /dev/null
@@ -1,739 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-from math import pi, sqrt
-from mathutils import Vector, Matrix
-
-# -----------------------------------------------------------------------------
-#                                                  Atom and element data
-
-
-# This is a list that contains some data of all possible elements. The structure
-# is as follows:
-#
-# 1, "Hydrogen", "H", [0.0,0.0,1.0], 0.32, 0.32, 0.32 , -1 , 1.54   means
-#
-# No., name, short name, color, radius (used), radius (covalent), radius (atomic),
-#
-# charge state 1, radius (ionic) 1, charge state 2, radius (ionic) 2, ... all
-# charge states for any atom are listed, if existing.
-# The list is fixed and cannot be changed ... (see below)
-
-ELEMENTS_DEFAULT = (
-( 1,      "Hydrogen",        "H", (  1.0,   1.0,   1.0), 0.32, 0.32, 0.79 , -1 , 1.54 ),
-( 2,        "Helium",       "He", ( 0.85,   1.0,   1.0), 0.93, 0.93, 0.49 ),
-( 3,       "Lithium",       "Li", (  0.8,  0.50,   1.0), 1.23, 1.23, 2.05 ,  1 , 0.68 ),
-( 4,     "Beryllium",       "Be", ( 0.76,   1.0,   0.0), 0.90, 0.90, 1.40 ,  1 , 0.44 ,  2 , 0.35 ),
-( 5,         "Boron",        "B", (  1.0,  0.70,  0.70), 0.82, 0.82, 1.17 ,  1 , 0.35 ,  3 , 0.23 ),
-( 6,        "Carbon",        "C", ( 0.56,  0.56,  0.56), 0.77, 0.77, 0.91 , -4 , 2.60 ,  4 , 0.16 ),
-( 7,      "Nitrogen",        "N", ( 0.18,  0.31,  0.97), 0.75, 0.75, 0.75 , -3 , 1.71 ,  1 , 0.25 ,  3 , 0.16 ,  5 , 0.13 ),
-( 8,        "Oxygen",        "O", (  1.0,  0.05,  0.05), 0.73, 0.73, 0.65 , -2 , 1.32 , -1 , 1.76 ,  1 , 0.22 ,  6 , 0.09 ),
-( 9,      "Fluorine",        "F", ( 0.56,  0.87,  0.31), 0.72, 0.72, 0.57 , -1 , 1.33 ,  7 , 0.08 ),
-(10,          "Neon",       "Ne", ( 0.70,  0.89,  0.96), 0.71, 0.71, 0.51 ,  1 , 1.12 ),
-(11,        "Sodium",       "Na", ( 0.67,  0.36,  0.94), 1.54, 1.54, 2.23 ,  1 , 0.97 ),
-(12,     "Magnesium",       "Mg", ( 0.54,   1.0,   0.0), 1.36, 1.36, 1.72 ,  1 , 0.82 ,  2 , 0.66 ),
-(13,     "Aluminium",       "Al", ( 0.74,  0.65,  0.65), 1.18, 1.18, 1.82 ,  3 , 0.51 ),
-(14,       "Silicon",       "Si", ( 0.94,  0.78,  0.62), 1.11, 1.11, 1.46 , -4 , 2.71 , -1 , 3.84 ,  1 , 0.65 ,  4 , 0.42 ),
-(15,    "Phosphorus",        "P", (  1.0,  0.50,   0.0), 1.06, 1.06, 1.23 , -3 , 2.12 ,  3 , 0.44 ,  5 , 0.35 ),
-(16,        "Sulfur",        "S", (  1.0,   1.0,  0.18), 1.02, 1.02, 1.09 , -2 , 1.84 ,  2 , 2.19 ,  4 , 0.37 ,  6 , 0.30 ),
-(17,      "Chlorine",       "Cl", ( 0.12,  0.94,  0.12), 0.99, 0.99, 0.97 , -1 , 1.81 ,  5 , 0.34 ,  7 , 0.27 ),
-(18,         "Argon",       "Ar", ( 0.50,  0.81,  0.89), 0.98, 0.98, 0.88 ,  1 , 1.54 ),
-(19,     "Potassium",        "K", ( 0.56,  0.25,  0.83), 2.03, 2.03, 2.77 ,  1 , 0.81 ),
-(20,       "Calcium",       "Ca", ( 0.23,   1.0,   0.0), 1.74, 1.74, 2.23 ,  1 , 1.18 ,  2 , 0.99 ),
-(21,      "Scandium",       "Sc", ( 0.90,  0.90,  0.90), 1.44, 1.44, 2.09 ,  3 , 0.73 ),
-(22,      "Titanium",       "Ti", ( 0.74,  0.76,  0.78), 1.32, 1.32, 2.00 ,  1 , 0.96 ,  2 , 0.94 ,  3 , 0.76 ,  4 , 0.68 ),
-(23,      "Vanadium",        "V", ( 0.65,  0.65,  0.67), 1.22, 1.22, 1.92 ,  2 , 0.88 ,  3 , 0.74 ,  4 , 0.63 ,  5 , 0.59 ),
-(24,      "Chromium",       "Cr", ( 0.54,   0.6,  0.78), 1.18, 1.18, 1.85 ,  1 , 0.81 ,  2 , 0.89 ,  3 , 0.63 ,  6 , 0.52 ),
-(25,     "Manganese",       "Mn", ( 0.61,  0.47,  0.78), 1.17, 1.17, 1.79 ,  2 , 0.80 ,  3 , 0.66 ,  4 , 0.60 ,  7 , 0.46 ),
-(26,          "Iron",       "Fe", ( 0.87,   0.4,   0.2), 1.17, 1.17, 1.72 ,  2 , 0.74 ,  3 , 0.64 ),
-(27,        "Cobalt",       "Co", ( 0.94,  0.56,  0.62), 1.16, 1.16, 1.67 ,  2 , 0.72 ,  3 , 0.63 ),
-(28,        "Nickel",       "Ni", ( 0.31,  0.81,  0.31), 1.15, 1.15, 1.62 ,  2 , 0.69 ),
-(29,        "Copper",       "Cu", ( 0.78,  0.50,   0.2), 1.17, 1.17, 1.57 ,  1 , 0.96 ,  2 , 0.72 ),
-(30,          "Zinc",       "Zn", ( 0.49,  0.50,  0.69), 1.25, 1.25, 1.53 ,  1 , 0.88 ,  2 , 0.74 ),
-(31,       "Gallium",       "Ga", ( 0.76,  0.56,  0.56), 1.26, 1.26, 1.81 ,  1 , 0.81 ,  3 , 0.62 ),
-(32,     "Germanium",       "Ge", (  0.4,  0.56,  0.56), 1.22, 1.22, 1.52 , -4 , 2.72 ,  2 , 0.73 ,  4 , 0.53 ),
-(33,       "Arsenic",       "As", ( 0.74,  0.50,  0.89), 1.20, 1.20, 1.33 , -3 , 2.22 ,  3 , 0.58 ,  5 , 0.46 ),
-(34,      "Selenium",       "Se", (  1.0,  0.63,   0.0), 1.16, 1.16, 1.22 , -2 , 1.91 , -1 , 2.32 ,  1 , 0.66 ,  4 , 0.50 ,  6 , 0.42 ),
-(35,       "Bromine",       "Br", ( 0.65,  0.16,  0.16), 1.14, 1.14, 1.12 , -1 , 1.96 ,  5 , 0.47 ,  7 , 0.39 ),
-(36,       "Krypton",       "Kr", ( 0.36,  0.72,  0.81), 1.31, 1.31, 1.24 ),
-(37,      "Rubidium",       "Rb", ( 0.43,  0.18,  0.69), 2.16, 2.16, 2.98 ,  1 , 1.47 ),
-(38,     "Strontium",       "Sr", (  0.0,   1.0,   0.0), 1.91, 1.91, 2.45 ,  2 , 1.12 ),
-(39,       "Yttrium",        "Y", ( 0.58,   1.0,   1.0), 1.62, 1.62, 2.27 ,  3 , 0.89 ),
-(40,     "Zirconium",       "Zr", ( 0.58,  0.87,  0.87), 1.45, 1.45, 2.16 ,  1 , 1.09 ,  4 , 0.79 ),
-(41,       "Niobium",       "Nb", ( 0.45,  0.76,  0.78), 1.34, 1.34, 2.08 ,  1 , 1.00 ,  4 , 0.74 ,  5 , 0.69 ),
-(42,    "Molybdenum",       "Mo", ( 0.32,  0.70,  0.70), 1.30, 1.30, 2.01 ,  1 , 0.93 ,  4 , 0.70 ,  6 , 0.62 ),
-(43,    "Technetium",       "Tc", ( 0.23,  0.61,  0.61), 1.27, 1.27, 1.95 ,  7 , 0.97 ),
-(44,     "Ruthenium",       "Ru", ( 0.14,  0.56,  0.56), 1.25, 1.25, 1.89 ,  4 , 0.67 ),
-(45,       "Rhodium",       "Rh", ( 0.03,  0.49,  0.54), 1.25, 1.25, 1.83 ,  3 , 0.68 ),
-(46,     "Palladium",       "Pd", (  0.0,  0.41,  0.52), 1.28, 1.28, 1.79 ,  2 , 0.80 ,  4 , 0.65 ),
-(47,        "Silver",       "Ag", ( 0.75,  0.75,  0.75), 1.34, 1.34, 1.75 ,  1 , 1.26 ,  2 , 0.89 ),
-(48,       "Cadmium",       "Cd", (  1.0,  0.85,  0.56), 1.48, 1.48, 1.71 ,  1 , 1.14 ,  2 , 0.97 ),
-(49,        "Indium",       "In", ( 0.65,  0.45,  0.45), 1.44, 1.44, 2.00 ,  3 , 0.81 ),
-(50,           "Tin",       "Sn", (  0.4,  0.50,  0.50), 1.41, 1.41, 1.72 , -4 , 2.94 , -1 , 3.70 ,  2 , 0.93 ,  4 , 0.71 ),
-(51,      "Antimony",       "Sb", ( 0.61,  0.38,  0.70), 1.40, 1.40, 1.53 , -3 , 2.45 ,  3 , 0.76 ,  5 , 0.62 ),
-(52,     "Tellurium",       "Te", ( 0.83,  0.47,   0.0), 1.36, 1.36, 1.42 , -2 , 2.11 , -1 , 2.50 ,  1 , 0.82 ,  4 , 0.70 ,  6 , 0.56 ),
-(53,        "Iodine",        "I", ( 0.58,   0.0,  0.58), 1.33, 1.33, 1.32 , -1 , 2.20 ,  5 , 0.62 ,  7 , 0.50 ),
-(54,         "Xenon",       "Xe", ( 0.25,  0.61,  0.69), 1.31, 1.31, 1.24 ),
-(55,       "Caesium",       "Cs", ( 0.34,  0.09,  0.56), 2.35, 2.35, 3.35 ,  1 , 1.67 ),
-(56,        "Barium",       "Ba", (  0.0,  0.78,   0.0), 1.98, 1.98, 2.78 ,  1 , 1.53 ,  2 , 1.34 ),
-(57,     "Lanthanum",       "La", ( 0.43,  0.83,   1.0), 1.69, 1.69, 2.74 ,  1 , 1.39 ,  3 , 1.06 ),
-(58,        "Cerium",       "Ce", (  1.0,   1.0,  0.78), 1.65, 1.65, 2.70 ,  1 , 1.27 ,  3 , 1.03 ,  4 , 0.92 ),
-(59,  "Praseodymium",       "Pr", ( 0.85,   1.0,  0.78), 1.65, 1.65, 2.67 ,  3 , 1.01 ,  4 , 0.90 ),
-(60,     "Neodymium",       "Nd", ( 0.78,   1.0,  0.78), 1.64, 1.64, 2.64 ,  3 , 0.99 ),
-(61,    "Promethium",       "Pm", ( 0.63,   1.0,  0.78), 1.63, 1.63, 2.62 ,  3 , 0.97 ),
-(62,      "Samarium",       "Sm", ( 0.56,   1.0,  0.78), 1.62, 1.62, 2.59 ,  3 , 0.96 ),
-(63,      "Europium",       "Eu", ( 0.38,   1.0,  0.78), 1.85, 1.85, 2.56 ,  2 , 1.09 ,  3 , 0.95 ),
-(64,    "Gadolinium",       "Gd", ( 0.27,   1.0,  0.78), 1.61, 1.61, 2.54 ,  3 , 0.93 ),
-(65,       "Terbium",       "Tb", ( 0.18,   1.0,  0.78), 1.59, 1.59, 2.51 ,  3 , 0.92 ,  4 , 0.84 ),
-(66,    "Dysprosium",       "Dy", ( 0.12,   1.0,  0.78), 1.59, 1.59, 2.49 ,  3 , 0.90 ),
-(67,       "Holmium",       "Ho", (  0.0,   1.0,  0.61), 1.58, 1.58, 2.47 ,  3 , 0.89 ),
-(68,        "Erbium",       "Er", (  0.0,  0.90,  0.45), 1.57, 1.57, 2.45 ,  3 , 0.88 ),
-(69,       "Thulium",       "Tm", (  0.0,  0.83,  0.32), 1.56, 1.56, 2.42 ,  3 , 0.87 ),
-(70,     "Ytterbium",       "Yb", (  0.0,  0.74,  0.21), 1.74, 1.74, 2.40 ,  2 , 0.93 ,  3 , 0.85 ),
-(71,      "Lutetium",       "Lu", (  0.0,  0.67,  0.14), 1.56, 1.56, 2.25 ,  3 , 0.85 ),
-(72,       "Hafnium",       "Hf", ( 0.30,  0.76,   1.0), 1.44, 1.44, 2.16 ,  4 , 0.78 ),
-(73,      "Tantalum",       "Ta", ( 0.30,  0.65,   1.0), 1.34, 1.34, 2.09 ,  5 , 0.68 ),
-(74,      "Tungsten",        "W", ( 0.12,  0.58,  0.83), 1.30, 1.30, 2.02 ,  4 , 0.70 ,  6 , 0.62 ),
-(75,       "Rhenium",       "Re", ( 0.14,  0.49,  0.67), 1.28, 1.28, 1.97 ,  4 , 0.72 ,  7 , 0.56 ),
-(76,        "Osmium",       "Os", ( 0.14,   0.4,  0.58), 1.26, 1.26, 1.92 ,  4 , 0.88 ,  6 , 0.69 ),
-(77,       "Iridium",       "Ir", ( 0.09,  0.32,  0.52), 1.27, 1.27, 1.87 ,  4 , 0.68 ),
-(78,     "Platinium",       "Pt", ( 0.81,  0.81,  0.87), 1.30, 1.30, 1.83 ,  2 , 0.80 ,  4 , 0.65 ),
-(79,          "Gold",       "Au", (  1.0,  0.81,  0.13), 1.34, 1.34, 1.79 ,  1 , 1.37 ,  3 , 0.85 ),
-(80,       "Mercury",       "Hg", ( 0.72,  0.72,  0.81), 1.49, 1.49, 1.76 ,  1 , 1.27 ,  2 , 1.10 ),
-(81,      "Thallium",       "Tl", ( 0.65,  0.32,  0.30), 1.48, 1.48, 2.08 ,  1 , 1.47 ,  3 , 0.95 ),
-(82,          "Lead",       "Pb", ( 0.34,  0.34,  0.38), 1.47, 1.47, 1.81 ,  2 , 1.20 ,  4 , 0.84 ),
-(83,       "Bismuth",       "Bi", ( 0.61,  0.30,  0.70), 1.46, 1.46, 1.63 ,  1 , 0.98 ,  3 , 0.96 ,  5 , 0.74 ),
-(84,      "Polonium",       "Po", ( 0.67,  0.36,   0.0), 1.46, 1.46, 1.53 ,  6 , 0.67 ),
-(85,      "Astatine",       "At", ( 0.45,  0.30,  0.27), 1.45, 1.45, 1.43 , -3 , 2.22 ,  3 , 0.85 ,  5 , 0.46 ),
-(86,         "Radon",       "Rn", ( 0.25,  0.50,  0.58), 1.00, 1.00, 1.34 ),
-(87,      "Francium",       "Fr", ( 0.25,   0.0,   0.4), 1.00, 1.00, 1.00 ,  1 , 1.80 ),
-(88,        "Radium",       "Ra", (  0.0,  0.49,   0.0), 1.00, 1.00, 1.00 ,  2 , 1.43 ),
-(89,      "Actinium",       "Ac", ( 0.43,  0.67,  0.98), 1.00, 1.00, 1.00 ,  3 , 1.18 ),
-(90,       "Thorium",       "Th", (  0.0,  0.72,   1.0), 1.65, 1.65, 1.00 ,  4 , 1.02 ),
-(91,  "Protactinium",       "Pa", (  0.0,  0.63,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.13 ,  4 , 0.98 ,  5 , 0.89 ),
-(92,       "Uranium",        "U", (  0.0,  0.56,   1.0), 1.42, 1.42, 1.00 ,  4 , 0.97 ,  6 , 0.80 ),
-(93,     "Neptunium",       "Np", (  0.0,  0.50,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.10 ,  4 , 0.95 ,  7 , 0.71 ),
-(94,     "Plutonium",       "Pu", (  0.0,  0.41,   1.0), 1.00, 1.00, 1.00 ,  3 , 1.08 ,  4 , 0.93 ),
-(95,     "Americium",       "Am", ( 0.32,  0.36,  0.94), 1.00, 1.00, 1.00 ,  3 , 1.07 ,  4 , 0.92 ),
-(96,        "Curium",       "Cm", ( 0.47,  0.36,  0.89), 1.00, 1.00, 1.00 ),
-(97,     "Berkelium",       "Bk", ( 0.54,  0.30,  0.89), 1.00, 1.00, 1.00 ),
-(98,   "Californium",       "Cf", ( 0.63,  0.21,  0.83), 1.00, 1.00, 1.00 ),
-(99,   "Einsteinium",       "Es", ( 0.70,  0.12,  0.83), 1.00, 1.00, 1.00 ),
-(100,       "Fermium",       "Fm", ( 0.70,  0.12,  0.72), 1.00, 1.00, 1.00 ),
-(101,   "Mendelevium",       "Md", ( 0.70,  0.05,  0.65), 1.00, 1.00, 1.00 ),
-(102,      "Nobelium",       "No", ( 0.74,  0.05,  0.52), 1.00, 1.00, 1.00 ),
-(103,    "Lawrencium",       "Lr", ( 0.78,   0.0,   0.4), 1.00, 1.00, 1.00 ),
-(104,       "Vacancy",      "Vac", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-(105,       "Default",  "Default", (  1.0,   1.0,   1.0), 1.00, 1.00, 1.00),
-(106,         "Stick",    "Stick", (  0.5,   0.5,   0.5), 1.00, 1.00, 1.00),
-)
-
-# This list here contains all data of the elements and will be used during
-# runtime. It is a list of classes.
-# During executing Atomic Blender, the list will be initialized with the fixed
-# data from above via the class structure below (ElementProp). We
-# have then one fixed list (above), which will never be changed, and a list of
-# classes with same data. The latter can be modified via loading a separate
-# custom data file for instance.
-ELEMENTS = []
-
-# This is the list, which contains all atoms of all frames! Each item is a 
-# list which contains the atoms of a single frame. It is a list of  
-# 'AtomProp'.
-ALL_FRAMES = []
-
-# A list of ALL balls which are put into the scene
-STRUCTURE = []
-
-
-# This is the class, which stores the properties for one element.
-class ElementProp(object):
-    __slots__ = ('number', 'name', 'short_name', 'color', 'radii', 'radii_ionic')
-    def __init__(self, number, name, short_name, color, radii, radii_ionic):
-        self.number = number
-        self.name = name
-        self.short_name = short_name
-        self.color = color
-        self.radii = radii
-        self.radii_ionic = radii_ionic
-
-# This is the class, which stores the properties of one atom.
-class AtomProp(object):  
-    __slots__ = ('element', 'name', 'location', 'radius', 'color', 'material')
-    def __init__(self, element, name, location, radius, color, material):
-        self.element = element
-        self.name = name
-        self.location = location
-        self.radius = radius
-        self.color = color
-        self.material = material
-
-
-# -----------------------------------------------------------------------------
-#                                                           Some basic routines        
-
-def read_elements():
-
-    del ELEMENTS[:]
-
-    for item in ELEMENTS_DEFAULT:
-
-        # All three radii into a list
-        radii = [item[4],item[5],item[6]]
-        # The handling of the ionic radii will be done later. So far, it is an
-        # empty list.
-        radii_ionic = []
-
-        li = ElementProp(item[0],item[1],item[2],item[3],
-                                     radii,radii_ionic)
-        ELEMENTS.append(li)
-
-
-# filepath_pdb: path to pdb file
-# radiustype  : '0' default
-#               '1' atomic radii
-#               '2' van der Waals
-def read_xyz_file(filepath_xyz,radiustype):
-
-    number_frames = 0
-    total_number_atoms = 0
-
-    # Open the file ...
-    filepath_xyz_p = open(filepath_xyz, "r")
-
-    #Go through the whole file.
-    FLAG = False
-    for line in filepath_xyz_p:
-
-        # ... the loop is broken here (EOF) ...
-        if line == "":
-            continue
-
-        split_list = line.rsplit()
-
-        if len(split_list) == 1:
-            number_atoms = int(split_list[0])
-            FLAG = True
-            
-        if FLAG == True:
-        
-            line = filepath_xyz_p.readline()
-            line = line.rstrip()
-            
-            all_atoms= []
-            for i in range(number_atoms):
-
-
-                # This is a guarantee that only the total number of atoms of the
-                # first frame is used. Condition is, so far, that the number of
-                # atoms in a xyz file is constant. However, sometimes the number
-                # may increase (or decrease). If it decreases, the addon crashes.
-                # If it increases, only the tot number of atoms of the first frame
-                # is used.
-                # By time, I will allow varying atom numbers ... but this takes 
-                # some time ...            
-                if number_frames != 0:
-                    if i >= total_number_atoms:
-                        break
-                        
-       
-                line = filepath_xyz_p.readline()
-                line = line.rstrip()
-                split_list = line.rsplit()
-                short_name = str(split_list[0])
-                     
-                # Go through all elements and find the element of the current atom.
-                FLAG_FOUND = False
-                for element in ELEMENTS:
-                    if str.upper(short_name) == str.upper(element.short_name):
-                        # Give the atom its proper name, color and radius:
-                        name = element.name
-                        # int(radiustype) => type of radius:
-                        # pre-defined (0), atomic (1) or van der Waals (2)
-                        radius = float(element.radii[int(radiustype)])
-                        color = element.color
-                        FLAG_FOUND = True
-                        break
-                
-                # Is it a vacancy or an 'unknown atom' ?
-                if FLAG_FOUND == False:
-                    # Give this atom also a name. If it is an 'X' then it is a
-                    # vacancy. Otherwise ...
-                    if "X" in short_name:
-                        short_name = "VAC"
-                        name = "Vacancy"
-                        radius = float(ELEMENTS[-3].radii[int(radiustype)])
-                        color = ELEMENTS[-3].color
-                    # ... take what is written in the xyz file. These are somewhat
-                    # unknown atoms. This should never happen, the element list is
-                    # almost complete. However, we do this due to security reasons.
-                    else:
-                        name = str.upper(short_name)
-                        radius = float(ELEMENTS[-2].radii[int(radiustype)])
-                        color = ELEMENTS[-2].color
-              
-                x = float(split_list[1])
-                y = float(split_list[2])
-                z = float(split_list[3])
-                
-                location = Vector((x,y,z))
-            
-                all_atoms.append([short_name, name, location, radius, color])
-            
-            # We note here all elements. This needs to be done only once. 
-            if number_frames == 0:
-            
-                # This is a guarantee that only the total number of atoms of the
-                # first frame is used. Condition is, so far, that the number of
-                # atoms in a xyz file is constant. However, sometimes the number
-                # may increase (or decrease). If it decreases, the addon crashes.
-                # If it increases, only the tot number of atoms of the first frame
-                # is used.
-                # By time, I will allow varying atom numbers ... but this takes 
-                # some time ...
-                total_number_atoms = number_atoms
-                
-                
-                elements = []
-                for atom in all_atoms:
-                    FLAG_FOUND = False
-                    for element in elements:
-                        # If the atom name is already in the list, 
-                        # FLAG on 'True'.
-                        if element == atom[1]:
-                            FLAG_FOUND = True
-                            break
-                    # No name in the current list has been found? => New entry.
-                    if FLAG_FOUND == False:
-                        # Stored are: Atom label (e.g. 'Na'), the corresponding 
-                        # atom name (e.g. 'Sodium') and its color.
-                        elements.append(atom[1])
-            
-            # Sort the atoms: create lists of atoms of one type
-            structure = []
-            for element in elements:
-                atoms_one_type = []
-                for atom in all_atoms:
-                    if atom[1] == element:
-                        atoms_one_type.append(AtomProp(atom[0],
-                                                       atom[1],
-                                                       atom[2],
-                                                       atom[3],
-                                                       atom[4],[]))
-                structure.append(atoms_one_type)
-
-            ALL_FRAMES.append(structure)
-            number_frames += 1
-            FLAG = False
-
-    filepath_xyz_p.close()
-    
-    return total_number_atoms
-
-
-# -----------------------------------------------------------------------------
-#                                                            The main routine
-
-def import_xyz(Ball_type,
-               Ball_azimuth,
-               Ball_zenith,
-               Ball_radius_factor,
-               radiustype,
-               Ball_distance_factor,
-               put_to_center, 
-               put_to_center_all,
-               use_camera,
-               use_lamp,
-               filepath_xyz):
-
-    # List of materials
-    atom_material_list = []
-
-    # ------------------------------------------------------------------------
-    # INITIALIZE THE ELEMENT LIST
-
-    read_elements()
-
-    # ------------------------------------------------------------------------
-    # READING DATA OF ATOMS
-
-    Number_of_total_atoms = read_xyz_file(filepath_xyz, 
-                                                       radiustype)
-                                               
-    # We show the atoms of the first frame.
-    first_frame = ALL_FRAMES[0]
-
-    # ------------------------------------------------------------------------
-    # MATERIAL PROPERTIES FOR ATOMS
-
-    # Create first a new list of materials for each type of atom
-    # (e.g. hydrogen)
-    for atoms_of_one_type in first_frame:
-        # Take the first atom
-        atom = atoms_of_one_type[0]
-        material = bpy.data.materials.new(atom.name)
-        material.name = atom.name
-        material.diffuse_color = atom.color
-        atom_material_list.append(material)
-
-    # Now, we go through all atoms and give them a material. For all atoms ...
-    for atoms_of_one_type in first_frame:
-        for atom in atoms_of_one_type:
-            # ... and all materials ...
-            for material in atom_material_list:
-                # ... select the correct material for the current atom via
-                # comparison of names ...
-                if atom.name in material.name:
-                    # ... and give the atom its material properties.
-                    # However, before we check if it is a vacancy
-                    # The vacancy is represented by a transparent cube.
-                    if atom.name == "Vacancy":
-                        material.transparency_method = 'Z_TRANSPARENCY'
-                        material.alpha = 1.3
-                        material.raytrace_transparency.fresnel = 1.6
-                        material.raytrace_transparency.fresnel_factor = 1.6
-                        material.use_transparency = True
-                    # The atom gets its properties.
-                    atom.material = material
-
-    # ------------------------------------------------------------------------
-    # TRANSLATION OF THE STRUCTURE TO THE ORIGIN
-
-    # It may happen that the structure in a XYZ file already has an offset
-
-
-    # If chosen, the structure is put into the center of the scene
-    # (only the first frame).
-    if put_to_center == True and put_to_center_all == False:
-
-        sum_vec = Vector((0.0,0.0,0.0))
-
-        # Sum of all atom coordinates
-        for atoms_of_one_type in first_frame:
-            sum_vec = sum([atom.location for atom in atoms_of_one_type], sum_vec)
-
-        # Then the average is taken
-        sum_vec = sum_vec / Number_of_total_atoms
-
-        # After, for each atom the center of gravity is substracted
-        for atoms_of_one_type in first_frame:
-            for atom in atoms_of_one_type:
-                atom.location -= sum_vec
-
-    # If chosen, the structure is put into the center of the scene
-    # (all frames).
-    if put_to_center_all == True:
-
-        # For all frames
-        for frame in ALL_FRAMES: 
-
-            sum_vec = Vector((0.0,0.0,0.0))
-
-            # Sum of all atom coordinates
-            for (i, atoms_of_one_type) in enumerate(frame):
-
-                # This is a guarantee that only the total number of atoms of the
-                # first frame is used. Condition is, so far, that the number of
-                # atoms in a xyz file is constant. However, sometimes the number
-                # may increase (or decrease). If it decreases, the addon crashes.
-                # If it increases, only the tot number of atoms of the first frame
-                # is used.
-                # By time, I will allow varying atom numbers ... but this takes 
-                # some time ...
-                if i >= Number_of_total_atoms:
-                    break
-
-                sum_vec = sum([atom.location for atom in atoms_of_one_type], sum_vec)
-
-            # Then the average is taken
-            sum_vec = sum_vec / Number_of_total_atoms
-
-            # After, for each atom the center of gravity is substracted
-            for atoms_of_one_type in frame:
-                for atom in atoms_of_one_type:
-                    atom.location -= sum_vec
-
-   
-    # ------------------------------------------------------------------------
-    # SCALING
-
-    # Take all atoms and adjust their radii and scale the distances.
-    for atoms_of_one_type in first_frame:
-        for atom in atoms_of_one_type:
-            atom.location *= Ball_distance_factor
-    
-    # ------------------------------------------------------------------------
-    # DETERMINATION OF SOME GEOMETRIC PROPERTIES
-
-    # In the following, some geometric properties of the whole object are
-    # determined: center, size, etc.
-    sum_vec = Vector((0.0,0.0,0.0))
-
-    # First the center is determined. All coordinates are summed up ...
-    for atoms_of_one_type in first_frame:
-        sum_vec = sum([atom.location for atom in atoms_of_one_type], sum_vec)
-
-    # ... and the average is taken. This gives the center of the object.
-    object_center_vec = sum_vec / Number_of_total_atoms
-
-    # Now, we determine the size.The farthest atom from the object center is
-    # taken as a measure. The size is used to place well the camera and light
-    # into the scene.
-
-    object_size_vec = []
-    for atoms_of_one_type in first_frame:
-        object_size_vec += [atom.location - object_center_vec for atom in atoms_of_one_type]
-
-    object_size = 0.0
-    object_size = max(object_size_vec).length
-
-    # ------------------------------------------------------------------------
-    # CAMERA AND LAMP
-    camera_factor = 20.0
-
-    # If chosen a camera is put into the scene.
-    if use_camera == True:
-
-        # Assume that the object is put into the global origin. Then, the
-        # camera is moved in x and z direction, not in y. The object has its
-        # size at distance sqrt(object_size) from the origin. So, move the
-        # camera by this distance times a factor of camera_factor in x and z.
-        # Then add x, y and z of the origin of the object.
-        object_camera_vec = Vector((sqrt(object_size) * camera_factor,
-                                    0.0,
-                                    sqrt(object_size) * camera_factor))
-        camera_xyz_vec = object_center_vec + object_camera_vec
-
-        # Create the camera
-        current_layers=bpy.context.scene.layers 
-        camera_data = bpy.data.cameras.new("A_camera")
-        camera_data.lens = 45
-        camera_data.clip_end = 500.0
-        camera = bpy.data.objects.new("A_camera", camera_data)
-        camera.location = camera_xyz_vec
-        camera.layers = current_layers
-        bpy.context.scene.objects.link(camera) 
-
-        # Here the camera is rotated such it looks towards the center of
-        # the object. The [0.0, 0.0, 1.0] vector along the z axis
-        z_axis_vec             = Vector((0.0, 0.0, 1.0))
-        # The angle between the last two vectors
-        angle                  = object_camera_vec.angle(z_axis_vec, 0)
-        # The cross-product of z_axis_vec and object_camera_vec
-        axis_vec               = z_axis_vec.cross(object_camera_vec)
-        # Rotate 'axis_vec' by 'angle' and convert this to euler parameters.
-        # 4 is the size of the matrix.
-        camera.rotation_euler  = Matrix.Rotation(angle, 4, axis_vec).to_euler()
-
-        # Rotate the camera around its axis by 90° such that we have a nice
-        # camera position and view onto the object.
-        bpy.ops.object.select_all(action='DESELECT')        
-        camera.select = True         
-        bpy.ops.transform.rotate(value=(90.0*2*pi/360.0),
-                                 axis=object_camera_vec,
-                                 constraint_axis=(False, False, False),
-                                 constraint_orientation='GLOBAL',
-                                 mirror=False, proportional='DISABLED',
-                                 proportional_edit_falloff='SMOOTH',
-                                 proportional_size=1, snap=False,
-                                 snap_target='CLOSEST', snap_point=(0, 0, 0),
-                                 snap_align=False, snap_normal=(0, 0, 0),
-                                 release_confirm=False)
-
-    # Here a lamp is put into the scene, if chosen.
-    if use_lamp == True:
-
-        # This is the distance from the object measured in terms of %
-        # of the camera distance. It is set onto 50% (1/2) distance.
-        lamp_dl = sqrt(object_size) * 15 * 0.5
-        # This is a factor to which extend the lamp shall go to the right
-        # (from the camera  point of view).
-        lamp_dy_right = lamp_dl * (3.0/4.0)
-
-        # Create x, y and z for the lamp.
-        object_lamp_vec = Vector((lamp_dl,lamp_dy_right,lamp_dl))
-        lamp_xyz_vec = object_center_vec + object_lamp_vec
-
-        # Create the lamp
-        current_layers=bpy.context.scene.layers
-        lamp_data = bpy.data.lamps.new(name="A_lamp", type="POINT")
-        lamp_data.distance = 500.0
-        lamp_data.energy = 3.0
-        lamp_data.shadow_method = 'RAY_SHADOW'        
-        lamp = bpy.data.objects.new("A_lamp", lamp_data)
-        lamp.location = lamp_xyz_vec
-        lamp.layers = current_layers
-        bpy.context.scene.objects.link(lamp)         
-
-        bpy.context.scene.world.light_settings.use_ambient_occlusion = True
-        bpy.context.scene.world.light_settings.ao_factor = 0.2
-        
-
-    # ------------------------------------------------------------------------
-    # DRAWING THE ATOMS
-
-    bpy.ops.object.select_all(action='DESELECT')
-
-    # For each list of atoms of ONE type (e.g. Hydrogen)
-    for atoms_of_one_type in first_frame:
-
-        # Create first the vertices composed of the coordinates of all
-        # atoms of one type
-        atom_vertices = []
-        for atom in atoms_of_one_type:
-            # In fact, the object is created in the World's origin.
-            # This is why 'object_center_vec' is substracted. At the end
-            # the whole object is translated back to 'object_center_vec'.
-            atom_vertices.append( atom.location - object_center_vec )
-
-        # Build the mesh
-        atom_mesh = bpy.data.meshes.new("Mesh_"+atom.name)
-        atom_mesh.from_pydata(atom_vertices, [], [])
-        atom_mesh.update()
-        new_atom_mesh = bpy.data.objects.new(atom.name, atom_mesh)
-        bpy.context.scene.objects.link(new_atom_mesh)
-
-        # Now, build a representative sphere (atom)
-        current_layers=bpy.context.scene.layers
-
-        if atom.name == "Vacancy":
-            bpy.ops.mesh.primitive_cube_add(
-                            view_align=False, enter_editmode=False,
-                            location=(0.0, 0.0, 0.0),
-                            rotation=(0.0, 0.0, 0.0),
-                            layers=current_layers)
-        else:
-            # NURBS balls
-            if Ball_type == "0":
-                bpy.ops.surface.primitive_nurbs_surface_sphere_add(
-                            view_align=False, enter_editmode=False,
-                            location=(0,0,0), rotation=(0.0, 0.0, 0.0),
-                            layers=current_layers)
-            # UV balls
-            elif Ball_type == "1":
-                bpy.ops.mesh.primitive_uv_sphere_add(
-                            segments=Ball_azimuth, ring_count=Ball_zenith,
-                            size=1, view_align=False, enter_editmode=False,
-                            location=(0,0,0), rotation=(0, 0, 0),
-                            layers=current_layers)
-            # Meta balls
-            elif Ball_type == "2":
-                bpy.ops.object.metaball_add(type='BALL', view_align=False, 
-                            enter_editmode=False, location=(0, 0, 0), 
-                            rotation=(0, 0, 0), layers=current_layers)
-
-        ball = bpy.context.scene.objects.active
-        ball.scale  = (atom.radius*Ball_radius_factor,) * 3
-
-        if atom.name == "Vacancy":
-            ball.name = "Cube_"+atom.name
-        else:
-            ball.name = "Ball (NURBS)_"+atom.name
-        ball.active_material = atom.material
-        ball.parent = new_atom_mesh
-        new_atom_mesh.dupli_type = 'VERTS'
-        # The object is back translated to 'object_center_vec'.
-        new_atom_mesh.location = object_center_vec
-        STRUCTURE.append(new_atom_mesh)
-
-    # ------------------------------------------------------------------------
-    # SELECT ALL LOADED OBJECTS
-    
-    bpy.ops.object.select_all(action='DESELECT')
-    obj = None
-    for obj in STRUCTURE:
-        obj.select = True
-    # activate the last selected object (perhaps another should be active?)
-    if obj:
-        bpy.context.scene.objects.active = obj
-
-
-
-def build_frames(frame_delta, frame_skip):
-
-    scn = bpy.context.scene
-
-    # Introduce the basis for all elements that appear in the structure.     
-    for element in STRUCTURE:
-     
-        bpy.ops.object.select_all(action='DESELECT')   
-        bpy.context.scene.objects.active = element
-        element.select = True
-        bpy.ops.object.shape_key_add(True)
-        
-    frame_skip += 1    
-
-    # Introduce the keys and reference the atom positions for each key.     
-    i = 0
-    for j, frame in enumerate(ALL_FRAMES):        
-           
-        if j % frame_skip == 0:
-           
-            for elements_frame, elements_structure in zip(frame,STRUCTURE):
-             
-                key = elements_structure.shape_key_add()
-    
-                for atom_frame, atom_structure in zip(elements_frame, key.data):
-    
-                    atom_structure.co = (atom_frame.location 
-                                       - elements_structure.location)
-    
-                key.name = atom_frame.name + "_frame_" + str(i) 
-
-            i += 1
-
-    num_frames = i
-        
-    scn.frame_start = 0
-    scn.frame_end = frame_delta * num_frames
-
-    # Manage the values of the keys
-    for element in STRUCTURE:
- 
-        scn.frame_current = 0 
-
-        element.data.shape_keys.key_blocks[1].value = 1.0
-        element.data.shape_keys.key_blocks[2].value = 0.0
-        element.data.shape_keys.key_blocks[1].keyframe_insert("value")     
-        element.data.shape_keys.key_blocks[2].keyframe_insert("value")         
-
-        scn.frame_current += frame_delta
-
-        number = 0
-    
-        for number in range(num_frames)[2:]:#-1]:
-    
-            element.data.shape_keys.key_blocks[number-1].value = 0.0
-            element.data.shape_keys.key_blocks[number].value = 1.0
-            element.data.shape_keys.key_blocks[number+1].value = 0.0
-            element.data.shape_keys.key_blocks[number-1].keyframe_insert("value")     
-            element.data.shape_keys.key_blocks[number].keyframe_insert("value")     
-            element.data.shape_keys.key_blocks[number+1].keyframe_insert("value")         
-                
-            scn.frame_current += frame_delta
-            
-        number += 1    
-            
-        element.data.shape_keys.key_blocks[number].value = 1.0
-        element.data.shape_keys.key_blocks[number-1].value = 0.0
-        element.data.shape_keys.key_blocks[number].keyframe_insert("value")     
-        element.data.shape_keys.key_blocks[number-1].keyframe_insert("value")    
-        
-
-
diff --git a/release/scripts/addons_contrib/io_points_pcd/__init__.py b/release/scripts/addons_contrib/io_points_pcd/__init__.py
deleted file mode 100644
index 6214a4c..0000000
--- a/release/scripts/addons_contrib/io_points_pcd/__init__.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "PCD",
-    "author": "Aurel Wildfellner",
-    "version": (0, 1),
-    "blender": (2, 5, 7),
-    "location": "File > Import-Export > Point Cloud Data",
-    "description": "Imports and Exports PCD (Point Cloud Data) files. PCD files are the default format used by  pcl (Point Cloud Library).",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-#    "support": 'OFFICAL',
-    "category": "Import-Export"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(pcd_utils)
-else:
-    from . import pcd_utils
-
-import itertools
-import os
-
-
-import bpy
-from bpy.props import *
-from bpy_extras.io_utils import ExportHelper, ImportHelper
-
-
-class ImportPCD(bpy.types.Operator, ImportHelper):
-    """Load PCD (Point Cloud Data) files"""
-    bl_idname = "import_points.stl"
-    bl_label = "Import PCD"
-
-    filename_ext = ".pcd"
-
-    filter_glob = StringProperty(default="*.pcd", options={'HIDDEN'})
-
-    files = CollectionProperty(name="File Path",
-                          description="File path used for importing "
-                                      "the PCD file",
-                          type=bpy.types.OperatorFileListElement)
-
-    directory = StringProperty(subtype='DIR_PATH')
-
-    def execute(self, context):
-        paths = [os.path.join(self.directory, name.name) for name in self.files]
-        if not paths:
-            paths.append(self.filepath)
-
-        for path in paths:
-            pcd_utils.import_pcd(path)
-
-        return {'FINISHED'}
-
-
-
-
-def menu_func_import(self, context):
-    self.layout.operator(ImportPCD.bl_idname, text="Point Cloud Data (.pcd)").filepath = "*.pcd"
-
-
-def menu_func_export(self, context):
-    #self.layout.operator(ExportPLY.bl_idname, text="Point Cloud Data (.pcd)")
-    pass
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_file_import.append(menu_func_import)
-    bpy.types.INFO_MT_file_export.append(menu_func_export)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_file_import.remove(menu_func_import)
-    bpy.types.INFO_MT_file_export.remove(menu_func_export)
-
-
-if __name__ == "__main__":
-    register()
-
diff --git a/release/scripts/addons_contrib/io_points_pcd/pcd_utils.py b/release/scripts/addons_contrib/io_points_pcd/pcd_utils.py
deleted file mode 100644
index 9f2a79e..0000000
--- a/release/scripts/addons_contrib/io_points_pcd/pcd_utils.py
+++ /dev/null
@@ -1,55 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-
-from . import pcdparser
-
-
-def create_and_link_mesh(name, points):
-    """
-    Create a blender mesh and object called name from a list of
-    *points* and link it in the current scene.
-    """
-
-    mesh = bpy.data.meshes.new(name)
-    mesh.from_pydata(points, [], [])
-
-    # update mesh to allow proper display
-    mesh.validate()
-    mesh.update()
-
-    scene = bpy.context.scene
-
-    obj = bpy.data.objects.new(name, mesh)
-    scene.objects.link(obj)
-    obj.select = True
-
-
-def import_pcd(filepath, name="new_pointcloud"):
-    parser = pcdparser.PCDParser.factory(filepath, pcdparser.PointXYZ)
-    parser.parseFile()
-    points = parser.getPoints()
-
-    blender_points = []
-    for point in points:
-        blender_points.append((point.x, point.y, point.z))
-
-    create_and_link_mesh(name, blender_points)
-  
-
diff --git a/release/scripts/addons_contrib/io_points_pcd/pcdparser.py b/release/scripts/addons_contrib/io_points_pcd/pcdparser.py
deleted file mode 100644
index 8c543c4..0000000
--- a/release/scripts/addons_contrib/io_points_pcd/pcdparser.py
+++ /dev/null
@@ -1,338 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#   
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-import struct
-
-
-def encodeASCIILine(line):
-    return line.decode(encoding='ASCII')
-
-
-
-class Point:
-
-    def __init__(self):
-        pass
-
-
-    def setField(self, fieldname, values):
-        pass
-
-
-
-
-class PointXYZ(Point):
-
-    x = 0
-    y = 0
-    z = 0
-
-    def __init__(self):
-        super().__init__()
-
-
-    def setField(self, fieldname, values):
-        value = values[0]
-        if fieldname == 'x':
-            self.x = value
-        elif fieldname == 'y':
-            self.y = value
-        elif fieldname == 'z':
-            self.z = value
-
-
-
-
-class PCDParser:
-
-    filepath = ''
-    file = None
-
-    points = []
-    PointClass = None
-
-    headerEnd = False
-
-
-    @staticmethod
-    def factory(filepath, PointClass):
-        version = 'NO_VERSION_NUMBER'
-        with open(filepath, 'rb') as f:
-            for b in f:
-                line = encodeASCIILine(b)
-                line_split = line.split()
-                if line_split[0] == 'VERSION' and len(line_split) > 1:
-                    version = line_split[1]
-                    break
-      
-        if version == ".7" or version == "0.7": 
-            return PCDParser_v0_7(filepath, PointClass)
-        else:
-            return None
-
-
-    def __init__(self, filepath, PointClass):
-        self.filepath = filepath
-        self.PointClass = PointClass
-
-        self.file = None
-        self.headerEnd = False
-        self.points = []
-
-
-    def parserWarning(self, msg):
-        print("[WARNING] ", msg)
-    
-
-    def rmComment(self, line):
-        return line[:line.find('#')] 
-
-
-    def parseFile(self):
-        with open(self.filepath, 'rb') as self.file:
-            self.parseHeader()
-            self.parsePoints()
-
-
-    def parseHeader(self):
-        for b in self.file:
-            line = encodeASCIILine(b)
-            line = self.rmComment(line)
-
-            split = line.split()
-            if len(split) > 0:
-                self.parseHeaderLine(split)
-
-            if self.headerEnd:
-                self.finalizeHeader()
-                break
-
-
-    def parseHeaderLine(self, split):
-        keyword = split[0]
-        self.parserWarning("Uknown header Keyword '" + keyword + "' gets ignored")
-
-    
-    def finalizeHeader(self):
-        pass
-
-
-    def parsePoints(self):
-        pass
-
-
-    def getPoints(self):
-        return self.points
-
-
-    def version(self):
-        return 'NO_VERSION_NUMBER'
-
-
-
-
-class PCDParser_v0_7(PCDParser):
-
-    fields = []
-
-    def __init__(self, filepath, PointClass):
-        super().__init__(filepath, PointClass)
-        self.fields = []
-
-
-    def version(self):
-        return '.7'
-
-
-    def parseHeaderLine(self, split):
-        keyword = split[0]
-        if keyword == 'VERSION':
-            self.parseVERSION(split[1:])
-        elif keyword == 'FIELDS':
-            self.parseFIELDS(split[1:])
-        elif keyword == 'SIZE':
-            self.parseSIZE(split[1:])
-        elif keyword == 'TYPE':
-            self.parseTYPE(split[1:])
-        elif keyword == 'COUNT':
-            self.parseCOUNT(split[1:])
-        elif keyword == 'WIDTH':
-            self.parseWIDTH(split[1:])
-        elif keyword == 'HEIGHT':
-            self.parseHEIGHT(split[1:])
-        elif keyword == 'POINTS':
-            self.parsePOINTS(split[1:])
-        elif keyword == 'DATA':
-            self.parseDATA(split[1:])
-        else:
-            super().parseHeaderLine(split)
-
-
-    def parseVERSION(self, split):
-        pass
-
-
-    def parseFIELDS(self, split):
-        print("SPLIT FIELDS:", split)
-        for field in split:
-            self.fields.append([field, None, None, None])
-        print("FIELDS, after parsing:", self.fields)
-
-
-    def parseSIZE(self, split):
-        for i, size in enumerate(split):
-            self.fields[i][1] = int(size)
-
-
-    def parseTYPE(self, split):
-        for i, type in enumerate(split):
-            self.fields[i][2] = type
-
-
-    def parseCOUNT(self, split):
-        for i, count in enumerate(split):
-            self.fields[i][3] = int(count)
-
-
-    def parseWIDTH(self, split):
-        self.width = int(split[0])
-
-
-    def parseHEIGHT(self, split):
-        self.height = int(split[0])
-
-
-    def parsePOINTS(self, split):
-        pass
-
-
-    def parseDATA(self, split):
-        if split[0] == "ascii":
-            self.datatype = 'ASCII'
-        elif split[0] == "binary":
-            self.datatype = 'BINARY'
-        self.headerEnd = True
-
-
-    def finalizeHeader(self):
-        self.numPoints = self.width * self.height
-        print("FIELDS - finalized", self.fields)
-
-
-    def parsePoints(self):
-        if self.datatype == 'ASCII':
-            self.parseASCII()
-        elif self.datatype == 'BINARY':
-            self.parseBINARY()
-
-
-    def parseASCII(self):
-        parsedPoints = 0
-        while parsedPoints < self.numPoints:
-           
-            try: 
-                b = self.file.readline()
-                line = encodeASCIILine(b)
-            except:
-                self.parserError("Unexpected end of data")
-                return
-            line = self.rmComment(line)
-            split = line.split()
-
-            if (len(split) == 0):
-                continue
-            else:
-                parsedPoints += 1
-
-            point = self.PointClass()
-
-            for field in self.fields:
-                fieldname = field[0]
-                fieldtype = field[2]
-                fieldcount = field[3]
-
-                values = []
-                for i in range(fieldcount):
-                    vs = split.pop(0)
-                    if fieldtype == 'F':
-                        values.append(float(vs))
-                    elif fieldtype in ['U', 'I']:
-                        values.append(int(vs))
-
-                point.setField(fieldname, values)
-
-            self.points.append(point)
-
-
-    def parseBINARY(self):
-        for pointi in range(self.numPoints):
-            point = self.PointClass()
-
-            for field in self.fields:
-                fieldname = field[0]
-                fieldsize = field[1]
-                fieldtype = field[2]
-                fieldcount = field[3]
-
-                values = []
-                for i in range(fieldcount):
-
-                    fs = None
-                    if fieldtype == 'F':
-                        if fieldsize == 4: #float
-                            fs = '<f'
-                        elif fieldsize == 8: #double
-                            fs = '<d'
-                    elif fieldtype == 'U':
-                        if fieldsize == 1: #unsinged char
-                            fs = '<B'
-                        elif fieldsize == 2: #unsinged short
-                            fs = '<H'
-                        elif fieldsize == 4: #unsinged int
-                            fs =  '<I'
-                    elif fieldtype == 'I':
-                        if fieldsize == 1: #char
-                            fs = '<c'
-                        elif fieldsize == 2: #short
-                            fs = '<h'
-                        elif fieldsize == 4: #signed int
-                            fs =  '<i'
-
-                    raw = self.file.read(fieldsize)
-                    if (fs):
-                        data = struct.unpack(fs, raw)
-                        values.append(data[0])
-
-                point.setField(fieldname, values)
-
-            self.points.append(point)
-
-
-
-
-def test():
-    parser = PCDParser.factory('test.pcd', PointXYZ)
-    if parser:
-        parser.parseFile()
-        points = parser.getPoints()
-        for point in points:
-            print(point.x, point.y, point.z)
-    else:
-        print("Can't create parser for this file")
-
diff --git a/release/scripts/addons_contrib/io_points_pcd/test.pcd b/release/scripts/addons_contrib/io_points_pcd/test.pcd
deleted file mode 100644
index 79ec41d..0000000
--- a/release/scripts/addons_contrib/io_points_pcd/test.pcd
+++ /dev/null
@@ -1,224 +0,0 @@
-# .PCD v.7 - Point Cloud Data file format
-VERSION .7
-FIELDS x y z rgb
-SIZE 4 4 4 4
-TYPE F F F F
-COUNT 1 1 1 1
-WIDTH 213
-HEIGHT 1
-VIEWPOINT 0 0 0 1 0 0 0
-POINTS 213
-DATA ascii
-0.93773 0.33763 0 4.2108e+06
-0.90805 0.35641 0 4.2108e+06
-0.81915 0.32 0 4.2108e+06
-0.97192 0.278 0 4.2108e+06
-0.944 0.29474 0 4.2108e+06
-0.98111 0.24247 0 4.2108e+06
-0.93655 0.26143 0 4.2108e+06
-0.91631 0.27442 0 4.2108e+06
-0.81921 0.29315 0 4.2108e+06
-0.90701 0.24109 0 4.2108e+06
-0.83239 0.23398 0 4.2108e+06
-0.99185 0.2116 0 4.2108e+06
-0.89264 0.21174 0 4.2108e+06
-0.85082 0.21212 0 4.2108e+06
-0.81044 0.32222 0 4.2108e+06
-0.74459 0.32192 0 4.2108e+06
-0.69927 0.32278 0 4.2108e+06
-0.8102 0.29315 0 4.2108e+06
-0.75504 0.29765 0 4.2108e+06
-0.8102 0.24399 0 4.2108e+06
-0.74995 0.24723 0 4.2108e+06
-0.68049 0.29768 0 4.2108e+06
-0.66509 0.29002 0 4.2108e+06
-0.69441 0.2526 0 4.2108e+06
-0.62807 0.22187 0 4.2108e+06
-0.58706 0.32199 0 4.2108e+06
-0.52125 0.31955 0 4.2108e+06
-0.49351 0.32282 0 4.2108e+06
-0.44313 0.32169 0 4.2108e+06
-0.58678 0.2929 0 4.2108e+06
-0.53436 0.29164 0 4.2108e+06
-0.59308 0.24134 0 4.2108e+06
-0.5357 0.2444 0 4.2108e+06
-0.50043 0.31235 0 4.2108e+06
-0.44107 0.29711 0 4.2108e+06
-0.50727 0.22193 0 4.2108e+06
-0.43957 0.23976 0 4.2108e+06
-0.8105 0.21112 0 4.2108e+06
-0.73555 0.2114 0 4.2108e+06
-0.69907 0.21082 0 4.2108e+06
-0.63327 0.21154 0 4.2108e+06
-0.59165 0.21201 0 4.2108e+06
-0.52477 0.21491 0 4.2108e+06
-0.49375 0.21006 0 4.2108e+06
-0.4384 0.19632 0 4.2108e+06
-0.43425 0.16052 0 4.2108e+06
-0.3787 0.32173 0 4.2108e+06
-0.33444 0.3216 0 4.2108e+06
-0.23815 0.32199 0 4.808e+06
-0.3788 0.29315 0 4.2108e+06
-0.33058 0.31073 0 4.2108e+06
-0.3788 0.24399 0 4.2108e+06
-0.30249 0.29189 0 4.2108e+06
-0.23492 0.29446 0 4.808e+06
-0.29465 0.24399 0 4.2108e+06
-0.23514 0.24172 0 4.808e+06
-0.18836 0.32277 0 4.808e+06
-0.15992 0.32176 0 4.808e+06
-0.08642 0.32181 0 4.808e+06
-0.039994 0.32283 0 4.808e+06
-0.20039 0.31211 0 4.808e+06
-0.1417 0.29506 0 4.808e+06
-0.20921 0.22332 0 4.808e+06
-0.13884 0.24227 0 4.808e+06
-0.085123 0.29441 0 4.808e+06
-0.048446 0.31279 0 4.808e+06
-0.086957 0.24399 0 4.808e+06
-0.3788 0.21189 0 4.2108e+06
-0.29465 0.19323 0 4.2108e+06
-0.23755 0.19348 0 4.808e+06
-0.29463 0.16054 0 4.2108e+06
-0.23776 0.16054 0 4.808e+06
-0.19016 0.21038 0 4.808e+06
-0.15704 0.21245 0 4.808e+06
-0.08678 0.21169 0 4.808e+06
-0.012746 0.32168 0 4.808e+06
--0.075715 0.32095 0 4.808e+06
--0.10622 0.32304 0 4.808e+06
--0.16391 0.32118 0 4.808e+06
-0.00088411 0.29487 0 4.808e+06
--0.057568 0.29457 0 4.808e+06
--0.0034333 0.24399 0 4.808e+06
--0.055185 0.24185 0 4.808e+06
--0.10983 0.31352 0 4.808e+06
--0.15082 0.29453 0 4.808e+06
--0.11534 0.22049 0 4.808e+06
--0.15155 0.24381 0 4.808e+06
--0.1912 0.32173 0 4.808e+06
--0.281 0.3185 0 4.808e+06
--0.30791 0.32307 0 4.808e+06
--0.33854 0.32148 0 4.808e+06
--0.21248 0.29805 0 4.808e+06
--0.26372 0.29905 0 4.808e+06
--0.22562 0.24399 0 4.808e+06
--0.25035 0.2371 0 4.808e+06
--0.29941 0.31191 0 4.808e+06
--0.35845 0.2954 0 4.808e+06
--0.29231 0.22236 0 4.808e+06
--0.36101 0.24172 0 4.808e+06
--0.0034393 0.21129 0 4.808e+06
--0.07306 0.21304 0 4.808e+06
--0.10579 0.2099 0 4.808e+06
--0.13642 0.21411 0 4.808e+06
--0.22562 0.19323 0 4.808e+06
--0.24439 0.19799 0 4.808e+06
--0.22591 0.16041 0 4.808e+06
--0.23466 0.16082 0 4.808e+06
--0.3077 0.20998 0 4.808e+06
--0.3413 0.21239 0 4.808e+06
--0.40551 0.32178 0 4.2108e+06
--0.50568 0.3218 0 4.2108e+06
--0.41732 0.30844 0 4.2108e+06
--0.44237 0.28859 0 4.2108e+06
--0.41591 0.22004 0 4.2108e+06
--0.44803 0.24236 0 4.2108e+06
--0.50623 0.29315 0 4.2108e+06
--0.50916 0.24296 0 4.2108e+06
--0.57019 0.22334 0 4.2108e+06
--0.59611 0.32199 0 4.2108e+06
--0.65104 0.32199 0 4.2108e+06
--0.72566 0.32129 0 4.2108e+06
--0.75538 0.32301 0 4.2108e+06
--0.59653 0.29315 0 4.2108e+06
--0.65063 0.29315 0 4.2108e+06
--0.59478 0.24245 0 4.2108e+06
--0.65063 0.24399 0 4.2108e+06
--0.70618 0.29525 0 4.2108e+06
--0.76203 0.31284 0 4.2108e+06
--0.70302 0.24183 0 4.2108e+06
--0.77062 0.22133 0 4.2108e+06
--0.41545 0.21099 0 4.2108e+06
--0.45004 0.19812 0 4.2108e+06
--0.4475 0.1673 0 4.2108e+06
--0.52031 0.21236 0 4.2108e+06
--0.55182 0.21045 0 4.2108e+06
--0.5965 0.21131 0 4.2108e+06
--0.65064 0.2113 0 4.2108e+06
--0.72216 0.21286 0 4.2108e+06
--0.7556 0.20987 0 4.2108e+06
--0.78343 0.31973 0 4.2108e+06
--0.87572 0.32111 0 4.2108e+06
--0.90519 0.32263 0 4.2108e+06
--0.95526 0.34127 0 4.2108e+06
--0.79774 0.29271 0 4.2108e+06
--0.85618 0.29497 0 4.2108e+06
--0.79975 0.24326 0 4.2108e+06
--0.8521 0.24246 0 4.2108e+06
--0.91157 0.31224 0 4.2108e+06
--0.95031 0.29572 0 4.2108e+06
--0.92223 0.2213 0 4.2108e+06
--0.94979 0.24354 0 4.2108e+06
--0.78641 0.21505 0 4.2108e+06
--0.87094 0.21237 0 4.2108e+06
--0.90637 0.20934 0 4.2108e+06
--0.93777 0.21481 0 4.2108e+06
-0.22244 -0.0296 0 4.808e+06
-0.2704 -0.078167 0 4.808e+06
-0.24416 -0.056883 0 4.808e+06
-0.27311 -0.10653 0 4.808e+06
-0.26172 -0.10653 0 4.808e+06
-0.2704 -0.1349 0 4.808e+06
-0.24428 -0.15599 0 4.808e+06
-0.19017 -0.025297 0 4.808e+06
-0.14248 -0.02428 0 4.808e+06
-0.19815 -0.037432 0 4.808e+06
-0.14248 -0.03515 0 4.808e+06
-0.093313 -0.02428 0 4.808e+06
-0.044144 -0.02428 0 4.808e+06
-0.093313 -0.03515 0 4.808e+06
-0.044144 -0.03515 0 4.808e+06
-0.21156 -0.17357 0 4.808e+06
-0.029114 -0.12594 0 4.2108e+06
-0.036583 -0.15619 0 4.2108e+06
-0.22446 -0.20514 0 4.808e+06
-0.2208 -0.2369 0 4.808e+06
-0.2129 -0.208 0 4.808e+06
-0.19316 -0.25672 0 4.808e+06
-0.14497 -0.27484 0 4.808e+06
-0.030167 -0.18748 0 4.2108e+06
-0.1021 -0.27453 0 4.808e+06
-0.1689 -0.2831 0 4.808e+06
-0.13875 -0.28647 0 4.808e+06
-0.086993 -0.29568 0 4.808e+06
-0.044924 -0.3154 0 4.808e+06
--0.0066125 -0.02428 0 4.808e+06
--0.057362 -0.02428 0 4.808e+06
--0.0066125 -0.03515 0 4.808e+06
--0.057362 -0.03515 0 4.808e+06
--0.10653 -0.02428 0 4.808e+06
--0.15266 -0.025282 0 4.808e+06
--0.10653 -0.03515 0 4.808e+06
--0.16036 -0.037257 0 4.808e+06
-0.0083286 -0.1259 0 4.2108e+06
-0.0007442 -0.15603 0 4.2108e+06
--0.1741 -0.17381 0 4.808e+06
--0.18502 -0.02954 0 4.808e+06
--0.20707 -0.056403 0 4.808e+06
--0.23348 -0.07764 0 4.808e+06
--0.2244 -0.10653 0 4.808e+06
--0.23604 -0.10652 0 4.808e+06
--0.20734 -0.15641 0 4.808e+06
--0.23348 -0.13542 0 4.808e+06
-0.0061083 -0.18729 0 4.2108e+06
--0.066235 -0.27472 0 4.808e+06
--0.17577 -0.20789 0 4.808e+06
--0.10861 -0.27494 0 4.808e+06
--0.15584 -0.25716 0 4.808e+06
--0.0075775 -0.31546 0 4.808e+06
--0.050817 -0.29595 0 4.808e+06
--0.10306 -0.28653 0 4.808e+06
--0.1319 -0.2831 0 4.808e+06
--0.18716 -0.20571 0 4.808e+06
--0.18369 -0.23729 0 4.808e+06
diff --git a/release/scripts/addons_contrib/io_scene_cod/__init__.py b/release/scripts/addons_contrib/io_scene_cod/__init__.py
deleted file mode 100644
index 8804fc9..0000000
--- a/release/scripts/addons_contrib/io_scene_cod/__init__.py
+++ /dev/null
@@ -1,475 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Blender-CoD: Blender Add-On for Call of Duty modding
-Version: alpha 3
-
-Copyright (c) 2011 CoDEmanX, Flybynyt -- blender-cod at online.de
-
-http://code.google.com/p/blender-cod/
-
-TODO
-- UI for xmodel and xanim import (planned for alpha 4/5)
-
-"""
-
-bl_info = {
-    "name": "Blender-CoD - Add-On for Call of Duty modding (alpha 3)",
-    "author": "CoDEmanX, Flybynyt",
-    "version": (0, 3, 5),
-    "blender": (2, 62, 3),
-    "location": "File > Import  |  File > Export",
-    "description": "Export models to *.XMODEL_EXPORT and animations to *.XANIM_EXPORT",
-    "warning": "Alpha version, please report any bugs!",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/Call_of_Duty_IO",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=30482",
-    "support": "TESTING",
-    "category": "Import-Export"
-}
-
-# To support reload properly, try to access a package var, if it's there, reload everything
-if "bpy" in locals():
-    import imp
-    if "import_xmodel" in locals():
-        imp.reload(import_xmodel)
-    if "export_xmodel" in locals():
-        imp.reload(export_xmodel)
-    if "import_xanim" in locals():
-        imp.reload(import_xanim)
-    if "export_xanim" in locals():
-        imp.reload(export_xanim)
-
-import bpy
-from bpy.props import BoolProperty, IntProperty, FloatProperty, StringProperty, EnumProperty
-import bpy_extras.io_utils
-from bpy_extras.io_utils import ExportHelper, ImportHelper
-import time
-
-# Planned for alpha 4/5
-class ImportXmodel(bpy.types.Operator, ImportHelper):
-    """Load a CoD XMODEL_EXPORT File"""
-    bl_idname = "import_scene.xmodel"
-    bl_label = "Import XMODEL_EXPORT"
-    bl_options = {'PRESET'}
-
-    filename_ext = ".XMODEL_EXPORT"
-    filter_glob = StringProperty(default="*.XMODEL_EXPORT", options={'HIDDEN'})
-
-    #use_meshes = BoolProperty(name="Meshes", description="Import meshes", default=True)
-    #use_armature = BoolProperty(name="Armature", description="Import Armature", default=True)
-    #use_bind_armature = BoolProperty(name="Bind Meshes to Armature", description="Parent imported meshes to armature", default=True)
-
-    #use_split_objects = BoolProperty(name="Object", description="Import OBJ Objects into Blender Objects", default=True)
-    #use_split_groups = BoolProperty(name="Group", description="Import OBJ Groups into Blender Objects", default=True)
-
-    #use_image_search = BoolProperty(name="Image Search", description="Search subdirs for any associated images (Warning, may be slow)", default=True)
-
-    def execute(self, context):
-        from . import import_xmodel
-        start_time = time.clock()
-        result = import_xmodel.load(self, context, **self.as_keywords(ignore=("filter_glob", "check_existing")))
-
-        if not result:
-            self.report({'INFO'}, "Import finished in %.4f sec." % (time.clock() - start_time))
-            return {'FINISHED'}
-        else:
-            self.report({'ERROR'}, result)
-            return {'CANCELLED'}
-
-    """
-    def draw(self, context):
-        layout = self.layout
-
-        col = layout.column()
-        col.prop(self, "use_meshes")
-        col.prop(self, "use_armature")
-
-        row = layout.row()
-        row.active = self.use_meshes and self.use_armature
-        row.prop(self, "use_bind_armature")
-    """
-
-    @classmethod
-    def poll(self, context):
-        return (context.scene is not None)
-
-class ImportXanim(bpy.types.Operator, ImportHelper):
-    """Load a CoD XANIM_EXPORT File"""
-    bl_idname = "import_scene.xanim"
-    bl_label = "Import XANIM_EXPORT"
-    bl_options = {'PRESET'}
-
-    filename_ext = ".XANIM_EXPORT"
-    filter_glob = StringProperty(default="*.XANIM_EXPORT;*.NT_EXPORT", options={'HIDDEN'})
-
-    def execute(self, context):
-        # print("Selected: " + context.active_object.name)
-        from . import import_xanim
-
-        return import_xanim.load(self, context, **self.as_keywords(ignore=("filter_glob",)))
-
-class ExportXmodel(bpy.types.Operator, ExportHelper):
-    """Save a CoD XMODEL_EXPORT File"""
-
-    bl_idname = "export_scene.xmodel"
-    bl_label = 'Export XMODEL_EXPORT'
-    bl_options = {'PRESET'}
-
-    filename_ext = ".XMODEL_EXPORT"
-    filter_glob = StringProperty(default="*.XMODEL_EXPORT", options={'HIDDEN'})
-
-    # List of operator properties, the attributes will be assigned
-    # to the class instance from the operator settings before calling.
-
-    use_version = EnumProperty(
-        name="Format Version",
-        description="XMODEL_EXPORT format version for export",
-        items=(('5', "Version 5", "vCoD, CoD:UO"),
-               ('6', "Version 6", "CoD2, CoD4, CoD5, CoD7")),
-        default='6',
-        )
-
-    use_selection = BoolProperty(
-        name="Selection only",
-        description="Export selected meshes only (object or weight paint mode)",
-        default=False
-        )
-
-    use_vertex_colors = BoolProperty(
-        name="Vertex colors",
-        description="Export vertex colors (if disabled, white color will be used)",
-        default=True
-        )
-
-    use_vertex_colors_alpha = BoolProperty(
-        name="As alpha",
-        description="Turn RGB vertex colors into grayscale (average value) and use it as alpha transparency. White is 1 (opaque), black 0 (invisible)",
-        default=False
-        )
-
-    use_apply_modifiers = BoolProperty(
-        name="Apply Modifiers",
-        description="Apply all mesh modifiers except Armature (preview resolution)",
-        default=True
-        )
-
-    use_armature = BoolProperty(
-        name="Armature",
-        description="Export bones (if disabled, only a 'tag_origin' bone will be written)",
-        default=True
-        )
-
-    use_vertex_cleanup = BoolProperty(
-        name="Clean up vertices",
-        description="Try this if you have problems converting to xmodel. Skips vertices which aren't used by any face and updates references.",
-        default=False
-        )
-
-    use_armature_pose = BoolProperty(
-        name="Pose animation to models",
-        description="Export meshes with Armature modifier applied as a series of XMODEL_EXPORT files",
-        default=False
-        )
-
-    use_frame_start = IntProperty(
-        name="Start",
-        description="First frame to export",
-        default=1,
-        min=0
-        )
-
-    use_frame_end = IntProperty(
-        name="End",
-        description="Last frame to export",
-        default=250,
-        min=0
-        )
-
-    use_weight_min = BoolProperty(
-        name="Minimum bone weight",
-        description="Try this if you get 'too small weight' errors when converting",
-        default=False,
-        )
-
-    use_weight_min_threshold = FloatProperty(
-        name="Threshold",
-        description="Smallest allowed weight (minimum value)",
-        default=0.010097,
-        min=0.0,
-        max=1.0,
-        precision=6
-        )
-
-    def execute(self, context):
-        from . import export_xmodel
-        start_time = time.clock()
-        result = export_xmodel.save(self, context, **self.as_keywords(ignore=("filter_glob", "check_existing")))
-
-        if not result:
-            self.report({'INFO'}, "Export finished in %.4f sec." % (time.clock() - start_time))
-            return {'FINISHED'}
-        else:
-            self.report({'ERROR'}, result)
-            return {'CANCELLED'}
-
-    # Extend ExportHelper invoke function to support dynamic default values
-    def invoke(self, context, event):
-
-        #self.use_frame_start = context.scene.frame_start
-        self.use_frame_start = context.scene.frame_current
-
-        #self.use_frame_end = context.scene.frame_end
-        self.use_frame_end = context.scene.frame_current
-
-        return super().invoke(context, event)
-
-    def draw(self, context):
-        layout = self.layout
-
-        row = layout.row(align=True)
-        row.prop(self, "use_version", expand=True)
-
-        # Calculate number of selected mesh objects
-        if context.mode in {'OBJECT', 'PAINT_WEIGHT'}:
-            meshes_selected = len([m for m in bpy.data.objects if m.type == 'MESH' and m.select])
-        else:
-            meshes_selected = 0
-
-        col = layout.column(align=True)
-        col.prop(self, "use_selection", "Selection only (%i meshes)" % meshes_selected)
-        col.enabled = bool(meshes_selected)
-
-        col = layout.column(align=True)
-        col.prop(self, "use_apply_modifiers")
-
-        col = layout.column(align=True)
-        col.enabled = not self.use_armature_pose
-        if self.use_armature and self.use_armature_pose:
-            col.prop(self, "use_armature", "Armature  (disabled)")
-        else:
-            col.prop(self, "use_armature")
-
-        if self.use_version == '6':
-
-            row = layout.row(align=True)
-            row.prop(self, "use_vertex_colors")
-
-            sub = row.split()
-            sub.active = self.use_vertex_colors
-            sub.prop(self, "use_vertex_colors_alpha")
-
-        col = layout.column(align=True)
-        col.label("Advanced:")
-
-        col = layout.column(align=True)
-        col.prop(self, "use_vertex_cleanup")
-
-        box = layout.box()
-
-        col = box.column(align=True)
-        col.prop(self, "use_armature_pose")
-
-        sub = box.column()
-        sub.active = self.use_armature_pose
-        sub.label(text="Frame range: (%i frames)" % (abs(self.use_frame_end - self.use_frame_start) + 1))
-
-        row = sub.row(align=True)
-        row.prop(self, "use_frame_start")
-        row.prop(self, "use_frame_end")
-
-        box = layout.box()
-
-        col = box.column(align=True)
-        col.prop(self, "use_weight_min")
-
-        sub = box.column()
-        sub.enabled = self.use_weight_min
-        sub.prop(self, "use_weight_min_threshold")
-
-    @classmethod
-    def poll(self, context):
-        return (context.scene is not None)
-
-class ExportXanim(bpy.types.Operator, ExportHelper):
-    """Save a XMODEL_XANIM File"""
-
-    bl_idname = "export_scene.xanim"
-    bl_label = 'Export XANIM_EXPORT'
-    bl_options = {'PRESET'}
-
-    filename_ext = ".XANIM_EXPORT"
-    filter_glob = StringProperty(default="*.XANIM_EXPORT", options={'HIDDEN'})
-
-    # List of operator properties, the attributes will be assigned
-    # to the class instance from the operator settings before calling.
-
-    use_selection = BoolProperty(
-        name="Selection only",
-        description="Export selected bones only (pose mode)",
-        default=False
-        )
-
-    use_framerate = IntProperty(
-        name="Framerate",
-        description="Set frames per second for export, 30 fps is commonly used.",
-        default=24,
-        min=1,
-        max=100
-        )
-
-    use_frame_start = IntProperty(
-        name="Start",
-        description="First frame to export",
-        default=1,
-        min=0
-        )
-
-    use_frame_end = IntProperty(
-        name="End",
-        description="Last frame to export",
-        default=250,
-        min=0
-        )
-
-    use_notetrack = BoolProperty(
-        name="Notetrack",
-        description="Export timeline markers as notetrack nodes",
-        default=True
-        )
-
-    use_notetrack_format = EnumProperty(
-        name="Notetrack format",
-        description="Notetrack format to use. Always set 'CoD 7' for Black Ops, even if not using notetrack!",
-        items=(('5', "CoD 5", "Separate NT_EXPORT notetrack file for 'World at War'"),
-               ('7', "CoD 7", "Separate NT_EXPORT notetrack file for 'Black Ops'"),
-               ('1', "all other", "Inline notetrack data for all CoD versions except WaW and BO")),
-        default='1',
-        )
-
-    def execute(self, context):
-        from . import export_xanim
-        start_time = time.clock()
-        result = export_xanim.save(self, context, **self.as_keywords(ignore=("filter_glob", "check_existing")))
-
-        if not result:
-            self.report({'INFO'}, "Export finished in %.4f sec." % (time.clock() - start_time))
-            return {'FINISHED'}
-        else:
-            self.report({'ERROR'}, result)
-            return {'CANCELLED'}
-
-    # Extend ExportHelper invoke function to support dynamic default values
-    def invoke(self, context, event):
-
-        self.use_frame_start = context.scene.frame_start
-        self.use_frame_end = context.scene.frame_end
-        self.use_framerate = round(context.scene.render.fps / context.scene.render.fps_base)
-
-        return super().invoke(context, event)
-
-    def draw(self, context):
-
-        layout = self.layout
-
-        bones_selected = 0
-        armature = None
-
-        # Take the first armature
-        for ob in bpy.data.objects:
-            if ob.type == 'ARMATURE' and len(ob.data.bones) > 0:
-                armature = ob.data
-
-                # Calculate number of selected bones if in pose-mode
-                if context.mode == 'POSE':
-                    bones_selected = len([b for b in armature.bones if b.select])
-
-                # Prepare info string
-                armature_info = "%s (%i bones)" % (ob.name, len(armature.bones))
-                break
-        else:
-            armature_info = "Not found!"
-
-        if armature:
-            icon = 'NONE'
-        else:
-            icon = 'ERROR'
-
-        col = layout.column(align=True)
-        col.label("Armature: %s" % armature_info, icon)
-
-        col = layout.column(align=True)
-        col.prop(self, "use_selection", "Selection only (%i bones)" % bones_selected)
-        col.enabled = bool(bones_selected)
-
-        layout.label(text="Frame range: (%i frames)" % (abs(self.use_frame_end - self.use_frame_start) + 1))
-
-        row = layout.row(align=True)
-        row.prop(self, "use_frame_start")
-        row.prop(self, "use_frame_end")
-
-        col = layout.column(align=True)
-        col.prop(self, "use_framerate")
-
-        # Calculate number of markers in export range
-        frame_min = min(self.use_frame_start, self.use_frame_end)
-        frame_max = max(self.use_frame_start, self.use_frame_end)
-        num_markers = len([m for m in context.scene.timeline_markers if frame_max >= m.frame >= frame_min])
-
-        col = layout.column(align=True)
-        col.prop(self, "use_notetrack", text="Notetrack (%i nodes)" % num_markers)
-
-        col = layout.column(align=True)
-        col.prop(self, "use_notetrack_format", expand=True)
-
-    @classmethod
-    def poll(self, context):
-        return (context.scene is not None)
-
-def menu_func_xmodel_import(self, context):
-    self.layout.operator(ImportXmodel.bl_idname, text="CoD Xmodel (.XMODEL_EXPORT)")
-"""
-def menu_func_xanim_import(self, context):
-    self.layout.operator(ImportXanim.bl_idname, text="CoD Xanim (.XANIM_EXPORT)")
-"""
-def menu_func_xmodel_export(self, context):
-    self.layout.operator(ExportXmodel.bl_idname, text="CoD Xmodel (.XMODEL_EXPORT)")
-
-def menu_func_xanim_export(self, context):
-    self.layout.operator(ExportXanim.bl_idname, text="CoD Xanim (.XANIM_EXPORT)")
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_file_import.append(menu_func_xmodel_import)
-    #bpy.types.INFO_MT_file_import.append(menu_func_xanim_import)
-    bpy.types.INFO_MT_file_export.append(menu_func_xmodel_export)
-    bpy.types.INFO_MT_file_export.append(menu_func_xanim_export)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_file_import.remove(menu_func_xmodel_import)
-    #bpy.types.INFO_MT_file_import.remove(menu_func_xanim_import)
-    bpy.types.INFO_MT_file_export.remove(menu_func_xmodel_export)
-    bpy.types.INFO_MT_file_export.remove(menu_func_xanim_export)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_scene_cod/export_xanim.py b/release/scripts/addons_contrib/io_scene_cod/export_xanim.py
deleted file mode 100644
index c3d00fc..0000000
--- a/release/scripts/addons_contrib/io_scene_cod/export_xanim.py
+++ /dev/null
@@ -1,231 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Blender-CoD: Blender Add-On for Call of Duty modding
-Version: alpha 3
-
-Copyright (c) 2011 CoDEmanX, Flybynyt -- blender-cod at online.de
-
-http://code.google.com/p/blender-cod/
-
-TODO
-- Test pose matrix exports, global or local?
-
-"""
-
-import bpy
-from datetime import datetime
-
-def save(self, context, filepath="",
-         use_selection=False,
-         use_framerate=24,
-         use_frame_start=1,
-         use_frame_end=250,
-         use_notetrack=True,
-         use_notetrack_format='1'):
-
-    armature = None
-    last_frame_current = context.scene.frame_current
-
-    # There's no context object right after object deletion, need to set one
-    if context.object:
-        last_mode = context.object.mode
-    else:
-        last_mode = 'OBJECT'
-
-        if bpy.data.objects:
-            context.scene.objects.active = bpy.data.objects[0]
-        else:
-            return "Nothing to export."
-
-    # HACK: Force an update, so that bone tree is properly sorted for hierarchy table export
-    bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-
-    # Check input objects, don't move this above hack!
-    for ob in bpy.data.objects:
-
-        # Take the first armature
-        if ob.type == 'ARMATURE' and len(ob.data.bones) > 0:
-            armature = ob
-            break
-    else:
-        return "No armature to export."
-
-    # Get the wanted bones
-    if use_selection:
-        bones = [b for b in armature.data.bones if b.select]
-    else:
-        bones = armature.data.bones
-
-    # Get armature matrix once for later global coords/matrices calculation per frame
-    a_matrix = armature.matrix_world
-
-    # There's valid data for export, create output file
-    try:
-        file = open(filepath, "w")
-    except IOError:
-        return "Could not open file for writing:\n%s" % filepath
-
-     # write the header
-    file.write("// XANIM_EXPORT file in CoD animation v3 format created with Blender v%s\n" \
-               % bpy.app.version_string)
-    file.write("// Source file: %s\n" % filepath)
-    file.write("// Export time: %s\n\n" % datetime.now().strftime("%d-%b-%Y %H:%M:%S"))
-    file.write("ANIMATION\n")
-    file.write("VERSION 3\n\n")
-
-    file.write("NUMPARTS %i\n" % len(bones))
-
-    # Write bone table
-    for i_bone, bone in enumerate(bones):
-        file.write("PART %i \"%s\"\n" % (i_bone, bone.name))
-
-    # Exporter shall use Blender's framerate (render settings, used as playback speed)
-    # Note: Time remapping not taken into account
-    file.write("\nFRAMERATE %i\n" % use_framerate)
-
-    file.write("NUMFRAMES %i\n\n" % (abs(use_frame_start - use_frame_end) + 1))
-
-    # If start frame greater than end frame, export animation reversed
-    if use_frame_start < use_frame_end:
-        frame_order = 1
-        frame_min = use_frame_start
-        frame_max = use_frame_end
-    else:
-        frame_order = -1
-        frame_min = use_frame_end
-        frame_max = use_frame_start
-
-    for i_frame, frame in enumerate(range(use_frame_start,
-                                          use_frame_end + frame_order,
-                                          frame_order),
-                                    frame_min):
-
-        file.write("FRAME %i\n" % i_frame)
-
-        # Set frame directly
-        context.scene.frame_set(frame)
-
-        # Get PoseBones for that frame
-        if use_selection:
-            bones = [b for b in armature.pose.bones if b.bone.select]
-        else:
-            bones = armature.pose.bones
-
-        # Write bone orientations
-        for i_bone, bone in enumerate(bones):
-
-            # Skip bone if 'Selection only' is enabled and bone not selected
-            if use_selection and not bone.bone.select: # It's actually posebone.bone!
-                continue
-
-            file.write("PART %i\n" % i_bone)
-
-
-            """ Doesn't seem to be right... or maybe it is? root can't have rotation, it rather sets the global orientation
-            if bone.parent is None:
-                file.write("OFFSET 0.000000 0.000000 0.000000\n")
-                file.write("SCALE 1.000000 1.000000 1.000000\n")
-                file.write("X 1.000000, 0.000000, 0.000000\n")
-                file.write("Y 0.000000, 1.000000, 0.000000\n")
-                file.write("Z 0.000000, 0.000000, 1.000000\n\n")
-            else:
-            """
-
-            b_tail = a_matrix * bone.tail
-            file.write("OFFSET %.6f %.6f %.6f\n" % (b_tail[0], b_tail[1], b_tail[2]))
-            file.write("SCALE 1.000000 1.000000 1.000000\n") # Is this even supported by CoD?
-            
-            file.write("X %.6f %.6f %.6f\n" % (bone.matrix[0][0], bone.matrix[1][0], bone.matrix[2][0]))
-            file.write("Y %.6f %.6f %.6f\n" % (bone.matrix[0][1], bone.matrix[1][1], bone.matrix[2][1]))
-            file.write("Z %.6f %.6f %.6f\n\n" % (bone.matrix[0][2], bone.matrix[1][2], bone.matrix[2][2]))
-
-            """
-            # Is a local matrix used (above) or a global?
-            # Rest pose bone roll shouldn't matter if local is used... o_O
-            # Note: Converting to xanim delta doesn't allow bone moves (only root?)
-            b_matrix = a_matrix * bone.matrix
-            file.write("X %.6f %.6f %.6f\n" % (b_matrix[0][0], b_matrix[1][0], b_matrix[2][0]))
-            file.write("Y %.6f %.6f %.6f\n" % (b_matrix[0][1], b_matrix[1][1], b_matrix[2][1]))
-            file.write("Z %.6f %.6f %.6f\n" % (b_matrix[0][2], b_matrix[1][2], b_matrix[2][2]))
-            """
-
-    # Blender timeline markers to notetrack nodes
-    markers = []
-    for m in context.scene.timeline_markers:
-        if frame_max >= m.frame >= frame_min:
-            markers.append([m.frame, m.name])
-    markers = sorted(markers)
-
-    # Cache marker string
-    marker_string = "NUMKEYS %i\n" % len(markers)
-
-    for m in markers:
-        marker_string += "FRAME %i \"%s\"\n" % (m[0], m[1])
-
-    # Write notetrack data
-    if use_notetrack_format == '7':
-        # Always 0 for CoD7, no matter if there are markers or not!
-        file.write("NUMKEYS 0\n")
-    else:
-        file.write("NOTETRACKS\n\n")
-
-        for i_bone, bone in enumerate(bones):
-
-            file.write("PART %i\n" % (i_bone))
-
-            if i_bone == 0 and use_notetrack and use_notetrack_format == '1' and len(markers) > 0:
-
-                file.write("NUMTRACKS 1\n\n")
-                file.write("NOTETRACK 0\n")
-                file.write(marker_string)
-                file.write("\n")
-
-            else:
-                file.write("NUMTRACKS 0\n\n")
-
-    # Close to flush buffers!
-    file.close()
-
-    if use_notetrack and use_notetrack_format in {'5', '7'}:
-
-        import os.path
-        filepath = os.path.splitext(filepath)[0] + ".NT_EXPORT"
-
-        try:
-            file = open(filepath, "w")
-        except IOError:
-            return "Could not open file for writing:\n%s" % filepath
-
-        if use_notetrack_format == '7':
-            file.write("FIRSTFRAME %i\n" % use_frame_start)
-            file.write("NUMFRAMES %i\n" % (abs(use_frame_end - use_frame_start) + 1))
-        file.write(marker_string)
-
-        file.close()
-
-    # Set frame_current and mode back
-    context.scene.frame_set(last_frame_current)
-    bpy.ops.object.mode_set(mode=last_mode, toggle=False)
-
-    # Quit with no errors
-    return
diff --git a/release/scripts/addons_contrib/io_scene_cod/export_xmodel.py b/release/scripts/addons_contrib/io_scene_cod/export_xmodel.py
deleted file mode 100644
index 72874c2..0000000
--- a/release/scripts/addons_contrib/io_scene_cod/export_xmodel.py
+++ /dev/null
@@ -1,732 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Blender-CoD: Blender Add-On for Call of Duty modding
-Version: alpha 3
-
-Copyright (c) 2011 CoDEmanX, Flybynyt -- blender-cod at online.de
-
-http://code.google.com/p/blender-cod/
-
-"""
-
-import bpy
-import os
-from datetime import datetime
-
-def save(self, context, filepath="",
-         use_version='6',
-         use_selection=False,
-         use_apply_modifiers=True,
-         use_armature=True,
-         use_vertex_colors=True,
-         use_vertex_colors_alpha=False,
-         use_vertex_cleanup=False,
-         use_armature_pose=False,
-         use_frame_start=1,
-         use_frame_end=250,
-         use_weight_min=False,
-         use_weight_min_threshold=0.010097):
-
-    # There's no context object right after object deletion, need to set one
-    if context.object:
-        last_mode = context.object.mode
-    else:
-        last_mode = 'OBJECT'
-
-        for ob in bpy.data.objects:
-            if ob.type == 'MESH':
-                context.scene.objects.active = ob
-                break
-        else:
-            return "No mesh to export."
-
-    # HACK: Force an update, so that bone tree is properly sorted for hierarchy table export
-    bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-
-    # Remember frame to set it back after export
-    last_frame_current = context.scene.frame_current
-
-    # Disable Armature for Pose animation export, bone.tail_local not available for PoseBones
-    if use_armature and use_armature_pose:
-        use_armature = False
-
-    # Don't iterate for a single frame
-    if not use_armature_pose or (use_armature_pose and use_frame_start == use_frame_end):
-        context.scene.frame_set(use_frame_start)
-
-        result = _write(self, context, filepath,
-                        use_version,
-                        use_selection,
-                        use_apply_modifiers,
-                        use_armature,
-                        use_vertex_colors,
-                        use_vertex_colors_alpha,
-                        use_vertex_cleanup,
-                        use_armature_pose,
-                        use_weight_min,
-                        use_weight_min_threshold)
-    else:
-
-        if use_frame_start < use_frame_end:
-            frame_order = 1
-            frame_min = use_frame_start
-            frame_max = use_frame_end
-        else:
-            frame_order = -1
-            frame_min = use_frame_end
-            frame_max = use_frame_start
-
-        # String length of highest frame number for filename padding
-        frame_strlen = len(str(frame_max))
-
-        filepath_split = os.path.splitext(filepath)
-
-        for i_frame, frame in enumerate(range(use_frame_start,
-                                              use_frame_end + frame_order,
-                                              frame_order
-                                              ),
-                                        frame_min):
-
-            # Set frame for export
-            # Don't do it directly to frame_current, as to_mesh() won't use updated frame!
-            context.scene.frame_set(frame)
-
-            # Generate filename including padded frame number
-            filepath_frame = "%s_%.*i%s" % (filepath_split[0], frame_strlen, i_frame, filepath_split[1])
-
-            result = _write(self, context, filepath_frame,
-                            use_version,
-                            use_selection,
-                            use_apply_modifiers,
-                            use_armature,
-                            use_vertex_colors,
-                            use_vertex_colors_alpha,
-                            use_vertex_cleanup,
-                            use_armature_pose,
-                            use_weight_min,
-                            use_weight_min_threshold
-                            )
-
-            # Quit iteration on error
-            if result:
-                context.scene.frame_set(last_frame_current)
-                return result
-
-    # Set frame back
-    context.scene.frame_set(last_frame_current)
-
-    # Set mode back
-    bpy.ops.object.mode_set(mode=last_mode, toggle=False)
-
-    # Handle possible error result of single frame export
-    return result
-
-def _write(self, context, filepath,
-           use_version,
-           use_selection,
-           use_apply_modifiers,
-           use_armature,
-           use_vertex_colors,
-           use_vertex_colors_alpha,
-           use_vertex_cleanup,
-           use_armature_pose,
-           use_weight_min,
-           use_weight_min_threshold):
-
-    num_verts = 0
-    num_verts_unique = 0
-    verts_unique = []
-    num_faces = 0
-    meshes = []
-    meshes_matrix = []
-    meshes_vgroup = []
-    objects = []
-    armature = None
-    bone_mapping = {}
-    materials = []
-
-    ob_count = 0
-    v_count = 0
-
-    # Check input objects, count them and convert mesh objects
-    for ob in bpy.data.objects:
-
-        # Take the first armature
-        if ob.type == 'ARMATURE' and use_armature and armature is None and len(ob.data.bones) > 0:
-            armature = ob
-            continue
-
-        if ob.type != 'MESH':
-            continue
-
-        # Skip meshes, which are unselected
-        if use_selection and not ob.select:
-            continue
-
-        # Set up modifiers whether to apply deformation or not
-        mod_states = []
-        for mod in ob.modifiers:
-            mod_states.append(mod.show_viewport)
-            if mod.type == 'ARMATURE':
-                mod.show_viewport = mod.show_viewport and use_armature_pose
-            else:
-                mod.show_viewport = mod.show_viewport and use_apply_modifiers
-
-        # to_mesh() applies enabled modifiers only
-        mesh = ob.to_mesh(scene=context.scene, apply_modifiers=True, settings='PREVIEW')
-
-        # Restore modifier settings
-        for i, mod in enumerate(ob.modifiers):
-            mod.show_viewport = mod_states[i]
-
-        # Skip invalid meshes
-        if len(mesh.vertices) < 3:
-            _skip_notice(ob.name, mesh.name, "Less than 3 vertices")
-            continue
-        if len(mesh.tessfaces) < 1:
-            _skip_notice(ob.name, mesh.name, "No faces")
-            continue
-        if len(ob.material_slots) < 1:
-            _skip_notice(ob.name, mesh.name, "No material")
-            continue
-        if not mesh.tessface_uv_textures:
-            _skip_notice(ob.name, mesh.name, "No UV texture, not unwrapped?")
-            continue
-
-        meshes.append(mesh)
-        meshes_matrix.append(ob.matrix_world)
-
-        if ob.vertex_groups:
-            meshes_vgroup.append(ob.vertex_groups)
-        else:
-            meshes_vgroup.append(None)
-
-        if use_vertex_cleanup:
-
-            # Retrieve verts which belong to a face
-            verts = []
-            for f in mesh.tessfaces:
-                for v in f.vertices:
-                    verts.append(v)
-
-            # Uniquify & sort
-            keys = {}
-            for e in verts:
-                keys[e] = 1
-            verts = list(keys.keys())
-
-        else:
-            verts = [v.index for v in mesh.vertices]
-
-        # Store vert sets, aligned to mesh objects
-        verts_unique.append(verts)
-
-        # As len(mesh.vertices) doesn't take unused verts into account, already count here
-        num_verts_unique += len(verts)
-
-        # Take quads into account!
-        for f in mesh.tessfaces:
-            if len(f.vertices) == 3:
-                num_faces += 1
-            else:
-                num_faces += 2
-
-        objects.append(ob.name)
-
-    if (num_verts or num_faces or len(objects)) == 0:
-        return "Nothing to export.\n" \
-               "Meshes must have at least:\n" \
-               "    3 vertices\n" \
-               "    1 face\n" \
-               "    1 material\n" \
-               "    UV mapping"
-
-    # There's valid data for export, create output file
-    try:
-        file = open(filepath, "w")
-    except IOError:
-        return "Could not open file for writing:\n%s" % filepath
-
-    # Write header
-    file.write("// XMODEL_EXPORT file in CoD model v%i format created with Blender v%s\n" \
-               % (int(use_version), bpy.app.version_string))
-
-    file.write("// Source file: %s\n" % bpy.data.filepath)
-    file.write("// Export time: %s\n\n" % datetime.now().strftime("%d-%b-%Y %H:%M:%S"))
-
-    if use_armature_pose:
-        file.write("// Posed model of frame %i\n\n" % bpy.context.scene.frame_current)
-
-    if use_weight_min:
-        file.write("// Minimum bone weight: %f\n\n" % use_weight_min_threshold)
-
-    file.write("MODEL\n")
-    file.write("VERSION %i\n" % int(use_version))
-
-    # Write armature data
-    if armature is None:
-
-        # Default rig
-        file.write("\nNUMBONES 1\n")
-        file.write("BONE 0 -1 \"tag_origin\"\n")
-
-        file.write("\nBONE 0\n")
-
-        if use_version == '5':
-            file.write("OFFSET 0.000000 0.000000 0.000000\n")
-            file.write("SCALE 1.000000 1.000000 1.000000\n")
-            file.write("X 1.000000 0.000000 0.000000\n")
-            file.write("Y 0.000000 1.000000 0.000000\n")
-            file.write("Z 0.000000 0.000000 1.000000\n")
-        else:
-            # Model format v6 has commas
-            file.write("OFFSET 0.000000, 0.000000, 0.000000\n")
-            file.write("SCALE 1.000000, 1.000000, 1.000000\n")
-            file.write("X 1.000000, 0.000000, 0.000000\n")
-            file.write("Y 0.000000, 1.000000, 0.000000\n")
-            file.write("Z 0.000000, 0.000000, 1.000000\n")
-
-    else:
-
-        # Either use posed armature bones for animation to model sequence export
-        if use_armature_pose:
-            bones = armature.pose.bones
-        # Or armature bones in rest pose for regular rigged models
-        else:
-            bones = armature.data.bones
-
-        file.write("\nNUMBONES %i\n" % len(bones))
-
-        # Get the armature object's orientation
-        a_matrix = armature.matrix_world
-
-        # Check for multiple roots, armature should have exactly one
-        roots = 0
-        for bone in bones:
-            if not bone.parent:
-                roots += 1
-        if roots != 1:
-            warning_string = "Warning: %i root bones found in armature object '%s'\n" \
-                             % (roots, armature.name)
-            print(warning_string)
-            file.write("// %s" % warning_string)
-
-        # Look up table for bone indices
-        bone_table = [b.name for b in bones]
-
-        # Write bone hierarchy table and create bone_mapping array for later use (vertex weights)
-        for i, bone in enumerate(bones):
-
-            if bone.parent:
-                try:
-                    bone_parent_index = bone_table.index(bone.parent.name)
-                except (ValueError):
-                    bone_parent_index = 0
-                    file.write("// Warning: \"%s\" not found in bone table, binding to root...\n"
-                               % bone.parent.name)
-            else:
-                bone_parent_index = -1
-
-            file.write("BONE %i %i \"%s\"\n" % (i, bone_parent_index, bone.name))
-            bone_mapping[bone.name] = i
-
-        # Write bone orientations
-        for i, bone in enumerate(bones):
-            file.write("\nBONE %i\n" % i)
-
-            # Using local tail for proper coordinates
-            b_tail = a_matrix * bone.tail_local
-
-            # TODO: Fix calculation/error: pose animation will use posebones, but they don't have tail_local!
-
-            # TODO: Fix rotation matrix calculation, calculation seems to be wrong...
-            #b_matrix = bone.matrix_local * a_matrix
-            #b_matrix = bone.matrix * a_matrix * bones[0].matrix.inverted()
-            #from mathutils import Matrix
-
-            # Is this the way to go? Or will it fix the root only, but mess up all other roll angles?
-            if i == 0:
-                b_matrix = ((1,0,0),(0,1,0),(0,0,1))
-            else:
-                b_matrix = a_matrix * bone.matrix_local
-                #from mathutils import Matrix
-                #b_matrix = bone.matrix_local * a_matrix * Matrix(((1,-0,0),(0,0,-1),(-0,1,0)))
-                
-            if use_version == '5':
-                file.write("OFFSET %.6f %.6f %.6f\n" % (b_tail[0], b_tail[1], b_tail[2]))
-                file.write("SCALE 1.000000 1.000000 1.000000\n") # Is this even supported by CoD?
-                file.write("X %.6f %.6f %.6f\n" % (b_matrix[0][0], b_matrix[1][0], b_matrix[2][0]))
-                file.write("Y %.6f %.6f %.6f\n" % (b_matrix[0][1], b_matrix[1][1], b_matrix[2][1]))
-                file.write("Z %.6f %.6f %.6f\n" % (b_matrix[0][2], b_matrix[1][2], b_matrix[2][2]))
-            else:
-                file.write("OFFSET %.6f, %.6f, %.6f\n" % (b_tail[0], b_tail[1], b_tail[2]))
-                file.write("SCALE 1.000000, 1.000000, 1.000000\n")
-                file.write("X %.6f, %.6f, %.6f\n" % (b_matrix[0][0], b_matrix[1][0], b_matrix[2][0]))
-                file.write("Y %.6f, %.6f, %.6f\n" % (b_matrix[0][1], b_matrix[1][1], b_matrix[2][1]))
-                file.write("Z %.6f, %.6f, %.6f\n" % (b_matrix[0][2], b_matrix[1][2], b_matrix[2][2]))
-
-    # Write vertex data
-    file.write("\nNUMVERTS %i\n" % num_verts_unique)
-
-    for i, me in enumerate(meshes):
-
-        # Get the right object matrix for mesh
-        mesh_matrix = meshes_matrix[i]
-
-        # Get bone influences per vertex
-        if armature is not None and meshes_vgroup[i] is not None:
-
-            groupNames, vWeightList = meshNormalizedWeights(meshes_vgroup[i],
-                                                            me,
-                                                            use_weight_min,
-                                                            use_weight_min_threshold
-                                                            )
-            # Get bones by vertex_group names, bind to root if can't find one 
-            groupIndices = [bone_mapping.get(g, -1) for g in groupNames]
-
-            weight_group_list = []
-            for weights in vWeightList:
-                weight_group_list.append(sorted(zip(weights, groupIndices), reverse=True))
-
-        # Use uniquified vert sets and count the verts
-        for i_vert, vert in enumerate(verts_unique[i]):
-            v = me.vertices[vert]
-
-            # Calculate global coords
-            x = mesh_matrix[0][0] * v.co[0] + \
-                mesh_matrix[0][1] * v.co[1] + \
-                mesh_matrix[0][2] * v.co[2] + \
-                mesh_matrix[0][3]
-
-            y = mesh_matrix[1][0] * v.co[0] + \
-                mesh_matrix[1][1] * v.co[1] + \
-                mesh_matrix[1][2] * v.co[2] + \
-                mesh_matrix[1][3]
-
-            z = mesh_matrix[2][0] * v.co[0] + \
-                mesh_matrix[2][1] * v.co[1] + \
-                mesh_matrix[2][2] * v.co[2] + \
-                mesh_matrix[2][3]
-                
-            #print("%.6f %.6f %.6f single calced xyz\n%.6f %.6f %.6f mat mult" % (x, y, z, ))
-
-            file.write("VERT %i\n" % (i_vert + v_count))
-
-            if use_version == '5':
-                file.write("OFFSET %.6f %.6f %.6f\n" % (x, y, z))
-            else:
-                file.write("OFFSET %.6f, %.6f, %.6f\n" % (x, y, z))
-
-            # Write bone influences
-            if armature is None or meshes_vgroup[i] is None:
-                file.write("BONES 1\n")
-                file.write("BONE 0 1.000000\n\n")
-            else:
-                cache = ""
-                c_bones = 0
-
-                for weight, bone_index in weight_group_list[v.index]:
-                    if (use_weight_min and round(weight, 6) < use_weight_min_threshold) or \
-                       (not use_weight_min and round(weight, 6) == 0):
-                        # No (more) bones with enough weight, totalweight of 0 would lead to error
-                        break
-                    cache += "BONE %i %.6f\n" % (bone_index, weight)
-                    c_bones += 1
-
-                if c_bones == 0:
-                    warning_string = "Warning: No bone influence found for vertex %i, binding to bone %i\n" \
-                                     % (v.index, bone_index)
-                    print(warning_string)
-                    file.write("// %s" % warning_string)
-                    file.write("BONES 1\n")
-                    file.write("BONE %i 0.000001\n\n" % bone_index) # HACK: Is a minimum weight a good idea?
-                else:
-                    file.write("BONES %i\n%s\n" % (c_bones, cache))
-
-        v_count += len(verts_unique[i]);
-
-    # TODO: Find a better way to keep track of the vertex index?
-    v_count = 0
-
-    # Prepare material array
-    for me in meshes:
-        for f in me.tessfaces:
-            try:
-                mat = me.materials[f.material_index]
-            except (IndexError):
-                # Mesh has no material with this index
-                # Note: material_index is never None (will be 0 instead)
-                continue
-            else:
-                if mat not in materials:
-                    materials.append(mat)
-
-    # Write face data
-    file.write("\nNUMFACES %i\n" % num_faces)
-
-    for i_me, me in enumerate(meshes):
-
-        #file.write("// Verts:\n%s\n" % list(enumerate(verts_unique[i_me])))
-
-        for f in me.tessfaces:
-
-            try:
-                mat = me.materials[f.material_index]
-
-            except (IndexError):
-                mat_index = 0
-
-                warning_string = "Warning: Assigned material with index %i not found, falling back to first\n" \
-                                  % f.material_index
-                print(warning_string)
-                file.write("// %s" % warning_string)
-
-            else:
-                try:
-                    mat_index = materials.index(mat)
-
-                except (ValueError):
-                    mat_index = 0
-
-                    warning_string = "Warning: Material \"%s\" not mapped, falling back to first\n" \
-                                      % mat.name
-                    print(warning_string)
-                    file.write("// %s" % warning_string)
-
-            # Support for vertex colors
-            if me.tessface_vertex_colors:
-                col = me.tessface_vertex_colors.active.data[f.index]
-
-            # Automatic triangulation support
-            f_v_orig = [v for v in enumerate(f.vertices)]
-
-            if len(f_v_orig) == 3:
-                f_v_iter = (f_v_orig[2], f_v_orig[1], f_v_orig[0]), # HACK: trailing comma to force a tuple
-            else:
-                f_v_iter = (f_v_orig[2], f_v_orig[1], f_v_orig[0]), (f_v_orig[3], f_v_orig[2], f_v_orig[0])
-
-            for iter in f_v_iter:
-
-                # TODO: Test material# export (v5 correct?)
-                if use_version == '5':
-                    file.write("TRI %i %i 0 1\n" % (ob_count, mat_index))
-                else:
-                    file.write("TRI %i %i 0 0\n" % (ob_count, mat_index))
-
-                for vi, v in iter:
-
-                    no = me.vertices[v].normal # Invert? Orientation seems to have no effect...
-
-                    uv = me.tessface_uv_textures.active
-                    uv1 = uv.data[f.index].uv[vi][0]
-                    uv2 = 1 - uv.data[f.index].uv[vi][1] # Flip!
-
-                    #if 0 > uv1 > 1 
-                    # TODO: Warn if accidentally tiling ( uv <0 or >1 )
-
-                    # Remap vert indices used by face
-                    if use_vertex_cleanup:
-                        vert_new = verts_unique[i_me].index(v) + v_count
-                        #file.write("// %i (%i) --> %i\n" % (v+v_count, v, vert_new))
-                    else:
-                        vert_new = v + v_count
-
-                    if use_version == '5':
-                        file.write("VERT %i %.6f %.6f %.6f %.6f %.6f\n" \
-                                   % (vert_new, uv1, uv2, no[0], no[1], no[2]))
-                    else:
-                        file.write("VERT %i\n" % vert_new)
-                        file.write("NORMAL %.6f %.6f %.6f\n" % (no[0], no[1], no[2]))
-
-                        if me.tessface_vertex_colors and use_vertex_colors:
-
-                            if vi == 0:
-                                c = col.color1
-                            elif vi == 1:
-                                c = col.color2
-                            elif vi == 2:
-                                c = col.color3
-                            else:
-                                c = col.color4
-
-                            if use_vertex_colors_alpha:
-
-                                # Turn RGB into grayscale (luminance conversion)
-                                c_lum = c[0] * 0.3 + c[1] * 0.59 + c[2] * 0.11
-                                file.write("COLOR 1.000000 1.000000 1.000000 %.6f\n" % c_lum)
-                            else:
-                                file.write("COLOR %.6f %.6f %.6f 1.000000\n" % (c[0], c[1], c[2]))
-
-                        else:
-                            file.write("COLOR 1.000000 1.000000 1.000000 1.000000\n")
-
-                        file.write("UV 1 %.6f %.6f\n" % (uv1, uv2))
-
-        # Note: Face types (tris/quads) have nothing to do with vert indices!
-        if use_vertex_cleanup:
-            v_count += len(verts_unique[i_me])
-        else:
-            v_count += len(me.vertices)
-
-        ob_count += 1
-
-    # Write object data
-    file.write("\nNUMOBJECTS %i\n" % len(objects))
-
-    for i_ob, ob in enumerate(objects):
-        file.write("OBJECT %i \"%s\"\n" % (i_ob, ob))
-
-    # Static material string
-    material_string = ("COLOR 0.000000 0.000000 0.000000 1.000000\n"
-                       "TRANSPARENCY 0.000000 0.000000 0.000000 1.000000\n"
-                       "AMBIENTCOLOR 0.000000 0.000000 0.000000 1.000000\n"
-                       "INCANDESCENCE 0.000000 0.000000 0.000000 1.000000\n"
-                       "COEFFS 0.800000 0.000000\n"
-                       "GLOW 0.000000 0\n"
-                       "REFRACTIVE 6 1.000000\n"
-                       "SPECULARCOLOR -1.000000 -1.000000 -1.000000 1.000000\n"
-                       "REFLECTIVECOLOR -1.000000 -1.000000 -1.000000 1.000000\n"
-                       "REFLECTIVE -1 -1.000000\n"
-                       "BLINN -1.000000 -1.000000\n"
-                       "PHONG -1.000000\n\n"
-                       )
-
-    if len(materials) > 0:
-        file.write("\nNUMMATERIALS %i\n" % len(materials))
-
-        for i_mat, mat in enumerate(materials):
-
-            try:
-                for i_ts, ts in enumerate(mat.texture_slots):
-
-                    # Skip empty slots and disabled textures
-                    if not ts or not mat.use_textures[i_ts]:
-                        continue
-
-                    # Image type and Color map? If yes, add to material array and index
-                    if ts.texture.type == 'IMAGE' and ts.use_map_color_diffuse:
-
-                        # Pick filename of the first color map
-                        imagepath = ts.texture.image.filepath
-                        imagename = os.path.split(imagepath)[1]
-                        if len(imagename) == 0:
-                            imagename = "untitled"
-                        break
-                else:
-                    raise(ValueError)
-
-            except:
-                imagename = "no color diffuse map found"
-
-            # Material can be assigned and None
-            if mat:
-                mat_name = mat.name
-                mat_shader = mat.diffuse_shader.capitalize()
-            else:
-                mat_name = "None"
-                mat_shader = "Lambert"
-
-            if use_version == '5':
-                file.write("MATERIAL %i \"%s\"\n" % (i_mat, imagename))
-                # or is it mat.name at filename?
-            else:
-                file.write("MATERIAL %i \"%s\" \"%s\" \"%s\"\n" % (
-                           i_mat,
-                           mat_name,
-                           mat_shader,
-                           imagename
-                           ))
-                file.write(material_string)
-    else:
-        # Write a default material
-        # Should never happen, nothing to export / mesh without material exceptions already caught
-        file.write("\nNUMMATERIALS 1\n")
-        if use_version == '5':
-            file.write("MATERIAL 0 \"default.tga\"\n")
-        else:
-            file.write("MATERIAL 0 \"$default\" \"Lambert\" \"untitled\"\n")
-            file.write(material_string)
-
-    # Close to flush buffers!
-    file.close()
-
-    # Remove meshes, which were made by to_mesh()
-    for mesh in meshes:
-        mesh.user_clear()
-        bpy.data.meshes.remove(mesh)    
-
-    # Quit with no errors
-    return
-
-# Taken from export_fbx.py by Campbell Barton
-# Modified to accept vertex_groups directly instead of mesh object
-def BPyMesh_meshWeight2List(vgroup, me):
-
-    """ Takes a mesh and return its group names and a list of lists, one list per vertex.
-    aligning the each vert list with the group names, each list contains float value for the weight.
-    These 2 lists can be modified and then used with list2MeshWeight to apply the changes.
-    """
-
-    # Clear the vert group.
-    groupNames = [g.name for g in vgroup]
-    len_groupNames = len(groupNames)
-
-    if not len_groupNames:
-        # no verts? return a vert aligned empty list
-        #return [[] for i in range(len(me.vertices))], []
-        return [], []
-
-    else:
-        vWeightList = [[0.0] * len_groupNames for i in range(len(me.vertices))]
-
-    for i, v in enumerate(me.vertices):
-        for g in v.groups:
-            # possible weights are out of range
-            index = g.group
-            if index < len_groupNames:
-                vWeightList[i][index] = g.weight
-
-    return groupNames, vWeightList
-
-def meshNormalizedWeights(vgroup, me, weight_min, weight_min_threshold):
-
-    groupNames, vWeightList = BPyMesh_meshWeight2List(vgroup, me)
-
-    if not groupNames:
-        return [], []
-
-    for vWeights in vWeightList:
-        tot = 0.0
-        for w in vWeights:
-            if weight_min and w < weight_min_threshold:
-                w = 0.0
-            tot += w
-
-        if tot:
-            for j, w in enumerate(vWeights):
-                vWeights[j] = w / tot
-
-    return groupNames, vWeightList
-
-def _skip_notice(ob_name, mesh_name, notice):
-    print("\nSkipped object \"%s\" (mesh \"%s\"): %s" % (ob_name, mesh_name, notice))
diff --git a/release/scripts/addons_contrib/io_scene_cod/import_xanim.py b/release/scripts/addons_contrib/io_scene_cod/import_xanim.py
deleted file mode 100644
index 4d79034..0000000
--- a/release/scripts/addons_contrib/io_scene_cod/import_xanim.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Blender-CoD: Blender Add-On for Call of Duty modding
-Version: alpha 3
-
-Copyright (c) 2011 CoDEmanX, Flybynyt -- blender-cod at online.de
-
-http://code.google.com/p/blender-cod/
-
-TODO
-- Implement xanim import (apply anim data to the armature of a loaded model)
-
-"""
-
-def load(self, context, **keywords):
-
-    #filepath = os.fsencode(filepath)
-
-    return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/io_scene_cod/import_xmodel.py b/release/scripts/addons_contrib/io_scene_cod/import_xmodel.py
deleted file mode 100644
index 6f862e0..0000000
--- a/release/scripts/addons_contrib/io_scene_cod/import_xmodel.py
+++ /dev/null
@@ -1,392 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Blender-CoD: Blender Add-On for Call of Duty modding
-Version: alpha 3
-
-Copyright (c) 2011 CoDEmanX, Flybynyt -- blender-cod at online.de
-
-http://code.google.com/p/blender-cod/
-
-NOTES
-- Code is in early state of development and work in progress!
-- Importing rigs from XMODEL_EXPORT v6 works, but the code is really messy.
-
-TODO
-- Implement full xmodel import
-
-"""
-
-import os
-import bpy
-from mathutils import *
-import math
-#from mathutils.geometry import tesselate_polygon
-#from io_utils import load_image, unpack_list, unpack_face_list
-
-def round_matrix_3x3(mat, precision=6):
-    return Matrix(((round(mat[0][0],precision), round(mat[0][1],precision), round(mat[0][2],precision)),
-                (round(mat[1][0],precision), round(mat[1][1],precision), round(mat[1][2],precision)),
-                (round(mat[2][0],precision), round(mat[2][1],precision), round(mat[2][2],precision))))
-
-def load(self, context, filepath=""):
-
-    filepath = os.fsencode(filepath)
-
-    test_0 = []
-    test_1 = []
-    test_2 = []
-    test_3 = []
-
-    state = 0
-
-    # placeholders
-    vec0 = Vector((0.0, 0.0, 0.0))
-    mat0 = Matrix(((0.0, 0.0, 0.0),(0.0, 0.0, 0.0),(0.0, 0.0, 0.0)))
-
-    numbones = 0
-    numbones_i = 0
-    bone_i = 0
-    bone_table = []
-    numverts = 0
-    vert_i = 0
-    vert_table = [] # allocate table? [0]*numverts
-    face_i = 0
-    face_tmp = []
-    face_table = []
-    bones_influencing_num = 0
-    bones_influencing_i = 0
-    numfaces = 0
-
-    print("\nImporting %s" % filepath)
-
-    try:
-        file = open(filepath, "r")
-    except IOError:
-        return "Could not open file for reading:\n%s" % filepath
-
-    for line in file:
-        line = line.strip()
-        line_split = line.split()
-
-        # Skip empty and comment lines
-        if not line or line[0] == "/":
-            continue
-
-        elif state == 0 and line_split[0] == "MODEL":
-            state = 1
-
-        elif state == 1 and line_split[0] == "VERSION":
-            if line_split[1] != "6":
-                error_string = "Unsupported version: %s" % line_split[1]
-                print("\n%s" % error_string)
-                return error_string
-            state = 2
-
-        elif state == 2 and line_split[0] == "NUMBONES":
-            numbones = int(line_split[1])
-            state = 3
-
-        elif state == 3 and line_split[0] == "BONE":
-            if numbones_i != int(line_split[1]):
-                error_string = "Unexpected bone number: %s (expected %i)" % (line_split[1], numbones_i)
-                print("\n%s" % error_string)
-                return error_string
-            bone_table.append((line_split[3][1:-1], int(line_split[2]), vec0, mat0))
-            test_0.append(line_split[3][1:-1])
-            test_1.append(int(line_split[2]))
-            if numbones_i >= numbones-1:
-                state = 4
-            else:
-                numbones_i += 1
-
-        elif state == 4 and line_split[0] == "BONE":
-            bone_num = int(line_split[1])
-            if bone_i != bone_num:
-                error_string = "Unexpected bone number: %s (expected %i)" % (line_split[1], bone_i)
-                print("\n%s" % error_string)
-                return error_string
-            state = 5
-
-        elif state == 5 and line_split[0] == "OFFSET":
-            # remove commas - line_split[#][:-1] would also work, but isn't as save
-            line_split = line.replace(",", "").split()
-
-            # should we check for len(line_split) to ensure we got enough elements?
-            # Note: we can't assign a new vector to tuple object, we need to change each value
-
-            bone_table[bone_i][2].xyz = Vector((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-            #print("\nPROBLEMATIC: %s" % bone_table[bone_i][2])
-            #NO ERROR HERE, but for some reason the whole table will contain the same vectors
-            #bone_table[bone_i][2][0] = float(line_split[1])
-            #bone_table[bone_i][2][1] = float(line_split[2])
-            #bone_table[bone_i][2][2] = float(line_split[3])
-            test_2.append(Vector((float(line_split[1]),float(line_split[2]),float(line_split[3]))))
-
-            state = 6
-
-        elif state == 6 and line_split[0] == "SCALE":
-            # always 1.000000?! no processing so far...
-            state = 7
-
-        elif state == 7 and line_split[0] == "X":
-            line_split = line.replace(",", "").split()
-            bone_table[bone_i][3][0] = Vector((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-
-            """ Use something like this:
-            bone.align_roll(targetmatrix[2])
-            roll = roll%360 #nicer to have it 0-359.99...
-            """
-            m_col = []
-            m_col.append((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-            
-            state = 8
-
-        elif state == 8 and line_split[0] == "Y":
-            line_split = line.replace(",", "").split()
-            bone_table[bone_i][3][1] = Vector((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-            
-            m_col.append((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-
-            state = 9
-
-        elif state == 9 and line_split[0] == "Z":
-            line_split = line.replace(",", "").split()
-            vec_roll = Vector((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-            ##bone_table[bone_i][3][2] = vec_roll
-            #print("bone_table: %s" % bone_table[bone_i][3][2])
-            
-            m_col.append((float(line_split[1]), float(line_split[2]), float(line_split[3])))
-
-            #test_3.append(Vector(vec_roll))
-            
-            test_3.append(m_col)
-            #print("test_3: %s\n\n" % test_3[:])
-
-            if bone_i >= numbones-1:
-                state = 10
-            else:
-                #print("\n---> Increasing bone: %3i" % bone_i)
-                #print("\t" + str(bone_table[bone_i][3]))
-                #print("\t" + str(bone_table[bone_i][0]))
-                bone_i += 1
-                state = 4
-
-        elif state == 10 and line_split[0] == "NUMVERTS":
-            numverts = int(line_split[1])
-            state = 11
-
-        elif state == 11 and line_split[0] == "VERT":
-            vert_num = int(line_split[1])
-            if vert_i != vert_num:
-                error_string = "Unexpected vertex number: %s (expected %i)" % (line_split[1], vert_i)
-                print("\n%s" % error_string)
-                return error_string
-            vert_i += 1
-            state = 12
-
-        elif state == 12 and line_split[0] == "OFFSET":
-            line_split = line.replace(",", "").split()
-            vert_table.append(Vector((float(line_split[1]), float(line_split[2]), float(line_split[3]))))
-            state = 13
-
-        elif state == 13 and line_split[0] == "BONES":
-            # TODO: process
-            bones_influencing_num = int(line_split[1])
-            state= 14
-
-        elif state == 14 and line_split[0] == "BONE":
-            # TODO: add bones to vert_table
-            if bones_influencing_i >= bones_influencing_num-1:
-                if vert_i >= numverts:
-                    state = 15
-                else:
-                    state = 11
-            else:
-                bones_influencing_i += 1
-                #state = 14
-
-        elif state == 15 and line_split[0] == "NUMFACES":
-            numfaces = int(line_split[1])
-            state = 16
-            
-        elif state == 16: #and line_split[0] == "TRI":
-            #face_i += 1
-            face_tmp = []
-            state = 17
-            
-        elif (state == 17 or state == 21 or state == 25) and line_split[0] == "VERT":
-            #print("face_tmp length: %i" % len(face_tmp))
-            face_tmp.append(int(line_split[1]))
-            state += 1
-        
-        elif (state == 18 or state == 22 or state == 26) and line_split[0] == "NORMAL":
-            state += 1
-            
-        elif (state == 19 or state == 23 or state == 27) and line_split[0] == "COLOR":
-            state += 1
-            
-        elif (state == 20 or state == 24 or state == 28) and line_split[0] == "UV":
-            state += 1
-        
-        elif state == 29:
-
-            #print("Adding face: %s\n%i faces so far (of %i)\n" % (str(face_tmp), face_i, numfaces))
-            face_table.append(face_tmp)
-            if (face_i >= numfaces - 1):
-                state = 30
-            else:
-                face_i += 1
-                face_tmp = []
-                state = 17
-                
-        elif state > 15 and state < 30 and line_split[0] == "NUMOBJECTS":
-            print("Bad numfaces, terminated loop\n")
-            state = 30
-            
-        elif state == 30:
-            print("Adding mesh!")
-            me = bpy.data.meshes.new("pymesh")
-            me.from_pydata(vert_table, [], face_table)
-            me.update()
-            ob = bpy.data.objects.new("Py-Mesh", me)
-            bpy.context.scene.objects.link(ob)
-            
-            state = 31
-
-        else: #elif state == 16:
-            #UNDONE
-            print("eh? state is %i line: %s" % (state, line))
-            pass
-
-        #print("\nCurrent state=" + str(state) + "\nLine:" + line)
-
-    #print("\n" + str(list(bone_table)) + "\n\n" + str(list(vert_table)))
-
-    #createRig(context, "Armature", Vector((0,0,0)), bone_table)
-
-    name = "Armature"
-    origin = Vector((0,0,0))
-    boneTable = bone_table
-
-    # If no context object, an object was deleted and mode is 'OBJECT' for sure
-    if context.object: #and context.mode is not 'OBJECT':
-
-        # Change mode, 'cause modes like POSE will lead to incorrect context poll
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-    # Create armature and object
-    bpy.ops.object.add(
-        type='ARMATURE', 
-        enter_editmode=True,
-        location=origin)
-    ob = bpy.context.object
-    ob.show_x_ray = True
-    ob.name = name
-    amt = ob.data
-    amt.name = name + "Amt"
-    #amt.show_axes = True
-
-    # Create bones
-    bpy.ops.object.mode_set(mode='EDIT')
-    #for (bname, pname, vector, matrix) in boneTable:
-    #i = 0
-    for (t0, t1, t2, t3) in zip(test_0, test_1, test_2, test_3):
-
-        t3 = Matrix(t3)
-
-        bone = amt.edit_bones.new(t0)
-        if t1 != -1:
-            parent = amt.edit_bones[t1]
-            bone.parent = parent
-            bone.head = parent.tail
-
-            bone.align_roll((parent.matrix.to_3x3()*t3)[2])
-            #local_mat = parent.matrix.to_3x3() * t3()
-            #bone.align_roll(local_mat[2])
-            from math import degrees
-            print("t3[2]: %s\nroll: %f\n---------" % (t3.col[2], degrees(bone.roll)))
-            #bone.roll = math.radians(180 - math.degrees(bone.roll))
-            #print("###\nalign_roll: %s\nroll: %.2f\ntest_3:%s" % (t3, math.degrees(bone.roll), list(test_3)))
-            bone.use_connect = True
-        else:
-            bone.head = (0,0,0)
-            rot = Matrix.Translation((0,0,0))	# identity matrix
-            bone.align_roll(t3[2])
-            bone.use_connect = False
-        bone.tail = t2
-
-    file.close()
-
-"""
-def createRig(context, name, origin, boneTable):
-
-    # If no context object, an object was deleted and mode is 'OBJECT' for sure
-    if context.object: #and context.mode is not 'OBJECT':
-
-        # Change mode, 'cause modes like POSE will lead to incorrect context poll
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-    # Create armature and object
-    bpy.ops.object.add(
-        type='ARMATURE', 
-        enter_editmode=True,
-        location=origin)
-    ob = bpy.context.object
-    ob.show_x_ray = True
-    ob.name = name
-    amt = ob.data
-    amt.name = name + "Amt"
-    #amt.show_axes = True
-
-    # Create bones
-    bpy.ops.object.mode_set(mode='EDIT')
-    #for (bname, pname, vector, matrix) in boneTable:
-    #i = 0
-    for i in range(len(test_0)):
-        t0 = test_0[i]
-        t1 = test_1[i]
-        t2 = test_2[i]
-        t3 = test_3[i]
-
-        bone = amt.edit_bones.new(t0)
-        if t1 != -1:
-            parent = amt.edit_bones[t1]
-            bone.parent = parent
-            bone.head = parent.tail
-            bone.use_connect = True
-            bone.align_roll(t3)
-            #print("align_roll: %s\nroll: %.2f" % (t3, math.degrees(bone.roll)))
-            #(trans, rot, scale) = parent.matrix.decompose()
-        else:
-            bone.head = (0,0,0)
-            rot = Matrix.Translation((0,0,0))	# identity matrix
-            bone.use_connect = False
-        #bone.tail = Vector(vector) * rot + bone.head
-        bone.tail = t2
-        #bone.tail = boneTable[i][2] #passing boneTable as parameter seems to break it :(
-        #i += 1
-
-    #outfile.write("\n%s" % str(boneTable))
-
-    bpy.ops.object.mode_set(mode='OBJECT')
-    return ob
-"""
diff --git a/release/scripts/addons_contrib/io_scene_m3/__init__.py b/release/scripts/addons_contrib/io_scene_m3/__init__.py
deleted file mode 100644
index 5c614c2..0000000
--- a/release/scripts/addons_contrib/io_scene_m3/__init__.py
+++ /dev/null
@@ -1,97 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    'name': 'Import Blizzard M3 format (.m3)',
-    'author': 'Cory Perry',
-    'version': (0, 2, 1),
-    "blender": (2, 5, 7),
-    'location': 'File > Import > Blizzard M3 (.m3)',
-    'description': 'Imports the Blizzard M3 format (.m3)',
-    'warning': 'Broken',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/'\
-        'Import-Export/M3_Import',
-    'tracker_url': 'http://projects.blender.org/tracker/index.php?'\
-        'func=detail&aid=24017',
-    'category': 'Import-Export'}
-
-
-# To support reload properly, try to access a package var, if it's there,
-# reload everything
-if "bpy" in locals():
-    import imp
-    if 'import_m3' in locals():
-        imp.reload(import_m3)
-#   if 'export_m3' in locals():
-#       imp.reload(export_m3)
-
-import time
-import datetime
-import bpy
-from bpy.props import StringProperty, BoolProperty
-from bpy_extras.io_utils import ImportHelper
-
-
-class ImportM3(bpy.types.Operator, ImportHelper):
-    """Import from M3 file format (.m3)"""
-    bl_idname = 'import_scene.blizzard_m3'
-    bl_label = 'Import M3'
-    bl_options = {'UNDO'}
-
-    filename_ext = '.m3'
-    filter_glob = StringProperty(default='*.m3', options={'HIDDEN'})
-
-    use_image_search = BoolProperty(name='Image Search',
-                        description='Search subdirectories for any associated'\
-                                    'images', default=True)
-
-    def execute(self, context):
-        from . import import_m3
-        print('Importing file', self.filepath)
-        t = time.mktime(datetime.datetime.now().timetuple())
-        with open(self.filepath, 'rb') as file:
-            import_m3.read(file, context, self)
-        t = time.mktime(datetime.datetime.now().timetuple()) - t
-        print('Finished importing in', t, 'seconds')
-        return {'FINISHED'}
-
-
-def menu_func_import(self, context):
-    self.layout.operator(ImportM3.bl_idname, text='Blizzard M3 (.m3)')
-
-
-#def menu_func_export(self, context):
-#   self.layout.operator(ExportM3.bl_idname, text='Blizzard M3 (.m3)')
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.INFO_MT_file_import.append(menu_func_import)
-#   bpy.types.INFO_MT_file_export.append(menu_func_export)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.INFO_MT_file_import.remove(menu_func_import)
-#   bpy.types.INFO_MT_file_export.remove(menu_func_export)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/io_scene_m3/import_m3.py b/release/scripts/addons_contrib/io_scene_m3/import_m3.py
deleted file mode 100644
index f22a089..0000000
--- a/release/scripts/addons_contrib/io_scene_m3/import_m3.py
+++ /dev/null
@@ -1,365 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-__author__ = "Cory Perry (muraj)"
-__version__ = "0.2.1"
-__bpydoc__ = """\
-This script imports m3 format files to Blender.
-
-The m3 file format, used by Blizzard in several games, is based around the
-mdx and m2 file format.  Thanks to the efforts of Volcore, madyavic and the
-people working on libm3, the file format has been reversed engineered
-enough to make this script possible (Thanks guys!).
-
-This script currently imports the following:<br>
- - Geometry data (vertices, faces, submeshes [in vertex groups])
- - Model Textures (currently only the first material is supported)
-
-   Blender supports the DDS file format and needs the image in the same
-   directory.  This script will notify you of any missing textures.
-
-TODO:<br>
- - Documentation & clean up
- - Full MD34 and MD33 testing (possibly batch importing for a testing suite)
- - Import *ALL* materials and bind accordingly (currently supports diffuse,
-    specular, and normal.
- - Adjust vertices to bind pose (import IREF matrices)
- - Import Bone data
- - Import Animation data
-
-Usage:<br>
-    Execute this script from the "File->Import" menu and choose a m3 file to
-open.
-
-Notes:<br>
-    Known issue with Thor.m3, seems to add a lot of unecessary verts.
-    Generates the standard verts and faces lists.
-"""
-
-import bpy
-import struct
-import os.path
-from bpy.props import *
-from bpy_extras.image_utils import load_image
-
-##################
-## Struct setup ##
-##################
-verFlag = False        # Version flag (MD34 == True, MD33 == False)
-
-
-class ref:
-    fmt = 'LL'
-
-    def __init__(self, file):
-        global verFlag
-        if verFlag:
-            self.fmt += 'L'    # Extra unknown...
-        _s = file.read(struct.calcsize(self.fmt))
-        self.entries, self.refid = struct.unpack(self.fmt, _s)[:2]
-
-    @classmethod
-    def size(cls):
-        global verFlag
-        return struct.calcsize(cls.fmt + ('L' if verFlag else ''))
-
-
-class animref:
-    fmt = 'HHL'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.flags, self.animflags, self.animid = struct.unpack(self.fmt, _s)
-
-
-class Tag:
-    fmt = '4sLLL'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.name, self.ofs, self.nTag, self.version = \
-            struct.unpack(self.fmt, _s)
-
-
-class matrix:
-    fmt = 'f' * 16
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.mat = struct.unpack(self.fmt, _s)
-
-
-class vect:
-    fmt = 'fff'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.v = struct.unpack(self.fmt, _s)
-
-
-class vertex:
-    fmt = "4B4b4B%dH4B"
-    ver = {0x020000: 2, 0x060000: 4, 0x0A0000: 6, 0x120000: 8}
-
-    def __init__(self, file, flag):
-        self.pos = vect(file)
-        _fmt = self.fmt % (self.ver[flag])
-        _s = file.read(struct.calcsize(_fmt))
-        _s = struct.unpack(_fmt, _s)
-        self.boneWeight = _s[0:4]
-        self.boneIndex = _s[4:8]
-        self.normal = _s[8:12]
-        self.uv = _s[12:14]
-        self.tan = _s[-4:]    # Skipping the middle ukn value if needed
-        self.boneWeight = [b / 255.0 for b in self.boneWeight]
-        self.normal = [x * 2.0 / 255.0 - 1.0 for x in self.normal]
-        self.tan = [x * 2.0 / 255.0 - 1.0 for x in self.tan]
-        self.uv = [x / 2046.0 for x in self.uv]
-        self.uv[1] = 1.0 - self.uv[1]
-
-    @classmethod
-    def size(cls, flag=0x020000):
-        return struct.calcsize('fff' + cls.fmt % (cls.ver[flag]))
-
-
-class quat:
-    fmt = 'ffff'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.v = struct.unpack(self.fmt, _s)
-        #Quats are stored x,y,z,w - this fixes it
-        self.v = [self.v[-1], self.v[0], self.v[1], self.v[2]]
-
-
-class bone:
-
-    def __init__(self, file):
-        file.read(4)    # ukn1
-        self.name = ref(file)
-        self.flag, self.parent, _ = struct.unpack('LhH', file.read(8))
-        self.posid = animref(file)
-        self.pos = vect(file)
-        file.read(4 * 4)    # ukn
-        self.rotid = animref(file)
-        self.rot = quat(file)
-        file.read(4 * 5)    # ukn
-        self.scaleid = animref(file)
-        self.scale = vect(file)
-        vect(file)          # ukn
-        file.read(4 * 6)    # ukn
-
-
-class div:
-
-    def __init__(self, file):
-        self.faces = ref(file)
-        self.regn = ref(file)
-        self.bat = ref(file)
-        self.msec = ref(file)
-        file.read(4)    # ukn
-
-
-class regn:
-    fmt = 'L2H2L6H'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        _ukn1, self.ofsVert, self.nVerts, self.ofsIndex, self.nIndex, \
-            self.boneCount, self.indBone, self.nBone = \
-            struct.unpack(self.fmt, _s)[:8]
-
-
-class mat:
-
-    def __init__(self, file):
-        self.name = ref(file)
-        file.read(4 * 10)    # ukn
-        self.layers = [ref(file) for _ in range(13)]
-        file.read(4 * 15)    # ukn
-
-
-class layr:
-
-    def __init__(self, file):
-        file.read(4)
-        self.name = ref(file)
-        #Rest not implemented.
-
-
-class hdr:
-    fmt = '4sLL'
-
-    def __init__(self, file):
-        _s = file.read(struct.calcsize(self.fmt))
-        self.magic, self.ofsTag, self.nTag = struct.unpack(self.fmt, _s)
-        self.MODLref = ref(file)
-
-
-class MODL:
-
-    def __init__(self, file, flag=20):
-        global verFlag
-        self.name = ref(file)
-        self.ver = struct.unpack('L', file.read(4))[0]
-        self.seqHdr = ref(file)
-        self.seqData = ref(file)
-        self.seqLookup = ref(file)
-        file.read(0x1C if verFlag else 0x14)            # ukn1
-        self.bones = ref(file)
-        file.read(4)            # ukn2
-        self.flags = struct.unpack('L', file.read(4))[0]
-        self.vert = ref(file)
-        self.views = ref(file)
-        self.boneLookup = ref(file)
-        self.extents = [vect(file), vect(file)]
-        self.radius = struct.unpack('f', file.read(4))[0]
-        if verFlag:
-            file.read(4)            # ukn MD34 addition
-        if not verFlag:
-            if flag == 20:
-                file.read(0x2C)
-            else:
-                file.read(0x34)
-        else:
-            if flag == 20:
-                file.read(0x30)
-            else:
-                file.read(0x3C)
-        self.attach = ref(file)
-        file.read(5 * ref.size())
-        self.materialsLookup = ref(file)
-        self.materials = ref(file)
-        file.read(ref.size())
-        if not verFlag:
-            file.read(0x90)
-        else:
-            file.read(0xD8)
-        self.iref = ref(file)
-
-
-def read(file, context, op):
-    """Imports as an m3 file"""
-    global verFlag
-    h = hdr(file)
-    if h.magic[::-1] == b'MD34':
-        print('m3_import: !WARNING! MD34 files not full tested...')
-        verFlag = True
-    elif h.magic[::-1] == b'MD33':
-        verFlag = False
-    else:
-        raise Exception('m3_import: !ERROR! Not a valid or supported m3 file')
-    file.seek(h.ofsTag)    # Jump to the Tag table
-    print('m3_import: !INFO! Reading TagTable...')
-    tagTable = [Tag(file) for _ in range(h.nTag)]
-    file.seek(tagTable[h.MODLref.refid].ofs)
-    m = MODL(file, tagTable[h.MODLref.refid].version)
-    if not m.flags & 0x20000:
-        raise Exception('m3_import: !ERROR! Model doesn\'t have any vertices')
-    print('m3_import: !INFO! Reading Vertices...')
-    vert_flags = m.flags & 0x1E0000        # Mask out the vertex version
-    file.seek(tagTable[m.views.refid].ofs)
-    d = div(file)
-    file.seek(tagTable[m.vert.refid].ofs)
-    verts = [vertex(file, vert_flags) \
-       for _ in range(tagTable[m.vert.refid].nTag // vertex.size(vert_flags))]
-    file.seek(tagTable[d.faces.refid].ofs)
-    print('m3_import: !INFO! Reading Faces...')
-    rawfaceTable = struct.unpack('H' * (tagTable[d.faces.refid].nTag), \
-                    file.read(tagTable[d.faces.refid].nTag * 2))
-    faceTable = []
-    for i in range(1, len(rawfaceTable) + 1):
-        faceTable.append(rawfaceTable[i - 1])
-        if i % 3 == 0:    # Add a zero for the fourth index to the face.
-            faceTable.append(0)
-    print("m3_import: !INFO! Read %d vertices and %d faces" \
-            % (len(verts), len(faceTable)))
-    print('m3_import: !INFO! Adding Geometry...')
-    mesh = bpy.data.meshes.new(os.path.basename(op.properties.filepath))
-    mobj = bpy.data.objects.new(os.path.basename(op.properties.filepath), mesh)
-    context.scene.objects.link(mobj)
-    v, n = [], []
-    for vert in verts:        # "Flatten" the vertex array...
-        v.extend(vert.pos.v)
-        n.extend(vert.normal)
-    mesh.vertices.add(len(verts))
-    mesh.faces.add(len(rawfaceTable) // 3)
-    mesh.vertices.foreach_set('co', v)
-    mesh.vertices.foreach_set('normal', n)
-    mesh.faces.foreach_set('vertices_raw', faceTable)
-    uvtex = mesh.uv_textures.new()
-    for i, face in enumerate(mesh.faces):
-        uf = uvtex.data[i]
-        uf.uv1 = verts[faceTable[i * 4 + 0]].uv
-        uf.uv2 = verts[faceTable[i * 4 + 1]].uv
-        uf.uv3 = verts[faceTable[i * 4 + 2]].uv
-        uf.uv4 = (0, 0)
-    print('m3_import: !INFO! Importing materials...')
-    material = bpy.data.materials.new('Mat00')
-    mesh.materials.append(material)
-    file.seek(tagTable[m.materials.refid].ofs)
-    mm = mat(file)
-    tex_map = [('use_map_color_diffuse', 0), ('use_map_specular', 2),\
-                ('use_map_normal', 9)]
-    for map, i in tex_map:
-        file.seek(tagTable[mm.layers[i].refid].ofs)
-        nref = layr(file).name
-        file.seek(tagTable[nref.refid].ofs)
-        name = bytes.decode(file.read(nref.entries - 1))
-        name = os.path.basename(str(name))
-        tex = bpy.data.textures.new(name=name, type='IMAGE')
-        tex.image = load_image(name, os.path.dirname(op.filepath))
-        if tex.image != None:
-            print("m3_import: !INFO! Loaded %s" % (name))
-        else:
-            print("m3_import: !WARNING! Cannot find texture \"%s\"" % (name))
-        mtex = material.texture_slots.add()
-        mtex.texture = tex
-        mtex.texture_coords = 'UV'
-        if i == 9:
-            mtex.normal_factor = 0.1    # Just a guess, seems to look nice
-        mtex.use_map_color_diffuse = (i == 0)
-        setattr(mtex, map, True)
-
-
-class M3Importer(bpy.types.Operator):
-    """Import from M3 file format (.m3)"""
-    bl_idname = "import_mesh.blizzard_m3"
-    bl_label = 'Import M3'
-    bl_options = {'UNDO'}
-
-    # List of operator properties, the attributes will be assigned
-    # to the class instance from the operator settings before calling.
-
-    filepath = StringProperty(
-                subtype='FILE_PATH',
-                )
-
-    def execute(self, context):
-        t = time.mktime(datetime.datetime.now().timetuple())
-        with open(self.properties.filepath, 'rb') as file:
-            print('Importing file', self.properties.filepath)
-            read(file, context, self)
-        t = time.mktime(datetime.datetime.now().timetuple()) - t
-        print('Finished importing in', t, 'seconds')
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        wm.add_fileselect(self)
-        return {'RUNNING_MODAL'}
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/__README__.txt b/release/scripts/addons_contrib/io_scene_ms3d/__README__.txt
deleted file mode 100644
index d0d9c00..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/__README__.txt
+++ /dev/null
@@ -1,210 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-files:
-__README__.txt
-__init__.py
-ms3d_export.py
-ms3d_import.py
-ms3d_spec.py
-ms3d_utils.py
-ms3d_ui.py
-ms3d_strings.py
-
-
-description:
-__README__.txt      : this file
-                    § Blender maintenance
-
-__init__.py         : entry point for blender plugins
-                      initialize and registers/unregisters plugin functions
-                    § Blender maintenance
-
-ms3d_export.py      : entry point for exporter
-                      functions to bring Blender content in a correct way to
-                      MilkShape
-                    § Blender -> MilkShape3D maintenance
-
-ms3d_import.py      : entry point for importer
-                      functions to bring MilkShape content in a correct way to
-                      Blender
-                    § MilkShape3D -> Blender maintenance
-
-ms3d_spec.py        : objects and structures that specified a MilkShape3D file
-                      base functions to write/read its objects itself
-                    § MilkShape maintenance
-
-ms3d_ui.py          : additional custom properties for Blender objects
-                      give user access to MilkShape specific properties
-                    § Blender maintenance
-
-ms3d_strings.py     : most of the strings used in the addon to have a
-                      central point for optional internationalization
-
-
-known issues:
-  importer issues:
-    -/-
-
-  exporter issues:
-    - does only export active mesh object
-    - does only export the first existing UV texture coordinates,
-            if more than one UV texture is used per mesh
-
-
-todo / nice to have:
-    - export options to ms3d joints/animation/extra parts optional
-
-
-###############################################################################
-    exporter:
-        Ms3dModel
-            .vertices
-                Ms3dVertex
-                    .vertex: 100%
-                    .bone_id: 100%
-                    .reference_count: 100%
-                    .flags: 0%
-                    .vertex_ex
-                        Ms3dVertexEx
-                            .bone_ids: 100%
-                            .weights: 100%
-                            .extra: 100% (not exposed to UI)
-            .triangles
-                Ms3dTriangle
-                    .vertex_indices: 100%
-                    .s: 100%
-                    .t: 100%
-                    .group_index: 100%
-                    .smoothing_group: 100%
-                    .flags: 0%
-                    .vertex_normals: 100%
-            .groups
-                Ms3dGroup
-                    .name: 100%
-                    .triangle_indices: 100%
-                    .material_index: 100%
-                    .comment: 100%
-                    .flags: 100%
-            .materials
-                Ms3dMaterial
-                    name: 100%
-                    ambient: 100%
-                    diffuse: 100%
-                    specular: 100%
-                    emissive: 100%
-                    shininess: 100%
-                    transparency: 100%
-                    mode: 100%
-                    texture: 100%
-                    alphamap: 100%
-                    comment: 100%
-            .comment: 100%
-            .model_ex
-                Ms3dModelEx
-                    .joint_size: 100%
-                    .transparency_mode: 100%
-                    .alpha_ref: 100%
-            .joints
-                Ms3dJoint
-                    .name: 100%
-                    .parent_name: 100%
-                    .rotation: 100%
-                    .position: 100%
-                    .rotation_keyframes: 100%
-                    .translation_keyframes: 100%
-                    .joint_ex
-                        Ms3DJointEx
-                            .color: 100%
-                    .comment: 100%
-###############################################################################
-    importer:
-        Ms3dModel
-            .vertices
-                Ms3dVertex
-                    .vertex: 100%
-                    .bone_id: 100%
-                    .reference_count: 0%
-                    .flags: 0%
-                    .vertex_ex
-                        Ms3dVertexEx
-                            .bone_ids: 100%
-                            .weights: 100%
-                            .extra: 100% (not exposed to UI)
-            .triangles
-                Ms3dTriangle
-                    .vertex_indices: 100%
-                    .s: 100%
-                    .t: 100%
-                    .group_index: 100%
-                    .smoothing_group: 100%
-                    .flags: 0%
-                    .vertex_normals: 0%
-            .groups
-                Ms3dGroup
-                    .name: 100%
-                    .triangle_indices: 100%
-                    .material_index: 100%
-                    .comment: 100%
-                    .flags: 100%
-            .materials
-                Ms3dMaterial
-                    name: 100%
-                    ambient: 100%
-                    diffuse: 100%
-                    specular: 100%
-                    emissive: 100%
-                    shininess: 100%
-                    transparency: 100%
-                    mode: 100%
-                    texture: 100%
-                    alphamap: 100%
-                    comment: 100%
-            .comment: 100%
-            .model_ex
-                Ms3dModelEx
-                    .joint_size: 100%
-                    .transparency_mode: 100%
-                    .alpha_ref: 100%
-            .joints
-                Ms3dJoint
-                    .name: 100%
-                    .parent_name: 100%
-                    .rotation: 100%
-                    .position: 100%
-                    .rotation_keyframes: 100%
-                    .translation_keyframes: 100%
-                    .joint_ex
-                        Ms3DJointEx
-                            .color: 100%
-                    .comment: 100%
-###############################################################################
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/__init__.py b/release/scripts/addons_contrib/io_scene_ms3d/__init__.py
deleted file mode 100644
index bf3cefb..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/__init__.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-        'name': "MilkShape3D MS3D format (.ms3d)",
-        'description': "Import / Export MilkShape3D MS3D files"\
-                " (conform with v1.8.4)",
-        'author': "Alexander Nussbaumer",
-        'version': (0, 6, 0, 3),
-        'blender': (2, 6, 3, 0),
-        'location': "File > Import & File > Export",
-        #'warning': "",
-        'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-                "Scripts/Import-Export/MilkShape3D_MS3D",
-        'tracker_url': "http://projects.blender.org/tracker/index.php"\
-                "?func=detail&aid=29404",
-        'category': 'Import-Export',
-        }
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-# To support reload properly, try to access a package var,
-# if it's there, reload everything
-if 'bpy' in locals():
-    import imp
-    if 'io_scene_ms3d.ms3d_ui' in locals():
-        imp.reload(io_scene_ms3d.ms3d_ui)
-else:
-    from io_scene_ms3d.ms3d_ui import (
-            Ms3dImportOperator,
-            Ms3dExportOperator,
-            )
-
-
-#import blender stuff
-from bpy.utils import (
-        register_module,
-        unregister_module,
-        )
-from bpy.types import (
-        INFO_MT_file_export,
-        INFO_MT_file_import,
-        )
-
-
-###############################################################################
-# registration
-def register():
-    ####################
-    # F8 - key
-    import imp
-    imp.reload(ms3d_ui)
-    # F8 - key
-    ####################
-
-    ms3d_ui.register()
-
-    register_module(__name__)
-    INFO_MT_file_export.append(Ms3dExportOperator.menu_func)
-    INFO_MT_file_import.append(Ms3dImportOperator.menu_func)
-
-
-def unregister():
-    ms3d_ui.unregister()
-
-    unregister_module(__name__)
-    INFO_MT_file_export.remove(Ms3dExportOperator.menu_func)
-    INFO_MT_file_import.remove(Ms3dImportOperator.menu_func)
-
-
-###############################################################################
-# global entry point
-if (__name__ == "__main__"):
-    register()
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_export.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_export.py
deleted file mode 100644
index 45e133a..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_export.py
+++ /dev/null
@@ -1,772 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-#import python stuff
-import io
-from math import (
-        pi,
-        )
-from mathutils import (
-        Matrix,
-        )
-from os import (
-        path,
-        )
-from sys import (
-        exc_info,
-        )
-from time import (
-        time,
-        )
-
-
-# import io_scene_ms3d stuff
-from io_scene_ms3d.ms3d_strings import (
-        ms3d_str,
-        )
-from io_scene_ms3d.ms3d_spec import (
-        Ms3dSpec,
-        Ms3dModel,
-        Ms3dVertex,
-        Ms3dTriangle,
-        Ms3dGroup,
-        Ms3dMaterial,
-        Ms3dJoint,
-        Ms3dRotationKeyframe,
-        Ms3dTranslationKeyframe,
-        Ms3dCommentEx,
-        )
-from io_scene_ms3d.ms3d_utils import (
-        select_all,
-        enable_edit_mode,
-        pre_setup_environment,
-        post_setup_environment,
-        matrix_difference,
-        )
-from io_scene_ms3d.ms3d_ui import (
-        Ms3dUi,
-        Ms3dMaterialProperties,
-        Ms3dMaterialHelper,
-        )
-
-
-#import blender stuff
-from bpy import (
-        context,
-        ops,
-        )
-import bmesh
-
-
-###############################################################################
-class Ms3dExporter():
-    """ Load a MilkShape3D MS3D File """
-
-    def __init__(self, options):
-        self.options = options
-        pass
-
-    # create a empty ms3d ms3d_model
-    # fill ms3d_model with blender content
-    # writer ms3d file
-    def write(self, blender_context):
-        """convert bender content to ms3d content and write it to file"""
-
-        t1 = time()
-        t2 = None
-
-        try:
-            # setup environment
-            pre_setup_environment(self, blender_context)
-
-            # create an empty ms3d template
-            ms3d_model = Ms3dModel()
-
-            # inject blender data to ms3d file
-            self.from_blender(blender_context, ms3d_model)
-
-            t2 = time()
-
-            #self.file = None
-            try:
-                # write ms3d file to disk
-                #self.file = io.FileIO(self.options.filepath, "wb")
-                with io.FileIO(self.options.filepath, "wb") as self.file:
-                    ms3d_model.write(self.file)
-                    self.file.flush()
-                    self.file.close()
-            finally:
-                # close ms3d file
-                #if self.file is not None:
-                #    self.file.close()
-                pass
-
-            # if option is set, this time will enlargs the io time
-            if (self.options.verbose):
-                ms3d_model.print_internal()
-
-            post_setup_environment(self, blender_context)
-            # restore active object
-            context.scene.objects.active = self.active_object
-
-            if ((not context.scene.objects.active)
-                    and (context.selected_objects)):
-                context.scene.objects.active \
-                        = context.selected_objects[0]
-
-            # restore pre operator undo state
-            context.user_preferences.edit.use_global_undo = self.undo
-
-            is_valid, statistics = ms3d_model.is_valid()
-            print()
-            print("##########################################################")
-            print("Export from Blender to MS3D")
-            print(statistics)
-            print("##########################################################")
-
-        except Exception:
-            type, value, traceback = exc_info()
-            print("write - exception in try block\n  type: '{0}'\n"
-                    "  value: '{1}'".format(type, value, traceback))
-
-            if t2 is None:
-                t2 = time()
-
-            raise
-
-        else:
-            pass
-
-        t3 = time()
-        print(ms3d_str['SUMMARY_EXPORT'].format(
-                (t3 - t1), (t2 - t1), (t3 - t2)))
-
-        return {"FINISHED"}
-
-
-    ###########################################################################
-    def from_blender(self, blender_context, ms3d_model):
-        blender_mesh_objects = []
-
-        source = (blender_context.active_object, )
-
-        for blender_object in source:
-            if blender_object and blender_object.type == 'MESH' \
-                    and blender_object.is_visible(blender_context.scene):
-                blender_mesh_objects.append(blender_object)
-
-        blender_to_ms3d_bones = {}
-
-        self.create_animation(blender_context, ms3d_model, blender_mesh_objects, blender_to_ms3d_bones)
-        self.create_geometry(blender_context, ms3d_model, blender_mesh_objects, blender_to_ms3d_bones)
-
-
-    ###########################################################################
-    def create_geometry(self, blender_context, ms3d_model, blender_mesh_objects, blender_to_ms3d_bones):
-        blender_scene = blender_context.scene
-
-        blender_to_ms3d_vertices = {}
-        blender_to_ms3d_triangles = {}
-        blender_to_ms3d_groups = {}
-        blender_to_ms3d_materials = {}
-
-        for blender_mesh_object in blender_mesh_objects:
-            blender_mesh = blender_mesh_object.data
-
-            ms3d_model._model_ex_object.joint_size = blender_mesh.ms3d.joint_size
-            ms3d_model._model_ex_object.alpha_ref = blender_mesh.ms3d.alpha_ref
-            ms3d_model._model_ex_object.transparency_mode = Ms3dUi.transparency_mode_to_ms3d(
-                                blender_mesh.ms3d.transparency_mode)
-
-            ##########################
-            # prepare ms3d groups if available
-            # works only for exporting active object
-            ##EXPORT_ACTIVE_ONLY:
-            for ms3d_local_group_index, blender_ms3d_group in enumerate(blender_mesh.ms3d.groups):
-                ms3d_group = Ms3dGroup()
-                ms3d_group.__index = len(ms3d_model._groups)
-                ms3d_group.name = blender_ms3d_group.name
-                ms3d_group.flags = Ms3dUi.flags_to_ms3d(blender_ms3d_group.flags)
-                if blender_ms3d_group.comment:
-                    ms3d_group._comment_object = Ms3dCommentEx()
-                    ms3d_group._comment_object.comment = blender_ms3d_group.comment
-                    ms3d_group._comment_object.index = len(ms3d_model._groups)
-                ms3d_group.material_index = None # to mark as not setted
-                ms3d_model._groups.append(ms3d_group)
-                blender_to_ms3d_groups[blender_ms3d_group.id] = ms3d_group
-
-            ##########################
-            # i have to use BMesh, because there are several custom data stored.
-            # BMesh doesn't support quads_convert_to_tris()
-            # so, i use that very ugly way:
-            # create a complete copy of mesh and bend object data
-            # to be able to apply operations to it.
-
-            # temporary, create a full copy of the model
-            blender_mesh_temp = blender_mesh_object.data.copy()
-            blender_mesh_object_temp = blender_mesh_object.copy()
-            blender_mesh_object_temp.data = blender_mesh_temp
-            blender_scene.objects.link(blender_mesh_object_temp)
-            blender_scene.objects.active = blender_mesh_object_temp
-            blender_mesh_temp.validate(self.options.verbose)
-
-            # convert to tris
-            enable_edit_mode(True)
-            select_all(True)
-            if ops.mesh.quads_convert_to_tris.poll():
-                ops.mesh.quads_convert_to_tris()
-            enable_edit_mode(False)
-
-            enable_edit_mode(True)
-            bm = bmesh.new()
-            bm.from_mesh(blender_mesh_temp)
-
-            layer_texture = bm.faces.layers.tex.get(
-                    ms3d_str['OBJECT_LAYER_TEXTURE'])
-            if layer_texture is None:
-                layer_texture = bm.faces.layers.tex.new(
-                        ms3d_str['OBJECT_LAYER_TEXTURE'])
-
-            layer_smoothing_group = bm.faces.layers.int.get(
-                    ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-            if layer_smoothing_group is None:
-                layer_smoothing_group = bm.faces.layers.int.new(
-                        ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-
-            layer_group = bm.faces.layers.int.get(
-                    ms3d_str['OBJECT_LAYER_GROUP'])
-            if layer_group is None:
-                layer_group = bm.faces.layers.int.new(
-                        ms3d_str['OBJECT_LAYER_GROUP'])
-
-            layer_uv = bm.loops.layers.uv.get(ms3d_str['OBJECT_LAYER_UV'])
-            if layer_uv is None:
-                if bm.loops.layers.uv:
-                    layer_uv = bm.loops.layers.uv[0]
-                else:
-                    layer_uv = bm.loops.layers.uv.new(ms3d_str['OBJECT_LAYER_UV'])
-
-            layer_deform = bm.verts.layers.deform.active
-
-            layer_extra = bm.verts.layers.int.get(ms3d_str['OBJECT_LAYER_EXTRA'])
-            if layer_extra is None:
-                layer_extra = bm.verts.layers.int.new(ms3d_str['OBJECT_LAYER_EXTRA'])
-
-
-            ##########################
-            # handle vertices
-            for bmv in bm.verts:
-                item = blender_to_ms3d_vertices.get(bmv)
-                if item is None:
-                    index = len(ms3d_model._vertices)
-                    ms3d_vertex = Ms3dVertex()
-                    ms3d_vertex.__index = index
-
-                    loc = (bmv.co + blender_mesh_object_temp.location)
-                    ms3d_vertex._vertex = self.geometry_correction(loc)
-
-                    if layer_deform:
-                        blender_vertex_group_ids = bmv[layer_deform]
-                        if blender_vertex_group_ids:
-                            count = 0
-                            bone_ids = []
-                            weights = []
-                            for blender_index, blender_weight in blender_vertex_group_ids.items():
-                                ms3d_joint = blender_to_ms3d_bones.get(
-                                        blender_mesh_object_temp.vertex_groups[blender_index].name)
-                                if ms3d_joint:
-                                    if count == 0:
-                                        ms3d_vertex.bone_id = ms3d_joint.__index
-                                        weights.append(int(blender_weight * 100.0))
-                                    elif count == 1:
-                                        bone_ids.append(ms3d_joint.__index)
-                                        weights.append(int(blender_weight * 100.0))
-                                    elif count == 2:
-                                        bone_ids.append(ms3d_joint.__index)
-                                        weights.append(int(blender_weight * 100.0))
-                                    elif count == 3:
-                                        bone_ids.append(ms3d_joint.__index)
-                                        self.options.report(
-                                                {'WARNING', 'INFO'},
-                                                ms3d_str['WARNING_EXPORT_SKIP_WEIGHT'])
-                                    else:
-                                        # only first three weights will be supported / four bones
-                                        self.options.report(
-                                                {'WARNING', 'INFO'},
-                                                ms3d_str['WARNING_EXPORT_SKIP_WEIGHT_EX'])
-                                        break
-                                count+= 1
-
-                            while len(bone_ids) < 3:
-                                bone_ids.append(Ms3dSpec.DEFAULT_VERTEX_BONE_ID)
-                            while len(weights) < 3:
-                                weights.append(0)
-
-                            # normalize weights to 100
-                            if self.options.normalize_weights:
-                                weight_sum = 0
-                                for weight in weights:
-                                    weight_sum += weight
-
-                                if weight_sum > 100:
-                                    weight_normalize = 100 / weight_sum
-                                else:
-                                    weight_normalize = 1
-
-                                weight_sum = 100
-                                for index, weight in enumerate(weights):
-                                    if index >= count-1:
-                                        weights[index] = weight_sum
-                                        break
-                                    normalized_weight = int(weight * weight_normalize)
-                                    weight_sum -= normalized_weight
-                                    weights[index] = normalized_weight
-
-                            ms3d_vertex._vertex_ex_object._bone_ids = tuple(bone_ids)
-                            ms3d_vertex._vertex_ex_object._weights = tuple(weights)
-
-                    if layer_extra:
-                        #ms3d_vertex._vertex_ex_object.extra = bmv[layer_extra]
-                        # bm.verts.layers.int does only support signed int32
-                        # convert signed int32 to unsigned int32 (little-endian)
-                        signed_int32 = bmv[layer_extra]
-                        bytes_int32 = signed_int32.to_bytes(4, byteorder='little', signed=True)
-                        unsigned_int32 = int.from_bytes(bytes_int32, byteorder='little', signed=False)
-                        ms3d_vertex._vertex_ex_object.extra = unsigned_int32
-
-                    ms3d_model._vertices.append(ms3d_vertex)
-                    blender_to_ms3d_vertices[bmv] = ms3d_vertex
-
-            ##########################
-            # handle faces / tris
-            for bmf in bm.faces:
-                item = blender_to_ms3d_triangles.get(bmf)
-                if item is None:
-                    index = len(ms3d_model._triangles)
-                    ms3d_triangle = Ms3dTriangle()
-                    ms3d_triangle.__index = index
-                    bmv0 = bmf.verts[0]
-                    bmv1 = bmf.verts[1]
-                    bmv2 = bmf.verts[2]
-                    ms3d_vertex0 = blender_to_ms3d_vertices[bmv0]
-                    ms3d_vertex1 = blender_to_ms3d_vertices[bmv1]
-                    ms3d_vertex2 = blender_to_ms3d_vertices[bmv2]
-                    ms3d_vertex0.reference_count += 1
-                    ms3d_vertex1.reference_count += 1
-                    ms3d_vertex2.reference_count += 1
-                    ms3d_triangle._vertex_indices = (
-                            ms3d_vertex0.__index,
-                            ms3d_vertex1.__index,
-                            ms3d_vertex2.__index,
-                            )
-                    ms3d_triangle._vertex_normals = (
-                            self.geometry_correction(bmv0.normal),
-                            self.geometry_correction(bmv1.normal),
-                            self.geometry_correction(bmv2.normal),
-                            )
-                    ms3d_triangle._s = (
-                            bmf.loops[0][layer_uv].uv.x,
-                            bmf.loops[1][layer_uv].uv.x,
-                            bmf.loops[2][layer_uv].uv.x,
-                            )
-                    ms3d_triangle._t = (
-                            1.0 - bmf.loops[0][layer_uv].uv.y,
-                            1.0 - bmf.loops[1][layer_uv].uv.y,
-                            1.0 - bmf.loops[2][layer_uv].uv.y,
-                            )
-
-                    ms3d_triangle.smoothing_group = bmf[layer_smoothing_group]
-                    ms3d_model._triangles.append(ms3d_triangle)
-
-                    ms3d_material = self.get_ms3d_material_add_if(blender_mesh, ms3d_model,
-                            blender_to_ms3d_materials, bmf.material_index)
-                    ms3d_group = blender_to_ms3d_groups.get(bmf[layer_group])
-
-                    ##EXPORT_ACTIVE_ONLY:
-                    if ms3d_group is not None:
-                        if ms3d_material is None:
-                            ms3d_group.material_index = Ms3dSpec.DEFAULT_GROUP_MATERIAL_INDEX
-                        else:
-                            if ms3d_group.material_index is None:
-                                ms3d_group.material_index = ms3d_material.__index
-                            else:
-                                if ms3d_group.material_index != ms3d_material.__index:
-                                    ms3d_group = self.get_ms3d_group_by_material_add_if(ms3d_model, ms3d_material)
-                    else:
-                        if ms3d_material is not None:
-                            ms3d_group = self.get_ms3d_group_by_material_add_if(ms3d_model, ms3d_material)
-                        else:
-                            ms3d_group = self.get_ms3d_group_default_material_add_if(ms3d_model)
-
-                    if ms3d_group is not None:
-                        ms3d_group._triangle_indices.append(ms3d_triangle.__index)
-                        ms3d_triangle.group_index = ms3d_group.__index
-
-                    blender_to_ms3d_triangles[bmf] = ms3d_triangle
-
-            if bm is not None:
-                bm.free()
-
-            enable_edit_mode(False)
-
-            ##########################
-            # remove the temporary data
-            blender_scene.objects.unlink(blender_mesh_object_temp)
-            if blender_mesh_object_temp is not None:
-                blender_mesh_object_temp.user_clear()
-                blender_context.blend_data.objects.remove(blender_mesh_object_temp)
-            if blender_mesh_temp is not None:
-                blender_mesh_temp.user_clear()
-                blender_context.blend_data.meshes.remove(blender_mesh_temp)
-
-
-
-    ###########################################################################
-    def create_animation(self, blender_context, ms3d_model, blender_mesh_objects, blender_to_ms3d_bones):
-        ##########################
-        # setup scene
-        blender_scene = blender_context.scene
-
-        frame_start = blender_scene.frame_start
-        frame_end = blender_scene.frame_end
-        frame_total = (frame_end - frame_start) + 1
-        frame_step = blender_scene.frame_step
-        frame_offset = 0
-
-        fps = blender_scene.render.fps * blender_scene.render.fps_base
-        time_base = 1.0 / fps
-
-        base_bone_correction = Matrix.Rotation(pi / 2, 4, 'Z')
-
-        for blender_mesh_object in blender_mesh_objects:
-            blender_bones = None
-            blender_action = None
-            blender_nla_tracks = None
-            for blender_modifier in blender_mesh_object.modifiers:
-                if blender_modifier.type == 'ARMATURE' and blender_modifier.object.pose:
-                    blender_bones = blender_modifier.object.data.bones
-                    blender_pose_bones = blender_modifier.object.pose.bones
-                    if blender_modifier.object.animation_data:
-                        blender_action = blender_modifier.object.animation_data.action
-                        blender_nla_tracks =  blender_modifier.object.animation_data.nla_tracks
-                    break
-
-            ##########################
-            # bones
-            blender_bones_ordered = []
-            self.build_blender_bone_dependency_order(blender_bones, blender_bones_ordered)
-            for blender_bone_name in blender_bones_ordered:
-                blender_bone_oject = blender_bones[blender_bone_name]
-                ms3d_joint = Ms3dJoint()
-                ms3d_joint.__index = len(ms3d_model._joints)
-
-                blender_bone_ms3d = blender_bone_oject.ms3d
-                blender_bone = blender_bone_oject
-
-                ms3d_joint.flags = Ms3dUi.flags_to_ms3d(blender_bone_ms3d.flags)
-                if blender_bone_ms3d.comment:
-                    ms3d_joint._comment_object = Ms3dCommentEx()
-                    ms3d_joint._comment_object.comment = blender_bone_ms3d.comment
-                    ms3d_joint._comment_object.index = ms3d_joint.__index
-
-                ms3d_joint.joint_ex_object._color = blender_bone_ms3d.color[:]
-
-                ms3d_joint.name = blender_bone.name
-
-                if blender_bone.parent:
-                    ms3d_joint.parent_name = blender_bone.parent.name
-                    ms3d_joint.__matrix = matrix_difference(blender_bone.matrix_local, blender_bone.parent.matrix_local)
-                else:
-                    ms3d_joint.__matrix = base_bone_correction * blender_bone.matrix_local
-
-                mat = ms3d_joint.__matrix
-                loc = mat.to_translation()
-                rot = mat.to_euler('XZY')
-                ms3d_joint._position = self.joint_correction(loc)
-                ms3d_joint._rotation = self.joint_correction(rot)
-
-                ms3d_model._joints.append(ms3d_joint)
-                blender_to_ms3d_bones[blender_bone.name] = ms3d_joint
-
-            ##########################
-            # animation
-            frames = None
-            frames_location = set()
-            frames_rotation = set()
-            frames_scale = set()
-
-            if blender_action:
-                self.fill_keyframe_sets(
-                        blender_action.fcurves,
-                        frames_location, frames_rotation, frames_scale,
-                        0)
-
-            if blender_nla_tracks:
-                for nla_track in blender_nla_tracks:
-                    if nla_track.mute:
-                        continue
-                    for strip in nla_track.strips:
-                        if strip.mute:
-                            continue
-                        frame_correction = strip.frame_start - strip.action_frame_start
-                        self.fill_keyframe_sets(
-                                strip.action.fcurves,
-                                frames_location, frames_rotation, frames_scale,
-                                frame_correction)
-
-            frames = set(frames_location)
-            frames = frames.union(frames_rotation)
-            frames = frames.union(frames_scale)
-
-            if not self.options.shrink_to_keys:
-                frames = frames.intersection(range(blender_scene.frame_start, blender_scene.frame_end + 1))
-
-            frames_sorted = list(frames)
-            frames_sorted.sort()
-
-            if self.options.shrink_to_keys and len(frames_sorted) >= 2:
-                frame_start = frames_sorted[0]
-                frame_end = frames_sorted[len(frames_sorted)-1]
-                frame_total = (frame_end - frame_start) + 1
-                frame_offset = frame_start - 1
-
-            if self.options.bake_each_frame:
-                frames_sorted = range(int(frame_start), int(frame_end + 1), int(frame_step))
-
-            frame_temp = blender_scene.frame_current
-
-            for current_frame in frames_sorted:
-                blender_scene.frame_set(current_frame)
-
-                current_time = (current_frame - frame_offset) * time_base
-                for blender_bone_name in blender_bones_ordered:
-                    blender_bone = blender_bones[blender_bone_name]
-                    blender_pose_bone = blender_pose_bones[blender_bone_name]
-                    ms3d_joint = blender_to_ms3d_bones[blender_bone_name]
-
-                    m1 = blender_bone.matrix_local.inverted()
-                    if blender_pose_bone.parent:
-                        m2 = blender_pose_bone.parent.matrix_channel.inverted()
-                    else:
-                        m2 = Matrix()
-                    m3 = blender_pose_bone.matrix.copy()
-                    m = ((m1 * m2) * m3)
-                    loc = m.to_translation()
-                    rot = m.to_euler('XZY')
-
-                    ms3d_joint.translation_key_frames.append(
-                            Ms3dTranslationKeyframe(
-                                    current_time, self.joint_correction(loc)
-                                    )
-                            )
-                    ms3d_joint.rotation_key_frames.append(
-                            Ms3dRotationKeyframe(
-                                    current_time, self.joint_correction(rot)
-                                    )
-                            )
-
-            blender_scene.frame_set(frame_temp)
-
-        ms3d_model.animation_fps = fps
-        ms3d_model.number_total_frames = int(frame_total)
-        ms3d_model.current_time = ((blender_scene.frame_current - blender_scene.frame_start) + 1) * time_base
-
-
-    ###########################################################################
-    def get_ms3d_group_default_material_add_if(self, ms3d_model):
-        markerName = "MaterialGroupDefault"
-        markerComment = "group without material"
-
-        for ms3d_group in ms3d_model._groups:
-            if ms3d_group.material_index == Ms3dSpec.DEFAULT_GROUP_MATERIAL_INDEX \
-                    and ms3d_group.name == markerName \
-                    and ms3d_group._comment_object \
-                    and ms3d_group._comment_object.comment == markerComment:
-                return ms3d_group
-
-        ms3d_group = Ms3dGroup()
-        ms3d_group.__index = len(ms3d_model._groups)
-        ms3d_group.name = markerName
-        ms3d_group._comment_object = Ms3dCommentEx()
-        ms3d_group._comment_object.comment = markerComment
-        ms3d_group._comment_object.index = len(ms3d_model._groups)
-        ms3d_group.material_index = Ms3dSpec.DEFAULT_GROUP_MATERIAL_INDEX
-
-        ms3d_model._groups.append(ms3d_group)
-
-        return ms3d_group
-
-
-    ###########################################################################
-    def get_ms3d_group_by_material_add_if(self, ms3d_model, ms3d_material):
-        if ms3d_material.__index < 0 or ms3d_material.__index >= len(ms3d_model.materials):
-            return None
-
-        markerName = "MaterialGroup.{}".format(ms3d_material.__index)
-        markerComment = "MaterialGroup({})".format(ms3d_material.name)
-
-        for ms3d_group in ms3d_model._groups:
-            if ms3d_group.name == markerName \
-                    and ms3d_group._comment_object \
-                    and ms3d_group._comment_object.comment == markerComment:
-                return ms3d_group
-
-        ms3d_group = Ms3dGroup()
-        ms3d_group.__index = len(ms3d_model._groups)
-        ms3d_group.name = markerName
-        ms3d_group._comment_object = Ms3dCommentEx()
-        ms3d_group._comment_object.comment = markerComment
-        ms3d_group._comment_object.index = len(ms3d_model._groups)
-        ms3d_group.material_index = ms3d_material.__index
-
-        ms3d_model._groups.append(ms3d_group)
-
-        return ms3d_group
-
-
-    ###########################################################################
-    def get_ms3d_material_add_if(self, blender_mesh, ms3d_model, blender_to_ms3d_materials, blender_index):
-        if blender_index < 0 or blender_index >= len(blender_mesh.materials):
-            return None
-
-        blender_material = blender_mesh.materials[blender_index]
-        ms3d_material = blender_to_ms3d_materials.get(blender_material)
-        if ms3d_material is None:
-            ms3d_material = Ms3dMaterial()
-            ms3d_material.__index = len(ms3d_model.materials)
-
-            blender_ms3d_material = blender_material.ms3d
-
-            if not self.options.use_blender_names and not self.options.use_blender_materials and blender_ms3d_material.name:
-                ms3d_material.name = blender_ms3d_material.name
-            else:
-                ms3d_material.name = blender_material.name
-
-            temp_material = None
-            if self.options.use_blender_materials:
-                temp_material = Ms3dMaterial()
-                Ms3dMaterialHelper.copy_from_blender(None, None, temp_material, blender_material)
-            else:
-                temp_material = blender_ms3d_material
-
-            ms3d_material._ambient = temp_material.ambient[:]
-            ms3d_material._diffuse = temp_material.diffuse[:]
-            ms3d_material._specular = temp_material.specular[:]
-            ms3d_material._emissive = temp_material.emissive[:]
-            ms3d_material.shininess = temp_material.shininess
-            ms3d_material.transparency = temp_material.transparency
-            ms3d_material.texture = temp_material.texture
-            ms3d_material.alphamap = temp_material.alphamap
-
-            ms3d_material.mode = Ms3dUi.texture_mode_to_ms3d(blender_ms3d_material.mode)
-            if blender_ms3d_material.comment:
-                ms3d_material._comment_object = Ms3dCommentEx()
-                ms3d_material._comment_object.comment = blender_ms3d_material.comment
-                ms3d_material._comment_object.index = ms3d_material.__index
-
-            ms3d_model.materials.append(ms3d_material)
-
-            blender_to_ms3d_materials[blender_material] = ms3d_material
-
-        return ms3d_material
-
-
-    ###########################################################################
-    def geometry_correction(self, value):
-        return (value[1], value[2], value[0])
-
-
-    ###########################################################################
-    def joint_correction(self, value):
-        return (-value[0], value[2], value[1])
-
-
-    ###########################################################################
-    def build_blender_bone_dependency_order(self, blender_bones, blender_bones_ordered):
-        if not blender_bones:
-            return blender_bones_ordered
-
-        blender_bones_children = {None: []}
-        for blender_bone in blender_bones:
-            if blender_bone.parent:
-                blender_bone_children = blender_bones_children.get(blender_bone.parent.name)
-                if blender_bone_children is None:
-                    blender_bone_children = blender_bones_children[blender_bone.parent.name] = []
-            else:
-                blender_bone_children = blender_bones_children[None]
-
-            blender_bone_children.append(blender_bone.name)
-
-        self.traverse_dependencies(
-                blender_bones_ordered,
-                blender_bones_children,
-                None)
-
-        return blender_bones_ordered
-
-
-    ###########################################################################
-    def traverse_dependencies(self, blender_bones_ordered, blender_bones_children, key):
-        blender_bone_children = blender_bones_children.get(key)
-        if blender_bone_children:
-            for blender_bone_name in blender_bone_children:
-                blender_bones_ordered.append(blender_bone_name)
-                self.traverse_dependencies(
-                        blender_bones_ordered,
-                        blender_bones_children,
-                        blender_bone_name)
-
-    ###########################################################################
-    def fill_keyframe_sets(self,
-            fcurves,
-            frames_location, frames_rotation, frames_scale,
-            frame_correction):
-        for fcurve in fcurves:
-            if fcurve.data_path.endswith(".location"):
-                frames = frames_location
-            elif fcurve.data_path.endswith(".rotation_euler"):
-                frames = frames_rotation
-            elif fcurve.data_path.endswith(".rotation_quaternion"):
-                frames = frames_rotation
-            elif fcurve.data_path.endswith(".scale"):
-                frames = frames_scale
-            else:
-                pass
-
-            for keyframe_point in fcurve.keyframe_points:
-                frames.add(int(keyframe_point.co[0] + frame_correction))
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_import.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_import.py
deleted file mode 100644
index 612f230..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_import.py
+++ /dev/null
@@ -1,892 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-#import python stuff
-import io
-from mathutils import (
-        Vector,
-        Matrix,
-        )
-from os import (
-        path,
-        )
-from sys import (
-        exc_info,
-        )
-from time import (
-        time,
-        )
-
-
-# import io_scene_ms3d stuff
-from io_scene_ms3d.ms3d_strings import (
-        ms3d_str,
-        )
-from io_scene_ms3d.ms3d_spec import (
-        Ms3dSpec,
-        Ms3dModel,
-        Ms3dVertexEx2,
-        Ms3dVertexEx3,
-        )
-from io_scene_ms3d.ms3d_utils import (
-        select_all,
-        enable_pose_mode,
-        enable_edit_mode,
-        pre_setup_environment,
-        post_setup_environment,
-        get_edge_split_modifier_add_if,
-        )
-from io_scene_ms3d.ms3d_ui import (
-        Ms3dUi,
-        )
-
-
-#import blender stuff
-from bpy import (
-        data,
-        ops,
-        )
-import bmesh
-from bpy_extras.image_utils import (
-        load_image,
-        )
-
-
-###############################################################################
-class Ms3dImporter():
-    """ Load a MilkShape3D MS3D File """
-    def __init__(self, options):
-        self.options = options
-        pass
-
-    ###########################################################################
-    # create empty blender ms3d_model
-    # read ms3d file
-    # fill blender with ms3d_model content
-    def read(self, blender_context):
-        """ read ms3d file and convert ms3d content to bender content """
-
-        t1 = time()
-        t2 = None
-        self.has_textures = False
-
-        try:
-            # setup environment
-            pre_setup_environment(self, blender_context)
-
-            # create an empty ms3d template
-            ms3d_model = Ms3dModel(self.filepath_splitted[1])
-
-            #self.file = None
-            try:
-                # open ms3d file
-                #self.file = io.FileIO(self.options.filepath, 'rb')
-                with io.FileIO(self.options.filepath, 'rb') as self.file:
-                    # read and inject ms3d data from disk to internal structure
-                    ms3d_model.read(self.file)
-                    self.file.close()
-            finally:
-                # close ms3d file
-                #if self.file is not None:
-                #    self.file.close()
-                pass
-
-            # if option is set, this time will enlargs the io time
-            if self.options.verbose:
-                ms3d_model.print_internal()
-
-            t2 = time()
-
-            is_valid, statistics = ms3d_model.is_valid()
-
-            if is_valid:
-                # inject ms3d data to blender
-                self.to_blender(blender_context, ms3d_model)
-
-                blender_scene = blender_context.scene
-
-                # finalize/restore environment
-                blender_scene.update()
-
-                post_setup_environment(self, blender_context)
-
-            print()
-            print("##########################################################")
-            print("Import from MS3D to Blender")
-            print(statistics)
-            print("##########################################################")
-
-        except Exception:
-            type, value, traceback = exc_info()
-            print("read - exception in try block\n  type: '{0}'\n"
-                    "  value: '{1}'".format(type, value, traceback))
-
-            if t2 is None:
-                t2 = time()
-
-            raise
-
-        else:
-            pass
-
-        t3 = time()
-        print(ms3d_str['SUMMARY_IMPORT'].format(
-                (t3 - t1), (t2 - t1), (t3 - t2)))
-
-        return {"FINISHED"}
-
-
-    ###########################################################################
-    def to_blender(self, blender_context, ms3d_model):
-        blender_mesh_object = self.create_geometry(blender_context, ms3d_model)
-        blender_armature_object = self.create_animation(
-                blender_context, ms3d_model, blender_mesh_object)
-
-        self.organize_objects(
-                blender_context, ms3d_model,
-                [blender_mesh_object, blender_armature_object])
-
-
-    ###########################################################################
-    def organize_objects(self, blender_context, ms3d_model, blender_objects):
-        ##########################
-        # blender_armature_object to blender_mesh_object
-        # that has bad side effects to the armature
-        # and causes cyclic dependecies
-        ###blender_armature_object.parent = blender_mesh_object
-        ###blender_mesh_object.parent = blender_armature_object
-
-        blender_scene = blender_context.scene
-
-        blender_group = blender_context.blend_data.groups.new(
-                "{}.g".format(ms3d_model.name))
-        blender_empty_object = blender_context.blend_data.objects.new(
-                "{}.e".format(ms3d_model.name), None)
-        blender_empty_object.location = blender_scene.cursor_location
-        blender_scene.objects.link(blender_empty_object)
-        blender_group.objects.link(blender_empty_object)
-
-        for blender_object in blender_objects:
-            if blender_object is not None:
-                blender_group.objects.link(blender_object)
-                blender_object.parent = blender_empty_object
-
-
-    ###########################################################################
-    def create_geometry(self, blender_context, ms3d_model):
-        ##########################
-        # blender stuff:
-        # create a blender Mesh
-        blender_mesh = blender_context.blend_data.meshes.new(
-                "{}.m".format(ms3d_model.name))
-        blender_mesh.ms3d.name = ms3d_model.name
-
-        ms3d_comment = ms3d_model.comment_object
-        if ms3d_comment is not None:
-            blender_mesh.ms3d.comment = ms3d_comment.comment
-        ms3d_model_ex = ms3d_model.model_ex_object
-        if ms3d_model_ex is not None:
-            blender_mesh.ms3d.joint_size = ms3d_model_ex.joint_size
-            blender_mesh.ms3d.alpha_ref = ms3d_model_ex.alpha_ref
-            blender_mesh.ms3d.transparency_mode \
-                    = Ms3dUi.transparency_mode_from_ms3d(
-                            ms3d_model_ex.transparency_mode)
-
-        ##########################
-        # blender stuff:
-        # link to blender object
-        blender_mesh_object = blender_context.blend_data.objects.new(
-                "{}.m".format(ms3d_model.name), blender_mesh)
-
-        ##########################
-        # blender stuff:
-        # create edge split modifire, to make sharp edges visible
-        blender_modifier = get_edge_split_modifier_add_if(blender_mesh_object)
-
-        ##########################
-        # blender stuff:
-        # link to blender scene
-        blender_scene = blender_context.scene
-        blender_scene.objects.link(blender_mesh_object)
-        #blender_mesh_object.location = blender_scene.cursor_location
-        enable_edit_mode(False)
-        select_all(False)
-        blender_mesh_object.select = True
-        blender_scene.objects.active = blender_mesh_object
-
-        ##########################
-        # take this as active object after import
-        self.active_object = blender_mesh_object
-
-        ##########################
-        # blender stuff:
-        # create all (ms3d) groups
-        ms3d_to_blender_group_index = {}
-        blender_group_manager = blender_mesh.ms3d
-        for ms3d_group_index, ms3d_group in enumerate(ms3d_model.groups):
-            blender_group = blender_group_manager.create_group()
-            blender_group.name = ms3d_group.name
-            blender_group.flags = Ms3dUi.flags_from_ms3d(ms3d_group.flags)
-            blender_group.material_index = ms3d_group.material_index
-
-            ms3d_comment = ms3d_group.comment_object
-            if ms3d_comment is not None:
-                blender_group.comment = ms3d_comment.comment
-
-            # translation dictionary
-            ms3d_to_blender_group_index[ms3d_group_index] = blender_group.id
-
-        ####################################################
-        # begin BMesh stuff
-        #
-
-        ##########################
-        # BMesh stuff:
-        # create an empty BMesh
-        bm = bmesh.new()
-
-        ##########################
-        # BMesh stuff:
-        # create new Layers for custom data per "mesh face"
-        layer_texture = bm.faces.layers.tex.get(
-                ms3d_str['OBJECT_LAYER_TEXTURE'])
-        if layer_texture is None:
-            layer_texture = bm.faces.layers.tex.new(
-                    ms3d_str['OBJECT_LAYER_TEXTURE'])
-
-        layer_smoothing_group = bm.faces.layers.int.get(
-                ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-        if layer_smoothing_group is None:
-            layer_smoothing_group = bm.faces.layers.int.new(
-                    ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-
-        layer_group = bm.faces.layers.int.get(
-                ms3d_str['OBJECT_LAYER_GROUP'])
-        if layer_group is None:
-            layer_group = bm.faces.layers.int.new(
-                    ms3d_str['OBJECT_LAYER_GROUP'])
-
-        ##########################
-        # BMesh stuff:
-        # create new Layers for custom data per "face vertex"
-        layer_uv = bm.loops.layers.uv.get(ms3d_str['OBJECT_LAYER_UV'])
-        if layer_uv is None:
-            layer_uv = bm.loops.layers.uv.new(ms3d_str['OBJECT_LAYER_UV'])
-
-        ##########################
-        # BMesh stuff:
-        # create new Layers for custom data per "vertex"
-        layer_extra = bm.verts.layers.int.get(ms3d_str['OBJECT_LAYER_EXTRA'])
-        if layer_extra is None:
-            layer_extra = bm.verts.layers.int.new(ms3d_str['OBJECT_LAYER_EXTRA'])
-
-        ##########################
-        # BMesh stuff:
-        # create all vertices
-        for ms3d_vertex_index, ms3d_vertex in enumerate(ms3d_model.vertices):
-            bmv = bm.verts.new(self.geometry_correction(ms3d_vertex.vertex))
-
-            if layer_extra and ms3d_vertex.vertex_ex_object and \
-                    (isinstance(ms3d_vertex.vertex_ex_object, Ms3dVertexEx2) \
-                    or isinstance(ms3d_vertex.vertex_ex_object, Ms3dVertexEx3)):
-
-                #bmv[layer_extra] = ms3d_vertex.vertex_ex_object.extra
-                # bm.verts.layers.int does only support signed int32
-                # convert unsigned int32 to signed int32 (little-endian)
-                unsigned_int32 = ms3d_vertex.vertex_ex_object.extra
-                bytes_int32 = unsigned_int32.to_bytes(4, byteorder='little', signed=False)
-                signed_int32 = int.from_bytes(bytes_int32, byteorder='little', signed=True)
-                bmv[layer_extra] = signed_int32
-
-        ##########################
-        # blender stuff (uses BMesh stuff):
-        # create all materials / image textures
-        ms3d_to_blender_material = {}
-        for ms3d_material_index, ms3d_material in enumerate(
-                ms3d_model.materials):
-            blender_material = blender_context.blend_data.materials.new(
-                    ms3d_material.name)
-
-            # custom datas
-            blender_material.ms3d.name = ms3d_material.name
-            blender_material.ms3d.ambient = ms3d_material.ambient
-            blender_material.ms3d.diffuse = ms3d_material.diffuse
-            blender_material.ms3d.specular = ms3d_material.specular
-            blender_material.ms3d.emissive = ms3d_material.emissive
-            blender_material.ms3d.shininess = ms3d_material.shininess
-            blender_material.ms3d.transparency = ms3d_material.transparency
-            blender_material.ms3d.mode = Ms3dUi.texture_mode_from_ms3d(
-                    ms3d_material.mode)
-
-            if ms3d_material.texture:
-                blender_material.ms3d.texture = ms3d_material.texture
-
-            if ms3d_material.alphamap:
-                blender_material.ms3d.alphamap = ms3d_material.alphamap
-
-            ms3d_comment = ms3d_material.comment_object
-            if ms3d_comment is not None:
-                blender_material.ms3d.comment = ms3d_comment.comment
-
-            # blender datas
-            blender_material.ambient = (
-                    (ms3d_material.ambient[0]
-                    + ms3d_material.ambient[1]
-                    + ms3d_material.ambient[2]) / 3.0)
-
-            blender_material.diffuse_color[0] = ms3d_material.diffuse[0]
-            blender_material.diffuse_color[1] = ms3d_material.diffuse[1]
-            blender_material.diffuse_color[2] = ms3d_material.diffuse[2]
-
-            blender_material.specular_color[0] = ms3d_material.specular[0]
-            blender_material.specular_color[1] = ms3d_material.specular[1]
-            blender_material.specular_color[2] = ms3d_material.specular[2]
-
-            blender_material.emit = (
-                    (ms3d_material.emissive[0]
-                    + ms3d_material.emissive[1]
-                    + ms3d_material.emissive[2]) / 3.0)
-
-            blender_material.specular_hardness = ms3d_material.shininess * 4.0
-            blender_material.alpha = 1.0 - ms3d_material.transparency
-
-            # diffuse texture
-            if ms3d_material.texture:
-                dir_name_diffuse = self.filepath_splitted[0]
-                file_name_diffuse = path.split(ms3d_material.texture)[1]
-                blender_image_diffuse = load_image(
-                        file_name_diffuse, dir_name_diffuse)
-                blender_texture_diffuse = blender_context.blend_data.textures.new(
-                        name=file_name_diffuse, type='IMAGE')
-                blender_texture_diffuse.image = blender_image_diffuse
-                blender_texture_slot_diffuse \
-                        = blender_material.texture_slots.add()
-                blender_texture_slot_diffuse.texture = blender_texture_diffuse
-                blender_texture_slot_diffuse.texture_coords = 'UV'
-                blender_texture_slot_diffuse.uv_layer = layer_uv.name
-                blender_texture_slot_diffuse.use_map_color_diffuse = True
-                blender_texture_slot_diffuse.use_map_alpha = False
-                if blender_image_diffuse is not None:
-                    self.has_textures = True
-            else:
-                blender_image_diffuse = None
-
-            # alpha texture
-            if ms3d_material.alphamap:
-                dir_name_alpha = self.filepath_splitted[0]
-                file_name_alpha = path.split(ms3d_material.alphamap)[1]
-                blender_image_alpha = load_image(
-                        file_name_alpha, dir_name_alpha)
-                blender_texture_alpha = blender_context.blend_data.textures.new(
-                        name=file_name_alpha, type='IMAGE')
-                blender_texture_alpha.image = blender_image_alpha
-                blender_texture_slot_alpha \
-                        = blender_material.texture_slots.add()
-                blender_texture_slot_alpha.texture = blender_texture_alpha
-                blender_texture_slot_alpha.texture_coords = 'UV'
-                blender_texture_slot_alpha.uv_layer = layer_uv.name
-                blender_texture_slot_alpha.use_map_color_diffuse = False
-                blender_texture_slot_alpha.use_map_alpha = True
-                blender_texture_slot_alpha.use_rgb_to_intensity = True
-                blender_material.alpha = 0
-                blender_material.specular_alpha = 0
-
-            # append blender material to blender mesh, to be linked to
-            blender_mesh.materials.append(blender_material)
-
-            # translation dictionary
-            ms3d_to_blender_material[ms3d_material_index] \
-                    = blender_image_diffuse
-
-        ##########################
-        # BMesh stuff:
-        # create all triangles
-        length_verts = len(bm.verts)
-        smoothing_group_blender_faces = {}
-        for ms3d_triangle_index, ms3d_triangle in enumerate(
-                ms3d_model.triangles):
-            bmv_list = []
-            for index, vert_index in enumerate(ms3d_triangle.vertex_indices):
-                if vert_index < 0 or vert_index >= length_verts:
-                    continue
-                bmv = bm.verts[vert_index]
-                bmv.normal = self.geometry_correction(ms3d_triangle.vertex_normals[index])
-                if [[x] for x in bmv_list if x == bmv]:
-                    self.options.report(
-                            {'WARNING', 'INFO'},
-                            ms3d_str['WARNING_IMPORT_SKIP_VERTEX_DOUBLE'].format(
-                                    ms3d_triangle_index))
-                    continue
-                bmv_list.append(bmv)
-
-            if len(bmv_list) < 3:
-                self.options.report(
-                        {'WARNING', 'INFO'},
-                        ms3d_str['WARNING_IMPORT_SKIP_LESS_VERTICES'].format(
-                                ms3d_triangle_index))
-                continue
-            bmf = bm.faces.get(bmv_list)
-            if bmf is not None:
-                self.options.report(
-                        {'WARNING', 'INFO'},
-                        ms3d_str['WARNING_IMPORT_SKIP_FACE_DOUBLE'].format(
-                                ms3d_triangle_index))
-                continue
-
-            bmf = bm.faces.new(bmv_list)
-
-            # blender uv custom data per "face vertex"
-            bmf.loops[0][layer_uv].uv = Vector(
-                    (ms3d_triangle.s[0], 1.0 - ms3d_triangle.t[0]))
-            bmf.loops[1][layer_uv].uv = Vector(
-                    (ms3d_triangle.s[1], 1.0 - ms3d_triangle.t[1]))
-            bmf.loops[2][layer_uv].uv = Vector(
-                    (ms3d_triangle.s[2], 1.0 - ms3d_triangle.t[2]))
-
-            # ms3d custom data per "mesh face"
-            bmf[layer_smoothing_group] = ms3d_triangle.smoothing_group
-
-            blender_group_id = ms3d_to_blender_group_index.get(
-                    ms3d_triangle.group_index)
-            if blender_group_id is not None:
-                bmf[layer_group] = blender_group_id
-
-            if ms3d_triangle.group_index >= 0 \
-                    and ms3d_triangle.group_index < len(ms3d_model.groups):
-                ms3d_material_index \
-                        = ms3d_model.groups[ms3d_triangle.group_index].material_index
-                if ms3d_material_index != Ms3dSpec.NONE_GROUP_MATERIAL_INDEX:
-                    # BMFace.material_index expects...
-                    # index of material in types.Mesh.materials,
-                    # not index of material in blender_context.blend_data.materials!
-                    bmf.material_index = ms3d_material_index
-
-                    # apply diffuse texture image to face, to be visible in 3d view
-                    bmf[layer_texture].image = ms3d_to_blender_material.get(
-                            ms3d_material_index)
-                else:
-                    # set material index to highes possible index
-                    # - in most cases there is no maretial assigned ;)
-                    bmf.material_index = 32766
-                    pass
-
-            # helper dictionary for post-processing smoothing_groups
-            smoothing_group_blender_face = smoothing_group_blender_faces.get(
-                    ms3d_triangle.smoothing_group)
-            if smoothing_group_blender_face is None:
-                smoothing_group_blender_face = []
-                smoothing_group_blender_faces[ms3d_triangle.smoothing_group] \
-                        = smoothing_group_blender_face
-            smoothing_group_blender_face.append(bmf)
-
-        ##########################
-        # BMesh stuff:
-        # create all sharp edges for blender to make smoothing_groups visible
-        for ms3d_smoothing_group_index, blender_face_list \
-                in smoothing_group_blender_faces.items():
-            edge_dict = {}
-            for bmf in blender_face_list:
-                bmf.smooth = True
-                for bme in bmf.edges:
-                    if edge_dict.get(bme) is None:
-                        edge_dict[bme] = 0
-                    else:
-                        edge_dict[bme] += 1
-                    bme.seam = (edge_dict[bme] == 0)
-                    bme.smooth = (edge_dict[bme] != 0)
-
-        ##########################
-        # BMesh stuff:
-        # finally tranfer BMesh to Mesh
-        bm.to_mesh(blender_mesh)
-        bm.free()
-
-
-        #
-        # end BMesh stuff
-        ####################################################
-
-        blender_mesh.validate(self.options.verbose)
-
-        return blender_mesh_object
-
-
-    ###########################################################################
-    def create_animation(self, blender_context, ms3d_model, blender_mesh_object):
-        ##########################
-        # setup scene
-        blender_scene = blender_context.scene
-        blender_scene.render.fps = ms3d_model.animation_fps
-        if ms3d_model.animation_fps:
-            blender_scene.render.fps_base = (blender_scene.render.fps /
-                    ms3d_model.animation_fps)
-
-        blender_scene.frame_start = 1
-        blender_scene.frame_end = (ms3d_model.number_total_frames
-                + blender_scene.frame_start) - 1
-        blender_scene.frame_current = (ms3d_model.current_time
-                * ms3d_model.animation_fps)
-
-        ##########################
-        if not ms3d_model.joints:
-            return
-
-        ##########################
-        ms3d_armature_name = "{}.a".format(ms3d_model.name)
-        ms3d_action_name = "{}.act".format(ms3d_model.name)
-
-        ##########################
-        # create new blender_armature_object
-        blender_armature = blender_context.blend_data.armatures.new(
-                ms3d_armature_name)
-        blender_armature.ms3d.name = ms3d_model.name
-        blender_armature.draw_type = 'STICK'
-        blender_armature.show_axes = True
-        blender_armature.use_auto_ik = True
-        blender_armature_object = blender_context.blend_data.objects.new(
-                ms3d_armature_name, blender_armature)
-        blender_scene.objects.link(blender_armature_object)
-        #blender_armature_object.location = blender_scene.cursor_location
-        blender_armature_object.show_x_ray = True
-
-        ##########################
-        # create new modifier
-        blender_modifier = blender_mesh_object.modifiers.new(
-                ms3d_armature_name, type='ARMATURE')
-        blender_modifier.show_expanded = False
-        blender_modifier.use_vertex_groups = True
-        blender_modifier.use_bone_envelopes = False
-        blender_modifier.object = blender_armature_object
-
-        ##########################
-        # prepare for vertex groups
-        ms3d_to_blender_vertex_groups = {}
-        for ms3d_vertex_index, ms3d_vertex in enumerate(ms3d_model.vertices):
-            # prepare for later use for blender vertex group
-            if ms3d_vertex.bone_id != Ms3dSpec.NONE_VERTEX_BONE_ID:
-                if ms3d_vertex.vertex_ex_object \
-                        and ( \
-                        ms3d_vertex.vertex_ex_object.bone_ids[0] != Ms3dSpec.NONE_VERTEX_BONE_ID \
-                        or ms3d_vertex.vertex_ex_object.bone_ids[1] != Ms3dSpec.NONE_VERTEX_BONE_ID \
-                        or ms3d_vertex.vertex_ex_object.bone_ids[2] != Ms3dSpec.NONE_VERTEX_BONE_ID \
-                        ):
-                    ms3d_vertex_group_ids_weights = []
-                    ms3d_vertex_group_ids_weights.append(
-                            (ms3d_vertex.bone_id,
-                            float(ms3d_vertex.vertex_ex_object.weights[0] % 101) / 100.0,
-                            ))
-                    if ms3d_vertex.vertex_ex_object.bone_ids[0] != Ms3dSpec.NONE_VERTEX_BONE_ID:
-                        ms3d_vertex_group_ids_weights.append(
-                                (ms3d_vertex.vertex_ex_object.bone_ids[0],
-                                float(ms3d_vertex.vertex_ex_object.weights[1] % 101) / 100.0
-                                ))
-                    if ms3d_vertex.vertex_ex_object.bone_ids[1] != Ms3dSpec.NONE_VERTEX_BONE_ID:
-                        ms3d_vertex_group_ids_weights.append(
-                                (ms3d_vertex.vertex_ex_object.bone_ids[1],
-                                float(ms3d_vertex.vertex_ex_object.weights[2] % 101) / 100.0
-                                ))
-                    if ms3d_vertex.vertex_ex_object.bone_ids[2] != Ms3dSpec.NONE_VERTEX_BONE_ID:
-                        ms3d_vertex_group_ids_weights.append(
-                                (ms3d_vertex.vertex_ex_object.bone_ids[2],
-                                1.0 -
-                                float((ms3d_vertex.vertex_ex_object.weights[0] % 101)
-                                + (ms3d_vertex.vertex_ex_object.weights[1] % 101)
-                                + (ms3d_vertex.vertex_ex_object.weights[2] % 101)) / 100.0
-                                ))
-
-                else:
-                    ms3d_vertex_group_ids_weights = [(ms3d_vertex.bone_id, 1.0), ]
-
-                for ms3d_vertex_group_id_weight in ms3d_vertex_group_ids_weights:
-                    ms3d_vertex_group_id = ms3d_vertex_group_id_weight[0]
-                    blender_vertex_weight = ms3d_vertex_group_id_weight[1]
-                    blender_vertex_group = ms3d_to_blender_vertex_groups.get(
-                            ms3d_vertex_group_id)
-                    if blender_vertex_group is None:
-                        ms3d_to_blender_vertex_groups[ms3d_vertex_group_id] \
-                                = blender_vertex_group = []
-                    blender_vertex_group.append((ms3d_vertex_index, blender_vertex_weight))
-
-        ##########################
-        # blender stuff:
-        # create all vertex groups to be used for bones
-        for ms3d_bone_id, blender_vertex_index_weight_list \
-                in ms3d_to_blender_vertex_groups.items():
-            ms3d_name = ms3d_model.joints[ms3d_bone_id].name
-            blender_vertex_group = blender_mesh_object.vertex_groups.new(
-                    ms3d_name)
-            for blender_vertex_id_weight in blender_vertex_index_weight_list:
-                blender_vertex_index = blender_vertex_id_weight[0]
-                blender_vertex_weight = blender_vertex_id_weight[1]
-                blender_vertex_group.add((blender_vertex_index, ), blender_vertex_weight, 'ADD')
-
-        ##########################
-        # bring joints in the correct order
-        ms3d_joints_ordered = []
-        self.build_ms3d_joint_dependency_order(ms3d_model.joints, ms3d_joints_ordered)
-
-        ##########################
-        # prepare joint data for later use
-        ms3d_joint_by_name = {}
-        for ms3d_joint in ms3d_joints_ordered:
-            item = ms3d_joint_by_name.get(ms3d_joint.name)
-            if item is None:
-                ms3d_joint.__children = []
-                ms3d_joint_by_name[ms3d_joint.name] = ms3d_joint
-
-            matrix_local_rot = (Matrix.Rotation(ms3d_joint.rotation[2], 4, 'Z')
-                    * Matrix.Rotation(ms3d_joint.rotation[1], 4, 'Y')
-                    ) * Matrix.Rotation(ms3d_joint.rotation[0], 4, 'X')
-            matrix_local = Matrix.Translation(Vector(ms3d_joint.position)
-                    ) * matrix_local_rot
-
-            ms3d_joint.__matrix_local_rot = matrix_local_rot
-            ms3d_joint.__matrix_global_rot = matrix_local_rot
-            ms3d_joint.__matrix_local = matrix_local
-            ms3d_joint.__matrix_global = matrix_local
-
-            if ms3d_joint.parent_name:
-                ms3d_joint_parent = ms3d_joint_by_name.get(
-                        ms3d_joint.parent_name)
-                if ms3d_joint_parent is not None:
-                    ms3d_joint_parent.__children.append(ms3d_joint)
-
-                    matrix_global = ms3d_joint_parent.__matrix_global \
-                            * matrix_local
-                    ms3d_joint.__matrix_global = matrix_global
-
-                    matrix_global_rot = ms3d_joint_parent.__matrix_global_rot \
-                            * matrix_local_rot
-                    ms3d_joint.__matrix_global_rot = matrix_global_rot
-
-        ##########################
-        # ms3d_joint to blender_edit_bone
-        if ms3d_model.model_ex_object and not self.options.use_joint_size:
-            joint_length = ms3d_model.model_ex_object.joint_size
-        else:
-            joint_length = self.options.joint_size
-        if joint_length < 0.01:
-            joint_length = 0.01
-
-        blender_scene.objects.active = blender_armature_object
-        enable_edit_mode(True)
-        for ms3d_joint in ms3d_joints_ordered:
-            blender_edit_bone = blender_armature.edit_bones.new(ms3d_joint.name)
-            blender_edit_bone.use_connect = False
-            blender_edit_bone.use_inherit_rotation = True
-            blender_edit_bone.use_inherit_scale = True
-            blender_edit_bone.use_local_location = True
-            blender_armature.edit_bones.active = blender_edit_bone
-
-            ms3d_joint = ms3d_joint_by_name[ms3d_joint.name]
-            ms3d_joint_vector = ms3d_joint.__matrix_global * Vector()
-
-            blender_edit_bone.head \
-                    = self.geometry_correction(ms3d_joint_vector)
-
-            vector_tail_end_up = ms3d_joint.__matrix_global_rot * Vector((0,1,0))
-            vector_tail_end_dir = ms3d_joint.__matrix_global_rot * Vector((0,0,1))
-            vector_tail_end_up.normalize()
-            vector_tail_end_dir.normalize()
-            blender_edit_bone.tail = blender_edit_bone.head \
-                    + self.geometry_correction(vector_tail_end_dir * joint_length)
-            blender_edit_bone.align_roll(self.geometry_correction(vector_tail_end_up))
-
-            if ms3d_joint.parent_name:
-                ms3d_joint_parent = ms3d_joint_by_name[ms3d_joint.parent_name]
-                blender_edit_bone_parent = ms3d_joint_parent.blender_edit_bone
-                blender_edit_bone.parent = blender_edit_bone_parent
-
-            ms3d_joint.blender_bone_name = blender_edit_bone.name
-            ms3d_joint.blender_edit_bone = blender_edit_bone
-        enable_edit_mode(False)
-
-        if self.options.joint_to_bones:
-            enable_edit_mode(True)
-            for ms3d_joint in ms3d_joints_ordered:
-                blender_edit_bone = blender_armature.edit_bones[ms3d_joint.name]
-                if blender_edit_bone.children:
-                    new_length = 0.0
-                    for child_bone in blender_edit_bone.children:
-                        length = (child_bone.head - blender_edit_bone.head).length
-                        if new_length <= 0 or length < new_length:
-                            new_length = length
-                    if new_length >= 0.01:
-                        direction = blender_edit_bone.tail - blender_edit_bone.head
-                        direction.normalize()
-                        blender_edit_bone.tail = blender_edit_bone.head + (direction * new_length)
-            enable_edit_mode(False)
-
-        ##########################
-        # post process bones
-        enable_edit_mode(False)
-        for ms3d_joint_name, ms3d_joint in ms3d_joint_by_name.items():
-            blender_bone = blender_armature.bones.get(
-                    ms3d_joint.blender_bone_name)
-            if blender_bone is None:
-                continue
-
-            blender_bone.ms3d.name = ms3d_joint.name
-            blender_bone.ms3d.flags = Ms3dUi.flags_from_ms3d(ms3d_joint.flags)
-
-            ms3d_joint_ex = ms3d_joint.joint_ex_object
-            if ms3d_joint_ex is not None:
-                blender_bone.ms3d.color = ms3d_joint_ex.color
-
-            ms3d_comment = ms3d_joint.comment_object
-            if ms3d_comment is not None:
-                blender_bone.ms3d.comment = ms3d_comment.comment
-
-        ##########################
-        if not self.options.animation:
-            return blender_armature_object
-
-
-        ##########################
-        # process pose bones
-        enable_pose_mode(True)
-
-        blender_action = blender_context.blend_data.actions.new(ms3d_action_name)
-        if blender_armature_object.animation_data is None:
-            blender_armature_object.animation_data_create()
-        blender_armature_object.animation_data.action = blender_action
-
-        ##########################
-        # transition between keys may be incorrect
-        # because of the gimbal-lock problem!
-        # http://www.youtube.com/watch?v=zc8b2Jo7mno
-        # http://www.youtube.com/watch?v=rrUCBOlJdt4
-        # you can fix it manually by selecting the affected keyframes
-        # and allpy the following option to it:
-        # "Graph Editor -> Key -> Discontinuity (Euler) Filter"
-        # ==> "bpy.ops.graph.euler_filter()"
-        # but this option is only available for Euler rotation f-curves!
-        #
-        for ms3d_joint_name, ms3d_joint in ms3d_joint_by_name.items():
-            blender_pose_bone = blender_armature_object.pose.bones.get(
-                    ms3d_joint.blender_bone_name)
-            if blender_pose_bone is None:
-                continue
-
-            data_path = blender_pose_bone.path_from_id('location')
-            fcurve_location_x = blender_action.fcurves.new(data_path, index=0)
-            fcurve_location_y = blender_action.fcurves.new(data_path, index=1)
-            fcurve_location_z = blender_action.fcurves.new(data_path, index=2)
-            for translation_key_frames in ms3d_joint.translation_key_frames:
-                frame = (translation_key_frames.time * ms3d_model.animation_fps)
-                matrix_local = Matrix.Translation(
-                        Vector(translation_key_frames.position))
-                v = (matrix_local) * Vector()
-                fcurve_location_x.keyframe_points.insert(frame, -v[0])
-                fcurve_location_y.keyframe_points.insert(frame, v[2])
-                fcurve_location_z.keyframe_points.insert(frame, v[1])
-
-            if self.options.is_rotation_mode_quaternion:
-                blender_pose_bone.rotation_mode = 'QUATERNION'
-                data_path = blender_pose_bone.path_from_id("rotation_quaternion")
-                fcurve_rotation_w = blender_action.fcurves.new(data_path, index=0)
-                fcurve_rotation_x = blender_action.fcurves.new(data_path, index=1)
-                fcurve_rotation_y = blender_action.fcurves.new(data_path, index=2)
-                fcurve_rotation_z = blender_action.fcurves.new(data_path, index=3)
-                for rotation_key_frames in ms3d_joint.rotation_key_frames:
-                    frame = (rotation_key_frames.time * ms3d_model.animation_fps)
-                    matrix_local_rot = (
-                            Matrix.Rotation(rotation_key_frames.rotation[2], 4, 'Y')
-                            * Matrix.Rotation(rotation_key_frames.rotation[1], 4, 'Z')
-                            ) * Matrix.Rotation(-rotation_key_frames.rotation[0], 4, 'X')
-                    q = (matrix_local_rot).to_quaternion()
-                    fcurve_rotation_w.keyframe_points.insert(frame, q.w)
-                    fcurve_rotation_x.keyframe_points.insert(frame, q.x)
-                    fcurve_rotation_y.keyframe_points.insert(frame, q.y)
-                    fcurve_rotation_z.keyframe_points.insert(frame, q.z)
-            else:
-                blender_pose_bone.rotation_mode = 'XZY'
-                data_path = blender_pose_bone.path_from_id("rotation_euler")
-                fcurve_rotation_x = blender_action.fcurves.new(data_path, index=0)
-                fcurve_rotation_y = blender_action.fcurves.new(data_path, index=1)
-                fcurve_rotation_z = blender_action.fcurves.new(data_path, index=2)
-                for rotation_key_frames in ms3d_joint.rotation_key_frames:
-                    frame = (rotation_key_frames.time * ms3d_model.animation_fps)
-                    fcurve_rotation_x.keyframe_points.insert(frame, -rotation_key_frames.rotation[0])
-                    fcurve_rotation_y.keyframe_points.insert(frame, rotation_key_frames.rotation[2])
-                    fcurve_rotation_z.keyframe_points.insert(frame, rotation_key_frames.rotation[1])
-
-        enable_pose_mode(False)
-
-        return blender_armature_object
-
-
-    ###########################################################################
-    def geometry_correction(self, value):
-        return Vector((value[2], value[0], value[1]))
-
-
-    ###########################################################################
-    def build_ms3d_joint_dependency_order(self, ms3d_joints, ms3d_joints_ordered):
-        ms3d_joints_children = {"": {}}
-        for ms3d_joint in ms3d_joints:
-            if ms3d_joint.parent_name:
-                ms3d_joint_children = ms3d_joints_children.get(ms3d_joint.parent_name)
-                if ms3d_joint_children is None:
-                    ms3d_joint_children = ms3d_joints_children[ms3d_joint.parent_name] = {}
-            else:
-                ms3d_joint_children = ms3d_joints_children[""]
-
-            ms3d_joint_children[ms3d_joint.name] = ms3d_joint
-
-        self.traverse_dependencies(
-                ms3d_joints_ordered,
-                ms3d_joints_children,
-                "")
-
-
-        return ms3d_joints_ordered
-
-
-    ###########################################################################
-    def traverse_dependencies(self, ms3d_joints_ordered, ms3d_joints_children, key):
-        ms3d_joint_children = ms3d_joints_children.get(key)
-        if ms3d_joint_children:
-            for item in ms3d_joint_children.items():
-                ms3d_joint_name = item[0]
-                ms3d_joint = item[1]
-                ms3d_joints_ordered.append(ms3d_joint)
-                self.traverse_dependencies(
-                        ms3d_joints_ordered,
-                        ms3d_joints_children,
-                        ms3d_joint_name)
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_spec.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_spec.py
deleted file mode 100644
index b222711..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_spec.py
+++ /dev/null
@@ -1,2075 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-from struct import (
-        pack,
-        unpack,
-        )
-from sys import (
-        exc_info,
-        )
-from os import (
-        fstat,
-        )
-
-###############################################################################
-#
-# MilkShape 3D 1.8.5 File Format Specification
-#
-# all specifications were taken from SDK 1.8.5
-#
-# some additional specifications were taken from
-# MilkShape 3D Viewer v2.0 (Nov 06 2007) - msMesh.h
-#
-
-
-###############################################################################
-#
-# sizes
-#
-
-class Ms3dSpec:
-    ###########################################################################
-    #
-    # max values
-    #
-    MAX_VERTICES = 65534 # 0..65533; note: (65534???, 65535???)
-    MAX_TRIANGLES = 65534 # 0..65533; note: (65534???, 65535???)
-    MAX_GROUPS = 255 # 1..255; note: (0 default group)
-    MAX_MATERIALS = 128 # 0..127; note: (-1 no material)
-    MAX_JOINTS = 128 # 0..127; note: (-1 no joint)
-    MAX_SMOOTH_GROUP = 32 # 0..32; note: (0 no smoothing group)
-    MAX_TEXTURE_FILENAME_SIZE = 128
-
-    ###########################################################################
-    #
-    # flags
-    #
-    FLAG_NONE = 0
-    FLAG_SELECTED = 1
-    FLAG_HIDDEN = 2
-    FLAG_SELECTED2 = 4
-    FLAG_DIRTY = 8
-    FLAG_ISKEY = 16 # additional spec from [2]
-    FLAG_NEWLYCREATED = 32 # additional spec from [2]
-    FLAG_MARKED = 64 # additional spec from [2]
-
-    FLAG_TEXTURE_NONE = 0x00
-    FLAG_TEXTURE_COMBINE_ALPHA = 0x20
-    FLAG_TEXTURE_HAS_ALPHA = 0x40
-    FLAG_TEXTURE_SPHERE_MAP = 0x80
-
-    MODE_TRANSPARENCY_SIMPLE = 0
-    MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF = 1
-    MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES = 2
-
-
-    ###########################################################################
-    #
-    # values
-    #
-    HEADER = "MS3D000000"
-
-
-    ###########################################################################
-    #
-    # min, max, default values
-    #
-    NONE_VERTEX_BONE_ID = -1
-    NONE_GROUP_MATERIAL_INDEX = -1
-
-    DEFAULT_HEADER = HEADER
-    DEFAULT_HEADER_VERSION = 4
-    DEFAULT_VERTEX_BONE_ID = NONE_VERTEX_BONE_ID
-    DEFAULT_TRIANGLE_SMOOTHING_GROUP = 0
-    DEFAULT_TRIANGLE_GROUP = 0
-    DEFAULT_MATERIAL_MODE = FLAG_TEXTURE_NONE
-    DEFAULT_GROUP_MATERIAL_INDEX = NONE_GROUP_MATERIAL_INDEX
-    DEFAULT_MODEL_JOINT_SIZE = 1.0
-    DEFAULT_MODEL_TRANSPARENCY_MODE = MODE_TRANSPARENCY_SIMPLE
-    DEFAULT_MODEL_ANIMATION_FPS = 25.0
-    DEFAULT_MODEL_SUB_VERSION_COMMENTS = 1
-    DEFAULT_MODEL_SUB_VERSION_VERTEX_EXTRA = 2
-    DEFAULT_MODEL_SUB_VERSION_JOINT_EXTRA = 1
-    DEFAULT_MODEL_SUB_VERSION_MODEL_EXTRA = 1
-    DEFAULT_FLAGS = FLAG_NONE
-    MAX_MATERIAL_SHININESS = 128
-
-    # blender default / OpenGL default
-    DEFAULT_MATERIAL_AMBIENT = (0.2, 0.2, 0.2, 1.0)
-    DEFAULT_MATERIAL_DIFFUSE = (0.8, 0.8, 0.8, 1.0)
-    DEFAULT_MATERIAL_SPECULAR = (1.0, 1.0, 1.0, 1.0)
-    DEFAULT_MATERIAL_EMISSIVE = (0.0, 0.0, 0.0, 1.0)
-    DEFAULT_MATERIAL_SHININESS = 12.5
-    
-    DEFAULT_JOINT_COLOR = (0.8, 0.8, 0.8)
-
-###############################################################################
-#
-# helper class for basic raw io
-#
-class EOF(BaseException):
-    pass
-
-class Ms3dIo:
-    # sizes for IO
-    SIZE_BYTE = 1
-    SIZE_SBYTE = 1
-    SIZE_WORD = 2
-    SIZE_DWORD = 4
-    SIZE_FLOAT = 4
-    LENGTH_ID = 10
-    LENGTH_NAME = 32
-    LENGTH_FILENAME = 128
-
-    PRECISION = 4
-
-    @staticmethod
-    def raise_on_eof(file):
-        """ pseudo end of file detection """
-        fd = file.fileno()
-        stat = fstat(fd)
-        if file.tell() >= stat.st_size:
-            raise EOF()
-
-    @staticmethod
-    def read_byte(file):
-        """ read a single byte from file """
-        value = unpack('<B', file.read(Ms3dIo.SIZE_BYTE))[0]
-        return value
-
-    @staticmethod
-    def write_byte(file, value):
-        """ write a single byte to file """
-        file.write(pack('<B', value))
-
-    @staticmethod
-    def read_sbyte(file):
-        """ read a single signed byte from file """
-        value = unpack('<b', file.read(Ms3dIo.SIZE_SBYTE))[0]
-        return value
-
-    @staticmethod
-    def write_sbyte(file, value):
-        """ write a single signed byte to file """
-        file.write(pack('<b', value))
-
-    @staticmethod
-    def read_word(file):
-        """ read a word from file """
-        value = unpack('<H', file.read(Ms3dIo.SIZE_WORD))[0]
-        return value
-
-    @staticmethod
-    def write_word(file, value):
-        """ write a word to file """
-        file.write(pack('<H', value))
-
-    @staticmethod
-    def read_dword(file):
-        """ read a double word from file """
-        value = unpack('<I', file.read(Ms3dIo.SIZE_DWORD))[0]
-        return value
-
-    @staticmethod
-    def write_dword(file, value):
-        """ write a double word to file """
-        file.write(pack('<I', value))
-
-    @staticmethod
-    def read_float(file):
-        """ read a float from file """
-        value = unpack('<f', file.read(Ms3dIo.SIZE_FLOAT))[0]
-        return value
-
-    @staticmethod
-    def write_float(file, value):
-        """ write a float to file """
-        file.write(pack('<f', value))
-
-    @staticmethod
-    def read_array(file, itemReader, count):
-        """ read an array[count] of objects from file, by using a itemReader """
-        value = []
-        for i in range(count):
-            itemValue = itemReader(file)
-            value.append(itemValue)
-        return tuple(value)
-
-    @staticmethod
-    def write_array(file, itemWriter, count, value):
-        """ write an array[count] of objects to file, by using a itemWriter """
-        for i in range(count):
-            itemValue = value[i]
-            itemWriter(file, itemValue)
-
-    @staticmethod
-    def read_array2(file, itemReader, count, count2):
-        """ read an array[count][count2] of objects from file,
-            by using a itemReader """
-        value = []
-        for i in range(count):
-            itemValue = Ms3dIo.read_array(file, itemReader, count2)
-            value.append(tuple(itemValue))
-        return value
-
-    @staticmethod
-    def write_array2(file, itemWriter, count, count2, value):
-        """ write an array[count][count2] of objects to file,
-            by using a itemWriter """
-        for i in range(count):
-            itemValue = value[i]
-            Ms3dIo.write_array(file, itemWriter, count2, itemValue)
-
-    @staticmethod
-    def read_string(file, length):
-        """ read a string of a specific length from file """
-        value = []
-        skip = False
-        for i in range(length):
-            raw = unpack('<b', file.read(Ms3dIo.SIZE_SBYTE))[0]
-            if (raw >= 32) & (raw <= 255):
-                pass
-            else:
-                if (raw == 0):
-                    raw = 0
-                    skip = True
-                else:
-                    raw = 32
-
-            c = chr(raw)
-
-            if (not skip):
-                value.append(c)
-
-        finalValue = "".join(value)
-        return finalValue
-
-    @staticmethod
-    def write_string(file, length, value):
-        """ write a string of a specific length to file """
-        l = len(value)
-        for i in range(length):
-            if(i < l):
-                c = value[i]
-
-                if (isinstance(c, str)):
-                    c = c[0]
-                    raw = ord(c)
-                elif (isinstance(c, int)):
-                    raw = c
-                else:
-                    pass
-            else:
-                raw = 0
-
-            file.write(pack('<b', raw % 256))
-
-
-###############################################################################
-#
-# multi complex types
-#
-
-###############################################################################
-class Ms3dHeader:
-    """ Ms3dHeader """
-    __slots__ = (
-            'id',
-            'version',
-            )
-
-    def __init__(
-            self,
-            default_id=Ms3dSpec.DEFAULT_HEADER,
-            default_version=Ms3dSpec.DEFAULT_HEADER_VERSION
-            ):
-        self.id = default_id
-        self.version = default_version
-
-    def __repr__(self):
-        return "\n<id='{}', version={}>".format(
-            self.id,
-            self.version
-            )
-
-    def __hash__(self):
-        return hash(self.id) ^ hash(self.version)
-
-    def __eq__(self, other):
-        return ((self is not None) and (other is not None)
-                and (self.id == other.id)
-                and (self.version == other.version))
-
-    def read(self, file):
-        self.id = Ms3dIo.read_string(file, Ms3dIo.LENGTH_ID)
-        self.version = Ms3dIo.read_dword(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_ID, self.id)
-        Ms3dIo.write_dword(file, self.version)
-
-
-###############################################################################
-class Ms3dVertex:
-    """ Ms3dVertex """
-    """
-    __slots__ was taking out,
-    to be able to inject additional attributes during runtime
-    __slots__ = (
-            'flags',
-            'bone_id',
-            'reference_count',
-            '_vertex',
-            '_vertex_ex_object', # Ms3dVertexEx
-            )
-    """
-
-    def __init__(
-            self,
-            default_flags=Ms3dSpec.DEFAULT_FLAGS,
-            default_vertex=(0.0, 0.0, 0.0),
-            default_bone_id=Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-            default_reference_count=0,
-            default_vertex_ex_object=None, # Ms3dVertexEx
-            ):
-        self.flags = default_flags
-        self._vertex = default_vertex
-        self.bone_id = default_bone_id
-        self.reference_count = default_reference_count
-
-        if default_vertex_ex_object is None:
-            default_vertex_ex_object = Ms3dVertexEx2()
-            # Ms3dSpec.DEFAULT_MODEL_SUB_VERSION_VERTEX_EXTRA = 2
-        self._vertex_ex_object = default_vertex_ex_object
-        # Ms3dVertexEx
-
-    def __repr__(self):
-        return "\n<flags={}, vertex=({:.{p}f}, {:.{p}f}, {:.{p}f}), bone_id={},"\
-                " reference_count={}>".format(
-                self.flags,
-                self._vertex[0],
-                self._vertex[1],
-                self._vertex[2],
-                self.bone_id,
-                self.reference_count,
-                p=Ms3dIo.PRECISION
-                )
-
-    def __hash__(self):
-        return (hash(self.vertex)
-                #^ hash(self.flags)
-                #^ hash(self.bone_id)
-                #^ hash(self.reference_count)
-                )
-
-    def __eq__(self, other):
-        return ((self.vertex == other.vertex)
-                #and (self.flags == other.flags)
-                #and (self.bone_id == other.bone_id)
-                #and (self.reference_count == other.reference_count)
-                )
-
-
-    @property
-    def vertex(self):
-        return self._vertex
-
-    @property
-    def vertex_ex_object(self):
-        return self._vertex_ex_object
-
-
-    def read(self, file):
-        self.flags = Ms3dIo.read_byte(file)
-        self._vertex = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        self.bone_id = Ms3dIo.read_sbyte(file)
-        self.reference_count = Ms3dIo.read_byte(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_byte(file, self.flags)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.vertex)
-        Ms3dIo.write_sbyte(file, self.bone_id)
-        Ms3dIo.write_byte(file, self.reference_count)
-
-
-###############################################################################
-class Ms3dTriangle:
-    """ Ms3dTriangle """
-    """
-    __slots__ was taking out,
-    to be able to inject additional attributes during runtime
-    __slots__ = (
-            'flags',
-            'smoothing_group',
-            'group_index',
-            '_vertex_indices',
-            '_vertex_normals',
-            '_s',
-            '_t',
-            )
-    """
-
-    def __init__(
-            self,
-            default_flags=Ms3dSpec.DEFAULT_FLAGS,
-            default_vertex_indices=(0, 0, 0),
-            default_vertex_normals=(
-                    (0.0, 0.0, 0.0),
-                    (0.0, 0.0, 0.0),
-                    (0.0, 0.0, 0.0)),
-            default_s=(0.0, 0.0, 0.0),
-            default_t=(0.0, 0.0, 0.0),
-            default_smoothing_group=Ms3dSpec.DEFAULT_TRIANGLE_SMOOTHING_GROUP,
-            default_group_index=Ms3dSpec.DEFAULT_TRIANGLE_GROUP
-            ):
-        self.flags = default_flags
-        self._vertex_indices = default_vertex_indices
-        self._vertex_normals = default_vertex_normals
-        self._s = default_s
-        self._t = default_t
-        self.smoothing_group = default_smoothing_group
-        self.group_index = default_group_index
-
-    def __repr__(self):
-        return "\n<flags={}, vertex_indices={}, vertex_normals=(({:.{p}f}, "\
-                "{:.{p}f}, {:.{p}f}), ({:.{p}f}, {:.{p}f}, {:.{p}f}), ({:.{p}f}, "\
-                "{:.{p}f}, {:.{p}f})), s=({:.{p}f}, {:.{p}f}, {:.{p}f}), "\
-                "t=({:.{p}f}, {:.{p}f}, {:.{p}f}), smoothing_group={}, "\
-                "group_index={}>".format(
-                self.flags,
-                self.vertex_indices,
-                self.vertex_normals[0][0],
-                self.vertex_normals[0][1],
-                self.vertex_normals[0][2],
-                self.vertex_normals[1][0],
-                self.vertex_normals[1][1],
-                self.vertex_normals[1][2],
-                self.vertex_normals[2][0],
-                self.vertex_normals[2][1],
-                self.vertex_normals[2][2],
-                self.s[0],
-                self.s[1],
-                self.s[2],
-                self.t[0],
-                self.t[1],
-                self.t[2],
-                self.smoothing_group,
-                self.group_index,
-                p=Ms3dIo.PRECISION
-                )
-
-
-    @property
-    def vertex_indices(self):
-        return self._vertex_indices
-
-    @property
-    def vertex_normals(self):
-        return self._vertex_normals
-
-    @property
-    def s(self):
-        return self._s
-
-    @property
-    def t(self):
-        return self._t
-
-
-    def read(self, file):
-        self.flags = Ms3dIo.read_word(file)
-        self._vertex_indices = Ms3dIo.read_array(file, Ms3dIo.read_word, 3)
-        self._vertex_normals = Ms3dIo.read_array2(file, Ms3dIo.read_float, 3, 3)
-        self._s = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        self._t = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        self.smoothing_group = Ms3dIo.read_byte(file)
-        self.group_index = Ms3dIo.read_byte(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_word(file, self.flags)
-        Ms3dIo.write_array(file, Ms3dIo.write_word, 3, self.vertex_indices)
-        Ms3dIo.write_array2(file, Ms3dIo.write_float, 3, 3, self.vertex_normals)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.s)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.t)
-        Ms3dIo.write_byte(file, self.smoothing_group)
-        Ms3dIo.write_byte(file, self.group_index)
-
-
-###############################################################################
-class Ms3dGroup:
-    """ Ms3dGroup """
-    """
-    __slots__ was taking out,
-    to be able to inject additional attributes during runtime
-    __slots__ = (
-            'flags',
-            'name',
-            'material_index',
-            '_triangle_indices',
-            '_comment_object', # Ms3dComment
-            )
-    """
-
-    def __init__(
-            self,
-            default_flags=Ms3dSpec.DEFAULT_FLAGS,
-            default_name="",
-            default_triangle_indices=None,
-            default_material_index=Ms3dSpec.DEFAULT_GROUP_MATERIAL_INDEX,
-            default_comment_object=None, # Ms3dComment
-            ):
-        if (default_name is None):
-            default_name = ""
-
-        if (default_triangle_indices is None):
-            default_triangle_indices = []
-
-        self.flags = default_flags
-        self.name = default_name
-        self._triangle_indices = default_triangle_indices
-        self.material_index = default_material_index
-
-        if default_comment_object is None:
-            default_comment_object = Ms3dCommentEx()
-        self._comment_object = default_comment_object # Ms3dComment
-
-    def __repr__(self):
-        return "\n<flags={}, name='{}', number_triangles={},"\
-                " triangle_indices={}, material_index={}>".format(
-                self.flags,
-                self.name,
-                self.number_triangles,
-                self.triangle_indices,
-                self.material_index
-                )
-
-
-    @property
-    def number_triangles(self):
-        if self.triangle_indices is None:
-            return 0
-        return len(self.triangle_indices)
-
-    @property
-    def triangle_indices(self):
-        return self._triangle_indices
-
-    @property
-    def comment_object(self):
-        return self._comment_object
-
-
-    def read(self, file):
-        self.flags = Ms3dIo.read_byte(file)
-        self.name = Ms3dIo.read_string(file, Ms3dIo.LENGTH_NAME)
-        _number_triangles = Ms3dIo.read_word(file)
-        self._triangle_indices = Ms3dIo.read_array(
-                file, Ms3dIo.read_word, _number_triangles)
-        self.material_index = Ms3dIo.read_sbyte(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_byte(file, self.flags)
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_NAME, self.name)
-        Ms3dIo.write_word(file, self.number_triangles)
-        Ms3dIo.write_array(
-                file, Ms3dIo.write_word, self.number_triangles,
-                self.triangle_indices)
-        Ms3dIo.write_sbyte(file, self.material_index)
-
-
-###############################################################################
-class Ms3dMaterial:
-    """ Ms3dMaterial """
-    """
-    __slots__ was taking out,
-    to be able to inject additional attributes during runtime
-    __slots__ = (
-            'name',
-            'shininess',
-            'transparency',
-            'mode',
-            'texture',
-            'alphamap',
-            '_ambient',
-            '_diffuse',
-            '_specular',
-            '_emissive',
-            '_comment_object', # Ms3dComment
-            )
-    """
-
-    def __init__(
-            self,
-            default_name="",
-            default_ambient=list(Ms3dSpec.DEFAULT_MATERIAL_AMBIENT),
-            default_diffuse=list(Ms3dSpec.DEFAULT_MATERIAL_DIFFUSE),
-            default_specular=list(Ms3dSpec.DEFAULT_MATERIAL_SPECULAR),
-            default_emissive=list(Ms3dSpec.DEFAULT_MATERIAL_EMISSIVE),
-            default_shininess=Ms3dSpec.DEFAULT_MATERIAL_SHININESS,
-            default_transparency=0.0,
-            default_mode=Ms3dSpec.DEFAULT_MATERIAL_MODE,
-            default_texture="",
-            default_alphamap="",
-            default_comment_object=None, # Ms3dComment
-            ):
-        if (default_name is None):
-            default_name = ""
-
-        if (default_texture is None):
-            default_texture = ""
-
-        if (default_alphamap is None):
-            default_alphamap = ""
-
-        self.name = default_name
-        self._ambient = default_ambient
-        self._diffuse = default_diffuse
-        self._specular = default_specular
-        self._emissive = default_emissive
-        self.shininess = default_shininess
-        self.transparency = default_transparency
-        self.mode = default_mode
-        self.texture = default_texture
-        self.alphamap = default_alphamap
-
-        if default_comment_object is None:
-            default_comment_object = Ms3dCommentEx()
-        self._comment_object = default_comment_object # Ms3dComment
-
-    def __repr__(self):
-        return "\n<name='{}', ambient=({:.{p}f}, {:.{p}f}, {:.{p}f}, {:.{p}f}), "\
-                "diffuse=({:.{p}f}, {:.{p}f}, {:.{p}f}, {:.{p}f}), specular=("\
-                "{:.{p}f}, {:.{p}f}, {:.{p}f}, {:.{p}f}), emissive=({:.{p}f}, "\
-                "{:.{p}f}, {:.{p}f}, {:.{p}f}), shininess={:.{p}f}, transparency="\
-                "{:.{p}f}, mode={}, texture='{}', alphamap='{}'>".format(
-                self.name,
-                self.ambient[0],
-                self.ambient[1],
-                self.ambient[2],
-                self.ambient[3],
-                self.diffuse[0],
-                self.diffuse[1],
-                self.diffuse[2],
-                self.diffuse[3],
-                self.specular[0],
-                self.specular[1],
-                self.specular[2],
-                self.specular[3],
-                self.emissive[0],
-                self.emissive[1],
-                self.emissive[2],
-                self.emissive[3],
-                self.shininess,
-                self.transparency,
-                self.mode,
-                self.texture,
-                self.alphamap,
-                p=Ms3dIo.PRECISION
-                )
-
-    def __hash__(self):
-        return (hash(self.name)
-
-                ^ hash(self.ambient)
-                ^ hash(self.diffuse)
-                ^ hash(self.specular)
-                ^ hash(self.emissive)
-
-                ^ hash(self.shininess)
-                ^ hash(self.transparency)
-                ^ hash(self.mode)
-
-                ^ hash(self.texture)
-                ^ hash(self.alphamap)
-                )
-
-    def __eq__(self, other):
-        return ((self.name == other.name)
-
-                and (self.ambient == other.ambient)
-                and (self.diffuse == other.diffuse)
-                and (self.specular == other.specular)
-                and (self.emissive == other.emissive)
-
-                and (self.shininess == other.shininess)
-                and (self.transparency == other.transparency)
-                and (self.mode == other.mode)
-
-                #and (self.texture == other.texture)
-                #and (self.alphamap == other.alphamap)
-                )
-
-
-    @property
-    def ambient(self):
-        return self._ambient
-
-    @property
-    def diffuse(self):
-        return self._diffuse
-
-    @property
-    def specular(self):
-        return self._specular
-
-    @property
-    def emissive(self):
-        return self._emissive
-
-    @property
-    def comment_object(self):
-        return self._comment_object
-
-
-    def read(self, file):
-        self.name = Ms3dIo.read_string(file, Ms3dIo.LENGTH_NAME)
-        self._ambient = Ms3dIo.read_array(file, Ms3dIo.read_float, 4)
-        self._diffuse = Ms3dIo.read_array(file, Ms3dIo.read_float, 4)
-        self._specular = Ms3dIo.read_array(file, Ms3dIo.read_float, 4)
-        self._emissive = Ms3dIo.read_array(file, Ms3dIo.read_float, 4)
-        self.shininess = Ms3dIo.read_float(file)
-        self.transparency = Ms3dIo.read_float(file)
-        self.mode = Ms3dIo.read_sbyte(file)
-        self.texture = Ms3dIo.read_string(file, Ms3dIo.LENGTH_FILENAME)
-        self.alphamap = Ms3dIo.read_string(file, Ms3dIo.LENGTH_FILENAME)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_NAME, self.name)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 4, self.ambient)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 4, self.diffuse)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 4, self.specular)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 4, self.emissive)
-        Ms3dIo.write_float(file, self.shininess)
-        Ms3dIo.write_float(file, self.transparency)
-        Ms3dIo.write_sbyte(file, self.mode)
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_FILENAME, self.texture)
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_FILENAME, self.alphamap)
-
-
-###############################################################################
-class Ms3dRotationKeyframe:
-    """ Ms3dRotationKeyframe """
-    __slots__ = (
-            'time',
-            '_rotation',
-            )
-
-    def __init__(
-            self,
-            default_time=0.0,
-            default_rotation=(0.0, 0.0, 0.0)
-            ):
-        self.time = default_time
-        self._rotation = default_rotation
-
-    def __repr__(self):
-        return "\n<time={:.{p}f}, rotation=({:.{p}f}, {:.{p}f}, {:.{p}f})>".format(
-                self.time,
-                self.rotation[0],
-                self.rotation[1],
-                self.rotation[2],
-                p=Ms3dIo.PRECISION
-                )
-
-
-    @property
-    def rotation(self):
-        return self._rotation
-
-
-    def read(self, file):
-        self.time = Ms3dIo.read_float(file)
-        self._rotation = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_float(file, self.time)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.rotation)
-
-
-###############################################################################
-class Ms3dTranslationKeyframe:
-    """ Ms3dTranslationKeyframe """
-    __slots__ = (
-            'time',
-            '_position',
-            )
-
-    def __init__(
-            self,
-            default_time=0.0,
-            default_position=(0.0, 0.0, 0.0)
-            ):
-        self.time = default_time
-        self._position = default_position
-
-    def __repr__(self):
-        return "\n<time={:.{p}f}, position=({:.{p}f}, {:.{p}f}, {:.{p}f})>".format(
-                self.time,
-                self.position[0],
-                self.position[1],
-                self.position[2],
-                p=Ms3dIo.PRECISION
-                )
-
-
-    @property
-    def position(self):
-        return self._position
-
-
-    def read(self, file):
-        self.time = Ms3dIo.read_float(file)
-        self._position = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_float(file, self.time)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.position)
-
-
-###############################################################################
-class Ms3dJoint:
-    """ Ms3dJoint """
-    """
-    __slots__ was taking out,
-    to be able to inject additional attributes during runtime
-    __slots__ = (
-            'flags',
-            'name',
-            'parent_name',
-            '_rotation',
-            '_position',
-            '_rotation_keyframes',
-            '_translation_keyframes',
-            '_joint_ex_object', # Ms3dJointEx
-            '_comment_object', # Ms3dComment
-            )
-    """
-
-    def __init__(
-            self,
-            default_flags=Ms3dSpec.DEFAULT_FLAGS,
-            default_name="",
-            default_parent_name="",
-            default_rotation=(0.0, 0.0, 0.0),
-            default_position=(0.0, 0.0, 0.0),
-            default_rotation_keyframes=None,
-            default_translation_keyframes=None,
-            default_joint_ex_object=None, # Ms3dJointEx
-            default_comment_object=None, # Ms3dComment
-            ):
-        if (default_name is None):
-            default_name = ""
-
-        if (default_parent_name is None):
-            default_parent_name = ""
-
-        if (default_rotation_keyframes is None):
-            default_rotation_keyframes = [] #Ms3dRotationKeyframe()
-
-        if (default_translation_keyframes is None):
-            default_translation_keyframes = [] #Ms3dTranslationKeyframe()
-
-        self.flags = default_flags
-        self.name = default_name
-        self.parent_name = default_parent_name
-        self._rotation = default_rotation
-        self._position = default_position
-        self._rotation_keyframes = default_rotation_keyframes
-        self._translation_keyframes = default_translation_keyframes
-
-        if default_comment_object is None:
-            default_comment_object = Ms3dCommentEx()
-        self._comment_object = default_comment_object # Ms3dComment
-
-        if default_joint_ex_object is None:
-            default_joint_ex_object = Ms3dJointEx()
-        self._joint_ex_object = default_joint_ex_object # Ms3dJointEx
-
-    def __repr__(self):
-        return "\n<flags={}, name='{}', parent_name='{}', rotation=({:.{p}f}, "\
-                "{:.{p}f}, {:.{p}f}), position=({:.{p}f}, {:.{p}f}, {:.{p}f}), "\
-                "number_rotation_keyframes={}, number_translation_keyframes={},"\
-                " rotation_key_frames={}, translation_key_frames={}>".format(
-                self.flags,
-                self.name,
-                self.parent_name,
-                self.rotation[0],
-                self.rotation[1],
-                self.rotation[2],
-                self.position[0],
-                self.position[1],
-                self.position[2],
-                self.number_rotation_keyframes,
-                self.number_translation_keyframes,
-                self.rotation_key_frames,
-                self.translation_key_frames,
-                p=Ms3dIo.PRECISION
-                )
-
-
-    @property
-    def rotation(self):
-        return self._rotation
-
-    @property
-    def position(self):
-        return self._position
-
-    @property
-    def number_rotation_keyframes(self):
-        if self.rotation_key_frames is None:
-            return 0
-        return len(self.rotation_key_frames)
-
-    @property
-    def number_translation_keyframes(self):
-        if self.translation_key_frames is None:
-            return 0
-        return len(self.translation_key_frames)
-
-    @property
-    def rotation_key_frames(self):
-        return self._rotation_keyframes
-
-    @property
-    def translation_key_frames(self):
-        return self._translation_keyframes
-
-
-    @property
-    def joint_ex_object(self):
-        return self._joint_ex_object
-
-
-    @property
-    def comment_object(self):
-        return self._comment_object
-
-
-    def read(self, file):
-        self.flags = Ms3dIo.read_byte(file)
-        self.name = Ms3dIo.read_string(file, Ms3dIo.LENGTH_NAME)
-        self.parent_name = Ms3dIo.read_string(file, Ms3dIo.LENGTH_NAME)
-        self._rotation = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        self._position = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        _number_rotation_keyframes = Ms3dIo.read_word(file)
-        _number_translation_keyframes = Ms3dIo.read_word(file)
-        self._rotation_keyframes = []
-        for i in range(_number_rotation_keyframes):
-            self.rotation_key_frames.append(Ms3dRotationKeyframe().read(file))
-        self._translation_keyframes = []
-        for i in range(_number_translation_keyframes):
-            self.translation_key_frames.append(
-                    Ms3dTranslationKeyframe().read(file))
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_byte(file, self.flags)
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_NAME, self.name)
-        Ms3dIo.write_string(file, Ms3dIo.LENGTH_NAME, self.parent_name)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.rotation)
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.position)
-        Ms3dIo.write_word(file, self.number_rotation_keyframes)
-        Ms3dIo.write_word(file, self.number_translation_keyframes)
-        for i in range(self.number_rotation_keyframes):
-            self.rotation_key_frames[i].write(file)
-        for i in range(self.number_translation_keyframes):
-            self.translation_key_frames[i].write(file)
-
-
-###############################################################################
-class Ms3dCommentEx:
-    """ Ms3dCommentEx """
-    __slots__ = (
-            'index',
-            'comment',
-            )
-
-    def __init__(
-            self,
-            default_index=0,
-            default_comment=""
-            ):
-        if (default_comment is None):
-            default_comment = ""
-
-        self.index = default_index
-        self.comment = default_comment
-
-    def __repr__(self):
-        return "\n<index={}, comment_length={}, comment='{}'>".format(
-                self.index,
-                self.comment_length,
-                self.comment
-                )
-
-
-    @property
-    def comment_length(self):
-        if self.comment is None:
-            return 0
-        return len(self.comment)
-
-
-    def read(self, file):
-        self.index = Ms3dIo.read_dword(file)
-        _comment_length = Ms3dIo.read_dword(file)
-        self.comment = Ms3dIo.read_string(file, _comment_length)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_dword(file, self.index)
-        Ms3dIo.write_dword(file, self.comment_length)
-        Ms3dIo.write_string(file, self.comment_length, self.comment)
-
-
-###############################################################################
-class Ms3dComment:
-    """ Ms3dComment """
-    __slots__ = (
-            'comment',
-            )
-
-    def __init__(
-            self,
-            default_comment=""
-            ):
-        if (default_comment is None):
-            default_comment = ""
-
-        self.comment = default_comment
-
-    def __repr__(self):
-        return "\n<comment_length={}, comment='{}'>".format(
-                self.comment_length,
-                self.comment
-                )
-
-
-    @property
-    def comment_length(self):
-        if self.comment is None:
-            return 0
-        return len(self.comment)
-
-
-    def read(self, file):
-        _comment_length = Ms3dIo.read_dword(file)
-        self.comment = Ms3dIo.read_string(file, _comment_length)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_dword(file, self.comment_length)
-        Ms3dIo.write_string(file, self.comment_length, self.comment)
-
-
-###############################################################################
-class Ms3dVertexEx1:
-    """ Ms3dVertexEx1 """
-    __slots__ = (
-            '_bone_ids',
-            '_weights',
-            )
-
-    def __init__(
-            self,
-            default_bone_ids=(
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID),
-            default_weights=(100, 0, 0)
-            ):
-        self._bone_ids = default_bone_ids
-        self._weights = default_weights
-
-    def __repr__(self):
-        return "\n<bone_ids={}, weights={}>".format(
-                self.bone_ids,
-                self.weights
-                )
-
-
-    @property
-    def bone_ids(self):
-        return self._bone_ids
-
-    @property
-    def weights(self):
-        return self._weights
-
-
-    @property
-    def weight_bone_id(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights
-        return 100
-
-    @property
-    def weight_bone_id0(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[0]
-        return 0
-
-    @property
-    def weight_bone_id1(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[1]
-        return 0
-
-    @property
-    def weight_bone_id2(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return 100 - (self._weights[0] + self._weights[1] \
-                    + self._weights[2])
-        return 0
-
-
-    def read(self, file):
-        self._bone_ids = Ms3dIo.read_array(file, Ms3dIo.read_sbyte, 3)
-        self._weights = Ms3dIo.read_array(file, Ms3dIo.read_byte, 3)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_array(file, Ms3dIo.write_sbyte, 3, self.bone_ids)
-        Ms3dIo.write_array(file, Ms3dIo.write_byte, 3, self.weights)
-
-
-###############################################################################
-class Ms3dVertexEx2:
-    """ Ms3dVertexEx2 """
-    __slots__ = (
-            'extra',
-            '_bone_ids',
-            '_weights',
-            )
-
-    def __init__(
-            self,
-            default_bone_ids=(
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID),
-            default_weights=(100, 0, 0),
-            default_extra=0
-            ):
-        self._bone_ids = default_bone_ids
-        self._weights = default_weights
-        self.extra = default_extra
-
-    def __repr__(self):
-        return "\n<bone_ids={}, weights={}, extra={}>".format(
-                self.bone_ids,
-                self.weights,
-                self.extra
-                )
-
-
-    @property
-    def bone_ids(self):
-        return self._bone_ids
-
-    @property
-    def weights(self):
-        return self._weights
-
-
-    @property
-    def weight_bone_id(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights
-        return 100
-
-    @property
-    def weight_bone_id0(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[0]
-        return 0
-
-    @property
-    def weight_bone_id1(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[1]
-        return 0
-
-    @property
-    def weight_bone_id2(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return 100 - (self._weights[0] + self._weights[1] \
-                    + self._weights[2])
-        return 0
-
-
-    def read(self, file):
-        self._bone_ids = Ms3dIo.read_array(file, Ms3dIo.read_sbyte, 3)
-        self._weights = Ms3dIo.read_array(file, Ms3dIo.read_byte, 3)
-        self.extra = Ms3dIo.read_dword(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_array(file, Ms3dIo.write_sbyte, 3, self.bone_ids)
-        Ms3dIo.write_array(file, Ms3dIo.write_byte, 3, self.weights)
-        Ms3dIo.write_dword(file, self.extra)
-
-
-###############################################################################
-class Ms3dVertexEx3:
-    """ Ms3dVertexEx3 """
-    #char bone_ids[3]; // index of joint or -1, if -1, then that weight is
-    #    ignored, since subVersion 1
-    #byte weights[3]; // vertex weight ranging from 0 - 100, last weight is
-    #    computed by 1.0 - sum(all weights), since subVersion 1
-    #// weight[0] is the weight for bone_id in Ms3dVertex
-    #// weight[1] is the weight for bone_ids[0]
-    #// weight[2] is the weight for bone_ids[1]
-    #// 1.0f - weight[0] - weight[1] - weight[2] is the weight for bone_ids[2]
-    #unsigned int extra; // vertex extra, which can be used as color or
-    #    anything else, since subVersion 2
-    __slots__ = (
-            'extra',
-            '_bone_ids',
-            '_weights',
-            )
-
-    def __init__(
-            self,
-            default_bone_ids=(
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID,
-                    Ms3dSpec.DEFAULT_VERTEX_BONE_ID),
-            default_weights=(100, 0, 0),
-            default_extra=0
-            ):
-        self._bone_ids = default_bone_ids
-        self._weights = default_weights
-        self.extra = default_extra
-
-    def __repr__(self):
-        return "\n<bone_ids={}, weights={}, extra={}>".format(
-                self.bone_ids,
-                self.weights,
-                self.extra
-                )
-
-
-    @property
-    def bone_ids(self):
-        return self._bone_ids
-
-    @property
-    def weights(self):
-        return self._weights
-
-
-    @property
-    def weight_bone_id(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights
-        return 100
-
-    @property
-    def weight_bone_id0(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[0]
-        return 0
-
-    @property
-    def weight_bone_id1(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return self._weights[1]
-        return 0
-
-    @property
-    def weight_bone_id2(self):
-        if self._weights[0] or self._weights[1] or self._weights[2]:
-            return 100 - (self._weights[0] + self._weights[1] \
-                    + self._weights[2])
-        return 0
-
-
-    def read(self, file):
-        self._bone_ids = Ms3dIo.read_array(file, Ms3dIo.read_sbyte, 3)
-        self._weights = Ms3dIo.read_array(file, Ms3dIo.read_byte, 3)
-        self.extra = Ms3dIo.read_dword(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_array(file, Ms3dIo.write_sbyte, 3, self.bone_ids)
-        Ms3dIo.write_array(file, Ms3dIo.write_byte, 3, self.weights)
-        Ms3dIo.write_dword(file, self.extra)
-
-
-###############################################################################
-class Ms3dJointEx:
-    """ Ms3dJointEx """
-    __slots__ = (
-            '_color',
-            )
-
-    def __init__(
-            self,
-            default_color=Ms3dSpec.DEFAULT_JOINT_COLOR
-            ):
-        self._color = default_color
-
-    def __repr__(self):
-        return "\n<color=({:.{p}f}, {:.{p}f}, {:.{p}f})>".format(
-                self.color[0],
-                self.color[1],
-                self.color[2],
-                p=Ms3dIo.PRECISION
-                )
-
-
-    @property
-    def color(self):
-        return self._color
-
-
-    def read(self, file):
-        self._color = Ms3dIo.read_array(file, Ms3dIo.read_float, 3)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_array(file, Ms3dIo.write_float, 3, self.color)
-
-
-###############################################################################
-class Ms3dModelEx:
-    """ Ms3dModelEx """
-    __slots__ = (
-            'joint_size',
-            'transparency_mode',
-            'alpha_ref',
-            )
-
-    def __init__(
-            self,
-            default_joint_size=Ms3dSpec.DEFAULT_MODEL_JOINT_SIZE,
-            default_transparency_mode\
-                    =Ms3dSpec.DEFAULT_MODEL_TRANSPARENCY_MODE,
-            default_alpha_ref=0.0
-            ):
-        self.joint_size = default_joint_size
-        self.transparency_mode = default_transparency_mode
-        self.alpha_ref = default_alpha_ref
-
-    def __repr__(self):
-        return "\n<joint_size={:.{p}f}, transparency_mode={}, alpha_ref={:.{p}f}>".format(
-                self.joint_size,
-                self.transparency_mode,
-                self.alpha_ref,
-                p=Ms3dIo.PRECISION
-                )
-
-    def read(self, file):
-        self.joint_size = Ms3dIo.read_float(file)
-        self.transparency_mode = Ms3dIo.read_dword(file)
-        self.alpha_ref = Ms3dIo.read_float(file)
-        return self
-
-    def write(self, file):
-        Ms3dIo.write_float(file, self.joint_size)
-        Ms3dIo.write_dword(file, self.transparency_mode)
-        Ms3dIo.write_float(file, self.alpha_ref)
-
-
-###############################################################################
-#
-# file format
-#
-###############################################################################
-class Ms3dModel:
-    """ Ms3dModel """
-    __slot__ = (
-            'header',
-            'animation_fps',
-            'current_time',
-            'number_total_frames',
-            'sub_version_comments',
-            'sub_version_vertex_extra',
-            'sub_version_joint_extra',
-            'sub_version_model_extra',
-            'name',
-            '_vertices',
-            '_triangles',
-            '_groups',
-            '_materials',
-            '_joints',
-            '_has_model_comment',
-            '_comment_object', # Ms3dComment
-            '_model_ex_object', # Ms3dModelEx
-            )
-
-    def __init__(
-            self,
-            default_name=""
-            ):
-        if (default_name is None):
-            default_name = ""
-
-        self.name = default_name
-
-        self.animation_fps = Ms3dSpec.DEFAULT_MODEL_ANIMATION_FPS
-        self.current_time = 0.0
-        self.number_total_frames = 0
-        self.sub_version_comments \
-                = Ms3dSpec.DEFAULT_MODEL_SUB_VERSION_COMMENTS
-        self.sub_version_vertex_extra \
-                = Ms3dSpec.DEFAULT_MODEL_SUB_VERSION_VERTEX_EXTRA
-        self.sub_version_joint_extra \
-                = Ms3dSpec.DEFAULT_MODEL_SUB_VERSION_JOINT_EXTRA
-        self.sub_version_model_extra \
-                = Ms3dSpec.DEFAULT_MODEL_SUB_VERSION_MODEL_EXTRA
-
-        self._vertices = [] #Ms3dVertex()
-        self._triangles = [] #Ms3dTriangle()
-        self._groups = [] #Ms3dGroup()
-        self._materials = [] #Ms3dMaterial()
-        self._joints = [] #Ms3dJoint()
-
-        self.header = Ms3dHeader()
-        self._model_ex_object = Ms3dModelEx()
-        self._comment_object = None #Ms3dComment()
-
-
-    @property
-    def number_vertices(self):
-        if self.vertices is None:
-            return 0
-        return len(self.vertices)
-
-    @property
-    def vertices(self):
-        return self._vertices
-
-
-    @property
-    def number_triangles(self):
-        if self.triangles is None:
-            return 0
-        return len(self.triangles)
-
-    @property
-    def triangles(self):
-        return self._triangles
-
-
-    @property
-    def number_groups(self):
-        if self.groups is None:
-            return 0
-        return len(self.groups)
-
-    @property
-    def groups(self):
-        return self._groups
-
-
-    @property
-    def number_materials(self):
-        if self.materials is None:
-            return 0
-        return len(self.materials)
-
-    @property
-    def materials(self):
-        return self._materials
-
-
-    @property
-    def number_joints(self):
-        if self.joints is None:
-            return 0
-        return len(self.joints)
-
-    @property
-    def joints(self):
-        return self._joints
-
-
-    @property
-    def number_group_comments(self):
-        if self.groups is None:
-            return 0
-        number = 0
-        for item in self.groups:
-            if item.comment_object is not None and item.comment_object.comment:
-                number += 1
-        return number
-
-    @property
-    def group_comments(self):
-        if self.groups is None:
-            return None
-        items = []
-        for item in self.groups:
-            if item.comment_object is not None and item.comment_object.comment:
-                items.append(item)
-        return items
-
-
-    @property
-    def number_material_comments(self):
-        if self.materials is None:
-            return 0
-        number = 0
-        for item in self.materials:
-            if item.comment_object is not None and item.comment_object.comment:
-                number += 1
-        return number
-
-    @property
-    def material_comments(self):
-        if self.materials is None:
-            return None
-        items = []
-        for item in self.materials:
-            if item.comment_object is not None and item.comment_object.comment:
-                items.append(item)
-        return items
-
-
-    @property
-    def number_joint_comments(self):
-        if self.joints is None:
-            return 0
-        number = 0
-        for item in self.joints:
-            if item.comment_object is not None and item.comment_object.comment:
-                number += 1
-        return number
-
-    @property
-    def joint_comments(self):
-        if self.joints is None:
-            return None
-        items = []
-        for item in self.joints:
-            if item.comment_object is not None and item.comment_object.comment:
-                items.append(item)
-        return items
-
-
-    @property
-    def has_model_comment(self):
-        if self.comment_object is not None and self.comment_object.comment:
-            return 1
-        return 0
-
-    @property
-    def comment_object(self):
-        return self._comment_object
-
-
-    @property
-    def vertex_ex(self):
-        if not self.sub_version_vertex_extra:
-            return None
-        return [item.vertex_ex_object for item in self.vertices]
-
-    @property
-    def joint_ex(self):
-        if not self.sub_version_joint_extra:
-            return None
-        return [item.joint_ex_object for item in self.joints]
-
-    @property
-    def model_ex_object(self):
-        if not self.sub_version_model_extra:
-            return None
-        return self._model_ex_object
-
-
-    def print_internal(self):
-        print()
-        print("##############################################################")
-        print("## the internal data of Ms3dModel object...")
-        print("##")
-
-        print("header={}".format(self.header))
-
-        print("number_vertices={}".format(self.number_vertices))
-        print("vertices=[", end="")
-        if self.vertices:
-            for obj in self.vertices:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("number_triangles={}".format(self.number_triangles))
-        print("triangles=[", end="")
-        if self.triangles:
-            for obj in self.triangles:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("number_groups={}".format(self.number_groups))
-        print("groups=[", end="")
-        if self.groups:
-            for obj in self.groups:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("number_materials={}".format(self.number_materials))
-        print("materials=[", end="")
-        if self.materials:
-            for obj in self.materials:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("animation_fps={}".format(self.animation_fps))
-        print("current_time={}".format(self.current_time))
-        print("number_total_frames={}".format(self.number_total_frames))
-
-        print("number_joints={}".format(self.number_joints))
-        print("joints=[", end="")
-        if self.joints:
-            for obj in self.joints:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("sub_version_comments={}".format(self.sub_version_comments))
-
-        print("number_group_comments={}".format(self.number_group_comments))
-        print("group_comments=[", end="")
-        if self.group_comments:
-            for obj in self.group_comments:
-                print("{}".format(obj.comment_object), end="")
-        print("]")
-
-        print("number_material_comments={}".format(
-                self.number_material_comments))
-        print("material_comments=[", end="")
-        if self.material_comments:
-            for obj in self.material_comments:
-                print("{}".format(obj.comment_object), end="")
-        print("]")
-
-        print("number_joint_comments={}".format(self.number_joint_comments))
-        print("joint_comments=[", end="")
-        if self.joint_comments:
-            for obj in self.joint_comments:
-                print("{}".format(obj.comment_object), end="")
-        print("]")
-
-        print("has_model_comment={}".format(self.has_model_comment))
-        print("model_comment={}".format(self.comment_object))
-
-        print("sub_version_vertex_extra={}".format(
-                self.sub_version_vertex_extra))
-        print("vertex_ex=[", end="")
-        if self.vertex_ex:
-            for obj in self.vertex_ex:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("sub_version_joint_extra={}".format(
-                self.sub_version_joint_extra))
-        print("joint_ex=[", end="")
-        if self.joint_ex:
-            for obj in self.joint_ex:
-                print("{}".format(obj), end="")
-        print("]")
-
-        print("sub_version_model_extra={}".format(
-                self.sub_version_model_extra))
-        print("model_ex={}".format(self.model_ex_object))
-
-        print("##")
-        print("## ...end")
-        print("##############################################################")
-        print()
-
-
-    def read(self, file):
-        """
-        opens, reads and pars MS3D file.
-        add content to blender scene
-        """
-
-        self.header.read(file)
-        if (self.header != Ms3dHeader()):
-            print("\nwarning, invalid file header")
-
-        _number_vertices = Ms3dIo.read_word(file)
-        if (_number_vertices > Ms3dSpec.MAX_VERTICES):
-            print("\nwarning, invalid count: number_vertices: {}".format(
-                    _number_vertices))
-        self._vertices = []
-        for i in range(_number_vertices):
-            self.vertices.append(Ms3dVertex().read(file))
-
-        _number_triangles = Ms3dIo.read_word(file)
-        if (_number_triangles > Ms3dSpec.MAX_TRIANGLES):
-            print("\nwarning, invalid count: number_triangles: {}".format(
-                    _number_triangles))
-        self._triangles = []
-        for i in range(_number_triangles):
-            self.triangles.append(Ms3dTriangle().read(file))
-
-        _number_groups = Ms3dIo.read_word(file)
-        if (_number_groups > Ms3dSpec.MAX_GROUPS):
-            print("\nwarning, invalid count: number_groups: {}".format(
-                    _number_groups))
-        self._groups = []
-        for i in range(_number_groups):
-            self.groups.append(Ms3dGroup().read(file))
-
-        _number_materials = Ms3dIo.read_word(file)
-        if (_number_materials > Ms3dSpec.MAX_MATERIALS):
-            print("\nwarning, invalid count: number_materials: {}".format(
-                    _number_materials))
-        self._materials = []
-        for i in range(_number_materials):
-            self.materials.append(Ms3dMaterial().read(file))
-
-        self.animation_fps = Ms3dIo.read_float(file)
-        self.current_time = Ms3dIo.read_float(file)
-        self.number_total_frames = Ms3dIo.read_dword(file)
-
-        _progress = set()
-
-        try:
-            # optional data
-            # doesn't matter if doesn't existing.
-
-            Ms3dIo.raise_on_eof(file)
-
-            _number_joints = Ms3dIo.read_word(file)
-            _progress.add('NUMBER_JOINTS')
-            if (_number_joints > Ms3dSpec.MAX_JOINTS):
-                print("\nwarning, invalid count: number_joints: {}".format(
-                        _number_joints))
-            self._joints = []
-            for i in range(_number_joints):
-                self.joints.append(Ms3dJoint().read(file))
-            _progress.add('JOINTS')
-
-            Ms3dIo.raise_on_eof(file)
-
-            self.sub_version_comments = Ms3dIo.read_dword(file)
-            _progress.add('SUB_VERSION_COMMENTS')
-            _number_group_comments = Ms3dIo.read_dword(file)
-            _progress.add('NUMBER_GROUP_COMMENTS')
-            if (_number_group_comments > Ms3dSpec.MAX_GROUPS):
-                print("\nwarning, invalid count:"\
-                        " number_group_comments: {}".format(
-                        _number_group_comments))
-            if _number_group_comments > _number_groups:
-                print("\nwarning, invalid count:"\
-                        " number_group_comments: {}, number_groups: {}".format(
-                        _number_group_comments, _number_groups))
-            for i in range(_number_group_comments):
-                item = Ms3dCommentEx().read(file)
-                if item.index >= 0 and item.index < _number_groups:
-                    self.groups[item.index]._comment_object = item
-                else:
-                    print("\nwarning, invalid index:"\
-                            " group_index: {}, number_groups: {}".format(
-                            item.index, _number_groups))
-            _progress.add('GROUP_COMMENTS')
-
-            _number_material_comments = Ms3dIo.read_dword(file)
-            _progress.add('NUMBER_MATERIAL_COMMENTS')
-            if (_number_material_comments > Ms3dSpec.MAX_MATERIALS):
-                print("\nwarning, invalid count:"\
-                        " number_material_comments: {}".format(
-                        _number_material_comments))
-            if _number_material_comments > _number_materials:
-                print("\nwarning, invalid count:"\
-                        " number_material_comments:"\
-                        " {}, number_materials: {}".format(
-                        _number_material_comments, _number_materials))
-            for i in range(_number_material_comments):
-                item = Ms3dCommentEx().read(file)
-                if item.index >= 0 and item.index < _number_materials:
-                    self.materials[item.index]._comment_object = item
-                else:
-                    print("\nwarning, invalid index:"\
-                            " material_index: {}, number_materials:"\
-                            " {}".format(item.index, _number_materials))
-            _progress.add('MATERIAL_COMMENTS')
-
-            _number_joint_comments = Ms3dIo.read_dword(file)
-            _progress.add('NUMBER_JOINT_COMMENTS')
-            if (_number_joint_comments > Ms3dSpec.MAX_JOINTS):
-                print("\nwarning, invalid count:"\
-                        " number_joint_comments: {}".format(
-                        _number_joint_comments))
-            if _number_joint_comments > _number_joints:
-                print("\nwarning, invalid count:"\
-                        " number_joint_comments: {}, number_joints: {}".format(
-                        _number_joint_comments, _number_joints))
-            for i in range(_number_joint_comments):
-                item = Ms3dCommentEx().read(file)
-                if item.index >= 0 and item.index < _number_joints:
-                    self.joints[item.index]._comment_object = item
-                else:
-                    print("\nwarning, invalid index:"\
-                            " joint_index: {}, number_joints: {}".format(
-                            item.index, _number_joints))
-            _progress.add('JOINT_COMMENTS')
-
-            _has_model_comment = Ms3dIo.read_dword(file)
-            _progress.add('HAS_MODEL_COMMENTS')
-            if (_has_model_comment != 0):
-                self._comment_object = Ms3dComment().read(file)
-            else:
-                self._comment_object = None
-            _progress.add('MODEL_COMMENTS')
-
-            Ms3dIo.raise_on_eof(file)
-
-            self.sub_version_vertex_extra = Ms3dIo.read_dword(file)
-            _progress.add('SUB_VERSION_VERTEX_EXTRA')
-            if self.sub_version_vertex_extra > 0:
-                length = len(self.joints)
-                for i in range(_number_vertices):
-                    if self.sub_version_vertex_extra == 1:
-                        item = Ms3dVertexEx1()
-                    elif self.sub_version_vertex_extra == 2:
-                        item = Ms3dVertexEx2()
-                    elif self.sub_version_vertex_extra == 3:
-                        item = Ms3dVertexEx3()
-                    else:
-                        print("\nwarning, invalid version:"\
-                                " sub_version_vertex_extra: {}".format(
-                                sub_version_vertex_extra))
-                        continue
-                    self.vertices[i]._vertex_ex_object = item.read(file)
-            _progress.add('VERTEX_EXTRA')
-
-            Ms3dIo.raise_on_eof(file)
-
-            self.sub_version_joint_extra = Ms3dIo.read_dword(file)
-            _progress.add('SUB_VERSION_JOINT_EXTRA')
-            if self.sub_version_joint_extra > 0:
-                for i in range(_number_joints):
-                    self.joints[i]._joint_ex_object = Ms3dJointEx().read(file)
-            _progress.add('JOINT_EXTRA')
-
-            Ms3dIo.raise_on_eof(file)
-
-            self.sub_version_model_extra = Ms3dIo.read_dword(file)
-            _progress.add('SUB_VERSION_MODEL_EXTRA')
-            if self.sub_version_model_extra > 0:
-                self._model_ex_object.read(file)
-            _progress.add('MODEL_EXTRA')
-
-        except EOF:
-            # reached end of optional data.
-            print("Ms3dModel.read - optional data read: {}".format(_progress))
-            pass
-
-        except Exception:
-            type, value, traceback = exc_info()
-            print("Ms3dModel.read - exception in optional try block,"
-                    " _progress={0}\n  type: '{1}'\n  value: '{2}'".format(
-                    _progress, type, value, traceback))
-
-        else:
-            pass
-
-        # try best to continue far as possible
-        if not 'JOINTS' in _progress:
-            _number_joints = 0
-            self._joints = []
-
-        if not 'GROUP_COMMENTS' in _progress:
-            self.sub_version_comments = 0
-            _number_group_comments = 0
-
-        if not 'MATERIAL_COMMENTS' in _progress:
-            _number_material_comments = 0
-
-        if not 'JOINT_COMMENTS' in _progress:
-            _number_joint_comments = 0
-
-        if not 'MODEL_COMMENTS' in _progress:
-            _has_model_comment = 0
-            self._comment_object = None # Ms3dComment()
-
-        if not 'VERTEX_EXTRA' in _progress:
-            self.sub_version_vertex_extra = 0
-
-        if not 'JOINT_EXTRA' in _progress:
-            self.sub_version_joint_extra = 0
-
-        if not 'MODEL_EXTRA' in _progress:
-            self.sub_version_model_extra = 0
-            self._model_ex_object = Ms3dModelEx()
-
-        return
-
-
-    def write(self, file):
-        """
-        add blender scene content to MS3D
-        creates, writes MS3D file.
-        """
-
-        self.header.write(file)
-
-        Ms3dIo.write_word(file, self.number_vertices)
-        for i in range(self.number_vertices):
-            self.vertices[i].write(file)
-
-        Ms3dIo.write_word(file, self.number_triangles)
-        for i in range(self.number_triangles):
-            self.triangles[i].write(file)
-
-        Ms3dIo.write_word(file, self.number_groups)
-        for i in range(self.number_groups):
-            self.groups[i].write(file)
-
-        Ms3dIo.write_word(file, self.number_materials)
-        for i in range(self.number_materials):
-            self.materials[i].write(file)
-
-        Ms3dIo.write_float(file, self.animation_fps)
-        Ms3dIo.write_float(file, self.current_time)
-        Ms3dIo.write_dword(file, self.number_total_frames)
-
-        try:
-            # optional part
-            # doesn't matter if it doesn't complete.
-            Ms3dIo.write_word(file, self.number_joints)
-            for i in range(self.number_joints):
-                self.joints[i].write(file)
-
-            Ms3dIo.write_dword(file, self.sub_version_comments)
-
-            Ms3dIo.write_dword(file, self.number_group_comments)
-            for i in range(self.number_group_comments):
-                self.group_comments[i].comment_object.write(file)
-
-            Ms3dIo.write_dword(file, self.number_material_comments)
-            for i in range(self.number_material_comments):
-                self.material_comments[i].comment_object.write(file)
-
-            Ms3dIo.write_dword(file, self.number_joint_comments)
-            for i in range(self.number_joint_comments):
-                self.joint_comments[i].comment_object.write(file)
-
-            Ms3dIo.write_dword(file, self.has_model_comment)
-            if (self.has_model_comment != 0):
-                self.comment_object.write(file)
-
-            Ms3dIo.write_dword(file, self.sub_version_vertex_extra)
-            if (self.sub_version_vertex_extra in {1, 2, 3}):
-                for i in range(self.number_vertices):
-                    self.vertex_ex[i].write(file)
-
-            Ms3dIo.write_dword(file, self.sub_version_joint_extra)
-            for i in range(self.number_joints):
-                self.joint_ex[i].write(file)
-
-            Ms3dIo.write_dword(file, self.sub_version_model_extra)
-            self.model_ex_object.write(file)
-
-        except Exception:
-            type, value, traceback = exc_info()
-            print("Ms3dModel.write - exception in optional try block"
-                    "\n  type: '{0}'\n  value: '{1}'".format(
-                    type, value, traceback))
-            pass
-
-        else:
-            pass
-
-        return
-
-
-    def is_valid(self):
-        valid = True
-        result = []
-
-        format1 = "\n  number of {0}: {1}"
-        format2 = " limit exceeded! (limit is {0})"
-
-        result.append("MS3D statistics:")
-        result.append(format1.format("vertices ........",
-                self.number_vertices))
-        if (self.number_vertices > Ms3dSpec.MAX_VERTICES):
-            result.append(format2.format(Ms3dSpec.MAX_VERTICES))
-            valid &= False
-
-        result.append(format1.format("triangles .......",
-                self.number_triangles))
-        if (self.number_triangles > Ms3dSpec.MAX_TRIANGLES):
-            result.append(format2.format(Ms3dSpec.MAX_TRIANGLES))
-            valid &= False
-
-        result.append(format1.format("groups ..........",
-                self.number_groups))
-        if (self.number_groups > Ms3dSpec.MAX_GROUPS):
-            result.append(format2.format(Ms3dSpec.MAX_GROUPS))
-            valid &= False
-
-        result.append(format1.format("materials .......",
-                self.number_materials))
-        if (self.number_materials > Ms3dSpec.MAX_MATERIALS):
-            result.append(format2.format(Ms3dSpec.MAX_MATERIALS))
-            valid &= False
-
-        result.append(format1.format("joints ..........",
-                self.number_joints))
-        if (self.number_joints > Ms3dSpec.MAX_JOINTS):
-            result.append(format2.format(Ms3dSpec.MAX_JOINTS))
-            valid &= False
-
-        result.append(format1.format("model comments ..",
-                self.has_model_comment))
-        result.append(format1.format("group comments ..",
-                self.number_group_comments))
-        result.append(format1.format("material comments",
-                self.number_material_comments))
-        result.append(format1.format("joint comments ..",
-                self.number_joint_comments))
-
-        #if (not valid):
-        #    result.append("\n\nthe data may be corrupted.")
-
-        return (valid, ("".join(result)))
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_strings.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_strings.py
deleted file mode 100644
index 95203f8..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_strings.py
+++ /dev/null
@@ -1,232 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-SEE_MS3D_DOC = "see MilkShape 3D documentation"
-
-ms3d_str = {
-        'lang': "en-US",
-        'RUNTIME_KEY': "Human friendly presentation",
-
-        ###############################
-        # blender key names
-        'OBJECT_LAYER_EXTRA': "ms3d_extra_layer",
-        'OBJECT_LAYER_GROUP': "ms3d_group_layer",
-        'OBJECT_LAYER_SMOOTHING_GROUP': "ms3d_smoothing_group_layer",
-        'OBJECT_MODIFIER_SMOOTHING_GROUP': "ms3d_smoothing_groups",
-        # for some reason after bm.to_mesh(..)
-        # the names of 'bm.loops.layers.uv' becomes to 'bm.faces.layers.tex'
-        # to bypass this issue, i give both the same name.
-        # 'OBJECT_LAYER_TEXTURE': "ms3d_texture_layer",
-        'OBJECT_LAYER_TEXTURE': "ms3d_uv_layer",
-        'OBJECT_LAYER_UV': "ms3d_uv_layer",
-
-        ###############################
-        # strings to be used with 'str().format()'
-        'STRING_FORMAT_GROUP': "Group.{:03d}",
-        'WARNING_IMPORT_SKIP_FACE_DOUBLE': "skipped face #{}:"\
-                " contains double faces with same vertices!",
-        'WARNING_IMPORT_SKIP_LESS_VERTICES': "skipped face #{}:"\
-                " contains faces too less vertices!",
-        'WARNING_IMPORT_SKIP_VERTEX_DOUBLE': "skipped face #{}:"\
-                " contains faces with double vertices!",
-        'SUMMARY_IMPORT': "elapsed time: {0:.4}s (media io:"\
-                " ~{1:.4}s, converter: ~{2:.4}s)",
-        'SUMMARY_EXPORT': "elapsed time: {0:.4}s (converter:"\
-                " ~{1:.4}s, media io: ~{2:.4}s)",
-        'WARNING_EXPORT_SKIP_WEIGHT' : "skipped weight",
-        'WARNING_EXPORT_SKIP_WEIGHT_EX' : "skipped weight:"\
-                " limit exceeded",
-
-        ###############################
-        'TEXT_OPERATOR': "MilkShape 3D (.ms3d)",
-        'FILE_EXT': ".ms3d",
-        'FILE_FILTER': "*.ms3d",
-        'BL_DESCRIPTION_EXPORTER': "Export to a MilkShape 3D file format (.ms3d)",
-        'BL_DESCRIPTION_IMPORTER': "Import from a MilkShape 3D file format (.ms3d)",
-        'BL_LABEL_EXPORTER': "Export MS3D",
-        'BL_LABEL_GROUP_OPERATOR': "MS3D - Group Collection Operator",
-        'BL_LABEL_IMPORTER': "Import MS3D",
-        'BL_LABEL_PANEL_SMOOTHING_GROUP': "MS3D - Smoothing Group",
-        'BL_LABEL_SMOOTHING_GROUP_OPERATOR': "MS3D Set Smoothing Group"\
-                " Operator",
-        'BL_LABEL_MATERIAL_OPERATOR' : "MS3D - Copy Material Operator",
-        'ENUM_ADD_GROUP_1': "Add",
-        'ENUM_ADD_GROUP_2': "adds an item",
-        'ENUM_ASSIGN_1': "Assign",
-        'ENUM_ASSIGN_2_GROUP': "assign selected faces to selected group",
-        'ENUM_ASSIGN_2_SMOOTHING_GROUP': "assign all selected faces to"\
-                " selected smoothing group",
-        'ENUM_DESELECT_1': "Deselect",
-        'ENUM_DESELECT_2_GROUP': "deselects faces of selected group",
-        'ENUM_DESELECT_2_SMOOTHING_GROUP': "deselects all faces of selected"\
-                " smoothing group",
-        'ENUM_FLAG_DIRTY_1': "Dirty",
-        'ENUM_FLAG_DIRTY_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_HIDDEN_1': "Hidden",
-        'ENUM_FLAG_HIDDEN_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_ISKEY_1': "Is Key",
-        'ENUM_FLAG_ISKEY_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_MARKED_1': "Marked",
-        'ENUM_FLAG_MARKED_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_NEWLYCREATED_1': "Newly Created",
-        'ENUM_FLAG_NEWLYCREATED_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_NONE_1': "None",
-        'ENUM_FLAG_NONE_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_SELECTED_1': "Selected",
-        'ENUM_FLAG_SELECTED_2': SEE_MS3D_DOC,
-        'ENUM_FLAG_SELECTED2_1': "Selected Ex.",
-        'ENUM_FLAG_SELECTED2_2': SEE_MS3D_DOC,
-        'ENUM_REMOVE_1': "Remove",
-        'ENUM_REMOVE_2_GROUP': "remove selected faces from selected group",
-        'ENUM_REMOVE_GROUP_1': "Remove",
-        'ENUM_REMOVE_GROUP_2': "removes an item",
-        'ENUM_SELECT_1': "Select",
-        'ENUM_SELECT_2_GROUP': "selects faces of selected group",
-        'ENUM_SELECT_2_SMOOTHING_GROUP': "selects all faces of selected"\
-                " smoothing group",
-        'LABEL_NAME_ANIMATION': "Animation Processing:",
-        'LABEL_NAME_OBJECT': "World Processing:",
-        'LABEL_NAME_OPTIONS': "Advanced Options:",
-        'LABEL_NAME_PROCESSING': "Object Processing:",
-        'LABEL_PANEL_BUTTON_NONE': "None",
-        'LABEL_PANEL_GROUPS': "MS3D - Groups",
-        'LABEL_PANEL_JOINTS': "MS3D - Joint",
-        'LABEL_PANEL_MATERIALS': "MS3D - Material",
-        'LABEL_PANEL_MODEL': "MS3D - Model",
-        'PROP_DESC_ALPHA_REF': "ms3d internal raw 'alpha_ref' of Model",
-        'PROP_DESC_ALPHAMAP': "ms3d internal raw 'alphamap' file name of"\
-                " Material",
-        'PROP_DESC_AMBIENT': "ms3d internal raw 'ambient' of Material",
-        'PROP_DESC_ANIMATION': "keyframes (rotations, positions)",
-        'PROP_DESC_COLOR_JOINT': "ms3d internal raw 'color' of Joint",
-        'PROP_DESC_COMMENT_GROUP': "ms3d internal raw 'comment' of Group",
-        'PROP_DESC_COMMENT_JOINT': "ms3d internal raw 'comment' of Joint",
-        'PROP_DESC_COMMENT_MATERIAL': "ms3d internal raw 'comment' of Material",
-        'PROP_DESC_COMMENT_MODEL': "ms3d internal raw 'comment' of Model",
-        'PROP_DESC_DIFFUSE': "ms3d internal raw 'diffuse' of Material",
-        'PROP_DESC_EMISSIVE': "ms3d internal raw 'emissive' of Material",
-        'PROP_DESC_FLAGS_GROUP': "ms3d internal raw 'flags' of Group",
-        'PROP_DESC_FLAGS_JOINT': "ms3d internal raw 'flags' of Joint",
-        'PROP_DESC_GROUP_NAME': "ms3d internal raw 'name' of Group",
-        'PROP_DESC_JOINT_SIZE': "ms3d internal raw 'joint_size' of Model",
-        'PROP_DESC_MODE_TEXTURE': "ms3d internal raw 'mode' of Material",
-        'PROP_DESC_NAME_ARMATURE': "ms3d internal raw 'name' of Model (not used for export)",
-        'PROP_DESC_NAME_JOINT': "ms3d internal raw 'name' of Joint",
-        'PROP_DESC_NAME_MATERIAL': "ms3d internal raw 'name' of Material",
-        'PROP_DESC_NAME_MODEL': "ms3d internal raw 'name' of Model (not used for export)",
-        'PROP_DESC_SHININESS': "ms3d internal raw 'shininess' of Material",
-        'PROP_DESC_SPECULAR': "ms3d internal raw 'specular' of Material",
-        'PROP_DESC_TEXTURE': "ms3d internal raw 'texture' file name of"\
-                " Material",
-        'PROP_DESC_TRANSPARENCY': "ms3d internal raw 'transparency' of"\
-                " Material",
-        'PROP_DESC_TRANSPARENCY_MODE': "ms3d internal raw 'transparency_mode'"\
-                " of Model",
-        'PROP_DESC_VERBOSE': "Run the converter in debug mode."\
-                " Check the console for output (Warning, may be very slow)",
-        'PROP_FLAG_TEXTURE_COMBINE_ALPHA_1': "Combine Alpha",
-        'PROP_FLAG_TEXTURE_COMBINE_ALPHA_2': SEE_MS3D_DOC,
-        'PROP_FLAG_TEXTURE_HAS_ALPHA_1': "Has Alpha",
-        'PROP_FLAG_TEXTURE_HAS_ALPHA_2': SEE_MS3D_DOC,
-        'PROP_FLAG_TEXTURE_SPHERE_MAP_1': "Sphere Map",
-        'PROP_FLAG_TEXTURE_SPHERE_MAP_2': SEE_MS3D_DOC,
-        'PROP_MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF_1': "Depth"\
-                " Buffered with Alpha Ref",
-        'PROP_MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF_2': SEE_MS3D_DOC,
-        'PROP_MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES_1': "Depth Sorted"\
-                " Triangles",
-        'PROP_MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES_2': SEE_MS3D_DOC,
-        'PROP_MODE_TRANSPARENCY_SIMPLE_1': "Simple",
-        'PROP_MODE_TRANSPARENCY_SIMPLE_2': SEE_MS3D_DOC,
-        'PROP_NAME_ALPHA_REF': "Alpha Ref.",
-        'PROP_NAME_ALPHAMAP': "Alphamap",
-        'PROP_NAME_AMBIENT': "Ambient",
-        'PROP_NAME_ANIMATION': "Animation",
-        'PROP_NAME_COLOR': "Color",
-        'PROP_NAME_COMMENT': "Comment",
-        'PROP_NAME_DIFFUSE': "Diffuse",
-        'PROP_NAME_EMISSIVE': "Emissive",
-        'PROP_NAME_FLAGS': "Flags",
-        'PROP_NAME_JOINT_SIZE': "Joint Size",
-        'PROP_NAME_MODE': "Mode",
-        'PROP_NAME_NAME': "Name",
-        'PROP_NAME_ACTIVE': "Active Mesh:",
-        'PROP_NAME_SHININESS': "Shininess",
-        'PROP_NAME_SPECULAR': "Specular",
-        'PROP_NAME_TEXTURE': "Texture",
-        'PROP_NAME_TRANSPARENCY': "Transparency",
-        'PROP_NAME_TRANSPARENCY_MODE': "Transp. Mode",
-        'PROP_NAME_VERBOSE': "Verbose",
-        'PROP_SMOOTHING_GROUP_INDEX': "Smoothing group id",
-        'PROP_NAME_ROTATION_MODE' : "Bone Rotation Mode",
-        'PROP_DESC_ROTATION_MODE' : "set the preferred rotation mode of bones",
-        'PROP_ITEM_ROTATION_MODE_EULER_1' : "Euler",
-        'PROP_ITEM_ROTATION_MODE_EULER_2' : "use euler bone rotation"\
-                " (gimbal-lock can be fixed by using "\
-                "'Graph Editor -> Key -> Discontinuity (Euler) Filter')",
-        'PROP_ITEM_ROTATION_MODE_QUATERNION_1' : "Quaternion",
-        'PROP_ITEM_ROTATION_MODE_QUATERNION_2' : "use quaternion bone rotation"\
-                " (no gimbal-lock filter available!)",
-        'PROP_NAME_USE_JOINT_SIZE': "Override Joint Size",
-        'PROP_DESC_USE_JOINT_SIZE': "use value of 'Joint Size', the value of the ms3d file is ignored for representation.",
-        'PROP_NAME_IMPORT_JOINT_SIZE': "Joint Size",
-        'PROP_DESC_IMPORT_JOINT_SIZE': "size of the joint representation in blender",
-        'BL_LABEL_SET_SCENE_TO_METRIC' : "Set Scene to 'Metric' [1 mm]",
-        'BL_DESC_SET_SCENE_TO_METRIC' : "set Scene | Units to Metric (1 Unit = 1 mm),"\
-                " Display | Textured Solid,"\
-                " View | Clip (0.001 mm ... 1 km)",
-        'PROP_NAME_NORMALIZE_WEIGHTS' : "Normalize Weights",
-        'PROP_DESC_NORMALIZE_WEIGHTS' : "normalize weights to 100%, weight' = weight(i) * (weight1 + weight2 + weight3) / 100.0",
-        'PROP_NAME_SHRINK_TO_KEYS' : "Shrink To Keys",
-        'PROP_DESC_SHRINK_TO_KEYS' : "shrinks the animation to region from first keyframe to last keyframe",
-        'PROP_NAME_BAKE_EACH_FRAME' : "Bake Each Frame As Key",
-        'PROP_DESC_BAKE_EACH_FRAME' : "if enabled, to each frame there will be a key baked",
-        'LABEL_NAME_JOINT_TO_BONES' : "works only with some models!",
-        'PROP_NAME_JOINT_TO_BONES' : "Joints To Bones",
-        'PROP_DESC_JOINT_TO_BONES' : "changes the length of the bones",
-        'PROP_NAME_USE_BLENDER_NAMES' : "Use Blender Names Only",
-        'PROP_DESC_USE_BLENDER_NAMES' : "use only blender names, ignores ms3d names (bone names will always be taken from blender)",
-        'PROP_NAME_USE_BLENDER_MATERIALS' : "Use Blender Materials",
-        'PROP_DESC_USE_BLENDER_MATERIALS' : "ignores ms3d material definition (you loose some information by choosing this option)",
-        'ENUM_FROM_BLENDER_1' : "Copy From Blender",
-        'ENUM_FROM_BLENDER_2' : "takes and copies all available values from blender",
-        'ENUM_TO_BLENDER_1' : "Copy To Blender",
-        'ENUM_TO_BLENDER_2' : "copies and puts all available values to blender",
-
-        'PROP_NAME_': "Name",
-        'PROP_DESC_': "Description",
-        # ms3d_str['']
-        }
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_ui.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_ui.py
deleted file mode 100644
index c672aa1..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_ui.py
+++ /dev/null
@@ -1,1608 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-#import python stuff
-from random import (
-        randrange,
-        )
-
-
-# import io_scene_ms3d stuff
-from io_scene_ms3d.ms3d_strings import (
-        ms3d_str,
-        )
-from io_scene_ms3d.ms3d_spec import (
-        Ms3dSpec,
-        )
-from io_scene_ms3d.ms3d_utils import (
-        enable_edit_mode,
-        get_edge_split_modifier_add_if,
-        set_sence_to_metric,
-        )
-
-
-#import blender stuff
-from bmesh import (
-        from_edit_mesh,
-        )
-from bpy.utils import (
-        register_class,
-        unregister_class,
-        )
-from bpy_extras.io_utils import (
-        ExportHelper,
-        ImportHelper,
-        )
-from bpy.props import (
-        BoolProperty,
-        CollectionProperty,
-        EnumProperty,
-        FloatProperty,
-        FloatVectorProperty,
-        IntProperty,
-        StringProperty,
-        PointerProperty,
-        )
-from bpy.types import (
-        Operator,
-        PropertyGroup,
-        Panel,
-        Armature,
-        Bone,
-        Mesh,
-        Material,
-        Action,
-        Group,
-        )
-from bpy.app import (
-        debug,
-        )
-
-
-class Ms3dUi:
-    DEFAULT_VERBOSE = debug
-
-    ###############################################################################
-    FLAG_TEXTURE_COMBINE_ALPHA = 'COMBINE_ALPHA'
-    FLAG_TEXTURE_HAS_ALPHA = 'HAS_ALPHA'
-    FLAG_TEXTURE_SPHERE_MAP = 'SPHERE_MAP'
-
-    @staticmethod
-    def texture_mode_from_ms3d(ms3d_value):
-        ui_value = set()
-        if (ms3d_value & Ms3dSpec.FLAG_TEXTURE_COMBINE_ALPHA) \
-                == Ms3dSpec.FLAG_TEXTURE_COMBINE_ALPHA:
-            ui_value.add(Ms3dUi.FLAG_TEXTURE_COMBINE_ALPHA)
-        if (ms3d_value & Ms3dSpec.FLAG_TEXTURE_HAS_ALPHA) \
-                == Ms3dSpec.FLAG_TEXTURE_HAS_ALPHA:
-            ui_value.add(Ms3dUi.FLAG_TEXTURE_HAS_ALPHA)
-        if (ms3d_value & Ms3dSpec.FLAG_TEXTURE_SPHERE_MAP) \
-                == Ms3dSpec.FLAG_TEXTURE_SPHERE_MAP:
-            ui_value.add(Ms3dUi.FLAG_TEXTURE_SPHERE_MAP)
-        return ui_value
-
-    @staticmethod
-    def texture_mode_to_ms3d(ui_value):
-        ms3d_value = Ms3dSpec.FLAG_TEXTURE_NONE
-
-        if Ms3dUi.FLAG_TEXTURE_COMBINE_ALPHA in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_TEXTURE_COMBINE_ALPHA
-        if Ms3dUi.FLAG_TEXTURE_HAS_ALPHA in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_TEXTURE_HAS_ALPHA
-        if Ms3dUi.FLAG_TEXTURE_SPHERE_MAP in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_TEXTURE_SPHERE_MAP
-        return ms3d_value
-
-
-    MODE_TRANSPARENCY_SIMPLE = 'SIMPLE'
-    MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF \
-            = 'DEPTH_BUFFERED_WITH_ALPHA_REF'
-    MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES = 'DEPTH_SORTED_TRIANGLES'
-
-    @staticmethod
-    def transparency_mode_from_ms3d(ms3d_value):
-        if(ms3d_value == Ms3dSpec.MODE_TRANSPARENCY_SIMPLE):
-            return Ms3dUi.MODE_TRANSPARENCY_SIMPLE
-        elif(ms3d_value == Ms3dSpec.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF):
-            return Ms3dUi.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF
-        elif(ms3d_value == Ms3dSpec.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES):
-            return Ms3dUi.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES
-        return None
-
-    @staticmethod
-    def transparency_mode_to_ms3d(ui_value):
-        if(ui_value == Ms3dUi.MODE_TRANSPARENCY_SIMPLE):
-            return Ms3dSpec.MODE_TRANSPARENCY_SIMPLE
-        elif(ui_value == Ms3dUi.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF):
-            return Ms3dSpec.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF
-        elif(ui_value == Ms3dUi.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES):
-            return Ms3dSpec.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES
-        return None
-
-
-    FLAG_NONE = 'NONE'
-    FLAG_SELECTED = 'SELECTED'
-    FLAG_HIDDEN = 'HIDDEN'
-    FLAG_SELECTED2 = 'SELECTED2'
-    FLAG_DIRTY = 'DIRTY'
-    FLAG_ISKEY = 'ISKEY'
-    FLAG_NEWLYCREATED = 'NEWLYCREATED'
-    FLAG_MARKED = 'MARKED'
-
-    @staticmethod
-    def flags_from_ms3d(ms3d_value):
-        ui_value = set()
-        if (ms3d_value & Ms3dSpec.FLAG_SELECTED) == Ms3dSpec.FLAG_SELECTED:
-            ui_value.add(Ms3dUi.FLAG_SELECTED)
-        if (ms3d_value & Ms3dSpec.FLAG_HIDDEN) == Ms3dSpec.FLAG_HIDDEN:
-            ui_value.add(Ms3dUi.FLAG_HIDDEN)
-        if (ms3d_value & Ms3dSpec.FLAG_SELECTED2) == Ms3dSpec.FLAG_SELECTED2:
-            ui_value.add(Ms3dUi.FLAG_SELECTED2)
-        if (ms3d_value & Ms3dSpec.FLAG_DIRTY) == Ms3dSpec.FLAG_DIRTY:
-            ui_value.add(Ms3dUi.FLAG_DIRTY)
-        if (ms3d_value & Ms3dSpec.FLAG_ISKEY) == Ms3dSpec.FLAG_ISKEY:
-            ui_value.add(Ms3dUi.FLAG_ISKEY)
-        if (ms3d_value & Ms3dSpec.FLAG_NEWLYCREATED) == Ms3dSpec.FLAG_NEWLYCREATED:
-            ui_value.add(Ms3dUi.FLAG_NEWLYCREATED)
-        if (ms3d_value & Ms3dSpec.FLAG_MARKED) == Ms3dSpec.FLAG_MARKED:
-            ui_value.add(Ms3dUi.FLAG_MARKED)
-        return ui_value
-
-    @staticmethod
-    def flags_to_ms3d(ui_value):
-        ms3d_value = Ms3dSpec.FLAG_NONE
-        if Ms3dUi.FLAG_SELECTED in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_SELECTED
-        if Ms3dUi.FLAG_HIDDEN in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_HIDDEN
-        if Ms3dUi.FLAG_SELECTED2 in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_SELECTED2
-        if Ms3dUi.FLAG_DIRTY in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_DIRTY
-        if Ms3dUi.FLAG_ISKEY in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_ISKEY
-        if Ms3dUi.FLAG_NEWLYCREATED in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_NEWLYCREATED
-        if Ms3dUi.FLAG_MARKED in ui_value:
-            ms3d_value |= Ms3dSpec.FLAG_MARKED
-        return ms3d_value
-
-    ###########################################################################
-    ICON_OPTIONS = 'LAMP'
-    ICON_OBJECT = 'WORLD'
-    ICON_PROCESSING = 'OBJECT_DATAMODE'
-    ICON_ANIMATION = 'RENDER_ANIMATION'
-    ICON_ROTATION_MODE = 'BONE_DATA'
-    ICON_ERROR = 'ERROR'
-
-    ###########################################################################
-    PROP_DEFAULT_VERBOSE = DEFAULT_VERBOSE
-
-    ###########################################################################
-    PROP_DEFAULT_USE_JOINT_SIZE = False
-    PROP_DEFAULT_JOINT_SIZE = 0.01
-    PROP_JOINT_SIZE_MIN = 0.01
-    PROP_JOINT_SIZE_MAX = 10.0
-    PROP_JOINT_SIZE_STEP = 0.1
-    PROP_JOINT_SIZE_PRECISION = 2
-
-    ###########################################################################
-    PROP_DEFAULT_ANIMATION = True
-    PROP_DEFAULT_NORMALIZE_WEIGHTS = True
-    PROP_DEFAULT_SHRINK_TO_KEYS = False
-    PROP_DEFAULT_BAKE_EACH_FRAME = True
-    PROP_DEFAULT_JOINT_TO_BONES = False
-    PROP_DEFAULT_USE_BLENDER_NAMES = True
-    PROP_DEFAULT_USE_BLENDER_MATERIALS = False
-
-    ###########################################################################
-    PROP_ITEM_ROTATION_MODE_EULER = 'EULER'
-    PROP_ITEM_ROTATION_MODE_QUATERNION = 'QUATERNION'
-    PROP_DEFAULT_ANIMATION_ROTATION = PROP_ITEM_ROTATION_MODE_EULER
-
-    ###########################################################################
-    OPT_SMOOTHING_GROUP_APPLY = 'io_scene_ms3d.apply_smoothing_group'
-    OPT_GROUP_APPLY = 'io_scene_ms3d.apply_group'
-    OPT_MATERIAL_APPLY = 'io_scene_ms3d.apply_material'
-
-
-###############################################################################
-class Ms3dImportOperator(Operator, ImportHelper):
-    """ Load a MilkShape3D MS3D File """
-    bl_idname = 'import_scene.ms3d'
-    bl_label = ms3d_str['BL_LABEL_IMPORTER']
-    bl_description = ms3d_str['BL_DESCRIPTION_IMPORTER']
-    bl_options = {'PRESET', }
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-
-    filename_ext = ms3d_str['FILE_EXT']
-
-    filter_glob = StringProperty(
-            default=ms3d_str['FILE_FILTER'],
-            options={'HIDDEN', }
-            )
-
-    filepath = StringProperty(
-            subtype='FILE_PATH',
-            options={'HIDDEN', }
-            )
-
-    verbose = BoolProperty(
-            name=ms3d_str['PROP_NAME_VERBOSE'],
-            description=ms3d_str['PROP_DESC_VERBOSE'],
-            default=Ms3dUi.PROP_DEFAULT_VERBOSE,
-            )
-
-    animation = BoolProperty(
-            name=ms3d_str['PROP_NAME_ANIMATION'],
-            description=ms3d_str['PROP_DESC_ANIMATION'],
-            default=Ms3dUi.PROP_DEFAULT_ANIMATION,
-            )
-
-    rotation_mode = EnumProperty(
-            name=ms3d_str['PROP_NAME_ROTATION_MODE'],
-            description=ms3d_str['PROP_DESC_ROTATION_MODE'],
-            items=( (Ms3dUi.PROP_ITEM_ROTATION_MODE_EULER,
-                            ms3d_str['PROP_ITEM_ROTATION_MODE_EULER_1'],
-                            ms3d_str['PROP_ITEM_ROTATION_MODE_EULER_2']),
-                    (Ms3dUi.PROP_ITEM_ROTATION_MODE_QUATERNION,
-                            ms3d_str['PROP_ITEM_ROTATION_MODE_QUATERNION_1'],
-                            ms3d_str['PROP_ITEM_ROTATION_MODE_QUATERNION_2']),
-                    ),
-            default=Ms3dUi.PROP_DEFAULT_ANIMATION_ROTATION,
-            )
-
-    use_joint_size = BoolProperty(
-            name=ms3d_str['PROP_NAME_USE_JOINT_SIZE'],
-            description=ms3d_str['PROP_DESC_USE_JOINT_SIZE'],
-            default=Ms3dUi.PROP_DEFAULT_USE_JOINT_SIZE,
-            )
-
-    joint_size = FloatProperty(
-            name=ms3d_str['PROP_NAME_IMPORT_JOINT_SIZE'],
-            description=ms3d_str['PROP_DESC_IMPORT_JOINT_SIZE'],
-            min=Ms3dUi.PROP_JOINT_SIZE_MIN, max=Ms3dUi.PROP_JOINT_SIZE_MAX,
-            precision=Ms3dUi.PROP_JOINT_SIZE_PRECISION, step=Ms3dUi.PROP_JOINT_SIZE_STEP,
-            default=Ms3dUi.PROP_DEFAULT_JOINT_SIZE,
-            subtype='FACTOR',
-            #options={'HIDDEN', },
-            )
-
-    joint_to_bones = BoolProperty(
-            name=ms3d_str['PROP_NAME_JOINT_TO_BONES'],
-            description=ms3d_str['PROP_DESC_JOINT_TO_BONES'],
-            default=Ms3dUi.PROP_DEFAULT_JOINT_TO_BONES,
-            )
-
-
-    @property
-    def is_rotation_mode_euler(self):
-        return (Ms3dUi.PROP_ITEM_ROTATION_MODE_EULER \
-                in self.rotation_mode)
-
-    @property
-    def is_rotation_mode_quaternion(self):
-        return (Ms3dUi.PROP_ITEM_ROTATION_MODE_QUATERNION \
-                in self.rotation_mode)
-
-
-    # draw the option panel
-    def draw(self, context):
-        layout = self.layout
-
-        box = layout.box()
-        box.label(ms3d_str['LABEL_NAME_OPTIONS'], icon=Ms3dUi.ICON_OPTIONS)
-        box.prop(self, 'verbose', icon='SPEAKER')
-
-        box = layout.box()
-        box.label(ms3d_str['LABEL_NAME_ANIMATION'], icon=Ms3dUi.ICON_ANIMATION)
-        box.prop(self, 'animation')
-        if (self.animation):
-            box.prop(self, 'rotation_mode', icon=Ms3dUi.ICON_ROTATION_MODE, expand=False)
-            box.prop(self, 'use_joint_size')
-            if (self.use_joint_size):
-                col = box.column()
-                row = col.row()
-                row.prop(self, 'joint_size')
-            box.prop(self, 'joint_to_bones')
-            if (self.joint_to_bones):
-                box.box().label(ms3d_str['LABEL_NAME_JOINT_TO_BONES'], icon=Ms3dUi.ICON_ERROR)
-
-    # entrypoint for MS3D -> blender
-    def execute(self, blender_context):
-        """ start executing """
-        from io_scene_ms3d.ms3d_import import (Ms3dImporter, )
-        return Ms3dImporter(self).read(blender_context)
-
-    def invoke(self, blender_context, event):
-        blender_context.window_manager.fileselect_add(self)
-        return {'RUNNING_MODAL', }
-
-    @staticmethod
-    def menu_func(cls, context):
-        cls.layout.operator(
-                Ms3dImportOperator.bl_idname,
-                text=ms3d_str['TEXT_OPERATOR'],
-                )
-
-
-class Ms3dExportOperator(Operator, ExportHelper):
-    """Save a MilkShape3D MS3D File"""
-    bl_idname = 'export_scene.ms3d'
-    bl_label = ms3d_str['BL_LABEL_EXPORTER']
-    bl_description = ms3d_str['BL_DESCRIPTION_EXPORTER']
-    bl_options = {'PRESET', }
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-
-    filename_ext = ms3d_str['FILE_EXT']
-
-    filter_glob = StringProperty(
-            default=ms3d_str['FILE_FILTER'],
-            options={'HIDDEN', }
-            )
-
-    filepath = StringProperty(
-            subtype='FILE_PATH',
-            options={'HIDDEN', }
-            )
-
-    verbose = BoolProperty(
-            name=ms3d_str['PROP_NAME_VERBOSE'],
-            description=ms3d_str['PROP_DESC_VERBOSE'],
-            default=Ms3dUi.PROP_DEFAULT_VERBOSE,
-            )
-
-    use_blender_names = BoolProperty(
-            name=ms3d_str['PROP_NAME_USE_BLENDER_NAMES'],
-            description=ms3d_str['PROP_DESC_USE_BLENDER_NAMES'],
-            default=Ms3dUi.PROP_DEFAULT_USE_BLENDER_NAMES,
-            )
-
-    use_blender_materials = BoolProperty(
-            name=ms3d_str['PROP_NAME_USE_BLENDER_MATERIALS'],
-            description=ms3d_str['PROP_DESC_USE_BLENDER_MATERIALS'],
-            default=Ms3dUi.PROP_DEFAULT_USE_BLENDER_MATERIALS,
-            )
-
-    normalize_weights = BoolProperty(
-            name=ms3d_str['PROP_NAME_NORMALIZE_WEIGHTS'],
-            description=ms3d_str['PROP_DESC_NORMALIZE_WEIGHTS'],
-            default=Ms3dUi.PROP_DEFAULT_NORMALIZE_WEIGHTS,
-            )
-
-    shrink_to_keys = BoolProperty(
-            name=ms3d_str['PROP_NAME_SHRINK_TO_KEYS'],
-            description=ms3d_str['PROP_DESC_SHRINK_TO_KEYS'],
-            default=Ms3dUi.PROP_DEFAULT_SHRINK_TO_KEYS,
-            )
-
-    bake_each_frame = BoolProperty(
-            name=ms3d_str['PROP_NAME_BAKE_EACH_FRAME'],
-            description=ms3d_str['PROP_DESC_BAKE_EACH_FRAME'],
-            default=Ms3dUi.PROP_DEFAULT_BAKE_EACH_FRAME,
-            )
-
-
-    ##EXPORT_ACTIVE_ONLY:
-    ##limit availability to only active mesh object
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.active_object
-                and context.active_object.type in {'MESH', }
-                and context.active_object.data
-                and context.active_object.data.ms3d is not None
-                )
-
-    # draw the option panel
-    def draw(self, context):
-        layout = self.layout
-
-        box = layout.box()
-        box.label(ms3d_str['LABEL_NAME_OPTIONS'], icon=Ms3dUi.ICON_OPTIONS)
-        box.prop(self, 'verbose', icon='SPEAKER')
-
-        box = layout.box()
-        box.label(ms3d_str['LABEL_NAME_PROCESSING'],
-                icon=Ms3dUi.ICON_PROCESSING)
-        row = box.row()
-        row.label(ms3d_str['PROP_NAME_ACTIVE'], icon='ROTACTIVE')
-        row.label(context.active_object.name)
-        #box.prop(self, 'use_blender_names', icon='LINK_BLEND')
-        box.prop(self, 'use_blender_names')
-        box.prop(self, 'use_blender_materials')
-
-        box = layout.box()
-        box.label(ms3d_str['LABEL_NAME_ANIMATION'],
-                icon=Ms3dUi.ICON_ANIMATION)
-        box.prop(self, 'normalize_weights')
-        box.prop(self, 'shrink_to_keys')
-        box.prop(self, 'bake_each_frame')
-
-    # entrypoint for blender -> MS3D
-    def execute(self, blender_context):
-        """start executing"""
-        from io_scene_ms3d.ms3d_export import (Ms3dExporter, )
-        return Ms3dExporter(self).write(blender_context)
-
-    #
-    def invoke(self, blender_context, event):
-        blender_context.window_manager.fileselect_add(self)
-        return {"RUNNING_MODAL", }
-
-    @staticmethod
-    def menu_func(cls, context):
-        cls.layout.operator(
-                Ms3dExportOperator.bl_idname,
-                text=ms3d_str['TEXT_OPERATOR']
-                )
-
-
-###############################################################################
-##
-###############################################################################
-
-
-###############################################################################
-class Ms3dSetSmoothingGroupOperator(Operator):
-    bl_idname = Ms3dUi.OPT_SMOOTHING_GROUP_APPLY
-    bl_label = ms3d_str['BL_LABEL_SMOOTHING_GROUP_OPERATOR']
-    bl_options = {'INTERNAL', }
-
-    smoothing_group_index = IntProperty(
-            name=ms3d_str['PROP_SMOOTHING_GROUP_INDEX'],
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                and context.mode == 'EDIT_MESH'
-                and context.tool_settings.mesh_select_mode[2]
-                )
-
-    def execute(self, context):
-        custom_data = context.object.data.ms3d
-        blender_mesh = context.object.data
-        bm = from_edit_mesh(blender_mesh)
-        layer_smoothing_group = bm.faces.layers.int.get(
-                ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-        if custom_data.apply_mode in {'SELECT', 'DESELECT', }:
-            if layer_smoothing_group is not None:
-                is_select = (custom_data.apply_mode == 'SELECT')
-                for bmf in bm.faces:
-                    if (bmf[layer_smoothing_group] \
-                            == self.smoothing_group_index):
-                        bmf.select_set(is_select)
-        elif custom_data.apply_mode == 'ASSIGN':
-            if layer_smoothing_group is None:
-                layer_smoothing_group = bm.faces.layers.int.new(
-                        ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-                blender_mesh_object = context.object
-                get_edge_split_modifier_add_if(blender_mesh_object)
-            blender_face_list = []
-            for bmf in bm.faces:
-                if not bmf.smooth:
-                    bmf.smooth = True
-                if bmf.select:
-                    bmf[layer_smoothing_group] = self.smoothing_group_index
-                    blender_face_list.append(bmf)
-            edge_dict = {}
-            for bmf in blender_face_list:
-                bmf.smooth = True
-                for bme in bmf.edges:
-                    if edge_dict.get(bme) is None:
-                        edge_dict[bme] = 0
-                    else:
-                        edge_dict[bme] += 1
-                    is_border = (edge_dict[bme] == 0)
-                    if is_border:
-                        surround_face_smoothing_group_index \
-                                = self.smoothing_group_index
-                        for bmf in bme.link_faces:
-                            if bmf[layer_smoothing_group] \
-                                    != surround_face_smoothing_group_index:
-                                surround_face_smoothing_group_index \
-                                        = bmf[layer_smoothing_group]
-                                break;
-                        if surround_face_smoothing_group_index \
-                                == self.smoothing_group_index:
-                            is_border = False
-                    bme.seam = is_border
-                    bme.smooth = not is_border
-        bm.free()
-        enable_edit_mode(False)
-        enable_edit_mode(True)
-        return {'FINISHED', }
-
-
-class Ms3dGroupOperator(Operator):
-    bl_idname = Ms3dUi.OPT_GROUP_APPLY
-    bl_label = ms3d_str['BL_LABEL_GROUP_OPERATOR']
-    bl_options = {'INTERNAL', }
-
-    mode = EnumProperty(
-            items=( ('', "", ""),
-                    ('ADD_GROUP',
-                            ms3d_str['ENUM_ADD_GROUP_1'],
-                            ms3d_str['ENUM_ADD_GROUP_2']),
-                    ('REMOVE_GROUP',
-                            ms3d_str['ENUM_REMOVE_GROUP_1'],
-                            ms3d_str['ENUM_REMOVE_GROUP_2']),
-                    ('ASSIGN',
-                            ms3d_str['ENUM_ASSIGN_1'],
-                            ms3d_str['ENUM_ASSIGN_2_GROUP']),
-                    ('REMOVE',
-                            ms3d_str['ENUM_REMOVE_1'],
-                            ms3d_str['ENUM_REMOVE_2_GROUP']),
-                    ('SELECT',
-                            ms3d_str['ENUM_SELECT_1'],
-                            ms3d_str['ENUM_SELECT_2_GROUP']),
-                    ('DESELECT',
-                            ms3d_str['ENUM_DESELECT_1'],
-                            ms3d_str['ENUM_DESELECT_2_GROUP']),
-                    ),
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                and context.mode == 'EDIT_MESH'
-                #and context.object.data.ms3d.selected_group_index != -1
-                )
-
-    def execute(self, context):
-        custom_data = context.object.data.ms3d
-        blender_mesh = context.object.data
-        bm = None
-        bm = from_edit_mesh(blender_mesh)
-
-        if self.mode == 'ADD_GROUP':
-            item = custom_data.create_group()
-            layer_group = bm.faces.layers.int.get(
-                    ms3d_str['OBJECT_LAYER_GROUP'])
-            if layer_group is None:
-                bm.faces.layers.int.new(ms3d_str['OBJECT_LAYER_GROUP'])
-
-        elif self.mode == 'REMOVE_GROUP':
-            custom_data.remove_group()
-
-        elif (custom_data.selected_group_index >= 0) and (
-                custom_data.selected_group_index < len(custom_data.groups)):
-            if self.mode in {'SELECT', 'DESELECT', }:
-                layer_group = bm.faces.layers.int.get(
-                        ms3d_str['OBJECT_LAYER_GROUP'])
-                if layer_group is not None:
-                    is_select = (self.mode == 'SELECT')
-                    id = custom_data.groups[
-                            custom_data.selected_group_index].id
-                    for bmf in bm.faces:
-                        if bmf[layer_group] == id:
-                            bmf.select_set(is_select)
-
-            elif self.mode in {'ASSIGN', 'REMOVE', }:
-                layer_group = bm.faces.layers.int.get(
-                        ms3d_str['OBJECT_LAYER_GROUP'])
-                if layer_group is None:
-                    layer_group = bm.faces.layers.int.new(
-                            ms3d_str['OBJECT_LAYER_GROUP'])
-
-                is_assign = (self.mode == 'ASSIGN')
-                id = custom_data.groups[custom_data.selected_group_index].id
-                for bmf in bm.faces:
-                    if bmf.select:
-                        if is_assign:
-                            bmf[layer_group] = id
-                        else:
-                            bmf[layer_group] = -1
-        if bm is not None:
-            bm.free()
-        enable_edit_mode(False)
-        enable_edit_mode(True)
-        return {'FINISHED', }
-
-
-class Ms3dMaterialOperator(Operator):
-    bl_idname = Ms3dUi.OPT_MATERIAL_APPLY
-    bl_label = ms3d_str['BL_LABEL_MATERIAL_OPERATOR']
-    bl_options = {'INTERNAL', }
-
-    mode = EnumProperty(
-            items=( ('', "", ""),
-                    ('FROM_BLENDER',
-                            ms3d_str['ENUM_FROM_BLENDER_1'],
-                            ms3d_str['ENUM_FROM_BLENDER_2']),
-                    ('TO_BLENDER',
-                            ms3d_str['ENUM_TO_BLENDER_1'],
-                            ms3d_str['ENUM_TO_BLENDER_2']),
-                    ),
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                and context.material
-                and context.material.ms3d is not None
-                )
-
-    def execute(self, context):
-        blender_material = context.active_object.active_material
-        ms3d_material = blender_material.ms3d
-
-        if self.mode == 'FROM_BLENDER':
-            Ms3dMaterialHelper.copy_from_blender(self, context, ms3d_material, blender_material)
-            pass
-
-        elif self.mode == 'TO_BLENDER':
-            # not implemented
-            pass
-
-        return {'FINISHED', }
-
-    # entrypoint for option via UI
-    def invoke(self, context, event):
-        return context.window_manager.invoke_props_dialog(self)
-
-
-###############################################################################
-class Ms3dGroupProperties(PropertyGroup):
-    name = StringProperty(
-            name=ms3d_str['PROP_NAME_NAME'],
-            description=ms3d_str['PROP_DESC_GROUP_NAME'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    flags = EnumProperty(
-            name=ms3d_str['PROP_NAME_FLAGS'],
-            description=ms3d_str['PROP_DESC_FLAGS_GROUP'],
-            items=(#(Ms3dUi.FLAG_NONE, ms3d_str['ENUM_FLAG_NONE_1'],
-                   #         ms3d_str['ENUM_FLAG_NONE_2'],
-                   #         Ms3dSpec.FLAG_NONE),
-                    (Ms3dUi.FLAG_SELECTED,
-                            ms3d_str['ENUM_FLAG_SELECTED_1'],
-                            ms3d_str['ENUM_FLAG_SELECTED_2'],
-                            Ms3dSpec.FLAG_SELECTED),
-                    (Ms3dUi.FLAG_HIDDEN,
-                            ms3d_str['ENUM_FLAG_HIDDEN_1'],
-                            ms3d_str['ENUM_FLAG_HIDDEN_2'],
-                            Ms3dSpec.FLAG_HIDDEN),
-                    (Ms3dUi.FLAG_SELECTED2,
-                            ms3d_str['ENUM_FLAG_SELECTED2_1'],
-                            ms3d_str['ENUM_FLAG_SELECTED2_2'],
-                            Ms3dSpec.FLAG_SELECTED2),
-                    (Ms3dUi.FLAG_DIRTY,
-                            ms3d_str['ENUM_FLAG_DIRTY_1'],
-                            ms3d_str['ENUM_FLAG_DIRTY_2'],
-                            Ms3dSpec.FLAG_DIRTY),
-                    (Ms3dUi.FLAG_ISKEY,
-                            ms3d_str['ENUM_FLAG_ISKEY_1'],
-                            ms3d_str['ENUM_FLAG_ISKEY_2'],
-                            Ms3dSpec.FLAG_ISKEY),
-                    (Ms3dUi.FLAG_NEWLYCREATED,
-                            ms3d_str['ENUM_FLAG_NEWLYCREATED_1'],
-                            ms3d_str['ENUM_FLAG_NEWLYCREATED_2'],
-                            Ms3dSpec.FLAG_NEWLYCREATED),
-                    (Ms3dUi.FLAG_MARKED,
-                            ms3d_str['ENUM_FLAG_MARKED_1'],
-                            ms3d_str['ENUM_FLAG_MARKED_2'],
-                            Ms3dSpec.FLAG_MARKED),
-                    ),
-            default=Ms3dUi.flags_from_ms3d(Ms3dSpec.DEFAULT_FLAGS),
-            options={'ENUM_FLAG', 'ANIMATABLE', },
-            )
-
-    comment = StringProperty(
-            name=ms3d_str['PROP_NAME_COMMENT'],
-            description=ms3d_str['PROP_DESC_COMMENT_GROUP'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    template_list_controls = StringProperty(
-            default="",
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-
-    id = IntProperty(options={'HIDDEN', },)
-
-
-class Ms3dModelProperties(PropertyGroup):
-    name = StringProperty(
-            name=ms3d_str['PROP_NAME_NAME'],
-            description=ms3d_str['PROP_DESC_NAME_MODEL'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    joint_size = FloatProperty(
-            name=ms3d_str['PROP_NAME_JOINT_SIZE'],
-            description=ms3d_str['PROP_DESC_JOINT_SIZE'],
-            min=Ms3dUi.PROP_JOINT_SIZE_MIN, max=Ms3dUi.PROP_JOINT_SIZE_MAX,
-            precision=Ms3dUi.PROP_JOINT_SIZE_PRECISION, step=Ms3dUi.PROP_JOINT_SIZE_STEP,
-            default=Ms3dUi.PROP_DEFAULT_JOINT_SIZE,
-            subtype='FACTOR',
-            #options={'HIDDEN', },
-            )
-
-    transparency_mode = EnumProperty(
-            name=ms3d_str['PROP_NAME_TRANSPARENCY_MODE'],
-            description=ms3d_str['PROP_DESC_TRANSPARENCY_MODE'],
-            items=( (Ms3dUi.MODE_TRANSPARENCY_SIMPLE,
-                            ms3d_str['PROP_MODE_TRANSPARENCY_SIMPLE_1'],
-                            ms3d_str['PROP_MODE_TRANSPARENCY_SIMPLE_2'],
-                            Ms3dSpec.MODE_TRANSPARENCY_SIMPLE),
-                    (Ms3dUi.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES,
-                            ms3d_str['PROP_MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES_1'],
-                            ms3d_str['PROP_MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES_2'],
-                            Ms3dSpec.MODE_TRANSPARENCY_DEPTH_SORTED_TRIANGLES),
-                    (Ms3dUi.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF,
-                            ms3d_str['PROP_MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF_1'],
-                            ms3d_str['PROP_MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF_2'],
-                            Ms3dSpec.MODE_TRANSPARENCY_DEPTH_BUFFERED_WITH_ALPHA_REF),
-                    ),
-            default=Ms3dUi.transparency_mode_from_ms3d(
-                    Ms3dSpec.DEFAULT_MODEL_TRANSPARENCY_MODE),
-            #options={'HIDDEN', },
-            )
-
-    alpha_ref = FloatProperty(
-            name=ms3d_str['PROP_NAME_ALPHA_REF'],
-            description=ms3d_str['PROP_DESC_ALPHA_REF'],
-            min=0, max=1, precision=3, step=0.1,
-            default=0.5,
-            subtype='FACTOR',
-            #options={'HIDDEN', },
-            )
-
-    comment = StringProperty(
-            name=ms3d_str['PROP_NAME_COMMENT'],
-            description=ms3d_str['PROP_DESC_COMMENT_MODEL'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    ##########################
-    # ms3d group handling
-    #
-    apply_mode = EnumProperty(
-            items=( ('ASSIGN',
-                            ms3d_str['ENUM_ASSIGN_1'],
-                            ms3d_str['ENUM_ASSIGN_2_SMOOTHING_GROUP']),
-                    ('SELECT',
-                            ms3d_str['ENUM_SELECT_1'],
-                            ms3d_str['ENUM_SELECT_2_SMOOTHING_GROUP']),
-                    ('DESELECT',
-                            ms3d_str['ENUM_DESELECT_1'],
-                            ms3d_str['ENUM_DESELECT_2_SMOOTHING_GROUP']),
-                    ),
-            default='SELECT',
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-
-    selected_group_index = IntProperty(
-            default=-1,
-            min=-1,
-            options={'HIDDEN', 'SKIP_SAVE', },
-            )
-    #
-    # ms3d group handling
-    ##########################
-
-    groups = CollectionProperty(
-            type=Ms3dGroupProperties,
-            #options={'HIDDEN', },
-            )
-
-
-    def generate_unique_id(self):
-        return randrange(1, 0x7FFFFFFF) # pseudo unique id
-
-    def create_group(self):
-        item = self.groups.add()
-        item.id = self.generate_unique_id()
-        length = len(self.groups)
-        self.selected_group_index = length - 1
-
-        item.name = ms3d_str['STRING_FORMAT_GROUP'].format(length)
-        return item
-
-    def remove_group(self):
-        index = self.selected_group_index
-        length = len(self.groups)
-        if (index >= 0) and (index < length):
-            if index > 0 or length == 1:
-                self.selected_group_index = index - 1
-            self.groups.remove(index)
-
-
-class Ms3dArmatureProperties(PropertyGroup):
-    name = StringProperty(
-            name=ms3d_str['PROP_NAME_NAME'],
-            description=ms3d_str['PROP_DESC_NAME_ARMATURE'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-
-class Ms3dJointProperties(PropertyGroup):
-    name = StringProperty(
-            name=ms3d_str['PROP_NAME_NAME'],
-            description=ms3d_str['PROP_DESC_NAME_JOINT'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    flags = EnumProperty(
-            name=ms3d_str['PROP_NAME_FLAGS'],
-            description=ms3d_str['PROP_DESC_FLAGS_JOINT'],
-            items=(#(Ms3dUi.FLAG_NONE,
-                   #         ms3d_str['ENUM_FLAG_NONE_1'],
-                   #         ms3d_str['ENUM_FLAG_NONE_2'],
-                   #         Ms3dSpec.FLAG_NONE),
-                    (Ms3dUi.FLAG_SELECTED,
-                            ms3d_str['ENUM_FLAG_SELECTED_1'],
-                            ms3d_str['ENUM_FLAG_SELECTED_2'],
-                            Ms3dSpec.FLAG_SELECTED),
-                    (Ms3dUi.FLAG_HIDDEN,
-                            ms3d_str['ENUM_FLAG_HIDDEN_1'],
-                            ms3d_str['ENUM_FLAG_HIDDEN_2'],
-                            Ms3dSpec.FLAG_HIDDEN),
-                    (Ms3dUi.FLAG_SELECTED2,
-                            ms3d_str['ENUM_FLAG_SELECTED2_1'],
-                            ms3d_str['ENUM_FLAG_SELECTED2_2'],
-                            Ms3dSpec.FLAG_SELECTED2),
-                    (Ms3dUi.FLAG_DIRTY,
-                            ms3d_str['ENUM_FLAG_DIRTY_1'],
-                            ms3d_str['ENUM_FLAG_DIRTY_2'],
-                            Ms3dSpec.FLAG_DIRTY),
-                    (Ms3dUi.FLAG_ISKEY,
-                            ms3d_str['ENUM_FLAG_ISKEY_1'],
-                            ms3d_str['ENUM_FLAG_ISKEY_2'],
-                            Ms3dSpec.FLAG_ISKEY),
-                    (Ms3dUi.FLAG_NEWLYCREATED,
-                            ms3d_str['ENUM_FLAG_NEWLYCREATED_1'],
-                            ms3d_str['ENUM_FLAG_NEWLYCREATED_2'],
-                            Ms3dSpec.FLAG_NEWLYCREATED),
-                    (Ms3dUi.FLAG_MARKED,
-                            ms3d_str['ENUM_FLAG_MARKED_1'],
-                            ms3d_str['ENUM_FLAG_MARKED_2'],
-                            Ms3dSpec.FLAG_MARKED),
-                    ),
-            default=Ms3dUi.flags_from_ms3d(Ms3dSpec.DEFAULT_FLAGS),
-            options={'ENUM_FLAG', 'ANIMATABLE', },
-            )
-
-    color = FloatVectorProperty(
-            name=ms3d_str['PROP_NAME_COLOR'],
-            description=ms3d_str['PROP_DESC_COLOR_JOINT'],
-            subtype='COLOR', size=3, min=0, max=1, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_JOINT_COLOR,
-            #options={'HIDDEN', },
-            )
-
-    comment = StringProperty(
-            name=ms3d_str['PROP_NAME_COMMENT'],
-            description=ms3d_str['PROP_DESC_COMMENT_JOINT'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-
-class Ms3dMaterialHelper:
-    @staticmethod
-    def copy_to_blender_ambient(cls, context):
-        pass
-
-    @staticmethod
-    def copy_to_blender_diffuse(cls, context):
-        cls.id_data.diffuse_color = cls.diffuse[0:3]
-        #cls.id_data.diffuse_intensity = cls.diffuse[3]
-        pass
-
-    @staticmethod
-    def copy_to_blender_specular(cls, context):
-        cls.id_data.specular_color = cls.specular[0:3]
-        #cls.id_data.specular_intensity = cls.specular[3]
-        pass
-
-    @staticmethod
-    def copy_to_blender_emissive(cls, context):
-        cls.id_data.emit = (cls.emissive[0] + cls.emissive[1] \
-                + cls.emissive[2]) / 3.0
-        pass
-
-    @staticmethod
-    def copy_to_blender_shininess(cls, context):
-        cls.id_data.specular_hardness = cls.shininess * 4.0
-        pass
-
-    @staticmethod
-    def copy_to_blender_transparency(cls, context):
-        cls.id_data.alpha = 1.0 - cls.transparency
-        pass
-
-
-    @staticmethod
-    def copy_from_blender(cls, context, ms3d_material, blender_material):
-        # copy, bacause of auto update, it would distord original values
-        blender_material_diffuse_color = blender_material.diffuse_color.copy()
-        blender_material_diffuse_intensity = blender_material.diffuse_intensity
-        blender_material_specular_color = blender_material.specular_color.copy()
-        blender_material_specular_intensity = blender_material.specular_intensity
-        blender_material_emit = blender_material.emit
-        blender_material_specular_hardness = blender_material.specular_hardness
-        blender_material_alpha = blender_material.alpha
-
-        blender_material_texture = None
-        for slot in blender_material.texture_slots:
-            if slot and slot.use_map_color_diffuse and slot.texture.type == 'IMAGE':
-                blender_material_texture = slot.texture.image.filepath
-                break
-
-        blender_material_alphamap = None
-        for slot in blender_material.texture_slots:
-            if slot and not slot.use_map_color_diffuse and slot.use_map_alpha and slot.texture.type == 'IMAGE':
-                blender_material_alphamap = slot.texture.image.filepath
-                break
-
-        ms3d_material.diffuse[0] = blender_material_diffuse_color[0]
-        ms3d_material.diffuse[1] = blender_material_diffuse_color[1]
-        ms3d_material.diffuse[2] = blender_material_diffuse_color[2]
-        ms3d_material.diffuse[3] = 1.0
-        ms3d_material.specular[0] = blender_material_specular_color[0]
-        ms3d_material.specular[1] = blender_material_specular_color[1]
-        ms3d_material.specular[2] = blender_material_specular_color[2]
-        ms3d_material.specular[3] = 1.0
-        ms3d_material.emissive[0] = blender_material_emit
-        ms3d_material.emissive[1] = blender_material_emit
-        ms3d_material.emissive[2] = blender_material_emit
-        ms3d_material.emissive[3] = 1.0
-        ms3d_material.shininess = blender_material_specular_hardness / 4.0
-        ms3d_material.transparency = 1.0 - blender_material_alpha
-
-        if blender_material_texture:
-            ms3d_material.texture = blender_material_texture
-        else:
-            ms3d_material.texture = ""
-
-        if blender_material_alphamap:
-            ms3d_material.alphamap = blender_material_alphamap
-        else:
-            ms3d_material.alphamap = ""
-
-
-class Ms3dMaterialProperties(PropertyGroup):
-    name = StringProperty(
-            name=ms3d_str['PROP_NAME_NAME'],
-            description=ms3d_str['PROP_DESC_NAME_MATERIAL'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-    ambient = FloatVectorProperty(
-            name=ms3d_str['PROP_NAME_AMBIENT'],
-            description=ms3d_str['PROP_DESC_AMBIENT'],
-            subtype='COLOR', size=4, min=0, max=1, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_MATERIAL_AMBIENT,
-            update=Ms3dMaterialHelper.copy_to_blender_ambient,
-            #options={'HIDDEN', },
-            )
-
-    diffuse = FloatVectorProperty(
-            name=ms3d_str['PROP_NAME_DIFFUSE'],
-            description=ms3d_str['PROP_DESC_DIFFUSE'],
-            subtype='COLOR', size=4, min=0, max=1, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_MATERIAL_DIFFUSE,
-            update=Ms3dMaterialHelper.copy_to_blender_diffuse,
-            #options={'HIDDEN', },
-            )
-
-    specular = FloatVectorProperty(
-            name=ms3d_str['PROP_NAME_SPECULAR'],
-            description=ms3d_str['PROP_DESC_SPECULAR'],
-            subtype='COLOR', size=4, min=0, max=1, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_MATERIAL_SPECULAR,
-            update=Ms3dMaterialHelper.copy_to_blender_specular,
-            #options={'HIDDEN', },
-            )
-
-    emissive = FloatVectorProperty(
-            name=ms3d_str['PROP_NAME_EMISSIVE'],
-            description=ms3d_str['PROP_DESC_EMISSIVE'],
-            subtype='COLOR', size=4, min=0, max=1, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_MATERIAL_EMISSIVE,
-            update=Ms3dMaterialHelper.copy_to_blender_emissive,
-            #options={'HIDDEN', },
-            )
-
-    shininess = FloatProperty(
-            name=ms3d_str['PROP_NAME_SHININESS'],
-            description=ms3d_str['PROP_DESC_SHININESS'],
-            min=0, max=Ms3dSpec.MAX_MATERIAL_SHININESS, precision=3, step=0.1,
-            default=Ms3dSpec.DEFAULT_MATERIAL_SHININESS,
-            subtype='FACTOR',
-            update=Ms3dMaterialHelper.copy_to_blender_shininess,
-            #options={'HIDDEN', },
-            )
-
-    transparency = FloatProperty(
-            name=ms3d_str['PROP_NAME_TRANSPARENCY'],
-            description=ms3d_str['PROP_DESC_TRANSPARENCY'],
-            min=0, max=1, precision=3, step=0.1,
-            default=0,
-            subtype='FACTOR',
-            update=Ms3dMaterialHelper.copy_to_blender_transparency,
-            #options={'HIDDEN', },
-            )
-
-    mode = EnumProperty(
-            name=ms3d_str['PROP_NAME_MODE'],
-            description=ms3d_str['PROP_DESC_MODE_TEXTURE'],
-            items=( (Ms3dUi.FLAG_TEXTURE_COMBINE_ALPHA,
-                            ms3d_str['PROP_FLAG_TEXTURE_COMBINE_ALPHA_1'],
-                            ms3d_str['PROP_FLAG_TEXTURE_COMBINE_ALPHA_2'],
-                            Ms3dSpec.FLAG_TEXTURE_COMBINE_ALPHA),
-                    (Ms3dUi.FLAG_TEXTURE_HAS_ALPHA,
-                            ms3d_str['PROP_FLAG_TEXTURE_HAS_ALPHA_1'],
-                            ms3d_str['PROP_FLAG_TEXTURE_HAS_ALPHA_2'],
-                            Ms3dSpec.FLAG_TEXTURE_HAS_ALPHA),
-                    (Ms3dUi.FLAG_TEXTURE_SPHERE_MAP,
-                            ms3d_str['PROP_FLAG_TEXTURE_SPHERE_MAP_1'],
-                            ms3d_str['PROP_FLAG_TEXTURE_SPHERE_MAP_2'],
-                            Ms3dSpec.FLAG_TEXTURE_SPHERE_MAP),
-                    ),
-            default=Ms3dUi.texture_mode_from_ms3d(
-                    Ms3dSpec.DEFAULT_MATERIAL_MODE),
-            options={'ANIMATABLE', 'ENUM_FLAG', },
-            )
-
-    texture = StringProperty(
-            name=ms3d_str['PROP_NAME_TEXTURE'],
-            description=ms3d_str['PROP_DESC_TEXTURE'],
-            default="",
-            subtype = 'FILE_PATH'
-            #options={'HIDDEN', },
-            )
-
-    alphamap = StringProperty(
-            name=ms3d_str['PROP_NAME_ALPHAMAP'],
-            description=ms3d_str['PROP_DESC_ALPHAMAP'],
-            default="",
-            subtype = 'FILE_PATH'
-            #options={'HIDDEN', },
-            )
-
-    comment = StringProperty(
-            name=ms3d_str['PROP_NAME_COMMENT'],
-            description=ms3d_str['PROP_DESC_COMMENT_MATERIAL'],
-            default="",
-            #options={'HIDDEN', },
-            )
-
-
-###############################################################################
-class Ms3dMeshPanel(Panel):
-    bl_label = ms3d_str['LABEL_PANEL_MODEL']
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'object'
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                )
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(icon='PLUGIN')
-
-    def draw(self, context):
-        layout = self.layout
-        custom_data = context.object.data.ms3d
-
-        row = layout.row()
-        row.prop(custom_data, 'name')
-
-        col = layout.column()
-        row = col.row()
-        row.prop(custom_data, 'joint_size')
-        row = col.row()
-        row.prop(custom_data, 'transparency_mode')
-        row = col.row()
-        row.prop(custom_data, 'alpha_ref', )
-
-        row = layout.row()
-        row.prop(custom_data, 'comment')
-
-
-class Ms3dMaterialPanel(Panel):
-    bl_label = ms3d_str['LABEL_PANEL_MATERIALS']
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'material'
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                and context.material
-                and context.material.ms3d is not None
-                )
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(icon='PLUGIN')
-
-    def draw(self, context):
-        layout = self.layout
-        custom_data = context.material.ms3d
-
-        row = layout.row()
-        row.prop(custom_data, 'name')
-
-        col = layout.column()
-        row = col.row()
-        row.prop(custom_data, 'diffuse')
-        row.prop(custom_data, 'ambient')
-        row = col.row()
-        row.prop(custom_data, 'specular')
-        row.prop(custom_data, 'emissive')
-        row = col.row()
-        row.prop(custom_data, 'shininess')
-        row.prop(custom_data, 'transparency')
-
-        col = layout.column()
-        row = col.row()
-        row.prop(custom_data, 'texture')
-        row = col.row()
-        row.prop(custom_data, 'alphamap')
-        row = col.row()
-        row.prop(custom_data, 'mode', expand=True)
-
-        row = layout.row()
-        row.prop(custom_data, 'comment')
-
-        layout.row().operator(
-                Ms3dUi.OPT_MATERIAL_APPLY,
-                text=ms3d_str['ENUM_FROM_BLENDER_1'], icon='APPEND_BLEND').mode = 'FROM_BLENDER'
-
-        # not implemented
-        #layout.row().operator(
-        #        Ms3dUi.OPT_MATERIAL_APPLY,
-        #        text=ms3d_str['ENUM_TO_BLENDER_1'], icon='IMPORT').mode = 'TO_BLENDER'
-        pass
-
-
-class Ms3dBonePanel(Panel):
-    bl_label = ms3d_str['LABEL_PANEL_JOINTS']
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'bone'
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object.type in {'ARMATURE', }
-                and context.active_bone
-                and isinstance(context.active_bone, Bone)
-                and context.active_bone.ms3d is not None
-                )
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(icon='PLUGIN')
-
-    def draw(self, context):
-        import bpy
-        layout = self.layout
-        custom_data = context.active_bone.ms3d
-
-        row = layout.row()
-        row.prop(custom_data, 'name')
-        row = layout.row()
-        row.prop(custom_data, 'flags', expand=True)
-        row = layout.row()
-        row.prop(custom_data, 'color')
-        row = layout.row()
-        row.prop(custom_data, 'comment')
-
-
-class Ms3dGroupPanel(Panel):
-    bl_label = ms3d_str['LABEL_PANEL_GROUPS']
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'data'
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                )
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(icon='PLUGIN')
-
-    def draw(self, context):
-        layout = self.layout
-        custom_data = context.object.data.ms3d
-        layout.enabled = (context.mode == 'EDIT_MESH') and (
-                context.tool_settings.mesh_select_mode[2])
-
-        row = layout.row()
-        row.template_list(
-                custom_data, 'groups',
-                custom_data, 'selected_group_index',
-                prop_list='template_list_controls',
-                rows=2,
-                type='DEFAULT',
-                )
-
-        col = row.column(align=True)
-        col.operator(
-                Ms3dUi.OPT_GROUP_APPLY,
-                text="", icon='ZOOMIN').mode = 'ADD_GROUP'
-        col.operator(
-                Ms3dUi.OPT_GROUP_APPLY,
-                text="", icon='ZOOMOUT').mode = 'REMOVE_GROUP'
-
-        index = custom_data.selected_group_index
-        collection = custom_data.groups
-        if (index >= 0 and index < len(collection)):
-            row = layout.row()
-            row.prop(collection[index], 'name')
-
-            row = layout.row()
-            subrow = row.row(align=True)
-            subrow.operator(
-                    Ms3dUi.OPT_GROUP_APPLY,
-                    text=ms3d_str['ENUM_ASSIGN_1']).mode = 'ASSIGN'
-            subrow.operator(
-                    Ms3dUi.OPT_GROUP_APPLY,
-                    text=ms3d_str['ENUM_REMOVE_1']).mode = 'REMOVE'
-            subrow = row.row(align=True)
-            subrow.operator(
-                    Ms3dUi.OPT_GROUP_APPLY,
-                    text=ms3d_str['ENUM_SELECT_1']).mode = 'SELECT'
-            subrow.operator(
-                    Ms3dUi.OPT_GROUP_APPLY,
-                    text=ms3d_str['ENUM_DESELECT_1']).mode = 'DESELECT'
-
-            row = layout.row()
-            row.prop(collection[index], 'flags', expand=True)
-
-            row = layout.row()
-            row.prop(collection[index], 'comment')
-
-
-class Ms3dSmoothingGroupPanel(Panel):
-    bl_label = ms3d_str['BL_LABEL_PANEL_SMOOTHING_GROUP']
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'data'
-
-    def preview(self, dict, id, text):
-        item = dict.get(id)
-        if item is None:
-            return "{}".format(text)
-        elif item:
-            return "{}:".format(text)
-
-        return "{}.".format(text)
-
-    def build_preview(self, context):
-        dict = {}
-        if (context.mode != 'EDIT_MESH') or (
-                not context.tool_settings.mesh_select_mode[2]):
-            return dict
-
-        custom_data = context.object.data.ms3d
-        blender_mesh = context.object.data
-        bm = from_edit_mesh(blender_mesh)
-        layer_smoothing_group = bm.faces.layers.int.get(
-                ms3d_str['OBJECT_LAYER_SMOOTHING_GROUP'])
-        if layer_smoothing_group is not None:
-            for bmf in bm.faces:
-                item = dict.get(bmf[layer_smoothing_group])
-                if item is None:
-                    dict[bmf[layer_smoothing_group]] = bmf.select
-                else:
-                    if not item:
-                        dict[bmf[layer_smoothing_group]] = bmf.select
-        return dict
-
-    @classmethod
-    def poll(cls, context):
-        return (context
-                and context.object
-                and context.object.type in {'MESH', }
-                and context.object.data
-                and context.object.data.ms3d is not None
-                )
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(icon='PLUGIN')
-
-    def draw(self, context):
-        dict = self.build_preview(context)
-
-        custom_data = context.object.data.ms3d
-        layout = self.layout
-        layout.enabled = (context.mode == 'EDIT_MESH') and (
-                context.tool_settings.mesh_select_mode[2])
-
-        row = layout.row()
-        subrow = row.row()
-        subrow.prop(custom_data, 'apply_mode', expand=True)
-
-        col = layout.column(align=True)
-        subrow = col.row(align=True)
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 1, "1")
-                ).smoothing_group_index = 1
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 2, "2")
-                ).smoothing_group_index = 2
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 3, "3")
-                ).smoothing_group_index = 3
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 4, "4")
-                ).smoothing_group_index = 4
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 5, "5")
-                ).smoothing_group_index = 5
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 6, "6")
-                ).smoothing_group_index = 6
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 7, "7")
-                ).smoothing_group_index = 7
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 8, "8")
-                ).smoothing_group_index = 8
-        subrow = col.row(align=True)
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 9, "9")
-                ).smoothing_group_index = 9
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 10, "10")
-                ).smoothing_group_index = 10
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 11, "11")
-                ).smoothing_group_index = 11
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 12, "12")
-                ).smoothing_group_index = 12
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 13, "13")
-                ).smoothing_group_index = 13
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 14, "14")
-                ).smoothing_group_index = 14
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 15, "15")
-                ).smoothing_group_index = 15
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 16, "16")
-                ).smoothing_group_index = 16
-        subrow = col.row(align=True)
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 17, "17")
-                ).smoothing_group_index = 17
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 18, "18")
-                ).smoothing_group_index = 18
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 19, "19")
-                ).smoothing_group_index = 19
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 20, "20")
-                ).smoothing_group_index = 20
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 21, "21")
-                ).smoothing_group_index = 21
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 22, "22")
-                ).smoothing_group_index = 22
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 23, "23")
-                ).smoothing_group_index = 23
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 24, "24")
-                ).smoothing_group_index = 24
-        subrow = col.row(align=True)
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 25, "25")
-                ).smoothing_group_index = 25
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 26, "26")
-                ).smoothing_group_index = 26
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 27, "27")
-                ).smoothing_group_index = 27
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 28, "28")
-                ).smoothing_group_index = 28
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 29, "29")
-                ).smoothing_group_index = 29
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 30, "30")
-                ).smoothing_group_index = 30
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 31, "31")
-                ).smoothing_group_index = 31
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 32, "32")
-                ).smoothing_group_index = 32
-        subrow = col.row()
-        subrow.operator(
-                Ms3dUi.OPT_SMOOTHING_GROUP_APPLY,
-                text=self.preview(dict, 0, ms3d_str['LABEL_PANEL_BUTTON_NONE'])
-                ).smoothing_group_index = 0
-
-
-###############################################################################
-class Ms3dSetSceneToMetricOperator(Operator):
-    """ . """
-    bl_idname = 'io_scene_ms3d.set_sence_to_metric'
-    bl_label = ms3d_str['BL_LABEL_SET_SCENE_TO_METRIC']
-    bl_description = ms3d_str['BL_DESC_SET_SCENE_TO_METRIC']
-
-
-    #
-    @classmethod
-    def poll(cls, context):
-        return True
-
-    # entrypoint for option
-    def execute(self, context):
-        return self.set_sence_to_metric(context)
-
-    # entrypoint for option via UI
-    def invoke(self, context, event):
-        return context.window_manager.invoke_props_dialog(self)
-
-
-    ###########################################################################
-    def set_sence_to_metric(self, context):
-        set_sence_to_metric(context)
-        return {"FINISHED"}
-
-
-###############################################################################
-def register():
-    register_class(Ms3dSetSceneToMetricOperator)
-    register_class(Ms3dGroupProperties)
-    register_class(Ms3dModelProperties)
-    register_class(Ms3dArmatureProperties)
-    register_class(Ms3dJointProperties)
-    register_class(Ms3dMaterialProperties)
-    inject_properties()
-    register_class(Ms3dSetSmoothingGroupOperator)
-    register_class(Ms3dGroupOperator)
-
-def unregister():
-    unregister_class(Ms3dGroupOperator)
-    unregister_class(Ms3dSetSmoothingGroupOperator)
-    delete_properties()
-    unregister_class(Ms3dMaterialProperties)
-    unregister_class(Ms3dJointProperties)
-    unregister_class(Ms3dArmatureProperties)
-    unregister_class(Ms3dModelProperties)
-    unregister_class(Ms3dGroupProperties)
-    unregister_class(Ms3dSetSceneToMetricOperator)
-
-def inject_properties():
-    Mesh.ms3d = PointerProperty(type=Ms3dModelProperties)
-    Armature.ms3d = PointerProperty(type=Ms3dArmatureProperties)
-    Bone.ms3d = PointerProperty(type=Ms3dJointProperties)
-    Material.ms3d = PointerProperty(type=Ms3dMaterialProperties)
-    Action.ms3d = PointerProperty(type=Ms3dArmatureProperties)
-    Group.ms3d = PointerProperty(type=Ms3dGroupProperties)
-
-def delete_properties():
-    del Mesh.ms3d
-    del Armature.ms3d
-    del Bone.ms3d
-    del Material.ms3d
-    del Action.ms3d
-    del Group.ms3d
-
-###############################################################################
-
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_utils.py b/release/scripts/addons_contrib/io_scene_ms3d/ms3d_utils.py
deleted file mode 100644
index 44b579c..0000000
--- a/release/scripts/addons_contrib/io_scene_ms3d/ms3d_utils.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-
-
-# ##### BEGIN COPYRIGHT BLOCK #####
-#
-# initial script copyright (c)2011,2012 Alexander Nussbaumer
-#
-# ##### END COPYRIGHT BLOCK #####
-
-
-#import python stuff
-from os import (
-        path
-        )
-
-
-# import io_scene_ms3d stuff
-from io_scene_ms3d.ms3d_strings import (
-        ms3d_str,
-        )
-
-
-#import blender stuff
-from bpy import (
-        context,
-        ops,
-        )
-
-
-###############################################################################
-def enable_edit_mode(enable, blender_context=context):
-    if blender_context.active_object is None \
-            or not blender_context.active_object.type in {'MESH', 'ARMATURE', }:
-        return
-
-    if enable:
-        modeString = 'EDIT'
-    else:
-        modeString = 'OBJECT'
-
-    if ops.object.mode_set.poll():
-        ops.object.mode_set(mode=modeString)
-
-
-###############################################################################
-def enable_pose_mode(enable, blender_context=context):
-    if blender_context.active_object is None \
-            or not blender_context.active_object.type in {'ARMATURE', }:
-        return
-
-    if enable:
-        modeString = 'POSE'
-    else:
-        modeString = 'OBJECT'
-
-    if ops.object.mode_set.poll():
-        ops.object.mode_set(mode=modeString)
-
-
-###############################################################################
-def select_all(select):
-    if select:
-        actionString = 'SELECT'
-    else:
-        actionString = 'DESELECT'
-
-    if ops.object.select_all.poll():
-        ops.object.select_all(action=actionString)
-
-    if ops.mesh.select_all.poll():
-        ops.mesh.select_all(action=actionString)
-
-    if ops.pose.select_all.poll():
-        ops.pose.select_all(action=actionString)
-
-
-###############################################################################
-def pre_setup_environment(porter, blender_context):
-    # inject undo to porter
-    # and turn off undo
-    porter.undo = blender_context.user_preferences.edit.use_global_undo
-    blender_context.user_preferences.edit.use_global_undo = False
-
-    # inject active_object to self
-    porter.active_object = blender_context.scene.objects.active
-
-    # change to a well defined mode
-    enable_edit_mode(True)
-
-    # enable face-selection-mode
-    blender_context.tool_settings.mesh_select_mode = (False, False, True)
-
-    # change back to object mode
-    enable_edit_mode(False)
-
-    blender_context.scene.update()
-
-    # inject splitted filepath
-    porter.filepath_splitted = path.split(porter.options.filepath)
-
-
-###############################################################################
-def post_setup_environment(porter, blender_context):
-    # restore active object
-    blender_context.scene.objects.active = porter.active_object
-
-    if not blender_context.scene.objects.active \
-            and blender_context.selected_objects:
-        blender_context.scene.objects.active \
-                = blender_context.selected_objects[0]
-
-    # restore pre operator undo state
-    blender_context.user_preferences.edit.use_global_undo = porter.undo
-
-
-###############################################################################
-def get_edge_split_modifier_add_if(blender_mesh_object):
-    blender_modifier = blender_mesh_object.modifiers.get(
-            ms3d_str['OBJECT_MODIFIER_SMOOTHING_GROUP'])
-
-    if blender_modifier is None:
-        blender_modifier = blender_mesh_object.modifiers.new(
-                ms3d_str['OBJECT_MODIFIER_SMOOTHING_GROUP'],
-                type='EDGE_SPLIT')
-        blender_modifier.show_expanded = False
-        blender_modifier.use_edge_angle = False
-        blender_modifier.use_edge_sharp = True
-
-        blender_mesh_object.data.show_edge_seams = True
-        blender_mesh_object.data.show_edge_sharp = True
-
-    return blender_modifier
-
-
-###########################################################################
-def rotation_matrix(v_track, v_up):
-    ## rotation matrix from two vectors
-    ## http://gamedev.stackexchange.com/questions/20097/how-to-calculate-a-3x3-rotation-matrix-from-2-direction-vectors
-    ## http://www.fastgraph.com/makegames/3drotation/
-    matrix = Matrix().to_3x3()
-
-    c1 = v_track
-    c1.normalize()
-
-    c0 = c1.cross(v_up)
-    c0.normalize()
-
-    c2 = c0.cross(c1)
-    c2.normalize()
-
-    matrix.col[0] = c0
-    matrix.col[1] = c1
-    matrix.col[2] = c2
-
-    return matrix
-
-
-###########################################################################
-def matrix_difference(mat_src, mat_dst):
-    mat_dst_inv = mat_dst.copy()
-    mat_dst_inv.invert()
-    return mat_dst_inv * mat_src
-
-
-###############################################################################
-def set_sence_to_metric(context):
-    try:
-        # set metrics
-        context.scene.unit_settings.system = 'METRIC'
-        context.scene.unit_settings.system_rotation = 'DEGREES'
-        context.scene.unit_settings.scale_length = 0.001 # 1.0mm
-        context.scene.unit_settings.use_separate = False
-        context.tool_settings.normal_size = 1.0 # 1.0mm
-
-        # set all 3D views to texture shaded
-        # and set up the clipping
-        for screen in context.blend_data.screens:
-            for area in screen.areas:
-                if (area.type != 'VIEW_3D'):
-                    continue
-
-                for space in area.spaces:
-                    if (space.type != 'VIEW_3D'):
-                        continue
-
-                    #space.viewport_shade = 'SOLID'
-                    space.show_textured_solid = True
-                    space.clip_start = 0.1 # 0.1mm
-                    space.clip_end = 1000000.0 # 1km
-            #screen.scene.game_settings.material_mode = 'MULTITEXTURE'
-
-    except Exception:
-        raise
-
-    else:
-        pass
-
-
-###############################################################################
-
-###############################################################################
-#234567890123456789012345678901234567890123456789012345678901234567890123456789
-#--------1---------2---------3---------4---------5---------6---------7---------
-# ##### END OF FILE #####
diff --git a/release/scripts/addons_contrib/io_scene_open_street_map.py b/release/scripts/addons_contrib/io_scene_open_street_map.py
deleted file mode 100644
index 3e7b3dd..0000000
--- a/release/scripts/addons_contrib/io_scene_open_street_map.py
+++ /dev/null
@@ -1,370 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Open Street Map (.osm)",
-    "author": "Michael Anthrax Schlachter, ideasman42, littleneo",
-    "version": (0, 2),
-    "blender": (2, 6, 3),
-    "location": "File > Import",
-    "description": "Load Open Street Map File",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Import-Export"}
-
-# originally written for blender 2.4x by (manthrax _at_ hotmail.com),
-# updated for blender 2.6x by ideasman42
-# If you use it for something cool, send me an email and let me know!
-
-# littleneo (v0.2 - september 2012) :
-
-## added a lat/lon to UTM conversion option geoToUTM() :
-# the generated mesh now almost match the exported osm image of the same area, just play with scale and rotate a bit.
-
-## added ability to retrieve openstreet tags as vertex groups :
-# add every way id as a vgroup if the tag exists in osmkeys.
-# add nodes id as vgroup  if the tag value pair exists in osmvals.
-# any elligible is added in the corresponding osmkeys or value ('_V_...'  vgroup
-
-## added bpy access to addon : 
-# bpy.ops.import_mesh.osm(filepath="....", scale=100, utm=False, tag=False)
-
-## added custom properties to generated object so it can be used as source for other osm related scripts :
-# osmfile   path to osm xml file
-# tagged   bool. osm tags included
-# utm       bool. default True
-
-# modified the matrix approximation for utm = False
-# ! corrected lat/lon x/y mismatch
-
-import bpy
-from mathutils import Vector, Matrix
-import math
-from math import radians, sin, cos, tan, sqrt
-
-## add more osm tags here.
-# http://wiki.openstreetmap.org/wiki/Map_Features
-osmkeys = [
-    'highway',
-    'barrier',
-    'wall',
-    'cycleway',
-    'bicycle',
-    'waterway',
-    'railway',
-    'aeroway',
-    'aerialway',
-    'power',
-    'man_made',
-    'building',
-    'leisure',
-    'amenity',
-    'office',
-    'shop',
-    'craft',
-    'emergency',
-    'tourism',
-    'historic',
-    'landuse',
-    'military',
-    'natural',
-]
-
-# just a try for nodes, for retrieving v tag values.
-# keyname must exists in osmkeys
-osmvals = {'highway':['traffic_signals']}
-
-# vertex group name -> vertex group index lookup
-grouplookup = {}
-
-def parseBranch(nodes, bm, nmap, obj, scale=100.0, tag=False, UTM=False):
-    vgroups = bm.verts.layers.deform.verify()
-    tidx = 0
-    inNode = 0
-    dlat = dlong = clat = clong = minlat = maxlat = minlong = maxlong = 0.0
-    for node in nodes:
-        if node.localName == "bounds":
-            if node.hasAttributes():
-                for i in range(node.attributes.length):
-                    at = node.attributes.item(i)
-                    if at.name == "minlat":
-                        minlat = float(at.nodeValue)
-                    elif at.name == "minlon":
-                        minlong = float(at.nodeValue)
-                    elif at.name == "maxlat":
-                        maxlat = float(at.nodeValue)
-                    elif at.name == "maxlon":
-                        maxlong = float(at.nodeValue)
-                dlat = maxlat - minlat
-                dlong = maxlong - minlong
-                clat = (maxlat + minlat) * 0.5
-                clong = (maxlong + minlong) * 0.5
-                
-                if UTM : 
-                    dlong, dlat = geoToUTM(dlong, dlat)
-                    clong, clat = geoToUTM(clong, clat)
-
-                print(dlat, dlong, clat, clong)
-
-        if node.localName == "way":
-            
-            wayid = node.getAttribute('id')
-            nid = None
-            refs = []
-            if tag :
-                group = obj.vertex_groups.new('way_%s'%wayid)
-                gid = len(obj.vertex_groups) -1
-            '''
-            if node.hasAttributes():
-                for i in range(node.attributes.length):
-                    at=node.attributes.item(i)
-                    print(at.name)
-            '''
-
-            if tag :
-                metagid = []
-                for ch in node.childNodes:
-                    if ch.localName == "tag":
-                        key = ch.getAttribute('k')
-                        if key in osmkeys :
-                            metagid.append(grouplookup[key])
-
-            for ch in node.childNodes:
-                if ch.localName == "nd":
-                    for i in range(ch.attributes.length):
-                        at = ch.attributes.item(i)
-                        if at.name == "ref":
-                            vid = int(at.nodeValue)
-                            refs.append(vid)
-                            if tag :
-                                vert = nmap[vid]
-                                weigths = vert[vgroups]
-                                weigths[gid] = 1.0
-                                for mid in metagid : weigths[mid] = 1.0
-                
-            first = 1
-            for r in refs:
-                if first == 0:
-                    edge = bm.edges.get((nmap[pr], nmap[r]))
-                    if edge is None:
-                        edge = bm.edges.new((nmap[pr], nmap[r]))
-                    del edge  # don't actually use it
-                else:
-                    first = 0
-                pr = r
-
-        if node.localName == "node":
-            if node.hasAttributes():
-                nid = node.getAttribute('id')
-                nlong = node.getAttribute('lon')
-                nlat = node.getAttribute('lat')
-
-                # is this test necessary ? maybe for faulty .osm files
-                if (nid != '') and (nlat != '') and (nlong != '') :
-
-                    if UTM : 
-                        nlong, nlat = geoToUTM(float(nlong),float(nlat))
-                    else :
-                        nlat = float(nlat)
-                        nlong = float(nlong)
-                    
-                    x = (nlong - clong) * scale / dlat
-                    y = (nlat - clat) * scale / dlat
-                    vert = bm.verts.new((x, y, 0.0))
-                    nmap[int(nid)] = vert
-                    if tag :
-                        metagid = []
-                        for ch in node.childNodes:
-                            if ch.localName == "tag":
-                                key = ch.getAttribute('k')
-                                val = ch.getAttribute('v')
-                                if key in osmvals and val in osmvals[key] :
-                                    metagid.append(grouplookup[key])
-                                    metagid.append(grouplookup['_V_'+val])
-                                    weigths = vert[vgroups]
-                                    group = obj.vertex_groups.new('node_%s'%nid)
-                                    gid = len(obj.vertex_groups) -1
-                                    weigths[gid] = 1.0
-                                    for mid in metagid : weigths[mid] = 1.0
-
-                else : print('node is missing some elements : %s %s %s'%(nid,nlat,nlong))
-
-        tidx += 1
-        #if tidx > 1000:
-        #    break
-        tidx += parseBranch(node.childNodes, bm, nmap, obj,scale,tag,UTM)
-
-    return tidx
-
-def read(context, filepath, scale=100.0, tag=False, utm=False) :
-    import bmesh
-    from xml.dom import minidom
-
-    # create mesh
-    bm = bmesh.new()
-    name = bpy.path.display_name_from_filepath(filepath)
-    me = bpy.data.meshes.new(name)    
-    obj = bpy.data.objects.new(name, me)
-
-    # osm tags option
-    if tag :
-        tvid = 0
-        for gid, grname in enumerate(osmkeys) :
-            obj.vertex_groups.new('_'+grname)
-            grouplookup[grname] = gid + tvid
-            if grname in osmvals :
-                for val in osmvals[grname] :
-                    tvid += 1
-                    obj.vertex_groups.new('_V_'+val)
-                    grouplookup['_V_'+val] = gid + tvid
-
-    # get xml then feed bmesh
-    print("Reading xml...")
-    xmldoc = minidom.parse(filepath)
-    
-    print("Starting parse: %r..." % filepath)
-    nmap = {}
-    tidx = parseBranch(xmldoc.childNodes, bm, nmap, obj,scale,tag,utm)
-
-    bm.to_mesh(me)
-
-    # fast approximation of utm for not too big area
-    if utm is False :
-        global_matrix = Matrix(((0.65, 0.0, 0.0, 0.0),
-                                (0.0, 1.0, 0.0, 0.0),
-                                (0.0, 0.0, 1.0, 0.0),
-                                (0.0, 0.0, 0.0, 1.0)))
-        me.transform(global_matrix)
-
-    # create the object in the scene
-    scene = context.scene
-    scene.objects.link(obj)
-    scene.objects.active = obj
-    obj.select = True
-
-    # entry points for other addons
-    obj['osmfile'] = filepath
-    obj['tagged'] = tag
-    obj['utm'] = utm
-
-    print("Parse done... %d" % tidx)
-
-    return {'FINISHED'}
-
-# given lat and longitude in degrees, returns x and y in UTM kilometers.
-# accuracy : supposed to be centimeter :)
-# http://fr.wikipedia.org/wiki/Projection_UTM
-# http://fr.wikipedia.org/wiki/WGS_84
-# http://earth-info.nga.mil/GandG/publications/tr8350.2/wgs84fin.pdf
-# http://geodesie.ign.fr/contenu/fichiers/documentation/algorithmes/alg0071.pdf
-def geoToUTM(lon, lat) :
-
-    # if abs(lat) > 80 : lat = 80 #wrong coords.
-    
-    # UTM zone, longitude origin, then lat lon in radians
-    z = int( (lon + 180)  / 6 ) + 1
-    lon0 = radians(6*z - 183)
-    lat = radians(lat)
-    lon = radians(lon)
-
-    # CONSTANTS (see refs.)
-    # rayon de la terre à l'équateur
-    a = 6378.137
-    K0 = 0.9996
-    # flattening consts
-    f  = 0.0033528106647474805  # 1 / 298.257223563
-    e2 = 0.0066943799901413165  # 2*f - f**2
-    e4 = 4.481472345240445e-05  # e2**2
-    e6 = 3.0000678794349315e-07 # e2**3
-
-    # lat0. 10000 for South, 0 for North
-    N0 = 10000 if lat < 0 else 0
-
-    # wiki is your friend (don't ask me Im just a writing monkey.)
-    A = (lon - lon0) * cos(lat)
-    C = (e2 / (1 - e2)) * cos(lat)**2
-    T = tan(lat)**2
-    vlat = 1 / sqrt( 1 - e2 * sin(lat)**2 )
-    slat = (1-(e2/4)-((3*e4)/64)-((5*e6)/256))*lat - (((3*e2)/8)+((3*e4)/32)+((45*e6)/1024))*sin(lat*2) + (((15*e4)/256) + ((45*e6)/1024) )*sin(lat*4) - ((35*e6)/3072)*sin(lat*6)
-    E = 500 + (K0 * a * vlat) * (A + (1-T+C)*((A**3)/6) + (5 - 18 * T + T**2) * ((A**5)/120) )
-    N = N0 + (K0 * a) * ( slat+vlat*tan(lat)* (A**2/2 + (5-T+9*C+4*C**2) * (A**4/24) + (61-58*T+T**2) * A**6/720) )
-    return E,N
-
-## for testing
-#if __name__ == "__main__":
-#    read("/data/downloads/osm_parser/map.osm", bpy.context)
-
-
-# ----------------------------------------------------------------------------
-# blender integration
-
-from bpy.types import Operator
-from bpy_extras.io_utils import ImportHelper
-
-from bpy.props import StringProperty, FloatProperty, BoolProperty
-
-class ImportOSM(Operator, ImportHelper):
-    """Import OSM"""
-    #bl_idname = "import.open_street_map"
-    bl_idname = "import_mesh.osm"
-    bl_label = "Import OpenStreetMap (.osm)"
-
-    # ExportHelper mixin class uses this
-    filename_ext = ".osm"
-
-    filter_glob = StringProperty(
-            default="*.osm",
-            options={'HIDDEN'},
-            )
-
-    # List of operator properties, the attributes will be assigned
-    # to the class instance from the operator settings before calling.
-    scale = FloatProperty(
-            name="Scale",
-            default=100.0,
-            )
-
-    utm = BoolProperty(
-            name="in UTM coordinates",
-            default=True,
-            )
-
-    tag = BoolProperty(
-            name="retrieve .osm tags as vertex groups",
-            default=False,
-            )
-
-    def execute(self, context) :
-        return read(context, self.filepath, self.scale, self.tag, self.utm)
-
-
-# Only needed if you want to add into a dynamic menu
-def menu_func_export(self, context):
-    self.layout.operator(ImportOSM.bl_idname)
-
-
-def register():
-    bpy.utils.register_class(ImportOSM)
-    bpy.types.INFO_MT_file_import.append(menu_func_export)
-
-
-def unregister():
-    bpy.utils.unregister_class(ImportOSM)
-    bpy.types.INFO_MT_file_import.remove(menu_func_export)
diff --git a/release/scripts/addons_contrib/io_scene_x/__init__.py b/release/scripts/addons_contrib/io_scene_x/__init__.py
deleted file mode 100644
index 322e7dc..0000000
--- a/release/scripts/addons_contrib/io_scene_x/__init__.py
+++ /dev/null
@@ -1,165 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation, either version 3
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#  All rights reserved.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "DirectX X Format",
-    "author": "Chris Foster",
-    "version": (3, 0, 0),
-    "blender": (2, 6, 3),
-    "location": "File > Export > DirectX (.x)",
-    "description": "Export mesh vertices, UV's, materials, textures, "\
-        "vertex colors, armatures, empties, and actions.",
-    "warning": "This script is a WIP!",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Import-Export/DirectX_Exporter",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=22795",
-    "category": "Import-Export"}
-
-import bpy
-from bpy.props import BoolProperty
-from bpy.props import EnumProperty
-from bpy.props import StringProperty
-
-
-class ExportDirectX(bpy.types.Operator):
-    """Export selection to DirectX"""
-
-    bl_idname = "export_scene.x"
-    bl_label = "Export DirectX"
-
-    filepath = StringProperty(subtype='FILE_PATH')
-
-    SelectedOnly = BoolProperty(
-        name="Export Selected Objects Only",
-        description="Export only selected objects",
-        default=True)
-
-    ApplyModifiers = BoolProperty(
-        name="Apply Modifiers",
-        description="Apply object modifiers before export",
-        default=False)
-        
-    # XXX Change this stuff to property groups if possible
-    ExportMeshes = BoolProperty(
-        name="Export Meshes",
-        description="Export mesh objects",
-        default=True)
-        
-    ExportNormals = BoolProperty(
-        name="    Export Normals",
-        description="Export mesh normals",
-        default=True)
-    
-    ExportUVCoordinates = BoolProperty(
-        name="    Export UV Coordinates",
-        description="Export mesh UV coordinates, if any",
-        default=True)
-
-    ExportMaterials = BoolProperty(
-        name="    Export Materials",
-        description="Export material properties and reference image textures",
-        default=True)
-
-    #ExportVertexColors = BoolProperty(
-    #    name="    Export Vertex Colors",
-    #    description="Export mesh vertex colors, if any",
-    #    default=False)
-    
-    ExportSkinWeights = BoolProperty(
-        name="    Export Skin Weights",
-        description="Bind mesh vertices to armature bones",
-        default=False)
-    
-    ExportArmatureBones = BoolProperty(
-        name="Export Armature Bones",
-        description="Export armatures bones",
-        default=False)
-    
-    ExportRestBone = BoolProperty(
-        name="    Export Rest Position",
-        description="Export bones in their rest position (recommended for "\
-            "animation)",
-        default=False)
-
-    ExportAnimation = EnumProperty(
-        name="Animations",
-        description="Select the type of animations to export. Only object "\
-            "and armature bone animations can be exported. Full Animation "\
-            "exports every frame",
-        items=(
-            ('NONE', "None", ""),
-            ('KEYS', "Keyframes Only", ""),
-            ('FULL', "Full Animation", "")),
-        default='NONE')
-    
-    IncludeFrameRate = BoolProperty(
-        name="Include Frame Rate",
-        description="Include the AnimTicksPerSecond template which is "\
-            "used by some engines to control animation speed",
-        default=False)
-
-    #ExportActionsAsSets = BoolProperty(
-    #    name="Export Actions as AnimationSets",
-    #    description="Export each action of each object as a separate "\
-    #        "AnimationSet. Otherwise all current actions are lumped "\
-    #        "together into a single set",
-    #    default=False)
-
-    Verbose = BoolProperty(
-        name="Verbose",
-        description="Run the exporter in debug mode. Check the console for "\
-            "output",
-        default=False)
-
-    def execute(self, context):
-        self.filepath = bpy.path.ensure_ext(self.filepath, ".x")
-
-        import export_x
-        Exporter = export_x.DirectXExporter(self, context)
-        Exporter.Export() # XXX Rename this
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        if not self.filepath:
-            self.filepath = bpy.path.ensure_ext(bpy.data.filepath, ".x")
-        context.window_manager.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
-
-def menu_func(self, context):
-    self.layout.operator(ExportDirectX.bl_idname, text="DirectX (.x)")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.INFO_MT_file_export.append(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.INFO_MT_file_export.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
-
diff --git a/release/scripts/addons_contrib/io_scene_x/export_x.py b/release/scripts/addons_contrib/io_scene_x/export_x.py
deleted file mode 100644
index 1abb650..0000000
--- a/release/scripts/addons_contrib/io_scene_x/export_x.py
+++ /dev/null
@@ -1,606 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation, either version 3
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#  All rights reserved.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-from math import radians
-
-import bpy
-from mathutils import *
-
-
-class DirectXExporter:
-    def __init__(self, Config, context):
-        self.Config = Config
-        self.context = context
-
-        self.File = File(self.Config.filepath)
-
-        self.Log("Setting up coordinate system...")
-        # SystemMatrix converts from right-handed, z-up to left-handed, y-up
-        self.SystemMatrix = (Matrix.Scale(-1, 4, Vector((0, 0, 1))) *
-            Matrix.Rotation(radians(-90), 4, 'X'))
-        self.Log("Done")
-
-        self.Log("Generating object lists for export...")
-        if self.Config.SelectedOnly:
-            ExportList = list(self.context.selected_objects)
-        else:
-            ExportList = list(self.context.scene.objects)
-
-        # ExportMap maps Blender objects to ExportObjects
-        self.ExportMap = {} # XXX Do we keep ExportMap around in self?  Or should it be local?
-        for Object in ExportList:
-            if Object.type == 'EMPTY':
-                self.ExportMap[Object] = ExportObject(self.Config, self, Object)
-            elif Object.type == 'MESH':
-                self.ExportMap[Object] = MeshExportObject(self.Config, self,
-                    Object)
-            elif Object.type == 'ARMATURE':
-                self.ExportMap[Object] = ArmatureExportObject(self.Config, self,
-                    Object)
-
-        # Find the objects who do not have a parent or whose parent we are
-        # not exporting
-        self.RootExportList = [Object for Object in self.ExportMap.values()
-            if Object.BlenderObject.parent not in ExportList]
-        self.RootExportList = Util.SortByNameField(self.RootExportList)
-
-        # Determine each object's children from the pool of ExportObjects
-        for Object in self.ExportMap.values():
-            Children = Object.BlenderObject.children
-            Object.Children = []
-            for Child in Children:
-                if Child in self.ExportMap:
-                    Object.Children.append(self.ExportMap[Child])
-        self.Log("Done")
-
-    # "Public" Interface
-
-    def Export(self):
-        self.Log("Exporting to {}".format(self.File.FilePath),
-            MessageVerbose=False)
-
-        self.Log("Opening file...")
-        self.File.Open()
-        self.Log("Done")
-
-        self.Log("Writing header...")
-        self.__WriteHeader()
-        self.Log("Done")
-
-        self.Log("Opening Root frame...")
-        self.__OpenRootFrame()
-        self.Log("Done")
-
-        self.Log("Writing objects...")
-        for Object in self.RootExportList:
-            Object.Write()
-        self.Log("Done")
-
-        self.Log("Closing Root frame...")
-        self.__CloseRootFrame()
-        self.Log("Done")
-
-        self.File.Close()
-
-    def Log(self, String, MessageVerbose=True):
-        if self.Config.Verbose is True or MessageVerbose == False:
-            print(String)
-
-    # "Private" Methods
-
-    def __WriteHeader(self):
-        self.File.Write("xof 0303txt 0032\n\n")
-
-        if self.Config.IncludeFrameRate:
-            self.File.Write("template AnimTicksPerSecond {\n\
-  <9E415A43-7BA6-4a73-8743-B73D47E88476>\n\
-  DWORD AnimTicksPerSecond;\n\
-}\n\n")
-        if self.Config.ExportSkinWeights:
-            self.File.Write("template XSkinMeshHeader {\n\
-  <3cf169ce-ff7c-44ab-93c0-f78f62d172e2>\n\
-  WORD nMaxSkinWeightsPerVertex;\n\
-  WORD nMaxSkinWeightsPerFace;\n\
-  WORD nBones;\n\
-}\n\n\
-template SkinWeights {\n\
-  <6f0d123b-bad2-4167-a0d0-80224f25fabb>\n\
-  STRING transformNodeName;\n\
-  DWORD nWeights;\n\
-  array DWORD vertexIndices[nWeights];\n\
-  array float weights[nWeights];\n\
-  Matrix4x4 matrixOffset;\n\
-}\n\n")
-
-    # Start the Root frame and write its transform matrix
-    def __OpenRootFrame(self):
-        self.File.Write("Frame Root {\n")
-        self.File.Indent()
-
-        self.File.Write("FrameTransformMatrix {\n")
-        self.File.Indent()
-        Util.WriteMatrix(self.File, self.SystemMatrix)
-        self.File.Unindent()
-        self.File.Write("}\n")
-
-    def __CloseRootFrame(self):
-        self.File.Unindent()
-        self.File.Write("} // End of Root\n")
-
-
-class ExportObject:
-    def __init__(self, Config, Exporter, BlenderObject):
-        self.Config = Config
-        self.Exporter = Exporter
-        self.BlenderObject = BlenderObject
-
-        self.name = self.BlenderObject.name # Simple alias
-        self.SafeName = Util.SafeName(self.BlenderObject.name)
-        self.Children = []
-
-    def __repr__(self):
-        return "[ExportObject: {}]".format(self.BlenderObject.name)
-
-    # "Public" Interface
-
-    def Write(self):
-        self._OpenFrame()
-
-        self._WriteChildren()
-
-        self._CloseFrame()
-
-    # "Protected" Interface
-
-    def _OpenFrame(self):
-        self.Exporter.File.Write("Frame {} {{\n".format(self.SafeName))
-        self.Exporter.File.Indent()
-
-        self.Exporter.File.Write("FrameTransformMatrix {\n")
-        self.Exporter.File.Indent()
-        Util.WriteMatrix(self.Exporter.File, self.BlenderObject.matrix_local)
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}\n")
-
-    def _CloseFrame(self):
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {}\n".format(self.SafeName))
-
-    def _WriteChildren(self):
-        for Child in Util.SortByNameField(self.Children):
-            Child.Write()
-
-
-class MeshExportObject(ExportObject):
-    def __init__(self, Config, Exporter, BlenderObject):
-        ExportObject.__init__(self, Config, Exporter, BlenderObject)
-
-    def __repr__(self):
-        return "[MeshExportObject: {}]".format(self.BlenderObject.name)
-
-    # "Public" Interface
-
-    def Write(self):
-        self._OpenFrame()
-
-        if self.Exporter.Config.ExportMeshes:
-            # Generate the export mesh
-            Mesh = None
-            if self.Config.ApplyModifiers:
-                Mesh = self.BlenderObject.to_mesh(self.Exporter.context.scene,
-                    True, 'PREVIEW')
-            else:
-                Mesh = self.BlenderObject.to_mesh(self.Exporter.context.scene,
-                    False, 'PREVIEW')
-                    
-            self.__WriteMesh(Mesh)
-
-        self._WriteChildren()
-
-        self._CloseFrame()
-
-    # "Private" Methods
-
-    def __WriteMesh(self, Mesh):
-        self.Exporter.File.Write("Mesh {{ // {} mesh\n".format(self.SafeName))
-        self.Exporter.File.Indent()
-
-        if (self.Exporter.Config.ExportUVCoordinates and Mesh.uv_textures):# or \
-           #self.Exporter.Config.ExportVertexColors: XXX
-            VertexCount = 0
-            for Polygon in Mesh.polygons:
-                VertexCount += len(Polygon.vertices)
-            
-            # Write vertex positions
-            Index = 0
-            self.Exporter.File.Write("{};\n".format(VertexCount))
-            for Polygon in Mesh.polygons:
-                Vertices = list(Polygon.vertices)[::-1]
-                
-                for Vertex in [Mesh.vertices[Vertex] for Vertex in Vertices]:
-                    Position = Vertex.co
-                    self.Exporter.File.Write("{:9f};{:9f};{:9f};".format(
-                        Position[0], Position[1], Position[2]))
-                    Index += 1
-                    if Index == VertexCount:
-                        self.Exporter.File.Write(";\n", Indent=False)
-                    else:
-                        self.Exporter.File.Write(",\n", Indent=False)
-            
-            # Write face definitions
-            Index = 0
-            self.Exporter.File.Write("{};\n".format(len(Mesh.polygons)))
-            for Polygon in Mesh.polygons:
-                self.Exporter.File.Write("{};".format(len(Polygon.vertices)))
-                for Vertex in Polygon.vertices:
-                    self.Exporter.File.Write("{};".format(Index), Indent=False)
-                    Index += 1
-                if Index == VertexCount:
-                    self.Exporter.File.Write(";\n", Indent=False)
-                else:
-                    self.Exporter.File.Write(",\n", Indent=False)
-        else:
-            # Write vertex positions
-            self.Exporter.File.Write("{};\n".format(len(Mesh.vertices)))
-            for Index, Vertex in enumerate(Mesh.vertices):
-                Position = Vertex.co
-                self.Exporter.File.Write("{:9f};{:9f};{:9f};".format(
-                    Position[0], Position[1], Position[2]))
-                if Index == len(Mesh.vertices) - 1:
-                    self.Exporter.File.Write(";\n", Indent=False)
-                else:
-                    self.Exporter.File.Write(",\n", Indent=False)
-    
-            # Write face definitions
-            self.Exporter.File.Write("{};\n".format(len(Mesh.polygons)))
-            for Index, Polygon in enumerate(Mesh.polygons):
-                # Change the winding order of the face
-                Vertices = list(Polygon.vertices)[::-1]
-    
-                self.Exporter.File.Write("{};".format(len(Vertices)))
-                for Vertex in Vertices:
-                    self.Exporter.File.Write("{};".format(Vertex), Indent=False)
-                if Index == len(Mesh.polygons) - 1:
-                    self.Exporter.File.Write(";\n", Indent=False)
-                else:
-                    self.Exporter.File.Write(",\n", Indent=False)
-
-        if self.Exporter.Config.ExportNormals:
-            self.__WriteMeshNormals(Mesh)
-            
-        if self.Exporter.Config.ExportUVCoordinates:
-            self.__WriteMeshUVCoordinates(Mesh)
-
-        if self.Exporter.Config.ExportMaterials:
-            self.__WriteMeshMaterials(Mesh)
-        
-        #if self.Exporter.Config.ExportVertexColor:
-        #    self.__WriteMeshVertexColors(Mesh)
-
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {} mesh\n".format(self.SafeName))
-
-    def __WriteMeshNormals(self, Mesh):
-        self.Exporter.File.Write("MeshNormals {{ // {} normals\n".format(
-            self.SafeName))
-        self.Exporter.File.Indent()
-
-        # Determine the number of normals to write
-        NormalCount = 0
-        for Polygon in Mesh.polygons:
-            if Polygon.use_smooth:
-                NormalCount += len(Polygon.vertices)
-            else:
-                NormalCount += 1
-
-        # Write mesh normals
-        self.Exporter.File.Write("{};\n".format(NormalCount))
-        NormalIndex = 0
-        for Polygon in Mesh.polygons:
-            # If the face is faceted, write the face normal only once
-            if not Polygon.use_smooth:
-                Normal = Polygon.normal
-                self.Exporter.File.Write("{:9f};{:9f};{:9f};".format(Normal[0],
-                    Normal[1], Normal[2]))
-                NormalIndex += 1
-                if NormalIndex < NormalCount:
-                    self.Exporter.File.Write(",\n", Indent=False)
-            # Otherwise, write each vertex normal
-            else:
-                # Change the winding order of the face
-                VertexNormals = [Mesh.vertices[Vertex].normal for Vertex in
-                    Polygon.vertices][::-1]
-                for Normal in VertexNormals:
-                    self.Exporter.File.Write("{:9f};{:9f};{:9f};".format(
-                        Normal[0], Normal[1], Normal[2]))
-                    NormalIndex += 1
-                    if NormalIndex < NormalCount:
-                        self.Exporter.File.Write(",\n", Indent=False)
-        self.Exporter.File.Write(";\n", Indent=False)
-
-        # Write face definitions
-        self.Exporter.File.Write("{};\n".format(len(Mesh.polygons)))
-        NormalIndex = 0
-        for Polygon in Mesh.polygons:
-            VertexCount = len(Polygon.vertices)
-            self.Exporter.File.Write("{};".format(VertexCount))
-            # If the face is faceted, use the normal at Index for each vertex
-            if not Polygon.use_smooth:
-                VertexIndices = [NormalIndex] * VertexCount
-                NormalIndex += 1
-            # Otherwise, use the next couple normals for the face
-            else:
-                VertexIndices = list(range(NormalIndex,
-                    NormalIndex + VertexCount))
-                NormalIndex += VertexCount
-            # Write the indices for the face
-            for VertexIndex in VertexIndices:
-                self.Exporter.File.Write("{};".format(VertexIndex),
-                    Indent=False)
-            if NormalIndex == NormalCount:
-                self.Exporter.File.Write(";\n", Indent=False)
-            else:
-                self.Exporter.File.Write(",\n", Indent=False)
-
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {} normals\n".format(
-            self.SafeName))
-     
-    def __WriteMeshUVCoordinates(self, Mesh):
-        if not Mesh.uv_textures:
-            return
-        
-        self.Exporter.File.Write("MeshTextureCoords {{ // {} UV coordinates\n".
-            format(self.SafeName))
-        self.Exporter.File.Indent()
-        
-        UVCoordinates = Mesh.uv_layers.active.data
-        
-        VertexCount = 0
-        for Polygon in Mesh.polygons:
-            VertexCount += len(Polygon.vertices)
-        
-        Index = 0
-        self.Exporter.File.Write("{};\n".format(VertexCount))
-        for Polygon in Mesh.polygons:
-            Vertices = []
-            for Vertex in [UVCoordinates[Vertex] for Vertex in
-                Polygon.loop_indices]:
-                Vertices.append(tuple(Vertex.uv))
-            for Vertex in Vertices:
-                self.Exporter.File.Write("{:9f};{:9f};".format(Vertex[0],
-                    Vertex[1]))
-                Index += 1
-                if Index == VertexCount:
-                    self.Exporter.File.Write(";\n", Indent=False)
-                else:
-                    self.Exporter.File.Write(",\n", Indent=False)
-                    
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {} UV coordinates\n".format(
-            self.SafeName))
-
-    def __WriteMeshMaterials(self, Mesh):
-        def WriteMaterial(Exporter, Material):
-            def GetMaterialTextureFileName(Material):
-                if Material:
-                    # Create a list of Textures that have type 'IMAGE'
-                    ImageTextures = [Material.texture_slots[TextureSlot].texture
-                        for TextureSlot in Material.texture_slots.keys()
-                        if Material.texture_slots[TextureSlot].texture.type ==
-                        'IMAGE']
-                    # Refine to only image file names if applicable
-                    ImageFiles = [bpy.path.basename(Texture.image.filepath)
-                        for Texture in ImageTextures
-                        if getattr(Texture.image, "source", "") == 'FILE']
-                    if ImageFiles:
-                        return ImageFiles[0]
-                return None
-            
-            Exporter.File.Write("Material {} {{\n".format(
-                Util.SafeName(Material.name)))
-            Exporter.File.Indent()
-            
-            Diffuse = list(Vector(Material.diffuse_color) *
-                Material.diffuse_intensity)
-            Diffuse.append(Material.alpha)
-            # Map Blender's range of 1 - 511 to 0 - 1000
-            Specularity = 1000 * (Material.specular_hardness - 1.0) / 510.0
-            Specular = list(Vector(Material.specular_color) *
-                Material.specular_intensity)
-            
-            Exporter.File.Write("{:9f};{:9f};{:9f};{:9f};;\n".format(Diffuse[0],
-                Diffuse[1], Diffuse[2], Diffuse[3]))
-            Exporter.File.Write(" {:9f};\n".format(Specularity))
-            Exporter.File.Write("{:9f};{:9f};{:9f};;\n".format(Specular[0],
-                Specular[1], Specular[2]))
-            Exporter.File.Write(" 0.000000; 0.000000; 0.000000;;\n")
-            
-            TextureFileName = GetMaterialTextureFileName(Material)
-            if TextureFileName:
-                Exporter.File.Write("TextureFilename {{\"{}\";}}\n".format(
-                    TextureFileName))
-            
-            Exporter.File.Unindent()
-            Exporter.File.Write("}\n");
-        
-        Materials = Mesh.materials
-        # Do not write materials if there are none
-        if not Materials.keys():
-            return
-        
-        self.Exporter.File.Write("MeshMaterialList {{ // {} material list\n".
-            format(self.SafeName))
-        self.Exporter.File.Indent()
-        
-        self.Exporter.File.Write("{};\n".format(len(Materials)))
-        self.Exporter.File.Write("{};\n".format(len(Mesh.polygons)))
-        for Index, Polygon in enumerate(Mesh.polygons):
-            self.Exporter.File.Write("{}".format(Polygon.material_index))
-            if Index == len(Mesh.polygons) - 1:
-                self.Exporter.File.Write(";;\n", Indent=False)
-            else:
-                self.Exporter.File.Write(",\n", Indent=False)
-        
-        for Material in Materials:
-            WriteMaterial(self.Exporter, Material)
-        
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {} material list\n".format(
-            self.SafeName))
-    
-    def __WriteMeshVertexColors(self, Mesh):
-        pass
-    
-    def __WriteMeshSkinWeights(self, Mesh):
-        ArmatureModifierList = [Modifier for Modifier in Object.modifiers
-            if Modifier.type == 'ARMATURE']
-        
-        if not ArmatureModifierList:
-            return
-        
-        pass
-
-
-class ArmatureExportObject(ExportObject):
-    def __init__(self, Config, Exporter, BlenderObject):
-        ExportObject.__init__(self, Config, Exporter, BlenderObject)
-
-    def __repr__(self):
-        return "[ArmatureExportObject: {}]".format(self.BlenderObject.name)
-    
-    # "Public" Interface
-
-    def Write(self):
-        self._OpenFrame()
-        
-        if self.Config.ExportArmatureBones:
-            Armature = self.BlenderObject.data
-            RootBones = [Bone for Bone in Armature.bones if Bone.parent is None]
-            self.__WriteBones(RootBones)
-
-        self._WriteChildren()
-
-        self._CloseFrame()
-    
-    # "Private" Methods
-    
-    def __WriteBones(self, Bones):
-        for Bone in Bones:
-            BoneMatrix = Matrix()
-            
-            PoseBone = self.BlenderObject.pose.bones[Bone.name]
-            if Bone.parent:
-                BoneMatrix = PoseBone.parent.matrix.inverted()
-            BoneMatrix *= PoseBone.matrix
-            
-            BoneSafeName = Util.SafeName(Bone.name)
-            self.__OpenBoneFrame(BoneSafeName, BoneMatrix)
-            
-            self.__WriteBoneChildren(Bone)
-            
-            self.__CloseBoneFrame(BoneSafeName)
-            
-    
-    def __OpenBoneFrame(self, BoneSafeName, BoneMatrix):
-        self.Exporter.File.Write("Frame {} {{\n".format(BoneSafeName))
-        self.Exporter.File.Indent()
-
-        self.Exporter.File.Write("FrameTransformMatrix {\n")
-        self.Exporter.File.Indent()
-        Util.WriteMatrix(self.Exporter.File, BoneMatrix)
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}\n")
-    
-    def __CloseBoneFrame(self, BoneSafeName):
-        self.Exporter.File.Unindent()
-        self.Exporter.File.Write("}} // End of {}\n".format(BoneSafeName))
-    
-    def __WriteBoneChildren(self, Bone):
-        self.__WriteBones(Util.SortByNameField(Bone.children))
-
-
-class File:
-    def __init__(self, FilePath):
-        self.FilePath = FilePath
-        self.File = None
-        self.__Whitespace = 0
-
-    def Open(self):
-        if not self.File:
-            self.File = open(self.FilePath, 'w')
-
-    def Close(self):
-        self.File.close()
-        self.File = None
-
-    def Write(self, String, Indent=True):
-        if Indent:
-            # Escape any formatting braces
-            String = String.replace("{", "{{")
-            String = String.replace("}", "}}")
-            self.File.write(("{}" + String).format("  " * self.__Whitespace))
-        else:
-            self.File.write(String)
-
-    def Indent(self, Levels=1):
-        self.__Whitespace += Levels
-
-    def Unindent(self, Levels=1):
-        self.__Whitespace -= Levels
-        if self.__Whitespace < 0:
-            self.__Whitespace = 0
-
-
-class Util:
-    @staticmethod
-    def SafeName(Name):
-        # Replaces each character in OldSet with NewChar
-        def ReplaceSet(String, OldSet, NewChar):
-            for OldChar in OldSet:
-                String = String.replace(OldChar, NewChar)
-            return String
-
-        import string
-
-        NewName = ReplaceSet(Name, string.punctuation + " ", "_")
-        if NewName[0].isdigit() or NewName in ["ARRAY", "DWORD", "UCHAR",
-            "FLOAT", "ULONGLONG", "BINARY_RESOURCE", "SDWORD", "UNICODE",
-            "CHAR", "STRING", "WORD", "CSTRING", "SWORD", "DOUBLE", "TEMPLATE"]:
-            NewName = "_" + NewName
-        return NewName
-
-    @staticmethod
-    def WriteMatrix(File, Matrix):
-        File.Write("{:9f},{:9f},{:9f},{:9f},\n".format(Matrix[0][0],
-            Matrix[1][0], Matrix[2][0], Matrix[3][0]))
-        File.Write("{:9f},{:9f},{:9f},{:9f},\n".format(Matrix[0][1],
-            Matrix[1][1], Matrix[2][1], Matrix[3][1]))
-        File.Write("{:9f},{:9f},{:9f},{:9f},\n".format(Matrix[0][2],
-            Matrix[1][2], Matrix[2][2], Matrix[3][2]))
-        File.Write("{:9f},{:9f},{:9f},{:9f};;\n".format(Matrix[0][3],
-            Matrix[1][3], Matrix[2][3], Matrix[3][3]))
-    
-    @staticmethod
-    def SortByNameField(List):
-        def SortKey(x):
-            return x.name
-        
-        return sorted(List, key=SortKey)
diff --git a/release/scripts/addons_contrib/io_sequencer_edl/import_edl.py b/release/scripts/addons_contrib/io_sequencer_edl/import_edl.py
deleted file mode 100644
index cbdad71..0000000
--- a/release/scripts/addons_contrib/io_sequencer_edl/import_edl.py
+++ /dev/null
@@ -1,1011 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-"""
-Name: "Video Sequence (.edl)..."
-Blender: 248
-Group: "Import"
-Tooltip: "Load a CMX formatted EDL into the sequencer"
-"""
-
-
-class TimeCode(object):
-    """
-    Simple timecode class
-    also supports conversion from other time strings used by EDL
-    """
-    def __init__(self, data, fps):
-        self.fps = fps
-        if type(data) == str:
-            self.fromString(data)
-            frame = self.asFrame()
-            self.fromFrame(frame)
-        else:
-            self.fromFrame(data)
-
-    def fromString(self, text):
-        # hh:mm:ss:ff
-        # No dropframe support yet
-
-        if text.lower().endswith("mps"):  # 5.2mps
-            return self.fromFrame(int(float(text[:-3]) * self.fps))
-        elif text.lower().endswith("s"):  # 5.2s
-            return self.fromFrame(int(float(text[:-1]) * self.fps))
-        elif text.isdigit():  # 1234
-            return self.fromFrame(int(text))
-        elif ":" in text:  # hh:mm:ss:ff
-            text = text.replace(";", ":").replace(",", ":").replace(".", ":")
-            text = text.split(":")
-
-            self.hours = int(text[0])
-            self.minutes = int(text[1])
-            self.seconds = int(text[2])
-            self.frame = int(text[3])
-            return self
-        else:
-            print("ERROR: could not convert this into timecode %r" % test)
-            return self
-
-    def fromFrame(self, frame):
-
-        if frame < 0:
-            frame = -frame
-            neg = True
-        else:
-            neg = False
-
-        fpm = 60 * self.fps
-        fph = 60 * fpm
-
-        if frame < fph:
-            self.hours = 0
-        else:
-            self.hours = int(frame / fph)
-            frame = frame % fph
-
-        if frame < fpm:
-            self.minutes = 0
-        else:
-            self.minutes = int(frame / fpm)
-            frame = frame % fpm
-
-        if frame < self.fps:
-            self.seconds = 0
-        else:
-            self.seconds = int(frame / self.fps)
-            frame = frame % self.fps
-
-        self.frame = frame
-
-        if neg:
-            self.frame = -self.frame
-            self.seconds = -self.seconds
-            self.minutes = -self.minutes
-            self.hours = -self.hours
-
-        return self
-
-    def asFrame(self):
-        abs_frame = self.frame
-        abs_frame += self.seconds * self.fps
-        abs_frame += self.minutes * 60 * self.fps
-        abs_frame += self.hours * 60 * 60 * self.fps
-
-        return abs_frame
-
-    def asString(self):
-        self.fromFrame(int(self))
-        return "%.2d:%.2d:%.2d:%.2d" % (self.hours, self.minutes, self.seconds, self.frame)
-
-    def __repr__(self):
-        return self.asString()
-
-    # Numeric stuff, may as well have this
-    def __neg__(self):
-        return TimeCode(-int(self), self.fps)
-
-    def __int__(self):
-        return self.asFrame()
-
-    def __sub__(self, other):
-        return TimeCode(int(self) - int(other), self.fps)
-
-    def __add__(self, other):
-        return TimeCode(int(self) + int(other), self.fps)
-
-    def __mul__(self, other):
-        return TimeCode(int(self) * int(other), self.fps)
-
-    def __div__(self, other):
-        return TimeCode(int(self) // int(other), self.fps)
-
-    def __abs__(self):
-        return TimeCode(abs(int(self)), self.fps)
-
-    def __iadd__(self, other):
-        return self.fromFrame(int(self) + int(other))
-
-    def __imul__(self, other):
-        return self.fromFrame(int(self) * int(other))
-
-    def __idiv__(self, other):
-        return self.fromFrame(int(self) // int(other))
-# end timecode
-
-
-"""Comments
-Comments can appear at the beginning of the EDL file (header) or between the edit lines in the EDL. The first block of comments in the file is defined to be the header comments and they are associated with the EDL as a whole. Subsequent comments in the EDL file are associated with the first edit line that appears after them.
-Edit Entries
-<filename|tag>  <EditMode>  <TransitionType>[num]  [duration]  [srcIn]  [srcOut]  [recIn]  [recOut]
-
-    * <filename|tag>: Filename or tag value. Filename can be for an MPEG file, Image file, or Image file template. Image file templates use the same pattern matching as for command line glob, and can be used to specify images to encode into MPEG. i.e. /usr/data/images/image*.jpg
-    * <EditMode>: 'V' | 'A' | 'VA' | 'B' | 'v' | 'a' | 'va' | 'b' which equals Video, Audio, Video_Audio edits (note B or b can be used in place of VA or va).
-    * <TransitonType>: 'C' | 'D' | 'E' | 'FI' | 'FO' | 'W' | 'c' | 'd' | 'e' | 'fi' | 'fo' | 'w'. which equals Cut, Dissolve, Effect, FadeIn, FadeOut, Wipe.
-    * [num]: if TransitionType = Wipe, then a wipe number must be given. At the moment only wipe 'W0' and 'W1' are supported.
-    * [duration]: if the TransitionType is not equal to Cut, then an effect duration must be given. Duration is in frames.
-    * [srcIn]: Src in. If no srcIn is given, then it defaults to the first frame of the video or the first frame in the image pattern. If srcIn isn't specified, then srcOut, recIn, recOut can't be specified.
-    * [srcOut]: Src out. If no srcOut is given, then it defaults to the last frame of the video - or last image in the image pattern. if srcOut isn't given, then recIn and recOut can't be specified.
-    * [recIn]: Rec in. If no recIn is given, then it is calculated based on its position in the EDL and the length of its input.
-      [recOut]: Rec out. If no recOut is given, then it is calculated based on its position in the EDL and the length of its input. first frame of the video.
-
-For srcIn, srcOut, recIn, recOut, the values can be specified as either timecode, frame number, seconds, or mps seconds. i.e.
-[tcode | fnum | sec | mps], where:
-
-    * tcode : SMPTE timecode in hh:mm:ss:ff
-    * fnum : frame number (the first decodable frame in the video is taken to be frame 0).
-    * sec : seconds with 's' suffix (e.g. 5.2s)
-    * mps : seconds with 'mps' suffix (e.g. 5.2mps). This corresponds to the 'seconds' value displayed by Windows MediaPlayer.
-
-More notes,
-Key
-
-"""
-
-enum = 0
-TRANSITION_UNKNOWN = enum
-TRANSITION_CUT = enum
-enum += 1
-TRANSITION_DISSOLVE = enum
-enum += 1
-TRANSITION_EFFECT = enum
-enum += 1
-TRANSITION_FADEIN = enum
-enum += 1
-TRANSITION_FADEOUT = enum
-enum += 1
-TRANSITION_WIPE = enum
-enum += 1
-TRANSITION_KEY = enum
-enum += 1
-
-TRANSITION_DICT = {
-    "c": TRANSITION_CUT,
-    "d": TRANSITION_DISSOLVE,
-    "e": TRANSITION_EFFECT,
-    "fi": TRANSITION_FADEIN,
-    "fo": TRANSITION_FADEOUT,
-    "w": TRANSITION_WIPE,
-    "k": TRANSITION_KEY,
-    }
-
-enum = 0
-EDIT_UNKNOWN = 1 << enum
-enum += 1
-EDIT_VIDEO = 1 << enum
-enum += 1
-EDIT_AUDIO = 1 << enum
-enum += 1
-EDIT_AUDIO_STEREO = 1 << enum
-enum += 1
-EDIT_VIDEO_AUDIO = 1 << enum
-enum += 1
-
-EDIT_DICT = {
-    "v": EDIT_VIDEO,
-    "a": EDIT_AUDIO,
-    "aa": EDIT_AUDIO_STEREO,
-    "va": EDIT_VIDEO_AUDIO,
-    "b": EDIT_VIDEO_AUDIO,
-    }
-
-
-enum = 0
-WIPE_UNKNOWN = enum
-WIPE_0 = enum
-enum += 1
-WIPE_1 = enum
-enum += 1
-
-enum = 0
-KEY_UNKNOWN = enum
-KEY_BG = enum  # K B
-enum += 1
-KEY_IN = enum  # This is assumed if no second type is set
-enum += 1
-KEY_OUT = enum  # K O
-enum += 1
-
-
-"""
-Most sytems:
-Non-dropframe: 1:00:00:00 - colon in last position
-Dropframe: 1:00:00;00 - semicolon in last position
-PAL/SECAM: 1:00:00:00 - colon in last position
-
-SONY:
-Non-dropframe: 1:00:00.00 - period in last position
-Dropframe: 1:00:00,00 - comma in last position
-PAL/SECAM: 1:00:00.00 - period in last position
-"""
-
-"""
-t = abs(timecode('-124:-12:-43:-22', 25))
-t /= 2
-print t
-"""
-
-
-def editFlagsToText(flag):
-    items = []
-    for item, val in EDIT_DICT.items():
-        if val & flag:
-            items.append(item)
-    return "/".join(items)
-
-
-class EditDecision(object):
-    def __init__(self, text=None, fps=25):
-        # print text
-        self.number = -1
-        self.reel = ""  # Uniqie name for this 'file' but not filename, when BL signifies black
-        self.transition_duration = 0
-        self.edit_type = EDIT_UNKNOWN
-        self.transition_type = TRANSITION_UNKNOWN
-        self.wipe_type = WIPE_UNKNOWN
-        self.key_type = KEY_UNKNOWN
-        self.key_fade = -1  # true/false
-        self.srcIn = None   # Where on the original field recording the event begins
-        self.srcOut = None  # Where on the original field recording the event ends
-        self.recIn = None   # Beginning of the original event in the edited program
-        self.recOut = None  # End of the original event in the edited program
-        self.m2 = None      # fps set by the m2 command
-        self.filename = ""
-
-        self.custom_data = []  # use for storing any data you want (blender strip for eg)
-
-        if text != None:
-            self.read(text, fps)
-
-    def __repr__(self):
-        txt = "num: %d, " % self.number
-        txt += "reel: %s, " % self.reel
-        txt += "edit_type: "
-        txt += editFlagsToText(self.edit_type) + ", "
-
-        txt += "trans_type: "
-        for item, val in TRANSITION_DICT.items():
-            if val == self.transition_type:
-                txt += item + ", "
-                break
-
-        txt += "m2: "
-        if self.m2:
-            txt += "%g" % float(self.m2.fps)
-            txt += "\n\t"
-            txt += self.m2.data
-        else:
-            txt += "nil"
-
-        txt += ", "
-        txt += "recIn: " + str(self.recIn) + ", "
-        txt += "recOut: " + str(self.recOut) + ", "
-        txt += "srcIn: " + str(self.srcIn) + ", "
-        txt += "srcOut: " + str(self.srcOut) + ", "
-
-        return txt
-
-    def read(self, line, fps):
-        line = line.split()
-        index = 0
-        self.number = int(line[index])
-        index += 1
-        self.reel = line[index].lower()
-        index += 1
-
-        # AA/V can be an edit type
-        self.edit_type = 0
-        for edit_type in line[index].lower().split("/"):
-            self.edit_type |= EDIT_DICT[edit_type]
-        index += 1
-
-        tx_name = "".join([c for c in line[index].lower() if not c.isdigit()])
-        self.transition_type = TRANSITION_DICT[tx_name]  # advance the index later
-
-        if self.transition_type == TRANSITION_WIPE:
-            tx_num = "".join([c for c in line[index].lower() if c.isdigit()])
-            if tx_num:
-                tx_num = int(tx_num)
-            else:
-                tx_num = 0
-
-            self.wipe_type = tx_num
-
-        elif self.transition_type == TRANSITION_KEY:  # UNTESTED
-
-            val = line[index + 1].lower()
-
-            if val == "b":
-                self.key_type = KEY_BG
-                index += 1
-            elif val == "o":
-                self.key_type = KEY_OUT
-                index += 1
-            else:
-                self.key_type = KEY_IN  # if no args given
-
-            # there may be an (F) after, eg 'K B (F)'
-            # in the docs this should only be after K B but who knows, it may be after K O also?
-            val = line[index + 1].lower()
-            if val == "(f)":
-                index += 1
-                self.key_fade = True
-            else:
-                self.key_fade = False
-
-        index += 1
-
-        if self.transition_type in {TRANSITION_DISSOLVE, TRANSITION_EFFECT, TRANSITION_FADEIN, TRANSITION_FADEOUT, TRANSITION_WIPE}:
-            self.transition_duration = TimeCode(line[index], fps)
-            index += 1
-
-        if index < len(line):
-            self.srcIn = TimeCode(line[index], fps)
-            index += 1
-        if index < len(line):
-            self.srcOut = TimeCode(line[index], fps)
-            index += 1
-
-        if index < len(line):
-            self.recIn = TimeCode(line[index], fps)
-            index += 1
-        if index < len(line):
-            self.recOut = TimeCode(line[index], fps)
-            index += 1
-
-    def renumber(self):
-        self.edits.sort(key=lambda e: int(e.recIn))
-        for i, edit in enumerate(self.edits):
-            edit.number = i
-
-    def clean(self):
-        """
-        Clean up double ups
-        """
-        self.renumber()
-
-        # TODO
-    def asName(self):
-        cut_type = "nil"
-        for k, v in TRANSITION_DICT.items():
-            if v == self.transition_type:
-                cut_type = k
-                break
-
-        return "%d_%s_%s" % (self.number, self.reel, cut_type)
-
-
-class M2(object):
-    def __init__(self):
-        self.reel = None
-        self.fps = None
-        self.time = None
-        self.data = None
-
-        self.index = -1
-        self.tot = -1
-
-    def read(self, line, fps):
-
-        # M2   TAPEC          050.5                00:08:11:08
-        words = line.split()
-
-        self.reel = words[1].lower()
-        self.fps = float(words[2])
-        self.time = TimeCode(words[3], fps)
-
-        self.data = line
-
-
-class EditList(object):
-    def __init__(self):
-        self.edits = []
-        self.title = ""
-
-    def parse(self, filename, fps):
-        try:
-            file = open(filename, "rU")
-        except:
-            return False
-
-        self.edits = []
-        edits_m2 = []  # edits with m2's
-
-        has_m2 = False
-
-        for line in file:
-            line = " ".join(line.split())
-
-            if not line or line.startswith(("*", "#")):
-                continue
-            elif line.startswith("TITLE:"):
-                self.title = " ".join(line.split()[1:])
-            elif line.split()[0].lower() == "m2":
-                has_m2 = True
-                m2 = M2()
-                m2.read(line, fps)
-                edits_m2.append(m2)
-            elif not line.split()[0].isdigit():
-                print("Ignoring:", line)
-            else:
-                self.edits.append(EditDecision(line, fps))
-                edits_m2.append(self.edits[-1])
-
-        if has_m2:
-            # Group indexes
-            i = 0
-            for item in edits_m2:
-                if isinstance(item, M2):
-                    item.index = i
-                    i += 1
-                else:
-                    # not an m2
-                    i = 0
-
-            # Set total group indexes
-            for item in reversed(edits_m2):
-                if isinstance(item, M2):
-                    if tot_m2 == -1:
-                        tot_m2 = item.index + 1
-
-                    item.tot = tot_m2
-                else:
-                    # not an m2
-                    tot_m2 = -1
-
-            for i, item in enumerate(edits_m2):
-                if isinstance(item, M2):
-                    # make a list of all items that match the m2's reel name
-                    edits_m2_tmp = [item_tmp for item_tmp in edits_m2 if (isinstance(item, M2) or item_tmp.reel == item.reel)]
-
-                    # get the new index
-                    i_tmp = edits_m2_tmp.index(item)
-
-                    # Seek back to get the edit.
-                    edit = edits_m2[i_tmp - item.tot]
-
-                    # Note, docs say time should also match with edit start time
-                    # but from final cut pro, this seems not to be the case
-                    if not isinstance(edit, EditDecision):
-                        print("ERROR!", "M2 incorrect")
-                    else:
-                        edit.m2 = item
-
-        return True
-
-    def testOverlap(self, edit_test):
-        recIn = int(edit_test.recIn)
-        recOut = int(edit_test.recOut)
-
-        for edit in self.edits:
-            if edit is edit_test:
-                break
-
-            recIn_other = int(edit.recIn)
-            recOut_other = int(edit.recOut)
-
-            if recIn_other < recIn < recOut_other:
-                return True
-            if recIn_other < recOut < recOut_other:
-                return True
-
-            if recIn < recIn_other < recOut:
-                return True
-            if recIn < recOut_other < recOut:
-                return True
-
-        return False
-
-    def getReels(self):
-        reels = {}
-        for edit in self.edits:
-            reels.setdefault(edit.reel, []).append(edit)
-
-        return reels
-
-# from DNA
-SEQ_IMAGE = 0
-SEQ_META = 1
-SEQ_SCENE = 2
-SEQ_MOVIE = 3
-SEQ_RAM_SOUND = 4
-SEQ_HD_SOUND = 5
-SEQ_MOVIE_AND_HD_SOUND = 6
-
-SEQ_EFFECT = 8
-SEQ_CROSS = 8
-SEQ_ADD = 9
-SEQ_SUB = 10
-SEQ_ALPHAOVER = 11
-SEQ_ALPHAUNDER = 12
-SEQ_GAMCROSS = 13
-SEQ_MUL = 14
-SEQ_OVERDROP = 15
-SEQ_PLUGIN = 24
-SEQ_WIPE = 25
-SEQ_GLOW = 26
-SEQ_TRANSFORM = 27
-SEQ_COLOR = 28
-SEQ_SPEED = 29
-
-# Blender spesific stuff starts here
-import bpy
-import Blender
-
-
-def scale_meta_speed(seq, mov, scale):
-    # Add an effect
-    speed = seq.new((SEQ_SPEED, mov,), 199, mov.channel + 1)
-    speed.speedEffectFrameBlending = True
-    meta = seq.new([mov, speed], 199, mov.channel)
-
-    if scale >= 1.0:
-        mov.endStill = int(mov.length * (scale - 1.0))
-    else:
-        speed.speedEffectGlobalSpeed = 1.0 / scale
-        meta.endOffset = mov.length - int(mov.length * scale)
-
-    speed.update()
-    meta.update()
-    return meta
-
-
-def apply_dissolve_ipo(mov, blendin):
-    len_disp = float(mov.endDisp - mov.startDisp)
-
-    if len_disp <= 0.0:
-        print("Error, strip is zero length")
-        return
-
-    mov.ipo = ipo = bpy.data.ipos.new("fade", "Sequence")
-    icu = ipo.addCurve("Fac")
-
-    icu.interpolation = Blender.IpoCurve.InterpTypes.LINEAR
-    icu.append((0, 0))
-    icu.append(((int(blendin) / len_disp) * 100, 1))
-
-    if mov.type not in {SEQ_HD_SOUND, SEQ_RAM_SOUND}:
-        mov.blendMode = Blender.Scene.Sequence.BlendModes.ALPHAOVER
-
-
-def replace_ext(path, ext):
-    return path[:path.rfind(".") + 1] + ext
-
-
-def load_edl(filename, reel_files, reel_offsets):
-    """
-    reel_files - key:reel <--> reel:filename
-    """
-
-    # For test file
-    # frame_offset = -769
-
-    sce = bpy.data.scenes.active
-    fps = sce.render.fps
-
-    elist = EditList()
-    if not elist.parse(filename, fps):
-        return "Unable to parse %r" % filename
-    # elist.clean()
-
-    seq = sce.sequence
-
-    track = 0
-
-    edits = elist.edits[:]
-    # edits.sort(key = lambda edit: int(edit.recIn))
-
-    prev_edit = None
-    for edit in edits:
-        print(edit)
-        frame_offset = reel_offsets[edit.reel]
-
-        src_start = int(edit.srcIn) + frame_offset
-        src_end = int(edit.srcOut) + frame_offset
-        src_length = src_end - src_start
-
-        rec_start = int(edit.recIn) + 1
-        rec_end = int(edit.recOut) + 1
-        rec_length = rec_end - rec_start
-
-        # print src_length, rec_length, src_start
-
-        if edit.m2 != None:
-            scale = fps / edit.m2.fps
-        else:
-            scale = 1.0
-
-        unedited_start = rec_start - src_start
-        offset_start = src_start - int(src_start * scale)  # works for scaling up AND down
-
-        if edit.transition_type == TRANSITION_CUT and (not elist.testOverlap(edit)):
-            track = 1
-
-        strip = None
-        final_strips = []
-        if edit.reel.lower() == "bw":
-            strip = seq.new((0, 0, 0), rec_start, track + 1)
-            strip.length = rec_length  # for color its simple
-            final_strips.append(strip)
-        else:
-
-            path_full = reel_files[edit.reel]
-            path_fileonly = path_full.split("/")[-1].split("\\")[-1]  # os.path.basename(full)
-            path_dironly = path_full[:-len(path_fileonly)]  # os.path.dirname(full)
-
-            if edit.edit_type & EDIT_VIDEO:  # and edit.transition_type == TRANSITION_CUT:
-
-                try:
-                    strip = seq.new((path_fileonly, path_dironly, path_full, "movie"), unedited_start + offset_start, track + 1)
-                except:
-                    return "Invalid input for movie"
-
-                # Apply scaled rec in bounds
-                if scale != 1.0:
-                    meta = scale_meta_speed(seq, strip, scale)
-                    final_strip = meta
-                else:
-                    final_strip = strip
-
-                final_strip.update()
-                final_strip.startOffset = rec_start - final_strip.startDisp
-                final_strip.endOffset = rec_end - final_strip.endDisp
-                final_strip.update()
-                final_strip.endOffset += (final_strip.endDisp - rec_end)
-                final_strip.update()
-
-                if edit.transition_duration:
-                    if not prev_edit:
-                        print("Error no previous strip")
-                    else:
-                        new_end = rec_start + int(edit.transition_duration)
-                        for other in prev_edit.custom_data:
-                            if other.type != SEQ_HD_SOUND and other.type != SEQ_RAM_SOUND:
-                                other.endOffset += (other.endDisp - new_end)
-                                other.update()
-
-                # Apply disolve
-                if edit.transition_type == TRANSITION_DISSOLVE:
-                    apply_dissolve_ipo(final_strip, edit.transition_duration)
-
-                if edit.transition_type == TRANSITION_WIPE:
-                    other_track = track + 2
-                    for other in prev_edit.custom_data:
-                        if other.type != SEQ_HD_SOUND and other.type != SEQ_RAM_SOUND:
-
-                            strip_wipe = seq.new((SEQ_WIPE, other, final_strip), 1, other_track)
-
-                            if edit.wipe_type == WIPE_0:
-                                strip_wipe.wipeEffectAngle = +90
-                            else:
-                                strip_wipe.wipeEffectAngle = -90
-
-                            other_track += 1
-
-                # strip.endOffset = strip.length - int(edit.srcOut)
-                # end_offset = (unedited_start+strip.length) - end
-                # print start, end, end_offset
-                # strip.endOffset = end_offset
-                #
-                # break
-                # print(strip)
-
-                final_strips.append(final_strip)
-
-            if edit.edit_type & (EDIT_AUDIO | EDIT_AUDIO_STEREO | EDIT_VIDEO_AUDIO):
-
-                if scale == 1.0:  # TODO - scaled audio
-
-                    try:
-                        strip = seq.new((path_fileonly, path_dironly, path_full, "audio_hd"), unedited_start + offset_start, track + 6)
-                    except:
-
-                        # See if there is a wave file there
-                        path_full_wav = replace_ext(path_full, "wav")
-                        path_fileonly_wav = replace_ext(path_fileonly, "wav")
-
-                        #try:
-                        strip = seq.new((path_fileonly_wav, path_dironly, path_full_wav, "audio_hd"), unedited_start + offset_start, track + 6)
-                        #except:
-                        #   return "Invalid input for audio"
-
-                    final_strip = strip
-
-                    # Copied from above
-                    final_strip.update()
-                    final_strip.startOffset = rec_start - final_strip.startDisp
-                    final_strip.endOffset = rec_end - final_strip.endDisp
-                    final_strip.update()
-                    final_strip.endOffset += (final_strip.endDisp - rec_end)
-                    final_strip.update()
-
-                    if edit.transition_type == TRANSITION_DISSOLVE:
-                        apply_dissolve_ipo(final_strip, edit.transition_duration)
-
-                    final_strips.append(final_strip)
-
-            # strip = seq.new((0.6, 0.6, 0.6), start, track+1)
-
-        if final_strips:
-            for strip in final_strips:
-                # strip.length = length
-                final_strip.name = edit.asName()
-                edit.custom_data[:] = final_strips
-                # track = not track
-                prev_edit = edit
-            track += 1
-
-        #break
-
-    def recursive_update(s):
-        s.update(1)
-        for s_kid in s:
-            recursive_update(s_kid)
-
-    for s in seq:
-        recursive_update(s)
-
-    return ""
-
-
-#load_edl("/fe/edl/EP30CMXtrk1.edl") # /tmp/test.edl
-#load_edl("/fe/edl/EP30CMXtrk2.edl") # /tmp/test.edl
-#load_edl("/fe/edl/EP30CMXtrk3.edl") # /tmp/test.edl
-#load_edl("/root/vid/rush/blender_edl.edl", ["/root/vid/rush/rushes3.avi",]) # /tmp/test.edl
-
-# ---------------------- Blender UI part
-from Blender import Draw, Window
-import BPyWindow
-
-if 0:
-    DEFAULT_FILE_EDL = "/root/vid/rush/blender_edl.edl"
-    DEFAULT_FILE_MEDIA = "/root/vid/rush/rushes3_wav.avi"
-    DEFAULT_FRAME_OFFSET = -769
-else:
-    DEFAULT_FILE_EDL = ""
-    DEFAULT_FILE_MEDIA = ""
-    DEFAULT_FRAME_OFFSET = 0
-
-B_EVENT_IMPORT = 1
-B_EVENT_RELOAD = 2
-B_EVENT_FILESEL_EDL = 3
-B_EVENT_NOP = 4
-
-B_EVENT_FILESEL = 100  # or greater
-
-
-class ReelItemUI(object):
-    __slots__ = "filename_but", "offset_but", "ui_text"
-
-    def __init__(self):
-        self.filename_but = Draw.Create(DEFAULT_FILE_MEDIA)
-        self.offset_but = Draw.Create(DEFAULT_FRAME_OFFSET)
-        self.ui_text = ""
-
-
-REEL_UI = {}    # reel:ui_string
-
-
-#REEL_FILENAMES = {}        # reel:filename
-#REEL_OFFSETS = {}      # reel:filename
-
-PREF = {}
-
-PREF["filename"] = Draw.Create(DEFAULT_FILE_EDL)
-PREF["reel_act"] = ""
-
-
-def edl_reload():
-    Window.WaitCursor(1)
-    filename = PREF["filename"].val
-    sce = bpy.data.scenes.active
-    fps = sce.render.fps
-
-    elist = EditList()
-
-    if filename:
-        if not elist.parse(filename, fps):
-            Draw.PupMenu("Error%t|Could not open the file %r" % filename)
-        reels = elist.getReels()
-    else:
-        reels = {}
-
-    REEL_UI.clear()
-    for reel_key, edits in reels.items():
-
-        if reel_key == "bw":
-            continue
-
-        flag = 0
-        for edit in edits:
-            flag |= edit.edit_type
-
-        reel_item = REEL_UI[reel_key] = ReelItemUI()
-
-        reel_item.ui_text = "%s (%s): " % (reel_key, editFlagsToText(flag))
-
-    Window.WaitCursor(0)
-
-
-def edl_set_path(filename):
-    PREF["filename"].val = filename
-    edl_reload()
-    Draw.Redraw()
-
-
-def edl_set_path_reel(filename):
-    REEL_UI[PREF["reel_act"]].filename_but.val = filename
-    Draw.Redraw()
-
-
-def edl_reel_keys():
-    reel_keys = REEL_UI.keys()
-
-    if "bw" in reel_keys:
-        reel_keys.remove("bw")
-
-    reel_keys.sort()
-    return reel_keys
-
-
-def edl_draw():
-
-    MARGIN = 4
-    rect = BPyWindow.spaceRect()
-    but_width = int((rect[2] - MARGIN * 2) / 4.0)  # 72
-    # Clamp
-    if but_width > 100:
-        but_width = 100
-    but_height = 17
-
-    x = MARGIN
-    y = rect[3] - but_height - MARGIN
-    xtmp = x
-
-    # ---------- ---------- ---------- ----------
-    Blender.Draw.BeginAlign()
-    PREF["filename"] = Draw.String("edl path: ", B_EVENT_RELOAD, xtmp, y, (but_width * 3) - 20, but_height, PREF["filename"].val, 256, "EDL Path")
-    xtmp += (but_width * 3) - 20
-
-    Draw.PushButton("..", B_EVENT_FILESEL_EDL, xtmp, y, 20, but_height, "Select an EDL file")
-    xtmp += 20
-
-    Blender.Draw.EndAlign()
-
-    Draw.PushButton("Reload", B_EVENT_RELOAD, xtmp + MARGIN, y, but_width - MARGIN, but_height, "Read the ID Property settings from the active curve object")
-    xtmp += but_width
-
-    y -= but_height + MARGIN
-    xtmp = x
-    # ---------- ---------- ---------- ----------
-
-    reel_keys = edl_reel_keys()
-
-    if reel_keys:
-        text = "Reel file list..."
-    elif PREF["filename"].val == "":
-        text = "No EDL loaded."
-    else:
-        text = "No reels found!"
-
-    Draw.Label(text, xtmp + MARGIN, y, but_width * 4, but_height)
-    xtmp += but_width * 4
-
-    y -= but_height + MARGIN
-    xtmp = x
-
-    # ---------- ---------- ---------- ----------
-
-    for i, reel_key in enumerate(reel_keys):
-        reel_item = REEL_UI[reel_key]
-
-        Blender.Draw.BeginAlign()
-        REEL_UI[reel_key].filename_but = Draw.String(reel_item.ui_text, B_EVENT_NOP, xtmp, y, (but_width * 3) - 20, but_height, REEL_UI[reel_key].filename_but.val, 256, "Select the reel path")
-        xtmp += (but_width * 3) - 20
-        Draw.PushButton("..", B_EVENT_FILESEL + i, xtmp, y, 20, but_height, "Media path to use for this reel")
-        xtmp += 20
-        Blender.Draw.EndAlign()
-
-        reel_item.offset_but = Draw.Number("ofs:", B_EVENT_NOP, xtmp + MARGIN, y, but_width - MARGIN, but_height, reel_item.offset_but.val, -100000, 100000, "Start offset in frames when applying timecode")
-        xtmp += but_width - MARGIN
-
-        y -= but_height + MARGIN
-        xtmp = x
-
-    # ---------- ---------- ---------- ----------
-
-    Draw.PushButton("Import CMX-EDL Sequencer Strips", B_EVENT_IMPORT, xtmp + MARGIN, MARGIN, but_width * 4 - MARGIN, but_height, "Load the EDL file into the sequencer")
-    xtmp += but_width * 4
-    y -= but_height + MARGIN
-    xtmp = x
-
-
-def edl_event(evt, val):
-    pass
-
-
-def edl_bevent(evt):
-
-    if evt == B_EVENT_NOP:
-        pass
-    elif evt == B_EVENT_IMPORT:
-        """
-        Load the file into blender with UI settings
-        """
-        filename = PREF["filename"].val
-
-        reel_files = {}
-        reel_offsets = {}
-
-        for reel_key, reel_item in REEL_UI.items():
-            reel_files[reel_key] = reel_item.filename_but.val
-            reel_offsets[reel_key] = reel_item.offset_but.val
-
-        error = load_edl(filename, reel_files, reel_offsets)
-        if error != "":
-            Draw.PupMenu("Error%t|" + error)
-        else:
-            Window.RedrawAll()
-
-    elif evt == B_EVENT_RELOAD:
-        edl_reload()
-        Draw.Redraw()
-
-    elif evt == B_EVENT_FILESEL_EDL:
-        filename = PREF["filename"].val
-        if not filename:
-            filename = Blender.sys.join(Blender.sys.expandpath("//"), "*.edl")
-
-        Window.FileSelector(edl_set_path, "Select EDL", filename)
-
-    elif evt >= B_EVENT_FILESEL:
-        reel_keys = edl_reel_keys()
-        reel_key = reel_keys[evt - B_EVENT_FILESEL]
-
-        filename = REEL_UI[reel_key].filename_but.val
-        if not filename:
-            filename = Blender.sys.expandpath("//")
-
-        PREF["reel_act"] = reel_key  # so file set path knows which one to set
-        Window.FileSelector(edl_set_path_reel, "Reel Media", filename)
-
-
-if __name__ == "__main__":
-    Draw.Register(edl_draw, edl_event, edl_bevent)
-    edl_reload()
diff --git a/release/scripts/addons_contrib/lamp_geographical_sun.py b/release/scripts/addons_contrib/lamp_geographical_sun.py
deleted file mode 100644
index 0315b90..0000000
--- a/release/scripts/addons_contrib/lamp_geographical_sun.py
+++ /dev/null
@@ -1,581 +0,0 @@
-# -*- coding: utf8 -*-
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# --------------------------------------------------------------------------
-# Blender 2.5 Geographical Sun Add-On
-# --------------------------------------------------------------------------
-#
-# Authors:
-# Doug Hammond
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# ***** END GPL LICENCE BLOCK *****
-#
-
-# System imports
-#-----------------------------------------------------------------------------
-import datetime, math, time
-today = datetime.datetime.now()
-
-# Blender imports
-#----------------------------------------------------------------------------- 
-import bpy
-from extensions_framework import Addon, declarative_property_group
-from extensions_framework.ui import property_group_renderer
-
-# Addon setup
-#----------------------------------------------------------------------------- 
-bl_info = {
-    "name": "Geographical Sun",
-    "author": "Doug Hammond (dougal2)",
-    "version": (0, 0, 1),
-    "blender": (2, 5, 6),
-    "category": "Object",
-    "location": "Lamp data > Geographical Sun",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "description": "Set SUN Lamp rotation according to geographical time and location."
-}
-GeoSunAddon = Addon(bl_info)
-
-# Sun rotation calculator implementation
-#----------------------------------------------------------------------------- 
-class sun_calculator(object):
-    """
-    Based on SunLight v1.0 by Miguel Kabantsov (miguelkab at gmail.com)
-    Replaces the faulty sun position calculation algorythm with a precise calculation (Source for algorythm: http://de.wikipedia.org/wiki/Sonnenstand),
-    Co-Ordinates: http://www.bcca.org/misc/qiblih/latlong.html
-    Author: Nils-Peter Fischer (Nils-Peter.Fischer at web.de)
-    """
-    
-    location_list = [
-        ("EUROPE",[
-            ("Antwerp, Belgium",            67),
-            ("Berlin, Germany",             1),
-            ("Bratislava, Slovak Republic", 70),
-            ("Brno, Czech Republic",        72),
-            ("Brussles, Belgium",           68),
-            ("Geneva, Switzerland",         65),
-            ("Helsinki, Finland",           7),
-            ("Innsbruck, Austria",          62),
-            ("Kyiv, Ukraine",               64),
-            ("London, England",             10),
-            ("Lyon, France",                66),
-            ("Nitra, Slovak Republic",      69),
-            ("Oslo, Norway",                58),
-            ("Paris, France",               15),
-            ("Praha, Czech Republic",       71),
-            ("Rome, Italy",                 18),
-            ("Telfs, Austria",              63),
-            ("Warsaw, Poland",              74),
-            ("Wroclaw, Poland",             73),
-            ("Zurich, Switzerland",         21),
-        ]),
-        
-        ("WORLD CITIES", [
-            ("Beijing, China",              0),
-            ("Bombay, India",               2),
-            ("Buenos Aires, Argentina",     3),
-            ("Cairo, Egypt",                4),
-            ("Cape Town, South Africa",     5),
-            ("Caracas, Venezuela",          6),
-            ("Curitiba, Brazil",            60),
-            ("Hong Kong, China",            8),
-            ("Jerusalem, Israel",           9),
-            ("Joinville, Brazil",           61),
-            ("Mexico City, Mexico",         11),
-            ("Moscow, Russia",              12),
-            ("New Delhi, India",            13),
-            ("Ottawa, Canada",              14),
-            ("Rio de Janeiro, Brazil",      16),
-            ("Riyadh, Saudi Arabia",        17),
-            ("Sao Paulo, Brazil",           59),
-            ("Sydney, Australia",           19),
-            ("Tokyo, Japan",                20),
-        ]),
-        
-        ("US CITIES", [
-            ("Albuquerque, NM",             22),
-            ("Anchorage, AK",               23),
-            ("Atlanta, GA",                 24),
-            ("Austin, TX",                  25),
-            ("Birmingham, AL",              26),
-            ("Bismarck, ND",                27),
-            ("Boston, MA",                  28),
-            ("Boulder, CO",                 29),
-            ("Chicago, IL",                 30),
-            ("Dallas, TX",                  31),
-            ("Denver, CO",                  32),
-            ("Detroit, MI",                 33),
-            ("Honolulu, HI",                34),
-            ("Houston, TX",                 35),
-            ("Indianapolis, IN",            36),
-            ("Jackson, MS",                 37),
-            ("Kansas City, MO",             38),
-            ("Los Angeles, CA",             39),
-            ("Menomonee Falls, WI",         40),
-            ("Miami, FL",                   41),
-            ("Minneapolis, MN",             42),
-            ("New Orleans, LA",             43),
-            ("New York City, NY",           44),
-            ("Oklahoma City, OK",           45),
-            ("Philadelphia, PA",            46),
-            ("Phoenix, AZ",                 47),
-            ("Pittsburgh, PA",              48),
-            ("Portland, ME",                49),
-            ("Portland, OR",                50),
-            ("Raleigh, NC",                 51),
-            ("Richmond, VA",                52),
-            ("Saint Louis, MO",             53),
-            ("San Diego, CA",               54),
-            ("San Francisco, CA",           55),
-            ("Seattle, WA",                 56),
-            ("Washington DC",               57),
-        ])
-    ]
-    
-    location_data = {
-        # Europe
-        67: ( 51.2167, -4.4, 1),
-        1:  ( 52.33, -13.30, 1),
-        70: ( 48.17, -17.17, 1),
-        72: ( 49.2, -16.63, 1),
-        68: ( 58.8467, -4.3525, 1),
-        65: ( 46.217, -6.150, 1),
-        7:  ( 60.1667, -24.9667,2),
-        62: ( 47.2672, -11.3928, 1),
-        64: ( 50.75, -30.0833, 2),
-        10: ( 51.50, 0.0, 0),
-        66: ( 45.767, -4.833, 1),
-        69: ( 48.32, -18.07, 1),
-        58: ( 59.56, -10.41, 1),
-        15: ( 48.8667, -2.667, 1),
-        71: ( 50.08, -14.46, 1),
-        18: ( 41.90, -12.4833, 1),
-        63: ( 47.3, -11.0667, 1),
-        74: ( 52.232, -21.008, 1),
-        73: ( 51.108, -17.038, 1),
-        21: ( 47.3833, -8.5333, 1),
-        
-        # World Cities
-        0:  ( 39.9167, -116.4167, 8),
-        2:  ( 18.9333, -72.8333, 5.5),
-        3:  (-34.60, 58.45, -3),
-        4:  ( 30.10, -31.3667, 2),
-        5:  (-33.9167, -18.3667, 2),
-        6:  ( 10.50, 66.9333, -4),
-        60: (-25.4278, 49.2731, -3),
-        8:  ( 22.25, -114.1667, 8),
-        9:  ( 31.7833, -35.2333, 2),
-        61: (-29.3044, 48.8456, -3),
-        11: ( 19.4, 99.15, -6),
-        12: ( 55.75, -37.5833, 3),
-        13: ( 28.6, -77.2, 5.5),
-        14: ( 45.41667, 75.7, -5),
-        16: (-22.90, 43.2333, -3),
-        17: ( 24.633, -46.71667, 3),
-        59: ( -23.5475, 46.6361, -3),
-        19: (-33.8667, -151.2167,10),
-        20: ( 35.70, -139.7667, 9), 
-        
-        # US Cities
-        22: ( 35.0833, 106.65, -7),
-        23: ( 61.217, 149.90, -9),
-        24: ( 33.733, 84.383, -5),
-        25: ( 30.283, 97.733, -6),
-        26: ( 33.521, 86.8025, -6),
-        27: ( 46.817, 100.783, -6),
-        28: ( 42.35, 71.05, -5),
-        29: ( 40.125, 105.237, -7),
-        30: ( 41.85, 87.65, -6),
-        31: ( 32.46, 96.47, -6),
-        32: ( 39.733, 104.983, -7),
-        33: ( 42.333, 83.05, -5),
-        34: ( 21.30, 157.85, -10),
-        35: ( 29.75, 95.35, -6),
-        36: ( 39.767, 86.15, -5),
-        37: ( 32.283, 90.183, -6),
-        38: ( 39.083, 94.567, -6),
-        39: ( 34.05, 118.233, -8),
-        40: ( 43.11, 88.10, -6),
-        41: ( 25.767, 80.183, -5),
-        42: ( 44.967, 93.25, -6),
-        43: ( 29.95, 90.067, -6),
-        44: ( 40.7167, 74.0167, -5),
-        45: ( 35.483, 97.533, -6),
-        46: ( 39.95, 75.15, -5),
-        47: ( 33.433, 112.067,-7),
-        48: ( 40.433, 79.9833, -5),
-        49: ( 43.666, 70.283, -5),
-        50: ( 45.517, 122.65, -8),
-        51: ( 35.783, 78.65, -5),
-        52: ( 37.5667, 77.450, -5),
-        53: ( 38.6167, 90.1833, -6),
-        54: ( 32.7667, 117.2167, -8),
-        55: ( 37.7667, 122.4167, -8),
-        56: ( 47.60, 122.3167, -8),
-        57: ( 38.8833, 77.0333, -5),
-    }
-    
-    # mathematical helpers
-    @staticmethod
-    def sind(deg):
-        return math.sin(math.radians(deg))
-    
-    @staticmethod
-    def cosd(deg):
-        return math.cos(math.radians(deg))
-    
-    @staticmethod
-    def tand(deg):
-        return math.tan(math.radians(deg))
-    
-    @staticmethod
-    def asind(deg):
-        return math.degrees(math.asin(deg))
-    
-    @staticmethod
-    def atand(deg):
-        return math.degrees(math.atan(deg))
-    
-    @staticmethod
-    def geo_sun_astronomicJulianDate(Year, Month, Day, LocalTime, Timezone):
-        if Month > 2.0:
-            Y = Year
-            M = Month
-        else:
-            Y = Year - 1.0
-            M = Month + 12.0
-            
-        UT = LocalTime - Timezone
-        hour = UT / 24.0
-        A = int(Y/100.0)
-        
-        JD = math.floor(365.25*(Y+4716.0)) + math.floor(30.6001*(M+1.0)) + Day + hour - 1524.4
-        
-        # The following section is adopted from netCDF4 netcdftime implementation.
-        # Copyright: 2008 by Jeffrey Whitaker
-        # License: http://www.opensource.org/licenses/mit-license.php
-        if JD >= 2299170.5:
-            # 1582 October 15 (Gregorian Calendar)
-            B = 2.0 - A + int(A/4.0)
-        elif JD < 2299160.5:
-            # 1582 October 5 (Julian Calendar)
-            B = 0
-        else:
-            raise Exception('ERROR: Date falls in the gap between Julian and Gregorian calendars.')
-            B = 0
-        
-        return JD+B
-    
-    @staticmethod
-    def geoSunData(Latitude, Longitude, Year, Month, Day, LocalTime, Timezone):
-        JD = sun_calculator.geo_sun_astronomicJulianDate(Year, Month, Day, LocalTime, Timezone)
-        
-        phi = Latitude
-        llambda = Longitude
-                
-        n = JD - 2451545.0
-        LDeg = (280.460 + 0.9856474*n) - (math.floor((280.460 + 0.9856474*n)/360.0) * 360.0)
-        gDeg = (357.528 + 0.9856003*n) - (math.floor((357.528 + 0.9856003*n)/360.0) * 360.0)
-        LambdaDeg = LDeg + 1.915 * sun_calculator.sind(gDeg) + 0.02 * sun_calculator.sind(2.0*gDeg)
-        
-        epsilonDeg = 23.439 - 0.0000004*n
-        
-        alphaDeg = sun_calculator.atand( (sun_calculator.cosd(epsilonDeg) * sun_calculator.sind(LambdaDeg)) / sun_calculator.cosd(LambdaDeg) )
-        if sun_calculator.cosd(LambdaDeg) < 0.0:
-            alphaDeg += 180.0
-            
-        deltaDeg = sun_calculator.asind( sun_calculator.sind(epsilonDeg) * sun_calculator.sind(LambdaDeg) )
-        
-        JDNull = sun_calculator.geo_sun_astronomicJulianDate(Year, Month, Day, 0.0, 0.0)
-        
-        TNull = (JDNull - 2451545.0) / 36525.0
-        T = LocalTime - Timezone
-        
-        thetaGh = 6.697376 + 2400.05134*TNull + 1.002738*T
-        thetaGh -= math.floor(thetaGh/24.0) * 24.0
-        
-        thetaG = thetaGh * 15.0
-        theta = thetaG + llambda
-        
-        tau = theta - alphaDeg
-        
-        a = sun_calculator.atand( sun_calculator.sind(tau) / ( sun_calculator.cosd(tau)*sun_calculator.sind(phi) - sun_calculator.tand(deltaDeg)*sun_calculator.cosd(phi)) )
-        if sun_calculator.cosd(tau)*sun_calculator.sind(phi) - sun_calculator.tand(deltaDeg)*sun_calculator.cosd(phi) < 0.0:
-            a += 180.0
-        
-        h = sun_calculator.asind( sun_calculator.cosd(deltaDeg)*sun_calculator.cosd(tau)*sun_calculator.cosd(phi) + sun_calculator.sind(deltaDeg)*sun_calculator.sind(phi) )
-        
-        R = 1.02 / (sun_calculator.tand (h+(10.3/(h+5.11))))
-        hR = h + R/60.0
-        
-        azimuth = a
-        elevation = hR
-        
-        return azimuth, elevation
-
-# Addon classes
-#----------------------------------------------------------------------------- 
- at GeoSunAddon.addon_register_class
-class OBJECT_OT_set_geographical_sun_now(bpy.types.Operator):
-    bl_idname = 'object.set_geographical_sun_now'
-    bl_label = 'Set time to NOW'
-    
-    @classmethod
-    def poll(cls, context):
-        cl = context.lamp
-        return cl and cl.type == 'SUN'
-    
-    def execute(self, context):
-        GSP = context.lamp.GeoSunProperties
-        
-        now = datetime.datetime.now()
-        for p in ("hour", "minute", "day", "month", "year"):
-            setattr(
-                GSP,
-                p,
-                getattr(now, p)
-            )
-        GSP.tz = time.timezone
-        GSP.dst = False
-        
-        return {'FINISHED'}
-
- at GeoSunAddon.addon_register_class
-class OBJECT_OT_set_geographical_sun_pos(bpy.types.Operator):
-    bl_idname = 'object.set_geographical_sun_pos'
-    bl_label = 'Set SUN position'
-    
-    @classmethod
-    def poll(cls, context):
-        cl = context.lamp
-        return cl and cl.type == 'SUN'
-    
-    def execute(self, context):
-        try:
-            GSP = context.lamp.GeoSunProperties
-            
-            dst = 1 if GSP.dst else 0
-            
-            az,el = sun_calculator.geoSunData(
-                GSP.lat,
-                GSP.long,
-                GSP.year,
-                GSP.month,
-                GSP.day,
-                GSP.hour + GSP.minute/60.0,
-                -GSP.tz + dst
-            )
-            
-            context.object.rotation_euler = ( math.radians(90-el), 0, math.radians(-az) )
-            return {'FINISHED'}
-        except Exception as err:
-            self.report({'ERROR'}, str(err))
-            return {'CANCELLED'}
-
- at GeoSunAddon.addon_register_class
-class OBJECT_OT_set_geographical_location_preset(bpy.types.Operator):
-    bl_idname = 'object.set_geographical_location_preset'
-    bl_label = 'Apply location preset'
-    
-    index = bpy.props.IntProperty()
-    
-    @classmethod
-    def poll(cls, context):
-        cl = context.lamp
-        return cl and cl.type == 'SUN'
-    
-    def execute(self, context):
-        GSP = context.lamp.GeoSunProperties
-        GSP.lat, GSP.long, GSP.tz = sun_calculator.location_data[self.properties.index]
-        return {'FINISHED'}
-
-# Dynamic submenu magic !
-
-def draw_generator(locations):
-    def draw(self, context):
-        sl = self.layout
-        for location in locations:
-            location_name, location_index = location
-            sl.operator('OBJECT_OT_set_geographical_location_preset', text=location_name).index = location_index
-    return draw
-
-submenus = []
-for label, locations in sun_calculator.location_list:
-    submenu_idname = 'OBJECT_MT_geo_sun_location_cat%d'%len(submenus)
-    submenu = type(
-        submenu_idname,
-        (bpy.types.Menu,),
-        {
-            'bl_idname': submenu_idname,
-            'bl_label': label,
-            'draw': draw_generator(locations)
-        }
-    )
-    GeoSunAddon.addon_register_class(submenu)
-    submenus.append(submenu)
-
- at GeoSunAddon.addon_register_class
-class OBJECT_MT_geo_sun_location(bpy.types.Menu):
-    bl_label = 'Location preset'
-    
-    def draw(self, context):
-        sl = self.layout
-        for sm in submenus:
-            sl.menu(sm.bl_idname)
-
- at GeoSunAddon.addon_register_class
-class GeoSunProperties(declarative_property_group):
-    ef_attach_to = ['Lamp']
-    
-    controls = [
-        ['hour', 'minute'],
-        ['day', 'month', 'year'],
-        ['tz', 'dst'],
-        'location_menu',
-        ['lat', 'long'],
-        ['set_time', 'set_posn'],
-    ]
-    
-    properties = [
-        {
-            'type': 'int',
-            'attr': 'minute',
-            'name': 'Minute',
-            'min': 0,
-            'soft_min': 0,
-            'max': 59,
-            'soft_max': 59,
-            'default': today.minute
-        },
-        {
-            'type': 'int',
-            'attr': 'hour',
-            'name': 'Hour',
-            'min': 0,
-            'soft_min': 0,
-            'max': 24,
-            'soft_max': 24,
-            'default': today.hour
-        },
-        {
-            'type': 'int',
-            'attr': 'day',
-            'name': 'Day',
-            'min': 1,
-            'soft_min': 1,
-            'max': 31,
-            'soft_max': 31,
-            'default': today.day
-        },
-        {
-            'type': 'int',
-            'attr': 'month',
-            'name': 'Month',
-            'min': 1,
-            'soft_min': 1,
-            'max': 12,
-            'soft_max': 12,
-            'default': today.month
-        },
-        {
-            'type': 'int',
-            'attr': 'year',
-            'name': 'Year',
-            'min': datetime.MINYEAR,
-            'soft_min': datetime.MINYEAR,
-            'max': datetime.MAXYEAR,
-            'soft_max': datetime.MAXYEAR,
-            'default': today.year
-        },
-        {
-            'type': 'int',
-            'attr': 'tz',
-            'name': 'Time zone',
-            'min': -13,
-            'soft_min': -13,
-            'max': 13,
-            'soft_max': 13,
-            'default': time.timezone
-        },
-        {
-            'type': 'bool',
-            'attr': 'dst',
-            'name': 'DST',
-            'default': False
-        },
-        {
-            'type': 'float',
-            'attr': 'lat',
-            'name': 'Lat.',
-            'min': -180.0,
-            'soft_min': -180.0,
-            'max': 180.0,
-            'soft_max': 180.0,
-            'default': 0.0
-        },
-        {
-            'type': 'float',
-            'attr': 'long',
-            'name': 'Long.',
-            'min': -90.0,
-            'soft_min': -90.0,
-            'max': 90.0,
-            'soft_max': 90.0,
-            'default': 0.0
-        },
-        
-        # draw operators and menus
-        {
-            'attr': 'location_menu',
-            'type': 'menu',
-            'menu': 'OBJECT_MT_geo_sun_location'
-        },
-        {
-            'attr': 'set_time',
-            'type': 'operator',
-            'operator': 'object.set_geographical_sun_now',
-            'icon': 'PREVIEW_RANGE'
-        },
-        {
-            'attr': 'set_posn',
-            'type': 'operator',
-            'operator': 'object.set_geographical_sun_pos',
-            'icon': 'WORLD_DATA'
-        },
-    ]
-
- at GeoSunAddon.addon_register_class
-class GeoSunPanel(property_group_renderer):
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'data'
-    bl_label = 'Geographical Sun'
-    
-    display_property_groups = [
-        ( ('lamp',), 'GeoSunProperties' )
-    ]
-    
-    @classmethod
-    def poll(cls, context):
-        cl = context.lamp
-        return cl and cl.type == 'SUN'
-
-# Bootstrap the Addon
-#----------------------------------------------------------------------------- 
-register, unregister = GeoSunAddon.init_functions()
diff --git a/release/scripts/addons_contrib/mesh_copy_uvs_from_joined.py b/release/scripts/addons_contrib/mesh_copy_uvs_from_joined.py
deleted file mode 100644
index 8fad2cb..0000000
--- a/release/scripts/addons_contrib/mesh_copy_uvs_from_joined.py
+++ /dev/null
@@ -1,211 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Copy UV's from Joined",
-    "description": "Copy UV coordinates from the active joined mesh",
-    "author": "Sergey Sharybin",
-    "version": (0, 1),
-    "blender": (2, 63, 14),
-    "location": "Object mode 'Make Links' menu",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Object"}
-
-
-import bpy
-from bpy.types import Operator
-from mathutils import Vector
-
-FLT_MAX = 30000.0
-KEY_PRECISION = 1
-
-
-def MINMAX_INIT():
-    return (Vector((+FLT_MAX, +FLT_MAX, +FLT_MAX)),
-            Vector((-FLT_MAX, -FLT_MAX, -FLT_MAX)))
-
-
-def MINMAX_DO(min, max, vec):
-    for x in range(3):
-        if vec[x] < min[x]:
-            min[x] = vec[x]
-
-        if vec[x] > max[x]:
-            max[x] = vec[x]
-
-
-def getObjectAABB(obj):
-    min, max = MINMAX_INIT()
-
-    matrix = obj.matrix_world.copy()
-    for vec in obj.bound_box:
-        v = matrix * Vector(vec)
-        MINMAX_DO(min, max, v)
-
-    return min, max
-
-
-class  OBJECT_OT_copy_uv_from_joined(Operator):
-    """
-    Copy UVs from joined objects into originals
-    """
-
-    bl_idname = "object.copy_uv_from_joined"
-    bl_label = "Copy UVs from Joined"
-
-    def _findTranslation(self, obact, objects):
-        """
-        Find a translation from original objects to joined
-        """
-
-        bb_joined = getObjectAABB(obact)
-        bb_orig = MINMAX_INIT()
-
-        for ob in objects:
-            if ob != obact:
-                bb = getObjectAABB(ob)
-                MINMAX_DO(bb_orig[0], bb_orig[1], bb[0])
-                MINMAX_DO(bb_orig[0], bb_orig[1], bb[1])
-
-        return bb_joined[0] - bb_orig[0]
-
-    def _getPolygonMedian(self, me, poly):
-        median = Vector()
-        verts = me.vertices
-
-        for vert_index in poly.vertices:
-            median += verts[vert_index].co
-
-        median /= len(poly.vertices)
-
-        return median
-
-    def _getVertexLookupMap(self, obact, objects):
-        """
-        Create a vertex lookup map from joined object space to original object
-        """
-
-        uv_map = {}
-
-        T = self._findTranslation(obact, objects)
-
-        for obj in objects:
-            if obj != obact:
-                me = obj.data
-                mat = obj.matrix_world.copy()
-                uv_layer = me.uv_layers.active
-
-                for poly in me.polygons:
-                    center = mat * self._getPolygonMedian(me, poly) + T
-                    center_key = center.to_tuple(KEY_PRECISION)
-
-                    for loop_index in poly.loop_indices:
-                        loop = me.loops[loop_index]
-                        vert = me.vertices[loop.vertex_index]
-                        vec = mat * vert.co + T
-
-                        key = (center_key, vec.to_tuple(KEY_PRECISION))
-
-                        uv_map.setdefault(key, []).append((center, vec, (uv_layer, loop_index)))
-
-        return uv_map
-
-    def execute(self, context):
-        obact = context.object
-
-        # Check wether we're working with meshes
-        # other object types are not supported
-        if obact.type != 'MESH':
-            self.report({'ERROR'}, "Only meshes are supported")
-            return {'CANCELLED'}
-
-        objects = context.selected_objects
-
-        for obj in context.selected_objects:
-            if obj.type != 'MESH':
-                self.report({'ERROR'}, "Only meshes are supported")
-                return {'CANCELLED'}
-
-        uv_map = self._getVertexLookupMap(obact, objects)
-
-        me = obact.data
-        mat = obact.matrix_world.copy()
-        uv_layer = me.uv_layers.active
-
-        for poly in me.polygons:
-            center = mat * self._getPolygonMedian(me, poly)
-            center_key = center.to_tuple(KEY_PRECISION)
-
-            for loop_index in poly.loop_indices:
-                loop = me.loops[loop_index]
-                vert = me.vertices[loop.vertex_index]
-                vec = mat * vert.co
-
-                key = (center_key, vec.to_tuple(KEY_PRECISION))
-                check_list = uv_map.get(key)
-
-                if check_list is not None:
-                    new_uv = None
-                    closest_data = None
-
-                    dist = FLT_MAX
-                    for x in check_list:
-                        cur_center, cur_vec, data = x
-
-                        d1 = Vector(cur_center) - Vector(center)
-                        d2 = Vector(cur_vec) - Vector(vec)
-
-                        d = d1.length_squared + d2.length_squared
-
-                        if d < dist:
-                            closest_data = data
-                            dist = d
-
-                    if closest_data is not None:
-                        orig_uv_layer, orig_loop_index = closest_data
-                        new_uv = uv_layer.data[loop_index].uv
-                        orig_uv_layer.data[orig_loop_index].uv = new_uv
-                else:
-                    print("Failed to lookup %r" % key)
-
-        return {'FINISHED'}
-
-
-def menu_func(self, context):
-    self.layout.operator("OBJECT_OT_copy_uv_from_joined",
-                         text="Join as UVs (active to other selected)",
-                         icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    
-    bpy.types.VIEW3D_MT_make_links.append(menu_func)
-    
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.VIEW3D_MT_make_links.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_discombobulator.py b/release/scripts/addons_contrib/mesh_discombobulator.py
deleted file mode 100644
index 5da42f4..0000000
--- a/release/scripts/addons_contrib/mesh_discombobulator.py
+++ /dev/null
@@ -1,685 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
- 
-bl_info = {
-    "name": "Discombobulator",
-    "description": "Its job is to easily add scifi details to a surface to create nice-looking space-ships or futuristic cities.",
-    "author": "Evan J. Rosky (syrux), Chichiri, Jace Priester",
-    "version": (0,2),
-    "blender": (2, 6, 4),
-    "location": "Spacebar > Discombobulate",
-    "warning": 'Beta',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-                   'func=detail&aid=31390',
-    "category": "Mesh"}
- 
-import bpy
-import random
-import mathutils
-import math
-from mathutils import *
-
-doprots = True
- 
-# Datas in which we will build the new discombobulated mesh
-nPolygons = []
-nVerts = []
-Verts = []
-Polygons = []
-dVerts = []
-dPolygons = []
-i_prots = [] # index of the top polygons on whow we will generate the doodads
-i_dood_type = [] # type of doodad (given by index of the doodad obj)
- 
-bpy.types.Scene.DISC_doodads = []
- 
-def randnum(a, b):
-    return random.random()*(b-a)+a
- 
-def randVertex(a, b, c, d, Verts):
-    """Return a vector of a random vertex on a quad-polygon"""
-    i = random.randint(1,2)
-    A, B, C, D = 0, 0, 0, 0
-    if(a==1):
-        A, B, C, D = a, b, c, d
-    else:
-        A, B, C, D = a, d, c, b
-   
-    i = randnum(0.1, 0.9)
-   
-
-    vecAB=Verts[B]-Verts[A]
-    E=Verts[A]+vecAB*i
-   
-    vecDC=Verts[C]-Verts[D]
-    F=Verts[D]+vecDC*i
-   
-    i = randnum(0.1, 0.9)
-    vecEF=F-E
-    
-    O=E+vecEF*i
-    return O
- 
-################################ Protusions ###################################
- 
-def fill_older_datas(verts, polygon):
-    """ Specifically coded to be called by the function addProtusionToPolygon, its sets up a tuple which contains the vertices from the base and the top of the protusions. """
-    temp_vertices = []  
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-    return temp_vertices
-   
-def extrude_top(temp_vertices, normal, height):
-    """ This function extrude the polygon composed of the four first members of the tuple temp_vertices along the normal multiplied by the height of the extrusion."""
-    j = 0
-    while j < 3:  
-        temp_vertices[0][j]+=normal[j]*height
-        temp_vertices[1][j]+=normal[j]*height
-        temp_vertices[2][j]+=normal[j]*height
-        temp_vertices[3][j]+=normal[j]*height
-        j+=1
- 
-def scale_top(temp_vertices, center, normal, height, scale_ratio):
-    """ This function scale the polygon composed of the four first members of the tuple temp_vertices. """
-    vec1 = [0, 0, 0]
-    vec2 = [0, 0, 0]
-    vec3 = [0, 0, 0]
-    vec4 = [0, 0, 0]
-   
-    j = 0
-    while j < 3:
-        center[j]+=normal[j]*height
-        vec1[j] = temp_vertices[0][j] - center[j]
-        vec2[j] = temp_vertices[1][j] - center[j]
-        vec3[j] = temp_vertices[2][j] - center[j]
-        vec4[j] = temp_vertices[3][j] - center[j]
-        temp_vertices[0][j] = center[j] + vec1[j]*(1-scale_ratio)
-        temp_vertices[1][j] = center[j] + vec2[j]*(1-scale_ratio)
-        temp_vertices[2][j] = center[j] + vec3[j]*(1-scale_ratio)
-        temp_vertices[3][j] = center[j] + vec4[j]*(1-scale_ratio)
-        j+=1
- 
-def add_prot_polygons(temp_vertices):
-    """ Specifically coded to be called by addProtusionToPolygon, this function put the data from the generated protusion at the end the tuples Verts and Polygons, which will later used to generate the final mesh. """
-    global Verts
-    global Polygons
-    global i_prots
-   
-    findex = len(Verts)
-    Verts+=temp_vertices
-   
-    polygontop = [findex+0, findex+1, findex+2, findex+3]
-    polygon1 = [findex+0, findex+1, findex+5, findex+4]
-    polygon2 = [findex+1, findex+2, findex+6, findex+5]
-    polygon3 = [findex+2, findex+3, findex+7, findex+6]
-    polygon4 = [findex+3, findex+0, findex+4, findex+7]
-   
-    Polygons.append(polygontop)
-    i_prots.append(len(Polygons)-1)
-    Polygons.append(polygon1)
-    Polygons.append(polygon2)
-    Polygons.append(polygon3)
-    Polygons.append(polygon4)
-       
-def addProtusionToPolygon(obpolygon, verts, minHeight, maxHeight, minTaper, maxTaper):
-    """Create a protusion from the polygon "obpolygon" of the original object and use several values sent by the user. It calls in this order the following functions:
-       - fill_older_data;
-       - extrude_top;
-       - scale_top;
-       - add_prot_polygons;
-   """
-    # some useful variables
-    polygon = obpolygon.vertices
-    polygontop = polygon
-    polygon1 = []
-    polygon2 = []
-    polygon3 = []
-    polygon4 = []
-    vertices = []
-    tVerts = list(fill_older_datas(verts, polygon)) # list of temp vertices
-    height = randnum(minHeight, maxHeight) # height of generated protusion
-    scale_ratio = randnum(minTaper, maxTaper)
-   
-    # extrude the top polygon
-    extrude_top(tVerts, obpolygon.normal, height)
-    # Now, we scale, the top polygon along its normal
-    scale_top(tVerts, GetPolyCentroid(obpolygon,verts), obpolygon.normal, height, scale_ratio)
-    # Finally, we add the protusions to the list of polygons
-    add_prot_polygons(tVerts)
- 
-################################## Divide a polygon ##################################
- 
-def divide_one(list_polygons, list_vertices, verts, polygon, findex):
-    """ called by divide_polygon, to generate a polygon from one polygon, maybe I could simplify this process """
-    temp_vertices = []
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-   
-    list_vertices+=temp_vertices
-       
-    list_polygons.append([findex+0, findex+1, findex+2, findex+3])
- 
-def divide_two(list_polygons, list_vertices, verts, polygon, findex):
-    """ called by divide_polygon, to generate two polygons from one polygon and add them to the list of polygons and vertices which form the discombobulated mesh"""
-    temp_vertices = []
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-    temp_vertices.append((verts[polygon[0]]+verts[polygon[1]])/2)
-    temp_vertices.append((verts[polygon[2]]+verts[polygon[3]])/2)
-       
-    list_vertices+=temp_vertices
-       
-    list_polygons.append([findex+0, findex+4, findex+5, findex+3])
-    list_polygons.append([findex+1, findex+2, findex+5, findex+4])
-
-def divide_three(list_polygons, list_vertices, verts, polygon, findex, center):
-    """ called by divide_polygon, to generate three polygons from one polygon and add them to the list of polygons and vertices which form the discombobulated mesh"""
-    temp_vertices = []
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-    temp_vertices.append((verts[polygon[0]]+verts[polygon[1]])/2)
-    temp_vertices.append((verts[polygon[2]]+verts[polygon[3]])/2)
-    temp_vertices.append((verts[polygon[1]]+verts[polygon[2]])/2)
-    temp_vertices.append(center.copy())
-       
-    list_vertices+=temp_vertices
-       
-    list_polygons.append([findex+0, findex+4, findex+5, findex+3])
-    list_polygons.append([findex+1, findex+6, findex+7, findex+4])
-    list_polygons.append([findex+6, findex+2, findex+5, findex+7])
-  
-def divide_four(list_polygons, list_vertices, verts, polygon, findex, center):
-    """ called by divide_polygon, to generate four polygons from one polygon and add them to the list of polygons and vertices which form the discombobulated mesh"""
-    temp_vertices = []
-    temp_vertices.append(verts[polygon[0]].copy())
-    temp_vertices.append(verts[polygon[1]].copy())
-    temp_vertices.append(verts[polygon[2]].copy())
-    temp_vertices.append(verts[polygon[3]].copy())
-    temp_vertices.append((verts[polygon[0]]+verts[polygon[1]])/2)
-    temp_vertices.append((verts[polygon[2]]+verts[polygon[3]])/2)
-    temp_vertices.append((verts[polygon[1]]+verts[polygon[2]])/2)
-    temp_vertices.append(center.copy())
-    temp_vertices.append((verts[polygon[0]]+verts[polygon[3]])/2)
-    temp_vertices.append(center.copy())
-   
-    list_vertices+=temp_vertices
-       
-    list_polygons.append([findex+0, findex+4, findex+7, findex+8])
-    list_polygons.append([findex+1, findex+6, findex+7, findex+4])
-    list_polygons.append([findex+6, findex+2, findex+5, findex+7])
-    list_polygons.append([findex+8, findex+7, findex+5, findex+3])
-   
-def dividepolygon(obpolygon, verts, number):
-    """Divide the poly into the wanted number of polygons"""
-    global nPolygons
-    global nVerts
-   
-    poly = obpolygon.vertices
-    tVerts = []
-   
-    if(number==1):
-        divide_one(nPolygons, nVerts, verts, poly, len(nVerts))
-    elif(number==2):
-        divide_two(nPolygons, nVerts, verts, poly, len(nVerts))
-    elif(number==3):
-        divide_three(nPolygons, nVerts, verts, poly, len(nVerts), GetPolyCentroid(obpolygon,verts))
-    elif(number==4):
-        divide_four(nPolygons, nVerts, verts, poly, len(nVerts), GetPolyCentroid(obpolygon,verts))
-   
-############################### Discombobulate ################################
-
-def GetPolyCentroid(obpolygon,allvertcoords):
-    centroid=mathutils.Vector((0,0,0))
-    for vindex in obpolygon.vertices:
-        centroid+=mathutils.Vector(allvertcoords[vindex])
-    centroid/=len(obpolygon.vertices)
-    return centroid
- 
-def division(obpolygons, verts, sf1, sf2, sf3, sf4):
-    """Function to divide each of the selected polygons"""
-    divide = []
-    if(sf1): divide.append(1)
-    if(sf2): divide.append(2)
-    if(sf3): divide.append(3)
-    if(sf4): divide.append(4)
-    for poly in obpolygons:
-        if(poly.select == True and len(poly.vertices)==4):
-            a = random.randint(0, len(divide)-1)
-            dividepolygon(poly, verts, divide[a])
- 
-def protusion(obverts, obpolygons, minHeight, maxHeight, minTaper, maxTaper):
-    """function to generate the protusions"""
-    verts = []
-    for vertex in obverts:
-        verts.append(vertex.co)
-           
-    for polygon in obpolygons:
-        if(polygon.select == True):
-            if(len(polygon.vertices) == 4):
-                addProtusionToPolygon(polygon, verts, minHeight, maxHeight, minTaper, maxTaper)
- 
-def test_v2_near_v1(v1, v2):
-    if(v1.x - 0.1 <= v2.x <= v1.x + 0.1
-        and v1.y - 0.1 <= v2.y <= v1.y + 0.1
-        and v1.z - 0.1 <= v2.z <= v1.z + 0.1):
-        return True
-   
-    return False
- 
-def angle_between_nor(nor_orig, nor_result):
-    angle = math.acos(nor_orig.dot(nor_result))
-    axis = nor_orig.cross(nor_result).normalized()
-   
-    q = mathutils.Quaternion()
-    q.x = axis.x*math.sin(angle/2)
-    q.y = axis.y*math.sin(angle/2)
-    q.z = axis.z*math.sin(angle/2)
-    q.w = math.cos(angle/2)
-   
-    return q
- 
-def doodads(object1, mesh1, dmin, dmax):
-    """function to generate the doodads"""
-    global dVerts
-    global dPolygons
-    i = 0
-    # on parcoure cette boucle pour ajouter des doodads a toutes les polygons
-    # english translation: this loops adds doodads to all polygons
-    while(i<len(object1.data.polygons)):
-        if object1.data.polygons[i].select==False:
-            continue
-        doods_nbr = random.randint(dmin, dmax)
-        j = 0
-        while(j<=doods_nbr):
-            origin_dood = randVertex(object1.data.polygons[i].vertices[0], object1.data.polygons[i].vertices[1], object1.data.polygons[i].vertices[2], object1.data.polygons[i].vertices[3], Verts)
-            type_dood = random.randint(0, len(bpy.context.scene.DISC_doodads)-1)
-            polygons_add = []
-            verts_add = []
-           
-            # First we have to apply scaling and rotation to the mesh
-            bpy.ops.object.select_pattern(pattern=bpy.context.scene.DISC_doodads[type_dood],extend=False)
-            bpy.context.scene.objects.active=bpy.data.objects[bpy.context.scene.DISC_doodads[type_dood]]
-            bpy.ops.object.transform_apply(rotation=True, scale=True)
-           
-            for polygon in bpy.data.objects[bpy.context.scene.DISC_doodads[type_dood]].data.polygons:
-                polygons_add.append(polygon.vertices)
-            for vertex in bpy.data.objects[bpy.context.scene.DISC_doodads[type_dood]].data.vertices:
-                verts_add.append(vertex.co.copy())
-            normal_original_polygon = object1.data.polygons[i].normal
-           
-            nor_def = mathutils.Vector((0.0, 0.0, 1.0))
-            qr = nor_def.rotation_difference(normal_original_polygon.normalized())
-           
-            case_z = False
-            if(test_v2_near_v1(nor_def, -normal_original_polygon)):
-                case_z = True
-                qr = mathutils.Quaternion((0.0, 0.0, 0.0, 0.0))
-            #qr = angle_between_nor(nor_def, normal_original_polygon)
-            for vertex in verts_add:
-                vertex.rotate(qr)
-                vertex+=origin_dood
-            findex = len(dVerts)
-            for polygon in polygons_add:
-                dPolygons.append([polygon[0]+findex, polygon[1]+findex, polygon[2]+findex, polygon[3]+findex])
-                i_dood_type.append(bpy.data.objects[bpy.context.scene.DISC_doodads[type_dood]].name)
-            for vertex in verts_add:
-                dVerts.append(vertex)
-            j+=1
-        i+=5
-       
-def protusions_repeat(object1, mesh1, r_prot):
-
-        for j in i_prots:
-            if j<len(object1.data.polygons):
-                object1.data.polygons[j].select=True
-            else:
-                print("Warning: hit end of polygons in object1")
- 
-# add material to discombobulated mesh
-def setMatProt(discObj, origObj, sideProtMat, topProtMat):
-    # First we put the materials in their slots
-    bpy.ops.object.select_pattern(pattern = discObj.name,extend=False)
-    bpy.context.scene.objects.active=bpy.data.objects[discObj.name]
-    try:
-        origObj.material_slots[topProtMat]
-        origObj.material_slots[sideProtMat]
-    except:
-        return
-        
-    bpy.ops.object.material_slot_add()
-    bpy.ops.object.material_slot_add()
-    discObj.material_slots[0].material = origObj.material_slots[topProtMat].material
-    discObj.material_slots[1].material = origObj.material_slots[sideProtMat].material
-   
-    # Then we assign materials to protusions
-    for polygon in discObj.data.polygons:
-        if polygon.index in i_prots:
-            polygon.material_index = 0
-        else:
-            polygon.material_index = 1
- 
-def setMatDood(doodObj):
-    # First we add the materials slots
-    bpy.ops.object.select_pattern(pattern = doodObj.name,extend=False)
-    bpy.context.scene.objects.active=doodObj
-    for name in bpy.context.scene.DISC_doodads:
-        try:
-            bpy.ops.object.material_slot_add()
-            doodObj.material_slots[-1].material = bpy.data.objects[name].material_slots[0].material
-            for polygon in doodObj.data.polygons:
-                if i_dood_type[polygon.index] == name:
-                    polygon.material_index = len(doodObj.material_slots)-1
-        except:
-            print()
-           
-           
-def clean_doodads():
-    current_doodads=list(bpy.context.scene.DISC_doodads)
-    
-    for name in current_doodads:
-        if name not in bpy.data.objects:
-            bpy.context.scene.DISC_doodads.remove(name)
-            
-
-def discombobulate(minHeight, maxHeight, minTaper, maxTaper, sf1, sf2, sf3, sf4, dmin, dmax, r_prot, sideProtMat, topProtMat, isLast):
-    global doprots
-    global nVerts
-    global nPolygons
-    global Verts
-    global Polygons
-    global dVerts
-    global dPolygons
-    global i_prots
-    
-   
-    bpy.ops.object.mode_set(mode="OBJECT")
-    
-    
-    #start by cleaning up doodads that don't exist anymore
-    clean_doodads()
-    
-    
-    # Create the discombobulated mesh
-    mesh = bpy.data.meshes.new("tmp")
-    object = bpy.data.objects.new("tmp", mesh)
-    bpy.context.scene.objects.link(object)
-   
-    # init final verts and polygons tuple
-    nPolygons = []
-    nVerts = []
-    Polygons = []
-    Verts = []
-    dPolygons = []
-    dVerts = []
-   
-    origObj = bpy.context.active_object
-   
-    # There we collect the rotation, translation and scaling datas from the original mesh
-    to_translate = bpy.context.active_object.location
-    to_scale     = bpy.context.active_object.scale
-    to_rotate    = bpy.context.active_object.rotation_euler
-   
-    # First, we collect all the informations we will need from the previous mesh        
-    obverts = bpy.context.active_object.data.vertices
-    obpolygons = bpy.context.active_object.data.polygons
-    verts = []
-    for vertex in obverts:
-        verts.append(vertex.co)
-   
-    division(obpolygons, verts, sf1, sf2, sf3, sf4)
-       
-    # Fill in the discombobulated mesh with the new polygons
-    mesh.from_pydata(nVerts, [], nPolygons)
-    mesh.update(calc_edges = True)
-   
-    # Reload the datas
-    bpy.ops.object.select_all(action="DESELECT")
-    bpy.ops.object.select_pattern(pattern = object.name,extend=False)
-    bpy.context.scene.objects.active=bpy.data.objects[object.name]
-    obverts = bpy.context.active_object.data.vertices
-    obpolygons = bpy.context.active_object.data.polygons
-   
-    protusion(obverts, obpolygons, minHeight, maxHeight, minTaper, maxTaper)
-   
-    # Fill in the discombobulated mesh with the new polygons
-    mesh1 = bpy.data.meshes.new("discombobulated_object")
-    object1 = bpy.data.objects.new("discombobulated_mesh", mesh1)
-    bpy.context.scene.objects.link(object1)
-    mesh1.from_pydata(Verts, [], Polygons)
-    mesh1.update(calc_edges = True)
-   
-   
-    # Set the material's of discombobulated object
-    setMatProt(object1, origObj, sideProtMat, topProtMat)
-   
-    bpy.ops.object.select_pattern(pattern = object1.name,extend=False)
-    bpy.context.scene.objects.active=bpy.data.objects[object1.name]
-    bpy.ops.object.mode_set(mode='EDIT')
-    bpy.ops.mesh.normals_make_consistent(inside=False)
-    bpy.ops.mesh.select_all(action='DESELECT')
-    bpy.ops.object.mode_set(mode='OBJECT')
-   
-    #if(bpy.context.scene.repeatprot):
-    protusions_repeat(object1, mesh1, r_prot)
-   
-    if(len(bpy.context.scene.DISC_doodads) != 0 and bpy.context.scene.dodoodads and isLast):
-        doodads(object1, mesh1, dmin, dmax)
-        mesh2 = bpy.data.meshes.new("dood_mesh")
-        object2 = bpy.data.objects.new("dood_obj", mesh2)
-        bpy.context.scene.objects.link(object2)
-        mesh2.from_pydata(dVerts, [], dPolygons)
-        mesh2.update(calc_edges = True)
-        setMatDood(object2)
-        object2.location        = to_translate
-        object2.rotation_euler  = to_rotate
-        object2.scale           = to_scale
- 
-    bpy.ops.object.select_pattern(pattern = object.name,extend=False)
-    bpy.context.scene.objects.active=bpy.data.objects[object.name]
-    bpy.ops.object.delete()
-    
-    bpy.ops.object.select_pattern(pattern=object1.name,extend=False)
-    bpy.context.scene.objects.active=bpy.data.objects[object1.name]
-    bpy.context.scene.update()
-   
-    # translate, scale and rotate discombobulated results
-    object1.location        = to_translate
-    object1.rotation_euler  = to_rotate
-    object1.scale           = to_scale
-    
-    #set all polys to selected. this allows recursive discombobulating.
-    for poly in mesh1.polygons:
-        poly.select=True
- 
-############ Operator to select and deslect an object as a doodad ###############
- 
-class chooseDoodad(bpy.types.Operator):
-    bl_idname = "object.discombobulate_set_doodad"
-    bl_label = "Discombobulate set doodad object"
-   
-    def execute(self, context):
-        bpy.context.scene.DISC_doodads.append(bpy.context.active_object.name)
-       
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
- 
-class unchooseDoodad(bpy.types.Operator):
-    bl_idname = "object.discombobulate_unset_doodad"
-    bl_label = "Discombobulate unset doodad object"
-   
-    def execute(self, context):
-        for name in bpy.context.scene.DISC_doodads:
-            if name == bpy.context.active_object.name:
-                bpy.context.scene.DISC_doodads.remove(name)
-               
-    def invoke(self, context, event):
-        self.execute(context)
-        return {'FINISHED'}
- 
-################################## Interpolygon ####################################
- 
-class discombobulator(bpy.types.Operator):
-    bl_idname = "object.discombobulate"
-    bl_label = "Discombobulate"
-    bl_options = {'REGISTER', 'UNDO'}  
-   
-    def execute(self, context):
-        scn = context.scene
-        i=0
-        while i<scn.repeatprot:
-            isLast=False
-            if i==scn.repeatprot-1:
-                isLast=True
-            discombobulate(scn.minHeight, scn.maxHeight, scn.minTaper, scn.maxTaper, scn.subpolygon1, scn.subpolygon2, scn.subpolygon3, scn.subpolygon4, scn.mindoodads, scn.maxdoodads, scn.repeatprot, scn.sideProtMat, scn.topProtMat, isLast)
-            i+=1
-        return {'FINISHED'}
-
-class discombob_help(bpy.types.Operator):
-	bl_idname = 'help.discombobulator'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Works with Quads only not Ngons.')
-		layout.label('Select a face or faces')
-		layout.label('Press Discombobulate to create greebles')
-
-
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-		
-class VIEW3D_PT_tools_discombobulate(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Discombobulator"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}
-	
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row()
-        row = layout.split(0.80)
-        row.operator('object.discombobulate', text = 'Discombobulate', icon = 'PLUGIN')
-        row.operator('help.discombobulator', icon = 'INFO')
-        box = layout.box()
-        box.label("Protusions settings")
-        row = box.row()
-        row.prop(context.scene, 'doprots')
-        row = box.row()
-        row.prop(context.scene, 'minHeight')
-        row = box.row()
-        row.prop(context.scene, 'maxHeight')
-        row = box.row()
-        row.prop(context.scene, 'minTaper')
-        row = box.row()
-        row.prop(context.scene, 'maxTaper')
-        row = box.row()
-        col1 = row.column(align = True)
-        col1.prop(context.scene, "subpolygon1")
-        col2 = row.column(align = True)
-        col2.prop(context.scene, "subpolygon2")
-        col3 = row.column(align = True)
-        col3.prop(context.scene, "subpolygon3")
-        col4 = row.column(align = True)
-        col4.prop(context.scene, "subpolygon4")
-        row = box.row()
-        row.prop(context.scene, "repeatprot")
-        box = layout.box()
-        box.label("Doodads settings")
-        row = box.row()
-        row.prop(context.scene, 'dodoodads')
-        row = box.row()
-        row.prop(context.scene, "mindoodads")
-        row = box.row()
-        row.prop(context.scene, "maxdoodads")
-        row = box.row()
-        row.operator("object.discombobulate_set_doodad", text = "Pick doodad")
-        row = box.row()
-        row.operator("object.discombobulate_unset_doodad", text = "Remove doodad")
-        col = box.column(align = True)
-        for name in bpy.context.scene.DISC_doodads:
-            col.label(text = name)
-        box = layout.box()
-        box.label("Materials settings")
-        row = box.row()
-        row.prop(context.scene, 'topProtMat')
-        row = box.row()
-        row.prop(context.scene, "sideProtMat")
-        row = box.row()
-           
-# registering and menu integration
-def register():
-    # Protusions Buttons:
-    bpy.types.Scene.repeatprot = bpy.props.IntProperty(name="Repeat protusions", description="make several layers of protusion", default = 1, min = 1, max = 10)
-    bpy.types.Scene.doprots = bpy.props.BoolProperty(name="Make protusions", description = "Check if we want to add protusions to the mesh", default = True)
-    bpy.types.Scene.polygonschangedpercent = bpy.props.FloatProperty(name="Polygon %", description = "Percentage of changed polygons", default = 1.0)
-    bpy.types.Scene.minHeight = bpy.props.FloatProperty(name="Min height", description="Minimal height of the protusions", default=0.2)
-    bpy.types.Scene.maxHeight = bpy.props.FloatProperty(name="Max height", description="Maximal height of the protusions", default = 0.4)
-    bpy.types.Scene.minTaper = bpy.props.FloatProperty(name="Min taper", description="Minimal height of the protusions", default=0.15, min = 0.0, max = 1.0, subtype = 'PERCENTAGE')
-    bpy.types.Scene.maxTaper = bpy.props.FloatProperty(name="Max taper", description="Maximal height of the protusions", default = 0.35, min = 0.0, max = 1.0, subtype = 'PERCENTAGE')
-    bpy.types.Scene.subpolygon1 = bpy.props.BoolProperty(name="1", default = True)
-    bpy.types.Scene.subpolygon2 = bpy.props.BoolProperty(name="2", default = True)
-    bpy.types.Scene.subpolygon3 = bpy.props.BoolProperty(name="3", default = True)
-    bpy.types.Scene.subpolygon4 = bpy.props.BoolProperty(name="4", default = True)
-   
-    # Doodads buttons:
-    bpy.types.Scene.dodoodads = bpy.props.BoolProperty(name="Make doodads", description = "Check if we want to generate doodads", default = True)
-    bpy.types.Scene.mindoodads = bpy.props.IntProperty(name="Minimum doodads number", description = "Ask for the minimum number of doodads to generate per polygon", default = 1, min = 0, max = 50)
-    bpy.types.Scene.maxdoodads = bpy.props.IntProperty(name="Maximum doodads number", description = "Ask for the maximum number of doodads to generate per polygon", default = 6, min = 1, max = 50)
-    bpy.types.Scene.doodMinScale = bpy.props.FloatProperty(name="Scale min", description="Minimum scaling of doodad", default = 0.5, min = 0.0, max = 1.0, subtype = 'PERCENTAGE')
-    bpy.types.Scene.doodMaxScale = bpy.props.FloatProperty(name="Scale max", description="Maximum scaling of doodad", default = 1.0, min = 0.0, max = 1.0, subtype = 'PERCENTAGE')
-   
-    # Materials buttons:
-    bpy.types.Scene.sideProtMat = bpy.props.IntProperty(name="Side's prot mat", description = "Material of protusion's sides", default = 0, min = 0)
-    bpy.types.Scene.topProtMat = bpy.props.IntProperty(name = "Prot's top mat", description = "Material of protusion's top", default = 0, min = 0)
-   
-    bpy.utils.register_class(discombobulator)
-    bpy.utils.register_class(chooseDoodad)
-    bpy.utils.register_class(unchooseDoodad)
-    bpy.utils.register_class(VIEW3D_PT_tools_discombobulate)
-    bpy.utils.register_class(discombob_help)
- 
-# unregistering and removing menus
-def unregister():
-    bpy.utils.unregister_class(discombobulator)
-    bpy.utils.unregister_class(chooseDoodad)
-    bpy.utils.unregister_class(unchooseDoodad)
-    bpy.utils.unregister_class(VIEW3D_PT_tools_discombobulate)
-    bpy.utils.unregister_class(discombob_help)
- 
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_edge_intersection_tools.py b/release/scripts/addons_contrib/mesh_edge_intersection_tools.py
deleted file mode 100644
index 5bf4a82..0000000
--- a/release/scripts/addons_contrib/mesh_edge_intersection_tools.py
+++ /dev/null
@@ -1,332 +0,0 @@
-'''
-BEGIN GPL LICENSE BLOCK
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software Foundation,
-Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-
-END GPL LICENCE BLOCK
-'''
-
-bl_info = {
-    "name": "Edge tools : tinyCAD VTX",
-    "author": "zeffii",
-    "version": (0, 5, 1),
-    "blender": (2, 5, 6),
-    "category": "Mesh",
-    "location": "View3D > EditMode > (w) Specials",
-    "warning": "Still under development",
-    "wiki_url": "http://wiki.blender.org/index.php/"\
-        "Extensions:2.6/Py/Scripts/Modeling/Edge_Slice",
-    "tracker_url": "http://projects.blender.org/tracker/"\
-        "?func=detail&aid=25227"
-   }
-
-"""
-parts based on Keith (Wahooney) Boshoff, cursor to intersection script and
-Paul Bourke's Shortest Line Between 2 lines, and thanks to PKHG from BA.org
-for attempting to explain things to me that i'm not familiar with.
-TODO: [ ] allow multi selection ( > 2 ) for Slice/Weld intersection mode
-TODO: [ ] streamline this code !
-
-1) Edge Extend To Edge ( T )
-2) Edge Slice Intersecting ( X )
-3) Edge Project Converging  ( V )
-
-"""
-
-import bpy
-import sys
-from mathutils import Vector, geometry
-from mathutils.geometry import intersect_line_line as LineIntersect
-
-VTX_PRECISION = 1.0e-5 # or 1.0e-6 ..if you need
-
-#   returns distance between two given points
-def mDist(A, B): return (A-B).length
-
-
-#   returns True / False if a point happens to lie on an edge
-def isPointOnEdge(point, A, B):
-    eps = ((mDist(A, B) - mDist(point,B)) - mDist(A,point))
-    if abs(eps) < VTX_PRECISION: return True
-    else:
-        print('distance is ' + str(eps))
-        return False
-
-
-#   returns the number of edges that a point lies on.
-def CountPointOnEdges(point, outer_points):
-    count = 0
-    if(isPointOnEdge(point, outer_points[0][0], outer_points[0][1])): count+=1
-    if(isPointOnEdge(point, outer_points[1][0], outer_points[1][1])): count+=1
-    return count
-
-
-#   takes Vector List and returns tuple of points in expected order. 
-def edges_to_points(edges):
-    (vp1, vp2) = (Vector((edges[0][0])), Vector((edges[0][1])))
-    (vp3, vp4) = (Vector((edges[1][0])), Vector((edges[1][1])))
-    return (vp1,vp2,vp3,vp4)
-
-
-#   takes a list of 4 vectors and returns True or False depending on checks
-def checkIsMatrixCoplanar(verti):
-    (v1, v2, v3, v4) = edges_to_points(verti)   #unpack
-    shortest_line = LineIntersect(v1, v2, v3, v4)
-    if mDist(shortest_line[1], shortest_line[0]) > VTX_PRECISION: return False
-    else: return True
-
-
-#   point = the halfway mark on the shortlest line between two lines
-def checkEdges(Edge, obj):
-    (p1, p2, p3, p4) = edges_to_points(Edge)
-    line = LineIntersect(p1, p2, p3, p4)
-    point = ((line[0] + line[1]) / 2) # or point = line[0]
-    return point
-
-#   returns (object, number of verts, number of edges) && object mode == True
-def GetActiveObject():
-    bpy.ops.object.mode_set(mode='EDIT')
-    bpy.ops.mesh.delete(type='EDGE') # removes edges + verts
-    (vert_count, edge_count) = getVertEdgeCount()
-    (vert_num, edge_num) = (len(vert_count),len(edge_count))
-
-    bpy.ops.object.mode_set(mode='OBJECT') # to be sure.
-    o = bpy.context.active_object
-    return (o, vert_num, edge_num)
-
-
-def AddVertsToObject(vert_count, o, mvX, mvA, mvB, mvC, mvD):
-    o.data.vertices.add(5)
-    pointlist = [mvX, mvA, mvB, mvC, mvD]
-    for vpoint in range(len(pointlist)):
-        o.data.vertices[vert_count+vpoint].co = pointlist[vpoint]
-
-
-#   Used when the user chooses to slice/Weld, vX is intersection point
-def makeGeometryWeld(vX,outer_points):
-    (o, vert_count, edge_count) =  GetActiveObject()
-    (vA, vB, vC, vD) =  edges_to_points(outer_points)
-    AddVertsToObject(vert_count, o, vA, vX, vB, vC, vD) # o is the object
-
-    oe = o.data.edges
-    oe.add(4)
-    oe[edge_count].vertices = [vert_count,vert_count+1]
-    oe[edge_count+1].vertices = [vert_count+2,vert_count+1]
-    oe[edge_count+2].vertices = [vert_count+3,vert_count+1]
-    oe[edge_count+3].vertices = [vert_count+4,vert_count+1]
-
-
-#   Used for extending an edge to a point on another edge.
-def ExtendEdge(vX, outer_points, count):
-    (o, vert_count, edge_count) =  GetActiveObject()
-    (vA, vB, vC, vD) =  edges_to_points(outer_points)
-    AddVertsToObject(vert_count, o, vX, vA, vB, vC, vD)
-
-    oe = o.data.edges
-    oe.add(4)
-    # Candidate for serious optimization.
-    if isPointOnEdge(vX, vA, vB):
-        oe[edge_count].vertices = [vert_count, vert_count+1]
-        oe[edge_count+1].vertices = [vert_count, vert_count+2]
-        # find which of C and D is farthest away from X
-        if mDist(vD, vX) > mDist(vC, vX):
-            oe[edge_count+2].vertices = [vert_count, vert_count+3]
-            oe[edge_count+3].vertices = [vert_count+3, vert_count+4]
-        if mDist(vC, vX) > mDist(vD, vX):
-            oe[edge_count+2].vertices = [vert_count, vert_count+4]
-            oe[edge_count+3].vertices = [vert_count+3, vert_count+4]
-
-    if isPointOnEdge(vX, vC, vD):
-        oe[edge_count].vertices = [vert_count, vert_count+3]
-        oe[edge_count+1].vertices = [vert_count, vert_count+4]
-        # find which of A and B is farthest away from X 
-        if mDist(vB, vX) > mDist(vA, vX):
-            oe[edge_count+2].vertices = [vert_count, vert_count+1]
-            oe[edge_count+3].vertices = [vert_count+1, vert_count+2]
-        if mDist(vA, vX) > mDist(vB, vX):
-            oe[edge_count+2].vertices = [vert_count, vert_count+2]
-            oe[edge_count+3].vertices = [vert_count+1, vert_count+2]
-
-
-#   ProjectGeometry is used to extend two edges to their intersection point.
-def ProjectGeometry(vX, opoint):
-
-    def return_distance_checked(X, A, B):
-        dist1 = mDist(X, A)
-        dist2 = mDist(X, B)
-        point_choice = min(dist1, dist2)
-        if point_choice == dist1: return A, B
-        else: return B, A
-
-    (o, vert_count, edge_count) =  GetActiveObject()
-    vA, vB = return_distance_checked(vX, Vector((opoint[0][0])), Vector((opoint[0][1])))
-    vC, vD = return_distance_checked(vX, Vector((opoint[1][0])), Vector((opoint[1][1])))
-    AddVertsToObject(vert_count, o, vX, vA, vB, vC, vD)
-
-    oe = o.data.edges
-    oe.add(4)
-    oe[edge_count].vertices = [vert_count, vert_count+1]
-    oe[edge_count+1].vertices = [vert_count, vert_count+3]
-    oe[edge_count+2].vertices = [vert_count+1, vert_count+2]
-    oe[edge_count+3].vertices = [vert_count+3, vert_count+4]
-
-
-def getMeshMatrix(obj):
-    is_editmode = (obj.mode == 'EDIT')
-    if is_editmode:
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-    (edges, meshMatrix) = ([],[])
-    mesh = obj.data
-    verts = mesh.vertices
-    for e in mesh.edges:
-        if e.select:
-            edges.append(e)
-
-    edgenum = 0
-    for edge_to_test in edges:
-        p1 = verts[edge_to_test.vertices[0]].co
-        p2 = verts[edge_to_test.vertices[1]].co
-        meshMatrix.append([Vector(p1),Vector(p2)])
-        edgenum += 1
-
-    return meshMatrix
-
-
-def getVertEdgeCount():
-    bpy.ops.object.mode_set(mode='OBJECT')
-    vert_count = bpy.context.active_object.data.vertices
-    edge_count = bpy.context.active_object.data.edges
-    return (vert_count, edge_count)
-
-
-def runCleanUp():
-    bpy.ops.object.mode_set(mode='EDIT')
-    bpy.ops.mesh.select_all(action='TOGGLE')
-    bpy.ops.mesh.select_all(action='TOGGLE')
-    bpy.ops.mesh.remove_doubles(threshold=VTX_PRECISION)
-    bpy.ops.mesh.select_all(action='TOGGLE') #unselect all
-
-
-def initScriptV(context, self):
-    obj = bpy.context.active_object
-    meshMatrix = getMeshMatrix(obj)
-    (vert_count, edge_count) = getVertEdgeCount()
-
-    #need 2 edges to be of any use.
-    if len(meshMatrix) < 2: 
-        print(str(len(meshMatrix)) +" select, make sure (only) 2 are selected")
-        return
-
-    #dont go any further if the verts are not coplanar
-    if checkIsMatrixCoplanar(meshMatrix): print("seems within tolerance, proceed")
-    else: 
-        print("check your geometry, or decrease tolerance value")
-        return
-
-    # if we reach this point, the edges are coplanar
-    # force edit mode
-    bpy.ops.object.mode_set(mode='EDIT')
-    vSel = bpy.context.active_object.data.total_vert_sel
-
-    if checkEdges(meshMatrix, obj) == None: print("lines dont intersect")
-    else:
-        count = CountPointOnEdges(checkEdges(meshMatrix, obj), meshMatrix)
-        if count == 0:
-            ProjectGeometry(checkEdges(meshMatrix, obj), meshMatrix)
-            runCleanUp()
-        else:
-            print("The intersection seems to lie on 1 or 2 edges already")
-
-
-def initScriptT(context, self):
-    obj = bpy.context.active_object
-    meshMatrix = getMeshMatrix(obj)
-    ## force edit mode
-    bpy.ops.object.mode_set(mode='EDIT')
-    vSel = bpy.context.active_object.data.total_vert_sel
-
-    if len(meshMatrix) != 2:
-        print(str(len(meshMatrix)) +" select 2 edges")
-    else:
-        count = CountPointOnEdges(checkEdges(meshMatrix, obj), meshMatrix)
-        if count == 1:
-            print("Good, Intersection point lies on one of the two edges!")
-            ExtendEdge(checkEdges(meshMatrix, obj), meshMatrix, count)
-            runCleanUp()    #neutral function, for removing potential doubles
-        else:
-            print("Intersection point not on chosen edges")
-
-
-def initScriptX(context, self):
-    obj = bpy.context.active_object
-    meshMatrix = getMeshMatrix(obj)
-    ## force edit mode
-    bpy.ops.object.mode_set(mode='EDIT')
-
-    if len(meshMatrix) != 2:
-        print(str(len(meshMatrix)) +" select, make sure (only) 2 are selected")
-    else:
-        if checkEdges(meshMatrix, obj) == None:
-            print("lines dont intersect")
-        else: 
-            count = CountPointOnEdges(checkEdges(meshMatrix, obj), meshMatrix)
-            if count == 2:
-                makeGeometryWeld(checkEdges(meshMatrix, obj), meshMatrix)
-                runCleanUp()
-
-
-class EdgeIntersections(bpy.types.Operator):
-    """Makes a weld/slice/extend to intersecting edges/lines"""
-    bl_idname = 'mesh.intersections'
-    bl_label = 'Edge tools : tinyCAD VTX'
-    # bl_options = {'REGISTER', 'UNDO'}
-
-    mode = bpy.props.IntProperty(name = "Mode",
-                    description = "switch between intersection modes",
-                    default = 2)
-
-    @classmethod
-    def poll(self, context):
-        obj = context.active_object
-        return obj != None and obj.type == 'MESH'
-
-    def execute(self, context):
-        if self.mode == -1:
-            initScriptV(context, self)
-        if self.mode == 0:
-            initScriptT(context, self)
-        if self.mode == 1:
-            initScriptX(context, self)
-        if self.mode == 2:
-            print("something undefined happened, send me a test case!")
-        return {'FINISHED'}
-
-
-def menu_func(self, context):
-    self.layout.operator(EdgeIntersections.bl_idname, text="Edges V Intersection").mode = -1
-    self.layout.operator(EdgeIntersections.bl_idname, text="Edges T Intersection").mode = 0
-    self.layout.operator(EdgeIntersections.bl_idname, text="Edges X Intersection").mode = 1
-
-def register():
-    bpy.utils.register_class(EdgeIntersections)
-    bpy.types.VIEW3D_MT_edit_mesh_specials.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_class(EdgeIntersections)
-    bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_edgetools.py b/release/scripts/addons_contrib/mesh_edgetools.py
deleted file mode 100644
index d549204..0000000
--- a/release/scripts/addons_contrib/mesh_edgetools.py
+++ /dev/null
@@ -1,1979 +0,0 @@
-# Blender EdgeTools
-#
-# This is a toolkit for edge manipulation based on several of mesh manipulation
-# abilities of several CAD/CAE packages, notably CATIA's Geometric Workbench
-# from which most of these tools have a functional basis based on the paradims
-# that platform enables.  These tools are a collection of scripts that I needed
-# at some point, and so I will probably add and improve these as I continue to
-# use and model with them.
-#
-# It might be good to eventually merge the tinyCAD VTX tools for unification
-# purposes, and as these are edge-based tools, it would make sense.  Or maybe
-# merge this with tinyCAD instead?
-#
-# The GUI and Blender add-on structure shamelessly coded in imitation of the
-# LoopTools addon.
-#
-# Examples:
-#   - "Ortho" inspired from CATIA's line creation tool which creates a line of a
-#       user specified length at a user specified angle to a curve at a chosen
-#       point.  The user then selects the plane the line is to be created in.
-#   - "Shaft" is inspired from CATIA's tool of the same name.  However, instead
-#       of a curve around an axis, this will instead shaft a line, a point, or
-#       a fixed radius about the selected axis.
-#   - "Slice" is from CATIA's ability to split a curve on a plane.  When
-#       completed this be a Python equivalent with all the same basic
-#       functionality, though it will sadly be a little clumsier to use due
-#       to Blender's selection limitations.
-#
-# Notes:
-#   - Buggy parts have been hidden behind bpy.app.debug.  Run Blender in debug
-#       to expose those.  Example: Shaft with more than two edges selected.
-#   - Some functions have started to crash, despite working correctly before.
-#       What could be causing that?  Blender bug?  Or coding bug?
-#
-# Paul "BrikBot" Marshall
-# Created: January 28, 2012
-# Last Modified: October 6, 2012
-# Homepage (blog): http://post.darkarsenic.com/
-#                       //blog.darkarsenic.com/
-#
-# Coded in IDLE, tested in Blender 2.6.
-# Search for "@todo" to quickly find sections that need work.
-#
-# Remeber -
-#   Functional code comes before fast code.  Once it works, then worry about
-#   making it faster/more efficient.
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  The Blender Edgetools is to bring CAD tools to Blender.
-#  Copyright (C) 2012  Paul Marshall
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-# ^^ Maybe. . . . :P
-
-bl_info = {
-    'name': "EdgeTools",
-    'author': "Paul Marshall",
-    'version': (0, 8),
-    'blender': (2, 6, 4),
-    'location': "View3D > Toolbar and View3D > Specials (W-key)",
-    'warning': "",
-    'description': "CAD style edge manipulation tools",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Modeling/EdgeTools",
-    'tracker_url': "https://blenderpython.svn.sourceforge.net/svnroot/blenderpython/scripts_library/scripts/addons_extern/mesh_edgetools.py",
-    'category': 'Mesh'}
-
-import bpy, bmesh, mathutils
-from math import acos, pi, radians, sqrt, tan
-from mathutils import Matrix, Vector
-from mathutils.geometry import (distance_point_to_plane,
-                                interpolate_bezier,
-                                intersect_point_line,
-                                intersect_line_line,
-                                intersect_line_plane)
-from bpy.props import (BoolProperty,
-                       BoolVectorProperty,
-                       IntProperty,
-                       FloatProperty,
-                       EnumProperty)
-
-integrated = False
-
-# Quick an dirty method for getting the sign of a number:
-def sign(number):
-    return (number > 0) - (number < 0)
-
-
-# is_parallel
-#
-# Checks to see if two lines are parallel
-def is_parallel(v1, v2, v3, v4):
-    result = intersect_line_line(v1, v2, v3, v4) 
-    return result == None
-
-
-# is_axial
-#
-# This is for the special case where the edge is parallel to an axis.  In this
-# the projection onto the XY plane will fail so it will have to be handled
-# differently.  This tells us if and how:
-def is_axial(v1, v2, error = 0.000002):
-    vector = v2 - v1
-    # Don't need to store, but is easier to read:
-    vec0 = vector[0] > -error and vector[0] < error
-    vec1 = vector[1] > -error and vector[1] < error
-    vec2 = vector[2] > -error and vector[2] < error
-    if (vec0 or vec1) and vec2:
-        return 'Z'
-    elif vec0 and vec1:
-        return 'Y'
-    return None
-
-
-# is_same_co
-#
-# For some reason "Vector = Vector" does not seem to look at the actual
-# coordinates.  This provides a way to do so.
-def is_same_co(v1, v2):
-    if len(v1) != len(v2):
-        return False
-    else:
-        for co1, co2 in zip(v1, v2):
-            if co1 != co2:
-                return False
-    return True
-
-
-# is_face_planar
-#
-# Tests a face to see if it is planar.
-def is_face_planar(face, error = 0.0005):
-    for v in face.verts:
-        d = distance_point_to_plane(v.co, face.verts[0].co, face.normal)
-        if bpy.app.debug:
-            print("Distance: " + str(d))
-        if d < -error or d > error:
-            return False
-    return True
-
-
-# other_joined_edges
-#
-# Starts with an edge.  Then scans for linked, selected edges and builds a
-# list with them in "order", starting at one end and moving towards the other.
-def order_joined_edges(edge, edges = [], direction = 1):
-    if len(edges) == 0:
-        edges.append(edge)
-        edges[0] = edge
-
-    if bpy.app.debug:
-        print(edge, end = ", ")
-        print(edges, end = ", ")
-        print(direction, end = "; ")
-
-    # Robustness check: direction cannot be zero
-    if direction == 0:
-        direction = 1
-
-    newList = []
-    for e in edge.verts[0].link_edges:
-        if e.select and edges.count(e) == 0:
-            if direction > 0:
-                edges.insert(0, e)
-                newList.extend(order_joined_edges(e, edges, direction + 1))
-                newList.extend(edges)
-            else:
-                edges.append(e)
-                newList.extend(edges)
-                newList.extend(order_joined_edges(e, edges, direction - 1))
-
-    # This will only matter at the first level:
-    direction = direction * -1
-
-    for e in edge.verts[1].link_edges:
-        if e.select and edges.count(e) == 0:
-            if direction > 0:
-                edges.insert(0, e)
-                newList.extend(order_joined_edges(e, edges, direction + 2))
-                newList.extend(edges)
-            else:
-                edges.append(e)
-                newList.extend(edges)
-                newList.extend(order_joined_edges(e, edges, direction))
-
-    if bpy.app.debug:
-        print(newList, end = ", ")
-        print(direction)
-
-    return newList
-
-
-# --------------- GEOMETRY CALCULATION METHODS --------------
-
-# distance_point_line
-#
-# I don't know why the mathutils.geometry API does not already have this, but
-# it is trivial to code using the structures already in place.  Instead of
-# returning a float, I also want to know the direction vector defining the
-# distance.  Distance can be found with "Vector.length".
-def distance_point_line(pt, line_p1, line_p2):
-    int_co = intersect_point_line(pt, line_p1, line_p2)
-    distance_vector = int_co[0] - pt
-    return distance_vector
-
-
-# interpolate_line_line
-#
-# This is an experiment into a cubic Hermite spline (c-spline) for connecting
-# two edges with edges that obey the general equation.
-# This will return a set of point coordinates (Vectors).
-#
-# A good, easy to read background on the mathematics can be found at:
-# http://cubic.org/docs/hermite.htm
-#
-# Right now this is . . . less than functional :P
-# @todo
-#   - C-Spline and Bezier curves do not end on p2_co as they are supposed to.
-#   - B-Spline just fails.  Epically.
-#   - Add more methods as I come across them.  Who said flexibility was bad?
-def interpolate_line_line(p1_co, p1_dir, p2_co, p2_dir, segments, tension = 1,
-                          typ = 'BEZIER', include_ends = False):
-    pieces = []
-    fraction = 1 / segments
-    # Form: p1, tangent 1, p2, tangent 2
-    if typ == 'HERMITE':
-        poly = [[2, -3, 0, 1], [1, -2, 1, 0],
-                [-2, 3, 0, 0], [1, -1, 0, 0]]
-    elif typ == 'BEZIER':
-        poly = [[-1, 3, -3, 1], [3, -6, 3, 0],
-                [1, 0, 0, 0], [-3, 3, 0, 0]]
-        p1_dir = p1_dir + p1_co
-        p2_dir = -p2_dir + p2_co
-    elif typ == 'BSPLINE':
-##        Supposed poly matrix for a cubic b-spline:
-##        poly = [[-1, 3, -3, 1], [3, -6, 3, 0],
-##                [-3, 0, 3, 0], [1, 4, 1, 0]]
-        # My own invention to try to get something that somewhat acts right.
-        # This is semi-quadratic rather than fully cubic:
-        poly = [[0, -1, 0, 1], [1, -2, 1, 0],
-                [0, -1, 2, 0], [1, -1, 0, 0]]
-    if include_ends:
-        pieces.append(p1_co)
-    # Generate each point:
-    for i in range(segments - 1):
-        t = fraction * (i + 1)
-        if bpy.app.debug:
-            print(t)
-        s = [t ** 3, t ** 2, t, 1]
-        h00 = (poly[0][0] * s[0]) + (poly[0][1] * s[1]) + (poly[0][2] * s[2]) + (poly[0][3] * s[3])
-        h01 = (poly[1][0] * s[0]) + (poly[1][1] * s[1]) + (poly[1][2] * s[2]) + (poly[1][3] * s[3])
-        h10 = (poly[2][0] * s[0]) + (poly[2][1] * s[1]) + (poly[2][2] * s[2]) + (poly[2][3] * s[3])
-        h11 = (poly[3][0] * s[0]) + (poly[3][1] * s[1]) + (poly[3][2] * s[2]) + (poly[3][3] * s[3])
-        pieces.append((h00 * p1_co) + (h01 * p1_dir) + (h10 * p2_co) + (h11 * p2_dir))
-    if include_ends:
-        pieces.append(p2_co)
-    # Return:
-    if len(pieces) == 0:
-        return None
-    else:
-        if bpy.app.debug:
-            print(pieces)
-        return pieces
-
-
-# intersect_line_face
-#
-# Calculates the coordinate of intersection of a line with a face.  It returns
-# the coordinate if one exists, otherwise None.  It can only deal with tris or
-# quads for a face.  A quad does NOT have to be planar. Thus the following.
-#
-# Quad math and theory:
-# A quad may not be planar.  Therefore the treated definition of the surface is
-# that the surface is composed of all lines bridging two other lines defined by
-# the given four points.  The lines do not "cross".
-# 
-# The two lines in 3-space can defined as:
-#   ┌  ┐         ┌   ┐     ┌   ┐  ┌  ┐         ┌   ┐     ┌   ┐
-#   │x1│         │a11│     │b11│  │x2│         │a21│     │b21│
-#   │y1│ = (1-t1)│a12│ + t1│b12│, │y2│ = (1-t2)│a22│ + t2│b22│
-#   │z1│         │a13│     │b13│  │z2│         │a23│     │b23│
-#   └  ┘         └   ┘     └   ┘  └  ┘         └   ┘     └   ┘
-# Therefore, the surface is the lines defined by every point alone the two
-# lines with a same "t" value (t1 = t2).  This is basically R = V1 + tQ, where
-# Q = V2 - V1 therefore R = V1 + t(V2 - V1) -> R = (1 - t)V1 + tV2:
-#   ┌   ┐            ┌                  ┐      ┌                  ┐
-#   │x12│            │(1-t)a11 + t * b11│      │(1-t)a21 + t * b21│
-#   │y12│ = (1 - t12)│(1-t)a12 + t * b12│ + t12│(1-t)a22 + t * b22│
-#   │z12│            │(1-t)a13 + t * b13│      │(1-t)a23 + t * b23│
-#   └   ┘            └                  ┘      └                  ┘
-# Now, the equation of our line can be likewise defined:
-#   ┌  ┐   ┌   ┐     ┌   ┐
-#   │x3│   │a31│     │b31│
-#   │y3│ = │a32│ + t3│b32│
-#   │z3│   │a33│     │b33│
-#   └  ┘   └   ┘     └   ┘
-# Now we just have to find a valid solution for the two equations.  This should
-# be our point of intersection.  Therefore, x12 = x3 -> x, y12 = y3 -> y,
-# z12 = z3 -> z.  Thus, to find that point we set the equation defining the
-# surface as equal to the equation for the line:
-#            ┌                  ┐      ┌                  ┐   ┌   ┐     ┌   ┐
-#            │(1-t)a11 + t * b11│      │(1-t)a21 + t * b21│   │a31│     │b31│
-#   (1 - t12)│(1-t)a12 + t * b12│ + t12│(1-t)a22 + t * b22│ = │a32│ + t3│b32│
-#            │(1-t)a13 + t * b13│      │(1-t)a23 + t * b23│   │a33│     │b33│
-#            └                  ┘      └                  ┘   └   ┘     └   ┘
-# This leaves us with three equations, three unknowns.  Solving the system by
-# hand is practically impossible, but using Mathematica we are given an insane
-# series of three equations (not reproduced here for the sake of space: see
-# http://www.mediafire.com/file/cc6m6ba3sz2b96m/intersect_line_surface.nb and
-# http://www.mediafire.com/file/0egbr5ahg14talm/intersect_line_surface2.nb for
-# Mathematica computation).
-#
-# Additionally, the resulting series of equations may result in a div by zero
-# exception if the line in question if parallel to one of the axis or if the
-# quad is planar and parallel to either the XY, XZ, or YZ planes.  However, the
-# system is still solvable but must be dealt with a little differently to avaid
-# these special cases.  Because the resulting equations are a little different,
-# we have to code them differently.  Hence the special cases.
-#
-# Tri math and theory:
-# A triangle must be planar (three points define a plane).  Therefore we just
-# have to make sure that the line intersects inside the triangle.
-#
-# If the point is within the triangle, then the angle between the lines that
-# connect the point to the each individual point of the triangle will be
-# equal to 2 * PI.  Otherwise, if the point is outside the triangle, then the
-# sum of the angles will be less.
-#
-# @todo
-#   - Figure out how to deal with n-gons.  How the heck is a face with 8 verts
-#       definied mathematically?  How do I then find the intersection point of
-#       a line with said vert?  How do I know if that point is "inside" all the
-#       verts?  I have no clue, and haven't been able to find anything on it so
-#       far.  Maybe if someone (actually reads this and) who knows could note?
-def intersect_line_face(edge, face, is_infinite = False, error = 0.000002):
-    int_co = None
-
-    # If we are dealing with a non-planar quad:
-    if len(face.verts) == 4 and not is_face_planar(face):
-        edgeA = face.edges[0]
-        edgeB = None
-        flipB = False
-
-        for i in range(len(face.edges)):
-            if face.edges[i].verts[0] not in edgeA.verts and face.edges[i].verts[1] not in edgeA.verts:
-                edgeB = face.edges[i]
-                break
-
-        # I haven't figured out a way to mix this in with the above.  Doing so might remove a
-        # few extra instructions from having to be executed saving a few clock cycles:
-        for i in range(len(face.edges)):
-            if face.edges[i] == edgeA or face.edges[i] == edgeB:
-                continue
-            if (edgeA.verts[0] in face.edges[i].verts and edgeB.verts[1] in face.edges[i].verts) or (edgeA.verts[1] in face.edges[i].verts and edgeB.verts[0] in face.edges[i].verts):
-                flipB = True
-                break
-
-        # Define calculation coefficient constants:
-        # "xx1" is the x coordinate, "xx2" is the y coordinate, and "xx3" is the z
-        # coordinate.
-        a11, a12, a13 = edgeA.verts[0].co[0], edgeA.verts[0].co[1], edgeA.verts[0].co[2]
-        b11, b12, b13 = edgeA.verts[1].co[0], edgeA.verts[1].co[1], edgeA.verts[1].co[2]
-        if flipB:
-            a21, a22, a23 = edgeB.verts[1].co[0], edgeB.verts[1].co[1], edgeB.verts[1].co[2]
-            b21, b22, b23 = edgeB.verts[0].co[0], edgeB.verts[0].co[1], edgeB.verts[0].co[2]
-        else:
-            a21, a22, a23 = edgeB.verts[0].co[0], edgeB.verts[0].co[1], edgeB.verts[0].co[2]
-            b21, b22, b23 = edgeB.verts[1].co[0], edgeB.verts[1].co[1], edgeB.verts[1].co[2]
-        a31, a32, a33 = edge.verts[0].co[0], edge.verts[0].co[1], edge.verts[0].co[2]
-        b31, b32, b33 = edge.verts[1].co[0], edge.verts[1].co[1], edge.verts[1].co[2]
-
-        # There are a bunch of duplicate "sub-calculations" inside the resulting
-        # equations for t, t12, and t3.  Calculate them once and store them to
-        # reduce computational time:
-        m01 = a13 * a22 * a31
-        m02 = a12 * a23 * a31
-        m03 = a13 * a21 * a32
-        m04 = a11 * a23 * a32
-        m05 = a12 * a21 * a33
-        m06 = a11 * a22 * a33
-        m07 = a23 * a32 * b11
-        m08 = a22 * a33 * b11
-        m09 = a23 * a31 * b12
-        m10 = a21 * a33 * b12
-        m11 = a22 * a31 * b13
-        m12 = a21 * a32 * b13
-        m13 = a13 * a32 * b21
-        m14 = a12 * a33 * b21
-        m15 = a13 * a31 * b22
-        m16 = a11 * a33 * b22
-        m17 = a12 * a31 * b23
-        m18 = a11 * a32 * b23
-        m19 = a13 * a22 * b31
-        m20 = a12 * a23 * b31
-        m21 = a13 * a32 * b31
-        m22 = a23 * a32 * b31
-        m23 = a12 * a33 * b31
-        m24 = a22 * a33 * b31
-        m25 = a23 * b12 * b31
-        m26 = a33 * b12 * b31
-        m27 = a22 * b13 * b31
-        m28 = a32 * b13 * b31
-        m29 = a13 * b22 * b31
-        m30 = a33 * b22 * b31
-        m31 = a12 * b23 * b31
-        m32 = a32 * b23 * b31
-        m33 = a13 * a21 * b32
-        m34 = a11 * a23 * b32
-        m35 = a13 * a31 * b32
-        m36 = a23 * a31 * b32
-        m37 = a11 * a33 * b32
-        m38 = a21 * a33 * b32
-        m39 = a23 * b11 * b32
-        m40 = a33 * b11 * b32
-        m41 = a21 * b13 * b32
-        m42 = a31 * b13 * b32
-        m43 = a13 * b21 * b32
-        m44 = a33 * b21 * b32
-        m45 = a11 * b23 * b32
-        m46 = a31 * b23 * b32
-        m47 = a12 * a21 * b33
-        m48 = a11 * a22 * b33
-        m49 = a12 * a31 * b33
-        m50 = a22 * a31 * b33
-        m51 = a11 * a32 * b33
-        m52 = a21 * a32 * b33
-        m53 = a22 * b11 * b33
-        m54 = a32 * b11 * b33
-        m55 = a21 * b12 * b33
-        m56 = a31 * b12 * b33
-        m57 = a12 * b21 * b33
-        m58 = a32 * b21 * b33
-        m59 = a11 * b22 * b33
-        m60 = a31 * b22 * b33
-        m61 = a33 * b12 * b21
-        m62 = a32 * b13 * b21
-        m63 = a33 * b11 * b22
-        m64 = a31 * b13 * b22
-        m65 = a32 * b11 * b23
-        m66 = a31 * b12 * b23
-        m67 = b13 * b22 * b31
-        m68 = b12 * b23 * b31
-        m69 = b13 * b21 * b32
-        m70 = b11 * b23 * b32
-        m71 = b12 * b21 * b33
-        m72 = b11 * b22 * b33
-        n01 = m01 - m02 - m03 + m04 + m05 - m06
-        n02 = -m07 + m08 + m09 - m10 - m11 + m12 + m13 - m14 - m15 + m16 + m17 - m18 - m25 + m27 + m29 - m31 + m39 - m41 - m43 + m45 - m53 + m55 + m57 - m59
-        n03 = -m19 + m20 + m33 - m34 - m47 + m48
-        n04 = m21 - m22 - m23 + m24 - m35 + m36 + m37 - m38 + m49 - m50 - m51 + m52
-        n05 = m26 - m28 - m30 + m32 - m40 + m42 + m44 - m46 + m54 - m56 - m58 + m60
-        n06 = m61 - m62 - m63 + m64 + m65 - m66 - m67 + m68 + m69 - m70 - m71 + m72
-        n07 = 2 * n01 + n02 + 2 * n03 + n04 + n05
-        n08 = n01 + n02 + n03 + n06
-
-        # Calculate t, t12, and t3:
-        t = (n07 - sqrt(pow(-n07, 2) - 4 * (n01 + n03 + n04) * n08)) / (2 * n08)
-
-        # t12 can be greatly simplified by defining it with t in it:
-        # If block used to help prevent any div by zero error.
-        t12 = 0
-
-        if a31 == b31:
-            # The line is parallel to the z-axis:
-            if a32 == b32:
-                t12 = ((a11 - a31) + (b11 - a11) * t) / ((a21 - a11) + (a11 - a21 - b11 + b21) * t)
-            # The line is parallel to the y-axis:
-            elif a33 == b33:
-                t12 = ((a11 - a31) + (b11 - a11) * t) / ((a21 - a11) + (a11 - a21 - b11 + b21) * t)
-            # The line is along the y/z-axis but is not parallel to either:
-            else:
-                t12 = -(-(a33 - b33) * (-a32 + a12 * (1 - t) + b12 * t) + (a32 - b32) * (-a33 + a13 * (1 - t) + b13 * t)) / (-(a33 - b33) * ((a22 - a12) * (1 - t) + (b22 - b12) * t) + (a32 - b32) * ((a23 - a13) * (1 - t) + (b23 - b13) * t))
-        elif a32 == b32:
-            # The line is parallel to the x-axis:
-            if a33 == b33:
-                t12 = ((a12 - a32) + (b12 - a12) * t) / ((a22 - a12) + (a12 - a22 - b12 + b22) * t)
-            # The line is along the x/z-axis but is not parallel to either:
-            else:
-                t12 = -(-(a33 - b33) * (-a31 + a11 * (1 - t) + b11 * t) + (a31 - b31) * (-a33 + a13 * (1 - t) + b13 * t)) / (-(a33 - b33) * ((a21 - a11) * (1 - t) + (b21 - b11) * t) + (a31 - b31) * ((a23 - a13) * (1 - t) + (b23 - b13) * t))
-        # The line is along the x/y-axis but is not parallel to either:
-        else:
-            t12 = -(-(a32 - b32) * (-a31 + a11 * (1 - t) + b11 * t) + (a31 - b31) * (-a32 + a12 * (1 - t) + b12 * t)) / (-(a32 - b32) * ((a21 - a11) * (1 - t) + (b21 - b11) * t) + (a31 - b31) * ((a22 - a21) * (1 - t) + (b22 - b12) * t))
-
-        # Likewise, t3 is greatly simplified by defining it in terms of t and t12:
-        # If block used to prevent a div by zero error.
-        t3 = 0
-        if a31 != b31:
-            t3 = (-a11 + a31 + (a11 - b11) * t + (a11 - a21) * t12 + (a21 - a11 + b11 - b21) * t * t12) / (a31 - b31)
-        elif a32 != b32:
-            t3 = (-a12 + a32 + (a12 - b12) * t + (a12 - a22) * t12 + (a22 - a12 + b12 - b22) * t * t12) / (a32 - b32)
-        elif a33 != b33:
-            t3 = (-a13 + a33 + (a13 - b13) * t + (a13 - a23) * t12 + (a23 - a13 + b13 - b23) * t * t12) / (a33 - b33)
-        else:
-            print("The second edge is a zero-length edge")
-            return None
-
-        # Calculate the point of intersection:
-        x = (1 - t3) * a31 + t3 * b31
-        y = (1 - t3) * a32 + t3 * b32
-        z = (1 - t3) * a33 + t3 * b33
-        int_co = Vector((x, y, z))
-        
-        if bpy.app.debug:
-            print(int_co)
-
-        # If the line does not intersect the quad, we return "None":
-        if (t < -1 or t > 1 or t12 < -1 or t12 > 1) and not is_infinite:
-            int_co = None
-
-    elif len(face.verts) == 3:
-        p1, p2, p3 = face.verts[0].co, face.verts[1].co, face.verts[2].co
-        int_co = intersect_line_plane(edge.verts[0].co, edge.verts[1].co, p1, face.normal)
-
-        # Only check if the triangle is not being treated as an infinite plane:
-        # Math based from http://paulbourke.net/geometry/linefacet/
-        if int_co != None and not is_infinite:
-            pA = p1 - int_co
-            pB = p2 - int_co
-            pC = p3 - int_co
-            # These must be unit vectors, else we risk a domain error:
-            pA.length = 1
-            pB.length = 1
-            pC.length = 1
-            aAB = acos(pA.dot(pB))
-            aBC = acos(pB.dot(pC))
-            aCA = acos(pC.dot(pA))
-            sumA = aAB + aBC + aCA
-
-            # If the point is outside the triangle:
-            if (sumA > (pi + error) and sumA < (pi - error)):
-                int_co = None
-
-    # This is the default case where we either have a planar quad or an n-gon.
-    else:
-        int_co = intersect_line_plane(edge.verts[0].co, edge.verts[1].co,
-                                      face.verts[0].co, face.normal)
-
-    return int_co
-
-
-# project_point_plane
-#
-# Projects a point onto a plane.  Returns a tuple of the projection vector
-# and the projected coordinate.
-def project_point_plane(pt, plane_co, plane_no):
-    proj_co = intersect_line_plane(pt, pt + plane_no, plane_co, plane_no)
-    proj_ve = proj_co - pt
-    return (proj_ve, proj_co)
-    
-
-# ------------ FILLET/CHAMPHER HELPER METHODS -------------
-
-# get_next_edge
-#
-# The following is used to return edges that might be possible edges for
-# propagation.  If an edge is connected to the end vert, but is also a part
-# of the on of the faces that the current edge composes, then it is a
-# "corner edge" and is not valid as a propagation edge.  If the edge is
-# part of two faces that a in the same plane, then we cannot fillet/chamfer
-# it because there is no angle between them.
-def get_next_edge(edge, vert):
-    invalidEdges = [e for f in edge.link_faces for e in f.edges if e != edge]
-    invalidEdges.append(edge)
-    if bpy.app.debug:
-        print(invalidEdges)
-    newEdge = [e for e in vert.link_edges if e not in invalidEdges and not is_planar_edge(e)]
-    if len(newEdge) == 0:
-        return None
-    elif len(newEdge) == 1:
-        return newEdge[0]
-    else:
-        return newEdge
-
-
-def is_planar_edge(edge, error = 0.000002):
-    angle = edge.calc_face_angle()
-    return (angle < error and angle > -error) or (angle < (180 + error) and angle > (180 - error))
-
-
-# fillet_axis
-#
-# Calculates the base geometry data for the fillet. This assumes that the faces
-# are planar:
-#
-# @todo
-#   - Redesign so that the faces do not have to be planar
-#
-# There seems to be issues some of the vector math right now.  Will need to be
-# debuged.
-def fillet_axis(edge, radius):
-    vectors = [None, None, None, None]
-    
-    origin = Vector((0, 0, 0))
-    axis = edge.verts[1].co - edge.verts[0].co
-
-    # Get the "adjacency" base vectors for face 0:
-    for e in edge.link_faces[0].edges:
-        if e == edge:
-            continue
-        if e.verts[0] == edge.verts[0]:
-            vectors[0] = e.verts[1].co - e.verts[0].co
-        elif e.verts[1] == edge.verts[0]:
-            vectors[0] = e.verts[0].co - e.verts[1].co
-        elif e.verts[0] == edge.verts[1]:
-            vectors[1] = e.verts[1].co - e.verts[0].co
-        elif e.verts[1] == edge.verts[1]:
-            vectors[1] = e.verts[0].co - e.verts[1].co
-
-    # Get the "adjacency" base vectors for face 1:
-    for e in edge.link_faces[1].edges:
-        if e == edge:
-            continue
-        if e.verts[0] == edge.verts[0]:
-            vectors[2] = e.verts[1].co - e.verts[0].co
-        elif e.verts[1] == edge.verts[0]:
-            vectors[2] = e.verts[0].co - e.verts[1].co
-        elif e.verts[0] == edge.verts[1]:
-            vectors[3] = e.verts[1].co - e.verts[0].co
-        elif e.verts[1] == edge.verts[1]:
-            vectors[3] = e.verts[0].co - e.verts[1].co
-
-    # Get the normal for face 0 and face 1:
-    norm1 = edge.link_faces[0].normal
-    norm2 = edge.link_faces[1].normal
-    
-    # We need to find the angle between the two faces, then bisect it:
-    theda = (pi - edge.calc_face_angle()) / 2
-    
-    # We are dealing with a triangle here, and we will need the length
-    # of its adjacent side.  The opposite is the radius:
-    adj_len = radius / tan(theda)
-
-    # Vectors can be thought of as being at the origin, and we need to make sure
-    # that the base vectors are planar with the "normal" definied by the edge to
-    # be filleted.  Then we set the length of the vector and shift it into a
-    # coordinate:
-    for i in range(len(vectors)):
-        vectors[i] = project_point_plane(vectors[i], origin, axis)[1]
-        vectors[i].length = adj_len
-        vectors[i] = vectors[i] + edge.verts[i % 2].co
-    
-    # Compute fillet axis end points:
-    v1 = intersect_line_line(vectors[0], vectors[0] + norm1, vectors[2], vectors[2] + norm2)[0]
-    v2 = intersect_line_line(vectors[1], vectors[1] + norm1, vectors[3], vectors[3] + norm2)[0]
-    return [v1, v2]
-
-
-def fillet_point(t, face1, face2):
-    return
-
-
-# ------------------- EDGE TOOL METHODS -------------------
-
-# Extends an "edge" in two directions:
-#   - Requires two vertices to be selected.  They do not have to form an edge.
-#   - Extends "length" in both directions
-class Extend(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_extend"
-    bl_label = "Extend"
-    bl_description = "Extend the selected edges of vertice pair."
-    bl_options = {'REGISTER', 'UNDO'}
-
-    di1 = BoolProperty(name = "Forwards",
-                       description = "Extend the edge forwards",
-                       default = True)
-    di2 = BoolProperty(name = "Backwards",
-                       description = "Extend the edge backwards",
-                       default = False)
-    length = FloatProperty(name = "Length",
-                           description = "Length to extend the edge",
-                           min = 0.0, max = 1024.0,
-                           default = 1.0)
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, "di1")
-        layout.prop(self, "di2")
-        layout.prop(self, "length")
-    
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-    
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        edges = [e for e in bEdges if e.select]
-        verts = [v for v in bVerts if v.select]
-
-        if len(edges) > 0:
-            for e in edges:
-                vector = e.verts[0].co - e.verts[1].co
-                vector.length = self.length
-                
-                if self.di1:
-                    v = bVerts.new()
-                    if (vector[0] + vector[1] + vector[2]) < 0:
-                        v.co = e.verts[1].co - vector
-                        newE = bEdges.new((e.verts[1], v))
-                    else:
-                        v.co = e.verts[0].co + vector
-                        newE = bEdges.new((e.verts[0], v))
-                if self.di2:
-                    v = bVerts.new()
-                    if (vector[0] + vector[1] + vector[2]) < 0:
-                        v.co = e.verts[0].co + vector
-                        newE = bEdges.new((e.verts[0], v))
-                    else:
-                        v.co = e.verts[1].co - vector
-                        newE = bEdges.new((e.verts[1], v))
-        else:
-            vector = verts[0].co - verts[1].co
-            vector.length = self.length
-
-            if self.di1:
-                v = bVerts.new()
-                if (vector[0] + vector[1] + vector[2]) < 0:
-                    v.co = verts[1].co - vector
-                    e = bEdges.new((verts[1], v))
-                else:
-                    v.co = verts[0].co + vector
-                    e = bEdges.new((verts[0], v))
-            if self.di2:
-                v = bVerts.new()
-                if (vector[0] + vector[1] + vector[2]) < 0:
-                    v.co = verts[0].co + vector
-                    e = bEdges.new((verts[0], v))
-                else:
-                    v.co = verts[1].co - vector
-                    e = bEdges.new((verts[1], v))
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# Creates a series of edges between two edges using spline interpolation.
-# This basically just exposes existing functionality in addition to some
-# other common methods: Hermite (c-spline), Bezier, and b-spline.  These
-# alternates I coded myself after some extensive research into spline
-# theory.
-#
-# @todo Figure out what's wrong with the Blender bezier interpolation.
-class Spline(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_spline"
-    bl_label = "Spline"
-    bl_description = "Create a spline interplopation between two edges"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    alg = EnumProperty(name = "Spline Algorithm",
-                       items = [('Blender', 'Blender', 'Interpolation provided through \"mathutils.geometry\"'),
-                                ('Hermite', 'C-Spline', 'C-spline interpolation'),
-                                ('Bezier', 'Bézier', 'Bézier interpolation'),
-                                ('B-Spline', 'B-Spline', 'B-Spline interpolation')],
-                       default = 'Bezier')
-    segments = IntProperty(name = "Segments",
-                           description = "Number of segments to use in the interpolation",
-                           min = 2, max = 4096,
-                           soft_max = 1024,
-                           default = 32)
-    flip1 = BoolProperty(name = "Flip Edge",
-                         description = "Flip the direction of the spline on edge 1",
-                         default = False)
-    flip2 = BoolProperty(name = "Flip Edge",
-                         description = "Flip the direction of the spline on edge 2",
-                         default = False)
-    ten1 = FloatProperty(name = "Tension",
-                         description = "Tension on edge 1",
-                         min = -4096.0, max = 4096.0,
-                         soft_min = -8.0, soft_max = 8.0,
-                         default = 1.0)
-    ten2 = FloatProperty(name = "Tension",
-                         description = "Tension on edge 2",
-                         min = -4096.0, max = 4096.0,
-                         soft_min = -8.0, soft_max = 8.0,
-                         default = 1.0)
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.prop(self, "alg")
-        layout.prop(self, "segments")
-        layout.label("Edge 1:")
-        layout.prop(self, "ten1")
-        layout.prop(self, "flip1")
-        layout.label("Edge 2:")
-        layout.prop(self, "ten2")
-        layout.prop(self, "flip2")
-
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-    
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bEdges = bm.edges
-        bVerts = bm.verts
-        
-        seg = self.segments
-        edges = [e for e in bEdges if e.select]
-        verts = [edges[v // 2].verts[v % 2] for v in range(4)]
-
-        if self.flip1:
-            v1 = verts[1]
-            p1_co = verts[1].co
-            p1_dir = verts[1].co - verts[0].co
-        else:
-            v1 = verts[0]
-            p1_co = verts[0].co
-            p1_dir = verts[0].co - verts[1].co
-        if self.ten1 < 0:
-            p1_dir = -1 * p1_dir
-            p1_dir.length = -self.ten1
-        else:
-            p1_dir.length = self.ten1
-
-        if self.flip2:
-            v2 = verts[3]
-            p2_co = verts[3].co
-            p2_dir = verts[2].co - verts[3].co
-        else:
-            v2 = verts[2]
-            p2_co = verts[2].co
-            p2_dir = verts[3].co - verts[2].co 
-        if self.ten2 < 0:
-            p2_dir = -1 * p2_dir
-            p2_dir.length = -self.ten2
-        else:
-            p2_dir.length = self.ten2
-
-        # Get the interploted coordinates:
-        if self.alg == 'Blender':
-            pieces = interpolate_bezier(p1_co, p1_dir, p2_dir, p2_co, self.segments)
-        elif self.alg == 'Hermite':
-            pieces = interpolate_line_line(p1_co, p1_dir, p2_co, p2_dir, self.segments, 1, 'HERMITE')
-        elif self.alg == 'Bezier':
-            pieces = interpolate_line_line(p1_co, p1_dir, p2_co, p2_dir, self.segments, 1, 'BEZIER')
-        elif self.alg == 'B-Spline':
-            pieces = interpolate_line_line(p1_co, p1_dir, p2_co, p2_dir, self.segments, 1, 'BSPLINE')
-
-        verts = []
-        verts.append(v1)
-        # Add vertices and set the points:
-        for i in range(seg - 1):
-            v = bVerts.new()
-            v.co = pieces[i]
-            verts.append(v)
-        verts.append(v2)
-        # Connect vertices:
-        for i in range(seg):
-            e = bEdges.new((verts[i], verts[i + 1]))
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# Creates edges normal to planes defined between each of two edges and the
-# normal or the plane defined by those two edges.
-#   - Select two edges.  The must form a plane.
-#   - On running the script, eight edges will be created.  Delete the
-#     extras that you don't need.
-#   - The length of those edges is defined by the variable "length"
-#
-# @todo Change method from a cross product to a rotation matrix to make the
-#   angle part work.
-#   --- todo completed 2/4/2012, but still needs work ---
-# @todo Figure out a way to make +/- predictable
-#   - Maybe use angel between edges and vector direction definition?
-#   --- TODO COMPLETED ON 2/9/2012 ---
-class Ortho(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_ortho"
-    bl_label = "Angle Off Edge"
-    bl_description = ""
-    bl_options = {'REGISTER', 'UNDO'}
-
-    vert1 = BoolProperty(name = "Vertice 1",
-                         description = "Enable edge creation for vertice 1.",
-                         default = True)
-    vert2 = BoolProperty(name = "Vertice 2",
-                         description = "Enable edge creation for vertice 2.",
-                         default = True)
-    vert3 = BoolProperty(name = "Vertice 3",
-                         description = "Enable edge creation for vertice 3.",
-                         default = True)
-    vert4 = BoolProperty(name = "Vertice 4",
-                         description = "Enable edge creation for vertice 4.",
-                         default = True)
-    pos = BoolProperty(name = "+",
-                       description = "Enable positive direction edges.",
-                       default = True)
-    neg = BoolProperty(name = "-",
-                       description = "Enable negitive direction edges.",
-                       default = True)
-    angle = FloatProperty(name = "Angle",
-                          description = "Angle off of the originating edge",
-                          min = 0.0, max = 180.0,
-                          default = 90.0)
-    length = FloatProperty(name = "Length",
-                           description = "Length of created edges.",
-                           min = 0.0, max = 1024.0,
-                           default = 1.0)
-
-    # For when only one edge is selected (Possible feature to be testd):
-    plane = EnumProperty(name = "Plane",
-                         items = [("XY", "X-Y Plane", "Use the X-Y plane as the plane of creation"),
-                                  ("XZ", "X-Z Plane", "Use the X-Z plane as the plane of creation"),
-                                  ("YZ", "Y-Z Plane", "Use the Y-Z plane as the plane of creation")],
-                         default = "XY")
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.prop(self, "vert1")
-        layout.prop(self, "vert2")
-        layout.prop(self, "vert3")
-        layout.prop(self, "vert4")
-        row = layout.row(align = False)
-        row.alignment = 'EXPAND'
-        row.prop(self, "pos")
-        row.prop(self, "neg")
-        layout.prop(self, "angle")
-        layout.prop(self, "length")
-    
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-    
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bVerts = bm.verts
-        bEdges = bm.edges
-        edges = [e for e in bEdges if e.select]
-        vectors = []
-
-        # Until I can figure out a better way of handeling it:
-        if len(edges) < 2:
-            bpy.ops.object.editmode_toggle()
-            self.report({'ERROR_INVALID_INPUT'},
-                        "You must select two edges.")
-            return {'CANCELLED'}
-
-        verts = [edges[0].verts[0],
-                 edges[0].verts[1],
-                 edges[1].verts[0],
-                 edges[1].verts[1]]
-
-        cos = intersect_line_line(verts[0].co, verts[1].co, verts[2].co, verts[3].co)
-
-        # If the two edges are parallel:
-        if cos == None:
-            self.report({'WARNING'},
-                        "Selected lines are parallel: results may be unpredictable.")
-            vectors.append(verts[0].co - verts[1].co)
-            vectors.append(verts[0].co - verts[2].co)
-            vectors.append(vectors[0].cross(vectors[1]))
-            vectors.append(vectors[2].cross(vectors[0]))
-            vectors.append(-vectors[3])
-        else:
-            # Warn the user if they have not chosen two planar edges:
-            if not is_same_co(cos[0], cos[1]):
-                self.report({'WARNING'},
-                            "Selected lines are not planar: results may be unpredictable.")
-
-            # This makes the +/- behavior predictable:
-            if (verts[0].co - cos[0]).length < (verts[1].co - cos[0]).length:
-                verts[0], verts[1] = verts[1], verts[0]
-            if (verts[2].co - cos[0]).length < (verts[3].co - cos[0]).length:
-                verts[2], verts[3] = verts[3], verts[2]
-
-            vectors.append(verts[0].co - verts[1].co)
-            vectors.append(verts[2].co - verts[3].co)
-            
-            # Normal of the plane formed by vector1 and vector2:
-            vectors.append(vectors[0].cross(vectors[1]))
-
-            # Possible directions:
-            vectors.append(vectors[2].cross(vectors[0]))
-            vectors.append(vectors[1].cross(vectors[2]))
-
-        # Set the length:
-        vectors[3].length = self.length
-        vectors[4].length = self.length
-
-        # Perform any additional rotations:
-        matrix = Matrix.Rotation(radians(90 + self.angle), 3, vectors[2])
-        vectors.append(matrix * -vectors[3]) # vectors[5]
-        matrix = Matrix.Rotation(radians(90 - self.angle), 3, vectors[2])
-        vectors.append(matrix * vectors[4]) # vectors[6]
-        vectors.append(matrix * vectors[3]) # vectors[7]
-        matrix = Matrix.Rotation(radians(90 + self.angle), 3, vectors[2])
-        vectors.append(matrix * -vectors[4]) # vectors[8]
-
-        # Perform extrusions and displacements:
-        # There will be a total of 8 extrusions.  One for each vert of each edge.
-        # It looks like an extrusion will add the new vert to the end of the verts
-        # list and leave the rest in the same location.
-        # ----------- EDIT -----------
-        # It looks like I might be able to do this within "bpy.data" with the ".add"
-        # function.
-        # ------- BMESH UPDATE -------
-        # BMesh uses ".new()"
-
-        for v in range(len(verts)):
-            vert = verts[v]
-            if (v == 0 and self.vert1) or (v == 1 and self.vert2) or (v == 2 and self.vert3) or (v == 3 and self.vert4):
-                if self.pos:
-                    new = bVerts.new()
-                    new.co = vert.co - vectors[5 + (v // 2) + ((v % 2) * 2)]
-                    bEdges.new((vert, new))
-                if self.neg:
-                    new = bVerts.new()
-                    new.co = vert.co + vectors[5 + (v // 2) + ((v % 2) * 2)]
-                    bEdges.new((vert, new))
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# Usage:
-# Select an edge and a point or an edge and specify the radius (default is 1 BU)
-# You can select two edges but it might be unpredicatble which edge it revolves
-# around so you might have to play with the switch.
-class Shaft(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_shaft"
-    bl_label = "Shaft"
-    bl_description = "Create a shaft mesh around an axis"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    # Selection defaults:
-    shaftType = 0
-
-    # For tracking if the user has changed selection:
-    last_edge = IntProperty(name = "Last Edge",
-                            description = "Tracks if user has changed selected edge",
-                            min = 0, max = 1,
-                            default = 0)
-    last_flip = False
-    
-    edge = IntProperty(name = "Edge",
-                       description = "Edge to shaft around.",
-                       min = 0, max = 1,
-                       default = 0)
-    flip = BoolProperty(name = "Flip Second Edge",
-                        description = "Flip the percieved direction of the second edge.",
-                        default = False)
-    radius = FloatProperty(name = "Radius",
-                           description = "Shaft Radius",
-                           min = 0.0, max = 1024.0,
-                           default = 1.0)
-    start = FloatProperty(name = "Starting Angle",
-                          description = "Angle to start the shaft at.",
-                          min = -360.0, max = 360.0,
-                          default = 0.0)
-    finish = FloatProperty(name = "Ending Angle",
-                           description = "Angle to end the shaft at.",
-                           min = -360.0, max = 360.0,
-                           default = 360.0)
-    segments = IntProperty(name = "Shaft Segments",
-                           description = "Number of sgements to use in the shaft.",
-                           min = 1, max = 4096,
-                           soft_max = 512,
-                           default = 32)
-
-
-    def draw(self, context):
-        layout = self.layout
-
-        if self.shaftType == 0:
-            layout.prop(self, "edge")
-            layout.prop(self, "flip")
-        elif self.shaftType == 3:
-            layout.prop(self, "radius")
-        layout.prop(self, "segments")
-        layout.prop(self, "start")
-        layout.prop(self, "finish")
-
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        # Make sure these get reset each time we run:
-        self.last_edge = 0
-        self.edge = 0
-
-        return self.execute(context)
-
-    
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bFaces = bm.faces
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        active = None
-        edges = []
-        verts = []
-
-        # Pre-caclulated values:
-
-        rotRange = [radians(self.start), radians(self.finish)]
-        rads = radians((self.finish - self.start) / self.segments)
-
-        numV = self.segments + 1
-        numE = self.segments
-
-        edges = [e for e in bEdges if e.select]
-
-        # Robustness check: there should at least be one edge selected
-        if len(edges) < 1:
-            bpy.ops.object.editmode_toggle()
-            self.report({'ERROR_INVALID_INPUT'},
-                        "At least one edge must be selected.")
-            return {'CANCELLED'}
-
-        # If two edges are selected:
-        if len(edges) == 2:
-            # default:
-            edge = [0, 1]
-            vert = [0, 1]
-
-            # Edge selection:
-            #
-            # By default, we want to shaft around the last selected edge (it
-            # will be the active edge).  We know we are using the default if
-            # the user has not changed which edge is being shafted around (as
-            # is tracked by self.last_edge).  When they are not the same, then
-            # the user has changed selection.
-            #
-            # We then need to make sure that the active object really is an edge
-            # (robustness check).
-            #
-            # Finally, if the active edge is not the inital one, we flip them
-            # and have the GUI reflect that.
-            if self.last_edge == self.edge:
-                if isinstance(bm.select_history.active, bmesh.types.BMEdge):
-                    if bm.select_history.active != edges[edge[0]]:
-                        self.last_edge, self.edge = edge[1], edge[1]
-                        edge = [edge[1], edge[0]]
-                else:
-                    bpy.ops.object.editmode_toggle()
-                    self.report({'ERROR_INVALID_INPUT'},
-                                "Active geometry is not an edge.")
-                    return {'CANCELLED'}
-            elif self.edge == 1:
-                edge = [1, 0]
-                    
-            verts.append(edges[edge[0]].verts[0])
-            verts.append(edges[edge[0]].verts[1])
-
-            if self.flip:
-                verts = [1, 0]
-
-            verts.append(edges[edge[1]].verts[vert[0]])
-            verts.append(edges[edge[1]].verts[vert[1]])
-
-            self.shaftType = 0
-        # If there is more than one edge selected:
-        # There are some issues with it ATM, so don't expose is it to normal users
-        # @todo Fix edge connection ordering issue
-        elif len(edges) > 2 and bpy.app.debug:
-            if isinstance(bm.select_history.active, bmesh.types.BMEdge):
-                active = bm.select_history.active
-                edges.remove(active)
-                # Get all the verts:
-                edges = order_joined_edges(edges[0])
-                verts = []
-                for e in edges:
-                    if verts.count(e.verts[0]) == 0:
-                        verts.append(e.verts[0])
-                    if verts.count(e.verts[1]) == 0:
-                        verts.append(e.verts[1])
-            else:
-                bpy.ops.object.editmode_toggle()
-                self.report({'ERROR_INVALID_INPUT'},
-                            "Active geometry is not an edge.")
-                return {'CANCELLED'}
-            self.shaftType = 1
-        else:
-            verts.append(edges[0].verts[0])
-            verts.append(edges[0].verts[1])
-
-            for v in bVerts:
-                if v.select and verts.count(v) == 0:
-                    verts.append(v)
-                v.select = False
-            if len(verts) == 2:
-                self.shaftType = 3
-            else:
-                self.shaftType = 2
-
-        # The vector denoting the axis of rotation:
-        if self.shaftType == 1:
-            axis = active.verts[1].co - active.verts[0].co
-        else:
-            axis = verts[1].co - verts[0].co
-
-        # We will need a series of rotation matrices.  We could use one which
-        # would be faster but also might cause propagation of error.
-##        matrices = []
-##        for i in range(numV):
-##            matrices.append(Matrix.Rotation((rads * i) + rotRange[0], 3, axis))
-        matrices = [Matrix.Rotation((rads * i) + rotRange[0], 3, axis) for i in range(numV)]
-
-        # New vertice coordinates:
-        verts_out = []
-
-        # If two edges were selected:
-        #   - If the lines are not parallel, then it will create a cone-like shaft
-        if self.shaftType == 0:
-            for i in range(len(verts) - 2):
-                init_vec = distance_point_line(verts[i + 2].co, verts[0].co, verts[1].co)
-                co = init_vec + verts[i + 2].co
-                # These will be rotated about the orgin so will need to be shifted:
-                for j in range(numV):
-                    verts_out.append(co - (matrices[j] * init_vec))
-        elif self.shaftType == 1:
-            for i in verts:
-                init_vec = distance_point_line(i.co, active.verts[0].co, active.verts[1].co)
-                co = init_vec + i.co
-                # These will be rotated about the orgin so will need to be shifted:
-                for j in range(numV):
-                    verts_out.append(co - (matrices[j] * init_vec))
-        # Else if a line and a point was selected:    
-        elif self.shaftType == 2:
-            init_vec = distance_point_line(verts[2].co, verts[0].co, verts[1].co)
-            # These will be rotated about the orgin so will need to be shifted:
-            verts_out = [(verts[i].co - (matrices[j] * init_vec)) for i in range(2) for j in range(numV)]
-        # Else the above are not possible, so we will just use the edge:
-        #   - The vector defined by the edge is the normal of the plane for the shaft
-        #   - The shaft will have radius "radius".
-        else:
-            if is_axial(verts[0].co, verts[1].co) == None:
-                proj = (verts[1].co - verts[0].co)
-                proj[2] = 0
-                norm = proj.cross(verts[1].co - verts[0].co)
-                vec = norm.cross(verts[1].co - verts[0].co)
-                vec.length = self.radius
-            elif is_axial(verts[0].co, verts[1].co) == 'Z':
-                vec = verts[0].co + Vector((0, 0, self.radius))
-            else:
-                vec = verts[0].co + Vector((0, self.radius, 0))
-            init_vec = distance_point_line(vec, verts[0].co, verts[1].co)
-            # These will be rotated about the orgin so will need to be shifted:
-            verts_out = [(verts[i].co - (matrices[j] * init_vec)) for i in range(2) for j in range(numV)]
-
-        # We should have the coordinates for a bunch of new verts.  Now add the verts
-        # and build the edges and then the faces.
-
-        newVerts = []
-
-        if self.shaftType == 1:
-            # Vertices:
-            for i in range(numV * len(verts)):
-                new = bVerts.new()
-                new.co = verts_out[i]
-                new.select = True
-                newVerts.append(new)
-
-            # Edges:
-            for i in range(numE):
-                for j in range(len(verts)):
-                    e = bEdges.new((newVerts[i + (numV * j)], newVerts[i + (numV * j) + 1]))
-                    e.select = True
-            for i in range(numV):
-                for j in range(len(verts) - 1):
-                    e = bEdges.new((newVerts[i + (numV * j)], newVerts[i + (numV * (j + 1))]))
-                    e.select = True
-
-            # Faces:
-            # There is a problem with this right now
-            for i in range(len(edges)):
-                for j in range(numE):
-                    f = bFaces.new((newVerts[i], newVerts[i + 1],
-                                    newVerts[i + (numV * j) + 1], newVerts[i + (numV * j)]))
-                    f.normal_update()
-        else:
-            # Vertices:
-            for i in range(numV * 2):
-                new = bVerts.new()
-                new.co = verts_out[i]
-                new.select = True
-                newVerts.append(new)
-
-            # Edges:
-            for i in range(numE):
-                e = bEdges.new((newVerts[i], newVerts[i + 1]))
-                e.select = True
-                e = bEdges.new((newVerts[i + numV], newVerts[i + numV + 1]))
-                e.select = True
-            for i in range(numV):
-                e = bEdges.new((newVerts[i], newVerts[i + numV]))
-                e.select = True
-
-            # Faces:
-            for i in range(numE):
-                f = bFaces.new((newVerts[i], newVerts[i + 1],
-                                newVerts[i + numV + 1], newVerts[i + numV]))
-                f.normal_update()
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# "Slices" edges crossing a plane defined by a face.
-# @todo Selecting a face as the cutting plane will cause Blender to crash when
-#   using "Rip".
-class Slice(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_slice"
-    bl_label = "Slice"
-    bl_description = "Cuts edges at the plane defined by a selected face."
-    bl_options = {'REGISTER', 'UNDO'}
-
-    make_copy = BoolProperty(name = "Make Copy",
-                             description = "Make new vertices at intersection points instead of spliting the edge",
-                             default = False)
-    rip = BoolProperty(name = "Rip",
-                       description = "Split into two edges that DO NOT share an intersection vertice.",
-                       default = False)
-    pos = BoolProperty(name = "Positive",
-                       description = "Remove the portion on the side of the face normal",
-                       default = False)
-    neg = BoolProperty(name = "Negative",
-                       description = "Remove the portion on the side opposite of the face normal",
-                       default = False)
-
-    def draw(self, context):
-        layout = self.layout
-
-        layout.prop(self, "make_copy")
-        if not self.make_copy:
-            layout.prop(self, "rip")
-            layout.label("Remove Side:")
-            layout.prop(self, "pos")
-            layout.prop(self, "neg")
-
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-    
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(context.active_object.data)
-        bm.normal_update()
-
-        # For easy access to verts, edges, and faces:
-        bVerts = bm.verts
-        bEdges = bm.edges
-        bFaces = bm.faces
-
-        face = None
-        normal = None
-
-        # Find the selected face.  This will provide the plane to project onto:
-        #   - First check to use the active face.  This allows users to just
-        #       select a bunch of faces with the last being the cutting plane.
-        #       This is try and make the tool act more like a built-in Blender
-        #       function.
-        #   - If that fails, then use the first found selected face in the BMesh
-        #       face list.
-        if isinstance(bm.select_history.active, bmesh.types.BMFace):
-            face = bm.select_history.active
-            normal = bm.select_history.active.normal
-            bm.select_history.active.select = False
-        else:
-            for f in bFaces:
-                if f.select:
-                    face = f
-                    normal = f.normal
-                    f.select = False
-                    break
-
-        # If we don't find a selected face, we have problem.  Exit:
-        if face == None:
-            bpy.ops.object.editmode_toggle()
-            self.report({'ERROR_INVALID_INPUT'},
-                        "You must select a face as the cutting plane.")
-            return {'CANCELLED'}
-        # Warn the user if they are using an n-gon.  We can work with it, but it
-        # might lead to some odd results.
-        elif len(face.verts) > 4 and not is_face_planar(face):
-            self.report({'WARNING'},
-                        "Selected face is an n-gon.  Results may be unpredictable.")
-
-        # @todo DEBUG TRACKER - DELETE WHEN FINISHED:
-        dbg = 0
-        if bpy.app.debug:
-            print(len(bEdges))
-
-        # Iterate over the edges:
-        for e in bEdges:
-            # @todo DEBUG TRACKER - DELETE WHEN FINISHED:
-            if bpy.app.debug:
-                print(dbg)
-                dbg = dbg + 1
-
-            # Get the end verts on the edge:
-            v1 = e.verts[0]
-            v2 = e.verts[1]
-            
-            # Make sure that verts are not a part of the cutting plane:
-            if e.select and (v1 not in face.verts and v2 not in face.verts):
-                if len(face.verts) < 5:  # Not an n-gon
-                    intersection = intersect_line_face(e, face, True)
-                else:
-                    intersection = intersect_line_plane(v1.co, v2.co, face.verts[0].co, normal)
-
-                # More debug info - I think this can stay.
-                if bpy.app.debug:
-                    print("Intersection", end = ': ')
-                    print(intersection)
-
-                # If an intersection exists find the distance of each of the end
-                # points from the plane, with "positive" being in the direction
-                # of the cutting plane's normal.  If the points are on opposite
-                # side of the plane, then it intersects and we need to cut it.
-                if intersection != None:
-                    d1 = distance_point_to_plane(v1.co, face.verts[0].co, normal)
-                    d2 = distance_point_to_plane(v2.co, face.verts[0].co, normal)
-                    # If they have different signs, then the edge crosses the
-                    # cutting plane:
-                    if abs(d1 + d2) < abs(d1 - d2):
-                        # Make the first vertice the positive vertice:
-                        if d1 < d2:
-                            v2, v1 = v1, v2
-                        if self.make_copy:
-                            new = bVerts.new()
-                            new.co = intersection
-                            new.select = True
-                        elif self.rip:
-                            newV1 = bVerts.new()
-                            newV1.co = intersection
-
-                            if bpy.app.debug:
-                                print("newV1 created", end = '; ')
-
-                            newV2 = bVerts.new()
-                            newV2.co = intersection
-
-                            if bpy.app.debug:
-                                print("newV2 created", end = '; ')
-
-                            newE1 = bEdges.new((v1, newV1))
-                            newE2 = bEdges.new((v2, newV2))
-
-                            if bpy.app.debug:
-                                print("new edges created", end = '; ')
-
-                            bEdges.remove(e)
-
-                            if bpy.app.debug:
-                                print("old edge removed.")
-                                print("We're done with this edge.")
-                        else:
-                            new = list(bmesh.utils.edge_split(e, v1, 0.5))
-                            new[1].co = intersection
-                            e.select = False
-                            new[0].select = False
-                            if self.pos:
-                                bEdges.remove(new[0])
-                            if self.neg:
-                                bEdges.remove(e)
-
-        bm.to_mesh(context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# This projects the selected edges onto the selected plane.  This projects both
-# points on the selected edge.
-class Project(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_project"
-    bl_label = "Project"
-    bl_description = "Projects the selected vertices/edges onto the selected plane."
-    bl_options = {'REGISTER', 'UNDO'}
-
-    make_copy = BoolProperty(name = "Make Copy",
-                             description = "Make a duplicate of the vertices instead of moving it",
-                             default = False)
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, "make_copy")
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(context.active_object.data)
-        bm.normal_update()
-
-        bFaces = bm.faces
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        fVerts = []
-
-        # Find the selected face.  This will provide the plane to project onto:
-        # @todo Check first for an active face
-        for f in bFaces:
-            if f.select:
-                for v in f.verts:
-                    fVerts.append(v)
-                normal = f.normal
-                f.select = False
-                break
-
-        for v in bVerts:
-            if v.select:
-                if v in fVerts:
-                    v.select = False
-                    continue
-                d = distance_point_to_plane(v.co, fVerts[0].co, normal)
-                if self.make_copy:
-                    temp = v
-                    v = bVerts.new()
-                    v.co = temp.co
-                vector = normal
-                vector.length = abs(d)
-                v.co = v.co - (vector * sign(d))
-                v.select = False
-
-        bm.to_mesh(context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# Project_End is for projecting/extending an edge to meet a plane.
-# This is used be selecting a face to define the plane then all the edges.
-# The add-on will then move the vertices in the edge that is closest to the
-# plane to the coordinates of the intersection of the edge and the plane.
-class Project_End(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_project_end"
-    bl_label = "Project (End Point)"
-    bl_description = "Projects the vertice of the selected edges closest to a plane onto that plane."
-    bl_options = {'REGISTER', 'UNDO'}
-
-    make_copy = BoolProperty(name = "Make Copy",
-                             description = "Make a duplicate of the vertice instead of moving it",
-                             default = False)
-    keep_length = BoolProperty(name = "Keep Edge Length",
-                               description = "Maintain edge lengths",
-                               default = False)
-    use_force = BoolProperty(name = "Use opposite vertices",
-                             description = "Force the usage of the vertices at the other end of the edge",
-                             default = False)
-    use_normal = BoolProperty(name = "Project along normal",
-                              description = "Use the plane's normal as the projection direction",
-                              default = False)
-
-    def draw(self, context):
-        layout = self.layout
-##        layout.prop(self, "keep_length")
-        if not self.keep_length:
-            layout.prop(self, "use_normal")
-##        else:
-##            self.report({'ERROR_INVALID_INPUT'}, "Maintaining edge length not yet supported")
-##            self.report({'WARNING'}, "Projection may result in unexpected geometry")
-        layout.prop(self, "make_copy")
-        layout.prop(self, "use_force")
-
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(context.active_object.data)
-        bm.normal_update()
-
-        bFaces = bm.faces
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        fVerts = []
-
-        # Find the selected face.  This will provide the plane to project onto:
-        for f in bFaces:
-            if f.select:
-                for v in f.verts:
-                    fVerts.append(v)
-                normal = f.normal
-                f.select = False
-                break
-
-        for e in bEdges:
-            if e.select:
-                v1 = e.verts[0]
-                v2 = e.verts[1]
-                if v1 in fVerts or v2 in fVerts:
-                    e.select = False
-                    continue
-                intersection = intersect_line_plane(v1.co, v2.co, fVerts[0].co, normal)
-                if intersection != None:
-                    # Use abs because we don't care what side of plane we're on:
-                    d1 = distance_point_to_plane(v1.co, fVerts[0].co, normal)
-                    d2 = distance_point_to_plane(v2.co, fVerts[0].co, normal)
-                    # If d1 is closer than we use v1 as our vertice:
-                    # "xor" with 'use_force':
-                    if (abs(d1) < abs(d2)) is not self.use_force:
-                        if self.make_copy:
-                            v1 = bVerts.new()
-                            v1.co = e.verts[0].co
-                        if self.keep_length:
-                            v1.co = intersection
-                        elif self.use_normal:
-                            vector = normal
-                            vector.length = abs(d1)
-                            v1.co = v1.co - (vector * sign(d1))
-                        else:
-                            v1.co = intersection
-                    else:
-                        if self.make_copy:
-                            v2 = bVerts.new()
-                            v2.co = e.verts[1].co
-                        if self.keep_length:
-                            v2.co = intersection
-                        elif self.use_normal:
-                            vector = normal
-                            vector.length = abs(d2)
-                            v2.co = v2.co - (vector * sign(d2))
-                        else:
-                            v2.co = intersection
-                e.select = False
-
-        bm.to_mesh(context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# Edge Fillet
-#
-# Blender currently does not have a CAD-style edge-based fillet function. This
-# is my atempt to create one.  It should take advantage of BMesh and the ngon
-# capabilities for non-destructive modeling, if possible.  This very well may
-# not result in nice quads and it will be up to the artist to clean up the mesh
-# back into quads if necessary.
-#
-# Assumptions:
-#   - Faces are planar. This should, however, do a check an warn otherwise.
-#
-# Developement Process:
-# Because this will eventaully prove to be a great big jumble of code and
-# various functionality, this is to provide an outline for the developement
-# and functionality wanted at each milestone.
-#   1) intersect_line_face: function to find the intersection point, if it
-#       exists, at which a line intersects a face.  The face does not have to
-#       be planar, and can be an ngon.  This will allow for a point to be placed
-#       on the actual mesh-face for non-planar faces.
-#   2) Minimal propagation, single edge: Filleting of a single edge without
-#       propagation of the fillet along "tangent" edges.
-#   3) Minimal propagation, multiple edges: Perform said fillet along/on
-#       multiple edges.
-#   4) "Tangency" detection code: because we have a mesh based geometry, this
-#       have to make an educated guess at what is actually supposed to be
-#       treated as tangent and what constitutes a sharp edge.  This should
-#       respect edges marked as sharp (does not propagate passed an
-#       intersecting edge that is marked as sharp).
-#   5) Tangent propagation, single edge: Filleting of a single edge using the
-#       above tangency detection code to continue the fillet to adjacent
-#       "tangent" edges.
-#   6) Tangent propagation, multiple edges: Same as above, but with multiple
-#       edges selected.  If multiple edges were selected along the same
-#       tangency path, only one edge will be filleted.  The others must be
-#       ignored/discarded.
-class Fillet(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_fillet"
-    bl_label = "Edge Fillet"
-    bl_description = "Fillet the selected edges."
-    bl_options = {'REGISTER', 'UNDO'}
-
-    radius = FloatProperty(name = "Radius",
-                           description = "Radius of the edge fillet",
-                           min = 0.00001, max = 1024.0,
-                           default = 0.5)
-    prop = EnumProperty(name = "Propagation",
-                        items = [("m", "Minimal", "Minimal edge propagation"),
-                                 ("t", "Tangential", "Tangential edge propagation")],
-                        default = "m")
-    prop_fac = FloatProperty(name = "Propagation Factor",
-                             description = "Corner detection sensitivity factor for tangential propagation",
-                             min = 0.0, max = 100.0,
-                             default = 25.0)
-    deg_seg = FloatProperty(name = "Degrees/Section",
-                            description = "Approximate degrees per section",
-                            min = 0.00001, max = 180.0,
-                            default = 10.0)
-    res = IntProperty(name = "Resolution",
-                      description = "Resolution of the fillet",
-                      min = 1, max = 1024,
-                      default = 8)
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, "radius")
-        layout.prop(self, "prop")
-        if self.prop == "t":
-            layout.prop(self, "prop_fac")
-        layout.prop(self, "deg_seg")
-        layout.prop(self, "res")
-
-    
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-
-    def execute(self, context):
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bFaces = bm.faces
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        # Robustness check: this does not support n-gons (at least for now)
-        # because I have no idea how to handle them righ now.  If there is
-        # an n-gon in the mesh, warn the user that results may be nuts because
-        # of it.
-        #
-        # I'm not going to cause it to exit if there are n-gons, as they may
-        # not be encountered.
-        # @todo I would like this to be a confirmation dialoge of some sort
-        # @todo I would REALLY like this to just handle n-gons. . . .
-        for f in bFaces:
-            if len(face.verts) > 4:
-                self.report({'WARNING'},
-                            "Mesh contains n-gons which are not supported. Operation may fail.")
-                break
-
-        # Get the selected edges:
-        # Robustness check: boundary and wire edges are not fillet-able.
-        edges = [e for e in bEdges if e.select and not e.is_boundary and not e.is_wire]
-
-        for e in edges:
-            axis_points = fillet_axis(e, self.radius)
-            
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-# For testing the mess that is "intersect_line_face" for possible math errors.
-# This will NOT be directly exposed to end users: it will always require running
-# Blender in debug mode.
-# So far no errors have been found. Thanks to anyone who tests and reports bugs!
-class Intersect_Line_Face(bpy.types.Operator):
-    bl_idname = "mesh.edgetools_ilf"
-    bl_label = "ILF TEST"
-    bl_description = "TEST ONLY: INTERSECT_LINE_FACE"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return(ob and ob.type == 'MESH' and context.mode == 'EDIT_MESH')
-
-
-    def invoke(self, context, event):
-        return self.execute(context)
-
-
-    def execute(self, context):
-        # Make sure we really are in debug mode:
-        if not bpy.app.debug:
-            self.report({'ERROR_INVALID_INPUT'},
-                        "This is for debugging only: you should not be able to run this!")
-            return {'CANCELLED'}
-        
-        bpy.ops.object.editmode_toggle()
-        bm = bmesh.new()
-        bm.from_mesh(bpy.context.active_object.data)
-        bm.normal_update()
-
-        bFaces = bm.faces
-        bEdges = bm.edges
-        bVerts = bm.verts
-
-        face = None
-        for f in bFaces:
-            if f.select:
-                face = f
-                break
-
-        edge = None
-        for e in bEdges:
-            if e.select and not e in face.edges:
-                edge = e
-                break
-
-        point = intersect_line_face(edge, face, True)
-
-        if point != None:
-            new = bVerts.new()
-            new.co = point
-        else:
-            bpy.ops.object.editmode_toggle()
-            self.report({'ERROR_INVALID_INPUT'}, "point was \"None\"")
-            return {'CANCELLED'}
-
-        bm.to_mesh(bpy.context.active_object.data)
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-class VIEW3D_MT_edit_mesh_edgetools(bpy.types.Menu):
-    bl_label = "EdgeTools"
-    
-    def draw(self, context):
-        global integrated
-        layout = self.layout
-        
-        layout.operator("mesh.edgetools_extend")
-        layout.operator("mesh.edgetools_spline")
-        layout.operator("mesh.edgetools_ortho")
-        layout.operator("mesh.edgetools_shaft")
-        layout.operator("mesh.edgetools_slice")
-        layout.operator("mesh.edgetools_project")
-        layout.operator("mesh.edgetools_project_end")
-        if bpy.app.debug:
-            ## Not ready for prime-time yet:
-            layout.operator("mesh.edgetools_fillet")
-            ## For internal testing ONLY:
-            layout.operator("mesh.edgetools_ilf")
-        # If TinyCAD VTX exists, add it to the menu.
-        # @todo This does not work.
-        if integrated and bpy.app.debug:
-            layout.operator(EdgeIntersections.bl_idname, text="Edges V Intersection").mode = -1
-            layout.operator(EdgeIntersections.bl_idname, text="Edges T Intersection").mode = 0
-            layout.operator(EdgeIntersections.bl_idname, text="Edges X Intersection").mode = 1
-
-
-def menu_func(self, context):
-    self.layout.menu("VIEW3D_MT_edit_mesh_edgetools")
-    self.layout.separator()
-
-
-# define classes for registration
-classes = [VIEW3D_MT_edit_mesh_edgetools,
-    Extend,
-    Spline,
-    Ortho,
-    Shaft,
-    Slice,
-    Project,
-    Project_End,
-    Fillet,
-    Intersect_Line_Face]
-
-
-# registering and menu integration
-def register():
-    global integrated
-    if int(bpy.app.build_revision[0:5]) < 44800:
-        print("Error in Edgetools:")
-        print("This version of Blender does not support the necessary BMesh API.")
-        print("Please download Blender 2.63 or newer.")
-        return {'ERROR'}
-        
-    for c in classes:
-        bpy.utils.register_class(c)
-
-    # I would like this script to integrate the TinyCAD VTX menu options into
-    # the edge tools menu if it exists.  This should make the UI a little nicer
-    # for users.
-    # @todo Remove TinyCAD VTX menu entries and add them too EdgeTool's menu
-    import inspect, os.path
-
-    path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
-    if os.path.isfile(path + "\mesh_edge_intersection_tools.py"):
-        print("EdgeTools UI integration test - TinyCAD VTX Found")
-        integrated = True
-    
-    bpy.types.VIEW3D_MT_edit_mesh_specials.prepend(menu_func)
-
-
-# unregistering and removing menus
-def unregister():
-    for c in classes:
-        bpy.utils.unregister_class(c)
-
-    bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
-    
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/__init__.py b/release/scripts/addons_contrib/mesh_extra_tools/__init__.py
deleted file mode 100644
index 8392e8d..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/__init__.py
+++ /dev/null
@@ -1,159 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-# Contributed to by
-# meta-androcto #
-
-bl_info = {
-    "name": "Extra Tools",
-    "author": "various",
-    "version": (0, 1),
-    "blender": (2, 6, 4),
-    "location": "View3D > Toolbar and View3D > Specials (W-key)",
-    "description": "Add extra mesh edit tools",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32711",
-    "category": "Mesh"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(mesh_bump)
-    imp.reload(face_inset_fillet)
-    imp.reload(mesh_bevel_witold)
-    imp.reload(mesh_filletplus)
-    imp.reload(mesh_normal_smooth)
-    imp.reload(mesh_polyredux)
-    imp.reload(mesh_vertex_chamfer)
-    imp.reload(mesh_mextrude_plus)
-
-else:
-    from . import mesh_bump
-    from . import face_inset_fillet
-    from . import mesh_bevel_witold
-    from . import mesh_filletplus
-    from . import mesh_normal_smooth
-    from . import mesh_polyredux
-    from . import mesh_vertex_chamfer
-    from . import mesh_mextrude_plus
-
-import bpy
-
-class VIEW3D_MT_edit_mesh_extras(bpy.types.Menu):
-    # Define the "Extras" menu
-    bl_idname = "VIEW3D_MT_edit_mesh_extras"
-    bl_label = "Extra Tools"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator("faceinfillet.op0_id",
-            text="Face Inset Fillet")
-        layout.operator("fillet.op0_id",
-            text="Edge Fillet Plus")
-        layout.operator("object.mextrude",
-            text="Multi Extrude")
-        layout.operator("mesh.bump",
-            text="Inset Extrude Bump")
-        layout.operator("mesh.mbevel",
-            text="Bevel Selected")
-        layout.operator("mesh.vertex_chamfer",
-            text="Vertex Chamfer")
-        layout.operator("mesh.polyredux",
-            text="Poly Redux")
-        layout.operator("normal.smooth",
-            text="Normal Smooth")
-
-
-class ExtrasPanel(bpy.types.Panel):
-    bl_label = 'Mesh Extra Tools'
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_context = 'mesh_edit'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.split(0.80)
-        row.operator('faceinfillet.op0_id', text = 'Face Inset Fillet', icon = 'PLUGIN')
-        row.operator('help.face_inset', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('fillet.op0_id', text = 'Edge Fillet plus', icon = 'PLUGIN')
-        row.operator('help.edge_fillet', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('object.mextrude', text = 'Multi Face Extrude', icon = 'PLUGIN')
-        row.operator('help.mextrude', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('mesh.bump', text = 'Inset Bump', icon = 'PLUGIN')
-        row.operator('help.bump', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('mesh.mbevel', text = 'Bevel Selected', icon = 'PLUGIN')
-        row.operator('help.edge_bevel', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('mesh.vertex_chamfer', text = 'Vertex Chamfer' , icon = 'PLUGIN')
-        row.operator('help.vertexchamfer', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('mesh.polyredux', text = 'Poly Redux', icon = 'PLUGIN')
-        row.operator('help.polyredux', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('normal.smooth', text = 'Normal Smooth', icon = 'PLUGIN')
-        row.operator('help.normal_smooth', text = '', icon = 'INFO')
-        row = layout.split(0.50)
-        row.operator('mesh.flip_normals', text = 'Normals Flip')
-        row.operator('mesh.remove_doubles', text = 'Remove Doubles')
-
-
-# Multi Extrude Panel
-
-class ExtrudePanel(bpy.types.Panel):
-    bl_label = 'Multi Extrude Plus'
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.split(0.80)
-        row.operator('object.mextrude', text = 'Multi Face Extrude', icon = 'PLUGIN')
-        row.operator('help.mextrude', text = '', icon = 'INFO')
-        row = layout.split(0.80)
-        row.operator('object.mesh2bones', text = 'Add Armature', icon = 'PLUGIN')
-        row.operator('help.addarm', text = '', icon = 'INFO')
-
-# Define "Extras" menu
-def menu_func(self, context):
-    self.layout.menu('VIEW3D_MT_edit_mesh_extras', icon='PLUGIN')
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    # Add "Extras" menu to the "Add Mesh" menu
-    bpy.types.VIEW3D_MT_edit_mesh_specials.prepend(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    # Remove "Extras" menu from the "Add Mesh" menu.
-    bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/face_inset_fillet.py b/release/scripts/addons_contrib/mesh_extra_tools/face_inset_fillet.py
deleted file mode 100644
index bc4824e..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/face_inset_fillet.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# based completely on addon by zmj100
-# ------ ------
-import bpy
-import bmesh
-from bpy.props import FloatProperty, IntProperty, BoolProperty, EnumProperty
-from math import tan, cos, degrees, radians, sin
-from mathutils import Matrix
-
-# ------ ------
-def edit_mode_out():
-    bpy.ops.object.mode_set(mode = 'OBJECT')
-
-def edit_mode_in():
-    bpy.ops.object.mode_set(mode = 'EDIT')
-
-def a_rot(ang, rp, axis, q):
-    return (Matrix.Rotation(ang, 3, axis) * (q - rp)) + rp
-
-# ------ ------
-def f_(bme, list_0, opp, adj1, n_, out, radius, en0, kp):
-
-    list_del = []
-    for fi in list_0:
-        f = bme.faces[fi]
-        f.select_set(0)
-        list_del.append(f)
-        f.normal_update()
-        list_2 = [v.index for v in f.verts]
-        dict_0 = {}
-        list_1 = []
-        n = len(list_2)
-        for i in range(n):
-            dict_0[i] = []
-            p = (bme.verts[ list_2[i] ].co).copy()
-            p1 = (bme.verts[ list_2[(i - 1) % n] ].co).copy()
-            p2 = (bme.verts[ list_2[(i + 1) % n] ].co).copy()
-            dict_0[i].append(bme.verts[list_2[i]])
-            vec1 = p - p1
-            vec2 = p - p2
-            ang = vec1.angle(vec2)
-            adj = opp / tan(ang * 0.5)
-            h = (adj ** 2 + opp ** 2) ** 0.5
-            if round(degrees(ang)) == 180 or round(degrees(ang)) == 0.0:
-                p6 = a_rot(radians(90), p, vec1, p + ((f.normal).normalized() * opp) if out == True else p - ((f.normal).normalized() * opp))
-                list_1.append(p6)
-            else:
-                p6 = a_rot(-radians(90), p, ((p - (vec1.normalized() * adj)) - (p - (vec2.normalized() * adj))), p + ((f.normal).normalized() * h) if out == True else p - ((f.normal).normalized() * h))
-                list_1.append(p6)
-
-        list_2 = []
-        n1_ = len(list_1)
-        for j in range(n1_):
-            q = list_1[j]
-            q1 = list_1[(j - 1) % n1_]
-            q2 = list_1[(j + 1) % n1_]
-            vec1_ = q - q1
-            vec2_ = q - q2
-            ang_ = vec1_.angle(vec2_)
-            if round(degrees(ang_)) == 180 or round(degrees(ang_)) == 0.0:
-                bme.verts.new(q)
-                bme.verts.index_update()
-                list_2.append(bme.verts[-1])
-                dict_0[j].append(bme.verts[-1])
-            else:
-                opp_ = adj1
-                if radius == False:
-                    h_ = adj1 * (1 / cos(ang_ * 0.5))
-                    d = adj1
-                elif radius == True:
-                    h_ = opp_ / sin(ang_ * 0.5)
-                    d = opp_ / tan(ang_ * 0.5)
-
-                q3 = q - (vec1_.normalized() * d)
-                q4 = q - (vec2_.normalized() * d)
-                rp_ = q - ((q - ((q3 + q4) * 0.5)).normalized() * h_)
-                axis_ = vec1_.cross(vec2_)
-                vec3_ = rp_ - q3
-                vec4_ = rp_ - q4
-                rot_ang = vec3_.angle(vec4_)
-                list_3 = []
-                
-                for o in range(n_ + 1):
-                    q5 = a_rot((rot_ang * o / n_), rp_, axis_, q4)
-                    bme.verts.new(q5)
-                    bme.verts.index_update()
-                    dict_0[j].append(bme.verts[-1])
-                    list_3.append(bme.verts[-1])
-                list_3.reverse()
-                list_2.extend(list_3)
-
-        if out == False:
-            bme.faces.new(list_2)
-            bme.faces.index_update()
-            bme.faces[-1].select_set(1)
-        elif out == True and kp == True:
-            bme.faces.new(list_2)
-            bme.faces.index_update()
-            bme.faces[-1].select_set(1)
-
-        n2_ = len(dict_0)
-        for o in range(n2_):
-            list_a = dict_0[o]
-            list_b = dict_0[(o + 1) % n2_]
-            bme.faces.new( [ list_a[0], list_b[0], list_b[-1], list_a[1] ] )
-            bme.faces.index_update()
-
-        if en0 == 'opt0':
-            for k in dict_0:
-                if len(dict_0[k]) > 2:
-                    bme.faces.new(dict_0[k])
-                    bme.faces.index_update()
-        if en0 == 'opt1':
-            for k_ in dict_0:
-                q_ = dict_0[k_][0]
-                dict_0[k_].pop(0)
-                n3_ = len(dict_0[k_])
-                for kk in range(n3_ - 1):
-                    bme.faces.new( [ dict_0[k_][kk], dict_0[k_][(kk + 1) % n3_], q_ ] )
-                    bme.faces.index_update()
-
-
-    del_ = [bme.faces.remove(f) for f in list_del]
-    del del_
-
-# ------ operator 0 ------
-class faceinfillet_op0(bpy.types.Operator):
-    bl_idname = 'faceinfillet.op0_id'
-    bl_label = 'Face Inset Fillet'
-    bl_description = 'inset selected faces'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    opp = FloatProperty( name = '', default = 0.04, min = 0, max = 100.0, step = 1, precision = 3 )      # inset amount
-    n_ = IntProperty( name = '', default = 4, min = 1, max = 100, step = 1 )      # number of sides
-    adj1 = FloatProperty( name = '', default = 0.04, min = 0.00001, max = 100.0, step = 1, precision = 3 )
-    out = BoolProperty( name = 'Out', default = False )
-    radius = BoolProperty( name = 'Radius', default = False )
-    en0 = EnumProperty( items =( ('opt0', 'Type 1', ''), ('opt1', 'Type 2', '') ), name = '', default = 'opt0' )
-    kp = BoolProperty( name = 'Keep face', default = False )
-    
-    def draw(self, context):
-        layout = self.layout
-        box = layout.box()
-        box.prop(self, 'en0', text = 'Corner type')
-        row0 = box.row(align = True)
-        row0.prop(self, 'out')
-        if self.out == True:
-            row0.prop(self, 'kp')
-        row = box.split(0.40, align = True)
-        row.label('Inset amount:')
-        row.prop(self, 'opp')
-        row1 = box.split(0.60, align = True)
-        row1.label('Number of sides:')
-        row1.prop(self, 'n_', slider = True)
-        box.prop(self, 'radius')
-        row2 = box.split(0.40, align = True)
-        if self.radius == True:
-            row2.label('Radius:')
-        else:
-            row2.label('Distance:')
-        row2.prop(self, 'adj1')
-
-    def execute(self, context):
-        opp = self.opp
-        n_ = self.n_
-        adj1 = self.adj1
-        out = self.out
-        radius = self.radius
-        en0 = self.en0
-        kp = self.kp
-
-        edit_mode_out()
-        ob_act = context.active_object
-        bme = bmesh.new()
-        bme.from_mesh(ob_act.data)
-        
-        list_0 = [ f.index for f in bme.faces if f.select and f.is_valid ]
-
-        if len(list_0) == 0:
-            self.report({'INFO'}, 'No faces selected unable to continue.')
-            edit_mode_in()
-            return {'CANCELLED'}
-        elif len(list_0) != 0:
-            f_(bme, list_0, opp, adj1, n_, out, radius, en0, kp)
-
-        bme.to_mesh(ob_act.data)
-        edit_mode_in()
-        return {'FINISHED'}
-
-class inset_help(bpy.types.Operator):
-	bl_idname = 'help.face_inset'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Select a face or faces & inset.')
-		layout.label('Inset square, circle or outside.')
-		layout.label('To Help:')
-		layout.label('Circle: use remove doubles to tidy joins.')
-		layout.label('Outset: select & use normals flip before extruding.')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 350)
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_bevel_witold.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_bevel_witold.py
deleted file mode 100644
index 30d8f17..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_bevel_witold.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-'''
-Bevel add-on
-'''
-#--- ### Header
-bl_info = {
-    "name": "Bevel witold",
-    "author": "Witold Jaworski",
-    "version": (1, 2, 0),
-    "blender": (2, 5, 7),
-    "api": 36147,
-    "location": "View3D >Specials (W-key)",
-    "category": "Mesh",
-    "description": "Bevels selected edges",
-    "warning": "",
-    "wiki_url": "http://airplanes3d.net/scripts-252_e.xml",
-    "tracker_url": "http://airplanes3d.net/track-252_e.xml"
-    }
-#--- ### Change log
-#2011-08-08 Witold Jaworski: added "Vertex only" feature
-#--- ### Imports
-import bpy
-from bpy.utils import register_module, unregister_module
-from bpy.props import FloatProperty, IntProperty, BoolProperty
-from math import log10, floor, pow
-#--- ### Constants
-DEBUG = 0 #Debug flag - just some text printed on the console...
-#--- ### Core operation
-def bevel(obj, width, use_vertices):
-    """Bevels selected edges of the mesh
-       Arguments:
-            @obj (Object):         an object with a mesh. 
-                                   It should have some edges selected
-            @width (float):        width of the bevel
-            @use_vertices (bool):  True, when bevel only vertices. False otherwise
-       This function should be called in the Edit Mode, only!
-    """    
-    #
-    #edge = bpy.types.MeshEdge
-    #obj = bpy.types.Object
-    #bevel = bpy.types.BevelModifier
-
-    bpy.ops.object.editmode_toggle() #switch into OBJECT mode
-    #adding the Bevel modifier
-    bpy.ops.object.modifier_add(type = 'BEVEL')  
-    bevel = obj.modifiers[-1] #the new modifier is always added at the end
-    bevel.limit_method = 'WEIGHT'
-    bevel.edge_weight_method = 'LARGEST'
-    bevel.width = width
-    bevel.use_only_vertices = use_vertices
-    #moving it up, to the first position on the modifier stack:
-    while obj.modifiers[0] != bevel:
-        bpy.ops.object.modifier_move_up(modifier = bevel.name)
-        
-    for elm in (obj.data.vertices if use_vertices else obj.data.edges):
-        if elm.select:
-            elm.bevel_weight = 1.0 
-    
-    bpy.ops.object.modifier_apply(apply_as = 'DATA', modifier = bevel.name)
-    
-    #clean up after applying our modifier: remove bevel weights:
-    for elm in (obj.data.vertices if use_vertices else obj.data.edges):
-        if elm.select:
-            elm.bevel_weight = 0.0 
-            
-    bpy.ops.object.editmode_toggle() #switch back into EDIT_MESH mode
-
-class bevel_help(bpy.types.Operator):
-	bl_idname = 'help.edge_bevel'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Select A edge or edges & bevel.')
-		layout.label('or Select 2 or more verices & bevel.')
-		layout.label('To Help:')
-		layout.label('best used on flat edges & simple edgeflow')
-		layout.label('may error if vert joins multiple edges/complex edge selection')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 350)
-#--- ### Operator
-class Bevel(bpy.types.Operator):
-    ''' Bevels selected edges of the mesh'''
-    bl_idname = "mesh.mbevel" #it is not named mesh.bevel, to not confuse with the standard bevel in the future...
-    bl_label = "Bevel Selected"
-    bl_description = "Bevels selected edges"
-    bl_options = {'REGISTER', 'UNDO'} #Set this options, if you want to update  
-    #                                  parameters of this operator interactively 
-    #                                  (in the Tools pane) 
-    #--- parameters
-    use_vertices = BoolProperty(name="Only Vertices", description="Bevel vertices (corners), not edges", default = False)
-    
-    width = FloatProperty(name="Width", description="Bevel width value (it is multiplied by 10^Exponent)", 
-                          subtype = 'DISTANCE', default = 0.1, min = 0.0, 
-                                                    step = 1, precision = 2)
-#    exponent = IntProperty(name="Exponent", description="Order of magnitude of the bevel width (the power of 10)", default = 0)
-    
-    use_scale = BoolProperty(name="Use object scale", description="Multiply bevel width by the scale of this object", default = False)
-
-    #--- other fields
-    LAST_VERT_NAME = "mesh.mbevel.last_vert" #the name of the custom scene property 
-    LAST_WIDTH_NAME = "mesh.mbevel.last_width" #the name of the custom scene property 
-    LAST_EXP_NAME = "mesh.mbevel.last_exponent" #the name of the custom scene property 
-    LAST_SCALE_NAME = "mesh.mbevel.last_scale" #scale Bevel width by the object scale 
-    #--- Blender interface methods
-    @classmethod
-    def poll(cls,context):
-        return (context.mode == 'EDIT_MESH')
-
-    def invoke(self, context, event):
-        #input validation: 
-        # 1. Require single-user mesh (modifiers cannot be applied to the multi-user ones):
-        obj = context.object
-        if obj.data.users > 1:
-            self.report(type='ERROR', message="Make this mesh single-user, first")
-            return {'CANCELLED'}
-        # 2. is there anything selected?
-        self.use_vertices = context.scene.get(self.LAST_VERT_NAME, self.use_vertices)
-
-        bpy.ops.object.editmode_toggle()
-        
-        if self.use_vertices :
-            selected = list(filter(lambda e: e.select, context.object.data.vertices))
-        else:
-            selected = list(filter(lambda e: e.select, context.object.data.edges))
-            
-        bpy.ops.object.editmode_toggle()
-            
-        if len(selected) > 0:
-            self.use_scale = context.object.get(self.LAST_SCALE_NAME, self.use_scale)
-            
-            #setup the default width, to avoid user surprises :)
-            def_exp = floor(log10(obj.dimensions.length)) #heuristic: default width exponent is derived from the object size...
-            self.exponent = context.scene.get(self.LAST_EXP_NAME, def_exp) #Let's read the last used value, stored in the scene...
-            larger = def_exp - self.exponent #How larger/smaller is actual object, comparing to the last used value?
-            if larger <= 1 and larger >= 0: #OK, this object has similar size to the previous one...
-                self.width = context.scene.get(self.LAST_WIDTH_NAME, self.width)
-            else: #the previous bevel size would be too small or too large - revert to defaults:
-                self.width = 0.1 #10% of the object order of magnitude
-                self.exponent = def_exp #the order of magnitude
-            #parameters adjusted, run the command!    
-            return self.execute(context)
-        else:
-            self.report(type='ERROR', message="Nothing is selected")
-            return {'CANCELLED'}
-        
-    def execute(self,context):
-        #calculate the bevel width, for this object size and scale
-        width = self.width*pow(10,self.exponent)
-        if not self.use_scale : width /= max(context.object.scale)
-        #call the main function:
-        bevel(context.object,width, self.use_vertices)
-        #save the last used parameters:
-        context.scene[self.LAST_VERT_NAME] = self.use_vertices
-        context.scene[self.LAST_WIDTH_NAME] = self.width
-        context.scene[self.LAST_EXP_NAME] = self.exponent
-        context.object[self.LAST_SCALE_NAME] = self.use_scale
-        return {'FINISHED'}
-
-def menu_draw(self, context):
-    self.layout.operator_context = 'INVOKE_REGION_WIN'
-    self.layout.operator(Bevel.bl_idname, "Bevel_Witold")
-    
-#--- ### Register
-def register():
-    register_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_specials.prepend(menu_draw)
-    
-def unregister():
-    bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_draw)
-    unregister_module(__name__)
-    
-#--- ### Main code    
-if __name__ == '__main__':
-    register()
-    
-if DEBUG > 0: print("mesh_bevel.py loaded!")
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_bump.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_bump.py
deleted file mode 100644
index 05402ec..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_bump.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# mesh_bump.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-	"name": "Bump",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Specials > Bump",
-	"description": "Extrude and translate/rotate/scale multiple times",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-	
-"""
-Usage:
-
-Launch from "W-menu"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-
-import bpy
-from bpy.props import EnumProperty, FloatVectorProperty, FloatProperty, BoolProperty
-from . import mesh_extras
-
-# Bump stuff!
-class Bump():
-
-	# Initialise the class
-	def __init__(self, context, type, scale, steps):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		translate = mesh_extras.get_average_outer_edge_length()
-		#inset = mesh_extras.get_shortest_outer_edge_length() * 0.25
-		
-		translate *= scale
-		
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-		stepped = 0
-	
-		# Simple... we just do a bunch of steps... set in stone... easy!
-		if type == 'BUM':
-		
-			self.extrude()
-			
-			bpy.ops.object.mode_set(mode='OBJECT')
-			bpy.ops.object.mode_set(mode='EDIT')
-			
-			self.shrink(-translate)
-			self.shrink(translate*0.3)
-			
-			stepped += 1
-		
-		# Spike!
-		elif type == 'SPI':
-		
-			for i in range(3):
-		
-				self.extrude()
-				
-				bpy.ops.object.mode_set(mode='OBJECT')
-				bpy.ops.object.mode_set(mode='EDIT')
-				
-				if not i:
-					f = 0.5
-				elif i == 1:
-					f = 0.3
-				elif i == 2:
-					f = 0.2
-				
-				t = translate * f
-				
-				self.shrink(-t)
-				self.shrink(t * (2 * f))
-				
-				stepped += 1
-				
-		# Dimple!
-		elif type == 'DIM' or type == 'PIM':
-		
-			self.extrude()
-			bpy.ops.object.mode_set(mode='OBJECT')
-			bpy.ops.object.mode_set(mode='EDIT')
-			
-			self.shrink(-translate * 0.2)
-			
-			self.extrude()
-			bpy.ops.object.mode_set(mode='OBJECT')
-			bpy.ops.object.mode_set(mode='EDIT')
-			
-			self.shrink(translate * 0.2)
-			self.shrink(-translate * 0.2)
-			
-			if type == 'PIM':
-				self.extrude()
-				bpy.ops.object.mode_set(mode='OBJECT')
-				bpy.ops.object.mode_set(mode='EDIT')
-			
-				self.shrink(-translate * 0.2)
-				stepped = 3
-			else:
-				stepped = 2
-			
-			
-			
-
-		if steps:
-			self.ob['growsteps'] = stepped
-		
-	
-		
-	# Extrude the selection (do not move it)
-	def extrude(self):
-		bpy.ops.mesh.extrude_faces_move()
-		
-	# SHrink!
-	def shrink(self,v):
-		bpy.ops.transform.shrink_fatten(value=v, mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), release_confirm=False)
-		
-	
-
-class Bump_init(bpy.types.Operator):
-	'''Bump by extruding and moving/rotating/scaling multiple times'''
-	bl_idname = 'mesh.bump'
-	bl_label = 'Inset Extrude Bump'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	# The falloffs we use
-	types=(
-		('BUM', 'Bump',''),
-		('SPI', 'Spike',''),
-		('DIM', 'Dimple',''),
-		('PIM', 'Pimple',''),
-		)
-	
-	type = EnumProperty(items=types, name='Type', description='The type of bump', default='BUM')
-	
-	# Scale
-	scale = FloatProperty(name='Scale factor', description='Translation in Blender units', default=1.0, min=0.01, max=1000.0, soft_min=0.01, soft_max=1000.0, step=10, precision=2)
-	
-	steps = BoolProperty(name='Retain steps', description='Keep the step count in a property', default=False)
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH' and bpy.context.tool_settings.mesh_select_mode[0] == False and bpy.context.tool_settings.mesh_select_mode[1] == False and bpy.context.tool_settings.mesh_select_mode[2] == True)
-
-	def execute(self, context):
-		BUMP = Bump(context, self.type, self.scale, self.steps) 
-		return {'FINISHED'}
-
-class bump_help(bpy.types.Operator):
-	bl_idname = 'help.bump'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Make a selection or selection of Faces ')
-		layout.label('Choose from the bump types in the menu')
-		layout.label('To Help:')
-		layout.label('Keep extrusions small to prevent overlapping')
-		layout.label('Do not select all faces')
-		layout.label('if using with create armature, enter object mode first')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 350)		
-'''
-def menu_func(self, context):
-	self.layout.operator(Bump_init.bl_idname, text="Bump")
-
-def register():
-	bpy.utils.register_module(__name__)
-	bpy.types.VIEW3D_MT_edit_mesh_specials.append(menu_func)
-
-def unregister():
-	bpy.utils.unregister_module(__name__)
-	bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
-
-if __name__ == "__main__":
-	register()
-'''
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_extras.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_extras.py
deleted file mode 100644
index 49ddd44..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_extras.py
+++ /dev/null
@@ -1,274 +0,0 @@
-import bpy, mathutils, math
-from mathutils import geometry
-
-# Get a matrix for the selected faces that you can use to do local transforms
-def get_selection_matrix(faces=False):
-	
-	me = bpy.context.active_object.data
-	
-	if not faces:
-		faces = get_selected_faces()
-	
-	yVec = mathutils.Vector()
-	zVec = mathutils.Vector()
-	
-	# Ok so we have a basic matrix, but lets base it more on the mesh!
-	for f in faces:
-			
-		v1 = me.vertices[f.vertices[0]].co
-		v2 = me.vertices[f.vertices[1]].co
-		edge = v2-v1
-		
-		yVec += edge
-		
-		if len(f.vertices) == 4:
-			v1 = me.vertices[f.vertices[2]].co
-			v2 = me.vertices[f.vertices[3]].co
-			edge = v1-v2
-			
-			yVec += edge
-		
-		zVec += mathutils.Vector(f.normal)
-					
-	if not yVec.length:
-		quat = zVec.to_track_quat('-Z', 'Y')
-		tMat = quat.to_matrix()
-		yVec = tMat[1]
-		yVec = yVec.normalized()
-	else:
-		yVec = yVec.normalized()
-	zVec = zVec.normalized()
-	
-	# Rotate yVec so it's 90 degrees to zVec
-	cross =yVec.cross(zVec)
-	vec = float(yVec.angle(zVec) - math.radians(90))
-	mat = mathutils.Matrix.Rotation(vec, 3, cross)
-	yVec =  (mat * yVec)
-	
-	xVec = yVec.cross(zVec)
-	
-	xVec = xVec.normalized()
-	
-	nMat = mathutils.Matrix((xVec, yVec, zVec))
-	
-	return nMat
-
-
-
-# Get the selection radius (minimum distance of an outer edge to the centre)
-def get_selection_radius():
-
-	ob = bpy.context.active_object
-
-	radius = 0.0
-	
-	# no use continueing if nothing is selected
-	if contains_selected_item(ob.data.polygons):
-	
-		# Find the center of the selection
-		cent = mathutils.Vector()
-		nr = 0
-		nonVerts = []
-		selVerts = []
-		for f in ob.data.polygons:
-			if f.select:
-				nr += 1
-				cent += f.center
-			else:
-				nonVerts.extend(f.vertices)
-				
-		cent /= nr
-		
-		chk = 0
-		
-		# Now that we know the center.. we can figure out how close the nearest point on an outer edge is
-		for e in get_selected_edges():
-		
-			nonSection = [v for v in e.vertices if v in nonVerts]
-			if len(nonSection):
-			
-				v0 = ob.data.vertices[e.vertices[0]].co
-				v1 = ob.data.vertices[e.vertices[1]].co
-				
-				# If there's more than 1 vert of this edge on the outside... we need the edge length to be long enough too!
-				if len(nonSection) > 1:
-					edge = v0 - v1
-					edgeRad = edge.length * 0.5
-					
-					if edgeRad < radius or not chk:
-						radius = edgeRad
-						chk += 1
-				
-				int = geometry.intersect_point_line(cent, v0, v1)
-				
-				rad = cent - int[0]
-				l = rad.length
-				
-				if l < radius or not chk:
-					radius = l
-					chk += 1
-					
-	return radius
-	
-	
-	
-# Get the average length of the outer edges of the current selection
-def get_shortest_outer_edge_length():
-
-	ob = bpy.context.active_object
-
-	min = False
-	me = ob.data
-	
-	delVerts = []
-	for f in me.faces:
-		if not f.select:
-			delVerts.extend(f.vertices)
-	selEdges = [e.vertices for e in me.edges if e.select]
-
-	if len(selEdges) and len(delVerts):
-		
-		for eVerts in selEdges:
-			
-			v0 = eVerts[0]
-			v1 = eVerts[1]
-			
-			if v0 in delVerts and v1 in delVerts:
-				ln = (me.vertices[v0].co - me.vertices[v1].co).length
-				if min is False or (ln > 0.0 and ln < min):
-					min = ln
-						
-	return min
-
-
-# Get the average length of the outer edges of the current selection
-def get_average_outer_edge_length():
-
-	ob = bpy.context.active_object
-
-	ave = 0.0
-	me = ob.data
-	
-	delFaces = [f.vertices for f  in me.polygons if not f.select]
-	selEdges = [e.vertices for e in me.edges if e.select]
-
-	if len(selEdges) and len(delFaces):
-	
-		number = 0
-		
-		for eVerts in selEdges:
-			
-			v0 = eVerts[0]
-			v1 = eVerts[1]
-			
-			for fVerts in delFaces:
-				if v0 in fVerts and v1 in fVerts:
-					number += 1
-					ave += (me.vertices[v0].co - me.vertices[v1].co).length
-					break
-						
-		if number:
-			ave /= number
-			
-	return ave
-
-
-	
-# Get the selected (or deselected items)
-def get_selected(type='vertices',invert=False):
-	
-	mesh = bpy.context.active_object.data
-	
-	if type == 'vertices':
-		items = mesh.vertices
-	elif type == 'edges':
-		items = mesh.edges
-	else:
-		items = mesh.polygons
-		
-	if invert:
-		L = [i for i in items if not i.select]
-	else:
-		L = [i for i in items if i.select]
-	return L
-	
-	
-	
-# See if the mesh has something selected
-def has_selected(type='vertices',invert=False):
-	
-	mesh = bpy.context.active_object.data
-	
-	if type == 'vertices':
-		items = mesh.vertices
-	elif type == 'edges':
-		items = mesh.edges
-	else:
-		items = mesh.polygons
-		
-	for i in items:
-		if not invert and i.select:
-			return True
-		elif invert and not i.select:
-			return True
-			
-	return False
-		
-		
-
-# Get all the selected vertices (mode is selected or deselected)
-def get_selected_vertices(mode='selected'):
-
-	vertices = bpy.context.active_object.data.vertices
-
-	if mode == 'deselected':
-		L = [v for v in vertices if not v.select]
-	else:
-		L = [v for v in vertices if v.select]
-	return L
-	
-	
-	
-# Get all the selected edges (mode is selected or deselected)
-def get_selected_edges(mode='selected'):
-
-	edges = bpy.context.active_object.data.edges
-
-	if mode == 'deselected':
-		L = [e for e in edges if not e.select]
-	else:
-		L = [e for e in edges if e.select]
-	return L
-
-
-	
-# Get all the selected faces (mode is selected or deselected)
-def get_selected_faces(mode='selected'):
-	
-	polygons = bpy.context.active_object.data.polygons
-	
-	if mode == 'deselected':
-		L = [f for f in polygons if not f.select]
-	else:
-		L = [f for f in polygons if f.select]
-	return L
-	
-	
-	
-# See if there is at least one selected item in 'items'
-def contains_selected_item(items):
-
-	for item in items:
-		if item.select:
-			return True
-				
-	return False
-	
-
-
-
-
-
-	
-	
-		
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_filletplus.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_filletplus.py
deleted file mode 100644
index b277471..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_filletplus.py
+++ /dev/null
@@ -1,382 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-# ------ ------
-bl_info = {
-	'name': 'FilletPlus',
-	'author': 'Gert De Roost - original by zmj100',
-	'version': (0, 4, 2),
-	'blender': (2, 6, 1),
-	'api': 43085,
-	'location': 'View3D > Tool Shelf',
-	'description': '',
-	'warning': '',
-	'wiki_url': '',
-	'tracker_url': '',
-	'category': 'Mesh' }
-
-# ------ ------
-import bpy
-from bpy.props import FloatProperty, IntProperty, BoolProperty
-import bmesh
-from mathutils import Matrix
-from math import cos, pi, degrees, sin, tan
-
-
-def list_clear_(l):
-	del l[:]
-	return l
-
-def get_adj_v_(list_):
-		tmp = {}
-		for i in list_:
-				try:			 tmp[i[0]].append(i[1])
-				except KeyError: tmp[i[0]] = [i[1]]
-				try:			 tmp[i[1]].append(i[0])
-				except KeyError: tmp[i[1]] = [i[0]]
-		return tmp
-
-# ------ ------
-class f_buf():
-	an = 0
-
-# ------ ------
-def f_(list_0, startv, vertlist, face, adj, n, out, flip, radius):
-
-	dict_0 = get_adj_v_(list_0)
-	list_1 = [[dict_0[i][0], i, dict_0[i][1]] for i in dict_0 if (len(dict_0[i]) == 2)][0]
-	list_3 = []
-	for elem in list_1:
-		list_3.append(bm.verts[elem])
-	list_2 = []
-
-	p_ = list_3[1]
-	p = (list_3[1].co).copy()
-	p1 = (list_3[0].co).copy()
-	p2 = (list_3[2].co).copy()
-
-	vec1 = p - p1
-	vec2 = p - p2
-
-	ang = vec1.angle(vec2, any)
-	f_buf.an = round(degrees(ang))
-
-	# -- -- -- --
-	if f_buf.an == 180 or f_buf.an == 0.0:
-		return
-
-	# -- -- -- --
-	opp = adj
-
-	if radius == False:
-		h = adj * (1 / cos(ang * 0.5))
-		adj_ = adj
-	elif radius == True:
-		h = opp / sin(ang * 0.5)
-		adj_ = opp / tan(ang * 0.5)
-
-	p3 = p - (vec1.normalized() * adj_)
-	p4 = p - (vec2.normalized() * adj_)
-	rp = p - ((p - ((p3 + p4) * 0.5)).normalized() * h)
-
-	vec3 = rp - p3
-	vec4 = rp - p4
-
-	axis = vec1.cross(vec2)
-
-	if out == False:
-		if flip == False:
-			rot_ang = vec3.angle(vec4)
-		elif flip == True:
-			rot_ang = vec1.angle(vec2)
-	elif out == True:
-		rot_ang = (2 * pi) - vec1.angle(vec2)
-
-	for j in range(n + 1):
-		new_angle = rot_ang * j / n
-		mtrx = Matrix.Rotation(new_angle, 3, axis)
-		if out == False:
-			if flip == False:
-				tmp = p4 - rp
-				tmp1 = mtrx * tmp
-				tmp2 = tmp1 + rp
-			elif flip == True:
-				p3 = p - (vec1.normalized() * opp)
-				tmp = p3 - p
-				tmp1 = mtrx * tmp
-				tmp2 = tmp1 + p
-		elif out == True:
-			p4 = p - (vec2.normalized() * opp)
-			tmp = p4 - p
-			tmp1 = mtrx * tmp
-			tmp2 = tmp1 + p
-
-		v = bm.verts.new(tmp2)
-		list_2.append(v)
-		
-	if flip == True:
-		list_3[1:2] = list_2
-	else:
-		list_2.reverse()
-		list_3[1:2] = list_2
-
-	list_clear_(list_2)
-
-	n1 = len(list_3)
-	for t in range(n1 - 1):
-		bm.edges.new([list_3[t], list_3[(t + 1) % n1]])
-
-		v = bm.verts.new(p)
-		bm.edges.new([v, p_])
-	
-	if face != None:
-		for l in face.loops:
-			if l.vert == list_3[0]:
-				startl = l
-				break
-		vertlist2 = []
-		if startl.link_loop_next.vert == startv:
-			l = startl.link_loop_prev
-			while len(vertlist) > 0:
-				vertlist2.insert(0, l.vert)
-				vertlist.pop(vertlist.index(l.vert))
-				l = l.link_loop_prev
-		else:
-			l = startl.link_loop_next
-			while len(vertlist) > 0:
-				vertlist2.insert(0, l.vert)
-				vertlist.pop(vertlist.index(l.vert))
-				l = l.link_loop_next
-		for v in list_3:
-			vertlist2.append(v)
-		bm.faces.new(vertlist2)
-		
-	bm.verts.remove(startv)
-	list_3[1].select = 1
-	list_3[-2].select = 1
-	bm.edges.get([list_3[0], list_3[1]]).select = 1
-	bm.edges.get([list_3[-1], list_3[-2]]).select = 1
-	bm.verts.index_update()
-	bm.edges.index_update()
-	bm.faces.index_update()
-	
-	me.update(calc_edges = True, calc_tessface=True)
-	
-	
-
-def do_filletplus(pair):
-	
-	global inaction
-	global flip
-	
-	
-	list_0 = [list([e.verts[0].index, e.verts[1].index]) for e in pair]
-
-	vertset = set([])
-	vertset.add(bm.verts[list_0[0][0]])
-	vertset.add(bm.verts[list_0[0][1]])
-	vertset.add(bm.verts[list_0[1][0]])
-	vertset.add(bm.verts[list_0[1][1]])
-	
-	v1, v2, v3 = vertset
-
-	if len(list_0) != 2:
-		self.report({'INFO'}, 'Two adjacent edges must be selected.')
-		return
-	else:
-		inaction = 1
-		vertlist = []
-		found = 0
-		for f in v1.link_faces:
-			if v2 in f.verts and v3 in f.verts:
-				found = 1
-		if not(found):
-			for v in [v1, v2, v3]:
-				if v.index in list_0[0] and v.index in list_0[1]:
-					startv = v
-			face = None
-		else:
-			for f in v1.link_faces:
-				if v2 in f.verts and v3 in f.verts:
-					for v in f.verts:
-						if not(v in vertset):
-							vertlist.append(v)
-						if v in vertset and v.link_loops[0].link_loop_prev.vert in vertset and v.link_loops[0].link_loop_next.vert in vertset:
-							startv = v
-					face = f
-		if out == True:
-			flip = False
-		f_(list_0, startv, vertlist, face, adj, n, out, flip, radius)
-		
-
-'''
-
-# ------ panel 0 ------
-class f_p0(bpy.types.Panel):
-	bl_space_type = 'VIEW_3D'
-	bl_region_type = 'TOOLS'
-	#bl_idname = 'f_p0_id'												  
-	bl_label = 'Fillet'
-	bl_context = 'mesh_edit'
-
-	def draw(self, context):
-		layout = self.layout
-		
-		row = layout.split(0.80)
-		row.operator('f.op0_id', text = 'Fillet plus')
-		row.operator('f.op1_id', text = '?')
-'''
-# ------ operator 0 ------
-class fillet_op0(bpy.types.Operator):
-	bl_idname = 'fillet.op0_id'
-	bl_label = 'Fillet'
-	bl_description = 'Fillet ajoining edges'
-	bl_options = {'REGISTER', 'UNDO'}
-
-	adj = FloatProperty( name = '', default = 0.1, min = 0.00001, max = 100.0, step = 1, precision = 3 )
-	n = IntProperty( name = '', default = 3, min = 1, max = 100, step = 1 )
-	out = BoolProperty( name = 'Outside', default = False )
-	flip = BoolProperty( name = 'Flip', default = False )
-	radius = BoolProperty( name = 'Radius', default = False )
-	
-	
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH' and context.mode == 'EDIT_MESH')
-	
-	def draw(self, context):
-		layout = self.layout
-
-		if f_buf.an == 180 or f_buf.an == 0.0:
-			layout.label('Info:')
-			layout.label('Angle equal to 0 or 180,')
-			layout.label('can not fillet.')
-		else:
-			layout.prop(self, 'radius')
-			if self.radius == True:
-				layout.label('Radius:')
-			elif self.radius == False:
-				layout.label('Distance:')
-			layout.prop(self, 'adj')
-			layout.label('Number of sides:')
-			layout.prop(self, 'n', slider = True)
-			if self.n > 1:
-				row = layout.row(align = False)
-				row.prop(self, 'out')
-				if self.out == False:
-					row.prop(self, 'flip')
-
-	def execute(self, context):
-
-		global inaction
-		global bm, me, adj, n, out, flip, radius
-
-		adj = self.adj
-		n = self.n
-		out = self.out
-		flip = self.flip
-		radius = self.radius
-		
-		inaction = 0
-
-		ob_act = context.active_object
-		me = ob_act.data
-		bm = bmesh.from_edit_mesh(me)
-#		e_mode = bpy.context.tool_settings.mesh_select_mode
-		
-		done = 1
-		while done:
-			tempset = set([])
-			for v in bm.verts:
-				if v.select:
-					tempset.add(v)
-			done = 0		
-			for v in tempset:
-				cnt = 0
-				edgeset = set([])
-				for e in v.link_edges:
-					if e.select:
-						edgeset.add(e)
-						cnt += 1
-				if cnt == 2:
-					do_filletplus(edgeset)
-					done = 1
-					break
-					#return {'FINISHED'}
-				if done:
-					break
-					
-		if inaction == 1:
-			bpy.ops.mesh.select_all(action="DESELECT")
-			for v in bm.verts:
-				if len(v.link_edges) == 0:
-					bm.verts.remove(v)
-			bpy.ops.object.editmode_toggle()
-			bpy.ops.object.editmode_toggle()
-			return {'FINISHED'}
-		else:
-			return {'CANCELLED'}
-
-# ------ operator 1 ------
-class filletedgehelp(bpy.types.Operator):
-	bl_idname = 'help.edge_fillet'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Select two adjacent edges and press Fillet button.')
-		layout.label('To Help:')
-		layout.label('best used on flat plane.')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 350)
-
-# ------ operator 2 ------
-class fillet_op2(bpy.types.Operator):
-	bl_idname = 'fillet.op2_id'
-	bl_label = ''
-
-	def execute(self, context):
-		bpy.ops.f.op1_id('INVOKE_DEFAULT')
-		return {'FINISHED'}
-'''
-# ------ ------
-class_list = [ f_op0, f_op1, f_op2, f_p0]
-
-# ------ register ------
-def register():
-	for c in class_list:
-		bpy.utils.register_class(c)
-
-# ------ unregister ------
-def unregister():
-	for c in class_list:
-		bpy.utils.unregister_class(c)
-
-# ------ ------
-if __name__ == "__main__":
-	register()
-'''
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_mextrude_plus.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_mextrude_plus.py
deleted file mode 100644
index 277b612..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_mextrude_plus.py
+++ /dev/null
@@ -1,385 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-################################################################################
-# Repeats extrusion + rotation + scale for one or more faces                   #
-
-################################################################################
-
-bl_info = {
-    "name": "MExtrude Plus",
-    "author": "liero",
-    "version": (1, 2, 8),
-    "blender": (2, 6, 2),
-    "location": "View3D > Tool Shelf",
-    "description": "Repeat extrusions from faces to create organic shapes",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=28570",
-    "category": "Mesh"}
-
-import  bpy, bmesh, mathutils, random
-from random import gauss
-from math import radians
-from mathutils import Euler, Vector
-from bpy.props import BoolProperty, FloatProperty, IntProperty, StringProperty
-
-def vloc(self, r):
-    random.seed(self.ran + r)
-    return self.off * (1 + random.gauss(0, self.var1 / 3))
-
-def vrot(self,r):
-    random.seed(self.ran + r)
-    return Euler((radians(self.rotx) + random.gauss(0, self.var2 / 3), \
-        radians(self.roty) + random.gauss(0, self.var2 / 3), \
-        radians(self.rotz) + random.gauss(0,self.var2 / 3)), 'XYZ')
-
-def vsca(self, r):
-    random.seed(self.ran + r)
-    return self.sca * (1 + random.gauss(0, self.var3 / 3))
-
-# centroide de una seleccion de vertices
-def centro(ver):
-    vvv = [v for v in ver if v.select]
-    if not vvv or len(vvv) == len(ver): return ('error')
-    x = sum([round(v.co[0],4) for v in vvv]) / len(vvv)
-    y = sum([round(v.co[1],4) for v in vvv]) / len(vvv)
-    z = sum([round(v.co[2],4) for v in vvv]) / len(vvv)
-    return (x,y,z)
-
-# recuperar el estado original del objeto
-def volver(obj, copia, om, msm, msv):
-    for i in copia: obj.data.vertices[i].select = True
-    bpy.context.tool_settings.mesh_select_mode = msm
-    for i in range(len(msv)):
-        obj.modifiers[i].show_viewport = msv[i]
-
-class MExtrude(bpy.types.Operator):
-    bl_idname = 'object.mextrude'
-    bl_label = 'MExtrude'
-    bl_description = 'Multi Extrude'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    off = FloatProperty(name='Offset', min=-2, soft_min=0.001, \
-        soft_max=2, max=5, default=.5, description='Translation')
-    rotx = FloatProperty(name='Rot X', min=-85, soft_min=-30, \
-        soft_max=30, max=85, default=0, description='X rotation')
-    roty = FloatProperty(name='Rot Y', min=-85, soft_min=-30, \
-        soft_max=30, max=85, default=0, description='Y rotation')
-    rotz = FloatProperty(name='Rot Z', min=-85, soft_min=-30, \
-        soft_max=30, max=85, default=-0, description='Z rotation')
-    sca = FloatProperty(name='Scale', min=0.1, soft_min=0.5, \
-        soft_max=1.2, max =2, default=1.0, description='Scaling')
-    var1 = FloatProperty(name='Offset Var', min=-5, soft_min=-1, \
-        soft_max=1, max=5, default=0, description='Offset variation')
-    var2 = FloatProperty(name='Rotation Var', min=-5, soft_min=-1, \
-        soft_max=1, max=5, default=0, description='Rotation variation')
-    var3 = FloatProperty(name='Scale Noise', min=-5, soft_min=-1, \
-        soft_max=1, max=5, default=0, description='Scaling noise')
-    num = IntProperty(name='Repeat', min=1, max=50, soft_max=100, \
-        default=5, description='Repetitions')
-    ran = IntProperty(name='Seed', min=-9999, max=9999, default=0, \
-        description='Seed to feed random values')
-
-    @classmethod
-    def poll(cls, context):
-        obj = context.object
-        return (obj and obj.type == 'MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        column = layout.column(align=True)
-        column.label(text='Transformations:')
-        column.prop(self, 'off', slider=True)
-        column.prop(self, 'rotx', slider=True)
-        column.prop(self, 'roty', slider=True)
-        column.prop(self, 'rotz', slider=True)
-        column.prop(self, 'sca', slider=True)
-        column = layout.column(align=True)
-        column.label(text='Variation settings:')
-        column.prop(self, 'var1', slider=True)
-        column.prop(self, 'var2', slider=True)
-        column.prop(self, 'var3', slider=True)
-        column.prop(self, 'ran')
-        column = layout.column(align=False)
-        column.prop(self, 'num')
-
-    def execute(self, context):
-        obj = bpy.context.object
-        data, om =  obj.data, obj.mode
-        bpy.context.tool_settings.mesh_select_mode = [False, False, True]
-
-        # bmesh operations
-        bpy.ops.object.mode_set()
-        bm = bmesh.new()
-        bm.from_mesh(obj.data)
-        sel = [f for f in bm.faces if f.select]
-
-        # faces loop
-        for i, of in enumerate(sel):
-            rot = vrot(self, i)
-            off = vloc(self, i)
-            of.normal_update()
-
-            # extrusion loop
-            for r in range(self.num):
-                nf = of.copy()
-                nf.normal_update()
-                no = nf.normal.copy()
-                ce = nf.calc_center_bounds()
-                s = vsca(self, i + r)
-
-                for v in nf.verts:
-                    v.co -= ce
-                    v.co.rotate(rot)
-                    v.co += ce + no * off
-                    v.co = v.co.lerp(ce, 1 - s)
-
-                # extrude code from TrumanBlending
-                for a, b in zip(of.loops, nf.loops):
-                    sf = bm.faces.new((a.vert, a.link_loop_next.vert, \
-                        b.link_loop_next.vert, b.vert))
-                    sf.normal_update()
-
-                bm.faces.remove(of)
-                of = nf
-
-        for v in bm.verts: v.select = False
-        for e in bm.edges: e.select = False
-        bm.to_mesh(obj.data)
-        obj.data.update()
-
-        # restore user settings
-        bpy.ops.object.mode_set(mode=om)
-
-        if not len(sel):
-            self.report({'INFO'}, 'Select one or more faces...')
-        return{'FINISHED'}
-
-class mextrude_help(bpy.types.Operator):
-	bl_idname = 'help.mextrude'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Make a selection or selection of Faces.')
-		layout.label('Extrude, rotate extrusions & more.')
-		layout.label('For rigging capabilities, see Multi Extrude Plus panel.')
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-
-class addarm_help(bpy.types.Operator):
-	bl_idname = 'help.addarm'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('With Multi extrude to rig extrusions.')
-		layout.label('Adds Empty to control rig.')
-		layout.label('Based on selected face/s & object center.')
-
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-
-class BB(bpy.types.Operator):
-    bl_idname = 'object.mesh2bones'
-    bl_label = 'Create Armature'
-    bl_description = 'Create an armature rig based on mesh selection'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    numb = IntProperty(name='Max Bones', min=1, max=1000, soft_max=100, default=5, description='Max number of bones')
-    skip = IntProperty(name='Skip Loops', min=0, max=5, default=0, description='Skip some edges to get longer bones')
-    long = FloatProperty(name='Min Length', min=0.01, max=5, default=0.15, description='Discard bones shorter than this value')
-    ika = BoolProperty(name='IK constraints', default=True, description='Add IK constraint and Empty as target')
-    rotk = BoolProperty(name='IK Rotation', default=False, description='IK constraint follows target rotation')
-    auto = BoolProperty(name='Auto weight', default=True, description='Auto weight and assign vertices')
-    env = BoolProperty(name='Envelopes', default=False, description='Use envelopes instead of weights')
-    rad = FloatProperty(name='Radius', min=0.01, max=5, default=0.25, description='Envelope deform radius')
-    nam = StringProperty(name='', default='hueso', description='Default name for bones / groups')
-
-    @classmethod
-    def poll(cls, context):
-        obj = bpy.context.object
-        return (obj and obj.type == 'MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        column = layout.column(align=True)
-        column.prop(self,'numb')
-        column.prop(self,'skip')
-        column.prop(self,'long')
-        column = layout.column(align=True)
-        column.prop(self,'auto')
-        if self.auto:
-            column.prop(self,'env')
-            if self.env: column.prop(self,'rad')
-        column.prop(self,'ika')
-        if self.ika: column.prop(self,'rotk')
-        layout.prop(self,'nam')
-
-    def execute(self, context):
-        scn = bpy.context.scene
-        obj = bpy.context.object
-        fac = obj.data.polygons
-        # guardar estado y seleccion
-        ver, om = obj.data.vertices, obj.mode
-        msm, msv = list(bpy.context.tool_settings.mesh_select_mode), []
-        for i in range(len(obj.modifiers)):
-            msv.append(obj.modifiers[i].show_viewport)
-            obj.modifiers[i].show_viewport = False
-        bpy.ops.object.mode_set(mode='OBJECT')
-        copia = [v.index for v in ver if v.select]
-        sel = [f.index for f in fac if f.select]
-        bpy.ops.object.mode_set(mode='EDIT')
-        bpy.context.tool_settings.mesh_select_mode = [True, False, False]
-        bpy.ops.mesh.select_all(action='DESELECT')
-        txt = 'Select a face or a vertex where the chain should end...'
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-        # crear rig unico -desde vertice/s y no desde caras-
-        if sel == []:
-            sel = ['simple']
-            for i in copia:
-                obj.data.vertices[i].select = True
-
-        # reciclar el rig en cada refresco...
-        try: scn.objects.unlink(rig)
-        except: pass
-
-        # loop de caras
-        for i in sel:
-            if sel[0] != 'simple':
-                for v in ver: v.select = False
-                for v in fac[i].vertices: ver[v].select = True
-            lista = [centro(ver)]
-            if lista[0] == 'error':
-                self.report({'INFO'}, txt)
-                volver(obj, copia, om, msm, msv)
-                return{'FINISHED'}
-
-            # crear lista de coordenadas para los huesos
-            scn.objects.active = obj
-            for t in range(self.numb):
-                bpy.ops.object.mode_set(mode='EDIT')
-                bpy.ops.object.vertex_group_assign(new=True)
-                for m in range(self.skip+1):
-                    bpy.ops.mesh.select_more()
-                bpy.ops.object.vertex_group_deselect()
-                bpy.ops.object.mode_set(mode='OBJECT')
-                lista.append(centro(ver))
-                bpy.ops.object.mode_set(mode='EDIT')
-                bpy.ops.object.vertex_group_select()
-                bpy.ops.object.vertex_group_remove()
-                if lista[-1] == 'error':
-                    self.numb = t
-                    lista.pop()
-                    break
-                if len(lista) > 1:
-                    delta = Vector(lista[-2]) - Vector(lista[-1])
-                    if delta.length < self.long:
-                        lista.pop()
-
-            bpy.ops.mesh.select_all(action='DESELECT')
-            bpy.ops.object.mode_set(mode='OBJECT')
-
-            # crear armature y copiar transformaciones del objeto
-            lista.reverse()
-            if len(lista) < 2:
-                self.report({'INFO'}, txt)
-                volver(obj, copia, om, msm, msv)
-                return{'FINISHED'}
-            try: arm
-            except:
-                arm = bpy.data.armatures.new('arm')
-                if self.env: arm.draw_type = 'ENVELOPE'
-                else: arm.draw_type = 'STICK'
-                rig = bpy.data.objects.new(obj.name+'_rig', arm)
-                rig.matrix_world = obj.matrix_world
-                if self.env: rig.draw_type = 'WIRE'
-                rig.show_x_ray = True
-                scn.objects.link(rig)
-            scn.objects.active = rig
-            bpy.ops.object.mode_set(mode='EDIT')
-
-            # crear la cadena de huesos desde la lista
-            for i in range(len(lista)-1):
-                bon = arm.edit_bones.new(self.nam+'.000')
-                bon.use_connect = True
-                bon.tail = lista[i+1]
-                bon.head = lista[i]
-                if self.auto and self.env:
-                    bon.tail_radius = self.rad
-                    bon.head_radius = self.rad
-                if i: bon.parent = padre
-                padre = bon
-            bpy.ops.object.mode_set(mode='OBJECT')
-
-            # crear IK constraint y un Empty como target
-            if self.ika:
-                ik = rig.data.bones[-1].name
-                loc = rig.matrix_world * Vector(lista[-1])
-                rot = rig.matrix_world * rig.data.bones[-1].matrix_local
-                bpy.ops.object.add(type='EMPTY', location=loc, rotation=rot.to_euler())
-                tgt = bpy.context.object
-                tgt.name = obj.name+'_target.000'
-                if len(sel) > 1:
-                    try: mega
-                    except:
-                        bpy.ops.object.add(type='EMPTY', location = obj.location)
-                        mega = bpy.context.object
-                        mega.name = obj.name+'_Controls'
-                        tgt.select = True
-                    scn.objects.active = mega
-                    bpy.ops.object.parent_set(type='OBJECT')
-
-                scn.objects.active = rig
-                bpy.ops.object.mode_set(mode='POSE')
-                con = rig.pose.bones[ik].constraints.new('IK')
-                con.target = tgt
-                if self.rotk: con.use_rotation = True
-                tgt.select = False
-                bpy.ops.object.mode_set(mode='OBJECT')
-
-        obj.select = True
-        if self.auto:
-            if self.env: bpy.ops.object.parent_set(type='ARMATURE_ENVELOPE')
-            else: bpy.ops.object.parent_set(type='ARMATURE_AUTO')
-        scn.objects.active = obj
-        volver(obj, copia, om, msm, msv)
-        return{'FINISHED'}
-'''
-def register():
-    bpy.utils.register_class(MExtrude)
-
-    bpy.utils.register_class(BB)
-
-def unregister():
-    bpy.utils.unregister_class(MExtrude)
-
-    bpy.utils.unregister_class(BB)
-
-
-if __name__ == '__main__':
-    register()
-'''
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_normal_smooth.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_normal_smooth.py
deleted file mode 100644
index 5fb16fa..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_normal_smooth.py
+++ /dev/null
@@ -1,215 +0,0 @@
-# mesh_normalsmooth_7.py Copyright (C) 2010, Dolf Veenvliet
-#
-# Relaxes selected vertices while retaining the shape as much as possible
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Normal Smooth",
-    "author": "Dolf Veenvliet",
-    "version": (7,),
-    "blender": (2, 6, 3),
-    "location": "View3D > Specials > Normal Smooth ",
-    "description": "Smooth the vertex position based on the normals",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32587",
-    "category": "Mesh"}
-    
-"""
-Usage:
-
-Launch from "W-menu" or from "Mesh -> Vertices -> Normal Smooth"
-
-Additional links:
-    Author Site: http://www.macouno.com
-    e-mail: dolf {at} macouno {dot} com
-"""
-
-import bpy, mathutils, math
-from bpy.props import IntProperty
-
-## Rotate one vector (vec1) towards another (vec2)
-## (rad = ammount of degrees to rotate in radians)
-def RotVtoV(vec1, vec2, rad):
-    cross = vec1.cross(vec2)
-    mat = mathutils.Matrix.Rotation(rad, 3, cross)
-    return (mat * vec1)
-
-
-# Find the new coordinate for this verticle
-def smoothVert(v1, v1in, me):
-    
-    v1co = v1.co
-    v1no = v1.normal
-    
-    # List of verts not to check (don't check against yourself)
-    chk = [v1in]
-    newCo = []
-    
-    # Make sure there's faces, otherwise we do nothing
-    if len(me.polygons):
-        
-        # Check every face
-        for f in me.polygons:
-            
-            # Only check faces that this vert is in
-            if v1in in f.vertices:
-                
-                # Loop through all the verts in the face
-                for v2in in f.vertices:
-                    
-                    # Make sure you check every vert only once
-                    if not v2in in chk:
-                        
-                        chk.append(v2in)
-                        
-                        v2 = me.vertices[v2in]
-                        
-                        v2co = v2.co
-                        
-                        # Get the vector from one vert to the other
-                        vTov = v2co - v1co
-                        
-                        vLen = vTov.length
-                        
-                        # Use half the distance (actually 0.514 seems to be the specific nr to multiply by... just by experience)
-                        vLen *= 0.514
-                        
-                        # Get the normal rotated 90 degrees (pi * 0.5 = 90 degrees in radians) towards the original vert
-                        vNor = RotVtoV(v2.normal, vTov.normalized(), (math.pi * 0.5))
-                        
-                        # Make the vector the correct length
-                        vNor = vNor.normalized() * vLen
-                        
-                        # Add the vector to the vert position to get the correct coord
-                        vNor = v2co + vNor
-                        
-                        newCo.append(vNor)
-                        
-    # Calculate the new coord only if there's a result
-    if len(newCo):
-        
-        nC = mathutils.Vector()
-        
-        # Add all the new coordinates together
-        for c in newCo:
-            nC = nC + c
-            
-        # Divide the resulting vector by the total to get the average
-        nC = nC / len(newCo)
-        
-    # If there's no result, just return the original coord
-    else:
-        nC = v1co
-                    
-    return nC
-                    
-
-# Base function
-def normal_smooth(context):
-
-    ob = context.active_object
-
-    bpy.ops.object.mode_set(mode='OBJECT')
-    
-    vNew = {}
-    me = ob.data
-    
-    # loop through all verts
-    for v1 in me.vertices:
-        
-        # only smooth selected verts
-        if v1.select:
-            
-            v1in = v1.index
-            
-            # Get the new coords for this vert
-            vNew[v1in] = smoothVert(v1, v1in, me)
-            
-    # Only if they're anything new, can we apply anything
-    if len(vNew):
-        
-        # Get the indexes for all verts to adapt
-        for k in vNew.keys():
-            
-            # Set the vert's new coords
-            me.vertices[k].co = vNew[k]
-            
-    bpy.ops.object.mode_set(mode='EDIT')
-
-class nsmooth_help(bpy.types.Operator):
-	bl_idname = 'help.normal_smooth'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Select A vertex or group of verts.')
-		layout.label('Smooth the vertex position based on the normals')
-
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-    
-class NormalSmooth(bpy.types.Operator):
-    """Smoothes verticle position based on vertex normals"""
-    bl_idname = 'normal.smooth'
-    bl_label = 'Normal Smooth'
-    bl_options = {'REGISTER', 'UNDO'}
-
-
-    iterations = IntProperty(name="Smoothing iterations",
-                default=1, min=0, max=100, soft_min=0, soft_max=10)
-    
-    @classmethod
-    def poll(cls, context):
-        obj = context.active_object
-        return (obj and obj.type == 'MESH')
-
-    def execute(self, context):
-        for i in range(0,self.iterations):
-            normal_smooth(context)
-        return {'FINISHED'}
-
-
-def menu_func(self, context):
-    self.layout.operator(NormalSmooth.bl_idname, text="Normal Smooth")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-    bpy.types.VIEW3D_MT_edit_mesh_specials.append(menu_func)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.append(menu_func)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    bpy.types.VIEW3D_MT_edit_mesh_specials.remove(menu_func)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_polyredux.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_polyredux.py
deleted file mode 100644
index c0d2cf8..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_polyredux.py
+++ /dev/null
@@ -1,387 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# Script copyright (C) Campbell J Barton
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-bl_info = {
-	"name": "PolyRedux",
-	"author": "Campbell J Barton - updated by Gert De Roost",
-	"version": (2, 0, 4),
-	"blender": (2, 6, 3),
-	"location": "View3D > Tools",
-	"description": "predictable mesh simplifaction maintaining face loops",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-
-if "bpy" in locals():
-    import imp
-
-import bpy
-import bmesh
-import time
-
-
-class PolyRedux(bpy.types.Operator):
-	bl_idname = "mesh.polyredux"
-	bl_label = "PolyRedux"
-	bl_description = "predictable mesh simplifaction maintaining face loops"
-	bl_options = {"REGISTER", "UNDO"}
-	
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH')
-
-	def invoke(self, context, event):
-		
-		scn = bpy.context.scene
-		
-		self.save_global_undo = bpy.context.user_preferences.edit.use_global_undo
-		bpy.context.user_preferences.edit.use_global_undo = False
-		
-		do_polyredux(self)
-		
-		return {'FINISHED'}
-
-class redux_help(bpy.types.Operator):
-	bl_idname = 'help.polyredux'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Make a selection of verts or polygons to reduce.')
-		layout.label('works on whole mesh or selected')
-		layout.label('To Help:')
-		layout.label('Single operation, no parameters.')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-'''
-def panel_func(self, context):
-	
-	scn = bpy.context.scene
-	self.layout.label(text="PolyRedux:")
-	self.layout.operator("mesh.polyredux", text="Poly Redux")
-
-
-def register():
-	bpy.utils.register_module(__name__)
-	bpy.types.VIEW3D_PT_tools_meshedit.append(panel_func)
-
-
-def unregister():
-	bpy.utils.unregister_module(__name__)
-	bpy.types.VIEW3D_PT_tools_meshedit.remove(panel_func)
-
-
-if __name__ == "__main__":
-	register()
-
-
-'''
-
-def my_mesh_util():
-	bm_verts = bm.verts
-	
-	vert_faces = [ [] for v in bm_verts]
-	vert_faces_corner = [ [] for v in bm_verts]
-	
-	
-	# Ignore topology where there are not 2 faces connected to an edge.
-	edge_count = {}
-	for f in bm.faces:
-		for edge in f.edges:
-			edkey = (edge.verts[0].index, edge.verts[1].index)
-			try:
-				edge_count[edkey] += 1
-			except:
-				edge_count[edkey]  = 1
-				
-	for edkey, count in edge_count.items():
-		
-		# Ignore verts that connect to edges with more than 2 faces.
-		if count != 2:
-			vert_faces[edkey[0]] = None
-			vert_faces[edkey[1]] = None
-	# Done
-	
-	
-	
-	def faces_set_verts(face_ls):
-		unique_verts = set()
-		for f in face_ls:
-			for v in f.verts:
-				unique_verts.add(v.index)
-		return unique_verts
-	
-	for f in bm.faces:
-		for corner, v in enumerate(f.verts):
-			i = v.index
-			if vert_faces[i] != None:
-				vert_faces[i].append(f)
-				vert_faces_corner[i].append(corner)
-	
-	grid_data_ls = []
-	
-	for vi, face_ls in enumerate(vert_faces):
-		if face_ls != None:
-			if len(face_ls) == 4:
-				if face_ls[0].select and face_ls[1].select and face_ls[2].select and face_ls[3].select:					
-					# Support triangles also
-					unique_vert_count = len(faces_set_verts(face_ls))
-					quads = 0
-					for f in face_ls:
-						if len(f.verts) ==4:
-							quads += 1
-					if unique_vert_count==5+quads: # yay we have a grid
-						grid_data_ls.append( (vi, face_ls) )
-			
-			elif len(face_ls) == 3:
-				if face_ls[0].select and face_ls[1].select and face_ls[2].select:
-					unique_vert_count = len(faces_set_verts(face_ls))
-					if unique_vert_count==4: # yay we have 3 triangles to make into a bigger triangle
-						grid_data_ls.append( (vi, face_ls) )
-				
-	
-	
-	# Now sort out which grid faces to use
-	
-	
-	# This list will be used for items we can convert, vertex is key, faces are values
-	grid_data_dict = {}
-	
-	if not grid_data_ls:
-		print ("doing nothing")
-		return
-	
-	# quick lookup for the opposing corner of a qiad
-	quad_diag_mapping = 2,3,0,1
-	
-	verts_used = [0] * len(bm_verts) # 0 == untouched, 1==should touch, 2==touched
-	verts_used[grid_data_ls[0][0]] = 1 # start touching 1!
-	
-	# From the corner vert, get the 2 edges that are not the corner or its opposing vert, this edge will make a new face
-	quad_edge_mapping = (1,3), (2,0), (1,3), (0,2) # hi-low, low-hi order is intended
-	tri_edge_mapping = (1,2), (0,2), (0,1)
-	
-	done_somthing = True
-	while done_somthing:
-		done_somthing = False
-		grid_data_ls_index = -1
-		
-		for vi, face_ls in grid_data_ls:
-			grid_data_ls_index += 1
-			if len(face_ls) == 3:
-				grid_data_dict[bm.verts[vi]] = face_ls
-				grid_data_ls.pop( grid_data_ls_index )
-				break
-			elif len(face_ls) == 4:
-				# print vi
-				if verts_used[vi] == 1:
-					verts_used[vi] = 2 # dont look at this again.
-					done_somthing = True
-					
-					grid_data_dict[bm.verts[vi]] = face_ls
-					
-					# Tag all faces verts as used
-					
-					for i, f in enumerate(face_ls):
-						# i == face index on vert, needed to recall which corner were on.
-						v_corner = vert_faces_corner[vi][i]
-						fv =f.verts
-						
-						if len(f.verts) == 4:
-							v_other = quad_diag_mapping[v_corner]
-							# get the 2 other corners
-							corner1, corner2 = quad_edge_mapping[v_corner]
-							if verts_used[fv[v_other].index] == 0:
-								verts_used[fv[v_other].index] = 1 # TAG for touching!
-						else:
-							corner1, corner2 = tri_edge_mapping[v_corner]
-						
-						verts_used[fv[corner1].index] = 2 # Dont use these, they are 
-						verts_used[fv[corner2].index] = 2
-						
-						
-					# remove this since we have used it.
-					grid_data_ls.pop( grid_data_ls_index )
-					
-					break
-		
-		if done_somthing == False:
-			# See if there are any that have not even been tagged, (probably on a different island), then tag them.
-			
-			for vi, face_ls in grid_data_ls:
-				if verts_used[vi] == 0:
-					verts_used[vi] = 1
-					done_somthing = True
-					break
-	
-	
-	# Now we have all the areas we will fill, calculate corner triangles we need to fill in.
-	new_faces = []
-	quad_del_vt_map = (1,2,3), (0,2,3), (0,1,3), (0,1,2)
-	for v, face_ls in grid_data_dict.items():
-		for i, f in enumerate(face_ls):
-			if len(f.verts) == 4:
-				# i == face index on vert, needed to recall which corner were on.
-				v_corner = vert_faces_corner[v.index][i]
-				v_other = quad_diag_mapping[v_corner]
-				fv =f.verts
-				
-				#print verts_used[fv[v_other].index]
-				#if verts_used[fv[v_other].index] != 2: # DOSNT WORK ALWAYS
-				
-				if 1: # THIS IS LAzY - some of these faces will be removed after adding.
-					# Ok we are removing half of this face, add the other half
-					
-					# This is probably slower
-					# new_faces.append( [fv[ii].index for ii in (0,1,2,3) if ii != v_corner ] )
-					
-					# do this instead
-					new_faces.append( (fv[quad_del_vt_map[v_corner][0]].index, fv[quad_del_vt_map[v_corner][1]].index, fv[quad_del_vt_map[v_corner][2]].index) )
-	
-	del grid_data_ls
-	
-	
-	# me.sel = 0
-	def faceCombine4(vi, face_ls):
-		edges = []
-		
-		for i, f in enumerate(face_ls):
-			fv = f.verts
-			v_corner = vert_faces_corner[vi][i]
-			if len(f.verts)==4:	ed = quad_edge_mapping[v_corner]
-			else:			ed = tri_edge_mapping[v_corner]
-			
-			edges.append( [fv[ed[0]].index, fv[ed[1]].index] )
-		
-		# get the face from the edges 
-		face = edges.pop()
-		while len(face) != 4:
-			# print len(edges), edges, face
-			for ed_idx, ed in enumerate(edges):
-				if face[-1] == ed[0] and (ed[1] != face[0]):
-					face.append(ed[1])
-				elif face[-1] == ed[1] and (ed[0] != face[0]):
-					face.append(ed[0])
-				else:
-					continue
-				
-				edges.pop(ed_idx) # we used the edge alredy
-				break
-		
-		return face	
-	
-	for v, face_ls in grid_data_dict.items():
-		vi = v.index
-		if len(face_ls) == 4:
-			new_faces.append( faceCombine4(vi, face_ls) )
-			#pass
-		if len(face_ls) == 3: # 3 triangles
-			face = list(faces_set_verts(face_ls))
-			face.remove(vi)
-			new_faces.append( face )
-			
-	
-	# Now remove verts surounded by 3 triangles
-	
-
-		
-	# print new_edges
-	# me.faces.extend(new_faces, ignoreDups=True)
-	
-	'''
-	faces_remove = []
-	for vi, face_ls in grid_data_dict.items():
-		faces_remove.extend(face_ls)
-	'''
-	
-	orig_facelen = len(bm.faces)
-	
-	orig_faces = list(bm.faces)
-	made_faces = []
-	bpy.ops.mesh.select_all(action="DESELECT")
-	for vertidxs in new_faces:
-		verts = []
-		for idx in vertidxs:
-			verts.append(bm.verts[idx])
-		verts.append(verts[0])
-		for idx in range(len(verts) - 1):
-			verts.append(verts[0])
-			v1 = verts[idx]
-			v2 = verts[idx + 1]
-			if bm.edges.get((v1, v2)) == None:
-				for f in v1.link_faces:
-					if f in v2.link_faces:
-						bmesh.utils.face_split(f, v1, v2)
-						break
-
-	for vert in grid_data_dict.keys():
-		bmesh.utils.face_join(vert.link_faces[:])
-	
-	# me.faces.delete(1, faces_remove)
-	
-	bm.normal_update()
-
-def do_polyredux(self):
-	
-	global bm, me
-	
-	# Gets the current scene, there can be many scenes in 1 blend file.
-	sce = bpy.context.scene
-	
-	# Get the active object, there can only ever be 1
-	# and the active object is always the editmode object.
-	mode = "EDIT"
-	if bpy.context.mode == "OBJECT":
-		mode = "OBJECT"
-		bpy.ops.object.editmode_toggle()
-	ob_act = bpy.context.active_object
-	if not ob_act or ob_act.type != 'MESH':
-		return 
-	me = ob_act.data
-	bm = bmesh.from_edit_mesh(me)
-	
-	t = time.time()
-	
-	# Run the mesh editing function
-	my_mesh_util()
-	me.update(calc_edges=True, calc_tessface=True)
-	bm.free()
-	
-	# Restore editmode if it was enabled
-	if mode == "OBJECT":
-		bpy.ops.object.editmode_toggle()
-	else:
-		bpy.ops.object.editmode_toggle()
-		bpy.ops.object.editmode_toggle()
-	
-	# Timing the script is a good way to be aware on any speed hits when scripting
-	print ('My Script finished in %.2f seconds' % (time.time()-t))
-	
-	
-
diff --git a/release/scripts/addons_contrib/mesh_extra_tools/mesh_vertex_chamfer.py b/release/scripts/addons_contrib/mesh_extra_tools/mesh_vertex_chamfer.py
deleted file mode 100644
index ac853d4..0000000
--- a/release/scripts/addons_contrib/mesh_extra_tools/mesh_vertex_chamfer.py
+++ /dev/null
@@ -1,154 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Vertex Chamfer",
-    "author": "Andrew Hale (TrumanBlending)",
-    "version": (0, 1),
-    "blender": (2, 6, 3),
-    "location": "Spacebar Menu",
-    "description": "Chamfer vertex",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Mesh"}
-
-
-import bpy
-import bmesh
-
-
-class VertexChamfer(bpy.types.Operator):
-    bl_idname = "mesh.vertex_chamfer"
-    bl_label = "Chamfer Vertex"
-    bl_description = "Tri chamfer selected vertices"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    factor = bpy.props.FloatProperty(name="Factor",
-                                     default=0.1,
-                                     min=0.0,
-                                     soft_max=1.0)
-    relative = bpy.props.BoolProperty(name="Relative", default=True)
-    dissolve = bpy.props.BoolProperty(name="Remove", default=True)
-    displace = bpy.props.FloatProperty(name="Displace",
-                                       soft_min=-5.0,
-                                       soft_max=5.0)
-
-    @classmethod
-    def poll(self, context):
-        return (context.active_object.type == 'MESH' and
-                context.mode == 'EDIT_MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, "factor", text="Fac" if self.relative else "Dist")
-        sub = layout.row()
-        sub.prop(self, "relative")
-        sub.prop(self, "dissolve")
-        if not self.dissolve:
-            layout.prop(self, "displace")
-
-    def execute(self, context):
-        ob = context.active_object
-        me = ob.data
-        bm = bmesh.from_edit_mesh(me)
-
-        bm.select_flush(True)
-
-        fac = self.factor
-        rel = self.relative
-        dissolve = self.dissolve
-        displace = self.displace
-
-        for v in bm.verts:
-            v.tag = False
-
-        # Loop over edges to find those with both verts selected
-        for e in bm.edges[:]:
-            e.tag = e.select
-            if not e.select:
-                continue
-            elen = e.calc_length()
-            val = fac if rel else fac / elen
-            val = min(val, 0.5)
-            # Loop over the verts of the edge to split
-            for v in e.verts:
-                #if val == 0.5 and e.other_vert(v).tag:
-                #    continue
-                en, vn = bmesh.utils.edge_split(e, v, val)
-                en.tag = vn.tag = True
-                val = 1.0 if val == 1.0 else val / (1.0 - val)
-
-        # Get all verts which are selected but not created previously
-        verts = [v for v in bm.verts if v.select and not v.tag]
-
-        # Loop over all verts to split their linked edges
-        for v in verts:
-            for e in v.link_edges[:]:
-                if e.tag:
-                    continue
-                elen = e.calc_length()
-                val = fac if rel else fac / elen
-                bmesh.utils.edge_split(e, v, val)
-
-            # Loop over all the loops of the vert
-            for l in v.link_loops:
-                # Split the face
-                bmesh.utils.face_split(l.face,
-                                       l.link_loop_next.vert,
-                                       l.link_loop_prev.vert)
-
-            # Remove the vert or displace otherwise
-            if dissolve:
-                bmesh.utils.vert_dissolve(v)
-            else:
-                v.co += displace * v.normal
-
-        me.calc_tessface()
-
-        return {'FINISHED'}
-
-class chamfer_help(bpy.types.Operator):
-	bl_idname = 'help.vertexchamfer'
-	bl_label = ''
-
-	def draw(self, context):
-		layout = self.layout
-		layout.label('To use:')
-		layout.label('Make a selection or selection of verts ')
-		layout.label('Result is triangle chamfer, works on single vert.')
-		layout.label('To Help:')
-		layout.label('In some cases may need to press F to fill result.')
-	
-	def execute(self, context):
-		return {'FINISHED'}
-
-	def invoke(self, context, event):
-		return context.window_manager.invoke_popup(self, width = 300)
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_extrude_along_curve.py b/release/scripts/addons_contrib/mesh_extrude_along_curve.py
deleted file mode 100644
index ee1321a..0000000
--- a/release/scripts/addons_contrib/mesh_extrude_along_curve.py
+++ /dev/null
@@ -1,212 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-
-bl_info = {
-    "name": "Extrude Along Curve",
-    "author": "Andrew Hale (TrumanBlending)",
-    "version": (0, 1),
-    "blender": (2, 6, 3),
-    "location": "",
-    "description": "Extrude a face along a Bezier Curve",
-    "warning": "",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts",
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-                   'func=detail&aid=32585',
-    "category": "Mesh"}
-
-
-import bpy
-import bmesh
-from mathutils import Vector, Quaternion
-from math import ceil, floor, pi
-
-
-def eval_bez_tan(mat, points, t):
-    num = len(points)
-    t *= num - 1
-    upper = ceil(t)
-    lower = floor(t)
-    if upper == lower:
-        if upper == 0:
-            return (mat * (points[upper].handle_right - points[upper].co)).normalized()
-        elif upper == num - 1:
-            return (mat * (points[upper].co - points[upper].handle_left)).normalized()
-        else:
-            return (mat * (points[upper].co - points[upper].handle_left)).normalized()
-    else:
-        t -= lower
-        pupper = points[upper]
-        plower = points[lower]
-        tangent = -3 * (1 - t) ** 2 * plower.co + (-6 * (1 - t) * t + 3 * (1 - t) ** 2) * plower.handle_right + (-3 * t ** 2 + 3 * (1 - t) * 2 * t) * pupper.handle_left + 3 * t ** 2 * pupper.co
-        tangent = mat * tangent
-        tangent.normalize()
-        return tangent
-
-
-def eval_bez(mat, points, t):
-    num = len(points)
-    t *= num - 1
-    upper = ceil(t)
-    lower = floor(t)
-    if upper == lower:
-        return mat * points[upper].co
-    else:
-        t -= lower
-        pupper = points[upper]
-        plower = points[lower]
-        pos = (1 - t) ** 3 * plower.co + 3 * (1 - t) ** 2 * t * plower.handle_right + 3 * (1 - t) * t ** 2 * pupper.handle_left + t ** 3 * pupper.co
-        return mat * pos
-
-
-def curve_ob_enum(self, context):
-    obs = context.scene.objects
-    cuobs = [(str(i), ob.name, ob.name) for i, ob in enumerate(obs) if ob.type == 'CURVE']
-    curve_ob_enum.temp = cuobs
-    return cuobs
-
-
-class ExtrudeAlongCurve(bpy.types.Operator):
-    bl_idname = "mesh.extrude_along_curve"
-    bl_label = "Extrude Along Curve"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    resolution = bpy.props.IntProperty(name="Resolution", default=1, min=1, soft_max=100)
-    scale = bpy.props.FloatProperty(name="Scale", default=1.0, soft_min=0.0, soft_max=5.0)
-    rotation = bpy.props.FloatProperty(name="Rotation", default=0.0, soft_min=-2 * pi, soft_max=2 * pi, subtype='ANGLE')
-    splineidx = bpy.props.IntProperty(name="Spline Index", default=0, min=0)
-    snapto = bpy.props.BoolProperty(name="Snap To Face", default=True)
-    curveob = bpy.props.EnumProperty(name="Curve", items=curve_ob_enum)
-
-    @classmethod
-    def poll(self, context):
-        ob = context.active_object
-        for cuob in context.scene.objects:
-            if cuob.type == 'CURVE':
-                break
-        else:
-            return False
-
-        return (ob is not None) and (ob.type == 'MESH') and (context.mode == 'EDIT_MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self, "curveob", text="", icon='CURVE_DATA')
-        layout.prop(self, "resolution")
-        layout.prop(self, "scale")
-        layout.prop(self, "rotation")
-        layout.prop(self, "splineidx")
-        layout.prop(self, "snapto")
-
-    def execute(self, context):
-        ob = bpy.context.active_object
-        me = ob.data
-        bm = bmesh.from_edit_mesh(me)
-
-        # Get the selected curve object and the required spline
-        cuob = context.scene.objects[int(self.curveob)]
-        cu = cuob.data
-
-        self.splineidx = min(self.splineidx, len(cu.splines) - 1)
-        p = cu.splines[self.splineidx].bezier_points
-
-        # Get the property values
-        res = self.resolution
-        scale = self.scale
-        rotation = self.rotation
-        dscale = (1 - scale) / res
-        drot = rotation / res
-
-        # Get the matrices to convert between spaces
-        cmat = ob.matrix_world.inverted() * cuob.matrix_world
-        ctanmat = cmat.to_3x3().inverted().transposed()
-
-        # The list of parameter values to evaluate the bezier curve at
-        tvals = [t / res for t in range(res + 1)]
-
-        # Get the first selected face, if none, cancel
-        for f in bm.faces:
-            if f.select:
-                break
-        else:
-            return {'CANCELLED'}
-
-        # Get the position vecs on the curve and tangent values
-        bezval = [eval_bez(cmat, p, t) for t in tvals]
-        beztan = [eval_bez_tan(ctanmat, p, t) for t in tvals]
-        bezquat = [0] * len(tvals)
-
-        # Using curve only
-        bezquat[0] = beztan[0].to_track_quat('Z', 'Y')
-        fquat = bezquat[0].inverted()
-
-        # Calculate the min twist orientations
-        for i in range(1, res + 1):
-            ang = beztan[i - 1].angle(beztan[i], 0.0)
-            if ang > 0.0:
-                axis = beztan[i - 1].cross(beztan[i])
-                q = Quaternion(axis, ang)
-                bezquat[i] = q * bezquat[i - 1]
-            else:
-                bezquat[i] = bezquat[i - 1].copy()
-
-        # Get the faces to be modified
-        fprev = f
-        # no = f.normal.copy()
-        faces = [f.copy() for i in range(res)]
-
-        # Offset if we need to snap to the face
-        offset = Vector() if not self.snapto else (f.calc_center_median() - bezval[0])
-
-        # For each of the faces created, set their vert positions and create side faces
-        for i, data in enumerate(zip(faces, bezval[1:], bezquat[1:])):
-
-            fn, pos, quat = data
-            cen = fn.calc_center_median()
-
-            rotquat = Quaternion((0, 0, 1), i * drot)
-
-            for v in fn.verts:
-                v.co = quat * rotquat * fquat * (v.co - cen) * (1 - (i + 1) * dscale) + pos + offset
-
-            for ll, ul in zip(fprev.loops, fn.loops):
-                ff = bm.faces.new((ll.vert, ll.link_loop_next.vert, ul.link_loop_next.vert, ul.vert))
-                ff.normal_update()
-
-            bm.faces.remove(fprev)
-            fprev = fn
-
-        me.calc_tessface()
-        me.calc_normals()
-        me.update()
-
-        return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_face_info_select.py b/release/scripts/addons_contrib/mesh_face_info_select.py
deleted file mode 100644
index eb85b0d..0000000
--- a/release/scripts/addons_contrib/mesh_face_info_select.py
+++ /dev/null
@@ -1,127 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Face info / select by type",
-    "author": "CoDEmanX",
-    "version": (0, 0, 3),
-    "blender": (2, 6, 2),
-    "location": "Properties > Object data > Face info / select",
-    "description": "Displays triangle, quad and ngon count of the active object. Allows to select faces by these types.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Mesh/Face_Info_Select",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=31926",
-    "support": 'TESTING',
-    "category": "Mesh"
-}
-
-# Written by CoDEmanX for frivus
-
-
-import bpy
-from bpy.props import EnumProperty
-
-class DATA_OP_facetype_select(bpy.types.Operator):
-    """Select all faces of a certain type"""
-    bl_idname = "data.facetype_select"
-    bl_label = "Select by face type"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    face_type = EnumProperty(name="Select faces:",
-                             items = (("3","Triangles","Faces made up of 3 vertices"),
-                                      ("4","Quads","Faces made up of 4 vertices"),
-                                      ("5","Ngons","Faces made up of 5 and more vertices")),
-                             default = "5")
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None and context.active_object.type == 'MESH'
-
-    def execute(self, context):
-
-        bpy.ops.object.mode_set(mode='EDIT')
-        bpy.ops.mesh.select_all(action='DESELECT')
-        context.tool_settings.mesh_select_mode=(False, False, True)
-
-        if self.face_type == "3":
-            bpy.ops.mesh.select_face_by_sides(number=3, type='EQUAL')
-        elif self.face_type == "4":
-            bpy.ops.mesh.select_face_by_sides(number=4, type='EQUAL')
-        else:
-            bpy.ops.mesh.select_face_by_sides(number=4, type='GREATER')
-
-        return {'FINISHED'}
-        
-
-class DATA_PT_info_panel(bpy.types.Panel):
-    """Creates a face info / select panel in the Object properties window"""
-    bl_label = "Face info / select"
-    bl_idname = "DATA_PT_face_info"
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "data"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        return context.active_object is not None and context.active_object.type == 'MESH'
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.active_object
-        
-        info_str = ""
-        tris = quads = ngons = 0
-
-        for p in ob.data.polygons:
-            count = p.loop_total
-            if count == 3:
-                tris += 1
-            elif count == 4:
-                quads += 1
-            else:
-                ngons += 1
-
-        info_str = "  Ngons: %i  Quads: %i  Tris: %i" % (ngons, quads, tris)
-        
-        col = layout.column()
-        col.label(info_str, icon='MESH_DATA')
-
-        col = layout.column()
-        col.label("Select faces by type:")
-
-        row = layout.row()
-        row.operator("data.facetype_select", text="Ngons").face_type = "5"
-        row.operator("data.facetype_select", text="Quads").face_type = "4"
-        row.operator("data.facetype_select", text="Tris").face_type = "3"
-
-
-def register():
-    bpy.utils.register_class(DATA_PT_info_panel)
-    bpy.utils.register_class(DATA_OP_facetype_select)
-
-
-def unregister():
-    bpy.utils.unregister_class(DATA_PT_info_panel)
-    bpy.utils.unregister_class(DATA_OP_facetype_select)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_fiber.py b/release/scripts/addons_contrib/mesh_fiber.py
deleted file mode 100644
index 51c0f7e..0000000
--- a/release/scripts/addons_contrib/mesh_fiber.py
+++ /dev/null
@@ -1,1339 +0,0 @@
-
-#Fiber Generator V3 - June 5th, 2012
-#Created by Alan Dennis (RipSting)
-#dennisa at onid.orst.edu
-#Updated for 2.6 by Gert De Roost (paleajed)
-#_________________________________________________
-#Special thanks to Alfredo de Greef (Eeshlo) for
-#providing the DyNoise module and the multmat
-#and renormal subroutines!!!
-#Thanks goes out to Peter De Bock for
-#fixing the vertex color problems!!!
-#_________________________________________________
-
-
-
-#--------------I N F O R M A T I O N--------------
-#
-#Go to user preferences->addons and navigate to Mesh category
-#Enable Fiber addon.  Subpanel will appear in Tools panel.
-#
-#You must have at least one mesh object selected.
-#You may select multiple mesh objects for the script
-#to run on.
-
-bl_info = {
-    "name": "Fiber",
-    "author": "Alan Dennis - Gert De Roost",
-    "version": (3, 1, 0),
-    "blender": (2, 6, 4),
-    "location": "View3D > Mesh Tools",
-    "description": "Generates mesh grass or hair",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32802",
-    "category": "Mesh"}
-
-if "bpy" in locals():
-	import imp
-
-import bpy
-import bmesh
-import os
-
-from math import pow
-import string
-from mathutils import *
-from mathutils.noise import random, hetero_terrain as HTerrain, seed_set as InitNoise
-
-
-
-seed = 1
-CurVersion = "3"
-txtFollowtext = "Follow Normals / Z-Axis"
-
-
-#Get the current .fib filename
-bpy.context.user_preferences.filepaths.use_relative_paths = 0
-a = bpy.data.filepath
-b = os.path.dirname(a)
-a = a.split(os.sep)[len(a.split(os.sep)) -1]
-fname = b + os.sep + str(a.split(".")[0]) + ".fib"
-fname = fname.replace("//", "")
-
-
-
-bpy.types.Scene.txtFile = bpy.props.StringProperty(
-		name="Set file",
-#		attr="custompath",# this a variable that will set or get from the scene
-		description="",
-		maxlen= 1024,
-		subtype='FILE_PATH',
-		default= fname)
-	
-bpy.types.Scene.txtFaces = bpy.props.StringProperty(
-		name="",
-		description="",
-		maxlen= 1024,
-		default= "")
-
-
-bpy.types.Scene.chkPointed = bpy.props.BoolProperty(
-		name = "Pointed", 
-		description = "Pointed?",
-		default = False)
-	
-bpy.types.Scene.chkVCol = bpy.props.BoolProperty(
-		name = "Use VCol", 
-		description = "Use VCol?",
-		default = False)
-	
-bpy.types.Scene.chkWind = bpy.props.BoolProperty(
-		name = "Use Wind", 
-		description = "Use Wind?",
-		default = False)
-	
-bpy.types.Scene.chkGuides = bpy.props.BoolProperty(
-		name = "Use Guides", 
-		description = "Use Guides?",
-		default = False)
-
-
-
-bpy.types.Scene.sldDensity = bpy.props.FloatProperty(
-		name = "Density", 
-		description = "Enter density",
-		default = 5,
-		min = 0,
-		max = 50)
-
-bpy.types.Scene.sldSegments = bpy.props.IntProperty(
-		name = "Segments", 
-		description = "Enter segments",
-		default = 3,
-		min = 1,
-		max = 20)
-
-bpy.types.Scene.sldLength = bpy.props.FloatProperty(
-		name = "Length of Segment", 
-		description = "Enter segment length",
-		default = 5,
-		min = 0,
-		max = 50)
-
-bpy.types.Scene.sldSegRand = bpy.props.FloatProperty(
-		name = "Randomize Length %", 
-		description = "Enter Randomize Length %",
-		default = 0,
-		min = 0,
-		max = 1.0)
-
-bpy.types.Scene.sldWidth = bpy.props.FloatProperty(
-		name = "Width", 
-		description = "Enter Width",
-		default = 3,
-		min = 0,
-		max = 20)
-
-bpy.types.Scene.sldGravity = bpy.props.FloatProperty(
-		name = "Gravity", 
-		description = "Enter Gravity",
-		default = 2,
-		min = 0,
-		max = 20)
-
-bpy.types.Scene.sldInit = bpy.props.FloatProperty(
-		name = "Initial Gravity", 
-		description = "Enter Initial Gravity",
-		default = 0,
-		min = 0,
-		max = 50)
-
-bpy.types.Scene.sldRand = bpy.props.FloatProperty(
-		name = "Randomize Direction", 
-		description = "Enter Randomize Direction",
-		default = 5,
-		min = 0,
-		max = 50)
-
-bpy.types.Scene.sldRloc = bpy.props.FloatProperty(
-		name = "Frizziness", 
-		description = "Enter Frizziness",
-		default = 0,
-		min = 0,
-		max = 50)
-
-bpy.types.Scene.sldFollow = bpy.props.FloatProperty(
-		name = "Normals / Clumpiness", 
-		description = "Enter Normals / Clumpiness",
-		default = 1,
-		min = 0,
-		max = 1)
-
-bpy.types.Scene.sldFalloff = bpy.props.FloatProperty(
-		name = "Clumpiness Falloff", 
-		description = "Enter Clumpiness Falloff",
-		default = 2,
-		min = 0,
-		max = 10)
-
-bpy.types.Scene.sldControl = bpy.props.IntProperty(
-		name = "Fiber Guides", 
-		description = "Enter Fiber Guides",
-		default = 10,
-		min = 3,
-		max = 100)
-
-bpy.types.Scene.sldCtrlSeg = bpy.props.IntProperty(
-		name = "Fiber Guide Segments", 
-		description = "Enter Fiber Guide Segments",
-		default = 4,
-		min = 3,
-		max = 4)
-
-
-class FiberPanel(bpy.types.Panel):
-	bl_label = "Fiber"
-	bl_space_type = "VIEW_3D"
-	bl_region_type = "TOOLS"
-	bl_options = {'DEFAULT_CLOSED'}
-
-	def draw(self, context):
-
-		scn = bpy.context.scene
-		layout = self.layout
-		
-		layout.label("Fiber Generator-	Version " + str(CurVersion), icon = 'PLUGIN')
-	
-		row = layout.row()
-		row.operator("fiber.savepreset", text="Save Preset")
-		row.operator("fiber.loadpreset", text="Load Preset")
-#		row.operator("fiber.exit", text="Exit")
-		layout.prop(scn, "txtFile")
-		
-		layout.prop(scn, "sldDensity")
-		layout.prop(scn, "sldSegments")
-		layout.prop(scn, "sldLength")
-		layout.prop(scn, "sldSegRand")
-		layout.prop(scn, "sldWidth")
-		layout.prop(scn, "sldGravity")
-		layout.prop(scn, "sldInit")
-		layout.prop(scn, "sldRand")
-		layout.prop(scn, "sldRloc")
-		layout.prop(scn, "sldFollow")
-		layout.prop(scn, "sldFalloff")
-		layout.prop(scn, "sldControl")
-	
-		row = layout.split(0.8)
-		row.prop(scn, "sldCtrlSeg")
-		row.operator("fiber.make", text="Make")
-		
-		row = layout.row()
-		row.prop(scn, "chkPointed")
-		row.prop(scn, "chkVCol")
-		row.prop(scn, "chkWind")
-		row.prop(scn, "chkGuides")
-	
-		row = layout.row()
-		row.operator("fiber.estimate", text="Estimate Faces")
-		row.prop(scn, "txtFaces")
-		row.operator("fiber.create", text="Create")
-
-		updatepars()
-
-
-
-class SavePreset(bpy.types.Operator):
-	bl_idname = "fiber.savepreset"
-	bl_label = ""
-	bl_description = "Saves .fib preset"
-
-	def invoke(self, context, event):
-		
-		scn = bpy.context.scene
-		SavePreset(scn.txtFile)
-
-		return {'FINISHED'}
-
-class LoadPreset(bpy.types.Operator):
-	bl_idname = "fiber.loadpreset"
-	bl_label = ""
-	bl_description = "Loads .fib preset"
-
-	def invoke(self, context, event):
-		
-		scn = bpy.context.scene
-		LoadPreset(scn.txtFile)
-
-		return {'FINISHED'}
-
-class Exit(bpy.types.Operator):
-	bl_idname = "fiber.exit"
-	bl_label = ""
-	bl_description = "Exits Fiber"
-
-	def invoke(self, context, event):
-		
-		pass
-
-		return {'FINISHED'}
-
-class Make(bpy.types.Operator):
-	bl_idname = "fiber.make"
-	bl_label = ""
-	bl_description = "Make fiber guide segments"
-
-	def invoke(self, context, event):
-		
-		scn = bpy.context.scene
-		ControlPoints(scn.sldControl, scn.sldCtrlSeg)
-
-		return {'FINISHED'}
-
-class EstimateFaces(bpy.types.Operator):
-	bl_idname = "fiber.estimate"
-	bl_label = ""
-	bl_description = "Estimate # faces"
-
-	def invoke(self, context, event):
-		
-		global tempbm, firstrun
-		
-		scn = bpy.context.scene
-		faces = 0
-		objects = bpy.context.selected_objects
-		mat = adapt(objects[0])
-		tempbm = bmesh.new()
-		for num in range(len(objects)):
-			original = objects[num].data
-			bm = bmesh.new()
-			bm.from_mesh(original)
-			newbm = bmesh.new()
-			for fa in bm.faces:
-				faces += (int(fncArea(fa,mat) * scn.sldDensity))
-		scn.txtFaces = str(faces *2)
-		print (str(faces *2) + " faces predicted")
-
-		return {'FINISHED'}
-
-class Create(bpy.types.Operator):
-	bl_idname = "fiber.create"
-	bl_label = ""
-	bl_description = "Create faces"
-
-	def invoke(self, context, event):
-		
-		RunFiber()
-
-		return {'FINISHED'}
-
-
-
-def register():
-	bpy.utils.register_module(__name__)
-
-
-def unregister():
-	bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-	register()
-
-
-
-
-
-#	elif evt == 72: #Use Wind
-#		if chkWind.val == 1:
-#			try:
-#				Wind = Object.Get("Wind")
-#				test = Wind.LocY
-#			except:
-#				Wind = Object.New(Object.Types.EMPTY)
-#				Wind.name = "Wind"
-#
-#				Wind.LocX = 0.0
-#				Wind.LocY = 0.0
-#				Wind.LocZ = 0.0
-#				Wind.RotX = 0.0
-#				Wind.RotY = 0.0
-#				Wind.RotZ = 0.0
-
-
-def SavePreset(FName):
-
-	FName = FName.replace("//", "")
-	try:
-		f = open(FName,'w')
-	except:
-		message = "unable to save file."
-		return
-	
-	writeln(f,CurVersion)
-	
-	scn = bpy.context.scene
-	writeln(f, scn.sldDensity)
-	writeln(f, scn.sldGravity)
-	writeln(f, scn.sldSegments)
-	writeln(f, scn.sldLength)
-	writeln(f, scn.sldWidth)
-	writeln(f, scn.sldInit)
-	writeln(f, scn.sldRand)
-	writeln(f, scn.sldRloc)
-	writeln(f, scn.sldFollow)
-	writeln(f, scn.sldControl)
-	writeln(f, scn.sldCtrlSeg)
-	writeln(f, scn.sldSegRand)
-	writeln(f, scn.sldFalloff)
-		
-	if scn.chkPointed:
-		writeln(f, "1")
-	else:
-		writeln(f, "0")
-	if scn.chkVCol:
-		writeln(f, "1")
-	else:
-		writeln(f, "0")
-	if scn.chkWind:
-		writeln(f, "1")
-	else:
-		writeln(f, "0")
-	if scn.chkGuides:
-		writeln(f, "1")
-	else:
-		writeln(f, "0")
-	writeln(f,int(random()*1000))
-	writeln(f,1) #First Run
-	objects = bpy.context.selected_objects
-	for z in range(len(objects)):
-		writeln(f,objects[z].name)
-	f.close()
-
-def LoadPreset(FName):
-
-	global FVersion, seed, firstrun, objects
-
-	FName = FName.replace("//", "")
-	try:
-		f = open(FName,'r')
-	except:
-		message = "unable to open preset."
-		return
-	
-	FVersion = readfloat(f)
-	
-	scn = bpy.context.scene
-	scn.sldDensity	= readfloat(f)	
-	scn.sldGravity	= readfloat(f)
-	scn.sldSegments = readint(f)
-	scn.sldLength	= readfloat(f)
-	scn.sldWidth	= readfloat(f)
-	scn.sldInit		= readfloat(f)
-	scn.sldRand		= readfloat(f)
-	scn.sldRloc		= readfloat(f)
-	scn.sldFollow	= readfloat(f)
-	scn.sldControl	= readfloat(f)
-	scn.sldCtrlSeg	= readfloat(f)
-	scn.sldSegRand	= readfloat(f)
-	scn.sldFalloff	= readfloat(f)
-		
-	scn.chkPointed	= readint(f)
-	scn.chkVCol		= readint(f)
-	scn.chkWind		= readint(f)
-	scn.chkGuides	= readint(f)
-	seed		= readint(f)
-	firstrun	= readint(f)
-	
-	objects = []
-	#Load object list
-	while 0==0:
-		item = readstr(f)
-		if len(item) > 0:
-			objects.append(bpy.data.objects.get(item))
-		else:
-			break
-
-	f.close()
-	InitNoise(seed)
-	updatepars()
-
-
-def updatepars():
-	
-	global d, grav2, s, l2, w, n, FVersion
-	global r, rl, follow, ctrl, CtrlSeg, SegRnd, Ff
-	global pointed, UseVCol, UseWind, UseGuides, seed
-	global objects
-	global firstrun, grav2z, l2z, wz, nz, rz, rlz
-	
-	scn = bpy.context.scene
-	
-	d = scn.sldDensity
-	grav2z = scn.sldGravity
-	grav2 = grav2z / 100.0
-	s = scn.sldSegments
-	l2z = scn.sldLength
-	l2 = l2z / 100.0
-	wz = scn.sldWidth
-	w = wz / 100.0
-	nz = scn.sldInit
-	n = nz / 100.0
-	rz = scn.sldRand
-	r = rz / 10.0
-	rlz = scn.sldRloc
-	rl = rlz / 100.0
-	follow = scn.sldFollow
-	ctrl = scn.sldControl
-	CtrlSeg = scn.sldCtrlSeg
-	SegRnd = scn.sldSegRand
-	Ff = scn.sldFalloff
-	
-	pointed = scn.chkPointed
-	UseVCol = scn.chkVCol
-	UseWind = scn.chkWind
-	UseGuides = scn.chkGuides
-
-	
-
-def readint(f):
-	return int(f.readline())
-
-def readfloat(f):
-	return float(f.readline())
-
-def readstr(f):
-	s = (f.readline())
-	return s.strip()
-
-def writeln(f,x):
-  f.write(str(x))
-  f.write("\n")
-
- 
-	
-def fncArea(f, mat):
-	#_______________________________________________________
-	#Finds the area of a face with global coordinates
-	#Updated v1.4 to include matrix calculations (DUH!!!)
-	#Parameters: f=bmesh face, mat = bmesh matrix
-	#_______________________________________________________
-	if len(f.verts) > 2:
-		
-		v1 = multmat(mat, f.verts[0])
-		v2 = multmat(mat, f.verts[1])
-		v3 = multmat(mat, f.verts[2])
-
-		adist = pow(pow(v1.co[0] - v2.co[0],2)+ pow(v1.co[1] - v2.co[1],2)+ pow(v1.co[2] - v2.co[2],2),.5)
-		bdist = pow(pow(v2.co[0] - v3.co[0],2)+ pow(v2.co[1] - v3.co[1],2)+ pow(v2.co[2] - v3.co[2],2),.5)
-		cdist = pow(pow(v3.co[0] - v1.co[0],2)+ pow(v3.co[1] - v1.co[1],2)+ pow(v3.co[2] - v1.co[2],2),.5)	
-	
-		semi = (adist+bdist+cdist)/2
-		area = pow(semi*(semi-adist)*(semi-bdist)*(semi-cdist),.5)
-
-		if len(f.verts) == 4:
-			v4 = multmat(mat,f.verts[3])
-			adist = pow(pow(v1.co[0] - v3.co[0],2)+ pow(v1.co[1] - v3.co[1],2)+ pow(v1.co[2] - v3.co[2],2),.5)
-			bdist = pow(pow(v3.co[0] - v4.co[0],2)+ pow(v3.co[1] - v4.co[1],2)+ pow(v3.co[2] - v4.co[2],2),.5)	
-			cdist = pow(pow(v4.co[0] - v1.co[0],2)+ pow(v4.co[1] - v1.co[1],2)+ pow(v4.co[2] - v1.co[2],2),.5)	
-	
-			semi = (adist+bdist+cdist)/2
-			area += pow(semi*(semi-adist)*(semi-bdist)*(semi-cdist),.5)
-		return area
-	else:
-		return 0
-def fncdistance(pt1,pt2):
-	#_______________________________________________________
-	#Returns the distance between two points
-	#Parameters: pt1,pt2- 3 point tuples [x,y,z]
-	#_______________________________________________________
-	return pow(pow(pt1[0]-pt2[0],2)+pow(pt1[1]-pt2[1],2)+pow(pt1[2]-pt2[2],2),.5)
-
-def fncFindWeight(pt1,pt2,pt3):
-	#_______________________________________________________
-	#Returns the weight between two points and an origin
-	#Parameters: pt1,pt2- 3 point tuples [x,y,z]
-	#pt3 is the origin
-	#_______________________________________________________
-	dist = [fncdistance(pt3,pt1),fncdistance(pt3,pt2)]
-	return 1- (dist[1] / (dist[0] + dist[1]))
-
-def fncFindWeightedVert(pt1,pt2,weight):
-	#_______________________________________________________
-	#Returns the weighted coordinates of a vert between two points
-	#Parameters: pt1,pt2- 3 point tuples [x,y,z]
-	#weight from 0 to 1
-	#_______________________________________________________
-	movedist = [pt1[0],pt1[2]]
-	if pt1[0] - pt2[0] == 0:
-		pt1[0] += .01
-	slope = (pt1[1] - pt2[1]) / (pt1[0] - pt2[0])
-	mult = [pt2[0] - pt1[0], pt2[2] - pt1[2]]
-	return ([weight * mult[0] + movedist[0],float(slope * weight + (pt1[1]/mult[0])) * mult[0],weight * mult[1] + movedist[1]])
-
-# need to fix
-def multmat(mMatrix,vert):
-	#_______________________________________________________
-	#Finds the global coordinates of a vertex and takes into
-	#consideration parenting and mesh deformation.
-	#Parameters: mMatrix = bmesh matrix, vert = bmesh vertex
-	#_______________________________________________________
-	#Takes a vert and the parent's object matrix 
-	x= vert.co[0];	y= vert.co[1]; z= vert.co[2] 
-	x1 = (x * mMatrix[0][0]) + (y * mMatrix[1][0]) + (z * mMatrix[2][0]) + mMatrix[3][0] 
-	y1 = (x * mMatrix[0][1]) + (y * mMatrix[1][1]) + (z * mMatrix[2][1]) + mMatrix[3][1] 
-	z1 = (x * mMatrix[0][2]) + (y * mMatrix[1][2]) + (z * mMatrix[2][2]) + mMatrix[3][2] 
-
-	newV = tempbm.verts.new((x1,y1,z1))
-		
-	return newV
-
-def vecsub(a,b): 
-	#_______________________________________________________
-	#Finds a vector from two 3D points
-	#Parameters: a,b = bmesh matrix coordinate
-	#_______________________________________________________
-	return [a[0]-b[0], a[1]-b[1], a[2]-b[2]] 
-
-def renormal(p1,p2,p3):
-	#_______________________________________________________
-	#Takes three co-planar 3D points and returns the face normal
-	#Parameters: p1,p2,p3 = bmesh verts
-	#_______________________________________________________  
-	norm = [0,0,0] 
-	v1 = vecsub(p1.co, p2.co) 
-	v2 = vecsub(p1.co, p3.co) 
-	norm[0] = v1[1]*v2[2] - v1[2]*v2[1] 
-	norm[1] = v1[2]*v2[0] - v1[0]*v2[2] 
-	norm[2] = v1[0]*v2[1] - v1[1]*v2[0]
-
-	#keep normals at a distance of 1 unit
-	if not(norm[0] == 0 and norm[1] == 0 and norm[2] == 0):
-		normaldist = 1/(pow(pow(norm[0],2)+pow(norm[1],2)+pow(norm[2],2),.5))
-		for z in range(3):
-			norm[z] *= normaldist
-	
-	return norm
-
-def Bezier3(p1,p2,p3,mu):
-	#_________________________________________
-	#Three control point Bezier interpolation
-	#Parameters: p1 to p3- 3 point tuple [x,y,z]
-	#mu ranges from 0 to 1 (start to end of curve) 
-	#_________________________________________
-	p = [0,0,0]
-
-	mu2 = mu * mu
-	mum1 = 1 - mu
-	mum12 = mum1 * mum1
-	for z in range(3):	
-		p[z] = p1[z] * mum12 + 2 * p2[z] * mum1 * mu + p3[z] * mu2
-
-	return(p);
-
-def Bezier4(p1,p2,p3,p4,mu):
-	#_________________________________________
-	#Four control point Bezier interpolation
-	#Parameters: p1 to p4- 3 point tuple [x,y,z]
-	#mu ranges from 0 to 1 (start to end of curve) 
-	#_________________________________________
-	p = [0,0,0]
-	mum1 = 1 - mu
-	mum13 = mum1 * mum1 * mum1
-	mu3 = mu * mu * mu
-
-	for z in range(3):
-		p[z] = mum13*p1[z] + 3*mu*mum1*mum1*p2[z] + 3*mu*mu*mum1*p3[z] + mu3*p4[z]
-	return(p)
-
-def Bezier(p,mu):
-	#_________________________________________
-	#General Bezier curve
-	#Parameters: p array of points ( etc [[x1,y1,z1],[x2,y2,z2],...] )
-	#mu ranges from 0 to 1 (start to end of curve)
-	#IMPORTANT, the last point is not computed
-	#_________________________________________
-	b = [0,0,0]
-	n = len(p)
-	muk = 1
-	munk = pow(1-mu,n)
-
-	
-	for k in range(n):	
-		nn = n
-		kn = k
-		nkn = n - k
-		blend = muk * munk
-		muk *= mu
-		munk /= (1-mu)
-		while nn >= 1:
-			blend *= nn
-			nn -=1
-			if kn > 1:
-				blend /= float(kn)
-				kn-=1
-			if nkn > 1:
-				blend /= float(nkn)
-				nkn-=1
-		for z in range(3):	  
-			b[z] += p[k][z] * blend
-	return(b)
-
-def ControlPoints(ctrlnum, CtrlSeg):
-	#_______________________________________________________
-	#Creates 4 point bezier curves to act as guides for fibers
-	#Parameters: ctrlnum- the number of control curves to create
-	#_______________________________________________________  
-	global mat, grav, tempbm
-	grav = 0
-	objects = bpy.context.selected_objects
-	for num in range(len(objects)):
-		i = 0
-		original = objects[num].data
-
-		if ctrlnum > len(original.polygons):
-			ctnm = len(original.polygons)
-		else:
-			ctnm = ctrlnum
-			
-		mat = adapt(objects[num])
-
-		vertex = [0,0,0]
-	
-		bm = bmesh.new()
-		bm.from_mesh(original)
-		
-		newbm = bmesh.new()
-		tempbm = bmesh.new()
-		
-		for fs in range(0, len(original.polygons), int(len(original.polygons) / ctnm)):
-			f = bm.faces[fs]
-			
-			normal = renormal(multmat(mat, f.verts[0]),multmat(mat, f.verts[1]),multmat(mat, f.verts[2]))
-					
-			for z in range(3):
-				vertex[z] = normal[z]
-		
-			#centerpoint coordinates
-			vertex = [0,0,0]
-			for va in f.verts:
-				v = multmat(mat, va)
-				for z in range(3):
-					#z is the coordinate plane (x,y,or z)
-					vertex[z] += v.co[z]
-			for z in range(3):
-				vertex[z] /= len(f.verts)
-			
-			for z in range(CtrlSeg):
-				i += 1
-				v =newbm.verts.new((vertex[0] + (z * normal[0]), vertex[1] + (z * normal[1]), vertex[2] + (z * normal[2])))
-
-			for z in range(CtrlSeg-1):
-				newbm.edges.new((newbm.verts[i-1-z], newbm.verts[i-2-z]))
-	
-		GuideMesh = bpy.data.meshes.new(original.name+"_Fiber.C")
-		newbm.to_mesh(GuideMesh)
-		obj = bpy.data.objects.new(name=original.name+"_Fiber.C", object_data=GuideMesh)
-		scene = bpy.context.scene
-		scene.objects.link(obj)
-
-def adapt(selobj):
-	
-	# Rotating / panning / zooming 3D view is handled here.
-	# Transform lists of coords to draw.
-	if selobj.rotation_mode == "AXIS_ANGLE":
-		return
-		# How to find the axis WXYZ values ?
-		ang =  selobj.rotation_axis_angle
-		mat_rotX = Matrix.Rotation(ang, 4, ang)
-		mat_rotY = Matrix.Rotation(ang, 4, ang)
-		mat_rotZ = Matrix.Rotation(ang, 4, ang)
-	elif selobj.rotation_mode == "QUATERNION":
-		w, x, y, z = selobj.rotation_quaternion
-		x = -x
-		y = -y
-		z = -z
-		quat = Quaternion([w, x, y, z])
-		matrix = quat.to_matrix()
-		matrix.resize_4x4()
-	else:
-		ax, ay, az = selobj.rotation_euler
-		mat_rotX = Matrix.Rotation(-ax, 4, 'X')
-		mat_rotY = Matrix.Rotation(-ay, 4, 'Y')
-		mat_rotZ = Matrix.Rotation(-az, 4, 'Z')
-	if selobj.rotation_mode == "XYZ":
-		matrix = mat_rotX * mat_rotY * mat_rotZ
-	elif selobj.rotation_mode == "XZY":
-		matrix = mat_rotX * mat_rotZ * mat_rotY
-	elif selobj.rotation_mode == "YXZ":
-		matrix = mat_rotY * mat_rotX * mat_rotZ
-	elif selobj.rotation_mode == "YZX":
-		matrix = mat_rotY * mat_rotZ * mat_rotX
-	elif selobj.rotation_mode == "ZXY":
-		matrix = mat_rotZ * mat_rotX * mat_rotY
-	elif selobj.rotation_mode == "ZYX":
-		matrix = mat_rotZ * mat_rotY * mat_rotX
-
-	sx, sy, sz = selobj.scale
-	mat_scX = Matrix.Scale(sx, 4, Vector([1, 0, 0]))
-	mat_scY = Matrix.Scale(sy, 4, Vector([0, 1, 0]))
-	mat_scZ = Matrix.Scale(sz, 4, Vector([0, 0, 1]))
-	matrix = mat_scX * mat_scY * mat_scZ * matrix
-
-	return matrix
-
-
-
-
-
-
-def RunFiber():
-	#_______________________________________________________
-	#The main routine that is called from outside this script
-	#Parameters: none- loads settings from .fib file.
-	#_______________________________________________________  
-	global firstrun, mat, FpF, UseWind, UseGuides, tempbm
-
-	firstrun = 1
-	InitNoise(seed)
-	print ("\n")
-	print ("RipSting's Fiber Generator v3 for 2.6 by Gert De Roost, running on", str(len(bpy.context.selected_objects)), "object(s)")
-
-	
-	#____________________________________________________________
-	#Extract properties from the empty "Wind" if enabled
-	#____________________________________________________________
-	if UseWind == 1:
-		try:
-			Wind = bpy.data.objects.get("Wind")
-			Height = Wind.scale[2] / 50.0
-			SizeX = Wind.scale[0]
-			SizeY = Wind.scale[1]
-			DirX = Wind.location[0] / 100.0
-			DirY = Wind.location[1] / 100.0
-			Falloff = Wind.location[2] /100.0
-			Roughness = .5
-		except:
-			print ("Cannot find an empty named \"wind\": Not using wind engine.")
-			UseWind = 0
-
-	#____________________________________________________________
-	#Other variable declarations
-	#____________________________________________________________
-
-	vertexcount = 0
-	objnum = 0
-
-	polycenter = [0,0,0]
-	corner1 = [0,0,0]
-	corner2 = [0,0,0]
-	normal = [0,0,0]
-	direc = [0,0,0]
-	basevertex = [0,0,0]
-	vertex = [0,0,0]
-	vertexold = [0,0,0]
-	vertexno = [0,0,0]
-	randomdir = [0,0,0]
-	gravitydir = [0,0,0]
-	WindDir = [0,0,0,0] #First two are initial, second two are incremental
-	vCorner = [0,0] #Vertex color corners
-	vColor1 = [0,0,0]
-	vColor2 = [0,0,0]
-	aColor = [0,0,0]
-	vPercent = [0,0,0]
-	addVariables = [0,0,0]
-	VcolClump = 1
-	
-	tempbm = bmesh.new()
-
-	frame = bpy.context.scene.frame_current
-	redoFpF = 0
-	try:
-		test = FpF
-	except:
-		redoFpF = 1
-	#____________________________________________________________
-	#Setup Density if not already initialized
-	#____________________________________________________________
-	if firstrun == 1 or redoFpF == 1:
-		print ("Storing fiber information for animation")
-		dens = d
-		seg = s
-		FpF = []
-		newbm = bmesh.new()
-		objects = bpy.context.selected_objects
-		for num in range(len(objects)):
-			mat = adapt(objects[num])
-			original = objects[num].data
-			bm = bmesh.new()
-			bm.from_mesh(original)
-			for f in bm.faces:
-				if len(f.verts) < 3: break
-				FpF.append(int(fncArea(f, mat) * d))
-			bm.free()
-		newbm.free()
-	#____________________________________________________________
-	
-	fnum = -1
-	for num in range(len(objects)):
-		i=0 #set vertex count to zero
-		original = objects[num].data
-		origbm = bmesh.new()
-		origbm.from_mesh(original)
-		
-		mat = adapt(objects[num])
-		
-		meshname = original.name
-		if firstrun == 0:
-			me = bpy.data.meshes.get(meshname+"_Fiber."+str(objnum))
-			newbm.from_mesh(me)
-		else:
-			me = bpy.data.meshes.new(meshname+"_Fiber."+str(objnum))
-		
-
-		#____________________________________________________________
-		#Test for fiber guides
-		#____________________________________________________________
-		if UseGuides == 1:
-			try:
-				Guides = bpy.data.meshes.get(meshname +"_Fiber.C")
-				Gbm =  bmesh.new()
-				Gbm.from_mesh(Guides)
-				GuideOBJ = bpy.data.objects.get(meshname+"_Fiber.C")
-				GMat = adapt(GuideOBJ)
-				if (len(Guides.vertices)/CtrlSeg) != int(len(Guides.vertices)/CtrlSeg):
-					print ("Uneven number of control points non-divisible by" , CtrlSeg ,"\nPlease re-create fiber guides.")
-					print (len(Guides.vertices))
-					UseGuides = 0
-			except:
-				UseGuides = 0
-				
-		#____________________________________________________________
-		for f in origbm.faces:
-			
-			#Skip over faces with only 2 verts (Edges) v1.3
-			if len(f.verts) < 3: break
-			
-			fnum += 1
-		
-			p=0
-			if UseGuides == 0:
-				#____________________________________________________________
-				#find normal direction
-				#____________________________________________________________	
-
-				normal = renormal(multmat(mat, f.verts[0]),multmat(mat, f.verts[1]),multmat(mat, f.verts[2]))
-
-				#follownormals- 1 = follow, 0 = don't follow
-				normal[0] *= follow
-				normal[1] *= follow
-				normal[2] = (1 - follow) + (normal[2] * follow)
-				#____________________________________________________________
-
-			#centerpoint coordinates
-			polycenter = [0,0,0]
-			for va in f.verts:
-				v = multmat(mat, va)
-				for z in range(3):
-					#z is the coordinate plane (x,y,or z)
-					polycenter[z] += v.co[z]
-			for z in range(3):
-				polycenter[z] /= len(f.verts)
-			
-			col_lay = origbm.loops.layers.color.active
-			if UseVCol == 1 and col_lay != None:
-					# colorvalues of centerpoint
-					for z in range(len(f.loops)):
-						aColor[0] += (f.loops[z][col_lay].r) * 255
-						aColor[1] += (f.loops[z][col_lay].g) * 255
-						aColor[2] += (f.loops[z][col_lay].b) * 255
-					for z in range(3):
-						aColor[z] /= len(f.loops)
-
-			for x in range (FpF[fnum]): #loop for density in each poly
-				#no need to calculate things if density for face is 0
-				if UseVCol == 1 and col_lay != None:
-					if (f.loops[0][col_lay].b) * 255 + (f.loops[1][col_lay].b) * 255 + (f.loops[1][col_lay].b) * 255 == 0:
-						break
-
-				vertexcount += s*2 + 2
-						
-				#_____________________________________________________________
-				#Find a point on the current face for the fiber to grow out of
-				#My logic behind this:
-				#pick a random point between the center of the poly and any corner
-				#pick a random point between the center and the next corner adjacent to the original
-				#pick a random distance between those other two random points
-				#This ensures that the blade will actually be on the face
-				#____________________________________________________________
-				cornernum = int(random() * len(f.verts)) #Pick a random corner
-				vCorner[0] = cornernum
-				cornernum += 1
-				if cornernum > len(f.verts)-1:
-					cornernum = 0
-				vCorner[1] = cornernum
-				#____________________________________________________________
-				#Find random location for new fiber on the current face
-				#Much simplified randomization speeds process (v1.3)
-				#____________________________________________________________
-				percent = pow(random(),.5) #optimized V1.3: replaced 14 different random() statements!!!
-				vPercent[0] = percent
-				vPercent[1] = percent
-				
-				for z in range(3):
-					corner1[z] = (multmat(mat, f.verts[vCorner[0]]).co[z] - polycenter[z]) * percent + polycenter[z]			
-				for z in range(3):
-					corner2[z] = (multmat(mat, f.verts[vCorner[1]]).co[z] - polycenter[z]) * percent + polycenter[z]
-					
-				percent = random()
-				vPercent[2] = percent
-				for z in range(3):
-					basevertex[z] = (corner2[z] - corner1[z]) * percent + corner1[z]
-				vertex = basevertex
-				
-				#____________________________________________________________
-				#Vertex color Stuff (v1.2)
-				#____________________________________________________________
-				if UseVCol == 1 and col_lay != None:
-					vColor1[0] = (f.loops[vCorner[0]][col_lay].r) * 255
-					vColor1[1] = (f.loops[vCorner[0]][col_lay].g) * 255
-					vColor1[2] = (f.loops[vCorner[0]][col_lay].b) * 255
-					vColor2[0] = (f.loops[vCorner[1]][col_lay].r) * 255
-					vColor2[1] = (f.loops[vCorner[1]][col_lay].g) * 255
-					vColor2[2] = (f.loops[vCorner[1]][col_lay].b) * 255
-
-					for z in range(2):
-						addVariables[z] = ((aColor[z] * (1-vPercent[0])) + (vColor1[z] * vPercent[0]))/2
-						addVariables[z] = (addVariables[z] * (1-vPercent[2]) + (((aColor[z] * (1-vPercent[1])) + (vColor2[z] * vPercent[1]))/2) * vPercent[2])/2
-					addVariables[2] = (vColor1[2] + vColor2[2])/2
-				else:
-					#Use these values if no vertex colors are present
-					addVariables = [63.75,63.75,255] 
-					
-				#Green ties into the length of the fibers
-				#If Using fiber guides, Green ties into clumpiness
-				l = l2 * ((addVariables[1]) / 2)
-				VcolClump = 1 #addVariables[1] / 85.0
-				#Red ties into the gravity effect on the fibers
-				grav = grav2 * ((addVariables[0]) / 5)
-				#Blue ties into density...	x is the faces generated so far for the face... v1.3
-				FaceDensity = int(FpF[fnum] * addVariables[2]) -1
-				#print FaceDensity, x
-				if x >= FaceDensity:
-					break
-			
-				#____________________________________________________________
-				#Wind
-				#____________________________________________________________
-				if UseWind == 1:
-					WindStrength = ((HTerrain([vertex[0]/SizeX+(frame*DirX), vertex[1]/SizeY+(frame*DirY), frame*Falloff], 1, 1, Height, Roughness) -(Height/2)) * Height)*pow(l,1.5)
-				
-					#Find Y/X Slope that the wind is blowing at
-					if abs(Wind.location[0]) > abs(Wind.location[1]):
-						WindDir[0] = (Wind.location[1] / Wind.location[0]) * WindStrength
-						WindDir[1] = WindStrength
-						if Wind.location[1] < 0:		   
-							WindDir[1] = -WindDir[1]
-					else:
-						WindDir[0] = WindStrength
-						if Wind.location[1] == 0:
-							Wind.location[1] = .001
-
-						WindDir[1] = (Wind.location[0] / Wind.location[1]) * WindStrength
-							
-						if Wind.location[0] < 0:
-							WindDir[0] = -WindDir[0]
-					if Wind.location[1] < 0:
-						WindDir[0] = -WindDir[0]
-					WindDir[2] = 0
-					WindDir[3] = 0
-
-				if UseGuides == 0:
-					#____________________________________________________________
-					#Normal stuff
-					#____________________________________________________________
-					for z in range(3):
-						vertexno[z] = normal[z] + (r * (random()-.5))	
-				#____________________________________________________________
-				#Find random direction that the blade is rotated
-				#(So that it looks good from all angles, and isn't uniform)
-				#____________________________________________________________
-				rw= [random() -.5, random() -.5]
-
-				#Find Y/X Slope that the blade is facing
-				if abs(rw[0]) > abs(rw[1]):
-					direc[0] = (rw[1] / rw[0]) * w
-					direc[1] = w
-					if rw[1] < 0:
-						direc[1] = - direc[1]
-				else:
-					direc[0] = w
-					direc[1] = (rw[0] / rw[1]) * w
-					if rw[0] < 0:
-						direc[0] = -direc[0]
-				#direc[2] = rw
-				#____________________________________________________________
-				#Start the creation process!
-				#____________________________________________________________
-				i = i + 2 #increment vertex count
-				gravitydir = [0,0,n] #right now I only have gravity working on the Z axis
-					
-				#____________________________________________________________
-				#If the fiber mesh already exists, simply move the verts instead
-				#of creating new ones.	Preserves material data.
-				#____________________________________________________________
-				if firstrun == 0:
-					#Move base verts
-					for z in range(3):
-						#vertex[z] = me.vertices[i-2].co[z]
-						me.vertices[i-1].co[z] = vertex[z] + direc[z]
-						me.vertices[i-2].co[z] = vertex[z]
-				else:	
-					#Create base verts
-					me.vertices.add(2)
-					me.vertices[-1].co = (vertex[0], vertex[1], vertex[2])
-					me.vertices[-2].co = (vertex[0] + direc[0], vertex[1] + direc[1], vertex[2] + direc[2])
-				
-				if UseGuides == 0:
-					#____________________________________________________________
-					#Normal creation routine with gravity, randomdir, etc.
-					#____________________________________________________________
-					for y in range (s):
-						
-						for z in range(3):
-							randomdir[z] = (random()-.5) * rl
-							vertexold[z] = vertex[z]
-					
-						WindDir[2] += WindDir[0]
-						WindDir[3] += WindDir[1]
-						
-						gravitydir[2] += grav
-						vertex[0] += (vertexno[0]) * l - gravitydir[0] + WindDir[2] + randomdir[0]
-						vertex[1] += (vertexno[1]) * l - gravitydir[1] + WindDir[3] + randomdir[1]
-						vertex[2] += (vertexno[2]) * l - gravitydir[2] + randomdir[2]
-			
-						#____________________________________________________________
-						#Fix segment length issues with gravity
-						#____________________________________________________________	
-						distance = pow(pow(vertexold[0] - vertex[0],2)+pow(vertexold[1] - vertex[1],2)+pow(vertexold[2] - vertex[2],2),.5)
-						divide = (distance/(l +.001))
-						#for z in range(3):
-						vertex[0] =	 (vertex[0]-vertexold[0]) / divide + vertexold[0]
-						vertex[1] =	 (vertex[1]-vertexold[1]) / divide + vertexold[1]
-						vertex[2] =	 (vertex[2]-vertexold[2]) / divide + vertexold[2]
-						#____________________________________________________________					
-
-						already = 0
-						if pointed == 1 and y == s-1:
-							i += 1 #increment vertex count
-							if firstrun == 0:
-								#Move base verts
-								me.vertices[i-1].co[0] = vertex[0]+direc[0]/2
-								me.vertices[i-1].co[1] = vertex[1]+direc[1]/2
-								me.vertices[i-1].co[2] = vertex[2]+direc[2]/2
-							else:	
-								#Create base verts
-								me.vertices.add(1)
-								me.vertices[-1].co = (vertex[0]+direc[0]/2,vertex[1]+direc[1]/2,vertex[2]+direc[2]/2)
-						else:
-							i += 2 #increment vertex count
-							if firstrun == 0:
-								#Move base verts
-								me.vertices[i-2].co[0] = vertex[0]
-								me.vertices[i-2].co[1] = vertex[1]
-								me.vertices[i-2].co[2] = vertex[2]
-								me.vertices[i-1].co[0] = vertex[0]+direc[0]
-								me.vertices[i-1].co[1] = vertex[1]+direc[1]
-								me.vertices[i-1].co[2] = vertex[2]+direc[2]
-							else:	
-								#Create base verts
-								me.vertices.add(2)
-								me.vertices[-1].co = (vertex[0],vertex[1],vertex[2]+randomdir[2])
-								me.vertices[-2].co = (vertex[0]+direc[0],vertex[1]+direc[1],vertex[2]+direc[2])
-								already = 1	
-								me.tessfaces.add(1)
-								face = me.tessfaces[-1]
-								face.vertices_raw = (i-4, i-2, i-1, i-3)
-
-								
-						if firstrun == 1:
-							if not(already):
-								me.tessfaces.add(1)
-								face = me.tessfaces[-1]
-								face.vertices = (i-2, i-1, i-3)
-
-							uv_lay = me.tessface_uv_textures.active
-							if uv_lay == None:
-								uv_lay = me.tessface_uv_textures.new()
-
-							if uv_lay != None:
-								uv_lay.data[face.index].uv1 = (0,float(y)/s)
-								if pointed == 1 and y == s-1:
-									uv_lay.data[face.index].uv2 = (.5,1)
-									uv_lay.data[face.index].uv3 = (1,float(y)/s)
-								else:
-									uv_lay.data[face.index].uv2 = (0,float(y)/s + (1.0/s))
-									uv_lay.data[face.index].uv3 = (1,float(y)/s + (1.0/s))
-									uv_lay.data[face.index].uv4 = (1,float(y)/s)
-								
-				else:
-					#____________________________________________________________
-					#Use Guides instead of gravity, segment length, etc.	(check) 
-					#____________________________________________________________
-					Guide = []
-					Guide1 = []
-					Guide2 = []
-
-					
-					GuideOBJ = bpy.data.objects.get(original.name+"_Fiber.C")
-					GMat = GuideOBJ.matrix_world
-					gv = Gbm.verts
-
-					#____________________________________________________________
-					#Find Closest two fiber guides and store them in c[]	(check)
-					#____________________________________________________________
-					c = [0,CtrlSeg]
-					if fncdistance(multmat(GMat, gv[c[1]]).co, basevertex) < fncdistance(multmat(GMat,gv[c[0]]).co, basevertex):
-						#Swap
-						temp = c[1]
-						c[1] = c[0]
-						c[0] = temp
-					for y in range(CtrlSeg*2,len(gv),CtrlSeg):
-						if fncdistance(multmat(GMat,gv[y]).co,basevertex) < fncdistance(multmat(GMat,gv[c[0]]).co,basevertex):
-							c[1] = c[0] 
-							c[0] = y
-						elif fncdistance(multmat(GMat,gv[y]).co,basevertex) < fncdistance(multmat(GMat,gv[c[1]]).co,basevertex):
-							c[1] = y
-
-					#____________________________________________________________
-					#Get the coordinates of the guides' control points		(check)
-					#____________________________________________________________
-					Guide0 = []
-					for y in range(CtrlSeg):
-						Guide1.append ([multmat(GMat,gv[c[0]+y]).co[0],multmat(GMat,gv[c[0]+y]).co[1],multmat(GMat,gv[c[0]+y]).co[2]])
-						Guide2.append ([multmat(GMat,gv[c[1]+y]).co[0],multmat(GMat,gv[c[1]+y]).co[1],multmat(GMat,gv[c[1]+y]).co[2]])
-					for y in range(len(Guide1)):
-						Guide0.append([0,0,0])
-						for z in range(3):
-							Guide0[y][z] = Guide1[y][z]
-					for y in range(1,CtrlSeg):
-						for z in range(3):
-							Guide1[y][z] -= Guide1[0][z]
-							Guide2[y][z] -= Guide2[0][z]
-
-					#____________________________________________________________
-					#Determine weight of the two fiber guides ()			(check) 
-					#____________________________________________________________
-					weight = fncFindWeight(gv[c[0]].co,gv[c[1]].co,vertex)
-					#____________________________________________________________
-					#Find single, weighted, control fiber					(check)
-					#____________________________________________________________
-					Guide.append ([0,0,0])
-					for y in range(1,CtrlSeg):
-						Guide.append (fncFindWeightedVert(Guide1[y],Guide2[y],weight))
-					Flen = SegRnd * random()
-					#print Guide
-					#____________________________________________________________
-					#Create the Fiber	
-					#____________________________________________________________
-					for y in range(1,s):
-						#____________________________________________________________
-						#Impliment Wind
-						#____________________________________________________________
-						WindDir[2] += WindDir[0]
-						WindDir[3] += WindDir[1]
-						for z in range(3):
-							randomdir[z] = (random()-.5) * rl
-						#____________________________________________________________
-						#Use Bezier interpolation
-						#____________________________________________________________
-						if CtrlSeg == 3:
-							v = Bezier3(Guide[0],Guide[1],Guide[2],float(y)/s * (1-Flen))
-						elif CtrlSeg == 4:
-							v = Bezier4(Guide[0],Guide[1],Guide[2],Guide[3],float(y)/s * (1-Flen))
-						else:
-							v = Bezier(Guide,float(y)/s * (1-Flen))
-						vertex = [v[0]+basevertex[0],v[1]+basevertex[1],v[2]+basevertex[2]]
-						
-						#____________________________________________________________
-						#Clumping
-						#____________________________________________________________
-						if follow != 0:
-							for z in range(1,len(Guide1)):
-								Guide1[z] += Guide0
-							
-							weight = pow(1-((float(y)/s) * (follow * VcolClump)),Ff) #Ff = Clumpiness Falloff
-							if CtrlSeg == 3:
-								v = Bezier3(Guide0[0],Guide0[1],Guide0[2],float(y)/s * (1-Flen)) #Flen = random fiber length
-							elif CtrlSeg == 4:
-								v = Bezier4(Guide0[0],Guide0[1],Guide0[2],Guide0[3],float(y)/s * (1-Flen))
-							else:
-								v = Bezier(Guide0,float(y)/s * (1-Flen))
-	
-							vertex = fncFindWeightedVert(v, vertex, weight)
-
-						#____________________________________________________________
-						#Create Verts & Faces
-						#____________________________________________________________
-						vertex = [vertex[0]+randomdir[0]+WindDir[2],vertex[1]+randomdir[1]+WindDir[3], vertex[2] + randomdir[2]]
-						
-						already = 0
-						if y == s-1 and pointed == 1:
-							i += 1
-							if firstrun == 1:
-								me.vertices.add(1)
-								me.vertices[-1].co = (vertex[0] + direc[0]/2, vertex[1] + direc[1]/2, vertex[2] + direc[2]/2)	
-							else:
-								me.vertices[i-1].co[0] = vertex[0]+direc[0]/2
-								me.vertices[i-1].co[1] = vertex[1]+direc[1]/2
-								me.vertices[i-1].co[2] = vertex[2]+direc[2]/2
-						else:
-							i +=2
-							if firstrun == 1:
-								me.vertices.add(2)
-								me.vertices[-1].co = (vertex[0], vertex[1], vertex[2])
-								me.vertices[-2].co = (vertex[0]+direc[0], vertex[1]+direc[1], vertex[2]+direc[2])
-								already = 1
-								me.tessfaces.add(1)
-								face = me.tessfaces[-1]
-								face.vertices_raw = (i-4, i-2, i-1, i-3)
-							else:
-								#Move base verts
-								me.vertices[i-2].co[0] = vertex[0]
-								me.vertices[i-2].co[1] = vertex[1]
-								me.vertices[i-2].co[2] = vertex[2]
-								me.vertices[i-1].co[0] = vertex[0]+direc[0]
-								me.vertices[i-1].co[1] = vertex[1]+direc[1]
-								me.vertices[i-1].co[2] = vertex[2]+direc[2]
-							
-						if firstrun == 1:
-							if not(already):
-								me.tessfaces.add(1)
-								face = me.tessfaces[-1]
-								face.vertices = (i-2, i-1, i-3)
-							
-							uv_lay = me.tessface_uv_textures.active
-							if uv_lay == None:
-								uv_lay = me.tessface_uv_textures.new()
-
-							if uv_lay != None:
-								uv_lay.data[face.index].uv1 = (0,float(y)/s)
-								if pointed == 1 and y == s-1:
-									uv_lay.data[face.index].uv2 = (.5,1)
-									uv_lay.data[face.index].uv3 = (1,float(y)/s)
-								else:
-									uv_lay.data[face.index].uv2 = (0,float(y)/s + (1.0/s))
-									uv_lay.data[face.index].uv3 = (1,float(y)/s + (1.0/s))
-									uv_lay.data[face.index].uv4 = (1,float(y)/s)
-		
-		me.validate()
-		me.update(calc_edges=True, calc_tessface=True)			
-		obj = bpy.data.objects.new(name=meshname+"_Fiber."+str(objnum), object_data=me)
-		obj.location = objects[num].location
-		scene = bpy.context.scene
-		scene.objects.link(obj)
-		vertexcount = 0 
-		
-		
diff --git a/release/scripts/addons_contrib/mesh_insert_edge_ring.py b/release/scripts/addons_contrib/mesh_insert_edge_ring.py
deleted file mode 100644
index 7083910..0000000
--- a/release/scripts/addons_contrib/mesh_insert_edge_ring.py
+++ /dev/null
@@ -1,374 +0,0 @@
-#Simplified BSD License
-#
-#Copyright (c) 2012, Florian Meyer
-#tstscr at web.de
-#All rights reserved.
-#
-#Redistribution and use in source and binary forms, with or without
-#modification, are permitted provided that the following conditions are met: 
-#
-#1. Redistributions of source code must retain the above copyright notice, this
-#   list of conditions and the following disclaimer. 
-#2. Redistributions in binary form must reproduce the above copyright notice,
-#   this list of conditions and the following disclaimer in the documentation
-#   and/or other materials provided with the distribution. 
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#################################################################
-bl_info = {
-    "name": "Insert Edge Ring",
-    "author": "tstscr (tstscr at web.de)",
-    "version": (1, 0),
-    "blender": (2, 6, 4),
-    "location": "View3D > Edge Specials > Insert edge ring (Ctrl Alt R)",
-    "description": "Insert an edge ring along the selected edge loop",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Mesh/Insert_Edge_Ring",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=32424",
-    "category": "Mesh"}
-###########################################################################
-import bpy, bmesh, math
-from bpy.types import Operator
-from bpy.props import FloatProperty, BoolProperty, EnumProperty
-from mathutils import Vector
-from collections import deque
-from bmesh.utils import vert_separate
-###########################################################################
-def update(bme):
-    bme.verts.index_update()
-    bme.edges.index_update()
-
-def selected_edges(component, invert=False):
-    def is_vert(vert):
-        if invert:
-            return [e for e in component.link_edges if not e.select]
-        return [e for e in component.link_edges if e.select]
-    if type(component) == bmesh.types.BMVert:
-        return is_vert(component)
-    if type(component) == bmesh.types.BMEdge:
-        edges = []
-        for vert in component.verts:
-            edges.extend(is_vert(vert))
-        if component in edges:
-            edges.remove(component)
-        return edges
-
-def edge_loop_from(v_start):
-    
-    def walk(vert, vert_loop=deque()):
-        #print('from', vert.index)
-        edges_select = selected_edges(vert)
-        #print('length edges_select', len(edges_select))
-        if not vert_loop:
-            #print('inserting %d into vert_loop' %vert.index)
-            vert_loop.append(vert)
-        
-        for edge in edges_select:
-            other_vert = edge.other_vert(vert)
-            #print('other_vert %d' %other_vert.index)
-            
-            edge_is_valid = True
-            if edge.is_boundary \
-            or other_vert in vert_loop \
-            or len(edges_select) > 2 \
-            or len(selected_edges(other_vert)) > 2:
-                #print('is not valid')
-                edge_is_valid = False
-            
-            if edge_is_valid:
-                if vert == vert_loop[-1]:
-                    #print('appending %d' %other_vert.index)
-                    vert_loop.append(other_vert)
-                else:
-                    #print('prepending %d' %other_vert.index)
-                    vert_loop.appendleft(other_vert)
-                    
-                walk(other_vert, vert_loop)
-        
-        return vert_loop
-    #####################################
-    v_loop = walk(v_start)
-    #print('returning', [v.index for v in v_loop])
-    return v_loop
-
-
-def collect_edge_loops(bme):
-    edge_loops = []
-    verts_to_consider = [v for v in bme.verts if v.select]
-    
-    while verts_to_consider:
-        
-        v_start = verts_to_consider[-1]
-        #print('\nverts_to_consider', [v.index for v in verts_to_consider])
-        edge_loop = edge_loop_from(v_start)
-        #update(bme)
-        #print('edge_loop', [v.index for v in edge_loop])
-        for v in edge_loop:
-            try:
-                verts_to_consider.remove(v)
-            except:
-                print('tried to remove vert %d from verts_to_consider. \
-                       Failed somehow' %v.index)
-        
-        if len(edge_loop) >= 3:
-            edge_loops.append(edge_loop)
-        else:
-            for v in edge_loop:
-                v.select = False
-    
-    if not verts_to_consider:
-        #print('no more verts_to_consider')
-        pass
-    
-    return edge_loops
-
-
-def insert_edge_ring(self, context):
-    def split_edge_loop(vert_loop):
-        other_loop = deque()
-        new_loop = deque()
-        for vert in vert_loop:
-            #print('OPERATING ON VERT', vert.index)
-            edges = selected_edges(vert)
-            v_new = bmesh.utils.vert_separate(vert, edges)
-            #print('RIPPING vert %d into' %vert.index, [v.index for v in v_new][:], \
-            #       'along edges', [e.index for e in edges])
-            if not closed:
-                if len(v_new) == 2:
-                    other_loop.append([v for v in v_new if v != vert][0])
-                else:
-                    other_loop.append(vert)
-            
-            if closed:
-                if not new_loop:
-                    #print('start_new_loop')
-                    new_loop.append(v_new[0])
-                    other_loop.append(v_new[1])
-                else:
-                    neighbours = [e.other_vert(v_new[0]) for e in v_new[0].link_edges]
-                    #print('neighbours', [n.index for n in neighbours])
-                    for n in neighbours:
-                        if n in new_loop and v_new[0] not in new_loop:
-                            #print('v_detect')
-                            new_loop.append(v_new[0])
-                            other_loop.append(v_new[1])
-                        if n in other_loop and v_new[0] not in other_loop:
-                            #print('v_not_detect')
-                            new_loop.append(v_new[1])
-                            other_loop.append(v_new[0])
-                
-        return other_loop, new_loop
-    
-    def move_verts(vert_loop, other_vert_loop):
-        
-        ### Offsets ###
-        def calc_offsets():
-            #print('\nCALCULATING OFFSETS')
-            offset = {}
-            for i, vert in enumerate(vert_loop):
-                edges_select = selected_edges(vert)
-                edges_unselect = selected_edges(vert, invert=True)
-                
-                vert_opposite = other_vert_loop[i]
-                edges_select_opposite = selected_edges(vert_opposite)
-                edges_unselect_opposite = selected_edges(vert_opposite, invert=True)
-                
-                ### MESH END VERT
-                if vert == other_vert_loop[0] or vert == other_vert_loop[-1]:
-                    #print('vert %d is start-end in middle of mesh, \
-                    #       does not need moving\n' %vert.index)
-                    continue
-                
-                ### BOUNDARY VERT
-                if len(edges_select) == 1:
-                    #print('verts %d  %d are on boundary' \
-                    #%(vert.index, other_vert_loop[i].index))
-                    border_edge = [e for e in edges_unselect if e.is_boundary][0]
-                    off = (border_edge.other_vert(vert).co - vert.co).normalized()
-                    if self.direction == 'LEFT':
-                        off *= 0
-                    offset[vert] = off
-                    #opposite vert
-                    border_edge_opposite = [e for e in edges_unselect_opposite \
-                                            if e.is_boundary][0]
-                    off = (border_edge_opposite.other_vert(vert_opposite).co \
-                           - vert_opposite.co).normalized()
-                    if self.direction == 'RIGHT':
-                        off *= 0
-                    offset[vert_opposite] = off
-                    continue
-                
-                ### MIDDLE VERT
-                if len(edges_select) == 2:
-                    #print('\nverts %d  %d are in middle of loop' \
-                    #%(vert.index, other_vert_loop[i].index))
-                    tangents = [e.calc_tangent(e.link_loops[0]) for e in edges_select]
-                    off = (tangents[0] + tangents[1]).normalized()
-                    angle = tangents[0].angle(tangents[1])
-                    if self.even:
-                        off += off * angle * 0.263910
-                    if self.direction == 'LEFT':
-                        off *= 0
-                    offset[vert] = off
-                    #opposite vert
-                    tangents = [e.calc_tangent(e.link_loops[0]) \
-                                for e in edges_select_opposite]
-                    off = (tangents[0] + tangents[1]).normalized()
-                    #angle= tangents[0].angle(tangents[1])
-                    if self.even:
-                        off += off * angle * 0.263910
-                    if self.direction == 'RIGHT':
-                        off *= 0
-                    offset[vert_opposite] = off
-                    continue
-            
-            return offset
-        
-        ### Moving ###
-        def move(offsets):
-            #print('\nMOVING VERTS')
-            for vert in offsets:
-                vert.co += offsets[vert] * self.distance
-        
-        offsets = calc_offsets()
-        move(offsets)
-    
-    def generate_new_geo(vert_loop, other_vert_loop):
-        #print('\nGENERATING NEW GEOMETRY')
-        
-        for i, vert in enumerate(vert_loop):
-            if vert == other_vert_loop[i]:
-                continue
-            edge_new = bme.edges.new([vert, other_vert_loop[i]])
-            edge_new.select = True
-        
-        bpy.ops.mesh.edge_face_add()
-
-    #####################################################################################
-    #####################################################################################
-    #####################################################################################
-    
-    bme = bmesh.from_edit_mesh(context.object.data)
-
-    ### COLLECT EDGE LOOPS ###
-    e_loops = collect_edge_loops(bme)
-    
-    for e_loop in e_loops:
-        
-        #check for closed loop - douple vert at start-end
-        closed = False
-        edges_select = selected_edges(e_loop[0])
-        for e in edges_select:
-            if e_loop[-1] in e.verts:
-                closed = True
-        
-        ### SPLITTING OF EDGES
-        other_vert_loop, new_loop = split_edge_loop(e_loop)
-        if closed:
-            e_loop = new_loop
-    
-        ### MOVE RIPPED VERTS ###
-        move_verts(e_loop, other_vert_loop)
-        
-        ### GENERATE NEW GEOMETRY ###
-        if self.generate_geo:
-            generate_new_geo(e_loop, other_vert_loop)
-    
-    update(bme)
-    
-###########################################################################
-# OPERATOR
-class MESH_OT_Insert_Edge_Ring(Operator):
-    """insert_edge_ring"""
-    bl_idname = "mesh.insert_edge_ring"
-    bl_label = "Insert edge ring"
-    bl_description = "Insert an edge ring along the selected edge loop"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    distance = FloatProperty(
-            name="distance",
-            default=0.01,
-            min=0, soft_min=0,
-            precision=4,
-            description="distance to move verts from original location")
-    
-    even = BoolProperty(
-            name='even',
-            default=True,
-            description='keep 90 degrees angles straight')
-    
-    generate_geo = BoolProperty(
-            name='Generate Geo',
-            default=True,
-            description='Fill edgering with faces')
-    
-    direction = EnumProperty(
-            name='direction',
-            description='Direction in which to expand the edge_ring',
-            items={
-            ('LEFT', '<|', 'only move verts left of loop (arbitrary)'),
-            ('CENTER', '<|>', 'move verts on both sides of loop'),
-            ('RIGHT', '|>', 'only move verts right of loop (arbitrary)'),
-            },
-            default='CENTER')
-    
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column(align=True)
-        
-        col.prop(self, 'distance', slider=False)
-        col.prop(self, 'even', toggle=True)
-        col.prop(self, 'generate_geo', toggle=True)
-        col.separator()
-        col.label(text='Direction')
-        row = layout.row(align=True)
-        row.prop(self, 'direction', expand=True)
-        
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-
-    def execute(self, context):
-        #print('\nInserting edge ring')
-        insert_edge_ring(self, context)
-        return {'FINISHED'}
-
-def insert_edge_ring_button(self, context):
-    self.layout.operator(MESH_OT_Insert_Edge_Ring.bl_idname,
-                         text="Insert edge ring")
-###########################################################################
-# REGISTRATION
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_edges.append(insert_edge_ring_button)
-
-    kc = bpy.context.window_manager.keyconfigs.addon
-    if kc:
-        km = kc.keymaps.new(name="3D View", space_type="VIEW_3D")
-        kmi = km.keymap_items.new('mesh.insert_edge_ring', \
-                                  'R', 'PRESS', ctrl=True, alt=True)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_edges.remove(insert_edge_ring_button)
-
-    kc = bpy.context.window_manager.keyconfigs.addon
-    if kc:
-        km = kc.keymaps["3D View"]
-        for kmi in km.keymap_items:
-            if kmi.idname == 'mesh.insert_edge_ring':
-                km.keymap_items.remove(kmi)
-                break
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_select_tools/__init__.py b/release/scripts/addons_contrib/mesh_select_tools/__init__.py
deleted file mode 100644
index 48de4a5..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/__init__.py
+++ /dev/null
@@ -1,173 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-#
-# ##### END GPL LICENSE BLOCK #####
-# menu & updates by meta-androcto #
-# contributed to by Macouno, dustractor, liero, CoDEmanX, meta-androcto #
-
-bl_info = {
-    "name": "Select Tools",
-    "author": "Multiple Authors",
-    "version": (0, 3),
-    "blender": (2, 6, 4),
-    "location": "Editmode select menu",
-    "description": "Adds More vert/face/edge select modes.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
-        "Scripts/",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32877",
-    "category": "Mesh"}
-
-
-if "bpy" in locals():
-    import imp
-    imp.reload(mesh_select_by_direction)
-    imp.reload(mesh_select_by_edge_length)
-    imp.reload(mesh_select_by_pi)
-    imp.reload(mesh_select_by_type)
-    imp.reload(mesh_select_connected_faces)
-    imp.reload(mesh_select_innermost)
-    imp.reload(mesh_index_select)
-    imp.reload(mesh_selection_topokit)
-    imp.reload(mesh_info_select)
-else:
-    from . import mesh_select_by_direction
-    from . import mesh_select_by_edge_length
-    from . import mesh_select_by_pi
-    from . import mesh_select_by_type
-    from . import mesh_select_connected_faces
-    from . import mesh_select_innermost
-    from . import mesh_index_select
-    from . import mesh_selection_topokit
-    from . import mesh_info_select
-
-import bpy, bmesh
-
-class VIEW3D_MT_selectface_edit_mesh_add(bpy.types.Menu):
-    # Define the "Mesh_Select_Tools" menu
-    bl_idname = "mesh.face_select_tools"
-    bl_label = "Select by Face"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.label(text = 'Face Select')
-        layout.separator()
-        layout.operator("data.facetype_select", 
-            text="Triangles").face_type = "3"
-        layout.operator("data.facetype_select", 
-            text="Quads").face_type = "4"
-        layout.operator("data.facetype_select", 
-            text="Ngons").face_type = "5"
-        layout.separator()
-        layout.operator("mesh.select_vert_index",
-            text="By Face Index")
-        layout.operator("mesh.select_by_direction",
-            text="By Direction")
-        layout.operator("mesh.select_by_pi",
-            text="By Pi")
-        layout.operator("mesh.select_connected_faces",
-            text="By Connected Faces")
-        layout.operator("mesh.e2e_efe",
-            text="Neighbors by Face")
-        layout.operator("mesh.f2f_fvnef",
-            text="Neighbors by Vert not Edge")
-        layout.operator("mesh.conway",
-            text="Conway")
-
-class VIEW3D_MT_selectedge_edit_mesh_add(bpy.types.Menu):
-    # Define the "Mesh_Select_Tools" menu
-    bl_idname = "mesh.edge_select_tools"
-    bl_label = "Select by Edge"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.label(text = 'Edge Select')
-        layout.separator()
-        layout.operator("mesh.select_vert_index",
-            text="By Edge Index")
-        layout.operator("mesh.select_by_direction",
-            text="By Direction")
-        layout.operator("mesh.select_by_pi",
-            text="By Pi")
-        layout.operator("mesh.select_by_edge_length",
-            text="By Edge Length")
-        layout.separator()
-        layout.operator("mesh.e2e_eve",
-            text="Neighbors by Vert")
-        layout.operator("mesh.e2e_evfe",
-            text="Neighbors by Vert + Face")
-        layout.operator("mesh.e2e_efnve",
-            text="Lateral Neighbors")
-        layout.operator("mesh.e2e_evnfe",
-            text="Longitudinal Edges")
-#        layout.operator("mesh.je",
-#            text="only_edge_selection")
-			
-class VIEW3D_MT_selectvert_edit_mesh_add(bpy.types.Menu):
-    # Define the "Mesh_Select_Tools" menu
-    bl_idname = "mesh.vert_select_tools"
-    bl_label = "Select by Vert"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.label(text = 'Vert Select')
-        layout.separator()
-        layout.operator("mesh.select_vert_index",
-            text="By Vert Index")
-        layout.operator("mesh.select_by_direction",
-            text="By Direction")
-        layout.operator("mesh.select_by_pi",
-            text="By Pi")
-#        layout.operator("mesh.select_innermost",
-#            text="innermost")
-        layout.separator()
-        layout.operator("mesh.v2v_by_edge",
-            text="Neighbors by Edge")
-        layout.operator("mesh.e2e_eve",
-            text="Neighbors by Vert")
-        layout.operator("mesh.e2e_efe",
-            text="Neighbors by Face")
-        layout.operator("mesh.v2v_facewise",
-            text="Neighbors by Face - Edge")
-#        layout.operator("mesh.ie",
-#            text="inner_edge_selection")
-
-# Register all operators and panels
-
-# Define "Extras" menu
-def menu_func(self, context):
-    if context.tool_settings.mesh_select_mode[2]:
-        self.layout.menu("mesh.face_select_tools", icon="PLUGIN")
-    if context.tool_settings.mesh_select_mode[1]:
-        self.layout.menu("mesh.edge_select_tools", icon="PLUGIN")
-    if context.tool_settings.mesh_select_mode[0]:
-        self.layout.menu("mesh.vert_select_tools", icon="PLUGIN")
-
-
-def register():
-	bpy.utils.register_module(__name__)
-	bpy.types.VIEW3D_MT_select_edit_mesh.append(menu_func)
-
-def unregister():
-	bpy.utils.unregister_module(__name__)
-	bpy.types.VIEW3D_MT_select_edit_mesh.remove(menu_func)
-
-if __name__ == "__main__":
-	register()
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_extras.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_extras.py
deleted file mode 100644
index 9b317b8..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_extras.py
+++ /dev/null
@@ -1,274 +0,0 @@
-import bpy, mathutils, math
-from mathutils import geometry
-
-# Get a matrix for the selected faces that you can use to do local transforms
-def get_selection_matrix(faces=False):
-	
-	me = bpy.context.active_object.data
-	
-	if not faces:
-		faces = get_selected_faces()
-	
-	yVec = mathutils.Vector()
-	zVec = mathutils.Vector()
-	
-	# Ok so we have a basic matrix, but lets base it more on the mesh!
-	for f in faces:
-			
-		v1 = me.vertices[f.vertices[0]].co
-		v2 = me.vertices[f.vertices[1]].co
-		edge = v2-v1
-		
-		yVec += edge
-		
-		if len(f.vertices) == 4:
-			v1 = me.vertices[f.vertices[2]].co
-			v2 = me.vertices[f.vertices[3]].co
-			edge = v1-v2
-			
-			yVec += edge
-		
-		zVec += mathutils.Vector(f.normal)
-					
-	if not yVec.length:
-		quat = zVec.to_track_quat('-Z', 'Y')
-		tMat = quat.to_matrix()
-		yVec = tMat[1]
-		yVec = yVec.normalized()
-	else:
-		yVec = yVec.normalized()
-	zVec = zVec.normalized()
-	
-	# Rotate yVec so it's 90 degrees to zVec
-	cross =yVec.cross(zVec)
-	vec = float(yVec.angle(zVec) - math.radians(90))
-	mat = mathutils.Matrix.Rotation(vec, 3, cross)
-	yVec =  (mat * yVec)
-	
-	xVec = yVec.cross(zVec)
-	
-	xVec = xVec.normalized()
-	
-	nMat = mathutils.Matrix((xVec, yVec, zVec))
-	
-	return nMat
-
-
-
-# Get the selection radius (minimum distance of an outer edge to the centre)
-def get_selection_radius():
-
-	ob = bpy.context.active_object
-
-	radius = 0.0
-	
-	# no use continueing if nothing is selected
-	if contains_selected_item(ob.data.polygons):
-	
-		# Find the center of the selection
-		cent = mathutils.Vector()
-		nr = 0
-		nonVerts = []
-		selVerts = []
-		for f in ob.data.polygons:
-			if f.select:
-				nr += 1
-				cent += f.center
-			else:
-				nonVerts.extend(f.vertices)
-				
-		cent /= nr
-		
-		chk = 0
-		
-		# Now that we know the center.. we can figure out how close the nearest point on an outer edge is
-		for e in get_selected_edges():
-		
-			nonSection = [v for v in e.vertices if v in nonVerts]
-			if len(nonSection):
-			
-				v0 = ob.data.vertices[e.vertices[0]].co
-				v1 = ob.data.vertices[e.vertices[1]].co
-				
-				# If there's more than 1 vert of this edge on the outside... we need the edge length to be long enough too!
-				if len(nonSection) > 1:
-					edge = v0 - v1
-					edgeRad = edge.length * 0.5
-					
-					if edgeRad < radius or not chk:
-						radius = edgeRad
-						chk += 1
-				
-				int = geometry.intersect_point_line(cent, v0, v1)
-				
-				rad = cent - int[0]
-				l = rad.length
-				
-				if l < radius or not chk:
-					radius = l
-					chk += 1
-					
-	return radius
-	
-	
-	
-# Get the average length of the outer edges of the current selection
-def get_shortest_outer_edge_length():
-
-	ob = bpy.context.active_object
-
-	min = False
-	me = ob.data
-	
-	delVerts = []
-	for f in me.faces:
-		if not f.select:
-			delVerts.extend(f.vertices)
-	selEdges = [e.vertices for e in me.edges if e.select]
-
-	if len(selEdges) and len(delVerts):
-		
-		for eVerts in selEdges:
-			
-			v0 = eVerts[0]
-			v1 = eVerts[1]
-			
-			if v0 in delVerts and v1 in delVerts:
-				ln = (me.vertices[v0].co - me.vertices[v1].co).length
-				if min is False or (ln > 0.0 and ln < min):
-					min = ln
-						
-	return min
-
-
-# Get the average length of the outer edges of the current selection
-def get_average_outer_edge_length():
-
-	ob = bpy.context.active_object
-
-	ave = 0.0
-	me = ob.data
-	
-	delFaces = [f.vertices for f  in me.faces if not f.select]
-	selEdges = [e.vertices for e in me.edges if e.select]
-
-	if len(selEdges) and len(delFaces):
-	
-		number = 0
-		
-		for eVerts in selEdges:
-			
-			v0 = eVerts[0]
-			v1 = eVerts[1]
-			
-			for fVerts in delFaces:
-				if v0 in fVerts and v1 in fVerts:
-					number += 1
-					ave += (me.vertices[v0].co - me.vertices[v1].co).length
-					break
-						
-		if number:
-			ave /= number
-			
-	return ave
-
-
-	
-# Get the selected (or deselected items)
-def get_selected(type='vertices',invert=False):
-	
-	mesh = bpy.context.active_object.data
-	
-	if type == 'vertices':
-		items = mesh.vertices
-	elif type == 'edges':
-		items = mesh.edges
-	else:
-		items = mesh.polygons
-		
-	if invert:
-		L = [i for i in items if not i.select]
-	else:
-		L = [i for i in items if i.select]
-	return L
-	
-	
-	
-# See if the mesh has something selected
-def has_selected(type='vertices',invert=False):
-	
-	mesh = bpy.context.active_object.data
-	
-	if type == 'vertices':
-		items = mesh.vertices
-	elif type == 'edges':
-		items = mesh.edges
-	else:
-		items = mesh.polygons
-		
-	for i in items:
-		if not invert and i.select:
-			return True
-		elif invert and not i.select:
-			return True
-			
-	return False
-		
-		
-
-# Get all the selected vertices (mode is selected or deselected)
-def get_selected_vertices(mode='selected'):
-
-	vertices = bpy.context.active_object.data.vertices
-
-	if mode == 'deselected':
-		L = [v for v in vertices if not v.select]
-	else:
-		L = [v for v in vertices if v.select]
-	return L
-	
-	
-	
-# Get all the selected edges (mode is selected or deselected)
-def get_selected_edges(mode='selected'):
-
-	edges = bpy.context.active_object.data.edges
-
-	if mode == 'deselected':
-		L = [e for e in edges if not e.select]
-	else:
-		L = [e for e in edges if e.select]
-	return L
-
-
-	
-# Get all the selected faces (mode is selected or deselected)
-def get_selected_faces(mode='selected'):
-	
-	polygons = bpy.context.active_object.data.polygons
-	
-	if mode == 'deselected':
-		L = [f for f in polygons if not f.select]
-	else:
-		L = [f for f in polygons if f.select]
-	return L
-	
-	
-	
-# See if there is at least one selected item in 'items'
-def contains_selected_item(items):
-
-	for item in items:
-		if item.select:
-			return True
-				
-	return False
-	
-
-
-
-
-
-	
-	
-		
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_index_select.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_index_select.py
deleted file mode 100644
index 9bc90d1..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_index_select.py
+++ /dev/null
@@ -1,182 +0,0 @@
-bl_info = {
-    "name": "Select by index",
-    "author": "liero",
-    "version": (0, 2),
-    "blender": (2, 5, 5),
-    "api": 33333,
-    "location": "View3D > Tool Shelf",
-    "description": "Select mesh data by index / area / length / cursor",
-    "category": "Mesh"}
-
-import bpy, mathutils
-from mathutils import Vector
-
-class SelVert(bpy.types.Operator):
-    bl_idname = 'mesh.select_vert_index'
-    bl_label = 'Verts'
-    bl_description = 'Select vertices by index'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    indice = bpy.props.FloatProperty(name='Selected', default=0, min=0, max=100, description='Percentage of selected edges', precision = 2, subtype = 'PERCENTAGE')
-    delta = bpy.props.BoolProperty(name='Use Cursor', default=False, description='Select by Index / Distance to Cursor')
-    flip = bpy.props.BoolProperty(name='Reverse Order', default=False, description='Reverse selecting order')
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type == 'MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'indice', slider=True)
-        layout.prop(self,'delta')
-        layout.prop(self,'flip')
-
-    def execute(self, context):
-        obj = bpy.context.object
-        mode = [a for a in bpy.context.tool_settings.mesh_select_mode]
-        if mode != [True, False, False]:
-            bpy.context.tool_settings.mesh_select_mode = [True, False, False]
-        ver = obj.data.vertices
-        loc = context.scene.cursor_location
-        sel = []
-        for v in ver:
-            d = v.co - loc
-            sel.append((d.length, v.index))
-        sel.sort()
-        if self.flip:
-            sel.reverse()
-        bpy.ops.object.mode_set()
-        valor = round(len(sel) / 100 * self.indice)
-        if self.delta:
-            for i in range(len(sel[:valor])):
-                ver[sel[i][1]].select = True
-        else:
-            for i in range(len(sel[:valor])):
-                if self.flip:
-                    ver[len(sel)-i-1].select = True
-                else:
-                    ver[i].select = True
-        bpy.ops.object.mode_set(mode='EDIT')
-        return {'FINISHED'}
-
-class SelEdge(bpy.types.Operator):
-    bl_idname = 'mesh.select_edge_index'
-    bl_label = 'Edges'
-    bl_description = 'Select edges by index'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    indice = bpy.props.FloatProperty(name='Selected', default=0, min=0, max=100, description='Percentage of selected edges', precision = 2, subtype = 'PERCENTAGE')
-    delta = bpy.props.BoolProperty(name='Use Edges Length', default=False, description='Select Edges by Index / Length')
-    flip = bpy.props.BoolProperty(name='Reverse Order', default=False, description='Reverse selecting order')
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type == 'MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'indice', slider=True)
-        layout.prop(self,'delta')
-        layout.prop(self,'flip')
-
-    def execute(self, context):
-        obj = bpy.context.object
-        mode = [a for a in bpy.context.tool_settings.mesh_select_mode]
-        if mode != [False, True, False]:
-            bpy.context.tool_settings.mesh_select_mode = [False, True, False]
-        ver = obj.data.vertices
-        edg = obj.data.edges
-        sel = []
-        for e in edg:
-            d = ver[e.vertices[0]].co - ver[e.vertices[1]].co
-            sel.append((d.length, e.index))
-        sel.sort()
-        if self.flip:
-            sel.reverse()
-        bpy.ops.object.mode_set()
-        valor = round(len(sel) / 100 * self.indice)
-        if self.delta:
-            for i in range(len(sel[:valor])):
-                edg[sel[i][1]].select = True
-        else:
-            for i in range(len(sel[:valor])):
-                if self.flip:
-                    edg[len(sel)-i-1].select = True
-                else:
-                    edg[i].select = True
-        bpy.ops.object.mode_set(mode='EDIT')
-        return {'FINISHED'}
-
-class SelFace(bpy.types.Operator):
-    bl_idname = 'mesh.select_face_index'
-    bl_label = 'Faces'
-    bl_description = 'Select faces by index'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    indice = bpy.props.FloatProperty(name='Selected', default=0, min=0, max=100, description='Percentage of selected faces', precision = 2, subtype = 'PERCENTAGE')
-    delta = bpy.props.BoolProperty(name='Use Faces Area', default=False, description='Select Faces by Index / Area')
-    flip = bpy.props.BoolProperty(name='Reverse Order', default=False, description='Reverse selecting order')
-
-    @classmethod
-    def poll(cls, context):
-        return (context.object and context.object.type == 'MESH')
-
-    def draw(self, context):
-        layout = self.layout
-        layout.prop(self,'indice', slider=True)
-        layout.prop(self,'delta')
-        layout.prop(self,'flip')
-
-    def execute(self, context):
-        obj = bpy.context.object
-        mode = [a for a in bpy.context.tool_settings.mesh_select_mode]
-        if mode != [False, False, True]:
-            bpy.context.tool_settings.mesh_select_mode = [False, False, True]
-        fac = obj.data.polygons
-        sel = []
-        for f in fac:
-            sel.append((f.area, f.index))
-        sel.sort()
-        if self.flip:
-            sel.reverse()
-        print (sel)
-        bpy.ops.object.mode_set()
-        valor = round(len(sel) / 100 * self.indice)
-        if self.delta:
-            for i in range(len(sel[:valor])):
-                fac[sel[i][1]].select = True
-        else:
-            for i in range(len(sel[:valor])):
-                if self.flip:
-                    fac[len(sel)-i-1].select = True
-                else:
-                    fac[i].select = True
-        bpy.ops.object.mode_set(mode='EDIT')
-        return {'FINISHED'}
-
-class GUI(bpy.types.Panel):
-    bl_label = 'Select mesh data'
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    def draw(self, context):
-        layout = self.layout
-        row = layout.row(align=True)
-        row.operator('mesh.select_vert_index')
-        row.operator('mesh.select_edge_index')
-        row.operator('mesh.select_face_index')
-
-def register():
-    bpy.utils.register_class(SelVert)
-    bpy.utils.register_class(SelEdge)
-    bpy.utils.register_class(SelFace)
-    bpy.utils.register_class(GUI)
-
-def unregister():
-    bpy.utils.unregister_class(SelVert)
-    bpy.utils.unregister_class(SelEdge)
-    bpy.utils.unregister_class(SelFace)
-    bpy.utils.unregister_class(GUI)
-
-if __name__ == '__main__':
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_info_select.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_info_select.py
deleted file mode 100644
index c97381e..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_info_select.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# By CoDEmanX
-
-import bpy
-
-class DATA_PT_info_panel(bpy.types.Panel):
-    """Creates a face info / select panel in the Object properties window"""
-    bl_label = "Face info / select"
-    bl_idname = "DATA_PT_face_info"
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "data"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        return context.active_object is not None and context.active_object.type == 'MESH'
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.active_object
-        
-        info_str = ""
-        tris = quads = ngons = 0
-
-        for p in ob.data.polygons:
-            count = p.loop_total
-            if count == 3:
-                tris += 1
-            elif count == 4:
-                quads += 1
-            else:
-                ngons += 1
-
-        info_str = "  Ngons: %i  Quads: %i  Tris: %i" % (ngons, quads, tris)
-        
-        col = layout.column()
-        col.label(info_str, icon='MESH_DATA')
-
-        col = layout.column()
-        col.label("Select faces by type:")
-
-        row = layout.row()
-        row.operator("data.facetype_select", text="Ngons").face_type = "5"
-        row.operator("data.facetype_select", text="Quads").face_type = "4"
-        row.operator("data.facetype_select", text="Tris").face_type = "3"
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_direction.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_direction.py
deleted file mode 100644
index 9e2b10a..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_direction.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# mesh_select_by_direction.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-'''
-bl_info = {
-	"name": "Select by direction",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Select",
-	"description": "Select all items whose normals face a certain direction",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-"""
-Usage:
-
-Launch from from "Select -> By direction"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-'''
-import bpy, mathutils, math
-from bpy.props import FloatVectorProperty, FloatProperty, BoolProperty, EnumProperty
-
-
-class Select_by_direction():
-
-	# Initialise the class
-	def __init__(self, context, direction, divergence, extend, space):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		self.space = space
-		
-		# if we do stuff in global space we need to object matrix
-		if self.space == 'GLO':
-			direction = mathutils.Vector(direction) * mathutils.Matrix(self.ob.matrix_world.rotation_part()).invert()
-		else:
-			direction = mathutils.Vector(direction)
-			
-		direction = direction.normalized()
-		
-		vertSelect = bpy.context.tool_settings.mesh_select_mode[0]
-		edgeSelect = bpy.context.tool_settings.mesh_select_mode[1]
-		faceSelect = bpy.context.tool_settings.mesh_select_mode[2]
-		
-		if mathutils.Vector(direction).length:
-		
-			# Vert select
-			if vertSelect:
-			
-				hasSelected = self.hasSelected(self.ob.data.vertices)
-				
-				for v in self.ob.data.vertices:
-				
-					normal = v.normal
-				
-					s = self.selectCheck(v.select, hasSelected, extend)
-					d = self.deselectCheck(v.select, hasSelected, extend)
-					
-					if s or d:
-						angle = direction.angle(normal)
-				
-					# Check if the verts match any of the directions
-					if s and angle <= divergence:
-						v.select = True
-							
-					if d and angle > divergence:
-						v.select = False
-						
-			# Edge select
-			if edgeSelect:
-			
-				hasSelected = self.hasSelected(self.ob.data.edges)
-				
-				for e in self.ob.data.edges:
-				
-					s = self.selectCheck(e.select, hasSelected, extend)
-					d = self.deselectCheck(e.select, hasSelected, extend)
-						
-						
-					# Check if the edges match any of the directions
-					if s or d:
-						normal = self.ob.data.vertices[e.vertices[0]].normal
-						normal += self.ob.data.vertices[e.vertices[1]].normal
-						
-						angle =direction.angle(normal) 
-								
-								
-					if s and angle <= divergence:
-						e.select = True
-							
-					if d and angle > divergence:
-						e.select = False
-		
-			# Face select
-			if faceSelect:
-			
-				hasSelected = self.hasSelected(self.ob.data.polygons)
-			
-				# Loop through all the given faces
-				for f in self.ob.data.polygons:
-						
-					s = self.selectCheck(f.select, hasSelected, extend)
-					d = self.deselectCheck(f.select, hasSelected, extend)
-					
-					if s or d:
-						angle = direction.angle(f.normal) 
-					
-					# Check if the faces match any of the directions
-					if s and angle <= divergence:
-						f.select = True
-						
-					if d and angle > divergence:
-						f.select = False
-		
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-		
-		
-	# See if the current item should be selected or not
-	def selectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is not selected we may want to select
-		if not isSelected:
-			
-			# If we are extending or nothing is selected we want to select
-			if extend or not hasSelected:
-				return True
-				
-		return False
-	
-	
-	
-	# See if the current item should be deselected or not
-	def deselectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is selected we may want to deselect
-		if isSelected:
-		
-			# If something is selected and we're not extending we want to deselect
-			if hasSelected and not extend:
-				return True
-
-		return False
-				
-		
-		
-	# See if there is at least one selected item
-	def hasSelected(self, items):
-	
-		for item in items:
-			if item.select:
-				return True
-					
-		return False
-		
-		
-		
-class Select_init(bpy.types.Operator):
-	'''Select all items with normals facing a certain direction'''
-	bl_idname = 'mesh.select_by_direction'
-	bl_label = 'Select by direction'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	direction = FloatVectorProperty(name="Direction", description="Direction as a vector", default=(0.0, 0.0, 1.0), min=-100.0, max=100.0, soft_min=-10.0, soft_max=10.0, step=100, precision=2)
-	
-	divergence = FloatProperty(name='Divergence', description='The nr of degrees the selection may differ from the vector', default=math.radians(30.0), min=0.0, max=math.radians(360.0), soft_min=0.0, soft_max=math.radians(360.0), step=math.radians(5000), precision=2, subtype='ANGLE')
-	
-	extend = BoolProperty(name='Extend', description='Extend the current selection', default=False)
-	
-	# The spaces we use
-	spaces=(('LOC', 'Local', ''),('GLO', 'Global', ''))
-	
-	space = EnumProperty(items=spaces, name='Space', description='The space to interpret the directions in', default='LOC')
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH')
-
-	def execute(self, context):
-		SELECT_DIRECTION = Select_by_direction(context, self.direction, self.divergence, self.extend, self.space) 
-		return {'FINISHED'}
-
-
-
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_edge_length.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_edge_length.py
deleted file mode 100644
index af25e0e..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_edge_length.py
+++ /dev/null
@@ -1,219 +0,0 @@
-# mesh_select_by_edge_length.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-'''
-bl_info = {
-	"name": "Select by edge length",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Select",
-	"description": "Select all items whose scale/length/surface matches a certain edge length",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-"""
-Usage:
-
-Launch from from "Select -> By edge length"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-'''
-import bpy, mathutils, math
-from bpy.props import FloatProperty, BoolProperty, EnumProperty
-
-
-class Select_by_edge_length():
-
-	# Initialise the class
-	def __init__(self, context, edgeLength, bigger, smaller, extend, space):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		self.space = space
-		self.obMat = self.ob.matrix_world
-		
-		# We ignore vert selections completely
-		#vertSelect = bpy.context.tool_settings.mesh_select_mode[0]
-		edgeSelect = bpy.context.tool_settings.mesh_select_mode[1]
-		faceSelect = bpy.context.tool_settings.mesh_select_mode[2]
-			
-					
-		# Edge select
-		if edgeSelect:
-		
-			hasSelected = self.hasSelected(self.ob.data.edges)
-			
-			for e in self.ob.data.edges:
-						
-				if  self.selectCheck(e.select, hasSelected, extend):
-				
-					len = self.getEdgeLength(e.vertices)
-					
-					if len == edgeLength or (bigger and len >= edgeLength) or (smaller and len <= edgeLength):
-						e.select = True
-					
-				if self.deselectCheck(e.select, hasSelected, extend):
-					len = self.getEdgeLength(e.vertices)
-					
-					if len != edgeLength and not (bigger and len >= edgeLength) and not (smaller and len <= edgeLength):
-						e.select = False
-	
-		# Face select
-		if faceSelect:
-		
-			hasSelected = self.hasSelected(self.ob.data.polygons)
-		
-			# Loop through all the given faces
-			for f in self.ob.data.polygons:
-					
-				# Check if the faces match any of the directions
-				if self.selectCheck(f.select, hasSelected, extend):
-				
-					min = 0.0
-					max = 0.0
-					
-					for i, e in enumerate(f.edge_keys):
-						len = self.getEdgeLength(e)
-						if not i:
-							min = len
-							max = len
-						elif len < min:
-							min = len
-						elif len > max:
-							max = len
-							
-					if (min == edgeLength and max == edgeLength) or (bigger and min >= edgeLength) or (smaller and max <= edgeLength):
-						f.select = True
-					
-				if self.deselectCheck(f.select, hasSelected, extend):
-				
-					min = 0.0
-					max = 0.0
-					
-					for i, e in enumerate(f.edge_keys):
-						len = self.getEdgeLength(e)
-						if not i:
-							min = len
-							max = len
-						elif len < min:
-							min = len
-						elif len > max:
-							max = len
-							
-					if (min != edgeLength and max != edgeLength) and not (bigger and  min >= edgeLength) and not (smaller and max <= edgeLength):
-						f.select = False
-		
-		
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-		
-		
-	# Get the lenght of an edge, by giving this function all verts (2) in the edge
-	def getEdgeLength(self, verts):
-	
-		vec1 = self.ob.data.vertices[verts[0]].co
-		vec2 = self.ob.data.vertices[verts[1]].co
-				
-		vec = vec1 - vec2
-		
-		if self.space == 'GLO':
-			vec *= self.obMat
-		
-		return round(vec.length, 5)
-		
-		
-		
-	# See if the current item should be selected or not
-	def selectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is not selected we may want to select
-		if not isSelected:
-			
-			# If we are extending or nothing is selected we want to select
-			if extend or not hasSelected:
-				return True
-				
-		return False
-	
-	
-	
-	# See if the current item should be deselected or not
-	def deselectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is selected we may want to deselect
-		if isSelected:
-		
-			# If something is selected and we're not extending we want to deselect
-			if hasSelected and not extend:
-				return True
-
-		return False
-		
-		
-		
-	# See if there is at least one selected item
-	def hasSelected(self, items):
-	
-		for item in items:
-			if item.select:
-				return True
-					
-		return False
-		
-		
-		
-class Select_init(bpy.types.Operator):
-	'''Select all items with normals facing a certain direction'''
-	bl_idname = 'mesh.select_by_edge_length'
-	bl_label = 'Select by edge length'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	edgeLength = FloatProperty(name='Edge length', description='The scale in Blender units', default=1.0, min=0.0, max=1000.0, soft_min=0.0, soft_max=100.0, step=100, precision=2)
-	
-	bigger = BoolProperty(name='Bigger', description='Select items bigger than the size setting', default=False)
-	
-	smaller = BoolProperty(name='Smaller', description='Select items smaller than the size setting', default=False)
-	
-	extend = BoolProperty(name='Extend', description='Extend the current selection', default=False)
-	
-	# The spaces we use
-	spaces=(('LOC', 'Local', ''),('GLO', 'Global', ''))
-	
-	space = EnumProperty(items=spaces, name='Space', description='The space to interpret the directions in', default='LOC')
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH' and not bpy.context.tool_settings.mesh_select_mode[0])
-
-	def execute(self, context):
-		SELECT_EDGES = Select_by_edge_length(context, self.edgeLength, self.bigger, self.smaller, self.extend, self.space) 
-		return {'FINISHED'}
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_pi.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_pi.py
deleted file mode 100644
index 2019118..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_pi.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# mesh_select_by_pi.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-'''
-bl_info = {
-	"name": "Select by pi",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Select",
-	"description": "Select fake random based on pi",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-"""
-Usage:
-
-Launch from from "Select -> By pi"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-'''
-import bpy
-from bpy.props import BoolProperty
-
-
-class Select_by_pi():
-
-	# Initialise the class
-	def __init__(self, context, e, invert, extend):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		self.invert = invert
-		
-		# Make pi as a list of integers
-		if e:
-			self.pi = list('27182818284590452353602874713526624977572470936999')
-		else:
-			self.pi = list('31415926535897932384626433832795028841971693993751')
-		
-		self.piLen = len(self.pi)
-		self.piPos = 0
-		
-		vertSelect = bpy.context.tool_settings.mesh_select_mode[0]
-		edgeSelect = bpy.context.tool_settings.mesh_select_mode[1]
-		faceSelect = bpy.context.tool_settings.mesh_select_mode[2]
-		
-		# Vert select
-		if vertSelect:
-		
-			hasSelected = self.hasSelected(self.ob.data.vertices)
-			
-			for v in self.ob.data.vertices:
-			
-				s = self.selectCheck(v.select, hasSelected, extend)
-				d = self.deselectCheck(v.select, hasSelected, extend)
-			
-				# Check if the verts match any of the directions
-				if s and self.choose():
-					v.select = True
-						
-				if d and not self.choose():
-					v.select = False
-					
-		# Edge select
-		if edgeSelect:
-		
-			hasSelected = self.hasSelected(self.ob.data.edges)
-			
-			for e in self.ob.data.edges:
-			
-				s = self.selectCheck(e.select, hasSelected, extend)
-				d = self.deselectCheck(e.select, hasSelected, extend)
-					
-				if s and self.choose():
-					e.select = True
-						
-				if d and not self.choose():
-					e.select = False
-	
-		# Face select
-		if faceSelect:
-		
-			hasSelected = self.hasSelected(self.ob.data.polygons)
-		
-			# Loop through all the given faces
-			for f in self.ob.data.polygons:
-					
-				s = self.selectCheck(f.select, hasSelected, extend)
-				d = self.deselectCheck(f.select, hasSelected, extend)
-				
-				# Check if the faces match any of the directions
-				if s and self.choose():
-					f.select = True
-					
-				if d and not self.choose():
-					f.select = False
-	
-		bpy.ops.object.mode_set(mode='EDIT')
-	
-	
-	
-	# Choose by pi
-	def choose(self):
-		choice = True
-		
-		# We just choose the odd numbers
-		if int(self.pi[self.piPos]) % 2:
-			choice = False
-			
-		if self.invert:
-			if choice:
-				choice = False
-			else:
-				choice = True
-			
-		self.incrementPiPos()
-		return choice
-	
-	
-	
-	# Increment the pi position
-	def incrementPiPos(self):
-		self.piPos += 1
-		if self.piPos == self.piLen:
-			self.piPos = 0
-	
-	
-	
-	# See if the current item should be selected or not
-	def selectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is not selected we may want to select
-		if not isSelected:
-			
-			# If we are extending or nothing is selected we want to select
-			if extend or not hasSelected:
-				return True
-				
-		return False
-	
-	
-	
-	# See if the current item should be deselected or not
-	def deselectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is selected we may want to deselect
-		if isSelected:
-		
-			# If something is selected and we're not extending we want to deselect
-			if hasSelected and not extend:
-				return True
-
-		return False
-				
-		
-		
-	# See if there is at least one selected item
-	def hasSelected(self, items):
-	
-		for item in items:
-			if item.select:
-				return True
-					
-		return False
-		
-		
-		
-class Select_init(bpy.types.Operator):
-	'''Select faces based on pi'''
-	bl_idname = 'mesh.select_by_pi'
-	bl_label = 'Select by pi'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	e = BoolProperty(name='Use e', description='use e in stead of pi', default=False)
-	
-	invert = BoolProperty(name='Invert', description='Invert the selection result', default=False)
-	
-	extend = BoolProperty(name='Extend', description='Extend the current selection', default=False)
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH')
-
-	def execute(self, context):
-		SELECT_DIRECTION = Select_by_pi(context, self.e, self.invert, self.extend) 
-		return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_type.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_type.py
deleted file mode 100644
index c75d6b5..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_by_type.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# By CoDEmanX
-
-import bpy
-from bpy.props import EnumProperty, BoolProperty
-
-class DATA_OP_facetype_select(bpy.types.Operator):
-    """Select all faces of a certain type"""
-    bl_idname = "data.facetype_select"
-    bl_label = "Select by face type"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    face_type = EnumProperty(name="Select faces:",
-                             items = (("3","Triangles","Faces made up of 3 vertices"),
-                                      ("4","Quads","Faces made up of 4 vertices"),
-                                      ("5","Ngons","Faces made up of 5 and more vertices")),
-                             default = "5")
-
-    extend = BoolProperty(name="Extend", description="Extend Selection", default=False)
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None and context.active_object.type == 'MESH'
-
-    def execute(self, context):
-
-        bpy.ops.object.mode_set(mode='EDIT')
-
-        if not self.extend:
-            bpy.ops.mesh.select_all(action='DESELECT')
-
-        context.tool_settings.mesh_select_mode=(False, False, True)
-
-        if self.face_type == "3":
-            bpy.ops.mesh.select_face_by_sides(number=3, type='EQUAL')
-        elif self.face_type == "4":
-            bpy.ops.mesh.select_face_by_sides(number=4, type='EQUAL')
-        else:
-            bpy.ops.mesh.select_face_by_sides(number=4, type='GREATER')
-
-        return {'FINISHED'}
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_checkered.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_checkered.py
deleted file mode 100644
index f8ee204..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_checkered.py
+++ /dev/null
@@ -1,185 +0,0 @@
-# mesh_select_checkered.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-	"name": "Select checkered",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Select",
-	"description": "Select checkered",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-"""
-Usage:
-
-Launch from from "Select -> checkered"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-
-import bpy
-from bpy.props import BoolProperty
-
-
-class Select_checkered():
-
-	# Initialise the class
-	def __init__(self, context, invert, extend):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		self.invert = invert
-		
-		self.selectedVerts = []
-		self.selectedFaces = []
-		self.deselectedFaces = []
-		
-		hasSelected = self.hasSelected(self.ob.data.polygons)
-	
-	
-		working = True
-		while working:
-		
-			working = False
-	
-			# Loop through all the given faces
-			for f in self.ob.data.polygons:
-			
-				if not f.index in self.selectedFaces and not f.index in self.deselectedFaces:
-					
-					choice = self.Choose(f)
-					
-					if choice != 'skip':
-					
-						s = self.selectCheck(f.select, hasSelected, extend)
-						d = self.deselectCheck(f.select, hasSelected, extend)
-					
-						# Check if the faces match any of the directions
-						if s and choice:
-							f.select = True
-							working = True
-							
-						if d and not choice:
-							f.select = False
-							working = True
-	
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-	
-	
-	# Choose whether or not to select
-	def Choose(self, f):
-	
-		choice = 'skip'
-	
-		if not len(self.selectedFaces):
-			choice = True
-			self.selectedFaces.append(f.index)
-			self.selectedVerts.extend(f.vertices)
-		
-		else:
-			intersection = [v for v in f.vertices if v in self.selectedVerts]
-			
-			if len(intersection) == 1:
-				choice = True
-				self.selectedFaces.append(f.index)
-				self.selectedVerts.extend(f.vertices)
-				
-			elif len(intersection) == 2:
-				choice = False
-				self.deselectedFaces.append(f.index)
-	
-		if self.invert:
-			if choice:
-				choice = False
-			else:
-				choice = True
-		return choice
-	
-	
-	# See if the current item should be selected or not
-	def selectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is not selected we may want to select
-		if not isSelected:
-			
-			# If we are extending or nothing is selected we want to select
-			if extend or not hasSelected:
-				return True
-				
-		return False
-	
-	
-	
-	# See if the current item should be deselected or not
-	def deselectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is selected we may want to deselect
-		if isSelected:
-		
-			# If something is selected and we're not extending we want to deselect
-			if hasSelected and not extend:
-				return True
-
-		return False
-				
-		
-		
-	# See if there is at least one selected item
-	def hasSelected(self, items):
-	
-		for item in items:
-			if item.select:
-				return True
-					
-		return False
-		
-		
-		
-class Select_init(bpy.types.Operator):
-	'''Select faces based on pi'''
-	bl_idname = 'mesh.select_checkered'
-	bl_label = 'Select checkered'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	invert = BoolProperty(name='Invert', description='Invert the selection result', default=False)
-	
-	extend = BoolProperty(name='Extend', description='Extend the current selection', default=False)
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH')
-
-	def execute(self, context):
-		SELECT_DIRECTION = Select_checkered(context, self.invert, self.extend) 
-		return {'FINISHED'}
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_connected_faces.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_connected_faces.py
deleted file mode 100644
index da3e612..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_connected_faces.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# mesh_select_connected_faces.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Extrude a selection from a mesh multiple times
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-'''
-bl_info = {
-	"name": "Select connected faces",
-	"author": "Dolf Veenvliet",
-	"version": 1,
-	"blender": (2, 5, 6),
-	"api": 31847,
-	"location": "View3D > Select",
-	"description": "Select all faces connected to the current selection",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-	
-"""
-Usage:
-
-Launch from from "Select -> Connected faces"
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-'''
-import bpy, mathutils, math
-from bpy.props import IntProperty, BoolProperty
-
-
-class Select_connected_faces():
-
-	# Initialise the class
-	def __init__(self, context, iterations, extend):
-	
-		self.ob = context.active_object
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		# Make a list of all selected vertices
-		selVerts = [v.index for v in self.ob.data.vertices if v.select]
-		
-		hasSelected = self.hasSelected(self.ob.data.polygons)
-		
-		for i in range(iterations):
-		
-			nextVerts = []
-		
-			for f in self.ob.data.polygons:
-			
-				if self.selectCheck(f.select, hasSelected, extend):
-				
-					for v in f.vertices:
-						if v in selVerts:
-							f.select = True
-
-					if f.select:
-						for v in f.vertices:
-							if v not in selVerts:
-								nextVerts.append(v)
-							
-				elif self.deselectCheck(f.select, hasSelected, extend):
-				
-					for v in f.vertices:
-						if v in selVerts:
-							f.select = False
-						
-							
-			selVerts = nextVerts
-		
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-
-		
-	# See if the current item should be selected or not
-	def selectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is not selected we may want to select
-		if not isSelected:
-			return True
-				
-		return False
-	
-	
-	
-	# See if the current item should be deselected or not
-	def deselectCheck(self, isSelected, hasSelected, extend):
-	
-		# If the current item is selected we may want to deselect
-		if isSelected:
-		
-			# If something is selected and we're not extending we want to deselect
-			if hasSelected and not extend:
-				return True
-
-		return False
-		
-		
-		
-	# See if there is at least one selected item
-	def hasSelected(self, items):
-	
-		for item in items:
-			if item.select:
-				return True
-					
-		return False
-		
-		
-		
-class Select_init(bpy.types.Operator):
-	'''Select all faces connected to the current selection'''
-	bl_idname = 'mesh.select_connected_faces'
-	bl_label = 'Select connected faces'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	# Iterations
-	iterations = IntProperty(name='Iterations', default=1, min=0, max=1000, soft_min=0, soft_max=100)
-	
-	extend = BoolProperty(name='Extend', description='Extend the current selection', default=False)
-	
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH' and bpy.context.tool_settings.mesh_select_mode[0] == False and bpy.context.tool_settings.mesh_select_mode[1] == False and bpy.context.tool_settings.mesh_select_mode[2] == True)
-
-	def execute(self, context):
-		SELECT_CONNECTED = Select_connected_faces(context, self.iterations, self.extend) 
-		return {'FINISHED'}
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_innermost.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_select_innermost.py
deleted file mode 100644
index a16241d..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_select_innermost.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# mesh_Select_innermost.py Copyright (C) 2011, Dolf Veenvliet
-#
-# Relaxes selected vertices while retaining the shape as much as possible
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-'''
-bl_info = {
-	"name": "Select innermost",
-	"author": "Dolf Veenvliet",
-	"version": (0,3),
-	"blender": (2, 5, 7),
-	"api": 35851,
-	"location": "Select > Innermost",
-	"description": "Select the innermost faces",
-	"warning": "",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Mesh"}
-
-"""
-Usage:
-
-Launch from "Select -> Innermost"
-
-
-Additional links:
-	Author Site: http://www.macouno.com
-	e-mail: dolf {at} macouno {dot} com
-"""
-'''
-import bpy
-from bpy.props import BoolProperty
-from . import mesh_extras
-
-# Grow stuff!
-class Select_innermost():
-
-	# Initialise the class
-	def __init__(self, context, invert):
-	
-		me = context.active_object.data
-		bpy.ops.object.mode_set(mode='OBJECT')
-		
-		oList = [f.index for f in mesh_extras.get_selected_faces()]
-		oLen = len(oList)
-		
-		# If no faces are selected, we just return
-		if not oLen:
-			bpy.ops.object.mode_set(mode='EDIT')
-			return
-		
-		# If all faces are selected, select nothing and return
-		if oLen == len(me.polygons):
-			bpy.ops.object.mode_set(mode='EDIT')
-			bpy.ops.mesh.select_all(action='DESELECT')
-			return
-		
-		fList = False
-		
-		# If we invert, we just want to select less once, and then we're done
-		if invert:
-			
-			bpy.ops.object.mode_set(mode='EDIT')
-			bpy.ops.mesh.select_less()
-			bpy.ops.object.mode_set(mode='OBJECT')
-			
-			fList = [f.index for f in mesh_extras.get_selected_faces()]
-			
-			# Only if there's now less selected do we change anything
-			if len(fList) < oLen:
-			
-				for f in me.polygons:
-					fIn = f.index
-					if fIn in oList and not fIn in fList:
-						f.select = True
-					else:
-						f.select = False
-						
-			bpy.ops.object.mode_set(mode='EDIT')
-			return
-			
-
-		# So now we can start and see what's up
-		while mesh_extras.contains_selected_item(me.polygons):
-				
-			if fList is False:
-				fList = oList
-			else:
-				fList = [f.index for f in mesh_extras.get_selected_faces()]
-			
-			bpy.ops.object.mode_set(mode='EDIT')
-			bpy.ops.mesh.select_less()
-			bpy.ops.object.mode_set(mode='OBJECT')
-			
-		if len(fList) < oLen:
-			for f in me.faces:
-				if f.index in fList:
-					f.select = True
-				else:
-					f.select = False
-		
-		bpy.ops.object.mode_set(mode='EDIT')
-		
-				
-
-class Select_innermost_init(bpy.types.Operator):
-	'''Select the innermost faces of the current selection'''
-	bl_idname = 'mesh.select_innermost'
-	bl_label = 'Select innermost'
-	bl_options = {'REGISTER', 'UNDO'}
-	
-	invert = BoolProperty(name='Invert', description='Invert the selection result (select outermost)', default=False)
-
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH')
-
-	def execute(self, context):
-		innermost = Select_innermost(context, self.invert)
-		return {'FINISHED'}
-
diff --git a/release/scripts/addons_contrib/mesh_select_tools/mesh_selection_topokit.py b/release/scripts/addons_contrib/mesh_select_tools/mesh_selection_topokit.py
deleted file mode 100644
index 91c8c26..0000000
--- a/release/scripts/addons_contrib/mesh_select_tools/mesh_selection_topokit.py
+++ /dev/null
@@ -1,567 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Topokit 2",
-    "author": "dustractor",
-    "version": (2,0),
-    "blender": (2,6,0),
-    "api": 41935,
-    "location": "edit mesh vertices/edges/faces menus",
-    "description": "",
-    "warning": "",
-    "wiki_url": "",
-    "tracker_url": "",
-    "category": "Mesh"}
-
-
-import bpy
-# In between calls, this stores any data that is expensive or static,
-# matched to the size of the mesh and the id of the operator that created it
-cachedata = dict()
-# and the object keeps the key to the cachedata
-bpy.types.Object.tkkey = bpy.props.IntVectorProperty(size=4)
-
-# just a mix-in for the operators...
-class meshpoller:
-    @classmethod
-    def poll(self,context):
-        try:
-            assert context.active_object.type == "MESH"
-        except:
-            return False
-        finally:
-            return True
-
-#BEGIN VERTICES SECTION
-
-# This one works similarly to normal 'grow' (ctrl + NUMPAD_PLUS),
-# except the original selection is not part of the result,
-#
-#   0--0--0         0--1--0
-#   |  |  |         |  |  |
-#   0--1--0  -->    1--0--1
-#   |  |  |         |  |  |
-#   0--0--0         0--1--0
-#
-class MESH_OT_vneighbors_edgewise(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.v2v_by_edge"
-    bl_label = "Neighbors by Edge"
-    bl_options = {"REGISTER","UNDO"}
-    
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        next_state = bytearray(meshkey[0])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            vert_to_vert_map,prev_state = cachedata[meshkey]
-        else:
-            vert_to_vert_map = {i:{} for i in range(meshkey[0])}
-            for a,b in mesh.edge_keys:
-                vert_to_vert_map[a][b] = 1
-                vert_to_vert_map[b][a] = 1
-            obj.tkkey = meshkey
-            prev_state = None
-        if not prev_state:
-            selected_vert_indices = filter(lambda _:mesh.vertices[_].select,range(len(mesh.vertices)))
-        else:
-            selected_vert_indices = filter(lambda _:mesh.vertices[_].select and not prev_state[_],range(len(mesh.vertices)))
-        for v in selected_vert_indices:
-            for neighbor_index in vert_to_vert_map[v]:
-                next_state[neighbor_index] = True
-        mesh.vertices.foreach_set("select",next_state)
-        cachedata[meshkey] = (vert_to_vert_map,next_state)
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-# This one is an alternate / counterpart to the previous.
-# Think: diagonal opposite corners of a quad
-# NOTE: does not apply to a triangle, since verts have no 'opposite'
-#
-#   0--0--0     1--0--1
-#   |  |  |     |  |  |
-#   0--1--0 --> 0--0--0
-#   |  |  |     |  |  |
-#   0--0--0     1--0--1
-#
-class MESH_OT_vneighbors_facewise(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.v2v_facewise"
-    bl_label = "Neighbors by Face - Edge"
-    bl_options = {"REGISTER","UNDO"}
-    
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        next_state = bytearray(meshkey[0])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            vert_to_vert_map = cachedata[meshkey]
-        else:
-            vert_to_vert_map = {i:{} for i in range(meshkey[0])}
-            for a,b in mesh.edge_keys:
-                vert_to_vert_map[a][b] = 1
-                vert_to_vert_map[b][a] = 1
-            obj.tkkey = meshkey
-        faces = filter(lambda face:(len(face.vertices)==4) and (face.select == False),mesh.polygons)
-        for f in faces:
-            has = False
-            t = set()
-            for v in f.vertices:
-                if mesh.vertices[v].select:
-                    has = True
-                    t.update(vert_to_vert_map[v])
-            if has:
-                for v in f.vertices:
-                    if not mesh.vertices[v].select:
-                        if v not in t:
-                            next_state[v]=1 
-        mesh.vertices.foreach_set("select",next_state)
-        cachedata[meshkey] = vert_to_vert_map
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-def vvmenuitem(self,context):
-    self.layout.operator(MESH_OT_vneighbors_edgewise.bl_idname)
-    self.layout.operator(MESH_OT_vneighbors_facewise.bl_idname)
-    #for the sake of completeness, yes there is one alg missing - one for both...
-
-#END VERTICES SECTION
-#BEGIN EDGES SECTION
-
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--1--+--0--+   --->   +--0--+--0--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-class MESH_OT_eneighbors_shared_v_f(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.e2e_evfe"
-    bl_label = "Neighbors by Vert+Face"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        state_mask = bytearray(meshkey[1])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_to_edges_dict = cachedata
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            edge_to_edges_dict = {i:set() for i in range(len(mesh.edges))}
-            for f in mesh.polygons:
-                fed=[edge_key_to_index[k] for k in f.edge_keys]
-                for k in f.edge_keys:
-                    edge_to_edges_dict[edge_key_to_index[k]].update(fed)
-            obj.tkkey = meshkey
-        for e in filter(lambda _:mesh.edges[_].select,edge_to_edges_dict):
-            k1 = set(mesh.edges[e].key)
-            for n in edge_to_edges_dict[e]:
-                k2 = set(mesh.edges[n].key)
-                if not k1.isdisjoint(k2):
-                    state_mask[n] = True
-        for e in mesh.edges:
-            e.select ^= state_mask[e.index]
-        cachedata[meshkey] = edge_key_to_index
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--1--+--0--+   --->   +--1--+--0--+--1--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-class MESH_OT_eneighbors_shared_v(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.e2e_eve"
-    bl_label = "Neighbors by Vert"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        bpy.ops.object.mode_set(mode="OBJECT")
-        mesh = context.active_object.data
-        state_mask = bytearray(len(mesh.edges))
-        for e in mesh.edges:
-            state_mask[e.index] = mesh.vertices[e.vertices[0]].select ^ mesh.vertices[e.vertices[1]].select
-        mesh.edges.foreach_set('select',state_mask)
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-#   +--0--+--0--+--0--+          +--0--+--1--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--1--+--0--+   --->   +--0--+--0--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     1     1     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--0--+--0--+          +--0--+--1--+--0--+
-class MESH_OT_eneighbors_shared_f(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.e2e_efe"
-    bl_label = "Neighbors by Face"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_to_edges_dict = cachedata
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            edge_to_edges_dict = {i:set() for i in range(len(mesh.edges))}
-            for f in mesh.polygons:
-                fed=[edge_key_to_index[k] for k in f.edge_keys]
-                for k in f.edge_keys:
-                    edge_to_edges_dict[edge_key_to_index[k]].update(fed)
-            obj.tkkey = meshkey
-        state_mask,esel = (bytearray(meshkey[1]),bytearray(meshkey[1]))
-        mesh.edges.foreach_get('select',esel) 
-        for e in filter(lambda _:mesh.edges[_].select,range(meshkey[1])):
-            for n in edge_to_edges_dict[e]:
-                state_mask[n] = 1
-        for e in range(meshkey[1]):
-            esel[e] ^= state_mask[e]
-        mesh.edges.foreach_set('select',esel)
-        cachedata[meshkey] = edge_to_edges_dict
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-# notice that on these next two, the original selection stays
-#   +--0--+--0--+--0--+          +--0--+--1--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     0     0     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--1--+--0--+   --->   +--0--+--1--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     0     0     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--0--+--0--+          +--0--+--1--+--0--+
-class MESH_OT_eneighbors_shared_f_notv(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.e2e_efnve"
-    bl_label = "Lateral Neighbors"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        state_mask = bytearray(meshkey[1])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_to_face_map,edge_key_to_index = cachedata[meshkey]
-        else:   
-            edge_key_to_index = {}
-            edge_to_face_map = {i:set() for i in range(meshkey[1])}
-            for i,k in enumerate(mesh.edge_keys):
-                edge_key_to_index[k] = i
-            for f in mesh.polygons:
-                for k in f.edge_keys:
-                    edge_to_face_map[edge_key_to_index[k]].add(f.index)
-            obj.tkkey = meshkey
-        selected_edge_indices = filter(lambda _:mesh.edges[_].select,range(meshkey[1]))
-        for e in selected_edge_indices:
-            for f in edge_to_face_map[e]:
-                for k in mesh.polygons[f].edge_keys:
-                    hasv_in = False
-                    for v in mesh.edges[e].key:
-                        if v in k:
-                            hasv_in = True
-                    if hasv_in:
-                        continue
-                    else:
-                        state_mask[edge_key_to_index[k]] = True
-        for e in filter(lambda _:state_mask[_],range(meshkey[1])):
-            mesh.edges[e].select |= state_mask[e]
-        cachedata[meshkey] = (edge_to_face_map,edge_key_to_index)
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     0     0     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--1--+--0--+   --->   +--1--+--1--+--1--+
-#   |     |     |     |          |     |     |     |
-#   0     0     0     0          0     0     0     0
-#   |     |     |     |          |     |     |     |
-#   +--0--+--0--+--0--+          +--0--+--0--+--0--+
-class MESH_OT_eneighbors_shared_v_notf(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.e2e_evnfe"
-    bl_label = "Longitudinal Edges"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        state_mask = bytearray(meshkey[1])
-        vstate = bytearray(meshkey[0])
-        mesh.vertices.foreach_get('select',vstate)
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_to_face_map,vert_to_vert_map,edge_key_to_index = cachedata[meshkey]
-        else:
-            edge_key_to_index = {}
-            vert_to_vert_map = {i:set() for i in range(meshkey[0])}
-            edge_to_face_map = {i:set() for i in range(meshkey[1])}
-            for i,k in enumerate(mesh.edge_keys):
-                edge_key_to_index[k] = i
-                vert_to_vert_map[k[0]].add(k[1])
-                vert_to_vert_map[k[1]].add(k[0])
-            for f in mesh.polygons:
-                for k in f.edge_keys:
-                    edge_to_face_map[edge_key_to_index[k]].add(f.index)
-            obj.tkkey = meshkey
-        selected_edge_indices = filter(lambda _:mesh.edges[_].select,range(meshkey[1]))
-        for e in selected_edge_indices:
-            for v in mesh.edges[e].key:
-                state_mask[v] ^=1
-            for f in edge_to_face_map[e]:
-                for v in mesh.polygons[f].vertices:
-                    vstate[v] = 1
-        for v in filter(lambda _:state_mask[_],range(meshkey[1])):
-            for n in vert_to_vert_map[v]:
-                if not vstate[n] and (n != v):
-                    mesh.edges[edge_key_to_index[(min(v,n),max(v,n))]].select = True
-        cachedata[meshkey] = (edge_to_face_map,vert_to_vert_map,edge_key_to_index)
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
- 
-#deselects faces, leaving only edges selected
-class MESH_OT_just_the_edges(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.je"
-    bl_label = "Just the Edge Selection"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        state_mask = bytearray(meshkey[1])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_key_to_index = cachedata[meshkey]
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            obj.tkkey = meshkey
-        for f in filter(lambda _:mesh.polygons[_].select,range(meshkey[2])):
-            for k in mesh.polygons[f].edge_keys:
-                state_mask[edge_key_to_index[k]] = 1
-        for e in range(meshkey[1]):
-            mesh.edges[e].select ^= state_mask[e]
-        cachedata[meshkey] = edge_key_to_index
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-# deselects edges which are at the edge of a face-selection,
-# causing selection to 'shrink in'
-class MESH_OT_inner_edges(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.ie"
-    bl_label = "Inner Edge Selection"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        state_mask = bytearray(meshkey[1])
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_to_face_map = cachedata[meshkey]
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            edge_to_face_map = {i:set() for i in range(meshkey[1])}
-            for f in mesh.polygons:
-                for k in f.edge_keys:
-                    edge_to_face_map[edge_key_to_index[k]].add(f.index)
-            obj.tkkey = meshkey
-        for e in filter(lambda _:mesh.edges[_].select,range(meshkey[1])):
-            for f in edge_to_face_map[e]:
-                if mesh.polygons[f].select:
-                    state_mask[e] ^=1
-        for e in range(meshkey[1]):
-            mesh.edges[e].select ^= state_mask[e]
-        cachedata[meshkey] = edge_to_face_map
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-def eemenuitem(self,context):
-    self.layout.operator(MESH_OT_eneighbors_shared_v_f.bl_idname)
-    self.layout.operator(MESH_OT_eneighbors_shared_v.bl_idname)
-    self.layout.operator(MESH_OT_eneighbors_shared_f.bl_idname)
-    self.layout.operator(MESH_OT_eneighbors_shared_f_notv.bl_idname)
-    self.layout.operator(MESH_OT_eneighbors_shared_v_notf.bl_idname)
-    self.layout.operator(MESH_OT_just_the_edges.bl_idname)
-    self.layout.operator(MESH_OT_inner_edges.bl_idname)
-
-#END EDGES SECTION
-#BEGIN FACES SECTION
-
-# here is another one which functions very similarly to the ctrl+NUMPAD_PLUS 'growth'
-# but it deselects the original selection, of course.
-# This would be your checkerboard-type growth.
-#   [0][0][0]          [0][1][0] 
-#   [0][1][0]   --->   [1][0][1]
-#   [0][0][0]          [0][1][0]
-class MESH_OT_fneighbors_shared_e(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.f2f_fef"
-    bl_label = "Neighbors by Edge"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            face_to_face_map = cachedata[meshkey]
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            edge_to_face_map = {i:set() for i in range(meshkey[1])}
-            for f in mesh.polygons:
-                for k in f.edge_keys:
-                    edge_to_face_map[edge_key_to_index[k]].add(f.index)
-            face_to_face_map = {i:set() for i in range(meshkey[2])}
-            for f in mesh.polygons:
-                for k in f.edge_keys:
-                    face_to_face_map[f.index].update(edge_to_face_map[edge_key_to_index[k]])
-            obj.tkkey = meshkey
-        mask_state = bytearray(meshkey[2])
-        for f in filter(lambda _:mesh.polygons[_].select,range(meshkey[2])):
-            for n in face_to_face_map[f]:
-                mask_state[n] = True
-        for f in range(meshkey[2]):
-            mesh.polygons[f].select ^= mask_state[f]
-        cachedata[meshkey] = face_to_face_map
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-#   [0][0][0]          [1][0][1] 
-#   [0][1][0]   --->   [0][0][0]
-#   [0][0][0]          [1][0][1]
-class MESH_OT_fneighbors_shared_v_note(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.f2f_fvnef"
-    bl_label = "Neighbors by Vert not Edge"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            edge_key_to_index = cachedata[meshkey]
-        else:
-            edge_key_to_index = {k:i for i,k in enumerate(mesh.edge_keys)}
-            obj.tkkey = meshkey
-        state_mask = bytearray(meshkey[2])
-        face_verts = set()
-        for f in filter(lambda _:mesh.polygons[_].select,range(meshkey[2])):
-            face_verts.update(mesh.polygons[f].vertices)
-        for f in filter(lambda _:not mesh.polygons[_].select,range(meshkey[2])):
-            ct = 0
-            for v in mesh.polygons[f].vertices:
-                ct += (v in face_verts)
-            if ct == 1:
-                state_mask[f] = 1
-        mesh.polygons.foreach_set('select',state_mask)
-        cachedata[meshkey] = edge_key_to_index
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-
-# http://en.wikipedia.org/wiki/Conway's_Game_of_Life
-class MESH_OT_conway(meshpoller,bpy.types.Operator):
-    bl_idname = "mesh.conway"
-    bl_label = "Conway"
-    bl_options = {"REGISTER","UNDO"}
-    def execute(self,context):
-        global cachedata
-        bpy.ops.object.mode_set(mode="OBJECT")
-        obj = context.active_object
-        mesh = obj.data
-        meshkey = (len(mesh.vertices),len(mesh.edges),len(mesh.polygons),id(self))
-        if (meshkey == obj.tkkey) and (meshkey in cachedata):
-            vert_to_face_map = cachedata[meshkey]
-        else:
-            vert_to_face_map = {i:set() for i in range(meshkey[0])}
-            for f in mesh.polygons:
-                for v in f.vertices:
-                    vert_to_face_map[v].add(f.index)
-            obj.tkkey = meshkey
-        sel = set()
-        uns = set()
-        F = {i:set() for i in range(meshkey[2])}
-        for f in range(meshkey[2]):
-            for v in mesh.polygons[f].vertices:
-                for n in filter(lambda _: mesh.polygons[_].select and (_ != f),vert_to_face_map[v]):
-                    F[f].add(n)
-        for f in F:
-            if len(F[f]) == 3:
-                sel.add(f)
-            elif len(F[f]) != 2:
-                uns.add(f)
-        for f in range(meshkey[2]):
-            if f in sel:
-                mesh.polygons[f].select = True
-            if f in uns:
-                mesh.polygons[f].select = False
-        cachedata[meshkey] = vert_to_face_map
-        bpy.ops.object.mode_set(mode="EDIT")
-        return {"FINISHED"}
-
-        
-
-def ffmenuitem(self,context):
-    self.layout.operator(MESH_OT_fneighbors_shared_e.bl_idname)
-    self.layout.operator(MESH_OT_fneighbors_shared_v_note.bl_idname)
-    self.layout.operator(MESH_OT_conway.bl_idname)
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.append(vvmenuitem)
-    bpy.types.VIEW3D_MT_edit_mesh_edges.append(eemenuitem)
-    bpy.types.VIEW3D_MT_edit_mesh_faces.append(ffmenuitem)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.remove(vvmenuitem)
-    bpy.types.VIEW3D_MT_edit_mesh_edges.remove(eemenuitem)
-    bpy.types.VIEW3D_MT_edit_mesh_faces.remove(ffmenuitem)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_select_vertex_groups.py b/release/scripts/addons_contrib/mesh_select_vertex_groups.py
deleted file mode 100644
index 4d401a0..0000000
--- a/release/scripts/addons_contrib/mesh_select_vertex_groups.py
+++ /dev/null
@@ -1,234 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': 'Select Vertex Groups',
-    'author': 'Martin Ellison',
-    'version': (1, 0),
-    'blender': (2, 5, 9),
-    'location': 'Toolbox',
-    'description': 'Finds all the vertex groups that chosen verts are in, & any verts that are not in any group',
-    'warning': 'Buggy', # used for warning icon and text in addons panel
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Modeling/Select_Vertex_Groups",
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-        'func=detail&aid=22025',
-    'category': 'Mesh'}
-
-"""
-This script finds all the vertex groups that chosen vertexes are in, and any vertexes that are not in any vertex group.
-
-This is useful for cleaning up a mesh if vertex groups under animation go off to the wrong place (because they are in a vertex group that they should not be in, or not in the vertex group that they should be in).
-
-How to use:
-1. select a mesh and get into edit mode.
-2. by default it will use all vertexes; alternatively, select vertexes of interest and click on 'use selected vertexes'. Note that subsequent selections and deselections of vertexes will not change the set of vertexes to be used, you need to click on these buttons again to do that.
-3. click on 'select' and 'deselect' buttons for listed vertex groups, and for no vertex group, to select and deselect vertexes.
-
-This only lists vertex groups that have used vertexes.
-
-You may want to use the mesh select/deselect all (keyboard A) operator to start.
-
-Once you have the right vertexes selected, you can use the standard vertex groups property editor to add them to or remove them from the desired vertex groups.
-"""
-
-
-import bpy
-from bpy.props import *
-
-global use_selected_only, used_vertexes, the_mesh, vertex_usage
-use_selected_only = False
-used_vertexes = set()
-the_mesh = None
-vertex_usage = ''
-
-class UseAll(bpy.types.Operator):
-    bl_idname = "mesh.primitive_fvg_useall"
-    bl_label = "Use all Vertexes"
-    bl_register = True
-    bl_undo = True
-    #limit = FloatProperty(name="limit", description="Ignore weights under this limit.", default= 0.01, min = 0.0, max = 1.0, soft_min=0.0, soft_max=1.0)
-
-    def execute(self, context):
-        global use_selected_only
-        use_selected_only = False
-        bpy.ops.object.editmode_toggle()
-        set_used()
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-class UseSelected(bpy.types.Operator):
-    bl_idname = "mesh.primitive_fvg_useselected"
-    bl_label = "Use Selected Vertexes"
-    bl_register = True
-    bl_undo = True
-
-    def execute(self, context):
-        global use_selected_only
-        use_selected_only = True
-        bpy.ops.object.editmode_toggle()
-        set_used()
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-class SelectFound(bpy.types.Operator):
-    bl_idname = "mesh.primitive_fvg_selfound"
-    bl_label = "Select"
-    bl_register = True
-    bl_undo = True
-    vertexgroup = bpy.props.StringProperty(name = 'vertexgroup', description = 'vertexgroup', default = '', options = set())
-
-    def execute(self, context):
-        global the_mesh
-        bpy.ops.object.editmode_toggle()
-        vertexgroup = self.properties.vertexgroup
-        fv = found_verts(vertexgroup)
-        for v in fv: v.select = True
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-class DeselectFound(bpy.types.Operator):
-    bl_idname = "mesh.primitive_fvg_deselfound"
-    bl_label = "Deselect"
-    bl_register = True
-    bl_undo = True
-    vertexgroup = bpy.props.StringProperty(name = 'vertexgroup', description = 'vertexgroup', default = '', options = set())
-
-    def execute(self, context):
-        global the_mesh
-        bpy.ops.object.editmode_toggle()
-        vertexgroup = self.properties.vertexgroup
-        fv = found_verts(vertexgroup)
-        for v in fv: v.select = False
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-def set_used():
-    global use_selected_only, used_vertexes, the_mesh, vertex_usage
-    obj = bpy.context.active_object
-    used_vertexes = set()
-    if use_selected_only:
-        for v in obj.data.vertices:
-            if v.select: used_vertexes.add(v.index)
-    else:
-        for v in obj.data.vertices: used_vertexes.add(v.index)
-    the_mesh = obj
-    vertex_usage = '%d vertexes used' % (len(used_vertexes))
-
-
-def make_groups(limit):
-    global used_vertexes
-    vgp = []
-    vgdict = {}
-    vgused = {}
-    obj = bpy.context.active_object
-    all_in_group = True
-    for vg in obj.vertex_groups:
-        vgdict[vg.index] = vg.name
-    for v in obj.data.vertices:
-        in_group = False
-        if v.index in used_vertexes:
-            for g in v.groups:
-                gr = g.group
-                w = g.weight
-                if w > limit:
-                    if not gr in vgused: vgused[gr] = 0
-                    vgused[gr] += 1
-                    in_group = True
-        if not in_group: all_in_group = False
-    if not all_in_group:
-        vgp.append(("no group", "(No group)"))
-    for gn in vgused.keys():
-        name = vgdict[gn]
-        vgp.append((name, '%s has %d vertexes' % (name, vgused[gn]) ))
-    print("%d groups found\n" % len(vgp))
-    return vgp
-
-def found_verts(vertex_group):
-    global used_vertexes
-    vgfound = []
-    obj = bpy.context.active_object
-    if vertex_group == 'no group':
-        for v in obj.data.vertices:
-            if v.index in used_vertexes and (not v.groups):
-                vgfound.append(v)
-    else:
-        vgnum = obj.vertex_groups.find(vertex_group)
-        for v in obj.data.vertices:
-            if v.index in used_vertexes:
-                for g in v.groups:
-                    if g.group == vgnum:
-                        vgfound.append(v)
-                        break
-
-    print('%d vertexes found for %s' % (len(vgfound), vertex_group))
-    return vgfound
-
-
-class VIEW3D_PT_FixVertexGroups(bpy.types.Panel):
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-    bl_label = "Select Vertex Groups"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(self, context):
-        if bpy.context.active_object:
-            obj = bpy.context.active_object
-            if obj.type == 'MESH' and obj.mode == 'EDIT': return True
-        return False
-
-    def draw(self, context):
-        global use_selected_only, used_vertexes, the_mesh, vertex_usage
-
-        if bpy.context.active_object:
-            obj = bpy.context.active_object
-            if obj.type == 'MESH' and obj.mode == 'EDIT':
-                layout = self.layout
-                use_all = layout.operator("mesh.primitive_fvg_useall", "Use all vertexes")
-                layout.operator("mesh.primitive_fvg_useselected", "Use selected vertexes")
-                if use_selected_only:
-                    layout.label(text = 'Using selected vertexes.')
-                else:
-                    layout.label(text = 'Using all vertexes.')
-                layout.label(vertex_usage)
-                if len(used_vertexes) == 0 or obj is not the_mesh: set_used()
-                #layout.prop(use_all, 'limit', slider = True)
-                #groups = make_groups(use_all.limitval)
-                groups = make_groups(0.01)
-                for gp in groups:
-                    layout.label(text = gp[1])
-                    row = layout.row()
-                    sel_op = row.operator("mesh.primitive_fvg_selfound", "Select")
-                    sel_op.vertexgroup = gp[0]
-                    desel_op = row.operator("mesh.primitive_fvg_deselfound", "Deselect")
-                    desel_op.vertexgroup = gp[0]
-
-classes = [UseAll, UseSelected, SelectFound, DeselectFound]
-
-def register():
-    bpy.utils.register_module(__name__)
-    pass
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    pass
-
-if __name__ == "__main__":
-    print('------ executing --------')
-    register()
diff --git a/release/scripts/addons_contrib/mesh_show_vgroup_weights.py b/release/scripts/addons_contrib/mesh_show_vgroup_weights.py
deleted file mode 100644
index 5e2fff7..0000000
--- a/release/scripts/addons_contrib/mesh_show_vgroup_weights.py
+++ /dev/null
@@ -1,471 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-# <pep8 compliant> (Thanks to CodemanX on IRC)
-
-bl_info = {
-    "name": "Show Vertex Groups/Weights",
-    "author": "Jason van Gumster (Fweeb), Bartius Crouch",
-    "version": (0, 7, 1),
-    "blender": (2, 62, 3),
-    "location": "3D View > Properties Region > Show Weights",
-    "description": "Finds the vertex groups of a selected vertex and displays the corresponding weights",
-    "warning": "Requires bmesh",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Modeling/Show_Vertex_Group_Weights",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=30609",
-    "category": "Mesh"}
-
-#TODO - Add button for selecting vertices with no groups
-
-
-import bpy, bmesh, bgl, blf, mathutils
-
-
-# Borrowed/Modified from Bart Crouch's old Index Visualizer add-on
-def calc_callback(self, context):
-    #polling
-    if context.mode != "EDIT_MESH" or len(context.active_object.vertex_groups) == 0:
-        return
-
-    # get color info from theme
-    acol = context.user_preferences.themes[0].view_3d.editmesh_active
-    tcol = (acol[0] * 0.85, acol[1] * 0.85, acol[2] * 0.85)
-    
-    # get screen information
-    mid_x = context.region.width / 2.0
-    mid_y = context.region.height / 2.0
-    width = context.region.width
-    height = context.region.height
-    
-    # get matrices
-    view_mat = context.space_data.region_3d.perspective_matrix
-    ob_mat = context.active_object.matrix_world
-    total_mat = view_mat * ob_mat
-    
-    # calculate location info
-    texts = []
-    locs = []
-    weights  = []
-    me = context.active_object.data
-    bm = bmesh.from_edit_mesh(me)
-    dvert_lay = bm.verts.layers.deform.active
-
-    for v in bm.verts:
-        if v.select: #XXX Should check v.hide here, but it doesn't work
-            if bm.select_mode == {'VERT'} and bm.select_history.active is not None and bm.select_history.active.index == v.index:
-                locs.append([acol[0], acol[1], acol[2], v.index, v.co.to_4d()])
-            else:
-                locs.append([tcol[0], tcol[1], tcol[2], v.index, v.co.to_4d()])
-            dvert = v[dvert_lay]
-            for vgroup in context.active_object.vertex_groups:
-                if vgroup.index in dvert.keys():
-                    weights += [v.index, vgroup.index, dvert[vgroup.index]]
-
-    for loc in locs:
-        vec = total_mat * loc[4] # order is important
-        # dehomogenise
-        vec = mathutils.Vector((vec[0] / vec[3], vec[1] / vec[3], vec[2] / vec[3]))
-        x = int(mid_x + vec[0] * width / 2.0)
-        y = int(mid_y + vec[1] * height / 2.0)
-        texts += [loc[0], loc[1], loc[2], loc[3], x, y, 0]
-
-    # store as ID property in mesh
-    context.active_object.data["show_vgroup_verts"] = texts
-    context.active_object.data["show_vgroup_weights"] = weights
-
-
-# draw in 3d-view
-def draw_callback(self, context):
-    # polling
-    if context.mode != "EDIT_MESH" or len(context.active_object.vertex_groups) == 0:
-        return
-    # retrieving ID property data
-    try:
-        texts = context.active_object.data["show_vgroup_verts"]
-        weights = context.active_object.data["show_vgroup_weights"]
-    except:
-        return
-    if not texts:
-        return
-
-    bm = bmesh.from_edit_mesh(context.active_object.data)
-
-    if bm.select_mode == {'VERT'} and bm.select_history.active is not None:
-        active_vert = bm.select_history.active
-    else:
-        active_vert = None
-
-    # draw
-    blf.size(0, 13, 72)
-    blf.enable(0, blf.SHADOW)
-    blf.shadow(0, 3, 0.0, 0.0, 0.0, 1.0)
-    blf.shadow_offset(0, 2, -2)
-    for i in range(0, len(texts), 7):
-        bgl.glColor3f(texts[i], texts[i+1], texts[i+2])
-        blf.position(0, texts[i+4], texts[i+5], texts[i+6])
-        blf.draw(0, "Vertex " + str(int(texts[i+3])) + ":")
-        font_y = texts[i+5]
-        group_name = ""
-        for j in range(0, len(weights), 3):
-            if int(weights[j]) == int(texts[i+3]):
-                font_y -= 13
-                blf.position(0, texts[i+4] + 10, font_y, texts[i+6])
-                for group in context.active_object.vertex_groups:
-                    if group.index == int(weights[j+1]):
-                        group_name = group.name
-                        break
-                blf.draw(0, group_name + ": %.3f" % weights[j+2])
-        if group_name == "":
-            font_y -= 13
-            blf.position(0, texts[i+4] + 10, font_y, texts[i+6])
-            blf.draw(0, "No Groups")
-
-    # restore defaults
-    blf.disable(0, blf.SHADOW)
-
-
-# operator
-class ShowVGroupWeights(bpy.types.Operator):
-    bl_idname = "view3d.show_vgroup_weights"
-    bl_label = "Show Vertex Group Weights"
-    bl_description = "Toggle the display of the vertex groups and weights for selected vertices"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-    
-    def __del__(self):
-        bpy.context.scene.display_indices = -1
-        clear_properties(full=False)
-    
-    def modal(self, context, event):
-        if context.area:
-            context.area.tag_redraw()
-
-        # removal of callbacks when operator is called again
-        if context.scene.display_indices == -1:
-            context.region.callback_remove(self.handle1)
-            context.region.callback_remove(self.handle2)
-            context.scene.display_indices = 0
-            return {'CANCELLED'}
-        
-        return {'PASS_THROUGH'}
-    
-    def invoke(self, context, event):
-        if context.area.type == 'VIEW_3D':
-            if context.scene.display_indices < 1:
-                # operator is called for the first time, start everything
-                context.scene.display_indices = 1
-                self.handle1 = context.region.callback_add(calc_callback,
-                    (self, context), 'POST_VIEW')
-                self.handle2 = context.region.callback_add(draw_callback,
-                    (self, context), 'POST_PIXEL')
-                context.window_manager.modal_handler_add(self)
-                return {'RUNNING_MODAL'}
-            else:
-                # operator is called again, stop displaying
-                context.scene.display_indices = -1
-                clear_properties(full=False)
-                return {'RUNNING_MODAL'}
-        else:
-            self.report({'WARNING'}, "View3D not found, can't run operator")
-            return {'CANCELLED'}
-
-
-# properties used by the script
-class InitProperties(bpy.types.Operator):
-    bl_idname = "view3d.init_find_weights"
-    bl_label = "Initialize properties for vgroup weights finder"
-    
-    def execute(self, context):
-        bpy.types.Scene.display_indices = bpy.props.IntProperty(
-            name="Display indices",
-            default=0)
-        context.scene.display_indices = 0
-        return {'FINISHED'}
-
-
-# removal of ID-properties when script is disabled
-def clear_properties(full=True):
-    # can happen on reload
-    if bpy.context.scene is None:
-        return
-    
-    if "show_vgroup_verts" in bpy.context.active_object.data.keys():
-        del bpy.context.active_object.data["show_vgroup_verts"]
-    if "show_vgroup_weights" in bpy.context.active_object.data.keys():
-        del bpy.context.active_object.data["show_vgroup_weights"]
-    if full:
-        props = ["display_indices"]
-        for p in props:
-            if p in bpy.types.Scene.bl_rna.properties:
-                exec("del bpy.types.Scene." + p)
-            if p in bpy.context.scene.keys():
-                del bpy.context.scene[p]
-
-
-class AssignVertexWeight(bpy.types.Operator):
-    bl_idname = "mesh.vertex_group_assign"
-    bl_label = "Assign Weights"
-    bl_description = "Assign weights for all of the groups on a specific vertex"
-
-    vgroup_weights = bpy.props.StringProperty(name = "Vertex Group Weights")
-
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-
-    def execute(self, context):
-        me = context.active_object.data
-        bm = bmesh.from_edit_mesh(me)
-        dvert_lay = bm.verts.layers.deform.active
-        weights = eval(self.vgroup_weights) #XXX Would be nice if I didn't have to use an eval
-
-        for v in bm.verts:
-            if v.index == weights["__index__"]:
-                del weights["__index__"]
-                dvert = v[dvert_lay]
-                for vgroup in dvert.keys():
-                    dvert[vgroup] = weights[vgroup]
-                break
-
-        return {'FINISHED'}
-
-
-class RemoveFromVertexGroup(bpy.types.Operator):
-    bl_idname = "mesh.vertex_group_remove"
-    bl_label = "Remove Vertex from Group"
-    bl_description = "Remove a specific vertex from a specific vertex group"
-
-    #XXX abusing vector props here a bit; the first element is the vert index and the second is the group index
-    vert_and_group = bpy.props.IntVectorProperty(name = "Vertex and Group to remove", size = 2)
-
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-
-    def execute(self, context):
-        ob = context.active_object
-        me = ob.data
-        bm = bmesh.from_edit_mesh(me)
-
-        # Save current selection
-        selected_verts = []
-        for v in bm.verts:
-            if v.select is True:
-                selected_verts.append(v.index)
-                if v.index != self.vert_and_group[0]:
-                    v.select = False
-
-        ob.vertex_groups.active_index = self.vert_and_group[1]
-        bpy.ops.object.vertex_group_remove_from()
-
-        # Re-select vertices
-        for v in bm.verts:
-            if v.index in selected_verts:
-                v.select = True
-
-        #XXX Hacky, but there's no other way to update the UI panels
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-class AddToVertexGroup(bpy.types.Operator):
-    bl_idname = "mesh.vertex_group_add"
-    bl_label = "Add Vertex to Group"
-    bl_description = "Add a specific vertex to a specific vertex group"
-
-    def avail_vgroups(self, context):
-        ob = context.active_object
-        bm = bmesh.from_edit_mesh(ob.data)
-        dvert_lay = bm.verts.layers.deform.active
-        items = []
-        self.vertex = bm.select_history.active.index
-
-        dvert = bm.select_history.active[dvert_lay]
-
-        items.append(("-1", "New Vertex Group", "-1", -1))
-
-        for i in ob.vertex_groups:
-            if i.index not in dvert.keys():
-                items.append((i.name, i.name, str(i.index), i.index))
-
-        return items
-
-    vertex = bpy.props.IntProperty()
-    available_vgroups = bpy.props.EnumProperty(items = avail_vgroups, name = "Available Groups")
-
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-
-    def execute(self, context):
-        ob = context.active_object
-        me = ob.data
-        bm = bmesh.from_edit_mesh(me)
-        #print(self.available_vgroups)
-
-        # Save current selection
-        selected_verts = []
-        for v in bm.verts:
-            if v.select is True:
-                selected_verts.append(v.index)
-                if v.index != self.vertex:
-                    v.select = False
-
-        weight = context.tool_settings.vertex_group_weight
-        context.tool_settings.vertex_group_weight = 1.0
-        if self.available_vgroups == "-1":
-            bpy.ops.object.vertex_group_assign(new = True) #XXX Assumes self.vertex is the active vertex
-        else:
-            bpy.ops.object.vertex_group_set_active(group = self.available_vgroups)
-            bpy.ops.object.vertex_group_assign() #XXX Assumes self.vertex is the active vertex
-        context.tool_settings.vertex_group_weight = weight
-
-        # Re-select vertices
-        for v in bm.verts:
-            if v.index in selected_verts:
-                v.select = True
-
-        #XXX Hacky, but there's no other way to update the UI panels
-        bpy.ops.object.editmode_toggle()
-        bpy.ops.object.editmode_toggle()
-        return {'FINISHED'}
-
-
-class PanelShowWeights(bpy.types.Panel):
-    bl_label = "Show Weights"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "UI"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        return context.mode == 'EDIT_MESH'
-
-    def draw(self, context):
-        layout = self.layout
-        ob = context.active_object
-        me = ob.data
-        bm = bmesh.from_edit_mesh(me)
-        dvert_lay = bm.verts.layers.deform.active
-
-        if context.scene.display_indices < 1:
-            layout.operator(ShowVGroupWeights.bl_idname, text = "Show Weights Overlay")
-        else:
-            layout.operator(ShowVGroupWeights.bl_idname, text = "Hide Weights Overlay")
-
-        if len(ob.vertex_groups) > 0:
-            # Active vertex
-            active_vert = bm.select_history.active
-            sub = layout.box()
-            col = sub.column(align = True)
-            if bm.select_mode == {'VERT'} and active_vert is not None:
-                col.label(text = "Active Vertex")
-                row = col.row()
-                row.label(text = "Vertex " + str(active_vert.index) + ":")
-                row.operator_menu_enum("mesh.vertex_group_add", "available_vgroups", text = "Add Group", icon = 'GROUP_VERTEX')
-                has_groups = False
-                vgroup_weights = {}
-
-                for i in me.vertices:
-                    if i.index == active_vert.index:
-                        vgroup_weights["__index__"] = i.index
-                        for j in range(len(i.groups)):
-                            for k in ob.vertex_groups:
-                                if k.index == i.groups[j].group:
-                                    has_groups = True
-                                    split = col.split(percentage = 0.90, align = True)
-                                    vgroup_weights[k.index] = i.groups[j].weight
-                                    row = split.row(align = True)
-                                    row.prop(i.groups[j], "weight", text = k.name, slider = True, emboss = not k.lock_weight)
-                                    row = split.row(align = True)
-                                    row.operator("mesh.vertex_group_remove", text = "R").vert_and_group = (i.index, k.index)
-                
-                if not has_groups:
-                    col.label(text = "    No Groups")
-                else:
-                    col.operator("mesh.vertex_group_assign").vgroup_weights = str(vgroup_weights)
-                layout.separator()
-            else:
-                col.label(text = "No Active Vertex")
-            layout.prop(context.window_manager, "show_vgroups_show_all", toggle = True)
-            # All selected vertices (except for the active vertex)
-            if context.window_manager.show_vgroups_show_all:
-                for v in bm.verts:
-                    if v.select:
-                        if active_vert is not None and v.index == active_vert.index:
-                            continue
-                        sub = layout.box()
-                        col = sub.column(align = True)
-                        col.label(text = "Vertex " + str(v.index) + ":")
-                        has_groups = False
-                        vgroup_weights = {}
-                        for i in me.vertices:
-                            if i.index == v.index:
-                                vgroup_weights["__index__"] = i.index
-                                for j in range(len(i.groups)):
-                                    for k in ob.vertex_groups:
-                                        if k.index == i.groups[j].group:
-                                            has_groups = True
-                                            split = col.split(percentage = 0.90, align = True)
-                                            vgroup_weights[k.index] = i.groups[j].weight
-                                            row = split.row(align = True)
-                                            row.prop(i.groups[j], "weight", text = k.name, slider = True, emboss = not k.lock_weight)
-                                            row = split.row(align = True)
-                                            row.operator("mesh.vertex_group_remove", text = "R").vert_and_group = (i.index, k.index)
-                        if not has_groups:
-                            col.label(text = "    No Groups")
-                        else:
-                            col.operator("mesh.vertex_group_assign").vgroup_weights = str(vgroup_weights)
-        else:
-            layout.label(text = "No Groups")
-
-
-def register():
-    bpy.types.WindowManager.show_vgroups_show_all = bpy.props.BoolProperty(
-        name = "Show All Selected Vertices",
-        description = "Show all vertices with vertex groups assigned to them",
-        default = False)
-    bpy.types.Mesh.assign_vgroup = bpy.props.StringProperty()
-    bpy.utils.register_class(ShowVGroupWeights)
-    bpy.utils.register_class(InitProperties)
-    bpy.ops.view3d.init_find_weights()
-    bpy.utils.register_class(AssignVertexWeight)
-    bpy.utils.register_class(RemoveFromVertexGroup)
-    bpy.utils.register_class(AddToVertexGroup)
-    bpy.utils.register_class(PanelShowWeights)
-    
-
-def unregister():
-    bpy.utils.unregister_class(ShowVGroupWeights)
-    bpy.utils.unregister_class(InitProperties)
-    clear_properties()
-    bpy.utils.unregister_class(AssignVertexWeight)
-    bpy.utils.unregister_class(RemoveFromVertexGroup)
-    bpy.utils.unregister_class(AddToVertexGroup)
-    bpy.utils.unregister_class(PanelShowWeights)
-    del bpy.types.WindowManager.show_vgroups_show_all
-    del bpy.types.Mesh.assign_vgroup
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/mesh_vertex_slide.py b/release/scripts/addons_contrib/mesh_vertex_slide.py
deleted file mode 100644
index 00ecf31..0000000
--- a/release/scripts/addons_contrib/mesh_vertex_slide.py
+++ /dev/null
@@ -1,473 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Vertex slide for Bmesh",
-    "author": "Valter Battioli (ValterVB) and PKHG",
-    "version": (2, 0, 0),
-    "blender": (2, 6, 2),
-    "location": "View3D > Mesh > Vertices (CTRL V-key)",
-    "description": "Slide a vertex along an edge or a line",
-    "warning": "Work only with Blender 2.62 or higher",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Modeling/Vertex_Slide2",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=27561",
-    "category": "Mesh"}
-
-#***********************************************************************
-#ver. 1.0.0: -First version
-#ver. 1.0.1: -Now the mouse wheel select in continuos mode the next vertex
-#            -Add a marker for the vertex to move
-#ver. 1.0.2: -Add check for vertices not selected
-#            -Some cleanup
-#ver. 1.0.3: -Now the movement is proportional to the mouse movement
-#             1/10 of the distance between 2 points for every pixel
-#             mouse movement (1/100 with SHIFT)
-#ver. 1.0.4: all coordinate as far as possible replaced by vectors
-#            view3d_utils are used to define length of an edge on screen!
-#            partial simplified logic by PKHG
-#ver. 1.0.6: Restore continuous slide, code cleanup
-#            Correct the crash with not linked vertex
-#ver. 1.0.7: Restore shift, and some code cleanup
-#ver. 1.0.8: Restore 2 type of sliding with 2 vertex selected
-#ver. 1.0.9: Fix for reverse vector multiplication
-#ver. 1.1.0: Delete debug info, some cleanup and add some comments
-#ver. 1.1.1: Now UNDO work properly
-#ver. 1.1.2: Refactory and some clean of the code.
-#            Add edge drawing (from chromoly vertex slide)
-#            Add help on screen (from chromooly vertex slide)
-#ver. 1.1.3: Now work also with Continuos Grab, some clean on code
-#ver. 1.1.4: Remove a lot of mode switching in Invoke. It was too slow 
-#            with big mesh.
-#ver. 1.1.5: Changed Lay out of the Help and the Key for reverse the 
-#            movement. Left/Right arrow rather than Pus/Minus numpad
-#ver. 1.1.6: Now the vertex movement is always coherent with Mouse movement
-#ver. 2.0.0: Update to Bmesh and remove all mode switching
-#ver. 2.0.1: Replaced Conv3DtoScreen2D function with location_3d_to_region_2d
-#ver. 2.0.2: Fix crash if there are some duplicate vertices
-#***********************************************************************
-
-import bpy
-import bmesh
-import bgl
-import blf
-from mathutils import Vector
-from bpy_extras.view3d_utils import location_3d_to_region_2d as loc3d2d
-
-# Equation of the line
-# Changing t we have a new point coordinate on the line along v0 v1
-# With t from 0 to 1  I move from v0 to v1
-def NewCoordinate(v0, v1, t):
-    return v0 + t * (v1 - v0)
-    
-#  This class store Vertex data
-class Point():
-    def __init__(self):
-        self.original = self.Vertex()  # Original position
-        self.new = self.Vertex()  # New position
-        self.t = 0  # Used for move the vertex
-        self.x2D = 0  # Screen 2D cooord of the point
-        self.y2D = 0  # Screen 2D cooord of the point
-        self.selected = False
-
-    class Vertex():
-        def __init__(self):
-            self.co = None
-            self.idx = None
-            
-class BVertexSlideOperator(bpy.types.Operator):
-    bl_idname = "vertex.slide"
-    bl_label = "Vertex Slide"
-    bl_options = {'REGISTER', 'UNDO', 'GRAB_POINTER', 'BLOCKING', 'INTERNAL'}
-
-    Vertex1 = Point()  # First selected vertex data
-    LinkedVertices1 = []  # List of index of linked verts of Vertex1
-    Vertex2 = Point()  # Second selected vertex data
-    LinkedVertices2 = []  # List of index of linked verts of Vertex2
-    ActiveVertex = None  # Index of vertex to be moved
-    tmpMouse_x = 0
-    tmpMouse = Vector((0, 0))
-    Direction = 1.0  # Used for direction and precision of the movement
-    FirstVertexMove = True  # If true move the first vertex
-    VertLinkedIdx = 0  # Index of LinkedVertices1. Used only for 1 vertex select case
-    LeftAltPress = False  # Flag to know if ALT is hold on
-    LeftShiftPress = False  # Flag to know if SHIFT is hold on
-    obj = None  # Object
-    mesh = None  # Mesh
-    bm = None  # BMesh
-
-    # OpenGL Function to draw on the screen help and pointer *
-    def draw_callback_px(self, context):
-        x, y = loc3d2d(context.region, context.space_data.region_3d, self.bm.verts[self.ActiveVertex].co)
-
-        # Draw an * at the active vertex
-        blf.position(0, x, y, 0)
-        blf.size(0, 26, 72)
-        blf.draw(0, "*")
-
-        #Draw Help
-        yPos=30
-        blf.size(0, 11, context.user_preferences.system.dpi)
-        txtHelp1 = "{SHIFT}:Precision"
-        txtHelp2 = "{WHEEL}:Change the vertex/edge"
-        txtHelp3 = "{ALT}:Continuos slide"
-        txtHelp4 = "{LEFT ARROW}:Reverse the movement"
-        txtHelp5 = "{RIGHT ARROW}:Restore the movement"
-        blf.position(0, 70, yPos, 0)
-        blf.draw(0, txtHelp5)
-        yPos += (int(blf.dimensions(0, txtHelp4)[1]*2))
-        blf.position(0 , 70, yPos, 0)
-        blf.draw(0, txtHelp4)
-        yPos += (int(blf.dimensions(0, txtHelp3)[1]*2))
-        blf.position(0 , 70, yPos, 0)
-        blf.draw(0, txtHelp3)
-        yPos += (int(blf.dimensions(0, txtHelp2)[1]*2))
-        blf.position(0 , 70, yPos, 0)
-        blf.draw(0, txtHelp2)
-        yPos += (int(blf.dimensions(0, txtHelp1)[1]*2))
-        blf.position(0 , 70, yPos, 0)
-        blf.draw(0, txtHelp1)
-
-        # Draw edge
-        bgl.glEnable(bgl.GL_BLEND)
-        bgl.glColor4f(1.0, 0.1, 0.8, 1.0)
-        bgl.glBegin(bgl.GL_LINES)
-        for p in self.LinkedVertices1:
-            bgl.glVertex2f(self.Vertex1.x2D, self.Vertex1.y2D)
-            bgl.glVertex2f(p.x2D, p.y2D)
-        for p in self.LinkedVertices2:
-            bgl.glVertex2f(self.Vertex2.x2D, self.Vertex2.y2D)
-            bgl.glVertex2f(p.x2D, p.y2D)
-        bgl.glEnd()
-
-    # Compute the screen distance of two vertices
-    def ScreenDistance(self, vertex_zero_co, vertex_one_co):
-        matw = bpy.context.active_object.matrix_world
-        V0 = matw * vertex_zero_co
-        res0 = loc3d2d(bpy.context.region, bpy.context.space_data.region_3d, V0)
-        V1 = matw * vertex_one_co
-        res1 = loc3d2d(bpy.context.region, bpy.context.space_data.region_3d, V1)
-        result = (res0 - res1).length
-        return result
-
-    def modal(self, context, event):
-        if event.type == 'MOUSEMOVE':
-            Vertices = self.bm.verts
-            # Calculate the temp t value. Stored in td
-            tmpMouse = Vector((event.mouse_x, event.mouse_y))
-            t_diff = (tmpMouse - self.tmpMouse).length
-            self.tmpMouse = tmpMouse
-            if self.Vertex2.original.idx is not None: # 2 vertex selected
-                td = t_diff * self.Direction / self.ScreenDistance(self.Vertex1.original.co,
-                                                                   self.Vertex2.original.co)
-            else:  # 1 vertex selected
-                td = t_diff * self.Direction / self.ScreenDistance(self.Vertex1.original.co,
-                                                                   self.LinkedVertices1[self.VertLinkedIdx].original.co)
-            if event.mouse_x < self.tmpMouse_x:
-                td = -td
-
-            if self.Vertex2.original.idx is not None: # 2 vertex selected
-                # Calculate the t valuse
-                if self.FirstVertexMove:
-                    self.Vertex1.t = self.Vertex1.t + td
-                else:
-                    self.Vertex2.t = self.Vertex2.t + td
-                # Move the vertex
-                Vertices[self.Vertex1.original.idx].co = NewCoordinate(self.Vertex1.original.co,
-                                                                       self.Vertex2.original.co,
-                                                                       self.Vertex1.t)
-                Vertices[self.Vertex2.original.idx].co = NewCoordinate(self.Vertex2.original.co,
-                                                                       self.Vertex1.original.co,
-                                                                       self.Vertex2.t)
-            else:  # 1 vertex selected
-                if self.LeftAltPress:  # Continuous slide
-                    # Calculate the t valuse
-                    self.Vertex2.t = self.Vertex2.t + td
-                    # Move the vertex
-                    Vertices[self.Vertex1.original.idx].co = NewCoordinate(self.Vertex2.original.co,
-                                                                           self.LinkedVertices1[self.VertLinkedIdx].original.co,
-                                                                           self.Vertex2.t)
-                else:
-                    # Calculate the t valuse
-                    self.LinkedVertices1[self.VertLinkedIdx].t = self.LinkedVertices1[self.VertLinkedIdx].t + td
-                    # Move the vertex
-                    Vertices[self.Vertex1.original.idx].co = NewCoordinate(self.Vertex1.original.co,
-                                                                           self.LinkedVertices1[self.VertLinkedIdx].original.co,
-                                                                           self.LinkedVertices1[self.VertLinkedIdx].t)
-                self.ActiveVertex = self.Vertex1.original.idx
-            self.tmpMouse_x = event.mouse_x
-            context.area.tag_redraw()
-
-        elif event.type == 'LEFT_SHIFT':  # Hold left SHIFT for precision
-            self.LeftShiftPress = not self.LeftShiftPress
-            if self.LeftShiftPress:
-                self.Direction *= 0.1
-            else:
-                if self.Direction < 0:
-                    self.Direction = -1
-                else:
-                    self.Direction = 1
-
-        elif event.type == 'LEFT_ALT':  # Hold ALT to use continuous slide
-            self.LeftAltPress = not self.LeftAltPress
-            if self.LeftAltPress and self.Vertex2.original.idx is None:
-                vert = self.bm.verts[self.Vertex1.original.idx]
-                self.Vertex2.original.co = Vector((vert.co.x, vert.co.y, vert.co.z))
-                self.Vertex2.t = 0
-
-        elif event.type == 'LEFT_ARROW':  # Reverse direction
-            if self.Direction < 0.0:
-                self.Direction = - self.Direction
-
-        elif event.type == 'RIGHT_ARROW':  # Restore direction
-            if self.Direction > 0.0:
-                self.Direction = - self.Direction
-
-        elif event.type == 'WHEELDOWNMOUSE':  # Change the vertex to be moved
-            if self.Vertex2.original.idx is None:
-                if self.LeftAltPress:
-                    vert=self.bm.verts[self.Vertex1.original.idx]
-                    self.Vertex2.original.co = Vector((vert.co.x, vert.co.y, vert.co.z))
-                    self.Vertex2.t = 0
-                self.VertLinkedIdx = self.VertLinkedIdx + 1
-                if self.VertLinkedIdx > len(self.LinkedVertices1) - 1:
-                    self.VertLinkedIdx = 0
-                bpy.ops.mesh.select_all(action='DESELECT')
-                self.bm.verts[self.Vertex1.original.idx].select = True
-                self.bm.verts[self.LinkedVertices1[self.VertLinkedIdx].original.idx].select = True
-            else:
-                self.FirstVertexMove = not self.FirstVertexMove
-                if self.LeftAltPress == False:
-                    self.Vertex1.t = 0
-                    self.Vertex2.t = 0
-                if self.FirstVertexMove:
-                    self.ActiveVertex = self.Vertex1.original.idx
-                else:
-                    self.ActiveVertex = self.Vertex2.original.idx
-            # Keep Vertex movement coherent with Mouse movement
-            if self.Vertex2.original.idx is not None:
-                if self.FirstVertexMove: 
-                    tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                    tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex2.original.co)
-                    if ((tmpX1 > tmpX2 and self.Direction >= 0) or (tmpX2 > tmpX1 and self.Direction >= 0)):
-                        self.Direction = -self.Direction
-                else:
-                    tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex2.original.co)
-                    tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                    if (tmpX1 < tmpX2 and self.Direction < 0) or (tmpX2 < tmpX1 and self.Direction >= 0):
-                        self.Direction = -self.Direction
-            else:
-                tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.LinkedVertices1[self.VertLinkedIdx].original.co)
-                if ((tmpX1 > tmpX2 and self.Direction >= 0) or (tmpX2 > tmpX1 and self.Direction < 0)):
-                    self.Direction = -self.Direction
-            context.area.tag_redraw()
-
-        elif event.type == 'WHEELUPMOUSE':  # Change the vertex to be moved
-            if self.Vertex2.original.idx is None:
-                if self.LeftAltPress:
-                    vert = self.bm.verts[self.Vertex1.original.idx]
-                    self.Vertex2.original.co = Vector((vert.co.x, vert.co.y, vert.co.z))
-                    self.Vertex2.t = 0
-                self.VertLinkedIdx = self.VertLinkedIdx - 1
-                if self.VertLinkedIdx < 0:
-                    self.VertLinkedIdx = len(self.LinkedVertices1) - 1
-                bpy.ops.mesh.select_all(action='DESELECT')
-                self.bm.verts[self.Vertex1.original.idx].select = True
-                self.bm.verts[self.LinkedVertices1[self.VertLinkedIdx].original.idx].select = True
-            else:
-                self.FirstVertexMove = not self.FirstVertexMove
-                if self.LeftAltPress == False:
-                    self.Vertex1.t = 0
-                    self.Vertex2.t = 0
-                if self.FirstVertexMove:
-                    self.ActiveVertex = self.Vertex1.original.idx
-                else:
-                    self.ActiveVertex = self.Vertex2.original.idx
-            # Keep Vertex movement coherent with Mouse movement
-            if self.Vertex2.original.idx is not None:
-                if self.FirstVertexMove: 
-                    tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                    tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex2.original.co)
-                    if ((tmpX1 > tmpX2 and self.Direction >= 0) or (tmpX2 > tmpX1 and self.Direction >= 0)):
-                        self.Direction = -self.Direction
-                else:
-                    tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex2.original.co)
-                    tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                    if (tmpX1 < tmpX2 and self.Direction < 0) or (tmpX2 < tmpX1 and self.Direction >= 0):
-                        self.Direction = -self.Direction
-            else:
-                tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-                tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.LinkedVertices1[self.VertLinkedIdx].original.co)
-                if ((tmpX1 > tmpX2 and self.Direction >= 0) or (tmpX2 > tmpX1 and self.Direction < 0)):
-                    self.Direction = -self.Direction
-            context.area.tag_redraw()
-
-        elif event.type == 'LEFTMOUSE':  # Confirm and exit
-            Vertices = self.bm.verts
-            bpy.ops.mesh.select_all(action='DESELECT')
-            Vertices[self.Vertex1.original.idx].select = True
-            if self.Vertex2.original.idx is not None:
-                Vertices[self.Vertex2.original.idx].select = True
-            context.region.callback_remove(self._handle)
-            context.area.tag_redraw()
-            return {'FINISHED'}
-
-        elif event.type in {'RIGHTMOUSE', 'ESC'}:  # Restore and exit
-            Vertices = self.bm.verts
-            bpy.ops.mesh.select_all(action='DESELECT')
-            Vertices[self.Vertex1.original.idx].co = self.Vertex1.original.co
-            Vertices[self.Vertex1.original.idx].select = True
-            if self.Vertex2.original.idx is not None:
-                Vertices[self.Vertex2.original.idx].co = self.Vertex2.original.co
-                Vertices[self.Vertex2.original.idx].select = True
-            context.region.callback_remove(self._handle)
-            context.area.tag_redraw()
-            return {'CANCELLED'}
-
-        return {'RUNNING_MODAL'}
-
-    def invoke(self, context, event):
-        if context.active_object == None or context.active_object.type != "MESH":
-            self.report({'WARNING'}, "Not any active object or not an mesh object:")
-            return {'CANCELLED'}
-
-        if context.active_object.mode != 'EDIT':
-            self.report({'WARNING'}, "Mesh isn't in Edit Mode")
-            return {'CANCELLED'}
-        
-        self.obj = bpy.context.object
-        self.mesh = self.obj.data
-        self.bm = bmesh.from_edit_mesh(self.mesh)
-
-        Count=0
-        Selected=False
-        SelectedVertices = []  # Index of selected vertices
-        for i, v in enumerate(self.bm.verts):
-            if v.select and v.is_valid:
-                SelectedVertices.append(v.index)
-                Selected = True
-                Count += 1 
-                if (Count > 2):  # More than 2 vertices selected
-                    Selected = False
-                    break
-
-        if Selected == False:
-            self.report({'WARNING'}, "0 or more then 2 vertices selected, could not start")
-            return {'CANCELLED'}
-
-        self.tmpMouse[0], self.tmpMouse[1] = (event.mouse_x, event.mouse_y)
-        self.tmpMouse_x = self.tmpMouse[0]
-
-        self.Vertex1 = Point()
-        self.Vertex2 = Point()
-        self.LinkedVertices1 = []
-        self.LinkedVertices2 = []
-
-        # Store selected vertices data. To move in the first Loop
-        self.Vertex1.original.idx = SelectedVertices[0]
-        self.Vertex1.original.co = self.bm.verts[SelectedVertices[0]].co.copy()
-        self.Vertex1.new = self.Vertex1.original
-        x, y = loc3d2d(context.region, context.space_data.region_3d, self.bm.verts[SelectedVertices[0]].co)  # For draw edge
-        self.Vertex1.x2D = x
-        self.Vertex1.y2D = y
-        if len(SelectedVertices) == 2:
-            self.Vertex2.original.idx = SelectedVertices[1]
-            self.Vertex2.original.co = self.bm.verts[SelectedVertices[1]].co.copy()
-            self.Vertex2.new = self.Vertex2.original
-            x, y = loc3d2d(context.region, context.space_data.region_3d, self.bm.verts[SelectedVertices[1]].co)  # For draw edge
-            self.Vertex2.x2D = x
-            self.Vertex2.y2D = y
-
-        if len(SelectedVertices) == 2:
-            self.bm.verts[self.Vertex2.original.idx].select = False  # Unselect the second selected vertex
-
-        # Store linked vertices data, except the selected vertices
-        for i, vert in enumerate(self.bm.verts[self.Vertex1.original.idx].link_edges):
-            self.LinkedVertices1.append(Point())
-            self.LinkedVertices1[-1].original.idx = vert.other_vert(self.bm.verts[self.Vertex1.original.idx]).index   #e_0.other_vert(v_0).index
-            self.LinkedVertices1[-1].original.co = vert.other_vert(self.bm.verts[self.Vertex1.original.idx]).co.copy()
-            self.LinkedVertices1[-1].new = self.LinkedVertices1[-1].original
-            x, y = loc3d2d(context.region, context.space_data.region_3d, vert.other_vert(self.bm.verts[self.Vertex1.original.idx]).co)  # For draw edge
-            self.LinkedVertices1[-1].x2D = x
-            self.LinkedVertices1[-1].y2D = y
-        if len(SelectedVertices) == 2:
-            for i, vert in enumerate(self.bm.verts[self.Vertex2.original.idx].link_edges):
-                self.LinkedVertices2.append(Point())
-                self.LinkedVertices2[-1].original.idx = vert.other_vert(self.bm.verts[self.Vertex2.original.idx]).index
-                self.LinkedVertices2[-1].original.co = vert.other_vert(self.bm.verts[self.Vertex2.original.idx]).co.copy()
-                self.LinkedVertices2[-1].new = self.LinkedVertices1[-1].original
-                x, y = loc3d2d(context.region, context.space_data.region_3d, vert.other_vert(self.bm.verts[self.Vertex2.original.idx]).co)  # For draw edge
-                self.LinkedVertices2[-1].x2D = x
-                self.LinkedVertices2[-1].y2D = y
-
-        # Check for no linked vertex. Can be happen also with a mix of Select Mode
-        # Need only with 1 vertex selected
-        if len(SelectedVertices) == 1 and len(self.LinkedVertices1) == 0:
-            self.report({'WARNING'}, "Isolated vertex or mixed Select Mode!")
-            return {'CANCELLED'}
-        # Check for duplicate vertices. If some linked vertice have the same coords of selected vertice
-        # we have the error "division by 0
-        if self.Vertex1.original.co == self.Vertex2.original.co:
-            self.report({'WARNING'}, "At least one duplicate vertex")
-            return {'CANCELLED'}
-            
-        self.bm.verts[self.Vertex1.original.idx].select = True  # Select the first selected vertex
-        if len(SelectedVertices) == 2:
-            self.bm.verts[self.Vertex2.original.idx].select = True  # Select the second selected vertex
-        else:
-            self.bm.verts[self.LinkedVertices1[0].original.idx].select = True  # Select the first linked vertex
-        self.ActiveVertex = self.Vertex1.original.idx
-
-        # Keep Vertex movement coherent with Mouse movement
-        tmpX1, tmpY1 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex1.original.co)
-        if len(SelectedVertices) == 2:
-            tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.Vertex2.original.co)
-        else:
-            tmpX2, tmpY2 = loc3d2d(context.region, context.space_data.region_3d, self.LinkedVertices1[0].original.co)
-        if tmpX2 - tmpX1 < 0:
-            self.Direction = -self.Direction
-
-        context.area.tag_redraw()  # Force the redraw of the 3D View
-
-        # Add the region OpenGL drawing callback
-        # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
-        self._handle = context.region.callback_add(self.__class__.draw_callback_px, (self, context), 'POST_PIXEL')
-        context.window_manager.modal_handler_add(self)
-        return {'RUNNING_MODAL'}
-
-def menu_func(self, context):
-    self.layout.operator_context = "INVOKE_DEFAULT"
-    self.layout.operator(BVertexSlideOperator.bl_idname, text="Vertex Slide Bmesh")
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.prepend(menu_func)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_MT_edit_mesh_vertices.remove(menu_func)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/object_batch_rename_datablocks.py b/release/scripts/addons_contrib/object_batch_rename_datablocks.py
deleted file mode 100644
index 7281b99..0000000
--- a/release/scripts/addons_contrib/object_batch_rename_datablocks.py
+++ /dev/null
@@ -1,187 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Batch Rename Datablocks",
-    "author": "tstscr",
-    "version": (1, 0),
-    "blender": (2, 5, 9),
-    "location": "Search > (rename)",
-    "description": "Batch renaming of datablocks (e.g. rename materials after objectnames)",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Object/Batch_Rename_Datablocks",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=25242",
-    "category": "Object"}
-
-
-import bpy
-from bpy.props import *
-
-def get_first_material_name(ob):
-    for m_slot in ob.material_slots:
-        if m_slot.material:
-            material_name = m_slot.material.name
-            return material_name
-
-def get_name(self, ob):
-    if self.naming_base == 'Object':
-        return ob.name
-    
-    if self.naming_base == 'Mesh':
-        if ob.data: return ob.data.name
-        else: return ob.name
-    
-    if self.naming_base == 'Material':
-        material_name = get_first_material_name(ob)
-        if not material_name: return ob.name
-        else: return material_name
-
-    if self.naming_base == 'Custom':
-        return self.rename_custom
-    
-    
-def rename_datablocks_main(self, context):
-    obs = context.selected_editable_objects
-    for ob in obs:
-        name = get_name(self, ob)
-        
-        if self.rename_object:
-            if (self.rename_use_prefix
-            and self.prefix_object):
-                ob.name = self.rename_prefix + name
-            else:
-                ob.name = name
-        
-        if self.rename_data:
-            if (ob.data
-            and ob.data.users == 1):
-                if (self.rename_use_prefix
-                and self.prefix_data):
-                    ob.data.name = self.rename_prefix + name
-                else:
-                    ob.data.name = name
-        
-        if self.rename_material:
-            if ob.material_slots:
-                for m_slot in ob.material_slots:
-                    if m_slot.material:
-                        if m_slot.material.users == 1:
-                            if (self.rename_use_prefix
-                            and self.prefix_material):
-                                m_slot.material.name = self.rename_prefix + name
-                            else:
-                                m_slot.material.name = name
-
-class OBJECT_OT_batch_rename_datablocks(bpy.types.Operator):
-    """Batch rename Datablocks"""
-    bl_idname = "object.batch_rename_datablocks"
-    bl_label = "Batch Rename Datablocks"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    name_origins = [
-                    ('Object', 'Object', 'Object'),
-                    ('Mesh', 'Mesh', 'Mesh'),
-                    ('Material', 'Material', 'Material'),
-                    ('Custom', 'Custom', 'Custom')
-                    ]
-    naming_base = EnumProperty(name='Name after:',
-                                items=name_origins)
-    rename_custom = StringProperty(name='Custom Name',
-                                default='New Name',
-                                description='Rename all with this String')
-    rename_object = BoolProperty(name='Rename Objects',
-                                default=False,
-                                description='Rename Objects')
-    rename_data = BoolProperty(name='Rename Data',
-                                default=True,
-                                description='Rename Object\'s Data')
-    rename_material = BoolProperty(name='Rename Materials',
-                                default=True,
-                                description='Rename Objects\' Materials')
-    rename_use_prefix = BoolProperty(name='Add Prefix',
-                                default=False,
-                                description='Prefix Objectnames with first Groups name')
-    rename_prefix = StringProperty(name='Prefix',
-                                default='',
-                                description='Prefix name with this string')
-    prefix_object = BoolProperty(name='Object',
-                                default=True,
-                                description='Prefix Object Names')
-    prefix_data = BoolProperty(name='Data',
-                                default=True,
-                                description='Prefix Data Names')
-    prefix_material = BoolProperty(name='Material',
-                                default=True,
-                                description='Prefix Material Names')
-
-    dialog_width = 260
-
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column()
-        col.label(text='Rename after:')
-        
-        row = layout.row()
-        row.prop(self.properties, 'naming_base', expand=True)
-        
-        col = layout.column()
-        col.prop(self.properties, 'rename_custom')
-
-        col.separator()
-        col.label('Datablocks to rename:')
-        col.prop(self.properties, 'rename_object')
-        col.prop(self.properties, 'rename_data')
-        col.prop(self.properties, 'rename_material')
-        
-        col.separator()
-        col.prop(self.properties, 'rename_use_prefix')
-        col.prop(self.properties, 'rename_prefix')
-        
-        row = layout.row()
-        row.prop(self.properties, 'prefix_object')
-        row.prop(self.properties, 'prefix_data')
-        row.prop(self.properties, 'prefix_material')
-        
-        col = layout.column()
-        
-    @classmethod
-    def poll(cls, context):
-        return context.selected_objects != None
-
-    def execute(self, context):
-
-        rename_datablocks_main(self, context)
-        
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        wm.invoke_props_dialog(self, self.dialog_width)
-        return {'RUNNING_MODAL'}
-        
-        
-def register():
-    bpy.utils.register_module(__name__)
-    pass
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    pass
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/object_creaprim.py b/release/scripts/addons_contrib/object_creaprim.py
deleted file mode 100644
index ab58bc3..0000000
--- a/release/scripts/addons_contrib/object_creaprim.py
+++ /dev/null
@@ -1,442 +0,0 @@
-
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# If you have Internet access, you can find the license text at
-# http://www.gnu.org/licenses/gpl.txt,
-# if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-# --------------------------------------------------------------------------
-
-__bpydoc__ = """\
-CreaPrim does what it says. I takes the active object and turns it into an Add Mesh addon.	When you
-enable this, your custom object will be added to the Add->Mesh menu.
-
-
-Documentation
-
-Go to User Preferences->Addons and enable the CreaPrim addon in the Object section.
-First select your object or objects.  The addon will show up in the 3dview properties panel.	
-The name (in panel) will be set to the active object name.	Select "Apply transform" if you
-want transforms to be applied to the selected objects.	Modifiers will taken into account.
-You can always change this. Just hit the button and the selected
-objects will be saved in your addons folder as an Add Mesh addon with the name 
-"add_mesh_XXXX.py" with XXXX being your object name.  The addon will show up in User
-Preferences->Addons in the Add Mesh section.  
-Enable this addon et voila, your new custom primitive will now show up in the Add Mesh menu.
-
-REMARK - dont need to be admin anymore - saves to user scripts dir
-			
-ALSO - dont forget to Apply rotation and scale to have your object show up correctly
-"""
-
-bl_info = {
-    "name": "CreaPrim",
-    "author": "Gert De Roost",
-    "version": (0, 3, 9),
-    "blender": (2, 6, 4),
-    "location": "View3D > Object Tools",
-    "description": "Create primitive addon",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=32801",
-    "category": "Object"}
-
-if "bpy" in locals():
-	import imp
-
-
-import bpy
-import bmesh
-import os
-
-
-started = 0
-oldname = ""
-
-bpy.types.Scene.Name = bpy.props.StringProperty(
-			name="Name",
-			description="name for primitive",
-			maxlen= 1024)
-
-bpy.types.Scene.Apply = bpy.props.BoolProperty(
-		name = "Apply transform", 
-		description = "apply transform to selected objects",
-		default = False)
-
-
-class CreaPrim(bpy.types.Operator):
-	bl_idname = "object.creaprim"
-	bl_label = "CreaPrim"
-	bl_description = "Create primitive addon."
-	bl_options = {"REGISTER"}
-	
-	
-	@classmethod
-	def poll(cls, context):
-		obj = context.active_object
-		return (obj and obj.type == 'MESH' and context.mode == 'OBJECT')
-
-	def invoke(self, context, event):
-		
-		global oldname, groupname, message
-		
-		scn = bpy.context.scene
-				
-		objlist = []
-		for selobj in bpy.context.scene.objects:
-			if selobj.select:
-				objlist.append(selobj)
-				
-		try:
-			direc = bpy.utils.script_paths()[1]
-			scriptdir = 1
-		except:
-			direc = bpy.utils.script_paths()[0]
-			scriptdir = 0
-		if len(objlist) > 1:
-			groupname = scn.Name
-			groupname = groupname.replace(".", "")
-			addondir = direc + os.sep + "addons" + os.sep + "add_mesh_" + groupname + os.sep
-			if not os.path.exists(addondir):
-				os.makedirs(addondir)
-		else:
-			groupname = scn.Name
-			print (bpy.utils.script_paths())
-			addondir = direc + os.sep + "addons" + os.sep
-			print (addondir)
-			if not os.path.exists(addondir):
-				os.makedirs(addondir)
-			
-		actobj = bpy.context.active_object
-		txtlist = []
-		namelist = []
-		for selobj in objlist:
-			if len(objlist) == 1:
-				objname = scn.Name
-			else:
-				objname = selobj.name
-				objname = objname.replace(".", "")
-				namelist.append(objname)
-			mesh = selobj.to_mesh(scn, True, "PREVIEW")
-			oldname = selobj.name
-			scn.objects.active = selobj
-			if scn.Apply:
-				bpy.ops.object.transform_apply(location=False, rotation=True, scale=True)
-			txt = do_creaprim(self, mesh, objname, addondir)
-			if txt == 0:
-				return {'CANCELLED'}
-			txtlist.append(txt)
-		oldname = actobj.name
-		scn.objects.active = actobj
-			
-		if len(txtlist) > 1:
-			makeinit(txtlist, namelist, groupname, addondir)
-			bpy.ops.wm.addon_enable(module="add_mesh_" + groupname)
-		else:
-			bpy.ops.wm.addon_enable(module="add_mesh_" + str.lower(objname))
-			
-		if scriptdir == 1:
-			message = "Add Mesh addon " + groupname + " saved to user scripts directory."
-		else:
-			message = "Add Mesh addon " + groupname + " saved to main scripts directory."
-		bpy.ops.creaprim.message('INVOKE_DEFAULT')
-		
-		return {'FINISHED'}
-
-
-class MessageOperator(bpy.types.Operator):
-	bl_idname = "creaprim.message"
-	bl_label = "Saved"
-	 
-	def invoke(self, context, event):
-		wm = context.window_manager
-		return wm.invoke_popup(self, width=500, height=20)
-		return {'FINISHED'}
- 
-	def draw(self, context):
-		
-		global groupname
-		
-		layout = self.layout
-		row = layout.row()
-		row.label(text = '', icon = "PLUGIN")
-		row.label(message)
-		
-def panel_func(self, context):
-	
-	global started
-	
-	scn = bpy.context.scene
-		
-	self.layout.label(text="CreaPrim:")
-	self.layout.operator("object.creaprim", text="Create primitive", icon = 'PLUGIN')
-	self.layout.prop(scn, "Name")
-	self.layout.prop(scn, "Apply")
-
-def register():
-	bpy.utils.register_module(__name__)
-	bpy.types.VIEW3D_PT_tools_objectmode.append(panel_func)
-	bpy.app.handlers.scene_update_post.append(setname)
-	
-def unregister():
-	bpy.utils.unregister_module(__name__)
-	bpy.types.VIEW3D_PT_tools_objectmode.remove(panel_func)
-	bpy.app.handlers.scene_update_post.remove(setname)
-
-if __name__ == "__main__":
-	register()
-
-
-
-
-def do_creaprim(self, mesh, objname, addondir):
-	
-	global message
-	
-	objname = objname.replace(".", "")
-	bm = bmesh.new()
-	bm.from_mesh(mesh)	
-	
-	
-	try:
-		txt = bpy.data.texts[str.lower("add_mesh_" + objname) + ".py"]
-		txt.clear()
-	except:
-		txt = bpy.data.texts.new("add_mesh_" + str.lower(objname) + ".py")
-	
-	strlist = []
-	strlist.append("bl_info = {\n")
-	strlist.append("\"name\": \"" + objname + "\", \n")
-	strlist.append("\"author\": \"Gert De Roost\",\n")
-	strlist.append("\"version\": (1, 0, 0),\n")
-	strlist.append("\"blender\": (2, 6, 3),\n")
-	strlist.append("\"location\": \"Add > Mesh\",\n")
-	strlist.append("\"description\": \"Create " + objname + " primitive.\",\n")
-	strlist.append("\"warning\": \"\",\n")
-	strlist.append("\"wiki_url\": \"\",\n")
-	strlist.append("\"tracker_url\": \"\",\n")
-	strlist.append("\"category\": \"Add Mesh\"}\n")
-	strlist.append("\n")
-	strlist.append("\n") 
-	strlist.append("if \"bpy\" in locals():\n")
-	strlist.append("	   import imp\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("import bpy\n")
-	strlist.append("import bmesh\n")
-	strlist.append("import math\n")
-	strlist.append("from mathutils import *\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("class " + objname + "(bpy.types.Operator):\n")
-	strlist.append("	bl_idname = \"mesh." + str.lower(objname) + "\"\n")
-	strlist.append("	bl_label = \"" + objname + "\"\n")
-	strlist.append("	bl_options = {\'REGISTER\', \'UNDO\'}\n")
-	strlist.append("	bl_description = \"add " + objname + " primitive\"\n")
-	strlist.append("\n")
-	strlist.append("	def invoke(self, context, event):\n")
-	strlist.append("\n")
-	strlist.append("		mesh = bpy.data.meshes.new(name=\"" + objname + "\")\n")
-	strlist.append("		obj = bpy.data.objects.new(name=\"" + objname + "\", object_data=mesh)\n")
-	strlist.append("		scene = bpy.context.scene\n")
-	strlist.append("		scene.objects.link(obj)\n")
-	strlist.append("		obj.location = scene.cursor_location\n")
-	strlist.append("		bm = bmesh.new()\n")
-	strlist.append("		bm.from_mesh(mesh)\n")
-	strlist.append("\n")
-	strlist.append("		idxlist = []\n")
-	posn = 0
-	strlist.append("		vertlist = [")
-	for v in bm.verts:
-		if posn > 0:
-			strlist.append(", ")
-		posn += 1
-		strlist.append(str(v.co[:]))
-	strlist.append("]\n")	
-	strlist.append("		for co in vertlist:\n")
-	strlist.append("			v = bm.verts.new(co)\n")
-	strlist.append("			bm.verts.index_update()\n")
-	strlist.append("			idxlist.append(v.index)\n")
-	posn = 0
-	strlist.append("		edgelist = [")
-	for e in bm.edges:
-		if posn > 0:
-			strlist.append(", ")
-		posn += 1
-		strlist.append("[" + str(e.verts[0].index) + ", " + str(e.verts[1].index) + "]")
-	strlist.append("]\n")	
-	strlist.append("		for verts in edgelist:\n")
-	strlist.append("			bm.edges.new((bm.verts[verts[0]], bm.verts[verts[1]]))\n")
-	posn1 = 0
-	strlist.append("		facelist = [(")
-	for f in bm.faces:
-		if posn1 > 0:
-			strlist.append(", (")
-		posn1 += 1
-		posn2 = 0
-		for v in f.verts:
-			if posn2 > 0:
-				strlist.append(", ")
-			strlist.append(str(v.index))
-			posn2 += 1
-		strlist.append(")")
-	strlist.append("]\n")	
-	strlist.append("		for verts in facelist:\n")
-	strlist.append("			vlist = []\n")	
-	strlist.append("			for idx in verts:\n")	
-	strlist.append("				vlist.append(bm.verts[idxlist[idx]])\n")	
-	strlist.append("			bm.faces.new(vlist)\n")
-	strlist.append("\n")
-	strlist.append("		bm.to_mesh(mesh)\n")
-	strlist.append("		mesh.update()\n")
-	strlist.append("		bm.free()\n")	
-	strlist.append("		obj.rotation_quaternion = (Matrix.Rotation(math.radians(90), 3, \'X\').to_quaternion())\n")
-	strlist.append("\n")
-	strlist.append("		return {\'FINISHED\'}\n")
-		
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n") 
-	strlist.append("def menu_item(self, context):\n")	
-	strlist.append("	   self.layout.operator(" + objname + ".bl_idname, text=\"" + objname + "\", icon=\"PLUGIN\")\n")
-	strlist.append("\n") 
-	strlist.append("def register():\n")
-	strlist.append("	   bpy.utils.register_module(__name__)\n")
-	strlist.append("	   bpy.types.INFO_MT_mesh_add.append(menu_item)\n")
-	strlist.append("\n") 
-	strlist.append("def unregister():\n")
-	strlist.append("	   bpy.utils.unregister_module(__name__)\n")
-	strlist.append("	   bpy.types.INFO_MT_mesh_add.remove(menu_item)\n")
-	strlist.append("\n") 
-	strlist.append("if __name__ == \"__main__\":\n") 
-	strlist.append("	   register()\n")	
-	endstring = ''.join(strlist)
-	txt.write(endstring)
-	
-	try:
-		fileobj = open(addondir + "add_mesh_" + str.lower(objname) + ".py", "w")
-	except:
-		message = "Permission problem - cant write file - run Blender as Administrator!"
-		bpy.ops.creaprim.message('INVOKE_DEFAULT')
-		return 0
-
-	fileobj.write(endstring)
-	fileobj.close()
-	
-	bm.free()
-	
-	return txt
-	
-	
-def makeinit(txtlist, namelist, groupname, addondir):
-	
-	global message
-	
-	try:
-		txt = bpy.data.texts["__init__.py"]
-		txt.clear()
-	except:
-		txt = bpy.data.texts.new("__init__.py")
-	
-	strlist = []
-	strlist.append("bl_info = {\n")
-	strlist.append("\"name\": \"" + groupname + "\", \n")
-	strlist.append("\"author\": \"Gert De Roost\",\n")
-	strlist.append("\"version\": (1, 0, 0),\n")
-	strlist.append("\"blender\": (2, 6, 3),\n")
-	strlist.append("\"location\": \"Add > Mesh\",\n")
-	strlist.append("\"description\": \"Create " + groupname + " primitive group.\",\n")
-	strlist.append("\"warning\": \"\",\n")
-	strlist.append("\"wiki_url\": \"\",\n")
-	strlist.append("\"tracker_url\": \"\",\n")
-	strlist.append("\"category\": \"Add Mesh\"}\n")
-	strlist.append("\n")
-	strlist.append("\n") 
-	strlist.append("if \"bpy\" in locals():\n")
-	strlist.append("	import imp\n")
-	addonlist = []
-	for txt in txtlist:
-		name = txt.name.replace(".py", "")
-		addonlist.append(name)
-	for name in addonlist:
-		strlist.append("	imp.reload(" + name + ")\n")	
-	strlist.append("else:\n")
-	for name in addonlist:
-		strlist.append("	from . import " + name + "\n")	
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("import bpy\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("class INFO_MT_mesh_" + str.lower(groupname) + "_add(bpy.types.Menu):\n")
-	strlist.append("	bl_idname = \"INFO_MT_mesh_" + str.lower(groupname) + "_add\"\n")
-	strlist.append("	bl_label = \"" + groupname + "\"\n")
-	strlist.append("\n")
-	strlist.append("	def draw(self, context):\n")
-	strlist.append("		layout = self.layout\n")
-#		 layout.operator_context = 'INVOKE_REGION_WIN'
-	for name in namelist:
-		strlist.append("		layout.operator(\"mesh." + str.lower(name) + "\", text=\"" + name + "\")\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n")
-	strlist.append("\n") 
-	strlist.append("def menu_item(self, context):\n")	
-	strlist.append("	   self.layout.menu(\"INFO_MT_mesh_" + str.lower(groupname) + "_add\", icon=\"PLUGIN\")\n")
-	strlist.append("\n") 
-	strlist.append("def register():\n")
-	strlist.append("	   bpy.utils.register_module(__name__)\n")
-	strlist.append("	   bpy.types.INFO_MT_mesh_add.append(menu_item)\n")
-	strlist.append("\n") 
-	strlist.append("def unregister():\n")
-	strlist.append("	   bpy.utils.unregister_module(__name__)\n")
-	strlist.append("	   bpy.types.INFO_MT_mesh_add.remove(menu_item)\n")
-	strlist.append("\n") 
-	strlist.append("if __name__ == \"__main__\":\n") 
-	strlist.append("	   register()\n")	
-	endstring = ''.join(strlist)
-	txt.write(endstring)
-	
-	try:
-		fileobj = open(addondir + "__init__.py", "w")
-	except:
-		message = "Permission problem - cant write file - run Blender as Administrator!"
-		bpy.ops.creaprim.message('INVOKE_DEFAULT')
-		return 0
-	fileobj.write(endstring)
-	fileobj.close()
-
-
-
-def setname(dummy):
-	
-	global oldname
-	
-	scn = bpy.context.scene
-	
-	if bpy.context.active_object.name != oldname:
-		scn.Name = bpy.context.active_object.name
-		oldname = scn.Name
-	
-	
-	
-
diff --git a/release/scripts/addons_contrib/object_drop_to_ground.py b/release/scripts/addons_contrib/object_drop_to_ground.py
deleted file mode 100644
index 477b109..0000000
--- a/release/scripts/addons_contrib/object_drop_to_ground.py
+++ /dev/null
@@ -1,181 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-bl_info = {
-    'name': 'Drop to Ground',
-    'author': 'Unnikrishnan(kodemax), Florian Meyer(testscreenings)',
-    'version': (1,2),
-    "blender": (2, 6, 3),
-    'location': '3D View -> Tool Shelf -> Object Tools Panel (at the bottom)',
-    'description': 'Drop selected objects on active object',
-    'warning': '',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/Drop_to_ground',
-    "tracker_url": "http://projects.blender.org/tracker/?func=detail&atid=25349",
-    'category': 'Object'}
-#################################################################
-import bpy, bmesh
-from mathutils import *
-from bpy.types import Operator
-from bpy.props import *
-#################################################################
-def get_align_matrix(location, normal):
-    up = Vector((0,0,1))                      
-    angle = normal.angle(up)
-    axis = up.cross(normal)                            
-    mat_rot = Matrix.Rotation(angle, 4, axis) 
-    mat_loc = Matrix.Translation(location)
-    mat_align = mat_rot * mat_loc                      
-    return mat_align
-
-def transform_ground_to_world(sc, ground):
-    tmpMesh = ground.to_mesh(sc, True, 'PREVIEW')
-    tmpMesh.transform(ground.matrix_world)
-    tmp_ground = bpy.data.objects.new('tmpGround', tmpMesh)
-    sc.objects.link(tmp_ground)
-    sc.update()
-    return tmp_ground
-
-def get_lowest_world_co_from_mesh(ob, mat_parent=None):
-    bme = bmesh.new()
-    bme.from_object(ob)
-    mat_to_world = ob.matrix_world.copy()
-    if mat_parent:
-        mat_to_world = mat_parent * mat_to_world
-    lowest=None
-    #bme.verts.index_update() #probably not needed
-    for v in bme.verts:
-        if not lowest:
-            lowest = v
-        if (mat_to_world * v.co).z < (mat_to_world * lowest.co).z:
-            lowest = v
-    lowest_co = mat_to_world * lowest.co
-    bme.free()
-    return lowest_co
-
-def get_lowest_world_co(context, ob, mat_parent=None):
-    if ob.type == 'MESH':
-        return get_lowest_world_co_from_mesh(ob)
-    
-    elif ob.type == 'EMPTY' and ob.dupli_type == 'GROUP':
-        if not ob.dupli_group:
-            return None
-        
-        else:
-            lowest_co = None
-            for ob_l in ob.dupli_group.objects:
-                if ob_l.type == 'MESH':
-                    lowest_ob_l = get_lowest_world_co_from_mesh(ob_l, ob.matrix_world)
-                    if not lowest_co:
-                        lowest_co = lowest_ob_l
-                    if lowest_ob_l.z < lowest_co.z:
-                        lowest_co = lowest_ob_l
-                        
-            return lowest_co
-
-def drop_objects(self, context):
-    ground = context.object
-    obs = context.selected_objects
-    obs.remove(ground)
-    tmp_ground = transform_ground_to_world(context.scene, ground)
-    down = Vector((0, 0, -10000))
-    
-    for ob in obs:
-        if self.use_origin:
-            lowest_world_co = ob.location
-        else:
-            lowest_world_co = get_lowest_world_co(context, ob)
-        if not lowest_world_co:
-            print(ob.type, 'is not supported. Failed to drop', ob.name)
-            continue
-        hit_location, hit_normal, hit_index = tmp_ground.ray_cast(lowest_world_co,
-                                                                  lowest_world_co + down)
-        if hit_index == -1:
-            print(ob.name, 'didn\'t hit the ground')
-            continue
-        
-        # simple drop down
-        to_ground_vec =  hit_location - lowest_world_co
-        ob.location += to_ground_vec
-        
-        # drop with align to hit normal
-        if self.align:
-            to_center_vec = ob.location - hit_location #vec: hit_loc to origin
-            # rotate object to align with face normal
-            mat_normal = get_align_matrix(hit_location, hit_normal)
-            rot_euler = mat_normal.to_euler()
-            mat_ob_tmp = ob.matrix_world.copy().to_3x3()
-            mat_ob_tmp.rotate(rot_euler)
-            mat_ob_tmp = mat_ob_tmp.to_4x4()
-            ob.matrix_world = mat_ob_tmp
-            # move_object to hit_location
-            ob.location = hit_location
-            # move object above surface again
-            to_center_vec.rotate(rot_euler)
-            ob.location += to_center_vec
-        
-
-    #cleanup
-    bpy.ops.object.select_all(action='DESELECT')
-    tmp_ground.select = True
-    bpy.ops.object.delete('EXEC_DEFAULT')
-    for ob in obs:
-        ob.select = True
-    ground.select = True
-    
-#################################################################
-class OBJECT_OT_drop_to_ground(Operator):
-    """Drop selected objects on active object"""
-    bl_idname = "object.drop_on_active"
-    bl_label = "Drop to Ground"
-    bl_options = {'REGISTER', 'UNDO'}
-    bl_description = "Drop selected objects on active object"
-
-    align = BoolProperty(
-            name="Align to ground",
-            description="Aligns the object to the ground",
-            default=True)
-    use_origin = BoolProperty(
-            name="Use Center",
-            description="Drop to objects origins",
-            default=False)
-
-    ##### POLL #####
-    @classmethod
-    def poll(cls, context):
-        return len(context.selected_objects) >= 2
-    
-    ##### EXECUTE #####
-    def execute(self, context):
-        print('\nDropping Objects')
-        drop_objects(self, context)
-        return {'FINISHED'}
-
-#################################################################
-def drop_to_ground_button(self, context):
-    self.layout.operator(OBJECT_OT_drop_to_ground.bl_idname,
-                         text="Drop to Ground")
-    
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.VIEW3D_PT_tools_objectmode.append(drop_to_ground_button)
-    
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.VIEW3D_PT_tools_objectmode.remove(drop_to_ground_button)
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/object_edit_linked.py b/release/scripts/addons_contrib/object_edit_linked.py
deleted file mode 100644
index a649f3d..0000000
--- a/release/scripts/addons_contrib/object_edit_linked.py
+++ /dev/null
@@ -1,185 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Edit Linked Library",
-    "author": "Jason van Gumster (Fweeb)",
-    "version": (0, 7, 1),
-    "blender": (2, 6, 0),
-    "location": "View3D > Toolshelf > Edit Linked Library",
-    "description": "Allows editing of objects linked from a .blend library.",
-    "wiki_url": "http://wiki.blender.org/index.php?title=Extensions:2.6/Py/Scripts/Object/Edit_Linked_Library",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=29630",
-    "category": "Object"}
-    
-
-import bpy
-from bpy.app.handlers import persistent
-
-settings = {
-    "original_file": "",
-    "linked_file": "",
-    "linked_objects": [],
-    }
-
- at persistent
-def linked_file_check(context):
-    if settings["linked_file"] != "":
-        if settings["linked_file"] in {bpy.data.filepath, bpy.path.abspath(bpy.data.filepath)}:
-            print("Editing a linked library.")
-            bpy.ops.object.select_all(action = 'DESELECT')
-            for ob_name in settings["linked_objects"]:
-                bpy.data.objects[ob_name].select = True
-            if len(settings["linked_objects"]) == 1:
-                bpy.context.scene.objects.active = bpy.data.objects[settings["linked_objects"][0]]
-        else:
-            # For some reason, the linked editing session ended (failed to find a file or opened a different file before returning to the originating .blend)
-            settings["original_file"] = ""
-            settings["linked_file"] = ""
-
-
-
-class EditLinked(bpy.types.Operator):
-    """Edit Linked Library"""
-    bl_idname = "object.edit_linked"
-    bl_label = "Edit Linked Library"
-
-    autosave = bpy.props.BoolProperty(name = "Autosave", description = "Automatically save the current file before opening the linked library", default = True)
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None
-
-    def execute(self, context):
-        #print(bpy.context.active_object.library)
-        target = context.active_object
-
-        if target.dupli_group and target.dupli_group.library:
-            targetpath = target.dupli_group.library.filepath
-            settings["linked_objects"].extend([ob.name for ob in target.dupli_group.objects])
-        elif target.library:
-            targetpath = target.library.filepath
-            settings["linked_objects"].append(target.name)
-
-        if targetpath:
-            print(target.name + " is linked to " + targetpath)
-
-            if self.properties.autosave == True:
-                bpy.ops.wm.save_mainfile()
-
-            settings["original_file"] = bpy.data.filepath
-
-            # XXX: need to test for proxied rigs
-            settings["linked_file"] = bpy.path.abspath(targetpath)
-
-            bpy.ops.wm.open_mainfile(filepath=settings["linked_file"])
-            print("Opened linked file!")
-        else:
-            self.report({'WARNING'}, target.name + " is not linked")
-            print(target.name + " is not linked")
-
-        return {'FINISHED'}
-
-
-class ReturnToOriginal(bpy.types.Operator):
-    """Return to the original file after editing the linked library .blend"""
-    bl_idname = "wm.return_to_original"
-    bl_label = "Return to Original File"
-
-    autosave = bpy.props.BoolProperty(name = "Autosave", description = "Automatically save the current file before opening original file", default = True)
-
-    @classmethod
-    def poll(cls, context):
-        # Probably the wrong context to check for here...
-        return context.active_object is not None
-    
-    def execute(self, context):
-        if self.properties.autosave == True:
-            bpy.ops.wm.save_mainfile()
-        bpy.ops.wm.open_mainfile(filepath=settings["original_file"])
-        settings["original_file"] = ""
-        settings["linked_objects"] = []
-        print("Back to the original!")
-        return {'FINISHED'}
-
-
-# UI
-# TODO: Add operators to the File menu? Hide the entire panel for non-linked objects?
-class PanelLinkedEdit(bpy.types.Panel):
-    bl_label = "Edit Linked Library"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-
-
-    def draw(self, context):
-        kc = bpy.context.window_manager.keyconfigs.addon
-        km = kc.keymaps["3D View"]
-        kmi_edit = km.keymap_items["object.edit_linked"]
-        kmi_return = km.keymap_items["wm.return_to_original"]
-
-        if settings["original_file"] == "" and ((context.active_object.dupli_group and context.active_object.dupli_group.library is not None) or context.active_object.library is not None):
-            kmi_edit.active = True
-            kmi_return.active = False
-            self.layout.operator("object.edit_linked").autosave = context.scene.edit_linked_autosave
-            self.layout.prop(context.scene, "edit_linked_autosave")
-        elif settings["original_file"] != "":
-            kmi_edit.active = False
-            kmi_return.active = True
-            self.layout.operator("wm.return_to_original").autosave = context.scene.edit_linked_autosave
-            self.layout.prop(context.scene, "edit_linked_autosave")
-        else:
-            kmi_edit.active = False
-            kmi_return.active = False
-            self.layout.label(text = "Active object is not linked")
-
-
-def register():
-    bpy.app.handlers.load_post.append(linked_file_check)
-    bpy.utils.register_class(EditLinked)
-    bpy.utils.register_class(ReturnToOriginal)
-    bpy.utils.register_class(PanelLinkedEdit)
-
-    # Is there a better place to store this property?
-    bpy.types.Scene.edit_linked_autosave = bpy.props.BoolProperty(name = "Autosave", description = "Automatically save the current file before opening a linked file", default = True)
-
-    # Keymapping (deactivated by default; activated when a library object is selected)
-    kc = bpy.context.window_manager.keyconfigs.addon
-    km = kc.keymaps.new(name = "3D View", space_type='VIEW_3D')
-    kmi = km.keymap_items.new("object.edit_linked", 'NUMPAD_SLASH', 'PRESS', shift = True)
-    kmi.active = False
-    kmi = km.keymap_items.new("wm.return_to_original", 'NUMPAD_SLASH', 'PRESS', shift = True)
-    kmi.active = False
-
-
-def unregister():
-    bpy.utils.unregister_class(EditLinked)
-    bpy.utils.unregister_class(ReturnToOriginal)
-    bpy.utils.unregister_class(PanelLinkedEdit)
-    bpy.app.handlers.load_post.remove(linked_file_check)
-
-    del bpy.types.Scene.edit_linked_autosave
-
-    kc = bpy.context.window_manager.keyconfigs.addon
-    km = kc.keymaps["3D View"]
-    km.keymap_items.remove(km.keymap_items["object.edit_linked"])
-    km.keymap_items.remove(km.keymap_items["wm.return_to_original"])
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/object_laplace_lightning.py b/release/scripts/addons_contrib/object_laplace_lightning.py
deleted file mode 100644
index 41fc957..0000000
--- a/release/scripts/addons_contrib/object_laplace_lightning.py
+++ /dev/null
@@ -1,1244 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-bl_info = {
-    "name": "Laplacian Lightning",
-    "author": "teldredge",
-    "version": (0, 2, 6),
-    "blender": (2, 6, 1),
-    "location": "View3D > ToolShelf > Laplacian Lightning",
-    "description": "Lightning mesh generator using laplacian growth algorithm",
-    "warning": "Beta/Buggy.",
-    "wiki_url": "http://www.funkboxing.com/wordpress/?p=301",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"
-                   "func=detail&aid=27189",
-    "category": "Object"}
-        
-######################################################################
-######################################################################
-##################### BLENDER LAPLACIAN LIGHTNING ####################
-############################ teldredge ###############################
-######################## www.funkboxing.com ##########################
-######################################################################
-######################## using algorithm from ########################
-######################################################################
-############## FAST SIMULATION OF LAPLACIAN GROWTH (FSLG) ############
-#################### http://gamma.cs.unc.edu/FRAC/ ###################
-######################################################################
-###################### and a few ideas ideas from ####################
-######################################################################
-##### FAST ANIMATION OF LIGHTNING USING AN ADAPTIVE MESH (FALUAM) ####
-################ http://gamma.cs.unc.edu/FAST_LIGHTNING/ #############
-######################################################################
-######################################################################
-"""           -----RELEASE LOG/NOTES/PONTIFICATIONS-----
-v0.1.0 - 04.11.11
-    basic generate functions and UI
-    object creation report (Custom Properties: FSLG_REPORT)
-v0.2.0 - 04.15.11
-    started spelling laplacian right.
-    add curve function (not in UI) ...twisting problem
-    classify stroke by MAIN path, h-ORDER paths, TIP paths
-    jitter cells for mesh creation
-    add materials if present
-v0.2.1 - 04.16.11
-    mesh classification speedup
-v0.2.2 - 04.21.11
-    fxns to write/read array to file 
-    restrict growth to insulator cells (object bounding box)
-    origin/ground defineable by object
-    gridunit more like 'resolution'
-v0.2.3 - 04.24.11
-    cloud attractor object (termintates loop if hit)
-    secondary path orders (hOrder) disabled in UI (set to 1)
-v0.2.4 - 04.26.11
-    fixed object selection in UI
-    will not run if required object not selected   
-    moved to view 3d > toolbox
-v0.2.5 - 05.08.11
-    testing for 2.57b
-    single mesh output (for build modifier)
-    speedups (dist fxn)
-v0.2.6 - 06.20.11
-    scale/pos on 'write to cubes' works now
-    if origin obj is mesh, uses all verts as initial charges
-    semi-helpful tooltips
-    speedups, faster dedupe fxn, faster classification
-    use any shape mesh obj as insulator mesh
-        must have rot=0, scale=1, origin set to geometry
-        often fails to block bolt with curved/complex shapes
-    separate single and multi mesh creation
-
-v0.x -
-    -fix vis fxn to only buildCPGraph once for VM or VS
-    -improve list fxns (rid of ((x,y,z),w) and use (x,y,z,w)), use 'sets'
-    -create python cmodule for a few of most costly fxns
-        i have pretty much no idea how to do this yet
-    -cloud and insulator can be groups of MESH objs
-    -?text output, possibly to save on interrupt, allow continue from text
-    -?hook modifiers from tips->sides->main, weight w/ vert groups
-    -user defined 'attractor' path
-    -fix add curve function
-    -animated arcs via. ionization path    
-    -environment map boundary conditions - requires Eqn. 15 from FSLG...
-    -?assign wattage at each segment for HDRI
-    -?default settings for -lightning, -teslacoil, -spark/arc
-    -fix hOrder functionality
-    -multiple 'MAIN' brances for non-lightning discharges
-    -n-symmetry option, create mirror images, snowflakes, etc...
-"""
-
-######################################################################
-######################################################################
-######################################################################
-import bpy
-import time
-import random
-from math import sqrt
-from mathutils import Vector
-import struct
-import bisect
-import os.path
-notZero = 0.0000000001
-scn = bpy.context.scene
-
-######################################################################
-########################### UTILITY FXNS #############################
-######################################################################
-def within(x,y,d):
-###---CHECK IF x-d <= y <= x+d
-    if x-d <= y and x + d >= y:
-        return True
-    else: return False
-
-def dist(ax, ay, az ,bx, by, bz):
-    dv = Vector((ax,ay,az)) - Vector((bx,by,bz))
-    d = dv.length
-    return d
-
-def splitList(aList, idx):
-    ll = []
-    for x in aList:
-        ll.append(x[idx])
-    return ll
-
-def splitListCo(aList):
-    ll = []
-    for p in aList:
-        ll.append((p[0], p[1], p[2]))
-    return ll
-
-def getLowHigh(aList):
-    tLow = aList[0]; tHigh = aList[0]
-    for a in aList:
-        if a < tLow: tLow = a
-        if a > tHigh: tHigh = a
-    return tLow, tHigh
-
-def weightedRandomChoice(aList):
-    tL = []
-    tweight = 0
-    for a in range(len(aList)):
-        idex = a; weight = aList[a]
-        if weight > 0.0:
-            tweight += weight
-            tL.append((tweight, idex))
-    i = bisect.bisect(tL, (random.uniform(0, tweight), None))    
-    r = tL[i][1]
-    return r
-
-def getStencil3D_26(x,y,z):
-    nL = []
-    for xT in range(x-1, x+2):
-        for yT in range(y-1, y+2):
-            for zT in range(z-1, z+2):
-                nL.append((xT, yT, zT))
-    nL.remove((x,y,z))
-    return nL
-
-def jitterCells(aList, jit):
-    j = jit/2
-    bList = []
-    for a in aList:
-        ax = a[0] + random.uniform(-j, j)
-        ay = a[1] + random.uniform(-j, j)
-        az = a[2] + random.uniform(-j, j)
-        bList.append((ax, ay, az))
-    return bList
-
-def deDupe(seq, idfun=None): 
-###---THANKS TO THIS GUY - http://www.peterbe.com/plog/uniqifiers-benchmark
-    if idfun is None:
-        def idfun(x): return x
-    seen = {}
-    result = []
-    for item in seq:
-        marker = idfun(item)
-        if marker in seen: continue
-        seen[marker] = 1
-        result.append(item)
-    return result
-
-######################################################################
-######################## VISUALIZATION FXNS ##########################
-######################################################################
-def writeArrayToVoxel(arr, filename):
-    gridS = 64
-    half = int(gridS/2)
-    bitOn = 255
-    aGrid = [[[0 for z in range(gridS)] for y in range(gridS)] for x in range(gridS)]
-    for a in arr:
-        try:
-            aGrid[a[0]+half][a[1]+half][a[2]+half] = bitOn
-        except:
-            print('Particle beyond voxel domain')
-    file = open(filename, "wb")
-    for z in range(gridS):
-        for y in range(gridS):
-            for x in range(gridS):
-                file.write(struct.pack('B', aGrid[x][y][z]))
-    file.flush()
-    file.close()
-        
-def writeArrayToFile(arr, filename):
-    file = open(filename, "w")
-    for a in arr:
-        tstr = str(a[0]) + ',' + str(a[1]) + ',' + str(a[2]) + '\n'
-        file.write(tstr)
-    file.close
-
-def readArrayFromFile(filename):
-    file = open(filename, "r")
-    arr = []
-    for f in file:
-        pt = f[0:-1].split(',')
-        arr.append((int(pt[0]), int(pt[1]), int(pt[2])))
-    return arr
-
-def makeMeshCube(msize):
-    msize = msize/2
-    mmesh = bpy.data.meshes.new('q')
-    mmesh.vertices.add(8)
-    mmesh.vertices[0].co = [-msize, -msize, -msize]
-    mmesh.vertices[1].co = [-msize,  msize, -msize]
-    mmesh.vertices[2].co = [ msize,  msize, -msize]
-    mmesh.vertices[3].co = [ msize, -msize, -msize]
-    mmesh.vertices[4].co = [-msize, -msize,  msize]
-    mmesh.vertices[5].co = [-msize,  msize,  msize]
-    mmesh.vertices[6].co = [ msize,  msize,  msize]
-    mmesh.vertices[7].co = [ msize, -msize,  msize]
-    mmesh.faces.add(6)
-    mmesh.faces[0].vertices_raw = [0,1,2,3]
-    mmesh.faces[1].vertices_raw = [0,4,5,1]
-    mmesh.faces[2].vertices_raw = [2,1,5,6]
-    mmesh.faces[3].vertices_raw = [3,2,6,7]
-    mmesh.faces[4].vertices_raw = [0,3,7,4]
-    mmesh.faces[5].vertices_raw = [5,4,7,6]
-    mmesh.update(calc_edges=True)
-    return(mmesh)
-
-def writeArrayToCubes(arr, gridBU, orig, cBOOL = False, jBOOL = True):
-    for a in arr:
-        x = a[0]; y = a[1]; z = a[2]
-        me = makeMeshCube(gridBU)
-        ob = bpy.data.objects.new('xCUBE', me)
-        ob.location.x = (x*gridBU) + orig[0]
-        ob.location.y = (y*gridBU) + orig[1]
-        ob.location.z = (z*gridBU) + orig[2]
-        if cBOOL: ###---!!!MOSTLY UNUSED
-            ###   POS+BLUE, NEG-RED, ZERO:BLACK
-            col = (1.0, 1.0, 1.0, 1.0)
-            if a[3] == 0: col = (0.0, 0.0, 0.0, 1.0)
-            if a[3] < 0: col = (-a[3], 0.0, 0.0, 1.0)
-            if a[3] > 0: col = (0.0, 0.0, a[3], 1.0)                
-            ob.color = col
-        bpy.context.scene.objects.link(ob)
-        bpy.context.scene.update()
-    if jBOOL:
-        ###---SELECTS ALL CUBES w/ ?bpy.ops.object.join() b/c
-        ###   CAN'T JOIN ALL CUBES TO A SINGLE MESH RIGHT... ARGH...
-        for q in bpy.context.scene.objects:
-            q.select = False
-            if q.name[0:5] == 'xCUBE':
-                q.select = True
-                bpy.context.scene.objects.active = q
-
-def addVert(ob, pt, conni = -1):
-    mmesh = ob.data
-    mmesh.vertices.add(1)
-    vcounti = len(mmesh.vertices)-1
-    mmesh.vertices[vcounti].co = [pt[0], pt[1], pt[2]]
-    if conni > -1:
-        mmesh.edges.add(1)
-        ecounti = len(mmesh.edges)-1
-        mmesh.edges[ecounti].vertices = [conni, vcounti]
-        mmesh.update()
-
-def addEdge(ob, va, vb):
-    mmesh = ob.data
-    mmesh.edges.add(1)
-    ecounti = len(mmesh.edges)-1
-    mmesh.edges[ecounti].vertices = [va, vb]
-    mmesh.update()    
-
-def newMesh(mname):
-    mmesh = bpy.data.meshes.new(mname)
-    omesh = bpy.data.objects.new(mname, mmesh)
-    bpy.context.scene.objects.link(omesh)
-    return omesh      
-
-def writeArrayToMesh(mname, arr, gridBU, rpt = None):
-    mob = newMesh(mname)
-    mob.scale = (gridBU, gridBU, gridBU)
-    if rpt: addReportProp(mob, rpt)
-    addVert(mob, arr[0], -1)
-    for ai in range(1, len(arr)):
-        a = arr[ai]
-        addVert(mob, a, ai-1)
-    return mob        
-
-###---!!!OUT OF ORDER - SOME PROBLEM WITH IT ADDING (0,0,0)
-def writeArrayToCurves(cname, arr, gridBU, bd = .05, rpt = None):
-    cur = bpy.data.curves.new('fslg_curve', 'CURVE')
-    cur.use_fill_front = False
-    cur.use_fill_back = False    
-    cur.bevel_depth = bd
-    cur.bevel_resolution = 2    
-    cob = bpy.data.objects.new(cname, cur)
-    cob.scale = (gridBU, gridBU, gridBU)
-    if rpt: addReportProp(cob, rpt)
-    bpy.context.scene.objects.link(cob)
-    cur.splines.new('BEZIER')
-    cspline = cur.splines[0]
-    div = 1 ###   SPACING FOR HANDLES (2 - 1/2 WAY, 1 - NEXT BEZIER)
-    for a in range(len(arr)):
-        cspline.bezier_points.add(1)
-        bp = cspline.bezier_points[len(cspline.bezier_points)-1]
-        if a-1 < 0: hL = arr[a]
-        else:
-            hx = arr[a][0] - ((arr[a][0]-arr[a-1][0]) / div)
-            hy = arr[a][1] - ((arr[a][1]-arr[a-1][1]) / div)
-            hz = arr[a][2] - ((arr[a][2]-arr[a-1][2]) / div)
-            hL = (hx,hy,hz)
-        
-        if a+1 > len(arr)-1: hR = arr[a]
-        else:
-            hx = arr[a][0] + ((arr[a+1][0]-arr[a][0]) / div)
-            hy = arr[a][1] + ((arr[a+1][1]-arr[a][1]) / div)
-            hz = arr[a][2] + ((arr[a+1][2]-arr[a][2]) / div)
-            hR = (hx,hy,hz)
-        bp.co = arr[a]
-        bp.handle_left = hL
-        bp.handle_right = hR
-
-def addArrayToMesh(mob, arr):
-    addVert(mob, arr[0], -1)
-    mmesh = mob.data
-    vcounti = len(mmesh.vertices)-1
-    for ai in range(1, len(arr)):
-        a = arr[ai]
-        addVert(mob, a, len(mmesh.vertices)-1)
-
-def addMaterial(ob, matname):
-    mat = bpy.data.materials[matname]
-    ob.active_material = mat
-
-def writeStokeToMesh(arr, jarr, MAINi, HORDERi, TIPSi, orig, gs, rpt=None):
-    ###---MAIN BRANCH
-    print('   WRITING MAIN BRANCH')
-    llmain = []
-    for x in MAINi:
-        llmain.append(jarr[x])
-    mob = writeArrayToMesh('la0MAIN', llmain, gs)
-    mob.location = orig       
-
-    ###---hORDER BRANCHES
-    for hOi in range(len(HORDERi)):
-        print('   WRITING ORDER', hOi)        
-        hO = HORDERi[hOi]
-        hob = newMesh('la1H'+str(hOi))
-
-        for y in hO:
-            llHO = []
-            for x in y:
-                llHO.append(jarr[x])
-            addArrayToMesh(hob, llHO)
-        hob.scale = (gs, gs, gs)
-        hob.location = orig
-
-    ###---TIPS
-    print('   WRITING TIP PATHS')    
-    tob = newMesh('la2TIPS')
-    for y in  TIPSi:
-        llt = []        
-        for x in y:
-            llt.append(jarr[x])
-        addArrayToMesh(tob, llt)
-    tob.scale = (gs, gs, gs)
-    tob.location = orig
-
-    ###---ADD MATERIALS TO OBJECTS (IF THEY EXIST)    
-    try:
-        addMaterial(mob, 'edgeMAT-h0')
-        addMaterial(hob, 'edgeMAT-h1')
-        addMaterial(tob, 'edgeMAT-h2')
-        print('   ADDED MATERIALS')
-    except: print('   MATERIALS NOT FOUND')
-    ###---ADD GENERATION REPORT TO ALL MESHES
-    if rpt:
-        addReportProp(mob, rpt)
-        addReportProp(hob, rpt)
-        addReportProp(tob, rpt)                
-
-def writeStokeToSingleMesh(arr, jarr, orig, gs, mct, rpt=None): 
-    sgarr = buildCPGraph(arr, mct)
-    llALL = []
-
-    Aob = newMesh('laALL')
-    for pt in jarr:
-        addVert(Aob, pt)
-    for cpi in range(len(sgarr)):
-        ci = sgarr[cpi][0]
-        pi = sgarr[cpi][1]
-        addEdge(Aob, pi, ci)
-    Aob.location = orig
-    Aob.scale = ((gs,gs,gs))
-
-    if rpt:
-        addReportProp(Aob, rpt)
-
-def visualizeArray(cg, oob, gs, vm, vs, vc, vv, rst):
-###---IN: (cellgrid, origin, gridscale,
-###   mulimesh, single mesh, cubes, voxels, report sting)
-    origin = oob.location
-
-    ###---DEAL WITH VERT MULTI-ORIGINS
-    oct = 2
-    if oob.type == 'MESH': oct = len(oob.data.vertices)
-
-    ###---JITTER CELLS
-    if vm or vs: cjarr = jitterCells(cg, 1)
-
-
-    if vm:  ###---WRITE ARRAY TO MULTI MESH
-        
-        aMi, aHi, aTi = classifyStroke(cg, oct, scn.HORDER)
-        print(':::WRITING TO MULTI-MESH')        
-        writeStokeToMesh(cg, cjarr, aMi, aHi, aTi, origin, gs, rst)
-        print(':::MULTI-MESH WRITTEN')
-
-    if vs:  ###---WRITE TO SINGLE MESH
-        print(':::WRITING TO SINGLE MESH')         
-        writeStokeToSingleMesh(cg, cjarr, origin, gs, oct, rst)
-        print(':::SINGLE MESH WRITTEN')
-        
-    if vc:  ###---WRITE ARRAY TO CUBE OBJECTS
-        print(':::WRITING TO CUBES')
-        writeArrayToCubes(cg, gs, origin)
-        print(':::CUBES WRITTEN')
-
-    if vv:  ###---WRITE ARRAY TO VOXEL DATA FILE
-        print(':::WRITING TO VOXELS')
-        fname = "FSLGvoxels.raw"
-        path = os.path.dirname(bpy.data.filepath)
-        writeArrayToVoxel(cg, path + "\\" + fname)
-        print(':::VOXEL DATA WRITTEN TO - ', path + "\\" + fname)
-
-    ###---READ/WRITE ARRAY TO FILE (MIGHT NOT BE NECESSARY)
-    #tfile = 'c:\\testarr.txt'
-    #writeArrayToFile(cg, tfile)
-    #cg = readArrayFromFile(tfile)
-
-    ###---READ/WRITE ARRAY TO CURVES (OUT OF ORDER)
-    #writeArrayToCurves('laMAIN', llmain, .10, .25)        
-
-######################################################################
-########################### ALGORITHM FXNS ###########################
-########################## FROM FALUAM PAPER #########################
-###################### PLUS SOME STUFF I MADE UP #####################
-######################################################################
-def buildCPGraph(arr, sti = 2):
-###---IN -XYZ ARRAY AS BUILT BY GENERATOR
-###---OUT -[(CHILDindex, PARENTindex)]
-###   sti - start index, 2 for Empty, len(me.vertices) for Mesh
-    sgarr = []
-    sgarr.append((1, 0)) #
-    for ai in range(sti, len(arr)):
-        cs = arr[ai]
-        cpts = arr[0:ai]
-        cslap = getStencil3D_26(cs[0], cs[1], cs[2])
-
-        for nc in cslap:
-            ct = cpts.count(nc)
-            if ct>0:
-                cti = cpts.index(nc)
-        sgarr.append((ai, cti))
-    return sgarr
-
-def buildCPGraph_WORKINPROGRESS(arr, sti = 2):
-###---IN -XYZ ARRAY AS BUILT BY GENERATOR
-###---OUT -[(CHILDindex, PARENTindex)]
-###   sti - start index, 2 for Empty, len(me.vertices) for Mesh
-    sgarr = []
-    sgarr.append((1, 0)) #
-    ctix = 0
-    for ai in range(sti, len(arr)):		
-        cs = arr[ai]
-        #cpts = arr[0:ai]
-        cpts = arr[ctix:ai]
-        cslap = getStencil3D_26(cs[0], cs[1], cs[2])
-        for nc in cslap:
-            ct = cpts.count(nc)
-            if ct>0:
-                #cti = cpts.index(nc)
-                cti = ctix + cpts.index(nc)
-                ctix = cpts.index(nc)
-				
-        sgarr.append((ai, cti))
-    return sgarr
-
-def findChargePath(oc, fc, ngraph, restrict = [], partial = True):
-    ###---oc -ORIGIN CHARGE INDEX, fc -FINAL CHARGE INDEX
-    ###---ngraph -NODE GRAPH, restrict- INDEX OF SITES CANNOT TRAVERSE
-    ###---partial -RETURN PARTIAL PATH IF RESTRICTION ENCOUNTERD
-    cList = splitList(ngraph, 0)
-    pList = splitList(ngraph, 1)
-    aRi = []
-    cNODE = fc
-    for x in range(len(ngraph)):
-        pNODE = pList[cList.index(cNODE)]
-        aRi.append(cNODE)
-        cNODE = pNODE
-        npNODECOUNT = cList.count(pNODE)
-        if cNODE == oc:             ###   STOP IF ORIGIN FOUND
-            aRi.append(cNODE)       ###   RETURN PATH
-            return aRi
-        if npNODECOUNT == 0:        ###   STOP IF NO PARENTS
-            return []               ###   RETURN []
-        if pNODE in restrict:       ###   STOP IF PARENT IS IN RESTRICTION
-            if partial:             ###   RETURN PARTIAL OR []
-                aRi.append(cNODE)
-                return aRi
-            else: return []
-
-def findTips(arr):
-    lt = []
-    for ai in arr[0:len(arr)-1]:
-        a = ai[0]
-        cCOUNT = 0
-        for bi in arr:
-            b = bi[1]
-            if a == b:
-                cCOUNT += 1
-        if cCOUNT == 0:
-            lt.append(a)
-    return lt
-
-def findChannelRoots(path, ngraph, restrict = []):
-    roots = []
-    for ai in range(len(ngraph)):
-        chi = ngraph[ai][0]
-        par = ngraph[ai][1]
-        if par in path and not chi in path and \
-            not chi in restrict:        
-            roots.append(par)
-    droots = deDupe(roots)
-    return droots
-
-def findChannels(roots, tips, ngraph, restrict):
-    cPATHS = []
-    for ri in range(len(roots)):
-        r = roots[ri]
-        sL = 1
-        sPATHi = []
-        for ti in range(len(tips)):
-            t = tips[ti]
-            if t < r: continue
-            tPATHi = findChargePath(r, t, ngraph, restrict, False)
-            tL = len(tPATHi)
-            if tL > sL:
-                if countChildrenOnPath(tPATHi, ngraph) > 1:
-                    sL = tL
-                    sPATHi = tPATHi
-                    tTEMP = t; tiTEMP = ti
-        if len(sPATHi) > 0:
-            print('   found path/idex from', ri, 'of', 
-                  len(roots), 'possible | tips:', tTEMP, tiTEMP)
-            cPATHS.append(sPATHi)
-            tips.remove(tTEMP)
-    return cPATHS
-
-def findChannels_WORKINPROGRESS(roots, ttips, ngraph, restrict):
-    cPATHS = []
-    tips = list(ttips)
-    for ri in range(len(roots)):
-        r = roots[ri]
-        sL = 1
-        sPATHi = []
-        tipREMOVE = [] ###---CHECKED TIP INDEXES, TO BE REMOVED FOR NEXT LOOP
-        for ti in range(len(tips)):
-            t = tips[ti]            
-            #print('-CHECKING RT/IDEX:', r, ri, 'AGAINST TIP', t, ti)
-            #if t < r: continue
-            if ti < ri: continue
-            tPATHi = findChargePath(r, t, ngraph, restrict, False)
-            tL = len(tPATHi)
-            if tL > sL:
-                if countChildrenOnPath(tPATHi, ngraph) > 1:
-                    sL = tL
-                    sPATHi = tPATHi
-                    tTEMP = t; tiTEMP = ti
-            if tL > 0:
-                tipREMOVE.append(t)                    
-        if len(sPATHi) > 0:
-            print('   found path from root idex', ri, 'of', 
-                   len(roots), 'possible roots | #oftips=', len(tips))
-            cPATHS.append(sPATHi)
-        for q in tipREMOVE:  tips.remove(q)
-
-    return cPATHS
-
-def countChildrenOnPath(aPath, ngraph, quick = True):
-    ###---RETURN HOW MANY BRANCHES 
-    ###   COUNT WHEN NODE IS A PARENT >1 TIMES
-    ###   quick -STOP AND RETURN AFTER FIRST
-    cCOUNT = 0
-    pList = splitList(ngraph,1)
-    for ai in range(len(aPath)-1):
-        ap = aPath[ai]
-        pc = pList.count(ap)
-        if quick and pc > 1: 
-            return pc
-    return cCOUNT
-
-###---CLASSIFY CHANNELS INTO 'MAIN', 'hORDER/SECONDARY' and 'SIDE'
-def classifyStroke(sarr, mct, hORDER = 1):
-    print(':::CLASSIFYING STROKE')
-    ###---BUILD CHILD/PARENT GRAPH (INDEXES OF sarr)  
-    sgarr = buildCPGraph(sarr, mct)
-
-    ###---FIND MAIN CHANNEL 
-    print('   finding MAIN')
-    oCharge = sgarr[0][1]
-    fCharge = sgarr[len(sgarr)-1][0]
-    aMAINi = findChargePath(oCharge, fCharge, sgarr)
-    
-    ###---FIND TIPS
-    print('   finding TIPS')
-    aTIPSi = findTips(sgarr)
-
-    ###---FIND hORDER CHANNEL ROOTS
-    ###   hCOUNT = ORDERS BEWTEEN MAIN and SIDE/TIPS
-    ###   !!!STILL BUGGY!!!
-    hRESTRICT = list(aMAINi)    ### ADD TO THIS AFTER EACH TIME
-    allHPATHSi = []             ### ALL hO PATHS: [[h0], [h1]...]
-    curPATHSi = [aMAINi]        ### LIST OF PATHS FIND ROOTS ON
-    for h in range(hORDER):
-        allHPATHSi.append([])
-        for pi in range(len(curPATHSi)):     ###   LOOP THROUGH ALL PATHS IN THIS ORDER
-            p = curPATHSi[pi]
-            ###   GET ROOTS FOR THIS PATH
-            aHROOTSi = findChannelRoots(p, sgarr, hRESTRICT)
-            print('   found', len(aHROOTSi), 'roots in ORDER', h, ':#paths:', len(curPATHSi))
-            ### GET CHANNELS FOR THESE ROOTS
-            if len(aHROOTSi) == 0:
-                print('NO ROOTS FOR FOUND FOR CHANNEL')
-                aHPATHSi = []
-                continue
-            else:
-                aHPATHSiD = findChannels(aHROOTSi, aTIPSi, sgarr, hRESTRICT)
-                aHPATHSi = aHPATHSiD
-                allHPATHSi[h] += aHPATHSi
-                ###   SET THESE CHANNELS AS RESTRICTIONS FOR NEXT ITERATIONS
-                for hri in aHPATHSi:
-                    hRESTRICT += hri
-        curPATHSi = aHPATHSi
-    
-    ###---SIDE BRANCHES, FINAL ORDER OF HEIRARCHY
-    ###   FROM TIPS THAT ARE NOT IN AN EXISTING PATH
-    ###   BACK TO ANY OTHER POINT THAT IS ALREADY ON A PATH
-    aDRAWNi = []
-    aDRAWNi += aMAINi
-    for oH in allHPATHSi:
-        for o in oH:
-            aDRAWNi += o
-    aTPATHSi = []
-    for a in aTIPSi:
-        if not a in aDRAWNi:
-            aPATHi = findChargePath(oCharge, a, sgarr, aDRAWNi)
-            aDRAWNi += aPATHi
-            aTPATHSi.append(aPATHi)
-            
-    return aMAINi, allHPATHSi, aTPATHSi
-
-def voxelByVertex(ob, gs):
-###---'VOXELIZES' VERTS IN A MESH TO LIST [(x,y,z),(x,y,z)]
-###   W/ RESPECT GSCALE AND OB ORIGIN (B/C SHOULD BE ORIGIN OBJ)
-    orig = ob.location
-    ll = []
-    for v in ob.data.vertices:
-        x = int( v.co.x / gs )
-        y = int( v.co.y / gs )
-        z = int( v.co.z / gs )      
-        ll.append((x,y,z))
-    return ll
-    
-def voxelByRays(ob, orig, gs):
-###--- MESH INTO A 3DGRID W/ RESPECT GSCALE AND BOLT ORIGIN
-###   -DOES NOT TAKE OBJECT ROTATION/SCALE INTO ACCOUNT
-###   -THIS IS A HORRIBLE, INEFFICIENT FUNCTION
-###    MAYBE THE RAYCAST/GRID THING ARE A BAD IDEA. BUT I 
-###    HAVE TO 'VOXELIZE THE OBJECT W/ RESCT TO GSCALE/ORIGIN
-    bbox = ob.bound_box
-    bbxL = bbox[0][0]; bbxR = bbox[4][0]
-    bbyL = bbox[0][1]; bbyR = bbox[2][1]
-    bbzL = bbox[0][2]; bbzR = bbox[1][2]
-    xct = int((bbxR - bbxL) / gs)
-    yct = int((bbyR - bbyL) / gs)
-    zct = int((bbzR - bbzL) / gs)
-    xs = int(xct/2); ys = int(yct/2); zs = int(zct/2)
-    print('  CASTING', xct, '/', yct, '/', zct, 'cells, total:', xct*yct*zct, 'in obj-', ob.name)    
-    ll = []
-    rc = 100    ###---DISTANCE TO CAST FROM
-    ###---RAYCAST TOP/BOTTOM
-    print('  RAYCASTING TOP/BOTTOM')
-    for x in range(xct):
-        for y in range(yct):
-            xco = bbxL + (x*gs);  yco = bbyL + (y*gs)
-            v1 = ((xco, yco,  rc));    v2 = ((xco, yco, -rc))            
-            vz1 = ob.ray_cast(v1,v2);   vz2 = ob.ray_cast(v2,v1)            
-            if vz1[2] != -1: ll.append((x-xs, y-ys, int(vz1[0][2] * (1/gs)) ))
-            if vz2[2] != -1: ll.append((x-xs, y-ys, int(vz2[0][2] * (1/gs)) ))
-    ###---RAYCAST FRONT/BACK
-    print('  RAYCASTING FRONT/BACK')    
-    for x in range(xct):
-        for z in range(zct):
-            xco = bbxL + (x*gs);  zco = bbzL + (z*gs)
-            v1 = ((xco, rc,  zco));    v2 = ((xco, -rc, zco))            
-            vy1 = ob.ray_cast(v1,v2);   vy2 = ob.ray_cast(v2,v1)            
-            if vy1[2] != -1: ll.append((x-xs, int(vy1[0][1] * (1/gs)), z-zs))
-            if vy2[2] != -1: ll.append((x-xs, int(vy2[0][1] * (1/gs)), z-zs))
-    ###---RAYCAST LEFT/RIGHT
-    print('  RAYCASTING LEFT/RIGHT')
-    for y in range(yct):
-        for z in range(zct):
-            yco = bbyL + (y*gs);  zco = bbzL + (z*gs)
-            v1 = ((rc, yco,  zco));    v2 = ((-rc, yco, zco))            
-            vx1 = ob.ray_cast(v1,v2);   vx2 = ob.ray_cast(v2,v1)            
-            if vx1[2] != -1: ll.append((int(vx1[0][0] * (1/gs)), y-ys, z-zs))            
-            if vx2[2] != -1: ll.append((int(vx2[0][0] * (1/gs)), y-ys, z-zs))
-
-    ###---ADD IN NEIGHBORS SO BOLT WONT GO THRU
-    nlist = []
-    for l in ll:
-        nl = getStencil3D_26(l[0], l[1], l[2])
-        nlist += nl
-
-    ###---DEDUPE
-    print('  ADDED NEIGHBORS, DEDUPING...')    
-    rlist = deDupe(ll+nlist)
-    qlist = []
-    
-    ###---RELOCATE GRID W/ RESPECT GSCALE AND BOLT ORIGIN
-    ###   !!!NEED TO ADD IN OBJ ROT/SCALE HERE SOMEHOW...
-    od = Vector(( (ob.location[0] - orig[0]) / gs,
-                  (ob.location[1] - orig[1]) / gs,
-                  (ob.location[2] - orig[2]) / gs ))
-    for r in rlist:
-        qlist.append((r[0]+int(od[0]), r[1]+int(od[1]), r[2]+int(od[2]) ))
-
-    return qlist
-
-def fakeGroundChargePlane(z, charge):
-    eCL = []
-    xy = abs(z)/2
-    eCL += [(0, 0, z, charge)]    
-    eCL += [(xy, 0, z, charge)]
-    eCL += [(0, xy, z, charge)]
-    eCL += [(-xy, 0, z, charge)]
-    eCL += [(0, -xy, z, charge)]
-    return eCL
-
-def addCharges(ll, charge):
-###---IN: ll - [(x,y,z), (x,y,z)], charge - w
-###   OUT clist - [(x,y,z,w), (x,y,z,w)]
-    clist = []
-    for l in ll:
-        clist.append((l[0], l[1], l[2], charge))
-    return clist
-        
-######################################################################
-########################### ALGORITHM FXNS ###########################
-############################## FROM FSLG #############################
-######################################################################
-def getGrowthProbability_KEEPFORREFERENCE(uN, aList):
-    ###---IN: uN -USER TERM, cList -CANDIDATE SITES, oList -CANDIDATE SITE CHARGES
-    ###   OUT: LIST OF [(XYZ), POT, PROB]
-    cList = splitList(aList, 0)
-    oList = splitList(aList, 1)
-    Omin, Omax = getLowHigh(oList)
-    if Omin == Omax: Omax += notZero; Omin -= notZero
-    PdL = []
-    E = 0
-    E = notZero   ###===DIVISOR FOR (FSLG - Eqn. 12)
-    for o in oList:
-        Uj = (o - Omin) / (Omax - Omin) ###===(FSLG - Eqn. 13)
-        E += pow(Uj, uN)
-    for oi in range(len(oList)):
-        o = oList[oi]
-        Ui = (o - Omin) / (Omax - Omin)
-        Pd = (pow(Ui, uN)) / E ###===(FSLG - Eqn. 12)
-        PdINT = Pd * 100
-        PdL.append(Pd)
-    return PdL 
-
-###---WORK IN PROGRESS, TRYING TO SPEED THESE UP
-def fslg_e13(x, min, max, u): return pow((x - min) / (max - min), u)
-def addit(x,y):return x+y
-def fslg_e12(x, min, max, u, e): return (fslg_e13(x, min, max, u) / e) * 100
-
-def getGrowthProbability(uN, aList):
-    ###---IN: uN -USER TERM, cList -CANDIDATE SITES, oList -CANDIDATE SITE CHARGES
-    ###   OUT: LIST OF PROB
-    cList = splitList(aList, 0)
-    oList = splitList(aList, 1)
-    Omin, Omax = getLowHigh(oList)
-    if Omin == Omax: Omax += notZero; Omin -= notZero
-    PdL = []
-    E = notZero
-    minL = [Omin for q in range(len(oList))]
-    maxL = [Omax for q in range(len(oList))]
-    uNL =  [uN   for q in range(len(oList))]
-    E = sum(map(fslg_e13, oList, minL, maxL, uNL))
-    EL = [E for q in range(len(oList))]
-    mp = map(fslg_e12, oList, minL, maxL, uNL, EL)
-    for m in mp: PdL.append(m)
-    return PdL 
-
-def updatePointCharges(p, cList, eList = []):
-    ###---IN: pNew -NEW GROWTH CELL
-    ###       cList -OLD CANDIDATE SITES, eList -SAME
-    ###   OUT: LIST OF NEW CHARGE AT CANDIDATE SITES
-    r1 = 1/2        ###===(FSLG - Eqn. 10)
-    nOiL = []    
-    for oi in range(len(cList)):
-        o = cList[oi][1]
-        c = cList[oi][0]
-        iOe = 0
-        rit = dist(c[0], c[1], c[2], p[0], p[1], p[2])        
-        iOe += (1 - (r1/rit))
-        Oit =  o + iOe            
-        nOiL.append((c, Oit))
-    return nOiL
-
-def initialPointCharges(pList, cList, eList = []):
-    ###---IN: p -CHARGED CELL (XYZ), cList -CANDIDATE SITES (XYZ, POT, PROB)
-    ###   OUT: cList -WITH POTENTIAL CALCULATED 
-    r1 = 1/2        ###===(FSLG - Eqn. 10)
-    npList = []
-    for p in pList:
-        npList.append(((p[0], p[1], p[2]), 1.0))
-    for e in eList:
-        npList.append(((e[0], e[1], e[2]), e[3]))
-    OiL = []
-    for i in cList:
-        Oi = 0
-        for j in npList:
-            if i != j[0]:
-                rij = dist(i[0], i[1], i[2], j[0][0], j[0][1], j[0][2])
-                Oi += (1 - (r1 / rij)) * j[1] ### CHARGE INFLUENCE
-        OiL.append(((i[0], i[1], i[2]), Oi))
-    return OiL
-
-def getCandidateSites(aList, iList = []):
-    ###---IN: aList -(X,Y,Z) OF CHARGED CELL SITES, iList -insulator sites
-    ###   OUT: CANDIDATE LIST OF GROWTH SITES [(X,Y,Z)]
-    tt1 = time.clock()    
-    cList = []
-    for c in aList:
-        tempList = getStencil3D_26(c[0], c[1], c[2])
-        for t in tempList:
-            if not t in aList and not t in iList:
-                cList.append(t)
-    ncList = deDupe(cList)
-    tt2 = time.clock()	
-    #print('FXNTIMER:getCandidateSites:', tt2-tt1, 'check 26 against:', len(aList)+len(iList))    
-    return ncList
-
-######################################################################
-############################# SETUP FXNS #############################
-######################################################################
-def setupObjects():
-    oOB = bpy.data.objects.new('ELorigin', None)
-    oOB.location = ((0,0,10))
-    bpy.context.scene.objects.link(oOB)
-
-    gOB = bpy.data.objects.new('ELground', None)
-    gOB.empty_draw_type = 'ARROWS'
-    bpy.context.scene.objects.link(gOB)
-    
-    cME = makeMeshCube(1)
-    cOB = bpy.data.objects.new('ELcloud', cME)
-    cOB.location = ((-2,8,12))
-    cOB.hide_render = True    
-    bpy.context.scene.objects.link(cOB)
-    
-    iME = makeMeshCube(1)
-    for v in iME.vertices: 
-        xyl = 6.5; zl = .5
-        v.co[0] = v.co[0] * xyl
-        v.co[1] = v.co[1] * xyl
-        v.co[2] = v.co[2] * zl
-    iOB = bpy.data.objects.new('ELinsulator', iME)    
-    iOB.location = ((0,0,5))
-    iOB.hide_render = True
-    bpy.context.scene.objects.link(iOB)
-
-    try:
-        scn.OOB = 'ELorigin'
-        scn.GOB = 'ELground'
-        scn.COB = 'ELcloud'
-        scn.IOB = 'ELinsulator'
-    except: pass
-
-def checkSettings():
-    check = True
-    if scn.OOB == "": 
-        print('ERROR: NO ORIGIN OBJECT SELECTED')
-        check = False
-    if scn.GROUNDBOOL and scn.GOB == "":
-        print('ERROR: NO GROUND OBJECT SELECTED')
-        check = False
-    if scn.CLOUDBOOL and scn.COB == "":
-        print('ERROR: NO CLOUD OBJECT SELECTED')        
-        check = False
-    if scn.IBOOL and scn.IOB == "":
-        print('ERROR: NO INSULATOR OBJECT SELECTED')        
-        check = False
-    #should make a popup here
-    return check
-
-
-######################################################################
-############################### MAIN #################################
-######################################################################
-def FSLG():
-###======FAST SIMULATION OF LAPLACIAN GROWTH======###
-    print('\n<<<<<<------GO GO GADGET: FAST SIMULATION OF LAPLACIAN GROWTH!')
-    tc1 = time.clock()
-    TSTEPS = scn.TSTEPS
-
-    obORIGIN = scn.objects[scn.OOB]
-    obGROUND = scn.objects[scn.GOB]    
-    scn.ORIGIN = obORIGIN.location
-    scn.GROUNDZ = int((obGROUND.location[2] - scn.ORIGIN[2]) / scn.GSCALE)
-    
-    ###====== 1) INSERT INTIAL CHARGE(S) POINT (USES VERTS IF MESH)
-    cgrid = [(0, 0, 0)]
-    if obORIGIN.type == 'MESH':
-        print("<<<<<<------ORIGIN OBJECT IS MESH, 'VOXELIZING' INTIAL CHARGES FROM VERTS")
-        cgrid = voxelByVertex(obORIGIN, scn.GSCALE)
-        if scn.VMMESH:
-            print("<<<<<<------CANNOT CLASSIFY STROKE FROM VERT ORIGINS YET, NO MULTI-MESH OUTPUT")
-            scn.VMMESH = False; scn.VSMESH = True
-
-    ###---GROUND CHARGE CELL / INSULATOR LISTS (eChargeList/icList)
-    eChargeList = []; icList = []
-    if scn.GROUNDBOOL:
-        eChargeList = fakeGroundChargePlane(scn.GROUNDZ, scn.GROUNDC)
-    if scn.CLOUDBOOL:
-        print("<<<<<<------'VOXELIZING' CLOUD OBJECT (COULD TAKE SOME TIME)")
-        obCLOUD = scn.objects[scn.COB]
-        eChargeListQ = voxelByRays(obCLOUD, scn.ORIGIN, scn.GSCALE)
-        eChargeList = addCharges(eChargeListQ, scn.CLOUDC)
-        print('<<<<<<------CLOUD OBJECT CELL COUNT = ', len(eChargeList) )        
-    if scn.IBOOL:
-        print("<<<<<<------'VOXELIZING' INSULATOR OBJECT (COULD TAKE SOME TIME)")
-        obINSULATOR = scn.objects[scn.IOB]
-        icList = voxelByRays(obINSULATOR, scn.ORIGIN, scn.GSCALE)
-        print('<<<<<<------INSULATOR OBJECT CELL COUNT = ', len(icList) )
-        #writeArrayToCubes(icList, scn.GSCALE, scn.ORIGIN)
-        #return 'THEEND'
-        
-    ###====== 2) LOCATE CANDIDATE SITES AROUND CHARGE
-    cSites = getCandidateSites(cgrid, icList)
-    
-    ###====== 3) CALC POTENTIAL AT EACH SITE (Eqn. 10)
-    cSites = initialPointCharges(cgrid, cSites, eChargeList)
-    
-    ts = 1
-    while ts <= TSTEPS:
-        ###====== 1) SELECT NEW GROWTH SITE (Eqn. 12)
-        ###===GET PROBABILITIES AT CANDIDATE SITES
-        gProbs = getGrowthProbability(scn.BIGVAR, cSites)
-        ###===CHOOSE NEW GROWTH SITE BASED ON PROBABILITIES
-        gSitei = weightedRandomChoice(gProbs)
-        gsite  = cSites[gSitei][0]
-
-        ###====== 2) ADD NEW POINT CHARGE AT GROWTH SITE
-        ###===ADD NEW GROWTH CELL TO GRID
-        cgrid.append(gsite)
-        ###===REMOVE NEW GROWTH CELL FROM CANDIDATE SITES
-        cSites.remove(cSites[gSitei])
-
-        ###====== 3) UPDATE POTENTIAL AT CANDIDATE SITES (Eqn. 11)
-        cSites = updatePointCharges(gsite, cSites, eChargeList)        
-
-        ###====== 4) ADD NEW CANDIDATES SURROUNDING GROWTH SITE
-        ###===GET CANDIDATE 'STENCIL'
-        ncSitesT = getCandidateSites([gsite], icList)
-        ###===REMOVE CANDIDATES ALREADY IN CANDIDATE LIST OR CHARGE GRID
-        ncSites = []
-        cSplit = splitList(cSites, 0)
-        for cn in ncSitesT:
-            if not cn in cSplit and \
-            not cn in cgrid:
-                ncSites.append((cn, 0))
-
-        ###====== 5) CALC POTENTIAL AT NEW CANDIDATE SITES (Eqn. 10)
-        ncSplit = splitList(ncSites, 0)        
-        ncSites = initialPointCharges(cgrid, ncSplit, eChargeList)
-
-        ###===ADD NEW CANDIDATE SITES TO CANDIDATE LIST
-        for ncs in ncSites:
-            cSites.append(ncs)
-
-        ###===ITERATION COMPLETE
-        istr1 = ':::T-STEP: ' + str(ts) + '/' + str(TSTEPS) 
-        istr12 = ' | GROUNDZ: ' + str(scn.GROUNDZ) + ' | '
-        istr2 = 'CANDS: ' + str(len(cSites)) + ' | '
-        istr3 = 'GSITE: ' + str(gsite)
-        print(istr1 + istr12 + istr2 + istr3)        
-        ts += 1
-        
-        ###---EARLY TERMINATION FOR GROUND/CLOUD STRIKE
-        if scn.GROUNDBOOL:
-            if gsite[2] == scn.GROUNDZ:
-                ts = TSTEPS+1
-                print('<<<<<<------EARLY TERMINATION DUE TO GROUNDSTRIKE')
-                continue
-        if scn.CLOUDBOOL:
-            #if gsite in cloudList:
-            if gsite in splitListCo(eChargeList):
-                ts = TSTEPS+1
-                print('<<<<<<------EARLY TERMINATION DUE TO CLOUDSTRIKE')
-                continue            
-
-    tc2 = time.clock()
-    tcRUN = tc2 - tc1
-    print('<<<<<<------LAPLACIAN GROWTH LOOP COMPLETED: ' + str(len(cgrid)) + ' / ' + str(tcRUN)[0:5] + ' SECONDS')
-    print('<<<<<<------VISUALIZING DATA')
-
-    reportSTRING = getReportString(tcRUN)    
-    ###---VISUALIZE ARRAY
-    visualizeArray(cgrid, obORIGIN, scn.GSCALE, scn.VMMESH, scn.VSMESH, scn.VCUBE, scn.VVOX, reportSTRING)
-    print('<<<<<<------COMPLETE')
-
-######################################################################
-################################ GUI #################################
-######################################################################
-###---NOT IN UI
-bpy.types.Scene.ORIGIN = bpy.props.FloatVectorProperty(name = "origin charge")
-bpy.types.Scene.GROUNDZ = bpy.props.IntProperty(name = "ground Z coordinate")
-bpy.types.Scene.HORDER = bpy.props.IntProperty(name = "secondary paths orders")
-###---IN UI
-bpy.types.Scene.TSTEPS = bpy.props.IntProperty(
-    name = "iterations", description = "number of cells to create, will end early if hits ground plane or cloud")
-bpy.types.Scene.GSCALE = bpy.props.FloatProperty(
-    name = "grid unit size", description = "scale of cells, .25 = 4 cells per blenderUnit")
-bpy.types.Scene.BIGVAR = bpy.props.FloatProperty(
-    name = "straightness", description = "straightness/branchiness of bolt, <2 is mush, >12 is staight line, 6.3 is good")
-bpy.types.Scene.GROUNDBOOL = bpy.props.BoolProperty(
-    name = "use ground object", description = "use ground plane or not")
-bpy.types.Scene.GROUNDC = bpy.props.IntProperty(
-    name = "ground charge", description = "charge of ground plane")
-bpy.types.Scene.CLOUDBOOL = bpy.props.BoolProperty(
-    name = "use cloud object", description = "use cloud obj, attracts and terminates like ground but any obj instead of z plane, can slow down loop if obj is large, overrides ground")
-bpy.types.Scene.CLOUDC = bpy.props.IntProperty(
-    name = "cloud charge", description = "charge of a cell in cloud object (so total charge also depends on obj size)")
-
-bpy.types.Scene.VMMESH = bpy.props.BoolProperty(
-    name = "multi mesh", description = "output to multi-meshes for different materials on main/sec/side branches")
-bpy.types.Scene.VSMESH = bpy.props.BoolProperty(
-    name = "single mesh", description = "output to single mesh for using build modifier and particles for effects")
-bpy.types.Scene.VCUBE = bpy.props.BoolProperty(
-    name = "cubes", description = "CTRL-J after run to JOIN, outputs a bunch of cube objest, mostly for testing")
-bpy.types.Scene.VVOX = bpy.props.BoolProperty(        
-    name = "voxel (experimental)", description = "output to a voxel file to bpy.data.filepath\FSLGvoxels.raw - doesn't work well right now")
-bpy.types.Scene.IBOOL = bpy.props.BoolProperty(
-    name = "use insulator object", description = "use insulator mesh object to prevent growth of bolt in areas")
-bpy.types.Scene.OOB = bpy.props.StringProperty(description = "origin of bolt, can be an Empty, if obj is mesh will use all verts as charges")
-bpy.types.Scene.GOB = bpy.props.StringProperty(description = "object to use as ground plane, uses z coord only")
-bpy.types.Scene.COB = bpy.props.StringProperty(description = "object to use as cloud, best to use a cube")
-bpy.types.Scene.IOB = bpy.props.StringProperty(description = "object to use as insulator, 'voxelized' before generating bolt, can be slow")
-
-###---DEFAULT USER SETTINGS
-scn.TSTEPS = 350
-scn.HORDER = 1
-scn.GSCALE = 0.12
-scn.BIGVAR = 6.3
-scn.GROUNDBOOL = True
-scn.GROUNDC = -250
-scn.CLOUDBOOL = False
-scn.CLOUDC = -1
-scn.VMMESH = True
-scn.VSMESH = False
-scn.VCUBE = False
-scn.VVOX = False
-scn.IBOOL = False
-try:
-    scn.OOB = "ELorigin"
-    scn.GOB = "ELground"
-    scn.COB = "ELcloud"
-    scn.IOB = "ELinsulator"    
-except: pass
-### TESTING
-if False:
-#if True:
-    #scn.BIGVAR = 6.3
-    #scn.VSMESH = True
-    #scn.VMMESH = False
-    #scn.VCUBE = True
-    #scn.TSTEPS = 7500
-    scn.TSTEPS = 100
-    #scn.GROUNDC = -500
-    #scn.CLOUDC = -5
-    #scn.GROUNDBOOL = False
-    #scn.CLOUDBOOL = True
-    
-    #scn.IBOOL = True
-
-class runFSLGLoopOperator(bpy.types.Operator):
-    """By The Mighty Hammer Of Thor!!!"""
-    bl_idname = "object.runfslg_operator"
-    bl_label = "run FSLG Loop Operator"
-
-    def execute(self, context):
-        if checkSettings():
-            FSLG()
-        else: pass
-        return {'FINISHED'}
-    
-class setupObjectsOperator(bpy.types.Operator):
-    """Create origin/ground/cloud/insulator objects"""
-    bl_idname = "object.setup_objects_operator"
-    bl_label = "Setup Objects Operator"
-
-    def execute(self, context):
-        setupObjects()        
-        return {'FINISHED'}    
-
-class OBJECT_PT_fslg(bpy.types.Panel):
-    bl_label = "Laplacian Lightning - v0.2.6"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "TOOLS"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        scn = context.scene
-        layout = self.layout
-        colR = layout.column()        
-        #row1 = layout.row()
-        #colL = row1.column()
-        #colR = row1.column()
-        colR.label('-for progress open console-')
-        colR.label('Help > Toggle System Console')        
-        colR.prop(scn, 'TSTEPS')
-        colR.prop(scn, 'GSCALE')        
-        colR.prop(scn, 'BIGVAR')
-        colR.operator('object.setup_objects_operator', text = 'create setup objects')        
-        colR.label('origin object')
-        colR.prop_search(scn, "OOB",  context.scene, "objects")        
-        colR.prop(scn, 'GROUNDBOOL')
-        colR.prop_search(scn, "GOB",  context.scene, "objects")        
-        colR.prop(scn, 'GROUNDC') 
-        colR.prop(scn, 'CLOUDBOOL')
-        colR.prop_search(scn, "COB",  context.scene, "objects")        
-        colR.prop(scn, 'CLOUDC')
-        colR.prop(scn, 'IBOOL')
-        colR.prop_search(scn, "IOB",  context.scene, "objects")
-        colR.operator('object.runfslg_operator', text = 'generate lightning')
-        #col.prop(scn, 'HORDER')
-        colR.prop(scn, 'VMMESH')
-        colR.prop(scn, 'VSMESH')        
-        colR.prop(scn, 'VCUBE')
-        colR.prop(scn, 'VVOX')
-
-def getReportString(rtime):
-    rSTRING1 = 't:' + str(scn.TSTEPS) + ',sc:' + str(scn.GSCALE)[0:4] + ',uv:' + str(scn.BIGVAR)[0:4] + ',' 
-    rSTRING2 = 'ori:' + str(scn. ORIGIN[0]) + '/' + str(scn. ORIGIN[1]) + '/' + str(scn. ORIGIN[2]) + ','
-    rSTRING3 = 'gz:' + str(scn.GROUNDZ) + ',gc:' + str(scn.GROUNDC) + ',rtime:' + str(int(rtime))
-    return rSTRING1 + rSTRING2 + rSTRING3
-
-def addReportProp(ob, str):
-    bpy.types.Object.FSLG_REPORT = bpy.props.StringProperty(
-	   name = 'fslg_report', default = '')
-    ob.FSLG_REPORT = str
-        
-def register():
-    bpy.utils.register_class(runFSLGLoopOperator)    
-    bpy.utils.register_class(setupObjectsOperator)
-    bpy.utils.register_class(OBJECT_PT_fslg)
-
-def unregister():
-    bpy.utils.unregister_class(runFSLGLoopOperator)    
-    bpy.utils.unregister_class(setupObjectsOperator)    
-    bpy.utils.unregister_class(OBJECT_PT_fslg)
-
-if __name__ == "__main__":
-    ### RUN FOR TESTING
-    #FSLG()
-    
-    ### UI
-    register()
-    pass
-
-###########################
-##### FXN BENCHMARKS ######
-###########################
-def BENCH():
-    print('\n\n\n--->BEGIN BENCHMARK')
-    bt0 = time.clock()
-    ###---MAKE A BIG LIST
-    tsize = 25
-    tlist = []
-    for x in range(tsize):
-        for y in range(tsize):
-            for z in range(tsize):
-                tlist.append((x,y,z))
-                tlist.append((x,y,z))
-
-    ###---FUNCTION TO TEST
-    bt1 = time.clock()
-
-    #ll = deDupe(tlist)
-    #ll = f5(tlist)
-    print('LENS - ', len(tlist), len(ll) )
-
-    bt2 = time.clock()
-    btRUNb = bt2 - bt1
-    btRUNa = bt1 - bt0
-    print('--->SETUP TIME    : ', btRUNa)
-    print('--->BENCHMARK TIME: ', btRUNb)
-    print('--->GRIDSIZE: ', tsize, ' - ', tsize*tsize*tsize)
-    
-#BENCH()    
-
-
-##################################
-################################
diff --git a/release/scripts/addons_contrib/object_mangle_tools.py b/release/scripts/addons_contrib/object_mangle_tools.py
deleted file mode 100644
index e4d4bf1..0000000
--- a/release/scripts/addons_contrib/object_mangle_tools.py
+++ /dev/null
@@ -1,206 +0,0 @@
-# mangle_tools.py (c) 2011 Phil Cote (cotejrp1)
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-bl_info = {
-    "name": "Mangle Tools",
-    "author": "Phil Cote",
-    "version": (0, 2),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tools",
-    "description": "Set of tools to mangle curves, meshes, and shape keys",
-    "warning": "", # used for warning icon and text in addons panel
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=29071",
-    "category": "Object"}
-
-import bpy
-import random
-import time
-from math import pi
-import bmesh
-
-def move_coordinate(context, co, is_curve=False):
-    xyz_const = context.scene.constraint_vector
-    random.seed(time.time())
-    multiplier = 1
-
-    # For curves, we base the multiplier on the circumference formula.
-    # This helps make curve changes more noticable.
-    if is_curve:
-        multiplier = 2 * pi
-    random_mag = context.scene.random_magnitude
-    if xyz_const[0]:    
-        co.x += .01 * random.randrange( -random_mag, random_mag ) * multiplier
-    if xyz_const[1]:
-        co.y += .01 * random.randrange( -random_mag, random_mag )  * multiplier
-    if xyz_const[2]:
-        co.z += .01 * random.randrange( -random_mag, random_mag ) * multiplier
-
-
-class MeshManglerOperator(bpy.types.Operator):
-    """Push vertices on the selected object around in random """ \
-    """directions to create a crumpled look"""
-    bl_idname = "ba.mesh_mangler"
-    bl_label = "Mangle Mesh"
-    bl_options = { "REGISTER", "UNDO" }
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return ob != None and ob.type == 'MESH'
-
-    def execute(self, context):
-        mesh = context.active_object.data
-        bm = bmesh.new()
-        bm.from_mesh(mesh)
-        verts, faces = bm.verts, bm.faces
-        randomMag = context.scene.random_magnitude
-        random.seed( time.time() )
-
-        if mesh.shape_keys != None:
-            self.report({'INFO'}, "Cannot mangle mesh: Shape keys present")
-            return {'CANCELLED'}
-        
-        for vert in verts:
-            xVal = .01 * random.randrange( -randomMag, randomMag )
-            yVal = .01 * random.randrange( -randomMag, randomMag)
-            zVal = .01 * random.randrange( -randomMag, randomMag )
-            vert.co.x = vert.co.x + xVal
-            vert.co.y = vert.co.y + yVal
-            vert.co.z = vert.co.z + zVal
-                
-        bm.to_mesh(mesh)   
-        mesh.update()
-        return {'FINISHED'}
-
-
-class AnimanglerOperator(bpy.types.Operator):
-    """Make a shape key and pushes the verts around on it """ \
-    """to set up for random pulsating animation"""
-    bl_idname = "ba.ani_mangler"
-    bl_label = "Mangle Shape Key"
-
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return ob != None and ob.type in [ 'MESH', 'CURVE' ]
-
-    def execute(self, context):
-        scn = context.scene
-        mangleName = scn.mangle_name
-        ob = context.object
-        shapeKey = ob.shape_key_add( name=mangleName )
-        verts = shapeKey.data
-        
-        for vert in verts:
-            move_coordinate(context, vert.co, is_curve=ob.type=='CURVE')
-            
-        return {'FINISHED'}
-
-
-class CurveManglerOp(bpy.types.Operator):
-    """Mangle a curve to the degree the user specifies"""
-    bl_idname = "ba.curve_mangler"
-    bl_label = "Mangle Curve"
-    bl_options = { 'REGISTER', 'UNDO' }
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return ob != None and ob.type == "CURVE"
-
-
-    def execute(self, context):
-
-        ob = context.active_object
-        if ob.data.shape_keys != None:
-            self.report({'INFO'}, "Cannot mangle curve.  Shape keys present")
-            return {'CANCELLED'}
-        splines = context.object.data.splines
-        
-        for spline in splines:
-            if spline.type == 'BEZIER':
-                points = spline.bezier_points
-            elif spline.type in {'POLY', 'NURBS'}:
-                points = spline.points
-
-            for point in points:
-                move_coordinate(context, point.co, is_curve=True)
-
-        return {'FINISHED'}
-
-
-class MangleToolsPanel(bpy.types.Panel):
-    bl_label = "Mangle Tools"
-    bl_space_type = "VIEW_3D"
-    bl_region_type="TOOLS"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        scn = context.scene
-        layout = self.layout
-        col = layout.column()
-        col.prop(scn, "constraint_vector")
-        col.prop(scn, "random_magnitude")
-
-        col.operator("ba.curve_mangler")
-        col.operator("ba.mesh_mangler")
-        col.separator()
-        col.prop(scn, "mangle_name")
-        col.operator("ba.ani_mangler")
-
-
-IntProperty = bpy.props.IntProperty
-StringProperty = bpy.props.StringProperty
-BoolVectorProperty = bpy.props.BoolVectorProperty
-
-def register():
-    bpy.utils.register_class(AnimanglerOperator)
-    bpy.utils.register_class(MeshManglerOperator)
-    bpy.utils.register_class(CurveManglerOp)
-    bpy.utils.register_class(MangleToolsPanel)
-    scnType = bpy.types.Scene
-    
-                                    
-    scnType.constraint_vector = BoolVectorProperty(name="Mangle Constraint", 
-                                default=(True,True,True),
-                                subtype='XYZ',
-                                description="Constrains Mangle Direction")
-                                
-    scnType.random_magnitude = IntProperty( name = "Mangle Severity", 
-                              default = 10, min = 1, max = 30, 
-                              description = "Severity of mangling")
-    
-    scnType.mangle_name = StringProperty(name="Shape Key Name",
-                             default="mangle",
-                             description="Name given for mangled shape keys")
-def unregister():
-    bpy.utils.unregister_class(AnimanglerOperator)
-    bpy.utils.unregister_class(MeshManglerOperator)
-    bpy.utils.unregister_class(MangleToolsPanel)
-    bpy.utils.unregister_class(CurveManglerOp)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/object_powerlib.py b/release/scripts/addons_contrib/object_powerlib.py
deleted file mode 100644
index 8c5f336..0000000
--- a/release/scripts/addons_contrib/object_powerlib.py
+++ /dev/null
@@ -1,329 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Powerlib",
-    "description": "Control panel for managing "
-    "groups contained in linked libraries",
-    "author": "Olivier Amrein, Francesco Siddi",
-    "version": (0, 5),
-    "blender": (2, 53, 0),
-    "location": "Properties Panel",
-    "warning": "",  # used for warning icon and text in addons panel
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/PowerLib",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=31475&group_id=153&atid=467",
-    "category": "3D View"}
-
-import bpy
-from bpy.props import (FloatProperty, BoolProperty, 
-FloatVectorProperty, StringProperty, EnumProperty)
-
-#  Generic function to toggle across 3 different model resolutions
-def SetProxyResolution(elem,target_resolution):
-
-    obj = bpy.data.objects[elem.name]
-
-    try: 
-       dupgroup_name = obj.dupli_group.name
-    except: 
-        return
-    
-    root = dupgroup_name[:-3]
-    ext = dupgroup_name[-3:]
-    new_group = root + target_resolution
-
-    if ext in {'_hi', '_lo', '_me'}:
-        try: 
-            obj.dupli_group = bpy.data.groups[new_group]
-            #print("PowerLib: CHANGE " + str(elem) + " to " + new_group)
-        except:
-            print ("Group %s not found" % new_group.upper())
-            
-            
-class PowerlibPanel(bpy.types.Panel):
-    bl_label = "Powerlib"
-    bl_idname = "SCENE_PT_powerlib"
-    bl_context = "scene"
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-
-    def draw(self, context):
-        layout = self.layout
-        object = bpy.context.active_object
-        scene = context.scene
-        active_subgroup = scene.ActiveSubgroup
-        
-        if len(active_subgroup) > 0:
-            ob = bpy.data.objects[active_subgroup]
-        else:
-            ob = bpy.context.active_object
-
-        if ob.dupli_type == 'GROUP':
-            group = ob.dupli_group
-            group_name = group.name  # set variable for group toggle
-            group_objs = bpy.data.groups[group.name].objects
-            total_groups = 0
-
-            row = layout.row()
-            row.label(" GROUP: " + group.name, icon = 'GROUP')
-            active_subgroup = scene.ActiveSubgroup
-            if len(active_subgroup) > 0:
-                subgroup = row.operator("powerlib.display_subgroup_content",
-                text="Back to subgroup", icon='BACK')
-                subgroup.item_name = ''
-            
-            box = layout.box()         
-
-            for elem in group_objs:
-
-                if elem.dupli_group != None:
-                    row = box.row()   
-                    col=row.row()
-                                     
-                    total_groups += 1
-                    
-                    if (elem.dupli_type == 'GROUP'):
-                        subgroup = col.operator("powerlib.toggle_subgroup",
-                        text="", icon='RESTRICT_VIEW_OFF', emboss=False)
-                        subgroup.display = "NONE"
-                        subgroup.item_name = elem.name
-                        subgroup.group_name = group.name
-                        col.label(elem.name)
-                    else:
-                        subgroup = col.operator("powerlib.toggle_subgroup",
-                        text="", icon='RESTRICT_VIEW_ON', emboss=False)
-                        subgroup.display = "GROUP"
-                        subgroup.item_name = elem.name
-                        subgroup.group_name = group.name
-                        col.label(elem.name)
-                        
-                    if len(bpy.data.groups[elem.dupli_group.name].objects.items()) > 1:
-                        subgroup = col.operator("powerlib.display_subgroup_content",
-                        text="Explore", icon='GROUP')
-                        subgroup.item_name = elem.name
-                    else:
-                        col.label(text="")
-                       
-                    resolution = str(elem.dupli_group.name)[-3:]
-                    if resolution in {'_hi', '_lo', '_me'}:
-                        res = resolution[-2:].upper()
-
-                        subgroup = col.operator("powerlib.toggle_subgroup_res",
-                        text=res, icon='FILE_REFRESH')
-                        subgroup.item_name = elem.name
-                        subgroup.group_name = group.name
-                    else:
-                        col.label(text="")
-                else:
-                    pass   
-        
-            if total_groups == 0 :
-                box.label(" No subgroups found in this group",icon="LAYER_USED")
-                resolution = str(object.dupli_group.name)[-3:]
-                if resolution in {'_hi', '_lo', '_me'}:
-
-                    res = resolution[-2:].upper()
-
-                    subgroup = box.operator("powerlib.toggle_subgroup_res",
-                    text=res, icon='FILE_REFRESH')
-                    subgroup.item_name = bpy.context.active_object.name
-                    subgroup.group_name = group.name
-            else:
-                row = layout.row(align=True)
-                row.label("Total groups: " + str(total_groups))
-                box = layout.box()
-                row = box.row(align=True)
-                group = row.operator("powerlib.toggle_group",
-                text="Show All", icon='RESTRICT_VIEW_OFF')
-                group.display = "showall"
-                group.group_name = group_name
-    
-                group = row.operator("powerlib.toggle_group",
-                text="Hide All", icon='RESTRICT_VIEW_ON')
-                group.display = "hideall"
-                group.group_name = group_name
-
-                row = box.row()
-                
-                row.label(text="Set all subgroups to: ")
-
-                row = box.row(align=True)
-
-                group = row.operator("powerlib.toggle_group",
-                text="Low", icon='MESH_CIRCLE')
-                group.display = "low"
-                group.group_name = group_name
-                
-                group = row.operator("powerlib.toggle_group",
-                text="Medium", icon='MESH_UVSPHERE')
-                group.display = "medium"
-                group.group_name = group_name
-                
-                group = row.operator("powerlib.toggle_group",
-                text="High", icon='MESH_ICOSPHERE')
-                group.display = "high"
-                group.group_name = group_name
-                        
-        else:
-            layout.label(" Select a group")            
-
-
-class ToggleSubgroupResolution(bpy.types.Operator):
-    bl_idname = "powerlib.toggle_subgroup_res"
-    bl_label = "Powerlib Toggle Soubgroup Res"
-    bl_description = "Change the resolution of a subgroup"
-    item_name = bpy.props.StringProperty()
-    group_name = bpy.props.StringProperty()
-
-    def execute(self, context):
-
-        group_name = self.group_name
-        item_name = self.item_name
-
-        obj = bpy.data.objects[item_name]
-
-        dupgroup = obj.dupli_group
-        dupgroup_name = obj.dupli_group.name
-
-        root = dupgroup_name[:-2]
-        ext = dupgroup_name[-2:]
-        
-        if (root + 'me') in bpy.data.groups:
-            if ext == 'hi':
-                new_group = root + "me"
-            elif ext == 'me':
-                new_group = root + "lo"
-            elif ext == 'lo':
-                new_group = root + "hi"
-            else:
-                new_group = dupgroup  # if error, do not change dupligroup
-        else:
-            if ext == 'hi':
-                new_group = root + "lo"
-            elif ext == 'lo':
-                new_group = root + "hi"
-            else:
-                new_group = dupgroup  # if error, do not change dupligroup
-
-        if bpy.data.groups[dupgroup_name].library:
-            # link needed object
-            filepath = bpy.data.groups[dupgroup_name].library.filepath
-
-            print(filepath)
-            with bpy.data.libraries.load(filepath, 
-            link=True) as (data_from, data_to):
-                data_to.groups.append(new_group)
-
-        try: 
-            obj.dupli_group = bpy.data.groups[new_group]
-            print("PowerLib: CHANGE " + str(item_name) + " to " + new_group)
-        except:
-            self.report({'WARNING'}, "Group %s not found" % new_group.upper())
-
-        return {'FINISHED'}
-
-
-class ToggleAllSubgroups(bpy.types.Operator):
-    bl_idname = "powerlib.toggle_group"
-    bl_label = "Powerlib Toggle Group"
-    bl_description = "Toggle a property for all subgroups"
-    display = bpy.props.StringProperty()
-    group_name = bpy.props.StringProperty()
-
-    def execute(self, context):
-
-        display = self.display
-        grp_name = self.group_name
-        group_objs = bpy.data.groups[grp_name].objects
-
-        for elem in group_objs:
-            if display == 'showall':
-                elem.dupli_type = "GROUP"
-                #print("Powerlib: SHOW " + elem.name)
-            elif display == 'hideall':
-                elem.dupli_type = "NONE"
-                #print("Powerlib: HIDE " + elem.name)
-            if display == 'low':
-                #print("Powerlib: ALL LOW " + elem.name)
-                SetProxyResolution(elem,'_lo')
-            elif display == 'medium':
-                #print("Powerlib: ALL MEDIUM " + elem.name)
-                SetProxyResolution(elem,'_me')
-            elif display == 'high':
-                #print("Powerlib: ALL HIGH " + elem.name)
-                SetProxyResolution(elem,'_hi')
-            else:
-                print("nothing")
-
-        return {'FINISHED'}
-    
-    
-class ToggleSubgroupDisplay(bpy.types.Operator):
-    bl_idname = "powerlib.toggle_subgroup"
-    bl_label = "Powelib Toggle Subgroup"
-    bl_description = "Toggle the display of a subgroup"
-    display = bpy.props.StringProperty()
-    item_name = bpy.props.StringProperty()
-    group_name = bpy.props.StringProperty()
-    
-    def execute(self, context):
-
-        display = self.display
-        obj_name = self.item_name
-        grp_name = self.group_name
-
-        print("Powerlib: " + obj_name + " is being set to " + display)
-
-        bpy.data.groups[grp_name].objects[obj_name].dupli_type = display
-        return {'FINISHED'}
-    
-    
-class DisplaySubgroupContent(bpy.types.Operator):
-    bl_idname = "powerlib.display_subgroup_content"
-    bl_label = "Powerlib Display Subgroup Content"
-    bl_description = "Display the content of a subgroup"
-
-    item_name = bpy.props.StringProperty()
-    
-    def execute(self, context):
-        scene = context.scene
-        scene.ActiveSubgroup = self.item_name
-        return {'FINISHED'}
-    
-
-def register():
-    bpy.types.Scene.ActiveSubgroup = StringProperty(
-            name="Commit untracked",
-            default="",
-            description="Add untracked files into svn and commit all of them")
-    bpy.utils.register_class(DisplaySubgroupContent)
-    bpy.utils.register_class(ToggleSubgroupResolution)
-    bpy.utils.register_class(ToggleAllSubgroups)
-    bpy.utils.register_class(ToggleSubgroupDisplay)
-    bpy.utils.register_class(PowerlibPanel)
-    
-def unregister():
-    del bpy.types.Scene.ActiveSubgroup
-    bpy.utils.unregister_class(DisplaySubgroupContent)
-    bpy.utils.unregister_class(ToggleSubgroupResolution)
-    bpy.utils.unregister_class(ToggleAllSubgroups)
-    bpy.utils.unregister_class(ToggleSubgroupDisplay)
-    bpy.utils.unregister_class(PowerlibPanel)
-    
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/object_render_wire.py b/release/scripts/addons_contrib/object_render_wire.py
deleted file mode 100644
index ea5c5d9..0000000
--- a/release/scripts/addons_contrib/object_render_wire.py
+++ /dev/null
@@ -1,421 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See th
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# object_render_wire.py liero, meta-androcto,
-# Yorik van Havre, Alejandro Sierra, Howard Trickey
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Render Wireframe",
-    "author": "Community",
-    "description": " WireRender & WireSoild modes",
-    "version": (2, 3),
-    "blender": (2, 6, 3),
-    "location": "Object > Render Wireframe",
-    "warning": '',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-                   'func=detail&aid=26997',
-    'category': 'Object'}
-
-import bpy, mathutils
-
-cube_faces = [ [0,3,2,1], [5,6,7,4], [0,1,5,4],
-               [7,6,2,3], [2,6,5,1], [0,4,7,3] ]
-cube_normals = [ mathutils.Vector((0,0,-1)),
-                 mathutils.Vector((0,0,1)),
-                 mathutils.Vector((0,-1,0)),
-                 mathutils.Vector((0,1,0)),
-                 mathutils.Vector((1,0,0)),
-                 mathutils.Vector((-1,0,0)) ]
-
-def create_cube(me, v, d):
-    x = v.co.x
-    y = v.co.y
-    z = v.co.z
-    coords=[ [x-d,y-d,z-d], [x+d,y-d,z-d], [x+d,y+d,z-d], [x-d,y+d,z-d],
-         [x-d,y-d,z+d], [x+d,y-d,z+d], [x+d,y+d,z+d], [x-d,y+d,z+d] ]
-    for coord in coords:
-        me.vertices.add(1)
-        me.vertices[-1].co = mathutils.Vector(coord)
-
-def norm_dot(e, k, fnorm, me):
-    v = me.vertices[e[1]].co - me.vertices[e[0]].co
-    if k == 1:
-        v = -v
-    v.normalize()
-    return v * fnorm
-
-def fill_cube_face(me, index, f):
-    return [index + cube_faces[f][i] for i in range(4)]
-
-# Coords of jth point of face f in cube instance i
-def cube_face_v(me, f, i, j):
-    return me.vertices[i + cube_faces[f][j]].co
-
-def cube_face_center(me, f, i):
-    return 0.5 * (cube_face_v(me, f, i, 0) + \
-                  cube_face_v(me, f, i, 2))
-
-# Return distance between points on two faces when
-# each point is projected onto the plane that goes through
-# the face center and is perpendicular to the line
-# through the face centers.
-def projected_dist(me, i1, i2, f1, f2, j1, j2):
-    f1center = cube_face_center(me, f1, i1)
-    f2center = cube_face_center(me, f2, i2)
-    axis_norm = (f2center - f1center).normalized()
-    v1 = cube_face_v(me, f1, i1, j1)
-    v2 = cube_face_v(me, f2, i2, j2)
-    v1proj = v1 - (axis_norm * (v1 - f1center)) * axis_norm
-    v2proj = v2 - (axis_norm * (v2 - f2center)) * axis_norm
-    return (v2proj - v1proj).length
-
-def skin_edges(me, i1, i2, f1, f2):
-    # Connect verts starting at i1 forming cube face f1
-    # to those starting at i2 forming cube face f2.
-    # Need to find best alignment to avoid a twist.
-    shortest_length = 1e6
-    f2_start_index = 0
-    for i in range(4):
-        x = projected_dist(me, i1, i2, f1, f2, 0, i)
-        if x < shortest_length:
-            shortest_length = x
-            f2_start_index = i
-    ans = []
-    j = f2_start_index
-    for i in range(4):
-        fdata = [i1 + cube_faces[f1][i],
-                 i2 + cube_faces[f2][j],
-                 i2 + cube_faces[f2][(j + 1) % 4],
-                 i1 + cube_faces[f1][(i - 1) % 4]]
-        if fdata[3] == 0:
-            fdata = [fdata[3]] + fdata[0:3]
-        ans.extend(fdata)
-        j = (j - 1) % 4
-    return ans
-            
-
-# Return map: v -> list of length len(node_normals) where
-# each element of the list is either None (no assignment)
-# or ((v0, v1), 0 or 1) giving an edge and direction that face is assigned to.
-def find_assignment(me, edges, vert_edges, node_normals):
-    nf = len(node_normals)
-    feasible = {}
-    for e in edges:
-        for k in (0, 1):
-            fds = [(f, norm_dot(e, k, node_normals[f], me)) for f in range(nf)]
-            feasible[(e, k)] = [fd for fd in fds if fd[1] > 0.01]
-    assignment = {}
-    for v, ves in vert_edges.items():
-        assignment[v] = best_assignment(ves, feasible, nf)
-    return assignment
-
-def best_assignment(ves, feasible, nf):
-    apartial = [ None ] * nf
-    return best_assign_help(ves, feasible, apartial, 0.0)[0]
-
-def best_assign_help(ves, feasible, apartial, sumpartial):
-    if len(ves) == 0:
-        return (apartial, sumpartial)
-    else:
-        ek0 = ves[0]
-        vesrest = ves[1:]
-        feas = feasible[ek0]
-        bestsum = 0
-        besta = None
-        for (f, d) in feas:
-            if apartial[f] is None:
-                ap = apartial[:]
-                ap[f] = ek0
-                # sum up d**2 to penalize smaller d's more
-                sp = sumpartial + d*d
-                (a, s) = best_assign_help(vesrest, feasible, ap, sp)
-                if s > bestsum:
-                    bestsum = s
-                    besta = a
-        if besta:
-            return (besta, bestsum)
-        else:
-            # not feasible to assign e0, k0; try to assign rest
-            return best_assign_help(vesrest, feasible, apartial, sumpartial)
-
-def assigned_face(e, assignment):
-    (v0, v1), dir = e
-    a = assignment[v1]
-    for j, ee in enumerate(a):
-        if e == ee:
-            return j
-    return -1
-
-def create_wired_mesh(me2, me, thick):
-    edges = []
-    vert_edges = {}
-    for be in me.edges:
-        if be.select and not be.hide:
-            e = (be.key[0], be.key[1])
-            edges.append(e)
-            for k in (0, 1):
-                if e[k] not in vert_edges:
-                    vert_edges[e[k]] = []
-                vert_edges[e[k]].append((e, k))
-
-    assignment = find_assignment(me, edges, vert_edges, cube_normals)
-
-    # Create the geometry
-    n_idx = {}   
-    for v in assignment:
-        vpos = me.vertices[v]
-        index = len(me2.vertices)
-        # We need to associate each node with the new geometry
-        n_idx[v] = index   
-        # Geometry for the nodes, each one a cube
-        create_cube(me2, vpos, thick)
-
-    # Skin using the new geometry 
-    cfaces = []  
-    for k, f in assignment.items():
-        # Skin the nodes
-        for i in range(len(cube_faces)):
-            if f[i] is None:
-                cfaces.extend(fill_cube_face(me2, n_idx[k], i))
-            else:
-                (v0, v1), dir = f[i]
-                # only skin between edges in forward direction
-                # to avoid making doubles
-                if dir == 1:
-                    # but first make sure other end actually assigned
-                    i2 = assigned_face(((v0, v1), 0), assignment)
-                    if i2 == -1:
-                        cfaces.extend(fill_cube_face(me2, n_idx[k], i))
-                    continue
-                i2 = assigned_face(((v0, v1), 1), assignment)
-                if i2 != -1:
-                    cfaces.extend(skin_edges(me2, n_idx[v0], n_idx[v1], i, i2))
-                else:
-                    # assignment failed for this edge
-                    cfaces.extend(fill_cube_face(me2, n_idx[k], i))
-
-    # adding faces to the mesh
-    me2.tessfaces.add(len(cfaces) // 4)
-    me2.tessfaces.foreach_set("vertices_raw", cfaces)
-    me2.update(calc_edges=True)
-
-# Add built in wireframe
-def wire_add(mallas):
-    if mallas:
-        bpy.ops.object.select_all(action='DESELECT')
-        bpy.context.scene.objects.active = mallas[0]
-        for o in mallas: o.select = True
-        bpy.ops.object.duplicate()
-        obj, sce = bpy.context.object, bpy.context.scene
-        for mod in obj.modifiers: obj.modifiers.remove(mod)
-        bpy.ops.object.join()
-        bpy.ops.object.mode_set(mode='EDIT')
-        bpy.ops.mesh.wireframe(thickness=0.005)
-        bpy.ops.object.mode_set()
-        for mat in obj.material_slots: bpy.ops.object.material_slot_remove()
-        if 'wire_object' in sce.objects.keys():
-            sce.objects.get('wire_object').data = obj.data
-            sce.objects.get('wire_object').matrix_world = mallas[0].matrix_world
-            sce.objects.unlink(obj)
-        else:
-            obj.name = 'wire_object'
-        obj.data.materials.append(bpy.data.materials.get('mat_wireobj'))
-
-    return{'FINISHED'}
-'''
-class VIEW3D_PT_tools_SolidifyWireframe(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_context = "mesh_edit"
-    bl_label = "Solidify Wireframe"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=True)
-        col.operator("mesh.solidify_wireframe", text="Solidify")
-        col.prop(context.scene, "swThickness")
-        col.prop(context.scene, "swSelectNew")
-'''
-# a class for your operator
-class SolidifyWireframe(bpy.types.Operator):
-    """Turns the selected edges of a mesh into solid objects"""
-    bl_idname = "mesh.solidify_wireframe"
-    bl_label = "Solidify Wireframe"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    def invoke(self, context, event):
-        return self.execute(context)
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.active_object
-        return ob and ob.type == 'MESH'
-
-    def execute(self, context):
-        # Get the active object
-        ob_act = context.active_object
-        # getting current edit mode
-        currMode = ob_act.mode
-        # switching to object mode
-        bpy.ops.object.mode_set(mode='OBJECT')
-        bpy.ops.object.select_all(action='DESELECT')
-        # getting mesh data
-        mymesh = ob_act.data
-        #getting new mesh
-        newmesh = bpy.data.meshes.new(mymesh.name + " wire")
-        obj = bpy.data.objects.new(newmesh.name,newmesh)
-        obj.location = ob_act.location
-        obj.rotation_euler = ob_act.rotation_euler
-        obj.scale = ob_act.scale
-        context.scene.objects.link(obj)
-        create_wired_mesh(newmesh, mymesh, context.scene.swThickness)
-
-        # restoring original editmode if needed
-        if context.scene.swSelectNew:
-            obj.select = True
-            context.scene.objects.active = obj
-        else:
-            bpy.ops.object.mode_set(mode=currMode)
-
-        # returning after everything is done
-        return {'FINISHED'}
-		
-class WireMaterials(bpy.types.Operator):
-    bl_idname = 'scene.wire_render'
-    bl_label = 'Apply Materials'
-    bl_description = 'Set Up Materials for a Wire Render'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-        wm = bpy.context.window_manager
-        sce = bpy.context.scene
-
-        if 'mat_clay' not in bpy.data.materials:
-            mat = bpy.data.materials.new('mat_clay')
-            mat.specular_intensity = 0
-        else: mat = bpy.data.materials.get('mat_clay')
-        mat.diffuse_color = wm.col_clay
-        mat.use_shadeless = wm.shadeless_mat
-
-        if 'mat_wire' not in bpy.data.materials:
-            mat = bpy.data.materials.new('mat_wire')
-            mat.specular_intensity = 0
-            mat.use_transparency = True
-            mat.type = 'WIRE'
-            mat.offset_z = 0.05
-        else: mat = bpy.data.materials.get('mat_wire')
-        mat.diffuse_color = wm.col_wire
-        mat.use_shadeless = wm.shadeless_mat
-
-        try: bpy.ops.object.mode_set()
-        except: pass
-
-        if wm.selected_meshes: objetos = bpy.context.selected_objects
-        else: objetos = sce.objects
-
-        mallas = [o for o in objetos if o.type == 'MESH' and o.is_visible(sce) and o.name != 'wire_object']
-
-        for obj in mallas:
-            sce.objects.active = obj
-            print ('procesando >', obj.name)
-            obj.show_wire = wm.wire_view
-            for mat in obj.material_slots:
-                bpy.ops.object.material_slot_remove()
-            obj.data.materials.append(bpy.data.materials.get('mat_wire'))
-            obj.data.materials.append(bpy.data.materials.get('mat_clay'))
-            obj.material_slots.data.active_material_index = 1
-            bpy.ops.object.editmode_toggle()
-            bpy.ops.mesh.select_all(action='SELECT')
-            bpy.ops.object.material_slot_assign()
-            bpy.ops.object.mode_set()
-
-        if wm.wire_object:
-            if 'mat_wireobj' not in bpy.data.materials:
-                mat = bpy.data.materials.new('mat_wireobj')
-                mat.specular_intensity = 0
-            else: mat = bpy.data.materials.get('mat_wireobj')
-            mat.diffuse_color = wm.col_wire
-            mat.use_shadeless = wm.shadeless_mat
-            wire_add(mallas)
-
-        return{'FINISHED'}
-
-class PanelWMat(bpy.types.Panel):
-    bl_label = 'Setup Wire Render'
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        wm = bpy.context.window_manager
-        active_obj = context.active_object
-        layout = self.layout
-
-        column = layout.column(align=True)
-        column.prop(wm, 'col_clay')
-        column.prop(wm, 'col_wire')
-        column = layout.column(align=True)
-        column.prop(wm, 'selected_meshes')
-        column.prop(wm, 'shadeless_mat')
-        column.prop(wm, 'wire_view')
-        column.prop(wm, 'wire_object')
-        column.separator()
-        column.operator('scene.wire_render')
-        column.label(text='- - - - - - - - - - - - - - - - - - - - - -')
-        col = layout.column(align=True)
-        column.label(text='Solid WireFrame')
-        layout.operator("mesh.solidify_wireframe", text="Create Mesh Object")
-        col.prop(context.scene, "swThickness")
-        col.prop(context.scene, "swSelectNew")
-bpy.types.WindowManager.selected_meshes = bpy.props.BoolProperty(name='Selected Meshes', default=False, description='Apply materials to Selected Meshes / All Visible Meshes')
-bpy.types.WindowManager.shadeless_mat = bpy.props.BoolProperty(name='Shadeless', default=False, description='Generate Shadeless Materials')
-bpy.types.WindowManager.col_clay = bpy.props.FloatVectorProperty(name='', description='Clay Color', default=(1.0, 0.9, 0.8), min=0, max=1, step=1, precision=3, subtype='COLOR_GAMMA', size=3)
-bpy.types.WindowManager.col_wire = bpy.props.FloatVectorProperty(name='', description='Wire Color', default=(0.1 ,0.0 ,0.0), min=0, max=1, step=1, precision=3, subtype='COLOR_GAMMA', size=3)
-bpy.types.WindowManager.wire_view = bpy.props.BoolProperty(name='Viewport Wires', default=False, description='Overlay wires display over solid in Viewports')
-bpy.types.WindowManager.wire_object = bpy.props.BoolProperty(name='Create Mesh Object', default=False, description='Add a Wire Object to scene to be able to render wires in Cycles')
-bpy.types.Scene.swThickness = bpy.props.FloatProperty(name="Thickness", description="Thickness of the skinned edges", default=0.01)
-bpy.types.Scene.swSelectNew = bpy.props.BoolProperty(name="Select wire", description="If checked, the wire object will be selected after creation", default=True)
-
-# Register the operator
-def solidifyWireframe_menu_func(self, context):
-        self.layout.operator(SolidifyWireframe.bl_idname, text="Solidify Wireframe", icon='PLUGIN')
-
-# Add "Solidify Wireframe" menu to the "Mesh" menu.
-def register():
-        bpy.utils.register_class(WireMaterials)
-        bpy.utils.register_class(PanelWMat)
-        bpy.utils.register_module(__name__)
-        bpy.types.Scene.swThickness = bpy.props.FloatProperty(name="Thickness",
-                                                              description="Thickness of the skinned edges",
-                                                              default=0.01)
-        bpy.types.Scene.swSelectNew = bpy.props.BoolProperty(name="Select wire",
-                                                             description="If checked, the wire object will be selected after creation",
-                                                             default=True)
-        bpy.types.VIEW3D_MT_edit_mesh_edges.append(solidifyWireframe_menu_func)
-
-# Remove "Solidify Wireframe" menu entry from the "Mesh" menu.
-def unregister():
-        bpy.utils.unregister_class(WireMaterials)
-        bpy.utils.unregister_class(PanelWMat)
-        bpy.utils.unregister_module(__name__)
-        del bpy.types.Scene.swThickness
-        bpy.types.VIEW3D_MT_edit_mesh_edges.remove(solidifyWireframe_menu_func)
-
-if __name__ == "__main__":
-        register()
diff --git a/release/scripts/addons_contrib/online_mat_lib/__init__.py b/release/scripts/addons_contrib/online_mat_lib/__init__.py
deleted file mode 100644
index 3b80a10..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/__init__.py
+++ /dev/null
@@ -1,3746 +0,0 @@
-#  ***** BEGIN GPL LICENSE BLOCK *****
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see http://www.gnu.org/licenses/
-#  or write to the Free Software Foundation, Inc., 51 Franklin Street,
-#  Fifth Floor, Boston, MA 02110-1301, USA.
-#
-#  The Original Code is Copyright (C) 2012 by Peter Cassetta    ###
-#  All rights reserved.
-#
-#  Contact:                        matlib at peter.cassetta.info   ###
-#  Information:  http://peter.cassetta.info/material-library/   ###
-#
-#  The Original Code is: all of this file.
-#
-#  Contributor(s): Peter Cassetta.
-#
-#  ***** END GPL LICENSE BLOCK *****
-
-bl_info = {
-    "name": "Online Material Library",
-    "author": "Peter Cassetta",
-    "version": (0, 5),
-    "blender": (2, 6, 3),
-    "location": "Properties > Material > Online Material Library",
-    "description": "Browse and download materials from online CC0 libraries.",
-    "warning": "Beta version",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Material/Online_Material_Library",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=31802",
-    "category": "Material"}
-
-import bpy
-from bpy_extras.io_utils import ExportHelper
-import os.path
-import http.client
-import xml.dom.minidom
-
-library = ""
-#editions = [("Release0", "Release", "(recommended) Stable; gets updated with high-quality materials every one or two months."),
-#            ("Testing1", "Testing", "(online only) Volatile; gets updated with new materials continually."),
-#            ("Bundled2", "Bundled", "(offline only) Contains a small amount of materials bundled with this add-on.")]
-#bpy.types.Scene.mat_lib_edition = bpy.props.EnumProperty(name = "Library Edition", items = editions, description = "Choose an edition", options = {'SKIP_SAVE'})
-
-library_data = []
-update_data = ["Up-to-date.", ""]
-
-library_enum_items = [("peter.cassetta.info/material-library/release/", "Peter's Library - Release", "Stable library hosted on peter.cassetta.info (Default)"),
-                      ("peter.cassetta.info/material-library/testing/", "Peter's Library - Testing", "Continually updated library hosted on peter.cassetta.info (Online only)"),
-                      ("bundled", "Bundled Library", "The library bundled with this add-on (Offline only)")]
-bpy.types.Scene.mat_lib_library = bpy.props.EnumProperty(name = "Select library:", items = library_enum_items, description = "Choose a library", options = {'SKIP_SAVE'})
-
-working_mode = "none"
-mat_lib_host = ""
-mat_lib_location = ""
-mat_lib_cached_files = -1
-if os.path.exists(bpy.utils.user_resource('SCRIPTS', path="addons" + os.sep + "online_mat_lib" + os.sep + "material-library")):
-    mat_lib_folder = bpy.utils.user_resource('SCRIPTS', path="addons" + os.sep + "online_mat_lib" + os.sep + "material-library")
-elif os.path.exists(bpy.utils.script_paths()[0] + os.sep + "addons" + os.sep + "online_mat_lib" + os.sep + "material-library"):
-    mat_lib_folder = bpy.utils.script_paths()[0] + os.sep + "addons" + os.sep + "online_mat_lib" + os.sep + "material-library"
-elif bpy.utils.script_paths()[0] + os.sep + "addons_contrib" + os.sep + "online_mat_lib" + os.sep + "material-library":
-    mat_lib_folder = bpy.utils.script_paths()[0] + os.sep + "addons_contrib" + os.sep + "online_mat_lib" + os.sep + "material-library"
-else:
-    print("ONLINE MATERIAL LIBRARY -- MAJOR PROBLEM:"\
-    "COULD NOT LOCATE ADD-ON INSTALLATION PATH.")
-    mat_lib_folder = "error"
-
-mat_lib_contents = "Please refresh."
-mat_lib_category_filenames = []
-mat_lib_category_types = []
-mat_lib_category_names = []
-mat_lib_categories = 0
-
-category_contents = "None"
-category_name = ""
-category_filename = ""
-category_materials = 0
-
-category_type = "none"
-
-sub_category_contents = "None"
-sub_category_name = ""
-sub_category_filename = ""
-sub_category_categories = 0
-sub_category_names = []
-sub_category_filenames = []
-
-material_names = []
-material_filenames = []
-material_contributors = []
-material_ratings = []
-material_fireflies = []
-material_speeds = []
-material_complexities = []
-material_scripts = []
-material_images = []
-
-material_file_contents = ""
-
-current_material_number = -1
-current_material_cached = False
-current_material_previewed = False
-material_detail_view = "RENDER"
-preview_message = []
-node_message = []
-save_filename = ""
-script_stack = []
-osl_scripts = []
-
-bpy.types.Scene.mat_lib_auto_preview = bpy.props.BoolProperty(name = "Auto-download previews", description = "Automatically download material previews in online mode", default = True, options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_show_osl_materials = bpy.props.BoolProperty(name = "Show OSL materials", description = "Enable to show materials with OSL shading scripts", default = False, options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_show_textured_materials = bpy.props.BoolProperty(name = "Show textured materials", description = "Enable to show materials with image textures", default = True, options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_osl_only_trusted = bpy.props.BoolProperty(name = "Use OSL scripts from trusted sources only", description = "Disable to allow downloading OSL scripts from anywhere on the web (Not recommended)", default = True, options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_images_only_trusted = bpy.props.BoolProperty(name = "Use image textures from trusted sources only", description = "Disable to allow downloading image textures from anywhere on the web (Not recommended)", default = True, options = {'SKIP_SAVE'})
-
-bpy.types.Scene.mat_lib_bcm_write = bpy.props.StringProperty(name = "Text Datablock", description = "Name of text datablock to write .bcm data to", default="bcm_file", options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_bcm_read = bpy.props.StringProperty(name = "Text Datablock", description = "Name of text datablock to read .bcm data from", default="bcm_file", options = {'SKIP_SAVE'})
-bpy.types.Scene.mat_lib_bcm_name = bpy.props.StringProperty(name = "Material Name", description = "Specify a name for the new material", default="Untitled", options = {'SKIP_SAVE'})
-
-bpy.types.Scene.mat_lib_bcm_save_location = bpy.props.StringProperty(name = "Save location", description = "Directory to save .bcm files in", default=mat_lib_folder + os.sep + "my-materials" + os.sep, options = {'SKIP_SAVE'}, subtype="DIR_PATH")
-bpy.types.Scene.mat_lib_bcm_open_location = bpy.props.StringProperty(name = "Open location", description = "Location of .bcm file to open", default=mat_lib_folder + os.sep + "my-materials" + os.sep + "untitled.bcm", options = {'SKIP_SAVE'})
-
-category_enum_items = [("None0", "None", "No category selected")]
-bpy.types.Scene.mat_lib_material_category = bpy.props.EnumProperty(name = "", items = category_enum_items, description = "Choose a category", options = {'SKIP_SAVE'})
-prev_category = "None0"
-
-subcategory_enum_items = [("None0", "None", "No Subcategory Selected")]
-bpy.types.Scene.mat_lib_material_subcategory = bpy.props.EnumProperty(name = "", items = subcategory_enum_items, description = "Choose a subcategory", options = {'SKIP_SAVE'})
-
-class OnlineMaterialLibraryPanel(bpy.types.Panel):
-    """Creates a Panel in the Object properties window"""
-    bl_label = "Online Material Library"
-    bl_idname = "OnlineMaterialLibraryPanel"
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "material"
-    
-    def draw(self, context):
-        global show_success_message
-        global show_success_message_timeout
-        global current_material_number
-        global mat_lib_contents
-        global prev_category
-        global save_filename
-        
-        layout = self.layout
-        
-        if context.scene.render.engine == "CYCLES":
-            #Cycles is enabled!
-            row = layout.row()
-            
-            if category_type is not "info" and category_type is not "settings" and category_type is not "tools":
-                if mat_lib_contents == "" or mat_lib_contents == "Please refresh.":
-                    if mat_lib_folder == "error":
-                        row.label(text="ERROR: Could not find installation path!", icon='ERROR')
-                    else:
-                        #Material Library Contents variable is empty -- show welcome message
-                        row.label(text="Online Material Library Add-on -- Version 0.5", icon='SMOOTH')
-                        
-                        row = layout.row()
-                        rowcol = row.column(align=True)
-                        rowcol.alignment = 'EXPAND'
-                        rowcol.prop(context.scene, "mat_lib_library", text="")
-                        
-                        rowcolrow = rowcol.row(align=True)
-                        rowcolrow.alignment = 'EXPAND'
-                        if "bundled" not in context.scene.mat_lib_library:
-                            rowcolrow.operator("material.libraryconnect", text="Connect", icon='WORLD').mode = "online"
-                        if "testing" not in context.scene.mat_lib_library:
-                            rowcolrow.operator("material.libraryconnect", text="Work Offline", icon='DISK_DRIVE').mode = "offline"
-                    
-                elif working_mode is not "none":
-                    #We have a valid material library
-                    row = layout.row(align=True)
-                    row.alignment = 'EXPAND'
-                    row.prop(bpy.context.scene, "mat_lib_material_category")
-                else:
-                    #Could not retrive a valid material library
-                    row.label(text="Could not retrieve material library.", icon='CANCEL')
-                    row = layout.row()
-                    row.label(text=str(mat_lib_contents))
-                    row = layout.row()
-                    row.label(text="..." + str(mat_lib_contents)[-50:])
-                    
-                    row = layout.row()
-                    rowcol = row.column(align=True)
-                    rowcol.alignment = 'EXPAND'
-                    rowcol.prop(context.scene, "mat_lib_library", text="")
-                    
-                    rowcolrow = rowcol.row(align=True)
-                    rowcolrow.alignment = 'EXPAND'
-                    if "bundled" not in context.scene.mat_lib_library:
-                        rowcolrow.operator("material.libraryconnect", text="Attempt Reconnect", icon='WORLD').mode = "online"
-                    if "testing" not in context.scene.mat_lib_library:
-                        rowcolrow.operator("material.libraryconnect", text="Work Offline", icon='DISK_DRIVE').mode = "offline"
-            
-            #Here we check if the user has changed the category, if so, update.
-            if prev_category != bpy.context.scene.mat_lib_material_category:
-                prev_category = bpy.context.scene.mat_lib_material_category
-                libraryCategoryUpdate()
-            
-            if category_type == "none":
-                #Not browsing category
-                if working_mode is not "none":
-                    row = layout.row()
-                    rowcol = row.column(align=True)
-                    rowcol.alignment = 'EXPAND'
-                    rowcol.prop(context.scene, "mat_lib_library", text="")
-                    
-                    rowcolrow = rowcol.row(align=True)
-                    rowcolrow.alignment = 'EXPAND'
-                    if "bundled" not in context.scene.mat_lib_library:
-                        if working_mode == "online":
-                            rowcolrow.operator("material.libraryconnect", text="Reconnect", icon='WORLD').mode = "online"
-                        else:
-                            rowcolrow.operator("material.libraryconnect", text="Connect", icon='WORLD').mode = "online"
-                    if "testing" not in context.scene.mat_lib_library:
-                        if working_mode == "offline":
-                            rowcolrow.operator("material.libraryconnect", text="Reload Library", icon='DISK_DRIVE').mode = "offline"
-                        else:
-                            rowcolrow.operator("material.libraryconnect", text="Work Offline", icon='DISK_DRIVE').mode = "offline"
-                
-                row = layout.row(align=True)
-                row.alignment = 'EXPAND'
-                row.operator("material.libraryinfo", text="Info", icon='INFO')
-                row.operator("material.librarytools", text="Tools", icon='MODIFIER')
-                row.operator("material.librarysettings", text="Settings", icon='SETTINGS')
-                
-                if "Up-to-date." not in update_data[0]:
-                    row = layout.row()
-                    row.label(text=update_data[0])
-                    row.operator("wm.url_open", text="Get latest version", icon='WORLD').url = update_data[1]
-                    
-            elif category_type == "info":
-                row.label(text="Add-on Info", icon='INFO')
-                row.operator("material.libraryhome", text="", icon='LOOP_BACK')
-                
-                row = layout.row()
-                row.operator("wm.url_open", text="All materials are CC0 - learn more.", emboss=False).url = "http://creativecommons.org/publicdomain/zero/1.0/"
-                
-                row = layout.row()
-                row.operator("wm.url_open", text="Material previews generated with B.M.P.S.", emboss=False).url = "https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/rendering/cycles/bmps.blend"
-                row = layout.row()
-                row.operator("wm.url_open", text="B.M.P.S. created by Robin \"tuqueque\" Marín", emboss=False).url = "http://blenderartists.org/forum/showthread.php?151903-b.m.p.s.-1.5!"
-            
-            elif category_type == "settings":
-                row.label(text="Library Settings", icon='SETTINGS')
-                row.operator("material.libraryhome", text="", icon='LOOP_BACK')
-                
-                row = layout.row()
-                row.prop(bpy.context.scene, "mat_lib_auto_preview")
-                row = layout.row()
-                row.prop(bpy.context.scene, "mat_lib_osl_only_trusted")
-                row = layout.row()
-                row.prop(bpy.context.scene, "mat_lib_images_only_trusted")
-                
-                row = layout.row()
-                row.label(text="Cached data for active library:")
-                
-                row = layout.row()
-                if mat_lib_cached_files == 0:
-                    row.label(text="No cached files.")
-                elif mat_lib_cached_files == 1:
-                    row.label(text=str(mat_lib_cached_files) + " cached file.")
-                    row.operator("material.libraryclearcache", text="Clear Cache", icon='CANCEL')
-                elif mat_lib_cached_files != -1:
-                    row.label(text=str(mat_lib_cached_files) + " cached files.")
-                    row.operator("material.libraryclearcache", text="Clear Cache", icon='CANCEL')
-                else:
-                    row.label(text="Please select a library first.", icon="ERROR")
-            
-            elif category_type == "tools":
-                row.label(text="Material Tools", icon='MODIFIER')
-                row.operator("material.libraryhome", text="", icon='LOOP_BACK')
-                
-                row = layout.row()
-                row.label(text="Write material data to text as .bcm:")
-                
-                row = layout.row(align=True)
-                row.alignment = 'EXPAND'
-                row.prop(bpy.context.scene, "mat_lib_bcm_write", text="", icon="TEXT")
-                row.operator("material.libraryconvert", text="Write to text", icon='MATERIAL_DATA')
-                
-                row = layout.row()
-                row.label(text="Save material(s) as .bcm files:")
-                
-                row = layout.row()
-                col = row.column(align=True)
-                col.alignment = 'EXPAND'
-                colrow = col.row()
-                colrow.prop(context.scene, "mat_lib_bcm_save_location", text="")
-                colrow = col.row(align=True)
-                colrow.alignment = 'EXPAND'
-                colrow.operator("material.libraryconvert", text="Save active", icon='DISK_DRIVE').save_location = context.scene.mat_lib_bcm_save_location
-                save_button = colrow.operator("material.libraryconvert", text="Save all materials", icon='DISK_DRIVE')
-                save_button.save_location = context.scene.mat_lib_bcm_save_location
-                save_button.all_materials = True
-                
-                row = layout.row()
-                row.label(text="Open a local .bcm file:")
-                 
-                row = layout.row()
-                col = row.column(align=True)
-                col.alignment = 'EXPAND'
-                colrow = col.row()
-                colrow.prop(context.scene, "mat_lib_bcm_open_location", text="")
-                colrow.operator("buttons.file_browse", text="", icon='FILESEL').relative_path = False
-                colrow = col.row(align=True)
-                colrow.alignment = 'EXPAND'
-                colrow.operator("material.libraryadd", text="Add to materials", icon='ZOOMIN').open_location = context.scene.mat_lib_bcm_open_location
-                colrow.operator("material.libraryapply", text="Apply to active", icon='PASTEDOWN').open_location = context.scene.mat_lib_bcm_open_location
-                
-                row = layout.row()
-                row.label(text="Read .bcm data in a text block to a material:")
-                 
-                row = layout.row()
-                col = row.column(align=True)
-                col.alignment = 'EXPAND'
-                colrow = col.row()
-                colrow.prop(context.scene, "mat_lib_bcm_read", text="", icon='TEXT')
-                colrow = col.row()
-                colrow.prop(context.scene, "mat_lib_bcm_name", text="", icon='MATERIAL')
-                colrow = col.row(align=True)
-                colrow.alignment = 'EXPAND'
-                colrow.operator("material.libraryadd", text="Add to materials", icon='ZOOMIN').text_block = context.scene.mat_lib_bcm_read
-                colrow.operator("material.libraryapply", text="Apply to active", icon='PASTEDOWN').text_block = context.scene.mat_lib_bcm_read
-                
-            elif category_type == "category":
-                #Browsing category - show materials
-                row = layout.row()
-                matwrap = row.box()
-                i = 0
-                while i < category_materials:
-                    if i == current_material_number:
-                        matwraprow = matwrap.row()
-                        matwrapbox = matwraprow.box()
-                        matwrapboxrow = matwrapbox.row()
-                        matwrapboxrow.operator("material.libraryviewmaterial", text=material_names[i], icon='MATERIAL', emboss=False).material = i
-                        matwrapboxrowcol = matwrapboxrow.column()
-                        matwrapboxrowcolrow = matwrapboxrowcol.row()
-                        matwrapboxrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapboxrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapboxrowcol = matwrapboxrow.column()
-                        matwrapboxrowcolrow = matwrapboxrowcol.row()
-                        matwrapboxrowcolrowsplit = matwrapboxrowcolrow.split(percentage=0.8)
-                        matwrapboxrowcolrowsplitrow = matwrapboxrowcolrowsplit.row()
-                        
-                        #Ratings
-                        if material_ratings[i] == 0:
-                            matwrapboxrowcolrowsplitrow.operator("material.libraryviewmaterial", text="Unrated", emboss=False).material = i
-                        else:
-                            e = 0
-                            while e < material_ratings[i]:
-                                matwrapboxrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_ON', emboss=False).material = i
-                                e = e + 1
-                            
-                            if material_ratings[i] is not 5:    
-                                e = 0
-                                while e < (5 - material_ratings[i]):
-                                    matwrapboxrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_OFF', emboss=False).material = i
-                                    e = e + 1
-                    else:
-                        matwraprow = matwrap.row()
-                        matwrapcol = matwraprow.column()
-                        matwrapcolrow = matwrapcol.row()
-                        matwrapcolrow.operator("material.libraryviewmaterial", text=material_names[i], icon='MATERIAL', emboss=False).material = i
-                        matwrapcolrowcol = matwrapcolrow.column()
-                        matwrapcolrowcolrow = matwrapcolrowcol.row()
-                        matwrapcolrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapcolrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapcolrowcol = matwrapcolrow.column()
-                        matwrapcolrowcolrow = matwrapcolrowcol.row()
-                        matwrapcolrowcolrowsplit = matwrapcolrowcolrow.split(percentage=0.8)
-                        matwrapcolrowcolrowsplitrow = matwrapcolrowcolrowsplit.row()
-                        
-                        #Ratings
-                        if material_ratings[i] == 0:
-                            matwrapcolrowcolrowsplitrow.operator("material.libraryviewmaterial", text="Unrated", emboss=False).material = i
-                        else:
-                            e = 0
-                            while e < material_ratings[i]:
-                                matwrapcolrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_ON', emboss=False).material = i
-                                e = e + 1
-                            
-                            if material_ratings[i] is not 5:    
-                                e = 0
-                                while e < (5 - material_ratings[i]):
-                                    matwrapcolrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_OFF', emboss=False).material = i
-                                    e = e + 1
-                    i = i + 1
-                
-                if current_material_number is not -1:
-                    #Display selected material's info
-                    row = layout.row()
-                    infobox = row.box()
-                    inforow = infobox.row()
-                    
-                    #Material name
-                    inforow.label(text=(material_names[current_material_number]))
-                    
-                    #Preview download button
-                    if current_material_previewed == False:
-                        preview_button = inforow.operator("material.librarypreview", text="", icon='COLOR', emboss=False)
-                        preview_button.name = material_names[current_material_number]
-                        preview_button.filename = material_filenames[current_material_number]
-                    
-                    if library == "release":
-                        #Cache indicator/button
-                        if current_material_cached:
-                            inforow.label(text="", icon="SAVE_COPY")
-                        else:
-                            inforow.operator("material.librarycache", text="", icon="LONGDISPLAY", emboss=False).filename = material_filenames[current_material_number]
-                    
-                    #Close button
-                    inforow.operator("material.libraryviewmaterial", text="", icon='PANEL_CLOSE').material = -1
-                    
-                    #inforow = infobox.row()
-                    inforowsplit = infobox.split(percentage=0.5)
-                    
-                    #Display a preview
-                    if bpy.data.textures.find("mat_lib_preview_texture") == -1:
-                        bpy.data.textures.new("mat_lib_preview_texture", "IMAGE")
-                        preview_texture = bpy.data.textures["mat_lib_preview_texture"]
-                        inforowcol = inforowsplit.column()
-                        
-                        if material_contributors[current_material_number] != "Unknown" and material_contributors[current_material_number] != "Anonymous":
-                            inforowcolrow = inforowcol.row()
-                            inforowcolrow.label(text="By %s." % material_contributors[current_material_number])
-                        else:
-                            inforowcolrow = inforowcol.row()
-                            inforowcolrow.label(text="Author unknown.")
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.template_preview(preview_texture)
-                    else:
-                        preview_texture = bpy.data.textures['mat_lib_preview_texture']
-                        inforowcol = inforowsplit.column()
-                        if material_contributors[current_material_number] != "Unknown" and material_contributors[current_material_number] != "Anonymous":
-                            inforowcolrow = inforowcol.row()
-                            inforowcolrow.label(text="By %s." % material_contributors[current_material_number])
-                        else:
-                            inforowcolrow = inforowcol.row()
-                            inforowcolrow.label(text="Author unknown.")
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.template_preview(preview_texture)
-                    
-                    inforowcol = inforowsplit.column()
-                    inforowcolrow = inforowcol.row()
-                    inforowcolcol = inforowcol.column(align=True)
-                    inforowcolcol.alignment = 'EXPAND'
-                    inforowcolcolrow = inforowcolcol.row()
-                    if material_detail_view == 'RENDER':
-                        if material_fireflies[current_material_number] == "high":
-                            inforowcolcolrow.label(text="Firefly Level: High")
-                            inforowcolcolrow.label(text="", icon='PARTICLES')
-                        elif material_fireflies[current_material_number] == "medium":
-                            inforowcolcolrow.label(text="Firefly Level: Medium")
-                            inforowcolcolrow.label(text="", icon='MOD_PARTICLES')
-                        else:
-                            inforowcolcolrow.label(text="Firefly Level: Low")
-                        inforowcolcolrow = inforowcolcol.row()
-                            
-                        if material_complexities[current_material_number] == "simple":
-                            inforowcolcolrow.label(text="Complexity: Simple")
-                        elif material_complexities[current_material_number] == "intermediate":
-                            inforowcolcolrow.label(text="Complexity: Intermediate")
-                        elif material_complexities[current_material_number] == "complex":
-                            inforowcolcolrow.label(text="Complexity: Complex")
-                        inforowcolcolrow = inforowcolcol.row()
-                        
-                        if material_speeds[current_material_number] == "slow":
-                            inforowcolcolrow.label(text="Render Speed: Slow")
-                            inforowcolcolrow.label(text="", icon='PREVIEW_RANGE')
-                        elif material_speeds[current_material_number] == "fair":
-                            inforowcolcolrow.label(text="Render Speed: Fair")
-                            inforowcolcolrow.label(text="", icon='TIME')
-                        else:
-                            inforowcolcolrow.label(text="Render Speed: Good")
-                        inforowcolcolrow = inforowcolcol.row()
-                        details = inforowcolcolrow.row(align=True)
-                        details.alignment = 'RIGHT'
-                        detailshidden = details.row()
-                        detailshidden.enabled = False
-                        detailshidden.operator("material.librarydetailview", text="", icon='PLAY_REVERSE').mode = "PREVIOUS"
-                        details.operator("material.librarydetailview", text="", icon='PLAY').mode = "NEXT"
-                    elif material_detail_view == "DATA":
-                        if material_scripts[current_material_number] == "0":
-                            inforowcolcolrow.label(text="OSL Scripts: 0")
-                        else:
-                            inforowcolcolrow.label(text="OSL Scripts: %s" % material_scripts[current_material_number])
-                            inforowcolcolrow.label(text="", icon='TEXT')
-                        inforowcolcolrow = inforowcolcol.row()
-                    
-                        if material_images[current_material_number] == "0":
-                            inforowcolcolrow.label(text="Images: 0")
-                        else:
-                            inforowcolcolrow.label(text="Images: %s" % material_images[current_material_number])
-                            inforowcolcolrow.label(text="", icon='IMAGE_RGB')
-                            
-                        inforowcolcolrow = inforowcolcol.row()
-                        inforowcolcolrow.label(text=" ")
-                        
-                        inforowcolcolrow = inforowcolcol.row()
-                        details = inforowcolcolrow.row(align=True)
-                        details.alignment = 'RIGHT'
-                        details.operator("material.librarydetailview", text="", icon='PLAY_REVERSE').mode = "PREVIOUS"
-                        detailshidden = details.row()
-                        detailshidden.enabled = False
-                        detailshidden.operator("material.librarydetailview", text="", icon='PLAY').mode = "NEXT"
-                        
-                    inforowcolcolcol = inforowcolcol.column(align=True)
-                    inforowcolcolcol.alignment = 'EXPAND'
-                    functions = inforowcolcolcol.row()
-                    #Display "Add" button
-                    mat_button = functions.operator("material.libraryadd", text="Add to materials", icon='ZOOMIN')
-                    mat_button.mat_name = material_names[current_material_number]
-                    mat_button.filename = material_filenames[current_material_number]
-                    functions = inforowcolcolcol.row()
-                    
-                    #Display "Apply" button
-                    mat_button = functions.operator("material.libraryapply", text="Apply to active", icon='PASTEDOWN')
-                    mat_button.mat_name = material_names[current_material_number]
-                    mat_button.filename = material_filenames[current_material_number]
-                    functions = inforowcolcolcol.row()
-                    
-                    #Display "Save" button
-                    mat_button = functions.operator("material.librarysave", text="Save as...", icon='DISK_DRIVE')
-                    mat_button.filepath = mat_lib_folder + os.sep + "my-materials" + os.sep + material_filenames[current_material_number] + ".bcm"
-                    mat_button.filename = material_filenames[current_material_number]
-                    save_filename = material_filenames[current_material_number]
-                
-            elif category_type == "subcategory":
-                #Browsing subcategory - show materials
-                row = layout.row()
-                matwrap = row.box()
-                i = 0
-                while i < category_materials:
-                    if (i == current_material_number):
-                        matwraprow = matwrap.row()
-                        matwrapbox = matwraprow.box()
-                        matwrapboxrow = matwrapbox.row()
-                        matwrapboxrow.operator("material.libraryviewmaterial", text=material_names[i], icon='MATERIAL', emboss=False).material = i
-                        matwrapboxrowcol = matwrapboxrow.column()
-                        matwrapboxrowcolrow = matwrapboxrowcol.row()
-                        matwrapboxrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapboxrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapboxrowcol = matwrapboxrow.column()
-                        matwrapboxrowcolrow = matwrapboxrowcol.row()
-                        matwrapboxrowcolrowsplit = matwrapboxrowcolrow.split(percentage=0.8)
-                        matwrapboxrowcolrowsplitrow = matwrapboxrowcolrowsplit.row()
-                        
-                        #Ratings
-                        e = 0
-                        while e < material_ratings[i]:
-                            matwrapboxrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_ON', emboss=False).material = i
-                            e = e + 1
-                        
-                        if material_ratings[i] is not 5:    
-                            e = 0
-                            while e < (5 - material_ratings[i]):
-                                matwrapboxrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_OFF', emboss=False).material = i
-                                e = e + 1
-                    else:
-                        matwraprow = matwrap.row()
-                        matwrapcol = matwraprow.column()
-                        matwrapcolrow = matwrapcol.row()
-                        matwrapcolrow.operator("material.libraryviewmaterial", text=material_names[i], icon='MATERIAL', emboss=False).material = i
-                        matwrapcolrowcol = matwrapcolrow.column()
-                        matwrapcolrowcolrow = matwrapcolrowcol.row()
-                        matwrapcolrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapcolrowcolrow.operator("material.libraryviewmaterial", text="", icon='BLANK1', emboss=False).material = i
-                        matwrapcolrowcol = matwrapcolrow.column()
-                        matwrapcolrowcolrow = matwrapcolrowcol.row()
-                        matwrapcolrowcolrowsplit = matwrapcolrowcolrow.split(percentage=0.8)
-                        matwrapcolrowcolrowsplitrow = matwrapcolrowcolrowsplit.row()
-                        
-                        #Ratings
-                        e = 0
-                        while e < material_ratings[i]:
-                            matwrapcolrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_ON', emboss=False).material = i
-                            e = e + 1
-                        
-                        if material_ratings[i] is not 5:    
-                            e = 0
-                            while e < (5 - material_ratings[i]):
-                                matwrapcolrowcolrowsplitrow.operator("material.libraryviewmaterial", text="", icon='SOLO_OFF', emboss=False).material = i
-                                e = e + 1
-                    i = i + 1
-                    
-                if current_material_number is not -1:
-                    #Display selected material's info
-                    row = layout.row()
-                    infobox = row.box()
-                    inforow = infobox.row()
-                   
-                    inforow.label(text=material_names[current_material_number])
-                    if bpy.context.scene.mat_lib_auto_preview == False:
-                        mat_button = inforow.operator("material.librarypreview", text="", icon='IMAGE_COL')
-                        mat_button.name = material_names[current_material_number]
-                        mat_button.filename = material_filenames[current_material_number]
-                    inforow.operator("material.viewmaterial", text="", icon='PANEL_CLOSE').material = -1
-                    
-                    inforow = infobox.row()
-                    
-                    #Display a preview
-                    if bpy.data.textures.find("mat_lib_preview_texture") == -1:
-                        bpy.data.textures.new("mat_lib_preview_texture", "IMAGE")
-                        preview_texture = bpy.data.textures["mat_lib_preview_texture"]
-                        inforowcol = inforow.column(align=True)
-                        inforowcol.alignment = 'EXPAND'
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.operator("material.librarypreview", text="Preview Material", icon='IMAGE_COL')
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.template_preview(preview_texture)
-                    else:
-                        preview_texture = bpy.data.textures['mat_lib_preview_texture']
-                        inforowcol = inforow.column(align=True)
-                        inforowcol.alignment = 'EXPAND'
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.operator("material.librarypreview", text="Preview Material", icon='IMAGE_COL')
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.template_preview(preview_texture)
-                    
-                    inforowcol = inforow.column()
-                    inforowcolrow = inforowcol.row()
-                    if bpy.data.materials.find(material_names[current_material_number]) is not -1:
-                        inforowcolrow.label(text="Material exists", icon='ERROR')
-                    if material_contributors[current_material_number] == "Unknown" or material_contributors[current_material_number] == "Anonymous":
-                        inforowcolrow = inforowcol.row()
-                    else:
-                        inforowcolrow = inforowcol.row()
-                        inforowcolrow.label(text="By %s." % material_contributors[current_material_number])
-                        inforowcolrow = inforowcol.row()
-                    
-                    if bpy.data.materials.find(material_names[current_material_number]) is not -1:
-                        inforowcolrow.label(text="\"Add\" will overwrite.")
-                    inforowcolcol = inforowcol.column(align=True)
-                    inforowcolcol.alignment = 'EXPAND'
-                    
-                    
-                    #Display "Add" or "Overwrite" button
-                    mat_button = inforowcolcol.operator("material.libraryadd", text="Add to materials", icon='ZOOMIN')
-                    mat_button.name = material_names[current_material_number]
-                    mat_button.filename = material_filenames[current_material_number]
-                    
-                    #Display "Paste" button
-                    mat_button = inforowcolcol.operator("material.libraryapply", text="Apply to active", icon='PASTEDOWN')
-                    mat_button.name = bpy.context.object.active_material.name
-                    mat_button.filename = material_filenames[current_material_number]
-                    
-                    #Display "Save" button
-                    mat_button = inforowcolcol.operator("material.librarysave", text="Save to disk", icon='DISK_DRIVE')
-                    mat_button.name = bpy.context.object.active_material.name
-                    mat_button.filename = material_filenames[current_material_number]
-                    save_filename = material_filenames[current_material_number]
-        else:
-            #Dude, you gotta switch to Cycles to use this.
-            row = layout.row()
-            row.label(text="Sorry, Cycles only at the moment.",icon='ERROR')
-
-class libraryCategory:
-    def __init__(self, title, folder):
-        self.title = title
-        self.folder = folder
-        self.materials = []
-
-class libraryMaterial:
-    def __init__(self, name, href, contrib, stars, fireflies, speed, complexity, scripts, images):
-        self.name = name
-        self.href = href
-        self.contrib = contrib
-        self.stars = stars
-        self.fireflies = fireflies
-        self.speed = speed
-        self.complexity = complexity
-        self.scripts = scripts
-        self.images = images
-
-def handleCategories(categories):
-    for index, category in enumerate(categories):
-        handleCategory(category, index)
-
-def handleCategory(category, index):
-    if 'addon' in category.attributes:
-        needed_version = float(category.attributes['addon'].value)
-        this_version = bl_info["version"][0] + (bl_info["version"][1] / 10.0)
-        
-        #Check this addon's compatibility with this category
-        if needed_version > this_version:
-            print('\n\n-Category "' + category.attributes['title'].value + '" not used; its materials are for a newer version of this add-on.')
-            return
-    
-    if 'bl' in category.attributes:
-        bl_version = bpy.app.version[0] + (bpy.app.version[1] / 100)
-        
-        #Check Blender's compatibility with this category
-        if category.attributes['bl'].value[-1] == "-":
-            #This option is for if Blender's compatiblity
-            #with a category started only with a specific
-            #version, but has not yet ended; this will
-            #look like the following: bl="2.64-"
-            bl_lower = float(category.attributes['bl'].value[:-1])
-            if bl_lower > bl_version:
-                print('\n\n-Category "' + category.attributes['title'].value + '" was not used; its materials are not compatible with this version of Blender.')
-                return
-            
-        elif category.attributes['bl'].value[0] == "-":
-            #This option is for if Blender's compatiblity
-            #with a category ended at some point, and will
-            #look like the following: bl="-2.73"
-            bl_upper = float(category.attributes['bl'].value[1:])
-            if bl_upper < bl_version:
-                print('\n\n-Category "' + category.attributes['title'].value + '" was not used; its materials are not compatible with this version of Blender.')
-                return
-            
-        else:
-            #This option is for if Blender's compatiblity
-            #with a category started with a certain version,
-            #then ended with another; it will look
-            #like the following: bl="2.64-2.73"
-            bl_lower = float(category.attributes['bl'].value.split('-')[0])
-            bl_upper = float(category.attributes['bl'].value.split('-')[1])
-            if bl_upper < bl_version:
-                print('\n\n-Category "' + category.attributes['title'].value + '" was not used; its materials are not compatible with this version of Blender.')
-                return
-            elif bl_lower > bl_version:
-                print('\n\n-Category "' + category.attributes['title'].value + '" was not used; its materials are not compatible with this version of Blender.')
-                return
-    
-    if library is not "bundled":
-        if not os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value):
-            print("Folder \"/" + category.attributes['folder'].value + "/\" does not exist; creating now.")
-            if library == "composite":
-                os.mkdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category.attributes['folder'].value)
-            else:
-                os.mkdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value)
-        
-        if 'remove' in category.attributes:
-            if library == "composite":
-                if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category.attributes['folder'].value):
-                    for the_file in os.listdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category.attributes['folder'].value):
-                        file_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category.attributes['folder'].value + os.sep + the_file
-                        if os.path.isfile(file_path):
-                            os.remove(file_path)
-                        elif os.path.isdir(file_path):
-                            for sub_file in os.listdir(file_path):
-                                if os.path.isfile(file_path + sub_file):
-                                    os.remove(file_path + sub_file)
-                            os.rmdir(file_path)
-                    os.rmdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category.attributes['folder'].value)
-            else:
-                if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value):
-                    for the_file in os.listdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value):
-                        file_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value + os.sep + the_file
-                        if os.path.isfile(file_path):
-                            os.remove(file_path)
-                        elif os.path.isdir(file_path):
-                            for sub_file in os.listdir(file_path):
-                                if os.path.isfile(file_path + sub_file):
-                                    os.remove(file_path + sub_file)
-                            os.rmdir(file_path)
-                    os.rmdir(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category.attributes['folder'].value)
-                return
-    
-    print ('\n\n-Category "' + category.attributes['title'].value + '"; located in folder "/' + category.attributes['folder'].value + '/".')
-    library_data.append(libraryCategory(category.attributes['title'].value, category.attributes['folder'].value))
-    handleMaterials(category.getElementsByTagName("material"), index)
-
-def handleMaterials(materials, index):
-    for material in materials:
-        handleMaterial(material, index)
-
-def handleMaterial(material, index):
-    if 'addon' in material.attributes:
-        needed_version = float(material.attributes['addon'].value)
-        this_version = bl_info["version"][0] + (bl_info["version"][1] / 10.0)
-        
-        #Check this addon's compatibility with this material
-        if needed_version > this_version:
-            print('\n  -Material "' + material.attributes['name'].value + '" was not used, and is for a newer version of this add-on.')
-            return
-    
-    if 'bl' in material.attributes:
-        bl_version = bpy.app.version[0] + (bpy.app.version[1] / 100)
-        
-        #Check Blender's compatibility with this material
-        if material.attributes['bl'].value[-1] == "-":
-            #This option is for if Blender's compatiblity
-            #with a material started only with a specific
-            #version, but has not yet ended; this will
-            #look like the following: bl="2.64-"
-            bl_lower = float(material.attributes['bl'].value[:-1])
-            if bl_lower > bl_version:
-                print('\n  -Material "' + material.attributes['name'].value + '" was not used, and is not compatible with this version of Blender.')
-                return
-            
-        elif material.attributes['bl'].value[0] == "-":
-            #This option is for if Blender's compatiblity
-            #with a material ended at some point, and will
-            #look like the following: bl="-2.73"
-            bl_upper = float(material.attributes['bl'].value[1:])
-            if bl_upper < bl_version:
-                print('\n  -Material "' + material.attributes['name'].value + '" was not used, and is not compatible with this version of Blender.')
-                return
-            
-        else:
-            #This option is for if Blender's compatiblity
-            #with a material started with a certain version,
-            #then ended with another; it will
-            #look like the following: bl="2.64-2.73"
-            bl_lower = float(material.attributes['bl'].value.split('-')[0])
-            bl_upper = float(material.attributes['bl'].value.split('-')[1])
-            if bl_upper < bl_version:
-                print('\n  -Material "' + material.attributes['name'].value + '" was not used, and is not compatible with this version of Blender.')
-                return
-            elif bl_lower > bl_version:
-                print('\n  -Material "' + material.attributes['name'].value + '" was not used, and is not compatible with this version of Blender.')
-                return
-    
-    if 'by' in material.attributes:
-        contributor = material.attributes['by'].value
-    else:
-        contributor = "Unknown"
-    
-    if 'stars' in material.attributes:
-        stars = material.attributes['stars'].value
-    else:
-        stars = '0'
-    
-    if 'fireflies' in material.attributes:
-        fireflies = material.attributes['fireflies'].value
-    else:
-        fireflies = 'low'
-    
-    if 'speed' in material.attributes:
-        speed = material.attributes['speed'].value
-    else:
-        speed = 'good'
-    
-    if 'complexity' in material.attributes:
-        complexity = material.attributes['complexity'].value
-    else:
-        complexity = 'simple'
-    
-    if 'scripts' in material.attributes:
-        scripts = material.attributes['scripts'].value
-    else:
-        scripts = '0'
-    
-    if 'images' in material.attributes:
-        images = material.attributes['images'].value
-    else:
-        images = '0'
-    
-    library_data[index].materials.append(
-        libraryMaterial(
-        material.attributes['name'].value,
-        material.attributes['href'].value,
-        contributor,
-        int(stars),
-        fireflies,
-        speed,
-        complexity,
-        scripts,
-        images))
-    print ('\n  -Material "' + 
-        material.attributes['name'].value + 
-        '"\n    -Filename: "' + 
-        material.attributes['href'].value + 
-        '.bcm"\n    -Rating: ' + stars + 
-        ' stars\n    -Contributed by "' + 
-        contributor + '"')
-
-class LibraryConnect(bpy.types.Operator):
-    '''Connect to the material library'''
-    bl_idname = "material.libraryconnect"
-    bl_label = "Connect to the material library"
-    mode = bpy.props.StringProperty()
-
-    def execute(self, context):
-        global library_data
-        global library
-        global update_data
-        
-        global mat_lib_contents
-        global mat_lib_categories
-        global mat_lib_category_names
-        global mat_lib_category_types
-        global mat_lib_category_filenames
-        
-        global category_enum_items
-        global subcategory_enum_items
-        
-        global show_success_message
-        global show_success_message_timeout
-        
-        global prev_category
-        global mat_lib_host
-        global mat_lib_location
-        global working_mode
-        
-        if self.mode == "online":
-            mat_lib_host = context.scene.mat_lib_library[:context.scene.mat_lib_library.index("/")]
-            mat_lib_location = context.scene.mat_lib_library[(context.scene.mat_lib_library.index(mat_lib_host) + len(mat_lib_host)):]
-            print(mat_lib_host)
-            print(mat_lib_location)
-        elif "bundled" not in context.scene.mat_lib_library:
-            mat_lib_host = context.scene.mat_lib_library[:context.scene.mat_lib_library.index("/")]
-        
-        #Pre-create preview image
-        if not os.path.exists(mat_lib_folder + os.sep + "mat_lib_preview_image.jpg"):
-            f = open(mat_lib_folder + os.sep + "mat_lib_preview_image.jpg", 'w+b')
-            f.close()
-        
-        if self.mode == "online":
-            #Connect and download
-            connection = http.client.HTTPConnection(mat_lib_host)
-            connection.request("GET", mat_lib_location + "cycles/index.xml")
-            
-            if "release" in context.scene.mat_lib_library:
-                response = connection.getresponse().read()
-                
-                #Cache the index.xml file for offline use
-                library_file = open(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "index.xml"), mode="w+b")
-                library_file.write(response)
-                library_file.close()
-                
-                #Create /textures/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "textures")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "textures"))
-                
-                #Create /scripts/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "scripts")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "scripts"))
-                library = "release"
-            elif "testing" in context.scene.mat_lib_library:
-                response = connection.getresponse().read()
-                
-                #Create /textures/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "testing", "cycles", "textures")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "testing", "cycles", "textures"))
-                
-                #Create /scripts/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "testing", "cycles", "scripts")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "testing", "cycles", "scripts"))
-                library = "testing"
-            else:
-                response = connection.getresponse().read()
-                
-                #Cache the index.xml file for offline use
-                library_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + "index.xml", mode="w+b")
-                library_file.write(response)
-                library_file.close()
-                
-                #Create /textures/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures"))
-                
-                #Create /scripts/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts"))
-                library = "composite"
-                
-            #Convert the response to a string
-            mat_lib_contents = str(response)
-            
-            #Check for connection errors
-            if "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" not in mat_lib_contents:
-                self.report({'ERROR'}, "Error connecting; see console for details.")
-                print("Received following response from server:\n" + mat_lib_contents)
-                return {'CANCELLED'}
-            
-            #Format nicely
-            mat_lib_contents = mat_lib_contents.replace("b'<?xml version=\"1.0\" encoding=\"UTF-8\"?>",'')
-            mat_lib_contents = mat_lib_contents.replace("\\r\\n",'')
-            mat_lib_contents = mat_lib_contents.replace("\\t",'')[:-1]
-            mat_lib_contents = mat_lib_contents.replace("\\",'')
-            
-        else:
-            if "release" in context.scene.mat_lib_library:
-                #Check for cached index.xml file
-                if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "release" + os.sep + "cycles" + os.sep + "index.xml"):
-                    library_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "release" + os.sep + "cycles" + os.sep + "index.xml", mode="r", encoding="UTF-8")
-                    mat_lib_contents = library_file.read()
-                    library_file.close()
-                else:
-                    self.report({'ERROR'}, "No cached library exists!")
-                    return {'CANCELLED'}
-                
-                #Create /textures/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "textures")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "textures"))
-                
-                #Create /scripts/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "scripts")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "release", "cycles", "scripts"))
-                library = "release"
-            elif context.scene.mat_lib_library == "bundled":
-                #Check for index.xml file
-                if os.path.exists(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + "index.xml"):
-                    library_file = open(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + "index.xml", mode="r", encoding="UTF-8")
-                    mat_lib_contents = library_file.read()
-                    library_file.close()
-                else:
-                    self.report({'ERROR'}, "Bundled library does not exist!")
-                    return {'CANCELLED'}
-                library = "bundled"
-            else:
-                #Check for cached index.xml file
-                if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + "index.xml"):
-                    library_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + "index.xml", mode="r", encoding="UTF-8")
-                    mat_lib_contents = library_file.read()
-                    library_file.close()
-                else:
-                    self.report({'ERROR'}, "No cached library exists!")
-                    return {'CANCELLED'}
-                
-                #Create /textures/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures"))
-                
-                #Create /scripts/ folder
-                if not os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts")):
-                    os.mkdir(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts"))
-                library = "composite"
-            
-            if '<?xml version="1.0" encoding="UTF-8"?>' not in mat_lib_contents:
-                self.report({'ERROR'}, "Cached XML file is invalid!")
-                return {'CANCELLED'}
-            
-            #Format nicely
-            mat_lib_contents = mat_lib_contents.replace('<?xml version="1.0" encoding="UTF-8"?>', '')
-            mat_lib_contents = mat_lib_contents.replace("\r\n",'')
-            mat_lib_contents = mat_lib_contents.replace("\n",'')
-            mat_lib_contents = mat_lib_contents.replace("\t",'')
-            mat_lib_contents = mat_lib_contents.replace("\\",'')
-        
-        #Clear important lists
-        library_data = []
-        mat_lib_category_names = []
-        mat_lib_category_types = []
-        mat_lib_category_filenames = []
-            
-        dom = xml.dom.minidom.parseString(mat_lib_contents)
-        
-        if self.mode == "online":
-            if library == "composite":
-                rev_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + "revision_data.ini", mode="r", encoding="UTF-8")
-                rev_data = rev_file.read()
-                rev_file.close()
-            else:
-                rev_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + "revision_data.ini", mode="r", encoding="UTF-8")
-                rev_data = rev_file.read()
-                rev_file.close()
-            
-            if "revision=" in rev_data:
-                revision = int(rev_data[9:])
-            else:
-                revision = -1
-                print("The revision_data.ini file is invalid; clearing cache and re-creating.")
-            
-            if revision is not int(dom.getElementsByTagName("library")[0].attributes['rev'].value):
-                bpy.ops.material.libraryclearcache()
-            
-            if library == "composite":
-                rev_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + "revision_data.ini", mode="w", encoding="UTF-8")
-            else:
-                rev_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + "revision_data.ini", mode="w", encoding="UTF-8")
-            rev_file.write("revision=" + dom.getElementsByTagName("library")[0].attributes['rev'].value)
-            rev_file.close()
-            
-            if 'addon' in dom.getElementsByTagName("library")[0].attributes:
-                current_version = float(dom.getElementsByTagName("library")[0].attributes['addon'].value)
-                this_version = bl_info["version"][0] + (bl_info["version"][1] / 10.0)
-                if current_version > this_version:
-                    update_data = ["Add-on is outdated.", dom.getElementsByTagName("library")[0].attributes['download'].value]
-        
-        print ("\n\n---Material Library---")
-        categories = dom.getElementsByTagName("category")
-        handleCategories(categories)
-        
-        for cat in library_data:
-            #Find category names
-            mat_lib_category_names.append(cat.title)
-            #Find category types
-            #NOTE: Will have to redo this.
-            #mat_lib_category_types = safeEval(mat_lib_contents[(mat_lib_contents.index('[types]') + 7):mat_lib_contents.index('[/types]')])
-            #Get category filenames
-            mat_lib_category_filenames.append(cat.folder)
-            
-        #Find amount of categories
-        mat_lib_categories = len(mat_lib_category_names)
-        
-        #Set enum items for category dropdown
-        category_enum_items = [("None0", "None", "No category selected")]
-        
-        i = 0
-        while i < mat_lib_categories:
-            print ("Adding category #%d" % (i + 1))
-            category_enum_items.append(((mat_lib_category_names[i] + str(i + 1)), mat_lib_category_names[i], (mat_lib_category_names[i] + " category")))
-            i = i + 1
-        bpy.types.Scene.mat_lib_material_category = bpy.props.EnumProperty(name = "", items = category_enum_items, description = "Choose a category")
-        bpy.context.scene.mat_lib_material_category = "None0";
-        
-        #No errors - set working mode
-        working_mode = self.mode
-        
-        self.report({'INFO'}, "Retrieved library!")
-        
-        return {'FINISHED'}
-
-class LibraryInfo(bpy.types.Operator):
-    '''Display add-on info'''
-    bl_idname = "material.libraryinfo"
-    bl_label = "Display add-on info"
-
-    def execute(self, context):
-        global category_type
-        
-        category_type = "info"
-        
-        return {'FINISHED'}
-
-class LibraryTools(bpy.types.Operator):
-    '''Display material tools'''
-    bl_idname = "material.librarytools"
-    bl_label = "Display material tools"
-
-    def execute(self, context):
-        global category_type
-        
-        category_type = "tools"
-        
-        return {'FINISHED'}
-
-class LibrarySettings(bpy.types.Operator):
-    '''Display add-on settings'''
-    bl_idname = "material.librarysettings"
-    bl_label = "Display add-on settings"
-
-    def execute(self, context):
-        global category_type
-        global mat_lib_cached_files
-        
-        category_type = "settings"
-        if library == "":
-            return {'FINISHED'}
-        elif library == "bundled":
-            return {'FINISHED'}
-        elif library == "composite":
-            cached_data_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep
-        else:
-            cached_data_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep
-        mat_lib_cached_files = 0
-        for root, dirs, files in os.walk(cached_data_path):
-            for name in files:
-                if ".jpg" in name.lower():
-                    mat_lib_cached_files += 1
-                elif ".png" in name.lower():
-                    mat_lib_cached_files += 1
-                elif ".osl" in name.lower():
-                    mat_lib_cached_files += 1
-                elif ".osl" in name.lower():
-                    mat_lib_cached_files += 1
-                elif ".bcm" in name:
-                    mat_lib_cached_files += 1
-        
-        return {'FINISHED'}
-
-class LibraryHome(bpy.types.Operator):
-    '''Go back'''
-    bl_idname = "material.libraryhome"
-    bl_label = "Go back"
-
-    def execute(self, context):
-        global category_type
-        
-        category_type = "none"
-        
-        return {'FINISHED'}
-
-def libraryCategoryUpdate():
-    print("Updating Material Category.")
-    #Check if the category is None
-    if bpy.context.scene.mat_lib_material_category != "None0":
-        #Selected category is not None; select category.        
-        
-        global category_contents
-        global category_name
-        global category_filename
-        global category_materials
-                
-        global material_names
-        global material_filenames
-        global material_contributors
-        global material_ratings
-        global material_fireflies
-        global material_speeds
-        global material_complexities
-        global material_scripts
-        global material_images
-        
-        global current_material_number
-                
-        global category_type
-    
-        i = 0
-        while i < len(category_enum_items):
-            if category_enum_items[i][0] == bpy.context.scene.mat_lib_material_category:
-                #Set category filename for refresh button
-                category_filename = mat_lib_category_filenames[i - 1]
-                #Set category name for header
-                category_name = mat_lib_category_names[i - 1]
-                category_index = i - 1
-            i = i + 1
-        
-        if True:
-            current_material_number = -1
-            
-            material_names = []
-            material_filenames = []
-            material_contributors = []
-            material_ratings = []
-            material_fireflies = []
-            material_speeds = []
-            material_complexities = []
-            material_scripts = []
-            material_images = []
-            
-            for mat in library_data[category_index].materials:
-                #Get material names
-                material_names.append(mat.name)
-                #Get material filenames
-                material_filenames.append(mat.href)
-                #Get material contributors
-                material_contributors.append(mat.contrib)
-                #Get material ratings
-                material_ratings.append(mat.stars)
-                #Get material firefly levels
-                material_fireflies.append(mat.fireflies)
-                #Get material render speeds
-                material_speeds.append(mat.speed)
-                #Get material complexities
-                material_complexities.append(mat.complexity)
-                #Get material image textures
-                material_images.append(mat.images)
-                #Get material OSL scripts
-                material_scripts.append(mat.scripts)
-            
-            #Set amount of materials in selected category
-            category_materials = len(material_names)
-        
-            category_type = "category"
-        
-        elif "parent" == "parent":
-            current_material_number = -1
-            #REWRITE, REWRITE...
-            #Find category names
-            #parent_category_names = safeEval(parent_category_contents[(parent_category_contents.index('[names]') + 7):parent_category_contents.index('[/names]')])
-            #
-            #Get category filenames
-            #parent_category_filenames = safeEval(parent_category_contents[(parent_category_contents.index('[filenames]') + 11):parent_category_contents.index('[/filenames]')])
-            #
-            #Set parent category name for header
-            #parent_category_name = self.name
-            #
-            #Set parent category filename
-            #parent_category_filename = self.filename
-            #
-            #Set amount of categories in parent category
-            #parent_category_categories = len(parent_category_names)
-            
-            category_type = "parent"
-        
-        elif "subcategory" == "subcategory":
-            current_material_number = -1
-            #ANOTHER REWRITE.
-            #Get material names
-            #material_names = safeEval(category_contents[(category_contents.index("[names]") + 7):category_contents.index("[/names]")])
-            #
-            #Get material filenames
-            #material_filenames = safeEval(category_contents[(category_contents.index("[filenames]") + 11):category_contents.index("[/filenames]")])
-            #
-            #Get material contributors
-            #material_contributors = safeEval(category_contents[(category_contents.index("[contributors]") + 14):category_contents.index("[/contributors]")])
-            #
-            #Get material ratings
-            #material_ratings = safeEval(category_contents[(category_contents.index("[ratings]") + 9):category_contents.index("[/ratings]")])
-            #
-            #Set category name for header
-            #category_name = self.name
-            #
-            #Set category filename for refresh button
-            #category_filename = self.filename
-            
-            #Set amount of materials in selected category
-            #category_materials = len(material_names)
-            
-            category_type = "subcategory"
-        
-        else:
-            self.report({'ERROR'}, "Invalid category! See console for details.")
-            print ("Invalid category!")
-            print (category_contents)
-    else:
-        #Selected category is None
-        parent_category_contents = "None"
-        category_contents = "None"
-        current_material_number = -1
-        category_type = "none"
-
-class ViewMaterial(bpy.types.Operator):
-    '''View material details'''
-    bl_idname = "material.libraryviewmaterial"
-    bl_label = "view material details"
-    material = bpy.props.IntProperty()
-    
-    def execute(self, context):
-        global current_material_number
-        global current_material_cached
-        global current_material_previewed
-        
-        if current_material_number == self.material:
-            if current_material_previewed:
-                current_material_previewed = True
-            else:
-                current_material_previewed = False
-        else:
-            current_material_previewed = False
-        
-        current_material_number = self.material
-        current_material_cached = False
-        
-        if self.material == -1:
-            return {'FINISHED'}
-        
-        if library == "composite":
-            if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + material_filenames[self.material] + ".bcm"):
-                current_material_cached = True
-        elif library != "bundled":
-            if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + material_filenames[self.material] + ".bcm"):
-                current_material_cached = True
-        
-        if context.scene.mat_lib_auto_preview == True:
-            print("Auto-download previews on.")
-            bpy.ops.material.librarypreview(name=material_names[self.material], filename=material_filenames[self.material])
-            self.report({preview_message[0]}, preview_message[1])
-        elif working_mode == "offline":
-            bpy.ops.material.librarypreview(name=material_names[self.material], filename=material_filenames[self.material])
-            self.report({preview_message[0]}, preview_message[1])
-        elif library == "composite":
-            if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep  + category_filename + os.sep + material_filenames[self.material] + ".jpg"):
-                bpy.ops.material.librarypreview(name=material_names[self.material], filename=material_filenames[self.material])
-                self.report({preview_message[0]}, preview_message[1])
-        else:
-            if os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep  + category_filename + os.sep + material_filenames[self.material] + ".jpg"):
-                bpy.ops.material.librarypreview(name=material_names[self.material], filename=material_filenames[self.material])
-                self.report({preview_message[0]}, preview_message[1])
-        return {'FINISHED'}
-
-class MaterialDetailView(bpy.types.Operator):
-    '''Change detail view'''
-    bl_idname = "material.librarydetailview"
-    bl_label = "change detail view"
-    mode = bpy.props.StringProperty()
-
-    def execute(self, context):
-        global material_detail_view
-        
-        if self.mode == "NEXT":
-            if material_detail_view == "RENDER":
-                material_detail_view = "DATA"
-        else:
-            if material_detail_view == "DATA":
-                material_detail_view = "RENDER"
-        return {'FINISHED'}
-            
-
-class LibraryClearCache(bpy.types.Operator):
-    '''Delete active library's cached previews and/or materials'''
-    bl_idname = "material.libraryclearcache"
-    bl_label = "delete cached previews and materials"
-    
-    def execute(self, context):
-        global mat_lib_cached_files
-        
-        
-        if library == "bundled":
-            self.report({'ERROR'}, "The bundled library is local only and contains no cached online data.")
-            return {'CANCELLED'}
-        if library == "composite":
-            for root, dirs, files in os.walk(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep):
-                for name in files:
-                    if name[-4:].lower() == ".jpg":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".png":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".osl":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".oso":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".bcm":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-        else:
-            for root, dirs, files in os.walk(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep):
-                for name in files:
-                    if name[-4:].lower() == ".jpg":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".png":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".osl":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".oso":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-                    elif name[-4:].lower() == ".bcm":
-                        print("Deleting \"" + os.path.join(root, name) + "\".")
-                        os.remove(os.path.join(root, name))
-        
-        if library == "":
-            return {'FINISHED'}
-        elif library == "bundled":
-            return {'FINISHED'}
-        elif library == "composite":
-            cached_data_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep
-        else:
-            cached_data_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep
-        mat_lib_cached_files = 0
-        for root, dirs, files in os.walk(cached_data_path):
-            for name in files:
-                if ".jpg" in name:
-                    mat_lib_cached_files += 1
-                elif ".bcm" in name:
-                    mat_lib_cached_files += 1
-        
-        self.report({'INFO'}, "Preview cache cleared.")
-        return {'FINISHED'}
-    
-class LibraryPreview(bpy.types.Operator):
-    '''Download preview'''
-    bl_idname = "material.librarypreview"
-    bl_label = "preview material"
-    name = bpy.props.StringProperty()
-    filename = bpy.props.StringProperty()
-        
-    def execute(self, context):
-        global parent_category_filename
-        global category_filename
-        global preview_message
-        global library
-        global current_material_previewed
-        
-        #Check for a cached preview
-        if library == "bundled":
-            image_path = mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep  + category_filename + os.sep + self.filename + ".jpg"
-        elif library == "composite":
-            image_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep  + category_filename + os.sep + self.filename + ".jpg"
-        else:
-            image_path = mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep  + category_filename + os.sep + self.filename + ".jpg"
-        
-        if os.path.exists(image_path):
-            #Cached preview exists
-            cached_image = open(image_path, 'r+b')
-            response = cached_image.read()
-            cached_image.close()
-            f = open(mat_lib_folder + os.sep + "mat_lib_preview_image.jpg", 'w+b')
-            f.write(response)
-            f.close()
-            
-        elif working_mode == "online":
-            #This preview doesn't exist yet; let's download it.
-            connection = http.client.HTTPConnection(mat_lib_host)
-            connection.request("GET", mat_lib_location + "cycles/" + category_filename + "/" + self.filename + ".jpg")
-            response = connection.getresponse().read()
-            f = open(mat_lib_folder + os.sep + "mat_lib_preview_image.jpg", 'w+b')
-            f.write(response)
-            f.close()
-            
-            #Cache this preview
-            f = open(image_path, 'w+b')
-            f.write(response)
-            f.close()
-            
-        else:
-            self.report({'WARNING'}, "Preview does not exist; cannot download in offline mode.")
-            preview_message = ['WARNING', "Preview does not exist; cannot download in offline mode."]
-            return {'CANCELLED'}
-        
-        #Check if has texture
-        if bpy.data.images.find("mat_lib_preview_image.jpg") == -1:
-            bpy.ops.image.open(filepath=mat_lib_folder + os.sep + "mat_lib_preview_image.jpg")
-        
-        if "mat_lib_preview_texture" not in bpy.data.textures:
-             bpy.data.textures.new("mat_lib_preview_texture", "IMAGE")
-        
-        if bpy.data.textures["mat_lib_preview_texture"].image != bpy.data.images["mat_lib_preview_image.jpg"]:
-            bpy.data.textures["mat_lib_preview_texture"].image = bpy.data.images["mat_lib_preview_image.jpg"]
-        
-        #Do everything possible to get Blender to reload the preview.
-        bpy.data.images["mat_lib_preview_image.jpg"].reload()
-        bpy.ops.wm.redraw_timer()
-        bpy.data.scenes[bpy.context.scene.name].update()
-        bpy.data.scenes[bpy.context.scene.name].frame_set(bpy.data.scenes[bpy.context.scene.name].frame_current)
-        
-        self.report({'INFO'}, "Preview applied.")
-        preview_message = ['INFO', "Preview applied."]
-        current_material_previewed = True
-        
-        return {'FINISHED'}
-
-class AddLibraryMaterial(bpy.types.Operator):
-    '''Add material to scene'''
-    bl_idname = "material.libraryadd"
-    bl_label = "add material to scene"
-    mat_name = bpy.props.StringProperty()
-    filename = bpy.props.StringProperty()
-    open_location = bpy.props.StringProperty()
-    text_block = bpy.props.StringProperty()
-    
-    def execute(self, context):
-        global material_file_contents
-        global library
-        global node_message
-        global current_material_cached
-        
-        if not bpy.context.active_object:
-            self.report({'ERROR'}, "No object selected!")
-        if self.open_location == "" and self.text_block == "":
-            if library == "composite" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = ""
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.filename = ""
-                    self.mat_name = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif library != "bundled" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = ""
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.filename = ""
-                    self.mat_name = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif library == "bundled" and os.path.exists(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.filename = ""
-                    self.mat_name = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif working_mode == "online":
-                connection = http.client.HTTPConnection(mat_lib_host)
-                connection.request("GET", mat_lib_location + "cycles/" + category_filename + "/" + self.filename + ".bcm")
-                response = connection.getresponse().read()
-                
-                #Cache material
-                if library == "composite":
-                    bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-                    bcm_file.write(response)
-                    bcm_file.close()
-                else:
-                    bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-                    bcm_file.write(response)
-                    bcm_file.close()
-                
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in str(response)[2:40]:
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    self.filename = ""
-                    return {'CANCELLED'}
-                material_file_contents = ""
-                material_file_contents = str(response)[str(response).index("<material"):str(response).index("/material>") + 10]
-            else:
-                self.report({'ERROR'}, "Material is not cached; cannot download in offline mode!")
-                return {'CANCELLED'}
-            print (material_file_contents)
-            mat_name = self.mat_name
-        elif self.open_location is not "":
-            if ".bcm" in self.open_location:
-                bcm_file = open(self.open_location, mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.open_location = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-                mat_name = ""
-                for word in self.open_location.split(os.sep)[-1][:-4].split("_"):
-                    if mat_name is not "":
-                        mat_name += " "
-                    mat_name += word.capitalize()
-            else:
-                self.report({'ERROR'}, "Not a .bcm file.")
-                self.open_location = ""
-                return {'CANCELLED'}
-        else:
-            if self.text_block in bpy.data.texts:
-                #Read from a text datablock
-                material_file_contents = bpy.data.texts[self.text_block].as_string()
-            else:
-                self.report({'ERROR'}, "Requested text block does not exist.")
-                self.text_block = ""
-                return {'CANCELLED'}
-                
-            #Check file for validitity
-            if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents[0:38]:
-                self.report({'ERROR'}, "Material data is either outdated or invalid.")
-                self.text_block = ""
-                return {'CANCELLED'}
-            mat_name = ""
-            
-            separator = ""
-            if context.scene.mat_lib_bcm_name is "":
-                separator = ""
-                if "_" in self.text_block:
-                    separator = "_"
-                elif "-" in self.text_block:
-                    separator = "-"
-                elif " " in self.text_block:
-                    separator = " "
-                    
-                if separator is not "":
-                    for word in self.text_block.split(separator):
-                        if mat_name is not "":
-                            mat_name += " "
-                        mat_name += word.capitalize()
-                else:
-                    mat_name = self.text_block
-            else:
-                mat_name = context.scene.mat_lib_bcm_name
-        
-        #Format nicely
-        material_file_contents = material_file_contents.replace('<?xml version="1.0" encoding="UTF-8"?>', '')
-        material_file_contents = material_file_contents.replace("\r\n",'')
-        material_file_contents = material_file_contents.replace("\n",'')
-        material_file_contents = material_file_contents.replace("\t",'')
-        material_file_contents = material_file_contents.replace("\\",'')
-        
-        #Create new material
-        new_mat = bpy.data.materials.new(mat_name)
-        new_mat.use_nodes = True
-        new_mat.node_tree.nodes.clear()
-        
-        #Parse file
-        dom = xml.dom.minidom.parseString(material_file_contents)
-        
-        #Create internal OSL scripts
-        scripts = dom.getElementsByTagName("script")
-        for s in scripts:
-            osl_datablock = bpy.data.texts.new(name=s.attributes['name'].value)
-            osl_text = s.toxml()[s.toxml().index(">"):s.toxml().rindex("<")]
-            osl_text = osl_text[1:].replace("<br/>","\n")
-            osl_datablock.write(osl_text)
-            osl_scripts.append(osl_datablock)
-        
-        #Add nodes
-        nodes = dom.getElementsByTagName("node")
-        addNodes(nodes, new_mat)
-        if node_message:
-            self.report({node_message[0]}, node_message[1])
-            node_message = []
-            self.mat_name = ""
-            self.filename = ""
-            self.open_location = ""
-            self.text_block = ""
-            return {'CANCELLED'}
-            
-        #Create links
-        links = dom.getElementsByTagName("link")
-        createLinks(links, new_mat)
-        
-        m = dom.getElementsByTagName("material")[0]
-        
-        #Set viewport color
-        new_mat.diffuse_color = color(m.attributes["view_color"].value)
-            
-        #Set sample-as-lamp-ness
-        if m.attributes["sample_lamp"].value == "True":
-            sample_lamp = True
-        else:
-            sample_lamp = False
-        new_mat.cycles.sample_as_light = sample_lamp
-        
-        self.mat_name = ""
-        self.filename = ""
-        self.open_location = ""
-        self.text_block = ""
-        self.report({'INFO'}, "Material added.")
-        current_material_cached = True
-        
-        return {'FINISHED'}
-
-class ApplyLibraryMaterial(bpy.types.Operator):
-    '''Apply to active material'''
-    bl_idname = "material.libraryapply"
-    bl_label = "Apply to active material"
-    mat_name = bpy.props.StringProperty()
-    filename = bpy.props.StringProperty()
-    open_location = bpy.props.StringProperty()
-    text_block = bpy.props.StringProperty()
-    
-    def execute(self, context):
-        global material_file_contents
-        global library
-        global node_message
-        global current_material_cached
-        global osl_scripts
-        
-        mat_name = ""
-        material_file_contents = ""
-        if not bpy.context.active_object:
-            self.report({'ERROR'}, "No object selected!")
-            return {'CANCELLED'}
-        if self.filename is not "":
-            if library == "composite" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.mat_name = ""
-                    self.filename = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif library != "bundled" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.mat_name = ""
-                    self.filename = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif library == "bundled" and os.path.exists(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm"):
-                bcm_file = open(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.mat_name = ""
-                    self.filename = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-            elif working_mode == "online":
-                connection = http.client.HTTPConnection(mat_lib_host)
-                connection.request("GET", mat_lib_location + "cycles/" + category_filename + "/" + self.filename + ".bcm")
-                response = connection.getresponse().read()
-                
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in str(response)[2:40]:
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    self.mat_name = ""
-                    self.filename = ""
-                    return {'CANCELLED'}
-                
-                #Cache material
-                if library == "composite":
-                    bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-                    bcm_file.write(response)
-                    bcm_file.close()
-                else:
-                    bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-                    bcm_file.write(response)
-                    bcm_file.close()
-                
-                material_file_contents = ""
-                material_file_contents = str(response)[str(response).index("<material"):str(response).index("/material>") + 10]
-            else:
-                self.report({'ERROR'}, "Material is not cached; cannot download in offline mode!")
-                self.mat_name = ""
-                self.filename = ""
-                return {'CANCELLED'}
-            mat_name = self.mat_name
-        elif self.open_location is not "":
-            if ".bcm" in self.open_location:
-                material_file_contents = ""
-                bcm_file = open(self.open_location, mode="r", encoding="UTF-8")
-                material_file_contents = bcm_file.read()
-                bcm_file.close()
-                
-                #Check file for validitity
-                if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents:
-                    self.open_location = ""
-                    self.report({'ERROR'}, "Material file is either outdated or invalid.")
-                    return {'CANCELLED'}
-                mat_name = ""
-                for word in self.open_location.split(os.sep)[-1][:-4].split("_"):
-                    if mat_name is not "":
-                        mat_name += " "
-                    mat_name += word.capitalize()
-            else:
-                self.open_location = ""
-                self.report({'ERROR'}, "Not a .bcm file.")
-                return {'CANCELLED'}
-        else:
-            if self.text_block in bpy.data.texts:
-                #Read from a text datablock
-                material_file_contents = ""
-                material_file_contents = bpy.data.texts[self.text_block].as_string()
-            else:
-                self.report({'ERROR'}, "Requested text block does not exist.")
-                self.text_block = "";
-                return {'CANCELLED'}
-            
-            #Check file for validitity
-            if '<?xml version="1.0" encoding="UTF-8"?>' not in material_file_contents[0:38]:
-                self.report({'ERROR'}, "Material data is either outdated or invalid.")
-                self.text_block = ""
-                return {'CANCELLED'}
-            if context.scene.mat_lib_bcm_name is "":
-                separator = ""
-                if "_" in self.text_block:
-                    separator = "_"
-                elif "-" in self.text_block:
-                    separator = "-"
-                elif " " in self.text_block:
-                    separator = " "
-                    
-                if separator is not "":
-                    for word in self.text_block.split(separator):
-                        if mat_name is not "":
-                            mat_name += " "
-                        mat_name += word.capitalize()
-                else:
-                    mat_name = self.text_block
-            else:
-                mat_name = context.scene.mat_lib_bcm_name
-        
-        
-        if context.active_object.active_material:
-            context.active_object.active_material.name = mat_name
-        else:
-            new_material = bpy.data.materials.new(mat_name)
-            if len(context.active_object.material_slots.keys()) is 0:
-                bpy.ops.object.material_slot_add()
-            context.active_object.material_slots[context.active_object.active_material_index].material = new_material
-        
-        #Prepare material for new nodes
-        context.active_object.active_material.use_nodes = True
-        context.active_object.active_material.node_tree.nodes.clear()
-        
-        #Format nicely
-        material_file_contents = material_file_contents.replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", '')
-        material_file_contents = material_file_contents.replace("\r\n",'')
-        material_file_contents = material_file_contents.replace("\n",'')
-        material_file_contents = material_file_contents.replace("\t",'')
-        material_file_contents = material_file_contents.replace("\\",'')
-        
-        #Parse file
-        dom = xml.dom.minidom.parseString(material_file_contents)
-        
-        #Create internal OSL scripts
-        scripts = dom.getElementsByTagName("script")
-        for s in scripts:
-            osl_datablock = bpy.data.texts.new(name=s.attributes['name'].value)
-            osl_text = s.toxml()[s.toxml().index(">"):s.toxml().rindex("<")]
-            osl_text = osl_text[1:].replace("<br/>","\n")
-            osl_datablock.write(osl_text)
-            osl_scripts.append(osl_datablock)
-        
-        #Add nodes
-        nodes = dom.getElementsByTagName("node")
-        addNodes(nodes, context.active_object.active_material)
-        if node_message:
-            self.report({node_message[0]}, node_message[1])
-            node_message = []
-            self.mat_name = ""
-            self.filename = ""
-            self.open_location = ""
-            self.text_block = ""
-            return {'CANCELLED'}
-            
-        #Create links
-        links = dom.getElementsByTagName("link")
-        createLinks(links, context.active_object.active_material)
-        
-        m = dom.getElementsByTagName("material")[0]
-        
-        #Set viewport color
-        context.active_object.active_material.diffuse_color = color(m.attributes["view_color"].value)
-            
-        #Set sample-as-lamp-ness
-        if boolean(m.attributes["sample_lamp"].value):
-            sample_lamp = True
-        else:
-            sample_lamp = False
-        context.active_object.active_material.cycles.sample_as_light = sample_lamp
-        
-        self.mat_name = ""
-        self.filename = ""
-        self.open_location = ""
-        self.text_block = ""
-        self.report({'INFO'}, "Material applied.")
-        current_material_cached = True
-        
-        return {'FINISHED'}
-
-class CacheLibraryMaterial(bpy.types.Operator):
-    '''Cache material to disk'''
-    bl_idname = "material.librarycache"
-    bl_label = "cache material to disk"
-    filename = bpy.props.StringProperty()
-    
-    def execute(self, context):
-        global material_file_contents
-        global current_material_cached
-        
-        if working_mode == "online":
-            connection = http.client.HTTPConnection(mat_lib_host)
-            connection.request("GET", mat_lib_location + "cycles/" + category_filename + "/" + self.filename + ".bcm")
-            response = connection.getresponse().read()
-        else:
-            self.report({'ERROR'}, "Cannot cache material in offline mode.")
-            return {'CANCELLED'}
-        
-        material_file_contents = str(response)
-        if '<?xml version="1.0" encoding="UTF-8"?>' in material_file_contents[2:40]:
-            material_file_contents = material_file_contents[material_file_contents.index("<material"):(material_file_contents.rindex("</material>") + 11)]
-        else:
-            self.report({'ERROR'}, "Invalid material file.")
-            print(material_file_contents)
-            return {'CANCELLED'}
-        
-        #Parse file
-        dom = xml.dom.minidom.parseString(material_file_contents)
-        
-        #Create internal OSL scripts and cache image textures
-        nodes = dom.getElementsByTagName("node")
-        for node in nodes:
-            node_data = node.attributes
-            if node_data['type'].value == "TEX_IMAGE":
-                if node_data['image'].value:
-                    if "file://" in node_data['image'].value:
-                        self.report({'ERROR'}, "Cannot cache image texture located at %s." % node_data['image'].value)
-                    elif "http://" in node_data['image'].value:
-                        self.report({'ERROR'}, "Cannot cache image texture hosted at %s." % node_data['image'].value)
-                    else:
-                        ext = "." + node_data['image'].value.split(".")[-1]
-                        image_name = node_data['image'].value[:-4]
-                        
-                        if ext.lower() != ".jpg" and ext.lower() != ".png":
-                            node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                            return
-                            
-                        if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                        elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                        elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)
-                        elif working_mode == "online":
-                            connection = http.client.HTTPConnection(mat_lib_host)
-                            connection.request("GET", mat_lib_location + "cycles/textures/" + image_name + ext)
-                            response = connection.getresponse().read()
-                            
-                            #Cache image texture
-                            if library == "composite":
-                                image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                                image_file = open(image_filepath, mode="w+b")
-                                image_file.write(response)
-                                image_file.close()
-                            else:
-                                image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                                image_file = open(image_filepath, mode="w+b")
-                                image_file.write(response)
-                                image_file.close()
-                        else:
-                            node_message = ['ERROR', "The image texture, \"%s\", is not cached; cannot download in offline mode." % (image_name + ext)]
-                            image_filepath = ""
-            elif node_data['type'].value == "SCRIPT":
-                if node_data['script'].value:
-                    if "file://" in node_data['script'].value:
-                        self.report({'ERROR'}, "Cannot cache OSL script located at %s." % node_data['script'].value)
-                    elif "http://" in node_data['script'].value:
-                        self.report({'ERROR'}, "Cannot cache OSL script hosted at %s." % node_data['script'].value)
-                    else:
-                        ext = "." + node_data['script'].value.split(".")[-1]
-                        script_name = node_data['script'].value[:-4]
-                        
-                        if ext.lower() != ".osl" and ext.lower() != ".oso":
-                            node_message = ['ERROR', "The OSL script file referenced by this script node is not .osl or .oso; not downloading."]
-                            return
-                            
-                        if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                        elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                        elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)
-                        elif working_mode == "online":
-                            connection = http.client.HTTPConnection(mat_lib_host)
-                            connection.request("GET", mat_lib_location + "cycles/scripts/" + script_name + ext)
-                            response = connection.getresponse().read()
-                            
-                            #Cache image texture
-                            if library == "composite":
-                                script_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                                script_file = open(script_filepath, mode="w+b")
-                                script_file.write(response)
-                                script_file.close()
-                            else:
-                                script_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                                script_file = open(script_filepath, mode="w+b")
-                                script_file.write(response)
-                                script_file.close()
-                        else:
-                            node_message = ['ERROR', "The OSL script, \"%s\", is not cached; cannot download in offline mode." % (script_name + ext)]
-                            script_filepath = ""
-                    
-        
-        if library == "composite":
-            bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-            bcm_file.write(response)
-            bcm_file.close()
-        elif library != "bundled":
-            bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename + ".bcm", mode="w+b")
-            bcm_file.write(response)
-            bcm_file.close()
-        else:
-            self.report({'ERROR'}, "Cannot cache materials from this library.")
-            return {'CANCELLED'}
-            
-        current_material_cached = True
-        self.report({'INFO'}, "Material cached.")
-        return {'FINISHED'}
-
-class SaveLibraryMaterial(bpy.types.Operator, ExportHelper):
-    '''Save material to disk'''
-    bl_idname = "material.librarysave"
-    bl_label = "Save material to disk"
-    filepath = bpy.props.StringProperty()
-    filename = bpy.props.StringProperty()
-    
-    #ExportHelper uses this
-    filename_ext = ".bcm"
-
-    filter_glob = bpy.props.StringProperty(
-            default="*.bcm",
-            options={'HIDDEN'},
-            )
-    
-    def execute(self, context):
-        global material_file_contents
-        global save_filename
-        global current_material_cached
-        
-        if library == "composite" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + save_filename):
-            bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename, mode="r+b")
-            response = bcm_file.read()
-            bcm_file.close()
-        elif library != "bundled" and os.path.exists(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + save_filename):
-            bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename, mode="r+b")
-            response = bcm_file.read()
-            bcm_file.close()
-        elif library == "bundled" and os.path.exists(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + save_filename):
-            bcm_file = open(mat_lib_folder + os.sep + "bundled" + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename, mode="r+b")
-            response = bcm_file.read()
-            bcm_file.close()
-        elif working_mode == "online":
-            connection = http.client.HTTPConnection(mat_lib_host)
-            connection.request("GET", mat_lib_location + "cycles/" + category_filename + "/" + self.filename)
-            response = connection.getresponse().read()
-            
-            #Cache material
-            if library == "composite":
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename, mode="w+b")
-                bcm_file.write(response)
-                bcm_file.close()
-            else:
-                bcm_file = open(mat_lib_folder + os.sep + mat_lib_host + os.sep + library + os.sep + "cycles" + os.sep + category_filename + os.sep + self.filename, mode="w+b")
-                bcm_file.write(response)
-                bcm_file.close()
-        else:
-            self.report({'ERROR'}, "Material is not cached; cannot download in offline mode.")
-            return {'FINISHED'}
-        
-        material_file_contents = str(response)
-        
-        bcm_file = open(self.filepath, mode="w+b")
-        bcm_file.write(response)
-        bcm_file.close()
-        
-        if '<?xml version="1.0" encoding="UTF-8"?>' in material_file_contents[2:40]:
-            material_file_contents = material_file_contents[material_file_contents.index("<material"):(material_file_contents.rindex("</material>") + 11)]
-        else:
-            self.report({'ERROR'}, "Invalid material file.")
-            print(material_file_contents)
-            return {'CANCELLED'}
-        
-        #Parse file
-        dom = xml.dom.minidom.parseString(material_file_contents)
-        
-        bcm_file = open(self.filepath, mode="r", encoding="UTF-8")
-        material_file_contents = bcm_file.read()
-        bcm_file.close()
-        
-        #Create internal OSL scripts and cache image textures
-        nodes = dom.getElementsByTagName("node")
-        for node in nodes:
-            node_data = node.attributes
-            if node_data['type'].value == "TEX_IMAGE":
-                if node_data['image'].value:
-                    node_attributes = (
-                        node_data['image'].value,
-                        node_data['source'].value,
-                        node_data['color_space'].value,
-                        node_data['projection'].value,
-                        node_data['loc'].value)
-                    original_xml = ("<node type=\"TEX_IMAGE\" image=\"%s\" source=\"%s\" color_space=\"%s\" projection=\"%s\" loc=\"%s\" />" % node_attributes)
-                    if "file://" in node_data['image'].value:
-                        if os.path.exists(node_data['image'].value[7:]):
-                            image_file = open(node_data['image'].value[7:], mode="r+b")
-                            image_data = image_file.read()
-                            image_file.close()
-                            copied_image = open(self.filepath[:-len(self.filename)] + node_data['image'].value.split(os.sep)[-1], mode="w+b")
-                            copied_image.write(image_data)
-                            copied_image.close()
-                            image_location = ("file://" + self.filepath[:-len(self.filename)] + node_data['image'].value.split(os.sep)[-1])
-                        else:
-                            image_location = ""
-                    elif "http://" in node_data['image'].value:
-                        self.report({'ERROR'}, "Cannot save image texture hosted at %s." % node_data['image'].value)
-                        image_location = ""
-                    else:
-                        ext = "." + node_data['image'].value.split(".")[-1]
-                        image_name = node_data['image'].value[:-4]
-                        
-                        if ext.lower() != ".jpg" and ext.lower() != ".png":
-                            node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                            return
-                            
-                        if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                        elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                        elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)):
-                            image_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)
-                        elif working_mode == "online":
-                            connection = http.client.HTTPConnection(mat_lib_host)
-                            connection.request("GET", mat_lib_location + "cycles/textures/" + image_name + ext)
-                            response = connection.getresponse().read()
-                            
-                            #Cache image texture
-                            if library == "composite":
-                                image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                                image_file = open(image_filepath, mode="w+b")
-                                image_file.write(response)
-                                image_file.close()
-                            else:
-                                image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                                image_file = open(image_filepath, mode="w+b")
-                                image_file.write(response)
-                                image_file.close()
-                        else:
-                            node_message = ['ERROR', "The image texture, \"%s\", is not cached; cannot download in offline mode." % (image_name + ext)]
-                            image_filepath = ""
-                        image_location = ("file://" + self.filepath[:-len(self.filename)] + node_data['image'].value)
-                        
-                        if image_filepath:
-                            print(image_filepath)
-                            image_file = open(image_filepath, mode="r+b")
-                            image_data = image_file.read()
-                            image_file.close()
-                            saved_image = open(self.filepath[:-len(self.filename)] + node_data['image'].value, mode="w+b")
-                            saved_image.write(image_data)
-                            saved_image.close()
-                
-                    updated_xml = original_xml.replace(node_data['image'].value, image_location)
-                    material_file_contents = material_file_contents.replace(original_xml, updated_xml)
-            elif node_data['type'].value == "SCRIPT":
-                if node_data['script'].value:
-                    node_attributes = (
-                        node_data['mode'].value,
-                        node_data['script'].value,
-                        node_data['loc'].value)
-                    original_xml = ("<node type=\"SCRIPT\" mode=\"%s\" script=\"%s\" loc=\"%s\" />" % node_attributes)
-                    if "file://" in node_data['script'].value:
-                        if os.path.exists(node_data['script'].value[7:]):
-                            script_file = open(node_data['script'].value[7:], mode="r+b")
-                            script_data = script_file.read()
-                            script_file.close()
-                            copied_script = open(self.filepath[:-len(self.filename)] + node_data['script'].value.split(os.sep)[-1], mode="w+b")
-                            copied_script.write(script_data)
-                            copied_script.close()
-                            script_location = ("file://" + self.filepath[:-len(self.filename)] + node_data['script'].value.split(os.sep)[-1])
-                        else:
-                            script_location = ""
-                    elif "http://" in node_data['script'].value:
-                        self.report({'ERROR'}, "Cannot save OSL script hosted at %s." % node_data['script'].value)
-                        script_location = ""
-                    else:
-                        ext = "." + node_data['script'].value.split(".")[-1]
-                        script_name = node_data['script'].value[:-4]
-                        
-                        if ext.lower() != ".osl" and ext.lower() != ".oso":
-                            node_message = ['ERROR', "The OSL script file referenced by this script node is not .osl or .oso; not downloading."]
-                            return
-                            
-                        if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                        elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                        elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)):
-                            script_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)
-                        elif working_mode == "online":
-                            connection = http.client.HTTPConnection(mat_lib_host)
-                            connection.request("GET", mat_lib_location + "cycles/scripts/" + script_name + ext)
-                            response = connection.getresponse().read()
-                            
-                            #Cache OSL script
-                            if library == "composite":
-                                script_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                                script_file = open(script_filepath, mode="w+b")
-                                script_file.write(response)
-                                script_file.close()
-                            else:
-                                script_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                                script_file = open(script_filepath, mode="w+b")
-                                script_file.write(response)
-                                script_file.close()
-                        else:
-                            node_message = ['ERROR', "The OSL script, \"%s\", is not cached; cannot download in offline mode." % (script_name + ext)]
-                            script_filepath = ""
-                        
-                        if script_filepath:
-                            print(script_filepath)
-                            script_file = open(script_filepath, mode="r+b")
-                            script_data = script_file.read()
-                            script_file.close()
-                            saved_script = open(self.filepath[:-len(self.filename)] + node_data['script'].value, mode="w+b")
-                            saved_script.write(script_data)
-                            saved_script.close()
-                    
-                    updated_xml = original_xml.replace(node_data['script'].value, script_location)
-                    material_file_contents = material_file_contents.replace(original_xml, updated_xml)
-        
-        bcm_file = open(self.filepath, mode="w", encoding="UTF-8")
-        bcm_file.write(material_file_contents)
-        bcm_file.close()
-        
-        self.report({'INFO'}, "Material saved.")
-        current_material_cached = True
-        
-        return {'FINISHED'}
-
-def createLinks(links, mat):
-    node_tree = mat.node_tree
-    for dom_link in links:
-        link = {
-    "to": int(dom_link.attributes['to'].value),
-    "input": int(dom_link.attributes['input'].value),
-    "from": int(dom_link.attributes['from'].value),
-    "output": int(dom_link.attributes['output'].value)}
-        node_tree.links.new(
-    node_tree.nodes[link["to"]].inputs[link["input"]],
-    node_tree.nodes[link["from"]].outputs[link["output"]])
-
-def addNodes(nodes, mat):
-    global node_message
-    global osl_scripts
-    
-    for dom_node in nodes:
-        node_type = dom_node.attributes['type'].value
-        loc = dom_node.attributes['loc'].value
-        node_location = [int(loc[:loc.index(",")]), int(loc[(loc.index(",") + 1):])]
-        node_tree = mat.node_tree
-        node_data = dom_node.attributes
-        
-        #Below here checks the type of the node and adds the correct type
-        
-        #INPUT TYPES
-        #This is totally crafty, but some of these nodes actually
-        # store their values as their output's default value!
-        if node_type == "ATTRIBUTE":
-            print ("ATTRIBUTE")
-            node = node_tree.nodes.new(node_type)
-            node.attribute_name = node_data['attribute'].value
-        
-        elif node_type == "CAMERA":
-            print ("CAMERA")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "FRESNEL":
-            print ("FRESNEL")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['IOR'].default_value = float(node_data['ior'].value)
-                
-        elif node_type == "LAYER_WEIGHT":
-            print ("LAYER_WEIGHT")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Blend'].default_value = float(node_data['blend'].value)
-                
-        elif node_type == "LIGHT_PATH":
-            print ("LIGHT_PATH")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "NEW_GEOMETRY":
-            print ("NEW_GEOMETRY")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "OBJECT_INFO":
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            print ("OBJECT_INFO")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "PARTICLE_INFO":
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            print ("PARTICLE_INFO")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "RGB":
-            print ("RGB")
-            node = node_tree.nodes.new(node_type)
-            node.outputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "TANGENT":
-            print ("TANGENT")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.direction_type = node_data['direction'].value
-            node.axis = node_data['axis'].value
-        
-        elif node_type == "TEX_COORD":
-            print ("TEX_COORD")
-            node = node_tree.nodes.new(node_type)
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.64 and "dupli" in node_data:
-                node.from_dupli = boolean(node_data['dupli'].value)
-        
-        elif node_type == "VALUE":
-            print ("VALUE")
-            node = node_tree.nodes.new(node_type)
-            node.outputs['Value'].default_value = float(node_data['value'].value)
-            
-            #OUTPUT TYPES
-        elif node_type == "OUTPUT_LAMP":
-            print ("OUTPUT_LAMP")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "OUTPUT_MATERIAL":
-            print ("OUTPUT_MATERIAL")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "OUTPUT_WORLD":
-            print ("OUTPUT_WORLD")
-            node = node_tree.nodes.new(node_type)
-        
-            #SHADER TYPES
-        elif node_type == "ADD_SHADER":
-            print ("ADD_SHADER")
-            node = node_tree.nodes.new(node_type)
-            
-        elif node_type == "AMBIENT_OCCLUSION":
-            print ("AMBIENT_OCCLUSION")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "BACKGROUND":
-            print ("BACKGROUND")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Strength'].default_value = float(node_data['strength'].value)
-            
-        elif node_type == "BSDF_ANISOTROPIC":
-            print ("BSDF_ANISOTROPIC")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Roughness'].default_value = float(node_data['roughness'].value)
-            node.inputs['Anisotropy'].default_value = float(node_data['anisotropy'].value)
-            node.inputs['Rotation'].default_value = float(node_data['rotation'].value)
-            
-        elif node_type == "BSDF_DIFFUSE":
-            print ("BSDF_DIFFUSE")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Roughness'].default_value = float(node_data['roughness'].value)
-        
-        elif node_type == "BSDF_GLASS":
-            print ("BSDF_GLASS")
-            node = node_tree.nodes.new(node_type)
-            node.distribution = node_data['distribution'].value
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Roughness'].default_value = float(node_data['roughness'].value)
-            node.inputs['IOR'].default_value = float(node_data['ior'].value)
-            
-        elif node_type == "BSDF_GLOSSY":
-            print ("BSDF_GLOSSY")
-            node = node_tree.nodes.new(node_type)
-            node.distribution = node_data['distribution'].value
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Roughness'].default_value = float(node_data['roughness'].value)
-        
-        elif node_type == "BSDF_REFRACTION":
-            print ("BSDF_REFRACTION")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.distribution = node_data['distribution'].value
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Roughness'].default_value = float(node_data['roughness'].value)
-            node.inputs['IOR'].default_value = float(node_data['ior'].value)
-        
-        elif node_type == "BSDF_TRANSLUCENT":
-            print ("BSDF_TRANSLUCENT")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "BSDF_TRANSPARENT":
-            print ("BSDF_TRANSPARENT")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "BSDF_VELVET":
-            print ("BSDF_VELVET")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Sigma'].default_value = float(node_data['sigma'].value)
-        
-        elif node_type == "EMISSION":
-            print ("EMISSION")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Strength'].default_value = float(node_data['strength'].value)
-        
-        elif node_type == "HOLDOUT":
-            print ("HOLDOUT")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "MIX_SHADER":
-            print ("MIX_SHADER")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Fac'].default_value = float(node_data['fac'].value)
-        
-            #TEXTURE TYPES
-        elif node_type == "TEX_BRICK":
-            print ("TEX_BRICK")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.offset = float(node_data['offset'].value)
-            node.offset_frequency = float(node_data['offset_freq'].value)
-            node.squash = float(node_data['squash'].value)
-            node.squash_frequency = float(node_data['squash_freq'].value)
-            node.inputs['Color1'].default_value = color(node_data['color1'].value)
-            node.inputs['Color2'].default_value = color(node_data['color2'].value)
-            node.inputs['Mortar'].default_value = color(node_data['mortar'].value)
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            node.inputs['Mortar Size'].default_value = float(node_data['mortar_size'].value)
-            node.inputs['Bias'].default_value = float(node_data['bias'].value)
-            node.inputs['Brick Width'].default_value = float(node_data['width'].value)
-            node.inputs['Row Height'].default_value = float(node_data['height'].value)
-            
-        elif node_type == "TEX_CHECKER":
-            print ("TEX_CHECKER")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color1'].default_value = color(node_data['color1'].value)
-            node.inputs['Color2'].default_value = color(node_data['color2'].value)
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            
-        elif node_type == "TEX_ENVIRONMENT":
-            print ("TEX_ENVIRONMENT")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.color_space = node_data['color_space'].value
-            node.projection = node_data['projection'].value
-            if 'image' in node_data:
-                if "file://" in node_data['image'].value:
-                    image_filepath = node_data['image'].value[7:]
-                    image_name = node_data['image'].value.split(os.sep)[-1]
-                    image_datablock = bpy.data.images.new(name=image_name, width=4, height=4)
-                    image_datablock.source = node_data['source'].value
-                    image_datablock.filepath = image_filepath
-                    node.image = image_datablock
-                    if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                        node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                        node.image_user.frame_start = int(node_data['frame_start'].value)
-                        node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                        node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                        node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-                elif "http://" in node_data['image'].value and bpy.context.scene.mat_lib_images_only_trusted == False:
-                    ext = "." + node_data['image'].value.split(".")[-1]
-                    image_name = node_data['image'].value.split("/")[-1][:-4]
-                    image_host = node_data['image'].value[7:].split("/")[0]
-                    image_location = node_data['image'].value[(7 + len(image_host)):]
-                    
-                    if ext.lower() != ".jpg" and ext.lower() != ".png":
-                        node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                        return
-                    
-                    connection = http.client.HTTPConnection(image_host)
-                    connection.request("GET", image_location)
-                    response = connection.getresponse().read()
-                    #Save image texture
-                    image_filepath = os.path.join(mat_lib_folder, "my-materials", image_name + ext)
-                    image_file = open(image_filepath, mode="w+b")
-                    image_file.write(response)
-                    image_file.close()
-                    image_datablock = bpy.data.images.new(name=(image_name + ext), width=4, height=4)
-                    image_datablock.source = node_data['source'].value
-                    image_datablock.filepath = image_filepath
-                    node.image = image_datablock
-                    if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                        node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                        node.image_user.frame_start = int(node_data['frame_start'].value)
-                        node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                        node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                        node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-                else:
-                    ext = "." + node_data['image'].value.split(".")[-1]
-                    image_name = node_data['image'].value[:-4]
-                    
-                    if ext.lower() != ".jpg" and ext.lower() != ".png":
-                        node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                        return
-                        
-                    if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                    elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                    elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)
-                    elif working_mode == "online":
-                        connection = http.client.HTTPConnection(mat_lib_host)
-                        connection.request("GET", mat_lib_location + "cycles/textures/" + image_name + ext)
-                        response = connection.getresponse().read()
-                        
-                        #Cache image texture
-                        if library == "composite":
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                            image_file = open(image_filepath, mode="w+b")
-                            image_file.write(response)
-                            image_file.close()
-                        else:
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                            image_file = open(image_filepath, mode="w+b")
-                            image_file.write(response)
-                            image_file.close()
-                    else:
-                        node_message = ['ERROR', "The image texture, \"%s\", is not cached; cannot download in offline mode." % (image_name + ext)]
-                        image_filepath = ""
-                    if image_filepath != "":
-                        image_datablock = bpy.data.images.new(name=(image_name + ext), width=4, height=4)
-                        image_datablock.source = node_data['source'].value
-                        image_datablock.filepath = image_filepath
-                        node.image = image_datablock
-                        if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                            node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                            node.image_user.frame_start = int(node_data['frame_start'].value)
-                            node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                            node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                            node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-            
-        elif node_type == "TEX_GRADIENT":
-            print ("TEX_GRADIENT")
-            node = node_tree.nodes.new(node_type)
-            node.gradient_type = node_data['gradient'].value
-        
-        elif node_type == "TEX_IMAGE":
-            print ("TEX_IMAGE")
-            node = node_tree.nodes.new(node_type)
-            node.color_space = node_data['color_space'].value
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63 and "projection" in node_data:
-                node.projection = node_data['projection'].value
-            if 'image' in node_data:
-                if "file://" in node_data['image'].value:
-                    image_filepath = node_data['image'].value[7:]
-                    image_name = node_data['image'].value.split(os.sep)[-1]
-                    image_datablock = bpy.data.images.new(name=image_name, width=4, height=4)
-                    image_datablock.source = node_data['source'].value
-                    image_datablock.filepath = image_filepath
-                    node.image = image_datablock
-                    if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                        node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                        node.image_user.frame_start = int(node_data['frame_start'].value)
-                        node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                        node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                        node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-                elif "http://" in node_data['image'].value and bpy.context.scene.mat_lib_images_only_trusted == False:
-                    ext = "." + node_data['image'].value.split(".")[-1]
-                    image_name = node_data['image'].value.split("/")[-1][:-4]
-                    image_host = node_data['image'].value[7:].split("/")[0]
-                    image_location = node_data['image'].value[(7 + len(image_host)):]
-                    
-                    if ext.lower() != ".jpg" and ext.lower() != ".png":
-                        node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                        return
-                    
-                    connection = http.client.HTTPConnection(image_host)
-                    connection.request("GET", image_location)
-                    response = connection.getresponse().read()
-                    #Save image texture
-                    image_filepath = os.path.join(mat_lib_folder, "my-materials", image_name + ext)
-                    image_file = open(image_filepath, mode="w+b")
-                    image_file.write(response)
-                    image_file.close()
-                    image_datablock = bpy.data.images.new(name=(image_name + ext), width=4, height=4)
-                    image_datablock.source = node_data['source'].value
-                    image_datablock.filepath = image_filepath
-                    node.image = image_datablock
-                    if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                        node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                        node.image_user.frame_start = int(node_data['frame_start'].value)
-                        node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                        node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                        node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-                else:
-                    ext = "." + node_data['image'].value.split(".")[-1]
-                    image_name = node_data['image'].value[:-4]
-                    
-                    if ext.lower() != ".jpg" and ext.lower() != ".png":
-                        node_message = ['ERROR', "The image file referenced by this image texture node is not .jpg or .png; not downloading."]
-                        return
-                        
-                    if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                    elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                    elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)):
-                        image_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "textures", image_name + ext)
-                    elif working_mode == "online":
-                        connection = http.client.HTTPConnection(mat_lib_host)
-                        connection.request("GET", mat_lib_location + "cycles/textures/" + image_name + ext)
-                        response = connection.getresponse().read()
-                        
-                        #Cache image texture
-                        if library == "composite":
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "textures", image_name + ext)
-                            image_file = open(image_filepath, mode="w+b")
-                            image_file.write(response)
-                            image_file.close()
-                        else:
-                            image_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "textures", image_name + ext)
-                            image_file = open(image_filepath, mode="w+b")
-                            image_file.write(response)
-                            image_file.close()
-                    else:
-                        node_message = ['ERROR', "The image texture, \"%s\", is not cached; cannot download in offline mode." % (image_name + ext)]
-                        image_filepath = ""
-                    if image_filepath != "":
-                        image_datablock = bpy.data.images.new(name=(image_name + ext), width=4, height=4)
-                        image_datablock.source = node_data['source'].value
-                        image_datablock.filepath = image_filepath
-                        node.image = image_datablock
-                        if node_data['source'].value == 'MOVIE' or node_data['source'].value == 'SEQUENCE':
-                            node.image_user.frame_duration = int(node_data['frame_duration'].value)
-                            node.image_user.frame_start = int(node_data['frame_start'].value)
-                            node.image_user.frame_offset = int(node_data['frame_offset'].value)
-                            node.image_user.use_cyclic = boolean(node_data['cyclic'].value)
-                            node.image_user.use_auto_refresh = boolean(node_data['auto_refresh'].value)
-                
-        elif node_type == "TEX_MAGIC":
-            print ("TEX_MAGIC")
-            node = node_tree.nodes.new(node_type)
-            node.turbulence_depth = int(node_data['depth'].value)
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            node.inputs['Distortion'].default_value = float(node_data['distortion'].value)
-        
-        elif node_type == "TEX_MUSGRAVE":
-            print ("TEX_MUSGRAVE")
-            node = node_tree.nodes.new(node_type)
-            node.musgrave_type = node_data['musgrave'].value
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            node.inputs['Detail'].default_value = float(node_data['detail'].value)
-            node.inputs['Dimension'].default_value = float(node_data['dimension'].value)
-            node.inputs['Lacunarity'].default_value = float(node_data['lacunarity'].value)
-            node.inputs['Offset'].default_value = float(node_data['offset'].value)
-            node.inputs['Gain'].default_value = float(node_data['gain'].value)
-        
-        elif node_type == "TEX_NOISE":
-            print ("TEX_NOISE")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            node.inputs['Detail'].default_value = float(node_data['detail'].value)
-            node.inputs['Distortion'].default_value = float(node_data['distortion'].value)
-                        
-        elif node_type == "TEX_SKY":
-            print ("TEX_SKY")
-            node = node_tree.nodes.new(node_type)
-            node.sun_direction = vector(node_data['sun_direction'].value)
-            node.turbidity = float(node_data['turbidity'].value)
-        
-        elif node_type == "TEX_VORONOI":
-            print ("TEX_VORONOI")
-            node = node_tree.nodes.new(node_type)
-            node.coloring = node_data['coloring'].value
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-        
-        elif node_type == "TEX_WAVE":
-            print ("TEX_WAVE")
-            node = node_tree.nodes.new(node_type)
-            node.wave_type = node_data['wave'].value
-            node.inputs['Scale'].default_value = float(node_data['scale'].value)
-            node.inputs['Distortion'].default_value = float(node_data['distortion'].value)
-            node.inputs['Detail'].default_value = float(node_data['detail'].value)
-            node.inputs['Detail Scale'].default_value = float(node_data['detail_scale'].value)
-        
-            #COLOR TYPES
-        elif node_type == "BRIGHTCONTRAST":
-            print ("BRIGHTCONTRAST")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Bright'].default_value = float(node_data['bright'].value)
-            node.inputs['Contrast'].default_value = float(node_data['contrast'].value)
-        
-        elif node_type == "GAMMA":
-            print ("GAMMA")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            node.inputs['Gamma'].default_value = float(node_data['gamma'].value)
-        
-        elif node_type == "HUE_SAT":
-            print ("HUE_SAT")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Hue'].default_value = float(node_data['hue'].value)
-            node.inputs['Saturation'].default_value = float(node_data['saturation'].value)
-            node.inputs['Value'].default_value = float(node_data['value'].value)
-            node.inputs['Fac'].default_value = float(node_data['fac'].value)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            
-        elif node_type == "INVERT":
-            print ("INVERT")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Fac'].default_value = float(node_data['fac'].value)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "LIGHT_FALLOFF":
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            print ("LIGHT_FALLOFF")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Strength'].default_value = float(node_data['strength'].value)
-            node.inputs['Smooth'].default_value = float(node_data['smooth'].value)
-        
-        elif node_type == "MIX_RGB":
-            print ("MIX_RGB")
-            node = node_tree.nodes.new(node_type)
-            node.blend_type = node_data['blend_type'].value
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63 and "clamp" in node_data:
-                node.use_clamp = boolean(node_data['clamp'].value)
-            node.inputs['Fac'].default_value = float(node_data['fac'].value)
-            node.inputs['Color1'].default_value = color(node_data['color1'].value)
-            node.inputs['Color2'].default_value = color(node_data['color2'].value)
-        
-            #VECTOR TYPES
-        elif node_type == "BUMP":
-            print ("BUMP")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.inputs["Strength"].default_value = float(node_data['strength'].value)
-            
-        elif node_type == "MAPPING":
-            print ("MAPPING")
-            node = node_tree.nodes.new(node_type)
-            node.translation = vector(node_data['translation'].value)
-            node.rotation = vector(node_data['rotation'].value)
-            node.scale = vector(node_data['scale'].value)
-            if boolean(node_data['use_min'].value):
-                node.use_min = True
-                node.min = vector(node_data['min'].value)
-            if boolean(node_data['use_max'].value):
-                node.use_max = True
-                node.max = vector(node_data['max'].value)
-            node.inputs['Vector'].default_value = vector(node_data['vector'].value)
-        
-        elif node_type == "NORMAL":
-            print ("NORMAL")
-            node = node_tree.nodes.new(node_type)
-            node.outputs['Normal'].default_value = vector(node_data['vector_output'].value)
-            node.inputs['Normal'].default_value = vector(node_data['vector_input'].value)
-            
-        elif node_type == "NORMAL_MAP":
-            print ("NORMAL_MAP")
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            node = node_tree.nodes.new(node_type)
-            node.space = node_data['space'].value
-            node.uv_map = node_data['uv_map'].value
-            node.inputs["Strength"].default_value = float(node_data['strength'].value)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-            
-            #CONVERTOR TYPES
-        elif node_type == "COMBRGB":
-            print ("COMBRGB")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['R'].default_value = float(node_data['red'].value)
-            node.inputs['G'].default_value = float(node_data['green'].value)
-            node.inputs['B'].default_value = float(node_data['blue'].value)
-        
-        elif node_type == "MATH":
-            print ("MATH")
-            node = node_tree.nodes.new(node_type)
-            node.operation = node_data['operation'].value
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63 and "clamp" in node_data:
-                node.use_clamp = boolean(node_data['clamp'].value)
-            node.inputs[0].default_value = float(node_data['value1'].value)
-            node.inputs[1].default_value = float(node_data['value2'].value)
-        
-        elif node_type == "RGBTOBW":
-            print ("RGBTOBW")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Color'].default_value = color(node_data['color'].value)
-        
-        elif node_type == "SEPRGB":
-            print ("SEPRGB")
-            node = node_tree.nodes.new(node_type)
-            node.inputs['Image'].default_value = color(node_data['image'].value)
-        
-        elif node_type == "VALTORGB":
-            print ("VALTORGB")
-            node = node_tree.nodes.new(node_type)
-            node.color_ramp.interpolation = node_data['interpolation'].value
-            node.inputs['Fac'].default_value = float(node_data['fac'].value)
-            
-            #Delete the first stop which comes with the ramp by default
-            node.color_ramp.elements.remove(node.color_ramp.elements[0])
-            
-            # The first stop will be "stop1", so set i to 1
-            i = 1
-            while i <= int(node_data['stops'].value):
-                #Each color stop element is formatted like this:
-                #            stop1="0.35|rgba(1, 0.5, 0.8, 0.5)"
-                #The "|" separates the stop's position and color.
-                element_data = node_data[("stop" + str(i))].value.split('|')
-                if i == 1:
-                    element = node.color_ramp.elements[0]
-                    element.position = float(element_data[0])
-                else:
-                    element = node.color_ramp.elements.new(float(element_data[0]))
-                element.color = color(element_data[1])
-                i = i + 1
-            
-        elif node_type == "VECT_MATH":
-            print ("VECT_MATH")
-            node = node_tree.nodes.new(node_type)
-            node.operation = node_data['operation'].value
-            node.inputs[0].default_value = vector(node_data['vector1'].value)
-            node.inputs[1].default_value = vector(node_data['vector2'].value)
-            
-            #MISCELLANEOUS NODE TYPES
-        elif node_type == "FRAME":
-            #Don't attempt to add frame nodes in builds previous
-            #to rev51926, as Blender's nodes.new() operator was
-            #unable to add FRAME nodes. Was fixed with rev51926.
-            if int(bpy.app.build_revision.decode()) > 51925:
-                print("FRAME")
-                node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "REROUTE":
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.64:
-                node_message = ['ERROR', """The material file contains the node \"%s\".
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly.""" % node_type]
-                return
-            print ("REROUTE")
-            node = node_tree.nodes.new(node_type)
-        
-        elif node_type == "SCRIPT":
-            if bpy.app.version[0] + (bpy.app.version[1] / 100.0) < 2.65:
-                node_message = ['ERROR', """The material file contains an OSL script node.
-This node is not available in the Blender version you are currently using.
-You may need a newer version of Blender for this material to work properly."""]
-                return
-            print ("SCRIPT")
-            node = node_tree.nodes.new(node_type)
-            node.mode = node_data['mode'].value
-            if node_data['mode'] == 'EXTERNAL':
-                if 'script' in node_data:
-                    if "file://" in node_data['script'].value:
-                        node.filepath = node_data['script'].value[7:]
-                    elif "http://" in node_data['script'].value and bpy.context.scene.mat_lib_osl_only_trusted == False:
-                        ext = "." + node_data['script'].value.split(".")[-1]
-                        script_name = node_data['script'].value.split("/")[-1][:-4]
-                        osl_host = node_data['script'].value[7:].split("/")[0]
-                        script_location = node_data['script'].value[(7 + len(osl_host)):]
-                        
-                        if ext.lower() != ".osl" and ext.lower() != ".oso":
-                            node_message = ['ERROR', "The OSL script file referenced by this script node is not .osl or .oso; not downloading."]
-                            return
-                        
-                        connection = http.client.HTTPConnection(osl_host)
-                        connection.request("GET", script_location + script_name + ext)
-                        response = connection.getresponse().read()
-                        #Save OSL script
-                        osl_filepath = os.path.join(mat_lib_folder, "my-materials", script_name + ext)
-                        osl_file = open(osl_filepath, mode="w+b")
-                        osl_file.write(response)
-                        osl_file.close()
-                        node.filepath = osl_filepath
-                        
-                    else:
-                        ext = "." + node_data['script'].value.split(".")[-1]
-                        script_name = node_data['script'].value[:-4]
-                        
-                        if ext.lower() != ".osl" and ext.lower() != ".oso":
-                            node_message = ['ERROR', "The OSL script file referenced by this script node is not .osl or .oso; not downloading."]
-                            return
-                        
-                        if library == "composite" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)):
-                            osl_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                        elif library != "bundled" and os.path.exists(os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)):
-                            osl_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                        elif library == "bundled" and os.path.exists(os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)):
-                            osl_filepath = os.path.join(mat_lib_folder, "bundled", "cycles", "scripts", script_name + ext)
-                        elif working_mode == "online":
-                            connection = http.client.HTTPConnection(mat_lib_host)
-                            connection.request("GET", mat_lib_location + "cycles/scripts/" + script_name + ext)
-                            response = connection.getresponse().read()
-                            
-                            #Cache OSL script
-                            if library == "composite":
-                                osl_filepath = os.path.join(mat_lib_folder, mat_lib_host, "cycles", "scripts", script_name + ext)
-                                osl_file = open(osl_filepath, mode="w+b")
-                                osl_file.write(response)
-                                osl_file.close()
-                            else:
-                                osl_filepath = os.path.join(mat_lib_folder, mat_lib_host, library, "cycles", "scripts", script_name + ext)
-                                osl_file = open(osl_filepath, mode="w+b")
-                                osl_file.write(response)
-                                osl_file.close()
-                        else:
-                            node_message = ['ERROR', "The OSL script, \"%s\", is not cached; cannot download in offline mode." % (script_name + ext)]
-                            osl_filepath = ""
-                        node.filepath = osl_filepath
-            else:
-                if 'script' in node_data:
-                    node.script = osl_scripts[int(node_data['script'].value)]
-            
-        else:
-            node_message = ['ERROR', """The material file contains the node name \"%s\", which is not known.
-The material file may contain an error, or you may need to check for updates to this add-on.""" % node_type]
-            return
-        node.location = node_location
-        
-        #Give the node a custom label
-        if 'label' in node_data:
-            node.label = node_data['label'].value
-        
-        #Give the node a custom color
-        if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63:
-            if 'custom_color' in node_data:
-                node.use_custom_color = True
-                node.color = color(node_data['custom_color'].value)
-        
-        #Collapse node if needed
-        if 'hide' in node_data:
-            node.hide = boolean(node_data['hide'].value)
-
-def boolean(string):
-    if string == "True":
-        boolean = True
-    elif string == "False":
-        boolean = False
-    elif string == "true":
-        boolean = True
-    elif string == "false":
-        boolean = False
-    else:
-        print('Error converting string to a boolean')
-        return
-    return boolean
-
-def color(string):
-    if "rgba" in string:
-        colors = string[5:-1].replace(" ", "").split(",")
-        r = float(colors[0])
-        g = float(colors[1])
-        b = float(colors[2])
-        a = float(colors[3])
-        color = [r,g,b,a]
-    elif "rgb" in string:
-        colors = string[4:-1].replace(" ", "").split(",")
-        r = float(colors[0])
-        g = float(colors[1])
-        b = float(colors[2])
-        color = [r,g,b]
-    else:
-        print('Error converting string to a color')
-        return
-    return color
-
-def vector(string):
-    import mathutils
-    if "Vector" in string:
-        vectors = string[7:-1].replace(" ", "").split(",")
-        x = float(vectors[0])
-        y = float(vectors[1])
-        z = float(vectors[2])
-        vector = mathutils.Vector((x, y, z))
-    else:
-        print('Error converting string to a vector')
-        return
-    return vector
-
-class MaterialConvert(bpy.types.Operator):
-    '''Convert material(s) to the .bcm format'''
-    bl_idname = "material.libraryconvert"
-    bl_label = "Convert Cycles Material to .bcm"
-    save_location = bpy.props.StringProperty()
-    all_materials = bpy.props.BoolProperty()
-
-    def execute(self, context):
-        global material_file_contents
-        global script_stack
-        
-        if self.all_materials:
-            #For all_materials, access the materials with an index
-            mat = 0
-            loop_length = len(bpy.data.materials)
-        else:
-            if not context.active_object:
-                if not context.active_object.get("active_material"):
-                    self.save_location = ""
-                    self.all_materials = False
-                    self.report({'ERROR'}, "No material selected!")
-                    return {'CANCELLED'}
-                self.save_location = ""
-                self.all_materials = False
-                self.report({'ERROR'}, "No object selected!")
-                return {'CANCELLED'}
-            #For single materials, access the materials with a name
-            mat = context.active_object.active_material.name
-            loop_length = 1
-        
-        if self.save_location is "":
-            if context.scene.mat_lib_bcm_write is not "":
-                txt = context.scene.mat_lib_bcm_write
-            else:
-                txt = "bcm_file"
-            
-            if txt not in bpy.data.texts:
-                bpy.data.texts.new(txt)
-        
-        j = 0
-        while j < loop_length:
-            if self.save_location is not "":
-                if self.all_materials:
-                    filename = bpy.data.materials[mat].name.replace("(", "")
-                else:
-                    filename = mat.replace("(", "")
-                filename = filename.replace(")", "")
-                filename = filename.replace("!", "")
-                filename = filename.replace("@", "")
-                filename = filename.replace("#", "")
-                filename = filename.replace("$", "")
-                filename = filename.replace("%", "")
-                filename = filename.replace("&", "")
-                filename = filename.replace("*", "")
-                filename = filename.replace("/", "")
-                filename = filename.replace("|", "")
-                filename = filename.replace("\\", "")
-                filename = filename.replace("'", "")
-                filename = filename.replace("\"", "")
-                filename = filename.replace("?", "")
-                filename = filename.replace(";", "")
-                filename = filename.replace(":", "")
-                filename = filename.replace("[", "")
-                filename = filename.replace("]", "")
-                filename = filename.replace("{", "")
-                filename = filename.replace("}", "")
-                filename = filename.replace("`", "")
-                filename = filename.replace("~", "")
-                filename = filename.replace("+", "")
-                filename = filename.replace("=", "")
-                filename = filename.replace(".", "")
-                filename = filename.replace(",", "")
-                filename = filename.replace("<", "")
-                filename = filename.replace(">", "")
-                filename = filename.replace(" ", "_")
-                filename = filename.replace("-", "_")
-                filename = filename.lower()
-        
-            material_file_contents = ""
-            write('<?xml version="1.0" encoding="UTF-8"?>')
-            
-            red = smallFloat(bpy.data.materials[mat].diffuse_color.r)
-            green = smallFloat(bpy.data.materials[mat].diffuse_color.g)
-            blue = smallFloat(bpy.data.materials[mat].diffuse_color.b)
-            write("\n<material view_color=\"%s\"" % ("rgb(" + red + ", " + green + ", " + blue + ")"))
-            
-            write(" sample_lamp=\"" + str(bpy.data.materials[mat].cycles.sample_as_light) + "\">")
-            write("\n\t<nodes>")
-            
-            group_warning = False
-            frame_warning = False
-            for node in bpy.data.materials[mat].node_tree.nodes:
-                if "NodeGroup" in str(node.items):
-                    node_type = "GROUP"
-                    group_warning = True
-                    
-                elif node.type == 'FRAME' and int(bpy.app.build_revision.decode()) < 51926:
-                    #Don't attempt to write frame nodes in builds previous
-                    #to rev51926, as Blender's nodes.new() operator was
-                    #unable to add FRAME nodes. Was fixed with rev51926.
-                    frame_warning = True
-                    print("Skipping frame node; this Blender version will not support adding it back."\
-                        "\nFrame nodes are not supported on builds prior to rev51926.")
-                else:
-                    node_type = node.type
-                    #Write node opening bracket
-                    write("\n\t\t<node ")
-                    
-                    #Write node type
-                    write("type=\"%s\"" % node_type)
-                
-                    #Write node custom color
-                    if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63:
-                        if node.use_custom_color:
-                            r = smallFloat(node.color.r)
-                            g = smallFloat(node.color.g)
-                            b = smallFloat(node.color.b)
-                            write(" custom_color=\"%s\"" % ("rgb(" + r + ", " + g + ", " + b + ")"))
-                    
-                    #Write node label
-                    if node.label:
-                        write(" label=\"%s\"" % node.label)
-                    
-                    #Write node hidden-ness
-                    if node.hide:
-                        write(" hide=\"True\"")
-                        
-                    #Write node data
-                    writeNodeData(node)
-                    
-                    #Write node closing bracket
-                    write(" />")
-            
-            write("\n\t</nodes>")
-            
-            write("\n\t<links>")
-            writeNodeLinks(bpy.data.materials[mat].node_tree)
-            write("\n\t</links>")
-            if script_stack:
-                write("\n\t<scripts>")
-                i = 0
-                while i < len(script_stack):
-                    write("\n\t\t<script name=\"%s\" id=\"%s\">\n" % (script_stack[i], str(i)))
-                    first_line = True
-                    for l in bpy.data.texts[script_stack[i]].lines:
-                        if first_line == True:
-                            write(l.body)
-                            first_line = False
-                        else:
-                            write("<br />" + l.body)
-                    write("\n\t\t</script>")
-                    i += 1
-                write("\n\t</scripts>")
-                script_stack = []
-            write("\n</material>")
-            
-            if self.save_location == "":
-                if group_warning:
-                    self.report({'ERROR'}, "Material \"" + mat + "\" contains a group node (not supported). Please un-group the nodes and try again.")
-                else:
-                    bpy.data.texts[txt].clear()
-                    bpy.data.texts[txt].write(material_file_contents)
-                    if not self.all_materials:
-                        if frame_warning:
-                            self.report({'WARNING'}, "Material \"" + mat + "\" contains a frame node, which was skipped; see console for details.")
-                        else:
-                            self.report({'INFO'}, "Material \"" + mat + "\" written to Text \"" + txt + "\" as .bcm")
-            else:
-                if group_warning:
-                    self.report({'ERROR'}, "Material \"" + mat + "\" contains a group node (not supported). Please un-group the nodes and try again.")
-                else:
-                    print(context.scene.mat_lib_bcm_save_location + filename + ".bcm")
-                    bcm_file = open(context.scene.mat_lib_bcm_save_location + filename + ".bcm", mode="w", encoding="UTF-8")
-                    bcm_file.write(material_file_contents)
-                    bcm_file.close()
-                    if not self.all_materials:
-                        if frame_warning:
-                            self.report({'WARNING'}, "Material \"" + mat + "\" contains a frame node which was skipped; see console for details.")
-                            self.report({'WARNING'}, "Material \"" + mat + "\" contains a frame node which was skipped; see console for details.")
-                        else:
-                            self.report({'INFO'}, "Material \"" + mat + "\" saved to \"" + filename + ".bcm\"")
-            j += 1
-            if self.all_materials:
-                mat += 1
-        if self.all_materials and not group_warning and not frame_warning:
-            self.report({'INFO'}, "All materials successfully saved!")
-        
-        self.save_location = ""
-        self.all_materials = False
-        return {'FINISHED'}
-
-def writeNodeData(node):
-    global material_file_contents
-    global script_stack
-    
-    I = node.inputs
-    O = node.outputs
-    
-    if "NodeGroup" in str(node.items):
-        node_type = "GROUP"
-    else:
-        node_type = node.type
-        
-    if node_type == "GROUP":
-        print("GROUP NODE!")
-        write("ERROR: GROUP NODES NOT YET SUPPORTED.")
-        
-        #INPUT TYPES
-    elif node_type == "ATTRIBUTE":
-        print("ATTRIBUTE")
-        write(" attribute=\"%s\"" % node.attribute_name)
-    
-    elif node_type == "CAMERA":
-        print("CAMERA")
-        
-    elif node_type == "FRESNEL":
-        print("FRESNEL")
-        write(" ior=\"%s\"" % smallFloat(I['IOR'].default_value))
-    
-    elif node_type == "LAYER_WEIGHT":
-        print("LAYER_WEIGHT")
-        write(" blend=\"%s\"" % smallFloat(I['Blend'].default_value))
-    
-    elif node_type == "LIGHT_PATH":
-        print("LIGHT_PATH")
-    
-    elif node_type == "NEW_GEOMETRY":
-        print("NEW_GEOMETRY")
-    
-    elif node_type == "OBJECT_INFO":
-        print("OBJECT_INFO")
-    
-    elif node_type == "PARTICLE_INFO":
-        print("PARTICLE_INFO")
-    
-    elif node_type == "RGB":
-        print("RGB")
-        write(" color=\"%s\"" % rgba(O['Color'].default_value))
-    
-    elif node_type == "TANGENT":
-        print("TANGENT")
-        write(" direction=\"%s\"" % node.direction_type)
-        write(" axis=\"%s\"" % node.axis)
-    
-    elif node_type == "TEX_COORD":
-        print("TEX_COORD")
-        if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.64:
-            write(" dupli=\"%s\"" % node.from_dupli)
-        else:
-            write(" dupli=\"False\"")
-    
-    elif node_type == "VALUE":
-        print("VALUE")
-        write(" value=\"%s\"" % smallFloat(O['Value'].default_value))
-        
-        #OUTPUT TYPES
-    elif node_type == "OUTPUT_LAMP":
-        print("OUTPUT_LAMP")
-    
-    elif node_type == "OUTPUT_MATERIAL":
-        print("OUTPUT_MATERIAL")
-    
-    elif node_type == "OUTPUT_WORLD":
-        print("OUTPUT_WORLD")
-    
-        #SHADER TYPES
-    elif node_type == "ADD_SHADER":
-        print("ADD_SHADER")
-    
-    elif node_type == "AMBIENT_OCCLUSION":
-        print("AMBIENT_OCCLUSION")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-    
-    elif node_type == "BACKGROUND":
-        print("BACKGROUND")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" strength=\"%s\"" % smallFloat(I['Strength'].default_value))
-    
-    elif node_type == "BSDF_ANISOTROPIC":
-        print("BSDF_ANISOTROPIC")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" roughness=\"%s\"" % smallFloat(I['Roughness'].default_value))
-        write(" anisotropy=\"%s\"" % smallFloat(I['Anisotropy'].default_value))
-        write(" rotation=\"%s\"" % smallFloat(I['Rotation'].default_value))
-    
-    elif node_type == "BSDF_DIFFUSE":
-        print("BSDF_DIFFUSE")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" roughness=\"%s\"" % smallFloat(I['Roughness'].default_value))
-    
-    elif node_type == "BSDF_GLASS":
-        print("BSDF_GLASS")
-        write(" distribution=\"%s\"" % node.distribution)
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" roughness=\"%s\"" % smallFloat(I['Roughness'].default_value))
-        write(" ior=\"%s\"" % smallFloat(I['IOR'].default_value))
-    
-    elif node_type == "BSDF_GLOSSY":
-        print("BSDF_GLOSSY")
-        write(" distribution=\"%s\"" % node.distribution)
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" roughness=\"%s\"" % smallFloat(I['Roughness'].default_value))
-    
-    elif node_type == "BSDF_REFRACTION":
-        print("BSDF_REFRACTION")
-        write(" distribution=\"%s\"" % node.distribution)
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" roughness=\"%s\"" % smallFloat(I['Roughness'].default_value))
-        write(" ior=\"%s\"" % smallFloat(I['IOR'].default_value))
-    
-    elif node_type == "BSDF_TRANSLUCENT":
-        print("BSDF_TRANSLUCENT")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-    
-    elif node_type == "BSDF_TRANSPARENT":
-        print("BSDF_TRANSPARENT")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-    
-    elif node_type == "BSDF_VELVET":
-        print("BSDF_VELVET")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" sigma=\"%s\"" % smallFloat(I['Sigma'].default_value))
-    
-    elif node_type == "EMISSION":
-        print("EMISSION")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" strength=\"%s\"" % smallFloat(I['Strength'].default_value))
-    
-    elif node_type == "HOLDOUT":
-        print("HOLDOUT")
-    
-    elif node_type == "MIX_SHADER":
-        print("MIX_SHADER")
-        write(" fac=\"%s\"" % smallFloat(I['Fac'].default_value))
-        
-        #TEXTURE TYPES
-    elif node_type == "TEX_BRICK":
-        print ("TEX_BRICK")
-        write(" offset=\"%s\"" % smallFloat(node.offset))
-        write(" offset_freq=\"%s\"" % str(node.offset_frequency))
-        write(" squash=\"%s\"" % smallFloat(node.squash))
-        write(" squash_freq=\"%s\"" % str(node.squash_frequency))
-        write(" color1=\"%s\"" % rgba(I['Color1'].default_value))
-        write(" color2=\"%s\"" % rgba(I['Color2'].default_value))
-        write(" mortar=\"%s\"" % rgba(I['Mortar'].default_value))
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-        write(" mortar_size=\"%s\"" % smallFloat(I['Mortar Size'].default_value))
-        write(" bias=\"%s\"" % smallFloat(I['Bias'].default_value))
-        write(" width=\"%s\"" % smallFloat(I['Brick Width'].default_value))
-        write(" height=\"%s\"" % smallFloat(I['Row Height'].default_value))
-            
-    elif node_type == "TEX_CHECKER":
-        print("TEX_CHECKER")
-        write(" color1=\"%s\"" % rgba(I['Color1'].default_value))
-        write(" color2=\"%s\"" % rgba(I['Color2'].default_value))
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-    
-    elif node_type == "TEX_ENVIRONMENT":
-        print("TEX_ENVIRONMENT")
-        if node.image:
-            write(" image=\"file://%s\"" % os.path.realpath(bpy.path.abspath(node.image.filepath)))
-            write(" source=\"%s\"" % node.image.source)
-            if node.image.source == "SEQUENCE" or node.image.source == "MOVIE":
-                write(" frame_duration=\"%s\"" % str(node.image_user.frame_duration))
-                write(" frame_start=\"%s\"" % str(node.image_user.frame_start))
-                write(" frame_offset=\"%s\"" % str(node.image_user.frame_offset))
-                write(" cyclic=\"%s\"" % str(node.image_user.use_cyclic))
-                write(" auto_refresh=\"%s\"" % str(node.image_user.use_auto_refresh))
-        else:
-            write(" image=\"\"")
-        write(" color_space=\"%s\"" % node.color_space)
-        write(" projection=\"%s\"" % node.projection)
-    
-    elif node_type == "TEX_GRADIENT":
-        print("TEX_GRADIENT")
-        write(" gradient=\"%s\"" % node.gradient_type)
-    
-    elif node_type == "TEX_IMAGE":
-        print("TEX_IMAGE")
-        if node.image:
-            write(" image=\"file://%s\"" % os.path.realpath(bpy.path.abspath(node.image.filepath)))
-            write(" source=\"%s\"" % node.image.source)
-            if node.image.source == "SEQUENCE" or node.image.source == "MOVIE":
-                write(" frame_duration=\"%s\"" % str(node.image_user.frame_duration))
-                write(" frame_start=\"%s\"" % str(node.image_user.frame_start))
-                write(" frame_offset=\"%s\"" % str(node.image_user.frame_offset))
-                write(" cyclic=\"%s\"" % str(node.image_user.use_cyclic))
-                write(" auto_refresh=\"%s\"" % str(node.image_user.use_auto_refresh))
-        else:
-            write(" image=\"\"")
-        write(" color_space=\"%s\"" % node.color_space)
-        if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63:
-            write(" projection=\"%s\"" % node.projection)
-            if node.projection == "BOX":
-                write(" blend=\"%s\"" % smallFloat(node.projection_blend))
-        else:
-            write(" projection=\"FLAT\"")
-    
-    elif node_type == "TEX_MAGIC":
-        print("TEX_MAGIC")
-        write(" depth=\"%s\"" % str(node.turbulence_depth))
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-        write(" distortion=\"%s\"" % smallFloat(I['Distortion'].default_value))
-    
-    elif node_type == "TEX_MUSGRAVE":
-        print("TEX_MUSGRAVE")
-        write(" musgrave=\"%s\"" % node.musgrave_type)
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-        write(" detail=\"%s\"" % smallFloat(I['Detail'].default_value))
-        write(" dimension=\"%s\"" % smallFloat(I['Dimension'].default_value))
-        write(" lacunarity=\"%s\"" % smallFloat(I['Lacunarity'].default_value))
-        write(" offset=\"%s\"" % smallFloat(I['Offset'].default_value))
-        write(" gain=\"%s\"" % smallFloat(I['Gain'].default_value))
-    
-    elif node_type == "TEX_NOISE":
-        print("TEX_NOISE")
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-        write(" detail=\"%s\"" % smallFloat(I['Detail'].default_value))
-        write(" distortion=\"%s\"" % smallFloat(I['Distortion'].default_value))
-    
-    elif node_type == "TEX_SKY":
-        print("TEX_SKY")
-        write(" sun_direction=\"%s\"" % smallVector(node.sun_direction))
-        write(" turbidity=\"%s\"" % smallFloat(node.turbidity))
-    
-    elif node_type == "TEX_VORONOI":
-        print("TEX_VORONOI")
-        write(" coloring=\"%s\"" % node.coloring)
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-    
-    elif node_type == "TEX_WAVE":
-        print("TEX_WAVE")
-        write(" wave=\"%s\"" % node.wave_type)
-        write(" scale=\"%s\"" % smallFloat(I['Scale'].default_value))
-        write(" distortion=\"%s\"" % smallFloat(I['Distortion'].default_value))
-        write(" detail=\"%s\"" % smallFloat(I['Detail'].default_value))
-        write(" detail_scale=\"%s\"" % smallFloat(I['Detail Scale'].default_value))
-    
-        #COLOR TYPES
-    elif node_type == "BRIGHTCONTRAST":
-        print("BRIGHTCONTRAST")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" bright=\"%s\"" % smallFloat(I['Bright'].default_value))
-        write(" contrast=\"%s\"" % smallFloat(I['Contrast'].default_value))
-    
-    elif node_type == "GAMMA":
-        print("GAMMA")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        write(" gamma=\"%s\"" % smallFloat(I['Gamma'].default_value))
-    
-    elif node_type == "HUE_SAT":
-        print("HUE_SAT")
-        write(" hue=\"%s\"" % smallFloat(I['Hue'].default_value))
-        write(" saturation=\"%s\"" % smallFloat(I['Saturation'].default_value))
-        write(" value=\"%s\"" % smallFloat(I['Value'].default_value))
-        write(" fac=\"%s\"" % smallFloat(I['Fac'].default_value))
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-    
-    elif node_type == "LIGHT_FALLOFF":
-        print("LIGHT_FALLOFF")
-        write(" strength=\"%s\"" % smallFloat(I['Strength'].default_value))
-        write(" smooth=\"%s\"" % smallFloat(I['Smooth'].default_value))
-    
-    elif node_type == "MIX_RGB":
-        print("MIX_RGB")
-        write(" blend_type=\"%s\"" % node.blend_type)
-        if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63:
-            write(" use_clamp=\"%s\"" % str(node.use_clamp))
-        write(" fac=\"%s\"" % smallFloat(I['Fac'].default_value))
-        write(" color1=\"%s\"" % rgba(I[1].default_value))
-        write(" color2=\"%s\"" % rgba(I[2].default_value))
-    
-    elif node_type == "INVERT":
-        print("INVERT")
-        write(" fac=\"%s\"" % smallFloat(I['Fac'].default_value))
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        
-        #VECTOR TYPES
-    elif node_type == "BUMP":
-        print("BUMP")
-        write(" strength=\"%s\"" % smallFloat(I['Strength'].default_value))
-        
-    elif node_type == "MAPPING":
-        print("MAPPING")
-        write(" translation=\"%s\"" % smallVector(node.translation))
-        write(" rotation=\"%s\"" % smallVector(node.rotation))
-        write(" scale=\"%s\"" % smallVector(node.scale))
-        
-        write(" use_min=\"%s\"" % str(node.use_min))
-        if node.use_min:
-            write(" min=\"%s\"" % smallVector(node.min))
-        
-        write(" use_max=\"%s\"" % str(node.use_max))
-        if node.use_max:
-            write(" max=\"%s\"" % smallVector(node.max))
-        
-        vec = I[0].default_value
-        write(" vector=\"%s\"" % smallVector(I['Vector'].default_value))
-    
-    elif node_type == "NORMAL":
-        print("NORMAL")
-        write(" vector_output=\"%s\"" % smallVector(O['Normal'].default_value))
-        write(" vector_input=\"%s\"" % smallVector(I['Normal'].default_value))
-        
-    elif node_type == "NORMAL_MAP":
-        print("NORMAL_MAP")
-        write(" space=\"%s\"" % node.space)
-        write(" uv_map=\"%s\"" % node.uv_map)
-        write(" strength=\"%s\"" % smallFloat(I['Strength'].default_value))
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-        
-        #CONVERTER TYPES
-    elif node_type == "COMBRGB":
-        print("COMBRGB")
-        write(" red=\"%s\"" % smallFloat(I['R'].default_value))
-        write(" green=\"%s\"" % smallFloat(I['G'].default_value))
-        write(" blue=\"%s\"" % smallFloat(I['B'].default_value))
-    
-    elif node_type == "MATH":
-        print("MATH")
-        write(" operation=\"%s\"" % node.operation)
-        if bpy.app.version[0] + (bpy.app.version[1] / 100.0) > 2.63:
-            write(" use_clamp=\"%s\"" % str(node.use_clamp))
-        write(" value1=\"%s\"" % smallFloat(I[0].default_value))
-        write(" value2=\"%s\"" % smallFloat(I[1].default_value))
-        
-    elif node_type == "RGBTOBW":
-        print ("RGBTOBW")
-        write(" color=\"%s\"" % rgba(I['Color'].default_value))
-    
-    elif node_type == "SEPRGB":
-        print("SEPRGB")
-        write(" image=\"%s\"" % rgba(I['Image'].default_value))
-    
-    elif node_type == "VALTORGB":
-        print("VALTORGB")
-        write(" interpolation=\"%s\"" % str(node.color_ramp.interpolation))
-        write(" fac=\"%s\"" % smallFloat(I['Fac'].default_value))
-        write(" stops=\"%s\"" % str(len(node.color_ramp.elements)))
-        
-        k = 1
-        while k <= len(node.color_ramp.elements):
-            write(" stop%s=\"%s\"" % 
-            (str(k), 
-             (smallFloat(node.color_ramp.elements[k-1].position) +
-             "|" + 
-             rgba(node.color_ramp.elements[k-1].color))
-            ))
-            k += 1
-    
-    elif node_type == "VECT_MATH":
-        print("VECT_MATH")
-        write(" operation=\"%s\"" % node.operation)
-        write(" vector1=\"%s\"" % smallVector(I[0].default_value))
-        write(" vector2=\"%s\"" % smallVector(I[1].default_value))
-        
-        #MISCELLANEOUS NODE TYPES
-    elif node_type == "FRAME":
-        print("FRAME")
-    
-    elif node_type == "REROUTE":
-        print("REROUTE")
-    
-    elif node_type == "SCRIPT":
-        print("SCRIPT")
-        write(" mode=\"%s\"" % node.mode)
-        if node.mode == 'EXTERNAL':
-            if node.filepath:
-                write(" script=\"file://%s\"" % os.path.realpath(bpy.path.abspath(node.filepath)))
-        else:
-            if node.script:
-                write(" script=\"%s\"" % len(script_stack))
-                script_stack.append(node.script.name)
-        
-    else:
-        write(" ERROR: UNKNOWN NODE TYPE. ")
-        return
-    writeLocation(node)
-    
-def rgba(color):
-    red = smallFloat(color[0])
-    green = smallFloat(color[1])
-    blue = smallFloat(color[2])
-    alpha = smallFloat(color[3])
-    return ("rgba(" + red + ", " + green + ", " + blue + ", " + alpha + ")")
-
-def smallFloat(float):
-    if len(str(float)) < (6 + str(float).index(".")):
-        return str(float)
-    else:
-        return str(float)[:(6 + str(float).index("."))]
-
-def smallVector(vector):
-    return "Vector(" + smallFloat(vector[0]) + ", " + smallFloat(vector[1]) + ", " + smallFloat(vector[2]) + ")"
-
-def write (string):
-    global material_file_contents
-    material_file_contents += string
-
-def writeLocation(node):
-    global material_file_contents
-    #X location
-    x = str(int(node.location.x))
-    #Y location
-    y = str(int(node.location.y))
-    
-    material_file_contents += (" loc=\"" + x + ", " + y + "\"")
-    
-def writeNodeLinks(node_tree):
-    global material_file_contents
-    
-    #Loop through the links
-    i = 0
-    while i < len(node_tree.links):
-        material_file_contents += ("\n\t\t<link ")
-        
-        to_node_name = node_tree.links[i].to_node.name
-        #Loop through nodes to check name
-        e = 0
-        while e < len(node_tree.nodes):
-            #Write the index if name matches
-            if to_node_name == node_tree.nodes[e].name:
-                material_file_contents += "to=\"%d\"" % e
-                #Set input socket's name
-                to_socket = node_tree.links[i].to_socket.path_from_id()
-                material_file_contents += (" input=\"%s\"" % to_socket[(to_socket.index("inputs[") + 7):-1])
-                e = len(node_tree.nodes)
-            e = e + 1
-            
-        
-        from_node_name = node_tree.links[i].from_node.name
-        #Loop through nodes to check name
-        e = 0
-        while e < len(node_tree.nodes):
-            #Write the index if name matches
-            if from_node_name == node_tree.nodes[e].name:
-                material_file_contents += " from=\"%d\"" % e
-                #Set input socket's name
-                from_socket = node_tree.links[i].from_socket.path_from_id()
-                material_file_contents += (" output=\"%s\"" % from_socket[(from_socket.index("outputs[") + 8):-1])
-                e = len(node_tree.nodes)
-            e = e + 1
-        material_file_contents += (" />")
-        i = i + 1
-
-
-def register():
-    bpy.utils.register_class(OnlineMaterialLibraryPanel)
-    bpy.utils.register_class(LibraryConnect)
-    bpy.utils.register_class(LibraryInfo)
-    bpy.utils.register_class(LibrarySettings)
-    bpy.utils.register_class(LibraryTools)
-    bpy.utils.register_class(LibraryHome)
-    bpy.utils.register_class(ViewMaterial)
-    bpy.utils.register_class(MaterialDetailView)
-    bpy.utils.register_class(LibraryClearCache)
-    bpy.utils.register_class(LibraryPreview)
-    bpy.utils.register_class(AddLibraryMaterial)
-    bpy.utils.register_class(ApplyLibraryMaterial)
-    bpy.utils.register_class(CacheLibraryMaterial)
-    bpy.utils.register_class(SaveLibraryMaterial)
-    bpy.utils.register_class(MaterialConvert)
-
-
-def unregister():
-    bpy.utils.unregister_class(OnlineMaterialLibraryPanel)
-    bpy.utils.unregister_class(LibraryConnect)
-    bpy.utils.unregister_class(LibraryInfo)
-    bpy.utils.unregister_class(LibrarySettings)
-    bpy.utils.unregister_class(LibraryTools)
-    bpy.utils.unregister_class(LibraryHome)
-    bpy.utils.unregister_class(ViewMaterial)
-    bpy.utils.unregister_class(MaterialDetailView)
-    bpy.utils.unregister_class(LibraryClearCache)
-    bpy.utils.unregister_class(LibraryPreview)
-    bpy.utils.unregister_class(AddLibraryMaterial)
-    bpy.utils.unregister_class(ApplyLibraryMaterial)
-    bpy.utils.unregister_class(CacheLibraryMaterial)
-    bpy.utils.unregister_class(SaveLibraryMaterial)
-    bpy.utils.unregister_class(MaterialConvert)
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.bcm
deleted file mode 100644
index 82a1a61..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.bcm
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.04252, 0.04410, 0.45153)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="750, 250" />
-		<node type="MIX_SHADER" fac="0.10000" loc="500, 250" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 0.0)" roughness="0.58398" loc="170, 250" />
-		<node type="LAYER_WEIGHT" blend="0.69998" loc="-20, 350" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.15000" color1="rgba(1.0, 1.0, 1.0, 0.0)" color2="rgba(1.0, 1.0, 1.0, 0.0)" loc="20, 140" />
-		<node type="RGB" color="rgba(0.0, 0.0, 0.46700, 0.0)" loc="-336, 352" />
-		<node type="RGB" color="rgba(0.80000, 0.80000, 0.80000, 0.0)" loc="-344, 150" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="1.70000" loc="303, 381" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 0.0)" roughness="0.00999" loc="195, 111" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="1" input="2" from="8" output="0" />
-		<link to="1" input="0" from="7" output="0" />
-		<link to="7" input="0" from="3" output="0" />
-		<link to="8" input="0" from="4" output="0" />
-		<link to="4" input="1" from="5" output="0" />
-		<link to="4" input="2" from="6" output="0" />
-		<link to="2" input="0" from="5" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.jpg
deleted file mode 100644
index 851a0c5..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/basic_blue.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.bcm
deleted file mode 100644
index 5c13bd8..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.bcm
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(1.0, 0.37373, 0.16895)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="1000, 250" />
-		<node type="MIX_SHADER" fac="0.05000" loc="750, 300" />
-		<node type="MIX_SHADER" fac="0.5" loc="500, 340" />
-		<node type="MATH" operation="LESS_THAN" use_clamp="False" value1="0.5" value2="0.25" loc="250, 500" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="10000.0" loc="0, 500" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="1.0" loc="250, 350" />
-		<node type="BRIGHTCONTRAST" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" bright="-0.89999" contrast="0.0" loc="-250, 350" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.15000" color1="rgba(0.80000, 0.80000, 0.80000, 1.0)" color2="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="0, 100" />
-		<node type="RGB" color="rgba(1.0, 0.13917, 0.0, 0.0)" loc="-464, -12" />
-		<node type="RGB" color="rgba(0.95332, 0.38194, 0.17285, 1.0)" loc="-469, 202" />
-		<node type="BSDF_GLOSSY" distribution="SHARP" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="493, 103" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.15000" loc="227, 106" />
-		<node type="BRIGHTCONTRAST" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" bright="-0.89999" contrast="0.0" loc="-220, -50" />
-		<node type="LAYER_WEIGHT" blend="0.89999" loc="-250, 149" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.15000" color1="rgba(0.80000, 0.80000, 0.80000, 1.0)" color2="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="39, 323" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="2" input="0" from="3" output="0" />
-		<link to="3" input="0" from="4" output="1" />
-		<link to="2" input="1" from="5" output="0" />
-		<link to="5" input="0" from="14" output="0" />
-		<link to="14" input="0" from="13" output="1" />
-		<link to="14" input="1" from="9" output="0" />
-		<link to="14" input="2" from="6" output="0" />
-		<link to="6" input="0" from="9" output="0" />
-		<link to="2" input="2" from="11" output="0" />
-		<link to="11" input="0" from="7" output="0" />
-		<link to="7" input="0" from="13" output="1" />
-		<link to="7" input="1" from="8" output="0" />
-		<link to="7" input="2" from="12" output="0" />
-		<link to="12" input="0" from="8" output="0" />
-		<link to="1" input="2" from="10" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.jpg
deleted file mode 100644
index 9f01f19..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_coral.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.bcm
deleted file mode 100644
index 8ae311c..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.bcm
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.48630, 0.39677, 0.10075)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="759, 69" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.00999" loc="300, 12" />
-		<node type="MIX_SHADER" fac="0.02500" loc="504, 130" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.09999" loc="95, 13" />
-		<node type="MIX_SHADER" fac="0.05000" loc="300, 131" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.19999" loc="-115, 70" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.39999" loc="-209, -61" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-345, 69" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="0.0" contrast="0.0" loc="-523, -58" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="-0.39999" contrast="0.0" loc="-526, 71" />
-		<node type="FRESNEL" ior="8.0" loc="-884, 228" />
-		<node type="RGB" color="rgba(0.5, 0.15069, 0.0, 1.0)" loc="-785, 95" />
-		<node type="RGB" color="rgba(0.5, 0.43265, 0.09540, 1.0)" loc="-785, -95" />
-		<node type="MIX_SHADER" fac="0.09999" loc="89, 188" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="1.0" value2="0.5" loc="-509, 236" />
-		<node type="LAYER_WEIGHT" blend="0.80000" loc="-704, 229" />
-	</nodes>
-	<links>
-		<link to="7" input="1" from="9" output="0" />
-		<link to="7" input="2" from="8" output="0" />
-		<link to="15" input="0" from="10" output="0" />
-		<link to="7" input="0" from="14" output="0" />
-		<link to="14" input="1" from="15" output="1" />
-		<link to="6" input="0" from="7" output="0" />
-		<link to="0" input="0" from="2" output="0" />
-		<link to="9" input="0" from="11" output="0" />
-		<link to="8" input="0" from="12" output="0" />
-		<link to="2" input="2" from="1" output="0" />
-		<link to="2" input="1" from="4" output="0" />
-		<link to="4" input="2" from="3" output="0" />
-		<link to="4" input="1" from="13" output="0" />
-		<link to="13" input="2" from="5" output="0" />
-		<link to="13" input="1" from="6" output="0" />
-		<link to="5" input="0" from="9" output="0" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.jpg
deleted file mode 100644
index c014eb3..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/dull_olive.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.bcm
deleted file mode 100644
index 985e11e..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.bcm
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.04379, 0.60201, 0.04091)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="250, 128" />
-		<node type="LAYER_WEIGHT" blend="0.15000" loc="-248, 328" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.00999" loc="-233, -65" />
-		<node type="MIX_SHADER" fac="0.02999" loc="43, 125" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="5.0" loc="-489, 280" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.39999" loc="-501, 175" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.29999" loc="-503, 40" />
-		<node type="MIX_SHADER" fac="0.5" loc="-314, 177" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="500.0" loc="-673, 291" />
-		<node type="BRIGHTCONTRAST" hide="True" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="-0.20000" contrast="0.0" loc="-668, 35" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="500.0" loc="-997, 303" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" color="rgba(0.10972, 0.5, 0.09735, 1.0)" loc="-1151, 127" />
-		<node type="HUE_SAT" label="Color Repeater" hue="0.5" saturation="1.0" value="1.0" fac="1.0" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="-877, 134" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="3" output="0" />
-		<link to="3" input="2" from="2" output="0" />
-		<link to="3" input="1" from="7" output="0" />
-		<link to="3" input="0" from="1" output="1" />
-		<link to="7" input="1" from="6" output="0" />
-		<link to="6" input="0" from="9" output="0" />
-		<link to="4" input="0" from="8" output="0" />
-		<link to="7" input="0" from="4" output="0" />
-		<link to="7" input="2" from="5" output="0" />
-		<link to="12" input="4" from="11" output="0" />
-		<link to="5" input="0" from="12" output="0" />
-		<link to="9" input="0" from="12" output="0" />
-		<link to="8" input="1" from="10" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.jpg
deleted file mode 100644
index 096753f..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_green.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.bcm
deleted file mode 100644
index 9580307..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.bcm
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.57112, 0.02518, 0.37123)" sample_lamp="True">
-	<nodes>
-		<node type="LAYER_WEIGHT" blend="0.32499" loc="170, 224" />
-		<node type="MIX_SHADER" fac="0.5" loc="172, 110" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.29998" loc="-250, -24" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.29998" loc="-248, 118" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="5.0" loc="-199, 237" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="500.0" loc="-380, 289" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="-0.20000" contrast="0.0" loc="-405, 111" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="-0.20000" contrast="0.0" loc="-409, -25" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.20000" loc="-697, -19" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="1.0" value2="0.5" loc="-832, -18" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.07500" loc="-832, 161" />
-		<node type="HOLDOUT" loc="-811, 220" />
-		<node type="FRESNEL" ior="1.95000" loc="-813, 302" />
-		<node type="MIX_SHADER" fac="0.5" loc="-617, 238" />
-		<node type="LAYER_WEIGHT" blend="0.89999" loc="-1001, -43" />
-		<node type="MIX_SHADER" fac="0.5" loc="-13, 76" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.00999" loc="153, -19" />
-		<node type="MIX_SHADER" fac="0.03999" loc="346, 113" />
-		<node type="OUTPUT_MATERIAL" loc="513, 107" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="1.0" value2="-0.19999" loc="-559, -18" />
-		<node type="RGB" color="rgba(0.86887, 0.22238, 0.61303, 1.0)" loc="-777, -164" />
-		<node type="RGB" color="rgba(0.5, 0.13597, 0.45640, 1.0)" loc="-592, -162" />
-	</nodes>
-	<links>
-		<link to="15" input="1" from="3" output="0" />
-		<link to="3" input="0" from="6" output="0" />
-		<link to="4" input="0" from="5" output="0" />
-		<link to="15" input="0" from="4" output="0" />
-		<link to="15" input="2" from="2" output="0" />
-		<link to="17" input="2" from="16" output="0" />
-		<link to="17" input="0" from="0" output="0" />
-		<link to="13" input="1" from="11" output="0" />
-		<link to="13" input="2" from="10" output="0" />
-		<link to="13" input="0" from="12" output="0" />
-		<link to="1" input="1" from="15" output="0" />
-		<link to="1" input="2" from="13" output="0" />
-		<link to="1" input="0" from="4" output="0" />
-		<link to="17" input="1" from="1" output="0" />
-		<link to="2" input="0" from="7" output="0" />
-		<link to="9" input="1" from="14" output="1" />
-		<link to="8" input="0" from="9" output="0" />
-		<link to="19" input="0" from="8" output="0" />
-		<link to="7" input="1" from="19" output="0" />
-		<link to="18" input="0" from="17" output="0" />
-		<link to="7" input="0" from="21" output="0" />
-		<link to="6" input="0" from="20" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.jpg
deleted file mode 100644
index 3842f8d..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_purple.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.bcm
deleted file mode 100644
index dd8ac29..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.bcm
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(1.0, 0.12743, 0.02028)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.03999" loc="403, 181" />
-		<node type="MIX_SHADER" fac="0.5" loc="235, 205" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.00999" loc="213, 75" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="5.0" loc="13, 318" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.29999" loc="12, 215" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.29999" loc="14, 82" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="500.0" loc="-172, 334" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-114, 177" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="-0.20000" contrast="0.0" loc="-329, 113" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="0.5" contrast="0.0" loc="-329, -14" />
-		<node type="OUTPUT_MATERIAL" loc="573, 175" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-111, 5" />
-		<node type="FRESNEL" ior="2.0" loc="-887, 225" />
-		<node type="RGB" color="rgba(1.0, 0.18256, 0.0, 1.0)" loc="-893, 103" />
-		<node type="RGB" color="rgba(0.5, 0.24046, 0.0, 1.0)" loc="-839, -105" />
-		<node type="RGB" color="rgba(0.75750, 0.50051, 0.0, 1.0)" loc="-655, -201" />
-		<node type="MATH" hide="True" operation="ADD" use_clamp="False" value1="0.10000" value2="0.5" loc="-501, -8" />
-		<node type="MATH" hide="True" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.20000" loc="-633, -7" />
-	</nodes>
-	<links>
-		<link to="1" input="1" from="4" output="0" />
-		<link to="7" input="1" from="8" output="0" />
-		<link to="0" input="1" from="1" output="0" />
-		<link to="3" input="0" from="6" output="0" />
-		<link to="1" input="0" from="3" output="0" />
-		<link to="1" input="2" from="5" output="0" />
-		<link to="10" input="0" from="0" output="0" />
-		<link to="0" input="2" from="2" output="0" />
-		<link to="4" input="0" from="7" output="0" />
-		<link to="5" input="0" from="11" output="0" />
-		<link to="11" input="2" from="9" output="0" />
-		<link to="11" input="1" from="8" output="0" />
-		<link to="16" input="1" from="17" output="0" />
-		<link to="5" input="1" from="16" output="0" />
-		<link to="7" input="0" from="12" output="0" />
-		<link to="11" input="0" from="12" output="0" />
-		<link to="17" input="0" from="12" output="0" />
-		<link to="7" input="2" from="15" output="0" />
-		<link to="9" input="0" from="14" output="0" />
-		<link to="8" input="0" from="13" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.jpg
deleted file mode 100644
index 0e42930..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/flaky_tangelo.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.bcm
deleted file mode 100644
index f62e838..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.bcm
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(1.0, 0.46594, 0.03595)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.5" loc="92, 119" />
-		<node type="MIX_SHADER" fac="0.5" loc="427, 123" />
-		<node type="MIX_SHADER" fac="0.5" loc="756, 116" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="65, 385" />
-		<node type="MATH" operation="DIVIDE" use_clamp="False" value1="0.5" value2="2.0" loc="246, 351" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="1000.0" loc="-732, 197" />
-		<node type="INVERT" fac="1.0" color="rgba(0.0, 0.0, 0.0, 1.0)" loc="-548, 149" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="7.0" loc="-426, 136" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.5" loc="-230, 141" />
-		<node type="FRESNEL" ior="1.20000" loc="-197, 436" />
-		<node type="LAYER_WEIGHT" blend="0.01999" loc="-194, 325" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.0" loc="91, -33" />
-		<node type="LAYER_WEIGHT" blend="0.5" loc="-447, 242" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.10000" loc="-433, -164" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.20000" loc="446, -70" />
-		<node type="FRESNEL" ior="1.10000" loc="465, 245" />
-		<node type="BSDF_DIFFUSE" color="rgba(1.0, 0.03999, 0.0, 1.0)" roughness="0.0" loc="-423, -11" />
-		<node type="RGB" custom_color="rgb(1.0, 0.80000, 0.5)" label="Gloss Color" color="rgba(1.0, 0.73231, 0.0, 1.0)" loc="-1138, 470" />
-		<node type="RGB" custom_color="rgb(1.0, 0.80000, 0.5)" label="Paint Color" color="rgba(1.0, 0.44275, 0.0, 1.0)" loc="-1127, 657" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Roughness" value="0.0" loc="-1142, 265" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Fresnel" value="1.29999" loc="-1142, 176" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Flake Size" value="1000.0" loc="-1142, -165" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Flake Spread" value="0.10000" loc="-1142, -342" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Flake Intensity" value="0.60000" loc="-1142, -254" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Blend" value="0.01999" loc="-1142, 94" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="1000.0" loc="-736, -4" />
-		<node type="OUTPUT_MATERIAL" loc="957, 98" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Gloss Roughness" value="0.0" loc="-1142, 8" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Gloss Spread" value="2.0" loc="-1142, -78" />
-	</nodes>
-	<links>
-		<link to="26" input="0" from="2" output="0" />
-		<link to="0" input="2" from="13" output="0" />
-		<link to="1" input="1" from="0" output="0" />
-		<link to="0" input="1" from="16" output="0" />
-		<link to="1" input="2" from="11" output="0" />
-		<link to="13" input="0" from="25" output="0" />
-		<link to="0" input="0" from="8" output="0" />
-		<link to="8" input="1" from="7" output="0" />
-		<link to="8" input="0" from="12" output="0" />
-		<link to="6" input="1" from="5" output="1" />
-		<link to="7" input="0" from="6" output="0" />
-		<link to="2" input="2" from="14" output="0" />
-		<link to="2" input="1" from="1" output="0" />
-		<link to="2" input="0" from="15" output="0" />
-		<link to="3" input="1" from="10" output="1" />
-		<link to="4" input="0" from="3" output="0" />
-		<link to="3" input="0" from="9" output="0" />
-		<link to="1" input="0" from="4" output="0" />
-		<link to="16" input="0" from="18" output="0" />
-		<link to="11" input="0" from="17" output="0" />
-		<link to="11" input="1" from="19" output="0" />
-		<link to="9" input="0" from="20" output="0" />
-		<link to="10" input="0" from="24" output="0" />
-		<link to="5" input="1" from="21" output="0" />
-		<link to="25" input="1" from="21" output="0" />
-		<link to="12" input="0" from="23" output="0" />
-		<link to="13" input="1" from="22" output="0" />
-		<link to="14" input="1" from="27" output="0" />
-		<link to="15" input="0" from="28" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.jpg
deleted file mode 100644
index 2b3c35d..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/glossy_yellow.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.bcm
deleted file mode 100644
index 331a94e..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.bcm
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.20428, 0.26886, 0.36288)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.85000" loc="455, 102" />
-		<node type="OUTPUT_MATERIAL" loc="660, 96" />
-		<node type="LAYER_WEIGHT" blend="0.89999" loc="-615, 152" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Spread" value="0.70000" loc="-883, 468" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Flake Size" value="600.0" loc="-921, 351" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.00499" loc="44, 203" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" color="rgba(0.0, 0.04970, 0.50288, 1.0)" loc="-987, 248" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" color="rgba(0.0, 0.0, 0.09989, 1.0)" loc="-987, 46" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" color="rgba(0.0, 1.0, 1.0, 1.0)" loc="-906, -174" />
-		<node type="GAMMA" hide="True" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="3.5" loc="-392, 240" />
-		<node type="MIX_SHADER" fac="0.75" loc="-415, 155" />
-		<node type="MIX_SHADER" fac="0.75" loc="-200, 157" />
-		<node type="LAYER_WEIGHT" blend="0.69999" loc="260, 317" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="600.0" loc="-615, 310" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.0, 0.04970, 0.50288, 1.0)" roughness="1.0" loc="-615, 47" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.0, 0.0, 0.09989, 1.0)" roughness="1.0" loc="-615, -70" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.0, 1.0, 1.0, 1.0)" roughness="0.30000" loc="-418, -74" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.0, 0.0, 0.00972, 1.0)" roughness="0.64999" loc="-211, -73" />
-		<node type="MIX_SHADER" fac="0.25" loc="44, 43" />
-		<node type="MIX_SHADER" fac="0.49999" loc="260, 105" />
-	</nodes>
-	<links>
-		<link to="9" input="0" from="13" output="1" />
-		<link to="1" input="0" from="0" output="0" />
-		<link to="0" input="0" from="12" output="1" />
-		<link to="19" input="2" from="18" output="0" />
-		<link to="0" input="1" from="19" output="0" />
-		<link to="0" input="2" from="17" output="0" />
-		<link to="10" input="2" from="15" output="0" />
-		<link to="10" input="1" from="14" output="0" />
-		<link to="10" input="0" from="2" output="1" />
-		<link to="11" input="2" from="16" output="0" />
-		<link to="11" input="1" from="10" output="0" />
-		<link to="11" input="0" from="9" output="0" />
-		<link to="19" input="1" from="5" output="0" />
-		<link to="14" input="0" from="6" output="0" />
-		<link to="12" input="0" from="3" output="0" />
-		<link to="13" input="1" from="4" output="0" />
-		<link to="16" input="0" from="8" output="0" />
-		<link to="15" input="0" from="7" output="0" />
-		<link to="18" input="1" from="11" output="0" />
-		<link to="18" input="2" from="17" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.jpg
deleted file mode 100644
index d44a563..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/car-paint/metallic_blue.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.bcm
deleted file mode 100644
index d6c8f55..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.bcm
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(1.0, 0.0, 0.0)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="300, 300" />
-		<node type="EMISSION" color="rgba(1.0, 0.0, 0.0, 1.0)" strength="30.0" loc="-189, 219" />
-		<node type="MIX_SHADER" fac="0.5" loc="70, 302" />
-		<node type="LAYER_WEIGHT" blend="0.89999" loc="-195, 431" />
-		<node type="EMISSION" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" strength="30.0" loc="-190, 326" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="2" output="0" />
-		<link to="2" input="0" from="3" output="1" />
-		<link to="2" input="1" from="4" output="0" />
-		<link to="2" input="2" from="1" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.jpg
deleted file mode 100644
index b5f7178..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/blaster_bolt_red.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.bcm
deleted file mode 100644
index 5199153..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.bcm
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.84148, 0.74040, 0.00749)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="545, 173" />
-		<node type="NEW_GEOMETRY" loc="-759, 221" />
-		<node type="LIGHT_PATH" loc="-464, -35" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="1.0" loc="103, 86" />
-		<node type="EMISSION" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" strength="10.13210" loc="290, 179" />
-		<node type="MATH" operation="MAXIMUM" use_clamp="False" value1="0.5" value2="0.5" loc="-130, 30" />
-		<node type="VECT_MATH" operation="ADD" vector1="Vector(0.5, 0.5, 0.5)" vector2="Vector(0.5, 0.5, 0.5)" loc="-386, 202" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.47510, 0.01064, 0.00834, 1.0)" color2="rgba(0.88760, 0.81437, 0.00747, 1.0)" loc="-13, 254" />
-		<node type="TEX_COORD" loc="-776, 30" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="4" output="0" />
-		<link to="5" input="1" from="2" output="3" />
-		<link to="4" input="1" from="3" output="0" />
-		<link to="3" input="0" from="5" output="0" />
-		<link to="5" input="0" from="2" output="0" />
-		<link to="6" input="0" from="1" output="4" />
-		<link to="7" input="0" from="6" output="1" />
-		<link to="4" input="0" from="7" output="0" />
-		<link to="6" input="1" from="8" output="6" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.jpg
deleted file mode 100644
index dd72be2..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/fake_shading.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.bcm
deleted file mode 100644
index ee4ec58..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.bcm
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.37983, 0.37828, 0.79909)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="300, 300" />
-		<node type="BSDF_TRANSPARENT" color="rgba(1.0, 1.0, 1.0, 1.0)" loc="-180, 225" />
-		<node type="LIGHT_PATH" loc="-742, 566" />
-		<node type="EMISSION" color="rgba(0.11494, 0.11202, 0.80000, 1.0)" strength="2.35998" loc="-351, 321" />
-		<node type="MIX_SHADER" fac="0.5" loc="40, 322" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="1.0" loc="-271, 490" />
-	</nodes>
-	<links>
-		<link to="4" input="1" from="3" output="0" />
-		<link to="0" input="0" from="4" output="0" />
-		<link to="4" input="2" from="1" output="0" />
-		<link to="5" input="1" from="2" output="1" />
-		<link to="5" input="0" from="2" output="0" />
-		<link to="4" input="0" from="5" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.jpg
deleted file mode 100644
index 7d96e82..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/invisible_light.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.bcm
deleted file mode 100644
index 6a244e4..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.bcm
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80220, 0.34073, 0.11822)" sample_lamp="False">
-	<nodes>
-		<node type="MATH" hide="True" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="345, 357" />
-		<node type="MATH" hide="True" operation="MINIMUM" use_clamp="False" value1="0.5" value2="1.0" loc="531, 370" />
-		<node type="MATH" hide="True" operation="SUBTRACT" use_clamp="False" value1="1.0" value2="0.5" loc="-61, 201" />
-		<node type="NEW_GEOMETRY" hide="True" loc="-247, 217" />
-		<node type="MIX_SHADER" hide="True" fac="0.5" loc="617, 462" />
-		<node type="BSDF_DIFFUSE" hide="True" color="rgba(0.80000, 0.21108, 0.0, 1.0)" roughness="0.0" loc="321, 442" />
-		<node type="BSDF_GLOSSY" hide="True" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.20000" loc="166, 480" />
-		<node type="BSDF_TRANSLUCENT" hide="True" color="rgba(0.80000, 0.50765, 0.23623, 1.0)" loc="599, 243" />
-		<node type="MIX_SHADER" hide="True" fac="0.5" loc="806, 329" />
-		<node type="OUTPUT_MATERIAL" hide="True" loc="996, 315" />
-		<node type="RGB" label="Subdermal Color" color="rgba(0.80000, 0.21108, 0.0, 1.0)" loc="-680, 555" />
-		<node type="VALUE" label="Specularity" value="0.5" loc="-670, 678" />
-		<node type="RGB" label="Epidermal Color" color="rgba(0.80000, 0.50765, 0.23623, 1.0)" loc="-680, 244" />
-		<node type="LIGHT_PATH" loc="-488, 505" />
-		<node type="MATH" hide="True" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-0.75199" loc="-258, 307" />
-		<node type="MATH" hide="True" operation="POWER" use_clamp="False" value1="2.71798" value2="0.5" loc="-104, 327" />
-		<node type="MATH" hide="True" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="68, 368" />
-		<node type="VALUE" label="Absorption Value" value="-0.75199" loc="-670, 351" />
-	</nodes>
-	<links>
-		<link to="14" input="0" from="13" output="7" />
-		<link to="15" input="1" from="14" output="0" />
-		<link to="2" input="1" from="3" output="6" />
-		<link to="16" input="0" from="13" output="0" />
-		<link to="0" input="0" from="16" output="0" />
-		<link to="0" input="1" from="2" output="0" />
-		<link to="1" input="0" from="0" output="0" />
-		<link to="8" input="0" from="1" output="0" />
-		<link to="9" input="0" from="8" output="0" />
-		<link to="4" input="2" from="5" output="0" />
-		<link to="4" input="1" from="6" output="0" />
-		<link to="8" input="2" from="7" output="0" />
-		<link to="8" input="1" from="4" output="0" />
-		<link to="5" input="0" from="10" output="0" />
-		<link to="4" input="0" from="11" output="0" />
-		<link to="14" input="1" from="17" output="0" />
-		<link to="7" input="0" from="12" output="0" />
-		<link to="16" input="1" from="15" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.jpg
deleted file mode 100644
index eab220e..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/simulated_sss.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.bcm
deleted file mode 100644
index 1dca858..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.bcm
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.68979, 1.25306, 1.30810)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="1037, 349" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-0.03200" loc="-263, 445" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="303, 580" />
-		<node type="LIGHT_PATH" loc="-451, 602" />
-		<node type="MATH" operation="POWER" use_clamp="False" value1="25.0" value2="0.5" loc="-78, 443" />
-		<node type="NEW_GEOMETRY" loc="-265, 273" />
-		<node type="BSDF_GLASS" distribution="SHARP" color="rgba(1.0, 1.0, 1.0, 0.98518)" roughness="0.0" ior="1.0" loc="305, 256" />
-		<node type="EMISSION" color="rgba(0.09172, 0.17486, 0.80000, 1.0)" strength="52.49996" loc="308, 375" />
-		<node type="MATH" operation="MINIMUM" use_clamp="False" value1="0.5" value2="1.0" loc="526, 569" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Emission Color" color="rgba(0.09172, 0.17486, 0.80000, 1.0)" loc="-533, 413" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="1.0" value2="0.5" loc="-79, 257" />
-		<node type="MIX_SHADER" fac="0.5" loc="855, 373" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="88, 580" />
-		<node type="VALUE" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Brightness" value="40.0" loc="-527, 227" />
-	</nodes>
-	<links>
-		<link to="1" input="0" from="3" output="7" />
-		<link to="4" input="1" from="1" output="0" />
-		<link to="10" input="1" from="5" output="6" />
-		<link to="12" input="0" from="3" output="0" />
-		<link to="2" input="0" from="12" output="0" />
-		<link to="2" input="1" from="10" output="0" />
-		<link to="8" input="0" from="2" output="0" />
-		<link to="11" input="0" from="8" output="0" />
-		<link to="0" input="0" from="11" output="0" />
-		<link to="11" input="1" from="7" output="0" />
-		<link to="12" input="1" from="4" output="0" />
-		<link to="7" input="1" from="13" output="0" />
-		<link to="7" input="0" from="9" output="0" />
-		<link to="11" input="2" from="6" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.jpg
deleted file mode 100644
index 9f62bbd..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/effects/volumetric_light.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.bcm
deleted file mode 100644
index 08ee650..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.bcm
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.28012, 0.08883, 0.07812)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.86000" loc="250, 356" />
-		<node type="OUTPUT_MATERIAL" loc="517, 356" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.80000, 0.45208, 0.0, 1.0)" loc="25, 220" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.69998, 0.03863, 0.13707, 1.0)" roughness="0.0" loc="25, 356" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.24683, 0.5, 0.10869, 1.0)" color2="rgba(0.5, 0.42882, 0.0, 1.0)" loc="-158, 292" />
-		<node type="FRESNEL" ior="1.66733" loc="-412, 292" />
-	</nodes>
-	<links>
-		<link to="0" input="1" from="3" output="0" />
-		<link to="1" input="0" from="0" output="0" />
-		<link to="0" input="2" from="2" output="0" />
-		<link to="4" input="0" from="5" output="0" />
-		<link to="2" input="0" from="4" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.jpg
deleted file mode 100644
index 0da81b2..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/gummy_worm.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.bcm
deleted file mode 100644
index 4abaeca..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.bcm
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.30000, 0.10498, 0.04715)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="237, 123" />
-		<node type="MIX_SHADER" fac="0.85000" loc="37, 123" />
-		<node type="MIX_SHADER" fac="0.10000" loc="-165, 38" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.15053, 0.08335, 0.04656, 1.0)" roughness="0.31999" loc="-171, 186" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.14248, 0.04986, 0.02239, 1.0)" roughness="0.0" loc="-381, 106" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.19999, 0.11313, 0.08168, 1.0)" loc="-391, -4" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="1" from="3" output="0" />
-		<link to="1" input="2" from="2" output="0" />
-		<link to="2" input="1" from="4" output="0" />
-		<link to="2" input="2" from="5" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.jpg
deleted file mode 100644
index cdc2138..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/milk_chocolate.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.bcm
deleted file mode 100644
index d539d4a..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.bcm
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.68075, 0.03067, 0.04267)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="1000, 250" />
-		<node type="MIX_SHADER" fac="0.5" loc="700, 250" />
-		<node type="LAYER_WEIGHT" blend="0.15000" loc="400, 400" />
-		<node type="MIX_SHADER" fac="0.5" loc="400, 250" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.62673, 0.94107, 1.0)" roughness="0.10000" loc="400, 100" />
-		<node type="LAYER_WEIGHT" blend="0.10000" loc="100, 400" />
-		<node type="MIX_SHADER" fac="0.80000" loc="100, 250" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.54095, 0.72606, 1.0)" roughness="0.60000" loc="100, 100" />
-		<node type="BSDF_GLASS" distribution="SHARP" color="rgba(0.83876, 0.35837, 0.31907, 1.0)" roughness="0.0" ior="1.0" loc="-200, 325" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.96478, 0.21441, 0.25363, 1.0)" loc="-200, 175" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="0" from="2" output="0" />
-		<link to="1" input="1" from="3" output="0" />
-		<link to="1" input="2" from="4" output="0" />
-		<link to="3" input="0" from="5" output="0" />
-		<link to="3" input="1" from="6" output="0" />
-		<link to="3" input="2" from="7" output="0" />
-		<link to="6" input="1" from="8" output="0" />
-		<link to="6" input="2" from="9" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.jpg
deleted file mode 100644
index 1c5e323..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/food/raspberry.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.bcm
deleted file mode 100644
index 71c325e..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.bcm
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.10572, 0.13248, 0.47976)" sample_lamp="True">
-	<nodes>
-		<node type="NEW_GEOMETRY" loc="-247, 217" />
-		<node type="LIGHT_PATH" loc="-451, 561" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-0.68007" loc="-263, 461" />
-		<node type="MATH" operation="POWER" use_clamp="False" value1="2.71798" value2="0.5" loc="-78, 429" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="128, 489" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="345, 357" />
-		<node type="MATH" operation="MINIMUM" use_clamp="False" value1="0.5" value2="1.0" loc="528, 370" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" ior="1.45000" loc="834, 341" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.0, 0.08540, 1.0, 1.0)" color2="rgba(0.97188, 1.0, 0.97017, 1.0)" loc="692, 378" />
-		<node type="OUTPUT_MATERIAL" loc="1037, 349" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="1.0" value2="0.5" loc="-61, 201" />
-	</nodes>
-	<links>
-		<link to="3" input="1" from="2" output="0" />
-		<link to="10" input="1" from="0" output="6" />
-		<link to="4" input="0" from="3" output="0" />
-		<link to="4" input="1" from="1" output="0" />
-		<link to="9" input="0" from="7" output="0" />
-		<link to="5" input="0" from="4" output="0" />
-		<link to="5" input="1" from="10" output="0" />
-		<link to="6" input="0" from="5" output="0" />
-		<link to="8" input="0" from="6" output="0" />
-		<link to="7" input="0" from="8" output="0" />
-		<link to="2" input="0" from="1" output="7" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.jpg
deleted file mode 100644
index da3e159..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/absorption.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.bcm
deleted file mode 100644
index 27f18e2..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.bcm
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.41442, 0.41442, 0.39642)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.5" loc="-99, 306" />
-		<node type="MIX_SHADER" fac="0.5" loc="-90, 7" />
-		<node type="LAYER_WEIGHT" blend="0.30000" loc="-522, 495" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.0, 0.12627, 0.80000, 1.0)" roughness="0.00999" loc="-318, 306" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.00999" ior="1.45000" loc="-318, -206" />
-		<node type="OUTPUT_MATERIAL" loc="390, 154" />
-		<node type="MIX_SHADER" fac="0.25" loc="120, 154" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.00999" ior="1.45000" loc="-318, 154" />
-		<node type="TEX_NOISE" scale="10.0" detail="2.0" distortion="0.0" loc="-675, 154" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.00999" loc="-318, -32" />
-		<node type="INVERT" fac="1.0" color="rgba(0.0, 0.0, 0.0, 1.0)" loc="-285, 467" />
-	</nodes>
-	<links>
-		<link to="5" input="0" from="6" output="0" />
-		<link to="0" input="1" from="3" output="0" />
-		<link to="0" input="0" from="10" output="0" />
-		<link to="9" input="0" from="8" output="0" />
-		<link to="0" input="2" from="7" output="0" />
-		<link to="6" input="1" from="0" output="0" />
-		<link to="1" input="1" from="9" output="0" />
-		<link to="1" input="2" from="4" output="0" />
-		<link to="6" input="2" from="1" output="0" />
-		<link to="3" input="0" from="8" output="0" />
-		<link to="10" input="1" from="2" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.jpg
deleted file mode 100644
index b217b1c..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/iridescent.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.bcm
deleted file mode 100644
index b358716..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.bcm
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.60382, 0.60382, 0.77582)" sample_lamp="True">
-	<nodes>
-		<node type="FRESNEL" ior="1.79999" loc="-676, 464" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.05000" ior="1.45000" loc="-123, 104" />
-		<node type="MIX_SHADER" fac="0.34999" loc="104, 214" />
-		<node type="ADD_SHADER" loc="-1113, 55" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.77942, 0.86935, 1.0, 1.0)" loc="-636, 364" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(1.0, 0.90754, 0.99431, 1.0)" loc="-626, 274" />
-		<node type="MIX_SHADER" fac="0.5" loc="-384, 439" />
-		<node type="ADD_SHADER" loc="-121, 453" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.31400, 0.31400, 0.31400, 1.0)" loc="-784, 87" />
-		<node type="OUTPUT_MATERIAL" loc="386, 181" />
-	</nodes>
-	<links>
-		<link to="9" input="0" from="2" output="0" />
-		<link to="6" input="0" from="0" output="0" />
-		<link to="2" input="2" from="1" output="0" />
-		<link to="6" input="1" from="4" output="0" />
-		<link to="6" input="2" from="5" output="0" />
-		<link to="7" input="0" from="6" output="0" />
-		<link to="2" input="1" from="7" output="0" />
-		<link to="7" input="1" from="8" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.jpg
deleted file mode 100644
index 2fdec98..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/lalique.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.bcm
deleted file mode 100644
index efd2d0f..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.bcm
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.85013, 1.0, 0.80923)" sample_lamp="True">
-	<nodes>
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(0.96069, 1.0, 0.94998, 1.0)" roughness="0.00999" ior="1.51800" loc="62, 412" />
-		<node type="BSDF_TRANSPARENT" color="rgba(1.0, 1.0, 1.0, 1.0)" loc="95, 230" />
-		<node type="OUTPUT_MATERIAL" loc="520, 292" />
-		<node type="MIX_SHADER" fac="0.0" loc="317, 296" />
-		<node type="LIGHT_PATH" loc="-189, 325" />
-	</nodes>
-	<links>
-		<link to="3" input="2" from="1" output="0" />
-		<link to="3" input="0" from="4" output="1" />
-		<link to="3" input="1" from="0" output="0" />
-		<link to="2" input="0" from="3" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.jpg
deleted file mode 100644
index 4064ca9..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/glass/soda_lime_common.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/index.xml b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/index.xml
deleted file mode 100644
index fa6f149..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/index.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<library>
-	<category title="Car Paint" folder="car-paint" addon="0.4">
-		<material name="Basic Blue" href="basic_blue" stars="3" addon="0.4" />
-		<material name="Dull Coral" href="dull_coral" by="monsterdog" stars="4" addon="0.4" />
-		<material name="Dull Olive" href="dull_olive" stars="5" addon="0.4" />
-		<material name="Flaky Green" href="flaky_green" stars="5" fireflies="medium" addon="0.4" />
-		<material name="Flaky Purple" href="flaky_purple" stars="4" fireflies="medium" addon="0.4" />
-		<material name="Flaky Tangelo" href="flaky_tangelo" stars="5" fireflies="medium" addon="0.4" />
-		<material name="Glossy Yellow" href="glossy_yellow" stars="4" fireflies="medium" addon="0.4" />
-		<material name="Metallic Blue" href="metallic_blue" stars="5" addon="0.4" />
-	</category>
-	<category title="Effects" folder="effects" addon="0.4">
-		<material name="Blaster Bolt (Red)" href="blaster_bolt_red" stars="3" addon="0.4" />
-		<material name="Invisible Light" href="invisible_light" stars="4" addon="0.4" />
-		<material name="Fake Shading" href="fake_shading" by="Ace Dragon" stars="3" addon="0.4" />
-		<material name="Simulated SSS" href="simulated_sss" by="ZetShandow" stars="4" complexity="intermediate" addon="0.4" bl="2.64-" />
-		<material name="Volumetric Light" href="volumetric_light" by="ZetShandow" stars="4" complexity="intermediate" fireflies="medium" addon="0.4" bl="2.64-" />
-	</category>
-	<category title="Food" folder="food" addon="0.4">
-		<material name="Gummy Worm" href="gummy_worm" by="Jimmy Gunawan" stars="4" addon="0.4" />
-		<material name="Milk Chocolate" href="milk_chocolate" by="Peter Cassetta" stars="3" addon="0.4" />
-		<material name="Raspberry" href="raspberry" stars="4" addon="0.4" />
-	</category>
-	<category title="Glass" folder="glass" addon="0.4">
-		<material name="Absorption" href="absorption" by="ZetShandow" stars="4" fireflies="medium" addon="0.4" bl="2.64-" />
-		<material name="Iridescent" href="iridescent" by="moony" stars="5" fireflies="medium" speed="fair" addon="0.4" />
-		<material name="Lalique" href="lalique" by="moony" stars="4" addon="0.4" speed="medium" />
-		<material name="Soda-Lime (Common)" href="soda_lime_common" by="Peter Cassetta" stars="3" addon="0.4" />
-	</category>
-	<category title="Liquids" folder="liquids" addon="0.4">
-		<material name="Cranberry Juice" href="cranberry_juice" by="Peter Cassetta" stars="4" addon="0.4" />
-		<material name="Slime" href="slime" stars="3" addon="0.4" bl="2.64-" />
-		<material name="Soap Bubble" href="soap_bubble" by="moony" stars="4" fireflies="medium" speed="fair" addon="0.4" />
-	</category>
-	<category title="Metals" folder="metals" addon="0.4">
-		<material name="Bronze (Ancient)" href="bronze_ancient" stars="4" addon="0.4" />
-		<material name="Fool's Gold" href="fools_gold" stars="4" complexity="complex" addon="0.4" />
-		<material name="Galvanized Steel" href="galvanized_steel" by="moony" stars="4" fireflies="medium" addon="0.4" />
-	</category>
-	<category title="Nature" folder="nature" addon="0.4">
-		<material name="Pearl" href="pearl" by="moony" stars="4" addon="0.4" />
-		<material name="Forest" href="forest" by="Jonathan L" stars="4" complexity="complex" addon="0.4" />
-		<material name="Lava" href="lava" by="monsterdog" stars="4" complexity="intermediate" addon="0.4" />
-	</category>
-	<category title="Plastics" folder="plastics" addon="0.4">
-		<material name="Toy Brick (Red)" href="toy_brick_red" by="Peter Cassetta" stars="4" addon="0.4" />
-	</category>
-	<category title="Skin" folder="skin" addon="0.4">
-		<material name="Pox" href="pox" by="moony" stars="4" addon="0.4" />
-	</category>
-	<category title="Stones" folder="stones" addon="0.4">
-		<material name="Diamond" href="diamond" stars="3" fireflies="high" speed="slow" addon="0.4" />
-		<material name="Malachite" href="malachite" by="moony" stars="3" addon="0.4" />
-		<material name="Polished Haematite" href="polished_haematite" by="moony" stars="5" complexity="intermediate" addon="0.4" />
-	</category>
-	<category title="Synthetic" folder="synthetic" addon="0.4">
-		<material name="Carbon Fiber" href="carbon_fiber" stars="5" complexity="complex" addon="0.4" />
-		<material name="Carbon Fiber (Glossy)" href="carbon_fiber_glossy" stars="3" complexity="complex" addon="0.4" />
-		<material name="Polystyrene Foam" href="polystyrene_foam" by="Peter Cassetta" stars="4" complexity="intermediate" addon="0.4" />
-		<material name="Rubber" href="rubber" stars="3" addon="0.4" />
-	</category>
-	<category title="Textiles" folder="textiles" addon="0.4">
-		<material name="Denim" href="denim" by="Peter Cassetta" stars="4" complexity="complex" addon="0.4" />
-		<material name="Velvet (Edged)" href="velvet_edged" stars="4" addon="0.4" />
-		<material name="Weave Test" href="weave_test" by="niabot" stars="4" complexity="complex" addon="0.4" />
-		<material name="Woven Wool" href="woven_wool" by="meta-androcto" stars="3" addon="0.4" />
-	</category>
-	<category title="Wood" folder="wood" addon="0.4">
-		<material name="Polished Walnut" href="polished_walnut" by="Peter Cassetta" stars="4" complexity="intermediate" addon="0.4" />
-		<material name="Rough Pine" href="rough_pine" by="Peter Cassetta" stars="4" complexity="intermediate" addon="0.4" />
-		<material name="Rough Walnut" href="rough_walnut" by="Peter Cassetta" stars="3" complexity="intermediate" addon="0.4" />
-	</category>
-</library>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.bcm
deleted file mode 100644
index 1e9c634..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.bcm
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.87406, 0.02816, 0.03187)" sample_lamp="True">
-	<nodes>
-		<node type="LIGHT_PATH" loc="-236, 318" />
-		<node type="BSDF_TRANSPARENT" color="rgba(1.0, 0.37799, 0.37799, 1.0)" loc="95, 230" />
-		<node type="BSDF_GLASS" distribution="SHARP" color="rgba(1.0, 0.41999, 0.41999, 1.0)" roughness="0.00999" ior="1.35099" loc="62, 412" />
-		<node type="MIX_SHADER" fac="0.0" loc="294, 303" />
-		<node type="OUTPUT_MATERIAL" loc="520, 292" />
-	</nodes>
-	<links>
-		<link to="3" input="2" from="1" output="0" />
-		<link to="4" input="0" from="3" output="0" />
-		<link to="3" input="1" from="2" output="0" />
-		<link to="3" input="0" from="0" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.jpg
deleted file mode 100644
index bc96ab6..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/cranberry_juice.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.bcm
deleted file mode 100644
index c66af61..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.bcm
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.17464, 0.52099, 0.03071)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="286, 432" />
-		<node type="MIX_SHADER" fac="0.5" loc="67, 330" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.17583, 0.52207, 0.03054, 1.0)" roughness="0.0" loc="-151, 303" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.88750, 0.66609, 0.19976, 1.0)" roughness="0.5" loc="-157, 195" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="True" value1="0.5" value2="1.0" loc="-135, 463" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="-326, 470" />
-		<node type="TEX_MUSGRAVE" musgrave="FBM" scale="-5.10382" detail="2.0" dimension="2.0" lacunarity="1.0" offset="0.0" gain="1.0" loc="-584, 508" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="1.99999" loc="-590, 669" />
-		<node type="MAPPING" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.78539, 0.78539, 0.0)" scale="Vector(3.0, 3.0, 3.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-898, 505" />
-		<node type="TEX_COORD" loc="-1129, 475" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="2" from="3" output="0" />
-		<link to="0" input="2" from="4" output="0" />
-		<link to="1" input="0" from="4" output="0" />
-		<link to="8" input="0" from="9" output="0" />
-		<link to="5" input="0" from="7" output="1" />
-		<link to="4" input="0" from="5" output="0" />
-		<link to="5" input="1" from="6" output="1" />
-		<link to="6" input="0" from="8" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.jpg
deleted file mode 100644
index 39891cc..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/slime.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.bcm
deleted file mode 100644
index 5952423..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.bcm
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.75489, 0.68663, 0.79909)" sample_lamp="True">
-	<nodes>
-		<node type="LAYER_WEIGHT" blend="0.89999" loc="-651, 778" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.0, 0.0, 1.0)" roughness="0.0" loc="-655, 631" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.0, 1.0, 0.0, 1.0)" roughness="0.0" loc="-651, 471" />
-		<node type="LAYER_WEIGHT" blend="0.30000" loc="-201, 737" />
-		<node type="MIX_SHADER" fac="0.5" loc="-184, 520" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.0, 0.0, 1.0, 1.0)" roughness="0.0" loc="-188, 341" />
-		<node type="LAYER_WEIGHT" blend="0.39998" loc="123, 733" />
-		<node type="MIX_SHADER" fac="0.5" loc="123, 516" />
-		<node type="MIX_SHADER" fac="0.5" loc="469, 321" />
-		<node type="BSDF_TRANSPARENT" color="rgba(1.0, 1.0, 1.0, 1.0)" loc="486, 76" />
-		<node type="MIX_SHADER" fac="0.5" loc="797, 265" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.0" ior="1.45000" loc="808, 486" />
-		<node type="FRESNEL" ior="1.45000" loc="864, 676" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.48350, 0.0, 0.80000, 1.0)" roughness="0.0" loc="131, 217" />
-		<node type="OUTPUT_MATERIAL" loc="1790, 301" />
-		<node type="MIX_SHADER" fac="0.89999" loc="1232, 271" />
-		<node type="MIX_SHADER" fac="0.89999" loc="1570, 333" />
-		<node type="LIGHT_PATH" loc="1364, 592" />
-		<node type="BSDF_TRANSPARENT" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="1254, 128" />
-	</nodes>
-	<links>
-		<link to="16" input="1" from="15" output="0" />
-		<link to="4" input="0" from="0" output="1" />
-		<link to="7" input="1" from="4" output="0" />
-		<link to="7" input="0" from="3" output="1" />
-		<link to="8" input="1" from="7" output="0" />
-		<link to="4" input="1" from="1" output="0" />
-		<link to="4" input="2" from="2" output="0" />
-		<link to="7" input="2" from="5" output="0" />
-		<link to="8" input="2" from="13" output="0" />
-		<link to="8" input="0" from="6" output="0" />
-		<link to="10" input="1" from="8" output="0" />
-		<link to="10" input="2" from="9" output="0" />
-		<link to="15" input="1" from="11" output="0" />
-		<link to="15" input="2" from="10" output="0" />
-		<link to="15" input="0" from="12" output="0" />
-		<link to="14" input="0" from="16" output="0" />
-		<link to="16" input="0" from="17" output="1" />
-		<link to="16" input="2" from="18" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.jpg
deleted file mode 100644
index 35b1d9e..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/liquids/soap_bubble.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.bcm
deleted file mode 100644
index f9d75b4..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.bcm
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.30153, 0.11162, 0.05403)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="633, 386" />
-		<node type="NEW_GEOMETRY" loc="-202, 555" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.10000" loc="182, 374" />
-		<node type="LAYER_WEIGHT" blend="0.46500" loc="-12, 235" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.04357, 0.04357, 0.04357, 1.0)" roughness="0.03999" loc="-33, 129" />
-		<node type="MIX_SHADER" fac="0.5" loc="214, 171" />
-		<node type="MIX_SHADER" fac="0.5" loc="429, 338" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.06498" loc="-33, -2" />
-		<node type="RGB" color="rgba(0.85499, 0.28891, 0.15745, 1.0)" loc="-414, 435" />
-		<node type="RGB" color="rgba(0.79909, 0.43415, 0.07225, 1.0)" loc="-414, 228" />
-		<node type="RGB" color="rgba(0.09000, 0.04159, 0.01396, 1.0)" loc="-414, 39" />
-		<node type="VECT_MATH" operation="DOT_PRODUCT" vector1="Vector(0.5, 0.5, 0.5)" vector2="Vector(0.5, 0.5, 0.5)" loc="-39, 565" />
-		<node type="MATH" operation="POWER" use_clamp="False" value1="0.5" value2="4.0" loc="159, 548" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="6" output="0" />
-		<link to="11" input="0" from="1" output="1" />
-		<link to="11" input="1" from="1" output="4" />
-		<link to="12" input="0" from="11" output="1" />
-		<link to="6" input="0" from="12" output="0" />
-		<link to="6" input="1" from="2" output="0" />
-		<link to="5" input="1" from="4" output="0" />
-		<link to="5" input="2" from="7" output="0" />
-		<link to="6" input="2" from="5" output="0" />
-		<link to="5" input="0" from="3" output="1" />
-		<link to="4" input="0" from="8" output="0" />
-		<link to="7" input="0" from="9" output="0" />
-		<link to="2" input="0" from="10" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.jpg
deleted file mode 100644
index a04b47a..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/bronze_ancient.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.bcm
deleted file mode 100644
index 7bfa065..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.bcm
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.94870, 0.50081, 0.05448)" sample_lamp="True">
-	<nodes>
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.68531, 0.15028, 1.0)" roughness="0.15000" loc="48, 300" />
-		<node type="TEX_NOISE" scale="68.99987" detail="2.40684" distortion="12.65606" loc="52, 156" />
-		<node type="MATH" operation="GREATER_THAN" use_clamp="False" value1="0.5" value2="0.81199" loc="253, 125" />
-		<node type="TEX_MUSGRAVE" musgrave="FBM" scale="860.48791" detail="2.37062" dimension="2.0" lacunarity="44.37200" offset="0.0" gain="1.0" loc="51, -35" />
-		<node type="TEX_MAGIC" depth="2" scale="519.49645" distortion="28.07604" loc="41, -279" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.26600" loc="621, -107" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="593, 125" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="774, 118" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-0.00400" loc="1052, -477" />
-		<node type="MATH" operation="SINE" use_clamp="False" value1="0.5" value2="2.43676" loc="762, -469" />
-		<node type="MATH" operation="TANGENT" use_clamp="False" value1="0.5" value2="0.52956" loc="909, -456" />
-		<node type="TEX_WAVE" wave="RINGS" scale="39.22412" distortion="21.16782" detail="2.31078" detail_scale="1.94421" loc="571, -411" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="954, 75" />
-		<node type="MATH" operation="SINE" use_clamp="False" value1="1.0" value2="0.5" loc="1603, -158" />
-		<node type="TEX_WAVE" wave="RINGS" scale="9.16790" distortion="9.56811" detail="2.04166" detail_scale="28.49596" loc="1318, -223" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.37356" value2="0.5" loc="1781, -163" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.05601" value2="0.5" loc="1959, -166" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="275.35241" loc="43, -465" />
-		<node type="VALUE" value="9.16800" loc="1210, -304" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="-89, 96" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="-100, -121" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="-90, -298" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="-97, -482" />
-		<node type="VALUE" value="39.22399" loc="421, -459" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="424, -548" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="1232, -456" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.00300" loc="1118, -164" />
-		<node type="TEX_MUSGRAVE" musgrave="MULTIFRACTAL" scale="504.95214" detail="2.26371" dimension="2.0" lacunarity="1.16760" offset="0.0" gain="1.0" loc="948, -170" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="1.0" value2="0.5" loc="806, -135" />
-		<node type="VALUE" value="504.95199" loc="831, -280" />
-		<node type="VALUE" value="0.5" loc="-532, 234" />
-		<node type="MATH" operation="GREATER_THAN" use_clamp="False" value1="0.5" value2="0.5" loc="442, -316" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.5" loc="442, -108" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.30959" loc="282, -291" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-0.20536" loc="605, -259" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.01236" loc="395, 131" />
-		<node type="VALUE" value="314.93222" loc="-339, -542" />
-		<node type="VALUE" value="296.85839" loc="-364, -375" />
-		<node type="VALUE" value="860.48797" loc="-356, -205" />
-		<node type="VALUE" value="69.0" loc="-368, 0" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.5" loc="2184, -23" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.84039" loc="2485, 56" />
-		<node type="OUTPUT_MATERIAL" loc="2715, 178" />
-	</nodes>
-	<links>
-		<link to="42" input="0" from="0" output="0" />
-		<link to="35" input="0" from="2" output="0" />
-		<link to="2" input="1" from="1" output="1" />
-		<link to="6" input="0" from="35" output="0" />
-		<link to="32" input="1" from="4" output="1" />
-		<link to="32" input="0" from="3" output="1" />
-		<link to="6" input="1" from="5" output="0" />
-		<link to="31" input="0" from="17" output="1" />
-		<link to="34" input="0" from="31" output="0" />
-		<link to="5" input="0" from="34" output="0" />
-		<link to="7" input="0" from="6" output="0" />
-		<link to="26" input="0" from="27" output="1" />
-		<link to="7" input="1" from="26" output="0" />
-		<link to="9" input="0" from="11" output="1" />
-		<link to="12" input="0" from="7" output="0" />
-		<link to="10" input="0" from="9" output="0" />
-		<link to="12" input="1" from="8" output="0" />
-		<link to="8" input="0" from="10" output="0" />
-		<link to="40" input="1" from="12" output="0" />
-		<link to="41" input="0" from="40" output="0" />
-		<link to="13" input="1" from="14" output="1" />
-		<link to="15" input="1" from="13" output="0" />
-		<link to="16" input="1" from="15" output="0" />
-		<link to="40" input="0" from="16" output="0" />
-		<link to="19" input="1" from="39" output="0" />
-		<link to="1" input="1" from="19" output="0" />
-		<link to="20" input="1" from="38" output="0" />
-		<link to="3" input="1" from="20" output="0" />
-		<link to="21" input="1" from="37" output="0" />
-		<link to="4" input="1" from="21" output="0" />
-		<link to="22" input="1" from="36" output="0" />
-		<link to="17" input="1" from="22" output="0" />
-		<link to="24" input="1" from="23" output="0" />
-		<link to="11" input="1" from="24" output="0" />
-		<link to="25" input="1" from="18" output="0" />
-		<link to="14" input="1" from="25" output="0" />
-		<link to="28" input="1" from="29" output="0" />
-		<link to="27" input="1" from="28" output="0" />
-		<link to="19" input="0" from="30" output="0" />
-		<link to="20" input="0" from="30" output="0" />
-		<link to="21" input="0" from="30" output="0" />
-		<link to="22" input="0" from="30" output="0" />
-		<link to="28" input="0" from="30" output="0" />
-		<link to="25" input="0" from="30" output="0" />
-		<link to="24" input="0" from="30" output="0" />
-		<link to="42" input="2" from="41" output="0" />
-		<link to="33" input="0" from="32" output="0" />
-		<link to="31" input="1" from="33" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.jpg
deleted file mode 100644
index b76bdf5..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/fools_gold.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.bcm
deleted file mode 100644
index 5838eb9..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.bcm
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.80000, 0.80000)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="878, 186" />
-		<node type="MIX_SHADER" fac="0.5" loc="592, 198" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.86666, 1.0, 1.0, 1.0)" roughness="0.20000" loc="390, 315" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.20000" loc="396, 109" />
-		<node type="MATH" operation="DIVIDE" use_clamp="False" value1="0.5" value2="5.0" loc="182, 188" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="15.0" loc="-702, -28" />
-		<node type="RGBTOBW" color="rgba(0.5, 0.5, 0.5, 1.0)" loc="-221, -66" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="0.5" loc="-19, -32" />
-		<node type="TEX_NOISE" scale="10.0" detail="2.0" distortion="0.0" loc="-687, 259" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="15.0" value2="4.0" loc="-893, 268" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.75" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-479, -20" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="-64, 307" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="1.0" loc="-271, 56" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="15.0" loc="-1242, 75" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="3" input="1" from="4" output="0" />
-		<link to="11" input="0" from="12" output="0" />
-		<link to="4" input="0" from="11" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="1" input="2" from="3" output="0" />
-		<link to="2" input="1" from="4" output="0" />
-		<link to="3" input="0" from="7" output="0" />
-		<link to="7" input="0" from="6" output="0" />
-		<link to="10" input="1" from="8" output="0" />
-		<link to="10" input="2" from="5" output="0" />
-		<link to="12" input="0" from="10" output="0" />
-		<link to="6" input="0" from="10" output="0" />
-		<link to="8" input="1" from="9" output="0" />
-		<link to="9" input="0" from="13" output="0" />
-		<link to="5" input="1" from="13" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.jpg
deleted file mode 100644
index ad8ff45..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/metals/galvanized_steel.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.bcm
deleted file mode 100644
index 683282d..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.bcm
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.80000, 0.80000)" sample_lamp="True">
-	<nodes>
-		<node type="BSDF_DIFFUSE" color="rgba(0.07457, 0.07457, 0.07457, 1.0)" roughness="0.0" loc="653, 127" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="300.0" loc="655, 6" />
-		<node type="OUTPUT_MATERIAL" loc="3169, 115" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.0, 0.15665, 0.0, 1.0)" roughness="1.0" loc="-358, 276" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.01193, 0.02232, 0.0, 1.0)" roughness="0.0" loc="-364, 166" />
-		<node type="MIX_SHADER" fac="0.5" loc="76, 296" />
-		<node type="MIX_SHADER" fac="0.5" loc="142, -51" />
-		<node type="MIX_SHADER" fac="0.5" loc="362, 387" />
-		<node type="TEX_NOISE" scale="75.0" detail="2.0" distortion="0.0" loc="-366, 464" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.01066, 0.02866, 0.00134, 1.0)" roughness="1.0" loc="-282, -179" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="952, 303" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="0.19999" contrast="1.0" loc="769, 417" />
-		<node type="TEX_NOISE" scale="10.0" detail="5.0" distortion="1.0" loc="530, 545" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="250.0" loc="1103, -226" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.08599, 0.19126, 0.00800, 1.0)" roughness="1.0" loc="-285, -301" />
-		<node type="MIX_SHADER" fac="0.5" loc="1355, 217" />
-		<node type="TEX_NOISE" scale="15.0" detail="5.0" distortion="0.0" loc="1386, 54" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="0.0" contrast="1.0" loc="1574, -19" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.0, 0.0, 0.0, 1.0)" color2="rgba(1.0, 1.0, 1.0, 1.0)" loc="1735, 547" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="1765, -133" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.0, 0.0, 0.0, 1.0)" color2="rgba(1.0, 1.0, 1.0, 1.0)" loc="2217, 3" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.01405, 0.03752, 0.01255, 1.0)" roughness="1.0" loc="64, 137" />
-		<node type="TEX_NOISE" scale="100.0" detail="2.0" distortion="5.0" loc="74, 532" />
-		<node type="MIX_SHADER" fac="0.5" loc="1956, 336" />
-		<node type="TEX_NOISE" scale="10.0" detail="5.0" distortion="0.5" loc="1296, 683" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="2.0" contrast="20.0" loc="1523, 638" />
-		<node type="BRIGHTCONTRAST" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="2.0" contrast="20.0" loc="2054, 46" />
-		<node type="TEX_NOISE" scale="10.0" detail="5.0" distortion="0.5" loc="1880, 138" />
-		<node type="HUE_SAT" hue="0.5" saturation="1.0" value="500.0" fac="1.0" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="1961, -95" />
-		<node type="TEX_NOISE" scale="300.0" detail="5.0" distortion="0.0" loc="1092, -25" />
-		<node type="INVERT" fac="1.0" color="rgba(0.0, 0.0, 0.0, 1.0)" loc="2494, -41" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.0, 0.0, 0.0, 1.0)" color2="rgba(1.0, 1.0, 1.0, 1.0)" loc="2370, -135" />
-		<node type="TEX_NOISE" scale="50.0" detail="5.0" distortion="0.0" loc="-355, 15" />
-	</nodes>
-	<links>
-		<link to="2" input="0" from="23" output="0" />
-		<link to="2" input="2" from="30" output="0" />
-		<link to="5" input="1" from="3" output="0" />
-		<link to="5" input="2" from="4" output="0" />
-		<link to="7" input="1" from="5" output="0" />
-		<link to="7" input="2" from="21" output="0" />
-		<link to="6" input="1" from="9" output="0" />
-		<link to="6" input="2" from="14" output="0" />
-		<link to="15" input="1" from="7" output="0" />
-		<link to="15" input="2" from="6" output="0" />
-		<link to="11" input="0" from="12" output="1" />
-		<link to="15" input="0" from="10" output="0" />
-		<link to="10" input="0" from="11" output="0" />
-		<link to="5" input="0" from="8" output="1" />
-		<link to="7" input="0" from="22" output="1" />
-		<link to="6" input="0" from="32" output="1" />
-		<link to="19" input="1" from="29" output="1" />
-		<link to="19" input="2" from="13" output="1" />
-		<link to="28" input="4" from="19" output="0" />
-		<link to="17" input="0" from="16" output="1" />
-		<link to="19" input="0" from="17" output="0" />
-		<link to="23" input="2" from="15" output="0" />
-		<link to="25" input="0" from="24" output="1" />
-		<link to="23" input="0" from="18" output="0" />
-		<link to="18" input="0" from="25" output="0" />
-		<link to="26" input="0" from="27" output="1" />
-		<link to="20" input="0" from="26" output="0" />
-		<link to="31" input="0" from="20" output="0" />
-		<link to="30" input="1" from="31" output="0" />
-		<link to="31" input="2" from="28" output="0" />
-		<link to="23" input="1" from="0" output="0" />
-		<link to="31" input="1" from="1" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.jpg
deleted file mode 100644
index 81b2db0..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/forest.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.bcm
deleted file mode 100644
index cf89843..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.bcm
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.80000, 0.80000)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.5" loc="87, 374" />
-		<node type="EMISSION" color="rgba(0.54981, 0.25838, 0.0, 1.0)" strength="1.0" loc="-100, 422" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="3.0" loc="-315, 423" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.25" loc="-321, 208" />
-		<node type="MIX_SHADER" fac="0.25" loc="-98, 291" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.75" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-317, 68" />
-		<node type="INVERT" fac="1.0" color="rgba(0.0, 0.0, 0.0, 1.0)" loc="-511, 26" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="5.0" loc="-709, 153" />
-		<node type="TEX_COORD" loc="-941, 183" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="50.0" loc="-709, 316" />
-		<node type="OUTPUT_MATERIAL" loc="285, 296" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.10000, 0.10000, 0.10000, 1.0)" roughness="0.0" loc="-317, 319" />
-	</nodes>
-	<links>
-		<link to="2" input="0" from="7" output="1" />
-		<link to="4" input="1" from="11" output="0" />
-		<link to="0" input="1" from="1" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="0" input="2" from="4" output="0" />
-		<link to="4" input="2" from="3" output="0" />
-		<link to="7" input="0" from="8" output="3" />
-		<link to="9" input="0" from="8" output="3" />
-		<link to="6" input="1" from="7" output="1" />
-		<link to="5" input="2" from="6" output="0" />
-		<link to="5" input="1" from="9" output="1" />
-		<link to="10" input="2" from="5" output="0" />
-		<link to="10" input="0" from="0" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.jpg
deleted file mode 100644
index 3836ed3..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/lava.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.bcm
deleted file mode 100644
index 759721a..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.bcm
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.76051, 0.76051, 0.56025)" sample_lamp="True">
-	<nodes>
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.99220, 0.81102, 1.0)" roughness="0.05000" loc="-556, 423" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.5" loc="-572, 29" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="-572, -148" />
-		<node type="MIX_SHADER" fac="0.5" loc="-41, 177" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="-34, -3" />
-		<node type="MIX_SHADER" fac="0.5" loc="-291, 33" />
-		<node type="MIX_SHADER" fac="0.5" loc="-289, 253" />
-		<node type="BSDF_DIFFUSE" color="rgba(1.0, 0.99220, 0.81102, 1.0)" roughness="0.0" loc="-569, 231" />
-		<node type="MIX_SHADER" fac="0.10000" loc="191, 130" />
-		<node type="OUTPUT_MATERIAL" loc="451, 150" />
-	</nodes>
-	<links>
-		<link to="9" input="0" from="8" output="0" />
-		<link to="3" input="1" from="6" output="0" />
-		<link to="6" input="1" from="0" output="0" />
-		<link to="8" input="1" from="3" output="0" />
-		<link to="6" input="2" from="7" output="0" />
-		<link to="5" input="1" from="1" output="0" />
-		<link to="5" input="2" from="2" output="0" />
-		<link to="3" input="2" from="5" output="0" />
-		<link to="8" input="2" from="4" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.jpg
deleted file mode 100644
index 162b98f..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/nature/pearl.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.bcm
deleted file mode 100644
index 41f0350..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.bcm
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.99730, 0.01052, 0.01052)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="520, 292" />
-		<node type="MIX_SHADER" fac="0.87999" loc="320, 292" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.67269, 0.19188, 0.19725, 1.0)" roughness="0.11998" loc="120, 292" />
-		<node type="MIX_SHADER" fac="0.05000" loc="116, 157" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.74998, 0.22974, 0.23562, 1.0)" loc="-83, 13" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.91029, 0.00455, 0.00455, 1.0)" roughness="0.11999" loc="-80, 148" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="1" input="2" from="3" output="0" />
-		<link to="3" input="1" from="5" output="0" />
-		<link to="3" input="2" from="4" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.jpg
deleted file mode 100644
index 796fcbe..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/plastics/toy_brick_red.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.bcm
deleted file mode 100644
index a2e2e5c..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.bcm
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.80000, 0.80000)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="572, 314" />
-		<node type="VALTORGB" interpolation="B_SPLINE" fac="0.5" stops="3" stop1="0.0|rgba(1.0, 1.0, 1.0, 1.0)" stop2="0.09772|rgba(0.0, 0.0, 0.0, 1.0)" stop3="0.15454|rgba(0.0, 0.0, 0.0, 1.0)" loc="-1016, 194" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.86315, 0.73791, 0.65140, 1.0)" roughness="0.0" loc="-817, 539" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.13812, 0.12151, 1.0)" roughness="0.30000" loc="-474, 186" />
-		<node type="RGBTOBW" color="rgba(0.5, 0.5, 0.5, 1.0)" loc="-119, 17" />
-		<node type="MIX_SHADER" fac="0.20000" loc="-212, 252" />
-		<node type="MIX_SHADER" fac="0.5" loc="-14, 419" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.30000" loc="34, 69" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="10.0" loc="-1255, 93" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.86315, 0.73791, 0.65140, 1.0)" roughness="0.30000" loc="-864, 409" />
-		<node type="MIX_SHADER" fac="0.10000" loc="-397, 491" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.13812, 0.12151, 1.0)" roughness="0.10000" loc="-598, 23" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="6" output="0" />
-		<link to="0" input="2" from="7" output="0" />
-		<link to="1" input="0" from="8" output="0" />
-		<link to="4" input="0" from="1" output="0" />
-		<link to="6" input="0" from="1" output="0" />
-		<link to="10" input="1" from="2" output="0" />
-		<link to="6" input="1" from="10" output="0" />
-		<link to="10" input="2" from="9" output="0" />
-		<link to="7" input="0" from="4" output="0" />
-		<link to="5" input="1" from="3" output="0" />
-		<link to="6" input="2" from="5" output="0" />
-		<link to="5" input="2" from="11" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.jpg
deleted file mode 100644
index 93e7340..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/skin/pox.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.bcm
deleted file mode 100644
index ef2d70c..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.bcm
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.85058, 0.84081, 0.85058)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="1.0" color1="rgba(0.0, 0.0, 1.0, 1.0)" color2="rgba(0.0, 0.0, 1.0, 1.0)" loc="-199, -49" />
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="1.0" color1="rgba(1.0, 0.0, 0.0, 1.0)" color2="rgba(0.0, 0.0, 1.0, 1.0)" loc="-199, 290" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(0.0, 0.0, 1.0, 1.0)" roughness="0.0" ior="1.44000" loc="-51, -51" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(1.0, 0.0, 0.0, 1.0)" roughness="0.0" ior="1.39999" loc="-51, 286" />
-		<node type="ADD_SHADER" loc="128, 236" />
-		<node type="ADD_SHADER" loc="297, 173" />
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="1.0" color1="rgba(0.0, 1.0, 0.0, 1.0)" color2="rgba(0.0, 0.0, 1.0, 1.0)" loc="-199, 119" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.10000" value2="0.10000" loc="-687, 119" />
-		<node type="SEPRGB" image="rgba(1.0, 1.0, 1.0, 1.0)" loc="-334, 119" />
-		<node type="BSDF_GLASS" distribution="BECKMANN" color="rgba(0.0, 1.0, 0.0, 1.0)" roughness="0.0" ior="2.46000" loc="-51, 119" />
-		<node type="ADD_SHADER" loc="466, 119" />
-		<node type="OUTPUT_MATERIAL" loc="642, 119" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="2.46000" value2="0.5" loc="-493, -67" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="2.46000" value2="0.5" loc="-493, 287" />
-	</nodes>
-	<links>
-		<link to="11" input="0" from="10" output="0" />
-		<link to="5" input="0" from="4" output="0" />
-		<link to="10" input="0" from="5" output="0" />
-		<link to="4" input="0" from="3" output="0" />
-		<link to="5" input="1" from="9" output="0" />
-		<link to="10" input="1" from="2" output="0" />
-		<link to="6" input="2" from="8" output="1" />
-		<link to="3" input="0" from="1" output="0" />
-		<link to="9" input="0" from="6" output="0" />
-		<link to="2" input="0" from="0" output="0" />
-		<link to="2" input="2" from="12" output="0" />
-		<link to="3" input="2" from="13" output="0" />
-		<link to="12" input="1" from="7" output="0" />
-		<link to="13" input="1" from="7" output="0" />
-		<link to="0" input="2" from="8" output="2" />
-		<link to="1" input="2" from="8" output="0" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.jpg
deleted file mode 100644
index a16a4ff..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/diamond.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.bcm
deleted file mode 100644
index 340a5ef..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.bcm
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.08228, 0.33245, 0.09529)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.05000" loc="382, 116" />
-		<node type="MIX_SHADER" fac="0.5" loc="105, 116" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="105, -14" />
-		<node type="LAYER_WEIGHT" blend="0.10000" loc="105, 258" />
-		<node type="GAMMA" color="rgba(1.0, 1.0, 1.0, 1.0)" gamma="0.5" loc="-105, 301" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.08229, 0.33015, 0.09638, 1.0)" roughness="0.0" loc="-324, 116" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.0, 0.0, 0.0, 1.0)" roughness="0.25" loc="-324, -14" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="5.0" loc="-324, 301" />
-		<node type="MATH" operation="DIVIDE" use_clamp="False" value1="200.0" value2="4.0" loc="-613, 116" />
-		<node type="OUTPUT_MATERIAL" loc="590, 116" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="200.0" loc="-613, 301" />
-		<node type="VALUE" value="1.79999" loc="-791, 101" />
-		<node type="TEX_COORD" loc="-988, 301" />
-	</nodes>
-	<links>
-		<link to="9" input="0" from="0" output="0" />
-		<link to="1" input="1" from="5" output="0" />
-		<link to="0" input="1" from="1" output="0" />
-		<link to="1" input="2" from="6" output="0" />
-		<link to="4" input="0" from="7" output="0" />
-		<link to="1" input="0" from="4" output="0" />
-		<link to="0" input="2" from="2" output="0" />
-		<link to="0" input="0" from="3" output="0" />
-		<link to="7" input="0" from="10" output="1" />
-		<link to="7" input="1" from="8" output="0" />
-		<link to="10" input="1" from="11" output="0" />
-		<link to="8" input="0" from="11" output="0" />
-		<link to="10" input="0" from="12" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.jpg
deleted file mode 100644
index 98f79b6..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/malachite.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.bcm
deleted file mode 100644
index a9e5699..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.bcm
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.16230, 0.15524, 0.16953)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="1054, 111" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.02451, 0.02451, 0.02451, 1.0)" roughness="0.0" loc="-197, 192" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.0, 0.0, 0.0, 1.0)" roughness="0.0" loc="-198, 48" />
-		<node type="MIX_SHADER" fac="0.75" loc="115, 181" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.07092, 0.16557, 0.28448, 1.0)" color2="rgba(0.31448, 0.09621, 0.09221, 1.0)" loc="-454, 211" />
-		<node type="TEX_VORONOI" coloring="CELLS" scale="50.0" loc="-736, 301" />
-		<node type="MIX_SHADER" fac="0.10000" loc="814, 122" />
-		<node type="LAYER_WEIGHT" blend="0.5" loc="519, 339" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.57559, 0.57559, 0.57559, 1.0)" roughness="0.0" loc="519, -99" />
-		<node type="MIX_SHADER" fac="0.30000" loc="519, 159" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.22966, 0.22966, 0.22966, 1.0)" roughness="0.10000" loc="115, -17" />
-		<node type="RGB" custom_color="rgb(0.24929, 0.58200, 1.0)" label="Fleck Color" color="rgba(0.07092, 0.16557, 0.28448, 1.0)" loc="-1162, 583" />
-		<node type="VALUE" label="Fleck Scale" value="50.0" loc="-1156, 98" />
-		<node type="RGB" custom_color="rgb(1.0, 0.30594, 0.29320)" label="Fleck Color" color="rgba(0.31448, 0.09621, 0.09221, 1.0)" loc="-1167, 388" />
-		<node type="VALUE" label="Bloom Size" value="0.10000" loc="-738, -90" />
-		<node type="RGB" label="Bloom Color" color="rgba(0.22966, 0.22966, 0.22966, 1.0)" loc="-982, 21" />
-		<node type="VALUE" label="Fresnel" value="0.5" loc="-872, 638" />
-		<node type="VALUE" label="Roughness" value="0.01999" loc="-652, -178" />
-		<node type="VALUE" label="Fleck Amount" value="0.75" loc="-1158, 192" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="6" output="0" />
-		<link to="3" input="1" from="1" output="0" />
-		<link to="4" input="0" from="5" output="1" />
-		<link to="1" input="0" from="4" output="0" />
-		<link to="9" input="1" from="3" output="0" />
-		<link to="3" input="2" from="2" output="0" />
-		<link to="6" input="1" from="9" output="0" />
-		<link to="6" input="2" from="8" output="0" />
-		<link to="6" input="0" from="7" output="0" />
-		<link to="9" input="2" from="10" output="0" />
-		<link to="3" input="0" from="18" output="0" />
-		<link to="4" input="1" from="11" output="0" />
-		<link to="4" input="2" from="13" output="0" />
-		<link to="5" input="1" from="12" output="0" />
-		<link to="10" input="0" from="15" output="0" />
-		<link to="7" input="0" from="16" output="0" />
-		<link to="10" input="1" from="14" output="0" />
-		<link to="8" input="1" from="17" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.jpg
deleted file mode 100644
index 8ac973c..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/stones/polished_haematite.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.bcm
deleted file mode 100644
index 53e8e0d..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.bcm
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.19176, 0.19176, 0.19176)" sample_lamp="True">
-	<nodes>
-		<node type="TEX_WAVE" wave="BANDS" scale="80.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-482, 181" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-108, 105" />
-		<node type="TEX_COORD" loc="-1132, -8" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 0.0)" scale="Vector(3.0, 1.5, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-711, 160" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 1.57079)" scale="Vector(1.0, 2.0, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-747, -45" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 0.0)" scale="Vector(4.0, 1.0, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-751, -228" />
-		<node type="TEX_WAVE" wave="BANDS" scale="30.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-462, -29" />
-		<node type="BSDF_GLOSSY" distribution="GGX" color="rgba(0.69505, 0.69505, 0.69505, 1.0)" roughness="0.20000" loc="-101, 252" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.04176, 0.04176, 0.04176, 1.0)" color2="rgba(0.00326, 0.00326, 0.00326, 1.0)" loc="-244, 330" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="-103, 351" />
-		<node type="FRESNEL" ior="1.45000" loc="-101, 437" />
-		<node type="MIX_SHADER" fac="0.5" loc="101, 382" />
-		<node type="ADD_SHADER" loc="291, 346" />
-		<node type="OUTPUT_MATERIAL" loc="514, 280" />
-		<node type="BSDF_VELVET" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" sigma="0.20000" loc="95, 256" />
-		<node type="LAYER_WEIGHT" blend="0.5" loc="-426, 298" />
-		<node type="TEX_WAVE" wave="BANDS" scale="80.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-531, -248" />
-		<node type="TEX_CHECKER" color1="rgba(0.80000, 0.80000, 0.80000, 1.0)" color2="rgba(0.20000, 0.20000, 0.20000, 1.0)" scale="100.0" loc="289, 148" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-3, -147" />
-		<node type="TEX_WAVE" wave="BANDS" scale="30.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-264, -66" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Checker Scale" value="100.0" loc="-1003, 385" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.5, 0.5)" label="Large Scale" value="25.0" loc="-1080, 295" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.80000, 0.80000)" label="Small Scale" value="200.0" loc="-1090, 198" />
-	</nodes>
-	<links>
-		<link to="11" input="1" from="9" output="0" />
-		<link to="8" input="0" from="15" output="1" />
-		<link to="9" input="0" from="8" output="0" />
-		<link to="12" input="0" from="11" output="0" />
-		<link to="11" input="0" from="10" output="0" />
-		<link to="13" input="0" from="12" output="0" />
-		<link to="11" input="2" from="7" output="0" />
-		<link to="12" input="1" from="14" output="0" />
-		<link to="13" input="2" from="17" output="0" />
-		<link to="0" input="0" from="4" output="0" />
-		<link to="4" input="0" from="2" output="2" />
-		<link to="3" input="0" from="2" output="2" />
-		<link to="16" input="0" from="5" output="0" />
-		<link to="5" input="0" from="2" output="2" />
-		<link to="6" input="0" from="5" output="0" />
-		<link to="19" input="0" from="4" output="0" />
-		<link to="1" input="1" from="0" output="0" />
-		<link to="1" input="2" from="6" output="0" />
-		<link to="18" input="1" from="19" output="0" />
-		<link to="18" input="2" from="16" output="0" />
-		<link to="17" input="2" from="18" output="0" />
-		<link to="17" input="0" from="3" output="0" />
-		<link to="17" input="1" from="1" output="0" />
-		<link to="6" input="1" from="21" output="0" />
-		<link to="19" input="1" from="21" output="0" />
-		<link to="0" input="1" from="22" output="0" />
-		<link to="16" input="1" from="22" output="0" />
-		<link to="17" input="3" from="20" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.jpg
deleted file mode 100644
index 013709e..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.bcm
deleted file mode 100644
index ba15bda..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.bcm
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.19999, 0.19999, 0.19999)" sample_lamp="True">
-	<nodes>
-		<node type="LAYER_WEIGHT" blend="0.5" loc="-356, 72" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.21049, 0.21049, 0.21049, 1.0)" color2="rgba(0.00326, 0.00326, 0.00326, 1.0)" loc="-186, 88" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="-58, 96" />
-		<node type="BSDF_VELVET" color="rgba(0.53048, 0.53048, 0.53048, 1.0)" sigma="0.10000" loc="-65, 0" />
-		<node type="MIX_SHADER" fac="0.5" loc="113, 161" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.15031, 0.15031, 0.15031, 1.0)" roughness="0.05000" loc="117, 26" />
-		<node type="MIX_SHADER" fac="0.5" loc="293, 86" />
-		<node type="OUTPUT_MATERIAL" loc="476, 82" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 0.0)" scale="Vector(3.0, 1.5, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1471, 150" />
-		<node type="TEX_WAVE" wave="BANDS" scale="80.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-1242, 171" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-868, 95" />
-		<node type="TEX_COORD" loc="-1892, -18" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 1.57079)" scale="Vector(1.0, 2.0, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1507, -55" />
-		<node type="MAPPING" hide="True" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 0.0)" scale="Vector(4.0, 1.0, 1.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1511, -238" />
-		<node type="TEX_WAVE" wave="BANDS" scale="30.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-1222, -39" />
-		<node type="TEX_WAVE" wave="BANDS" scale="80.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-1291, -258" />
-		<node type="TEX_WAVE" wave="BANDS" scale="30.0" distortion="0.0" detail="2.0" detail_scale="1.0" loc="-1024, -76" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Checker Scale" value="100.0" loc="-1763, 375" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.5, 0.5)" label="Large Scale" value="25.0" loc="-1840, 285" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.80000, 0.80000)" label="Small Scale" value="200.0" loc="-1850, 188" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.5, 0.5, 0.5, 1.0)" loc="-816, -98" />
-		<node type="TEX_CHECKER" color1="rgba(0.80000, 0.80000, 0.80000, 1.0)" color2="rgba(0.20000, 0.20000, 0.20000, 1.0)" scale="100.0" loc="-577, 152" />
-	</nodes>
-	<links>
-		<link to="1" input="0" from="0" output="1" />
-		<link to="2" input="0" from="1" output="0" />
-		<link to="4" input="1" from="2" output="0" />
-		<link to="6" input="1" from="4" output="0" />
-		<link to="7" input="0" from="6" output="0" />
-		<link to="6" input="2" from="5" output="0" />
-		<link to="4" input="2" from="3" output="0" />
-		<link to="9" input="0" from="12" output="0" />
-		<link to="12" input="0" from="11" output="2" />
-		<link to="8" input="0" from="11" output="2" />
-		<link to="15" input="0" from="13" output="0" />
-		<link to="13" input="0" from="11" output="2" />
-		<link to="14" input="0" from="13" output="0" />
-		<link to="16" input="0" from="12" output="0" />
-		<link to="10" input="1" from="9" output="0" />
-		<link to="10" input="2" from="14" output="0" />
-		<link to="20" input="1" from="16" output="0" />
-		<link to="20" input="2" from="15" output="0" />
-		<link to="21" input="2" from="20" output="0" />
-		<link to="21" input="0" from="8" output="0" />
-		<link to="21" input="1" from="10" output="0" />
-		<link to="14" input="1" from="18" output="0" />
-		<link to="16" input="1" from="18" output="0" />
-		<link to="9" input="1" from="19" output="0" />
-		<link to="15" input="1" from="19" output="0" />
-		<link to="21" input="3" from="17" output="0" />
-		<link to="0" input="0" from="21" output="0" />
-		<link to="4" input="0" from="21" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.jpg
deleted file mode 100644
index 2d2d243..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/carbon_fiber_glossy.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.bcm
deleted file mode 100644
index 94a6f79..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.bcm
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.94999, 0.97200, 1.0)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="717, 99" />
-		<node type="FRESNEL" ior="1.15999" loc="-90, 264" />
-		<node type="MIX_SHADER" fac="0.0" loc="-93, 175" />
-		<node type="BSDF_TRANSLUCENT" color="rgba(0.85499, 0.87512, 0.89999, 1.0)" loc="-332, 92" />
-		<node type="MATH" hide="True" operation="MULTIPLY" use_clamp="False" value1="16.0" value2="0.03999" loc="543, -7" />
-		<node type="TEX_VORONOI" coloring="INTENSITY" scale="20.0" loc="-329, -135" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.85499, 0.87512, 0.89999, 1.0)" roughness="0.0" loc="-333, 198" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.85499, 0.87512, 0.89999, 1.0)" roughness="0.77999" loc="-90, 47" />
-		<node type="RGB" custom_color="rgb(0.89999, 0.89999, 0.89999)" label="Color" color="rgba(0.85500, 0.87512, 0.89999, 1.0)" loc="-935, 174" />
-		<node type="TEX_NOISE" scale="20.0" detail="0.0" distortion="0.0" loc="-714, 73" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="20.0" loc="-899, -71" />
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="0.20000" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.85000, 0.85000, 0.85000, 1.0)" loc="-497, 283" />
-		<node type="MATH" hide="True" operation="DIVIDE" use_clamp="False" value1="-16.0" value2="0.03999" loc="81, -76" />
-		<node type="VALTORGB" interpolation="LINEAR" fac="0.5" stops="2" stop1="0.00909|rgba(1.0, 1.0, 1.0, 1.0)" stop2="0.24545|rgba(1.0, 1.0, 1.0, 0.60000)" loc="88, -132" />
-		<node type="MIX_SHADER" fac="0.20000" loc="399, 152" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="14" output="0" />
-		<link to="14" input="2" from="7" output="0" />
-		<link to="14" input="0" from="1" output="0" />
-		<link to="14" input="1" from="2" output="0" />
-		<link to="2" input="2" from="3" output="0" />
-		<link to="2" input="1" from="6" output="0" />
-		<link to="13" input="0" from="5" output="1" />
-		<link to="5" input="1" from="10" output="0" />
-		<link to="3" input="0" from="8" output="0" />
-		<link to="12" input="1" from="10" output="0" />
-		<link to="4" input="1" from="13" output="1" />
-		<link to="4" input="0" from="12" output="0" />
-		<link to="0" input="2" from="4" output="0" />
-		<link to="9" input="1" from="10" output="0" />
-		<link to="7" input="0" from="8" output="0" />
-		<link to="11" input="1" from="8" output="0" />
-		<link to="6" input="0" from="11" output="0" />
-		<link to="11" input="0" from="9" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.jpg
deleted file mode 100644
index 45b1d1e..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/polystyrene_foam.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.bcm
deleted file mode 100644
index 1c08cfa..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.bcm
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.02120, 0.02120, 0.02120)" sample_lamp="True">
-	<nodes>
-		<node type="BSDF_TRANSLUCENT" color="rgba(1.0, 1.0, 1.0, 1.0)" loc="-178, 225" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.06305, 0.06305, 0.06305, 1.0)" roughness="0.0" loc="-186, 341" />
-		<node type="RGB" color="rgba(0.01164, 0.01164, 0.01164, 1.0)" loc="-551, 376" />
-		<node type="OUTPUT_MATERIAL" loc="300, 300" />
-		<node type="ADD_SHADER" loc="43, 316" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.20000" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(1.0, 1.0, 1.0, 1.0)" loc="-354, 254" />
-	</nodes>
-	<links>
-		<link to="4" input="0" from="1" output="0" />
-		<link to="4" input="1" from="0" output="0" />
-		<link to="1" input="0" from="2" output="0" />
-		<link to="5" input="1" from="2" output="0" />
-		<link to="3" input="0" from="4" output="0" />
-		<link to="0" input="0" from="5" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.jpg
deleted file mode 100644
index 737661e..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/synthetic/rubber.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.bcm
deleted file mode 100644
index d912f5f..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.bcm
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.27171, 0.51361, 0.98764)" sample_lamp="True">
-	<nodes>
-		<node type="RGB" custom_color="rgb(0.66071, 0.73312, 1.0)" label="Denim Color" color="rgba(0.03543, 0.15026, 0.37318, 1.0)" loc="-732, 193" />
-		<node type="TEX_COORD" hide="True" loc="-528, 124" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.30000, 0.30000)" label="Denim Scale" value="40.0" loc="-710, -60" />
-		<node type="TEX_WAVE" hide="True" wave="BANDS" scale="100.0" distortion="0.0" detail="0.0" detail_scale="1.0" loc="-129, -52" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.80000, 0.80000, 0.80000, 1.0)" roughness="0.0" loc="447, 60" />
-		<node type="OUTPUT_MATERIAL" loc="738, 0" />
-		<node type="BRIGHTCONTRAST" hide="True" color="rgba(1.0, 1.0, 1.0, 1.0)" bright="0.40000" contrast="-0.40000" loc="-202, 146" />
-		<node type="TEX_NOISE" hide="True" scale="100.0" detail="2.0" distortion="0.0" loc="-246, 90" />
-		<node type="MIX_RGB" hide="True" blend_type="MIX" use_clamp="False" fac="0.80000" color1="rgba(0.82981, 0.86596, 1.0, 1.0)" color2="rgba(0.06378, 0.15115, 0.47318, 1.0)" loc="36, 135" />
-		<node type="MIX_RGB" hide="True" blend_type="MIX" use_clamp="False" fac="0.80000" color1="rgba(0.52075, 0.62256, 1.0, 1.0)" color2="rgba(0.06378, 0.15115, 0.47318, 1.0)" loc="259, 92" />
-		<node type="MATH" hide="True" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="2.0" loc="-398, 18" />
-	</nodes>
-	<links>
-		<link to="3" input="0" from="1" output="2" />
-		<link to="5" input="0" from="4" output="0" />
-		<link to="7" input="0" from="1" output="2" />
-		<link to="8" input="2" from="0" output="0" />
-		<link to="6" input="0" from="0" output="0" />
-		<link to="10" input="0" from="2" output="0" />
-		<link to="3" input="1" from="2" output="0" />
-		<link to="7" input="1" from="10" output="0" />
-		<link to="4" input="0" from="9" output="0" />
-		<link to="5" input="2" from="3" output="1" />
-		<link to="9" input="2" from="8" output="0" />
-		<link to="8" input="1" from="6" output="0" />
-		<link to="9" input="1" from="0" output="0" />
-		<link to="9" input="0" from="7" output="1" />
-		<link to="8" input="0" from="3" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.jpg
deleted file mode 100644
index 3e1136d..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/denim.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.bcm
deleted file mode 100644
index 00c1064..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.bcm
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.07842, 0.72156)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="242, 136" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.5" loc="-253, 254" />
-		<node type="LAYER_WEIGHT" blend="0.80000" loc="-448, 227" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.01166, 0.0, 0.80000, 1.0)" roughness="0.0" loc="-444, 17" />
-		<node type="MIX_SHADER" fac="0.5" loc="-20, 136" />
-		<node type="BSDF_VELVET" color="rgba(0.80000, 0.07875, 0.71977, 1.0)" sigma="1.0" loc="-475, 114" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="4" output="0" />
-		<link to="4" input="0" from="1" output="0" />
-		<link to="1" input="0" from="2" output="0" />
-		<link to="4" input="1" from="5" output="0" />
-		<link to="4" input="2" from="3" output="0" />
-		<link to="1" input="1" from="2" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.jpg
deleted file mode 100644
index b3d5cc0..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/velvet_edged.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.bcm
deleted file mode 100644
index 81930e1..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.bcm
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.80000, 0.80000, 0.80000)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_SHADER" fac="0.02999" loc="1649, 550" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(0.79909, 0.67243, 0.60382, 1.0)" roughness="0.40000" loc="1451, 489" />
-		<node type="MIX_SHADER" fac="0.69999" loc="1452, 608" />
-		<node type="BSDF_VELVET" color="rgba(0.79909, 0.67243, 0.60382, 1.0)" sigma="0.89999" loc="1243, 532" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.79909, 0.67058, 0.60566, 1.0)" roughness="0.69998" loc="1239, 630" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.79909, 0.51714, 0.32036, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="1011, 555" />
-		<node type="MATH" operation="MINIMUM" use_clamp="False" value1="0.5" value2="0.5" loc="434, 428" />
-		<node type="VALTORGB" interpolation="EASE" fac="0.5" stops="12" stop1="0.0|rgba(1.0, 1.0, 1.0, 0.0)" stop2="0.11362|rgba(1.0, 1.0, 1.0, 0.50182)" stop3="0.18181|rgba(1.0, 1.0, 1.0, 0.00234)" stop4="0.21363|rgba(1.0, 1.0, 1.0, 0.02219)" stop5="0.27272|rgba(1.0, 1.0, 1.0, 0.0)" stop6="0.34545|rgba(1.0, 1.0, 1.0, 0.58626)" stop7="0.41817|rgba(1.0, 1.0, 1.0, 0.02921)" stop8="0.51362|rgba(1.0, 1.0, 1.0, 0.0)" stop9="0.64090|rgba(1.0, 1.0, 1.0, 0.03826)" stop10="0.74545|rgba(1.0, 1.0, 1.0, 1.0)" stop11="0.85453|rgba(1.0, 1.0, 1.0, 0.02249)" stop12="1.0|rgba(1.0, 1.0, 1.0, 0.0)" loc="-140, 400" />
-		<node type="VALTORGB" interpolation="EASE" fac="0.5" stops="10" stop1="0.0|rgba(1.0, 1.0, 1.0, 0.0)" stop2="0.17272|rgba(1.0, 1.0, 1.0, 0.73825)" stop3="0.29998|rgba(1.0, 1.0, 1.0, 0.0)" stop4="0.34999|rgba(1.0, 1.0, 1.0, 0.02642)" stop5="0.43180|rgba(1.0, 1.0, 1.0, 0.05547)" stop6="0.57271|rgba(1.0, 1.0, 1.0, 0.72980)" stop7="0.72272|rgba(1.0, 1.0, 1.0, 0.03361)" stop8="0.81818|rgba(1.0, 1.0, 1.0, 0.0)" stop9="0.91817|rgba(1.0, 1.0, 1.0, 0.32451)" stop10="1.0|rgba(1.0, 1.0, 1.0, 0.0)" loc="-140, 196" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-2.0" loc="150, 222" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="291, 322" />
-		<node type="MATH" operation="DIVIDE" use_clamp="False" value1="0.5" value2="3.0" loc="838, 562" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="2.0" loc="645, 522" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.20000" loc="1049, 184" />
-		<node type="OUTPUT_MATERIAL" loc="1966, 237" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="0.5" value2="0.5" loc="-236, 531" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="30.09999" loc="-913, 464" />
-		<node type="TEX_NOISE" scale="5.0" detail="0.99998" distortion="0.0" loc="-1531, 185" />
-		<node type="TEX_COORD" loc="-1720, 315" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="30.09999" value2="10.0" loc="-1712, 109" />
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="0.99000" color1="rgba(0.5, 0.5, 0.5, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="-1350, 220" />
-		<node type="SEPRGB" image="rgba(0.80000, 0.80000, 0.80000, 1.0)" loc="-1068, 269" />
-		<node type="VECT_MATH" operation="ADD" vector1="Vector(0.5, 0.5, 0.5)" vector2="Vector(0.5, 0.5, 0.5)" loc="-1212, 292" />
-		<node type="MATH" operation="ROUND" use_clamp="False" value1="0.5" value2="0.0" loc="-641, 604" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="-787, 602" />
-		<node type="MATH" operation="SUBTRACT" use_clamp="False" value1="0.5" value2="0.5" loc="-279, 176" />
-		<node type="MATH" operation="ROUND" use_clamp="False" value1="0.5" value2="0.0" loc="-433, 323" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="-600, 341" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="30.09999" loc="-753, 159" />
-		<node type="MATH" operation="ADD" use_clamp="False" value1="0.5" value2="0.5" loc="-902, 159" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="10.0" loc="-1945, 425" />
-	</nodes>
-	<links>
-		<link to="14" input="0" from="0" output="0" />
-		<link to="14" input="2" from="13" output="0" />
-		<link to="9" input="0" from="8" output="1" />
-		<link to="2" input="2" from="3" output="0" />
-		<link to="2" input="1" from="4" output="0" />
-		<link to="10" input="0" from="7" output="1" />
-		<link to="10" input="1" from="9" output="0" />
-		<link to="13" input="0" from="6" output="0" />
-		<link to="6" input="1" from="10" output="0" />
-		<link to="6" input="0" from="7" output="1" />
-		<link to="0" input="2" from="1" output="0" />
-		<link to="17" input="0" from="18" output="2" />
-		<link to="20" input="1" from="17" output="0" />
-		<link to="22" input="0" from="18" output="2" />
-		<link to="22" input="1" from="20" output="0" />
-		<link to="21" input="0" from="22" output="0" />
-		<link to="17" input="1" from="19" output="0" />
-		<link to="0" input="1" from="2" output="0" />
-		<link to="7" input="0" from="15" output="0" />
-		<link to="8" input="0" from="25" output="0" />
-		<link to="29" input="1" from="21" output="1" />
-		<link to="4" input="0" from="5" output="0" />
-		<link to="3" input="0" from="5" output="0" />
-		<link to="1" input="0" from="5" output="0" />
-		<link to="11" input="0" from="12" output="0" />
-		<link to="5" input="0" from="11" output="0" />
-		<link to="12" input="0" from="6" output="0" />
-		<link to="16" input="0" from="21" output="0" />
-		<link to="15" input="0" from="23" output="0" />
-		<link to="15" input="1" from="16" output="0" />
-		<link to="23" input="0" from="24" output="0" />
-		<link to="24" input="0" from="16" output="0" />
-		<link to="28" input="0" from="29" output="0" />
-		<link to="25" input="0" from="26" output="0" />
-		<link to="25" input="1" from="28" output="0" />
-		<link to="26" input="0" from="27" output="0" />
-		<link to="27" input="0" from="28" output="0" />
-		<link to="19" input="0" from="30" output="0" />
-		<link to="16" input="1" from="30" output="0" />
-		<link to="29" input="0" from="21" output="0" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.jpg
deleted file mode 100644
index bbda283..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/weave_test.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.bcm
deleted file mode 100644
index cbc9b99..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.bcm
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.30507, 0.03297, 0.13513)" sample_lamp="True">
-	<nodes>
-		<node type="OUTPUT_MATERIAL" loc="500, 250" />
-		<node type="MIX_SHADER" fac="0.5" loc="250, 400" />
-		<node type="BSDF_DIFFUSE" color="rgba(0.48183, 0.00535, 0.0, 1.0)" roughness="0.20000" loc="0, 400" />
-		<node type="BSDF_VELVET" color="rgba(0.18002, 0.14034, 0.64183, 1.0)" sigma="1.0" loc="0, 250" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="-10.60000" loc="250, 100" />
-		<node type="TEX_MAGIC" depth="2" scale="20.94300" distortion="1.0" loc="0, 100" />
-	</nodes>
-	<links>
-		<link to="0" input="0" from="1" output="0" />
-		<link to="1" input="1" from="2" output="0" />
-		<link to="1" input="2" from="3" output="0" />
-		<link to="0" input="2" from="4" output="0" />
-		<link to="4" input="0" from="5" output="1" />
-	</links>
-</material>
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.jpg
deleted file mode 100644
index fe70fc2..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/textiles/woven_wool.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.bcm
deleted file mode 100644
index 60d5be2..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.bcm
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.14084, 0.05520, 0.03290)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="1.0" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="-131, 606" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.23573, 0.23573, 0.23573, 1.0)" loc="-266, 606" />
-		<node type="LAYER_WEIGHT" blend="0.02999" loc="7, 606" />
-		<node type="MIX_SHADER" fac="0.64398" loc="263, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.75" loc="7, 447" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.13197, 0.04244, 0.02085, 1.0)" color2="rgba(0.04010, 0.01503, 0.00737, 1.0)" loc="-266, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.88691, 0.84328, 1.0)" roughness="0.34999" loc="7, 298" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.00200" loc="7, 162" />
-		<node type="TEX_WAVE" wave="RINGS" scale="0.69998" distortion="700.0" detail="4.0" detail_scale="0.25" loc="-474, 672" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.25" loc="-635, 505" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.69998" loc="-771, 557" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="5.0" loc="-809, 281" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="1.0" loc="-1140, 300" />
-		<node type="TEX_COORD" loc="-1490, 554" />
-		<node type="OUTPUT_MATERIAL" loc="460, 390" />
-		<node type="MAPPING" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 1.74532)" scale="Vector(2.0, 0.40000, 10.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1266, 611" />
-		<node type="TEX_WAVE" wave="BANDS" scale="5.0" distortion="30.0" detail="4.42378" detail_scale="5.0" loc="-563, 348" />
-	</nodes>
-	<links>
-		<link to="5" input="0" from="16" output="1" />
-		<link to="7" input="0" from="16" output="1" />
-		<link to="16" input="0" from="15" output="0" />
-		<link to="15" input="0" from="13" output="0" />
-		<link to="3" input="2" from="6" output="0" />
-		<link to="14" input="0" from="3" output="0" />
-		<link to="3" input="1" from="4" output="0" />
-		<link to="3" input="0" from="2" output="1" />
-		<link to="14" input="2" from="7" output="0" />
-		<link to="8" input="0" from="15" output="0" />
-		<link to="1" input="0" from="8" output="1" />
-		<link to="4" input="0" from="0" output="0" />
-		<link to="0" input="2" from="5" output="0" />
-		<link to="9" input="0" from="12" output="0" />
-		<link to="8" input="4" from="9" output="0" />
-		<link to="10" input="0" from="12" output="0" />
-		<link to="8" input="1" from="10" output="0" />
-		<link to="11" input="0" from="12" output="0" />
-		<link to="16" input="4" from="11" output="0" />
-		<link to="16" input="1" from="11" output="0" />
-		<link to="0" input="1" from="1" output="0" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.jpg
deleted file mode 100644
index e4bcae1..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/polished_walnut.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.bcm
deleted file mode 100644
index 853b7f6..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.bcm
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.59719, 0.43964, 0.25415)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.71174, 0.58495, 0.47878, 1.0)" loc="-266, 606" />
-		<node type="LAYER_WEIGHT" blend="0.00498" loc="7, 606" />
-		<node type="MIX_SHADER" fac="0.64398" loc="263, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.80000" loc="7, 447" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.83196, 0.60834, 0.35504, 1.0)" color2="rgba(0.61368, 0.48484, 0.29545, 1.0)" loc="-266, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.88691, 0.84328, 1.0)" roughness="0.89999" loc="7, 298" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.02999" loc="7, 162" />
-		<node type="TEX_WAVE" wave="RINGS" scale="0.69998" distortion="750.0" detail="4.0" detail_scale="0.25" loc="-474, 672" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.27000" loc="-635, 505" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.69998" loc="-771, 557" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="5.09997" loc="-809, 281" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="1.0" loc="-1140, 300" />
-		<node type="TEX_COORD" loc="-1490, 554" />
-		<node type="OUTPUT_MATERIAL" loc="460, 390" />
-		<node type="MAPPING" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 1.74532)" scale="Vector(2.0, 0.40000, 10.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1266, 611" />
-		<node type="TEX_WAVE" wave="BANDS" scale="5.0" distortion="30.0" detail="4.42378" detail_scale="5.0" loc="-563, 348" />
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="0.80000" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="-131, 606" />
-	</nodes>
-	<links>
-		<link to="4" input="0" from="15" output="1" />
-		<link to="6" input="0" from="15" output="1" />
-		<link to="15" input="0" from="14" output="0" />
-		<link to="14" input="0" from="12" output="0" />
-		<link to="2" input="2" from="5" output="0" />
-		<link to="13" input="0" from="2" output="0" />
-		<link to="2" input="1" from="3" output="0" />
-		<link to="2" input="0" from="1" output="1" />
-		<link to="13" input="2" from="6" output="0" />
-		<link to="7" input="0" from="14" output="0" />
-		<link to="0" input="0" from="7" output="1" />
-		<link to="3" input="0" from="16" output="0" />
-		<link to="8" input="0" from="11" output="0" />
-		<link to="7" input="4" from="8" output="0" />
-		<link to="9" input="0" from="11" output="0" />
-		<link to="7" input="1" from="9" output="0" />
-		<link to="10" input="0" from="11" output="0" />
-		<link to="15" input="4" from="10" output="0" />
-		<link to="15" input="1" from="10" output="0" />
-		<link to="16" input="2" from="0" output="0" />
-		<link to="16" input="1" from="4" output="0" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.jpg
deleted file mode 100644
index 991bcf8..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_pine.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.bcm b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.bcm
deleted file mode 100644
index 207a053..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.bcm
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<material view_color="rgb(0.06847, 0.02518, 0.01520)" sample_lamp="True">
-	<nodes>
-		<node type="MIX_RGB" blend_type="MULTIPLY" use_clamp="False" fac="1.0" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.0, 0.0, 0.0, 1.0)" loc="-131, 606" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(1.0, 1.0, 1.0, 1.0)" color2="rgba(0.23573, 0.23573, 0.23573, 1.0)" loc="-266, 606" />
-		<node type="LAYER_WEIGHT" blend="0.00999" loc="7, 606" />
-		<node type="MIX_SHADER" fac="0.64398" loc="263, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 1.0, 1.0, 1.0)" roughness="0.80000" loc="7, 447" />
-		<node type="MIX_RGB" blend_type="MIX" use_clamp="False" fac="0.5" color1="rgba(0.13197, 0.04244, 0.02085, 1.0)" color2="rgba(0.04010, 0.01503, 0.00737, 1.0)" loc="-266, 447" />
-		<node type="BSDF_GLOSSY" distribution="BECKMANN" color="rgba(1.0, 0.88691, 0.84328, 1.0)" roughness="0.69998" loc="7, 298" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.02999" loc="7, 162" />
-		<node type="TEX_WAVE" wave="RINGS" scale="0.69998" distortion="700.0" detail="4.0" detail_scale="0.25" loc="-474, 672" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.25" loc="-635, 505" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="0.69998" loc="-771, 557" />
-		<node type="MATH" operation="MULTIPLY" use_clamp="False" value1="0.5" value2="5.0" loc="-809, 281" />
-		<node type="VALUE" custom_color="rgb(1.0, 0.10000, 0.10000)" label="Scale" value="1.0" loc="-1140, 300" />
-		<node type="TEX_COORD" loc="-1490, 554" />
-		<node type="OUTPUT_MATERIAL" loc="460, 390" />
-		<node type="MAPPING" translation="Vector(0.0, 0.0, 0.0)" rotation="Vector(0.0, 0.0, 1.74532)" scale="Vector(2.0, 0.40000, 10.0)" use_min="False" use_max="False" vector="Vector(0.0, 0.0, 0.0)" loc="-1266, 611" />
-		<node type="TEX_WAVE" wave="BANDS" scale="5.0" distortion="30.0" detail="4.42378" detail_scale="5.0" loc="-563, 348" />
-	</nodes>
-	<links>
-		<link to="5" input="0" from="16" output="1" />
-		<link to="7" input="0" from="16" output="1" />
-		<link to="16" input="0" from="15" output="0" />
-		<link to="15" input="0" from="13" output="0" />
-		<link to="3" input="2" from="6" output="0" />
-		<link to="14" input="0" from="3" output="0" />
-		<link to="3" input="1" from="4" output="0" />
-		<link to="3" input="0" from="2" output="1" />
-		<link to="14" input="2" from="7" output="0" />
-		<link to="8" input="0" from="15" output="0" />
-		<link to="1" input="0" from="8" output="1" />
-		<link to="4" input="0" from="0" output="0" />
-		<link to="0" input="2" from="5" output="0" />
-		<link to="9" input="0" from="12" output="0" />
-		<link to="8" input="4" from="9" output="0" />
-		<link to="10" input="0" from="12" output="0" />
-		<link to="8" input="1" from="10" output="0" />
-		<link to="11" input="0" from="12" output="0" />
-		<link to="16" input="4" from="11" output="0" />
-		<link to="16" input="1" from="11" output="0" />
-		<link to="0" input="1" from="1" output="0" />
-	</links>
-</material>
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.jpg
deleted file mode 100644
index 98c2699..0000000
Binary files a/release/scripts/addons_contrib/online_mat_lib/material-library/bundled/cycles/wood/rough_walnut.jpg and /dev/null differ
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/mat_lib_preview_image.jpg b/release/scripts/addons_contrib/online_mat_lib/material-library/mat_lib_preview_image.jpg
deleted file mode 100644
index e69de29..0000000
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/my-materials/read-me.txt b/release/scripts/addons_contrib/online_mat_lib/material-library/my-materials/read-me.txt
deleted file mode 100644
index 33b816b..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/my-materials/read-me.txt
+++ /dev/null
@@ -1 +0,0 @@
-This is the folder location for your personal saved materials.
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/release/cycles/revision_data.ini b/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/release/cycles/revision_data.ini
deleted file mode 100644
index cac98a4..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/release/cycles/revision_data.ini
+++ /dev/null
@@ -1 +0,0 @@
-revision=001
diff --git a/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/testing/cycles/revision_data.ini b/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/testing/cycles/revision_data.ini
deleted file mode 100644
index cac98a4..0000000
--- a/release/scripts/addons_contrib/online_mat_lib/material-library/peter.cassetta.info/testing/cycles/revision_data.ini
+++ /dev/null
@@ -1 +0,0 @@
-revision=001
diff --git a/release/scripts/addons_contrib/oscurart_futurism.py b/release/scripts/addons_contrib/oscurart_futurism.py
deleted file mode 100644
index 6a3d7bc..0000000
--- a/release/scripts/addons_contrib/oscurart_futurism.py
+++ /dev/null
@@ -1,150 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Futurism",
-    "author": "Oscurart",
-    "version": (1, 2),
-    "blender": (2, 6, 3),
-    "location": "Object > Futurism",
-    "description": "Adds a new Mesh Object",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Object/Oscurart_Futurism",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-                   "unc=detail&aid=31911",
-    "category": "Add Mesh"}
-
-
-import bpy
-
-def object_osc_futurism (self, context,STEP, HOLD):
-    ACTOBJ=bpy.context.active_object # OBJETO ACTIVO
-    FS=bpy.context.scene.frame_start # FRAME START
-    FE=bpy.context.scene.frame_end # FRAME END
-    OBJLIST=[] # LISTA PARA OBJETOS ????
-    FC=FS # FRAME CURRENT
-    OBJNUMBER=1 # SUFIJO DE NUMERO PARA OBJETOS
-    STEPINC=0 # NUMERO PARA EVALUAR LOS PASOS        
-    bpy.context.scene.frame_set(FS)  # SETEO EL FRAME CURRENT    
-    OBACT = bpy.context.active_object # SETEO EL OBJETO ACTIVO
-    
-    ## CREO EMPTY
-    bpy.ops.object.add()
-    bpy.context.active_object.name = "FuturismContainer"
-    EMPTY = bpy.context.active_object   
-    
-    # SUMO PARAMETERS AL EMPTY
-    EMPTY["FUTURISM_HOLDIN"] = 0
-    EMPTY["FUTURISM_HOLDOUT"] = 0    
-    
-    bpy.context.scene.objects.active = OBACT  # RECUPERO OBJETO ACTIVO 
-    
-    for OBJETO in range((FE+1)-FS):
-        if STEPINC == STEP:
-            # CREO UN MESH A PARTIR DE OBJETO
-            MESH=ACTOBJ.to_mesh(bpy.context.scene, True, 'PREVIEW')
-            # CREO OBJETO
-            OBJECT=bpy.data.objects.new(ACTOBJ.name[:3]+str(FC), MESH)
-            # CONECTO A LA ESCENA
-            bpy.context.scene.objects.link(OBJECT)
-            # SETEO FRAME CURRENT
-            bpy.context.scene.frame_set(FC)
-            # MARCO EXPRESIONES PARA VIEW
-            OBJECT.driver_add("hide")
-            OBJECT.animation_data.drivers[0].driver.variables.new()
-            OBJECT.animation_data.drivers[0].driver.variables.new()
-            OBJECT.animation_data.drivers[0].driver.variables.new()
-            OBJECT.animation_data.drivers[0].driver.expression= "False if frame >= %s+var_001 and frame <= %s+var_002 else True" % (str(FC),str(FC+HOLD))
-            OBJECT.animation_data.drivers[0].driver.variables[0].targets[0].id_type = 'SCENE'
-            OBJECT.animation_data.drivers[0].driver.variables[0].targets[0].id= bpy.context.scene
-            OBJECT.animation_data.drivers[0].driver.variables[0].targets[0].data_path = "current_frame"
-            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].id= EMPTY
-            OBJECT.animation_data.drivers[0].driver.variables[1].targets[0].data_path = '["FUTURISM_HOLDIN"]'  
-            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].id= EMPTY
-            OBJECT.animation_data.drivers[0].driver.variables[2].targets[0].data_path = '["FUTURISM_HOLDOUT"]'     
-            
-            # MARCO EXPRESIONES PARA RENDER           
-            OBJECT.driver_add("hide_render")
-            OBJECT.animation_data.drivers[1].driver.variables.new()
-            OBJECT.animation_data.drivers[1].driver.variables.new()
-            OBJECT.animation_data.drivers[1].driver.variables.new()         
-            OBJECT.animation_data.drivers[1].driver.expression= "False if frame >= %s+5 and frame <= %s else True" % (str(FC),str(FC+HOLD))
-            OBJECT.animation_data.drivers[1].driver.variables[0].targets[0].id_type = 'SCENE'
-            OBJECT.animation_data.drivers[1].driver.variables[0].targets[0].id= bpy.context.scene
-            OBJECT.animation_data.drivers[1].driver.variables[0].targets[0].data_path = "current_frame"   
-            OBJECT.animation_data.drivers[1].driver.variables[1].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[1].driver.variables[1].targets[0].id= EMPTY
-            OBJECT.animation_data.drivers[1].driver.variables[1].targets[0].data_path = '["FUTURISM_HOLDIN"]'  
-            OBJECT.animation_data.drivers[1].driver.variables[2].targets[0].id_type = 'OBJECT'
-            OBJECT.animation_data.drivers[1].driver.variables[2].targets[0].id= EMPTY
-            OBJECT.animation_data.drivers[1].driver.variables[2].targets[0].data_path = '["FUTURISM_HOLDOUT"]'                       
-            # RESETEO STEPINC
-            STEPINC=0
-            # COPIAMOS S R T
-            OBJECT.matrix_world=ACTOBJ.matrix_world
-            #EMPARENTO
-            OBJECT.parent=EMPTY
-        # AVANZO STEP Y FRAME
-        FC+=1
-        STEPINC+=1    
-
-# CLASE PARA OPERADOR
-class Oscurart_futurism (bpy.types.Operator):
-    bl_idname = "object.duplicate_futurism"
-    bl_label = "Duplicate Futurism"
-    bl_description = "Duplicate object per frame"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    scale = bpy.props.IntProperty(name='Step',default=1, min=1, max=1000)
-    
-    hold = bpy.props.IntProperty(name='Hold', default=0, min=0)
-
-    @classmethod
-    def poll(cls, context):
-        return(bpy.context.active_object.type == "MESH" ) 
-
-    def execute(self, context):
-        object_osc_futurism(self, context, self.scale, self.hold)
-
-        return {'FINISHED'}
-
-
-# Registration
-
-def add_osc_futurism_button(self, context):
-    self.layout.operator(
-        Oscurart_futurism.bl_idname,
-        text="Futurism",
-        icon="PLUGIN")
-
-
-def register():
-    bpy.utils.register_class(Oscurart_futurism)
-    bpy.types.VIEW3D_MT_object.append(add_osc_futurism_button)
-
-
-def unregister():
-    bpy.utils.unregister_class(Oscurart_futurism)
-    bpy.types.VIEW3D_MT_object.remove(add_osc_futurism_button)
-
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/oscurart_mesh_thread.py b/release/scripts/addons_contrib/oscurart_mesh_thread.py
deleted file mode 100644
index c82dfda..0000000
--- a/release/scripts/addons_contrib/oscurart_mesh_thread.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Make Thread Mesh",
-    "author": "Oscurart",
-    "version": (1,0),
-    "blender": (2, 5, 9),
-    "api": 4000,
-    "location": "Add > Mesh > Thread",
-    "description": "Make a thread.",
-    "warning": "",
-    "wiki_url": "oscurart.blogspot.com",
-    "tracker_url": "",
-    "category": "Object"}
-
-
-
-import math
-import bpy
-
-
-def func_osc_screw(self, STRETCH,TURNS,DIAMETER,RESOLUTION):
-    # DATA PARA EL MESH
-    me = bpy.data.meshes.new("threadData")
-    obj = bpy.data.objects.new("Thread", me)     
-    bpy.context.scene.objects.link(obj)  
-      
-    # VARIABLES
-    vertexlist=[]
-    facelist=[]
-    facereset=0     
-    CANTDIV=360/RESOLUTION
-    ESPACIODIV=STRETCH/(TURNS+2+RESOLUTION)
-
-    # PARA CADA VERTICE EN EL RANGO DESDE CERO A LENGTH 
-    for vertice in range(0,TURNS+2+RESOLUTION):        
-        # SUMA EN LA LISTA UN VERTICE       
-        vertexlist.append((math.sin(math.radians(vertice*CANTDIV))*DIAMETER,vertice*ESPACIODIV,math.cos(math.radians(vertice*CANTDIV))*DIAMETER))
-        if vertice > RESOLUTION:
-            facelist.append((vertice-(RESOLUTION),vertice-((RESOLUTION)+1),vertice-1,vertice))    
-
-    # CONECTO OBJETO    
-    me.from_pydata(vertexlist,[],facelist)
-    me.update()
-    
-
-
-class oscMakeScrew (bpy.types.Operator):
-
-    bl_idname = "mesh.primitive_thread_oscurart"
-    bl_label = "Add Mesh Thread"
-    bl_description = "Create a Thread"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    resolution = bpy.props.IntProperty (name="Resolution",default=10,min=3,max=1000)
-    stretch = bpy.props.FloatProperty (name="Stretch",default=1,min=0.000001,max=1000)
-    turns = bpy.props.IntProperty (name="Turns Steps",default=19,min=0)
-    diameter = bpy.props.FloatProperty (name="Diameter",default=1,min=0,max=1000)
-  
-    
-    
-    def execute(self, context):
-        func_osc_screw(self, self.stretch,self.turns,self.diameter,self.resolution)
-        return {'FINISHED'}
-
-
-# Registration
-
-def add_screw_list(self, context):
-    self.layout.operator(
-        "mesh.primitive_thread_oscurart",
-        text="Thread",
-        icon="PLUGIN")
-
-def register():
-    bpy.types.INFO_MT_mesh_add.append(add_screw_list)
-    bpy.utils.register_class(oscMakeScrew)
-
-
-def unregister():
-    bpy.types.INFO_MT_mesh_add.remove(add_screw_list)
-    bpy.utils.unregister_class(oscMakeScrew)
-
-
-if __name__ == '__main__':
-    register()
-
diff --git a/release/scripts/addons_contrib/oscurart_tools.py b/release/scripts/addons_contrib/oscurart_tools.py
deleted file mode 100644
index 4a0934f..0000000
--- a/release/scripts/addons_contrib/oscurart_tools.py
+++ /dev/null
@@ -1,2442 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Oscurart Tools",
-    "author": "Oscurart, CodemanX",
-    "version": (3,0),
-    "blender": (2, 6, 3),
-    "location": "View3D > Tools > Oscurart Tools",
-    "description": "Tools for objects, render, shapes, and files.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Oscurart_Tools",
-    "tracker_url": "",
-    "category": "Object"}
-
-import bpy
-import math
-import sys
-import os
-import stat
-import bmesh
-import time
-import random
-
-#r06
-
-## CREA PANELES EN TOOLS
-
-# VARIABLES DE ENTORNO
-bpy.types.Scene.osc_object_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_mesh_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_shapes_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_render_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_files_tools = bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_overrides_tools = bpy.props.BoolProperty(default=False)
-
-# PANEL DE CONTROL
-class OscPanelControl(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Oscurart Tools"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self,context):
-        active_obj = context.active_object
-        layout = self.layout
-
-        col = layout.column(align=1)
-        col.prop(bpy.context.scene, "osc_object_tools", text="Object", icon="OBJECT_DATAMODE")
-        col.prop(bpy.context.scene, "osc_mesh_tools", text="Mesh", icon="EDITMODE_HLT")
-        col.prop(bpy.context.scene, "osc_shapes_tools", text="Shapes", icon="SHAPEKEY_DATA")
-        col.prop(bpy.context.scene, "osc_render_tools", text="Render", icon="SCENE")
-        col.prop(bpy.context.scene, "osc_files_tools", text="Files", icon="IMASEL")
-        col.prop(bpy.context.scene, "osc_overrides_tools", text="Overrides", icon="GREASEPENCIL")
-
-
-# POLLS
-class OscPollObject():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_object_tools
-
-
-class OscPollMesh():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_mesh_tools
-
-
-class OscPollShapes():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_shapes_tools
-
-class OscPollRender():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_render_tools
-
-class OscPollFiles():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_files_tools
-
-class OscPollOverrides():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene.osc_overrides_tools
-
-
-## PANELES
-class OscPanelObject(OscPollObject, bpy.types.Panel):
-    bl_idname = "Oscurart Object Tools"
-    bl_label = "Object Tools"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=1)
-        row = col.row()
-
-        colrow = col.row(align=1)
-        colrow.operator("objects.relink_objects_between_scenes", icon="LINKED")
-        colrow.operator("objects.copy_objects_groups_layers", icon="LINKED")
-        colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene, "SearchAndSelectOt", text="")
-        colrow.operator("object.search_and_select_osc", icon="ZOOM_SELECTED")
-        colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene, "RenameObjectOt", text="")
-        colrow.operator("object.rename_objects_osc", icon="SHORTDISPLAY")
-        col.operator("object.duplicate_object_symmetry_osc", icon="OBJECT_DATAMODE", text="Duplicate Symmetry")
-        col.operator("object.distribute_osc", icon="OBJECT_DATAMODE", text="Distribute")
-        colrow = col.row(align=1)
-        colrow.operator("object.modifiers_remove_osc", icon="MODIFIER", text="Remove Modifiers")
-        colrow.operator("object.modifiers_apply_osc", icon="MODIFIER", text="Apply Modifiers")
-
-
-class OscPanelMesh(OscPollMesh, bpy.types.Panel):
-    bl_idname = "Oscurart Mesh Tools"
-    bl_label = "Mesh Tools"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=1)
-        row = col.row()
-
-        col.operator("mesh.select_side_osc", icon="VERTEXSEL")
-        col.operator("mesh.normals_outside_osc", icon="SNAP_NORMAL")
-        colrow=col.row(align=1)
-        colrow.operator("mesh.resym_save_map", icon="UV_SYNC_SELECT")
-        colrow=col.row(align=1)
-        colrow.operator("mesh.resym_mesh", icon="UV_SYNC_SELECT", text="Resym Mesh") 
-        colrow.operator("mesh.resym_vertex_weights_osc", icon="UV_SYNC_SELECT")     
-        colrow=col.row(align=1)
-        colrow.operator("mesh.reconst_osc", icon="UV_SYNC_SELECT")        
-        colrow=col.row(align=1)
-        colrow.operator("file.export_groups_osc", icon='GROUP_VCOL')
-        colrow.operator("file.import_groups_osc", icon='GROUP_VCOL')
-
-
-class OscPanelShapes(OscPollShapes, bpy.types.Panel):
-    bl_idname = "Oscurart Shapes Tools"
-    bl_label = "Shapes Tools"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=1)
-        row = col.row()
-
-        col.operator("object.shape_key_to_objects_osc", icon="OBJECT_DATAMODE")
-        col.operator("mesh.create_lmr_groups_osc", icon="GROUP_VERTEX")
-        col.operator("mesh.split_lr_shapes_osc", icon="SHAPEKEY_DATA")
-        colrow=col.row()
-        colrow.operator("mesh.create_symmetrical_layout_osc", icon="SETTINGS")
-        colrow.operator("mesh.create_asymmetrical_layout_osc", icon="SETTINGS")
-
-class OscPanelRender(OscPollRender, bpy.types.Panel):
-    bl_idname = "Oscurart Render Tools"
-    bl_label = "Render Tools"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=1)
-        row = col.row()
-
-        col.operator("file.create_batch_maker_osc", icon="LINENUMBERS_ON", text="Make Render Batch")
-        colrow = col.row()
-        col.operator("file.create_batch_python", icon="LINENUMBERS_ON", text="Make Python Batch")
-        colrow = col.row()
-        colrow.operator("render.render_all_scenes_osc", icon="RENDER_STILL", text="All Scenes").frametype=False
-        colrow.operator("render.render_all_scenes_osc", icon="RENDER_STILL", text="> Frame").frametype=True
-        colrow = col.row()
-        colrow.operator("render.render_current_scene_osc", icon="RENDER_STILL", text="Active Scene").frametype=False
-        colrow.operator("render.render_current_scene_osc", icon="RENDER_STILL", text="> Frame").frametype=True
-
-
-        colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene, "rcPARTS", text="Render Crop Parts")
-        colrow.operator("render.render_crop_osc", icon="RENDER_REGION")
-        
-        col = layout.column(align=1)
-        colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene, "use_render_scene", text="")  
-        colrow.operator("render.render_selected_scenes_osc", icon="RENDER_STILL", text="Selected Scenes").frametype=False
-        colrow.operator("render.render_selected_scenes_osc", icon="RENDER_STILL", text="> Fame").frametype=True   
-   
-
-
-class OscPanelFiles(OscPollFiles, bpy.types.Panel):
-    bl_idname = "Oscurart Files Tools"
-    bl_label = "Files Tools"
-
-    def draw(self, context):
-        active_obj = context.active_object
-        layout = self.layout
-        col = layout.column(align=1)
-
-        colrow = col.row()
-        colrow.operator("file.save_incremental_osc", icon="NEW")
-        colrow.operator("image.reload_images_osc", icon="IMAGE_COL")
-        colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene, "oscSearchText", text="")
-        colrow.prop(bpy.context.scene, "oscReplaceText", text="")
-        col.operator("file.replace_file_path_osc", icon="SHORTDISPLAY")
-
-
-class OscPanelOverrides(OscPollOverrides, bpy.types.Panel):
-    bl_idname = "Oscurart Overrides"
-    bl_label = "Overrides Tools"
-
-    def draw(self, context):
-        layout = self.layout
-
-        obj = context.object
-
-        col = layout.box().column(align=1)
-
-        colrow = col.row()
-        col.operator("render.overrides_set_list", text="Create Override List", icon="GREASEPENCIL")
-        col.label(text="Active Scene: " + bpy.context.scene.name)
-        col.label(text="Example: [[Group,Material]]")
-        col.prop(bpy.context.scene, '["OVERRIDE"]', text="")
-        col.operator("render.check_overrides", text="Check List", icon="ZOOM_ALL")
-        col.operator("render.overrides_on", text="On / Off", icon="QUIT")                
-
-        boxcol=layout.box().column(align=1)
-        boxcol.label(text="Danger Zone")
-        boxcolrow=boxcol.row()
-        boxcolrow.operator("render.apply_overrides", text="Apply Overrides", icon="ERROR")
-        boxcolrow.operator("render.restore_overrides", text="Restore Overrides", icon="ERROR")
-
-
-    
-
-
-##---------------------------RELOAD IMAGES------------------
-
-class reloadImages (bpy.types.Operator):
-    bl_idname = "image.reload_images_osc"
-    bl_label = "Reload Images"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-        for imgs in bpy.data.images:
-            imgs.reload()
-        return {'FINISHED'}
-
-##-----------------------------RECONST---------------------------
-
-def defReconst(self, OFFSET, SUBD):
-
-    ##EDIT
-    bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-
-    ##SETEO VERTEX MODE
-    bpy.context.tool_settings.mesh_select_mode = (True, False, False)
-
-    OBJETO = bpy.context.active_object
-    OBDATA = bmesh.from_edit_mesh(OBJETO.data)
-    OBDATA.select_flush(False)
-
-    if SUBD > 0:
-        USESUB=True
-        SUBLEV=SUBD
-    else:
-        USESUB=False
-        SUBLEV=1
-
-    ## IGUALO VERTICES CERCANOS A CERO
-    for vertice in OBDATA.verts[:]:
-        if abs(vertice.co[0]) < OFFSET:
-            vertice.co[0] = 0
-
-    ##BORRA IZQUIERDA
-    bpy.ops.mesh.select_all(action="DESELECT")
-
-    for vertices in OBDATA.verts[:]:
-      if vertices.co[0] < 0:
-        vertices.select = 1
-
-    ## BORRA COMPONENTES
-    bpy.ops.mesh.delete()
-    ## SUMA MIRROR
-    bpy.ops.object.modifier_add(type='MIRROR')
-    ## SELECCIONO TODOS LOS COMPONENTES
-    bpy.ops.mesh.select_all(action="SELECT")
-    ## CREO UV TEXTURE DEL SIMETRICO
-    bpy.ops.mesh.uv_texture_add()
-    ## SETEO VARIABLE CON LA CANTIDAD DE UVS, RESTO UNO Y LE DOY UN NOMBRE
-    LENUVLISTSIM = len(bpy.data.objects[OBJETO.name].data.uv_textures)
-    LENUVLISTSIM = LENUVLISTSIM - 1
-    OBJETO.data.uv_textures[LENUVLISTSIM:][0].name = "SYMMETRICAL"
-    ## UNWRAP
-    bpy.ops.uv.unwrap(method='ANGLE_BASED', fill_holes=True, correct_aspect=False, use_subsurf_data=USESUB, uv_subsurf_level=SUBLEV)
-    ## MODO OBJETO
-    bpy.ops.object.mode_set(mode="OBJECT", toggle= False)
-    ## APLICO MIRROR
-    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Mirror")
-    ## VUELVO A EDIT MODE
-    bpy.ops.object.mode_set(mode="EDIT", toggle= False)
-    OBDATA = bmesh.from_edit_mesh(OBJETO.data)
-    OBDATA.select_flush(0)
-    ## CREO UV TEXTURE DEL ASIMETRICO
-    bpy.ops.mesh.uv_texture_add()
-    ## SETEO VARIABLE CON LA CANTIDAD DE UVS, RESTO UNO Y LE DOY UN NOMBRE
-    LENUVLISTASIM = len(OBJETO.data.uv_textures)
-    LENUVLISTASIM = LENUVLISTASIM  - 1
-    OBJETO.data.uv_textures[LENUVLISTASIM:][0].name = "ASYMMETRICAL"
-    ## SETEO UV ACTIVO
-    OBJETO.data.uv_textures.active = OBJETO.data.uv_textures["ASYMMETRICAL"]
-    ## UNWRAP
-    bpy.ops.uv.unwrap(method='ANGLE_BASED', fill_holes=True, correct_aspect=False, use_subsurf_data=USESUB, uv_subsurf_level=SUBLEV)
-
-
-class reConst (bpy.types.Operator):
-    bl_idname = "mesh.reconst_osc"
-    bl_label = "ReConst Mesh"
-    bl_options = {"REGISTER", "UNDO"}
-    OFFSET=bpy.props.FloatProperty(name="Offset", default=0.001, min=-0, max=0.1)
-    SUBD=bpy.props.IntProperty(name="Subdivisions Levels", default=0, min=0, max=4)
-    def execute(self,context):
-        defReconst(self, self.OFFSET, self.SUBD)
-        return {'FINISHED'}
-
-## -----------------------------------SELECT LEFT---------------------
-def side (self, nombre, offset):
-
-    bpy.ops.object.mode_set(mode="EDIT", toggle=0)
-
-    OBJECT = bpy.context.active_object
-    ODATA = bmesh.from_edit_mesh(OBJECT.data)
-    MODE = bpy.context.mode
-
-
-    ##SETEO VERTEX MODE
-
-    bpy.context.tool_settings.mesh_select_mode = (True, False, False)
-
-    ## DESELECCIONA TODO
-    for VERTICE in ODATA.verts[:]:
-        VERTICE.select = False
-
-    if nombre == False:
-        ## CONDICION QUE SI EL VERTICE ES MENOR A 0 LO SELECCIONA
-        for VERTICES in ODATA.verts[:]:
-            if VERTICES.co[0] < (offset):
-                VERTICES.select = 1
-    else:
-        ## CONDICION QUE SI EL VERTICE ES MENOR A 0 LO SELECCIONA
-        for VERTICES in ODATA.verts[:]:
-            if VERTICES.co[0] > (offset):
-                VERTICES.select = 1
-
-    ODATA.select_flush(False)
-
-    bpy.ops.object.mode_set(mode="EDIT", toggle=0)
-
-
-class SelectMenor (bpy.types.Operator):
-    bl_idname = "mesh.select_side_osc"
-    bl_label = "Select Side"
-    bl_options = {"REGISTER", "UNDO"}
-
-    side = bpy.props.BoolProperty(name="Greater than zero", default=False)
-    offset = bpy.props.FloatProperty(name="Offset", default=0)
-    def execute(self,context):
-
-        side(self, self.side, self.offset)
-
-        return {'FINISHED'}
-
-
-##-----------------------------------CREATE SHAPES----------------
-
-def DefSplitShapes(self,ACTIVESHAPE,LAYOUTCOMPAT):
-    #PASO A OBJECT MODE
-    bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-    
-    ## VARIABLES
-    ACTOBJ=bpy.context.active_object
-    LENKB=len(ACTOBJ.data.shape_keys.key_blocks)
-    INDEX=ACTOBJ.active_shape_key_index    
-    
-    ## RECORTO NOMBRES
-    if not LAYOUTCOMPAT:
-        for SHAPE in ACTOBJ.data.shape_keys.key_blocks:
-            if len(SHAPE.name) > 7:
-                SHAPE.name=SHAPE.name[:8]
- 
-    if ACTIVESHAPE:  
-        print(INDEX)
-        ACTOBJ.active_shape_key_index=INDEX          
-        AS=ACTOBJ.active_shape_key
-        AS.value=1
-        bpy.ops.object.shape_key_add(from_mix=True)
-        ACTOBJ.data.shape_keys.key_blocks[-1].name=AS.name[:8]+"_L"
-        ACTOBJ.data.shape_keys.key_blocks[-1].vertex_group="_L"
-        bpy.ops.object.shape_key_add(from_mix=True)
-        ACTOBJ.data.shape_keys.key_blocks[-1].name=AS.name[:8]+"_R"
-        ACTOBJ.data.shape_keys.key_blocks[-1].vertex_group="_R"
-        bpy.ops.object.shape_key_clear()
-           
-    else:     
-        ## DUPLICO SHAPES Y CONECTO GRUPO
-        for SHAPE in ACTOBJ.data.shape_keys.key_blocks[1:]:
-            SHAPE.value=1
-            bpy.ops.object.shape_key_add(from_mix=True)
-            ACTOBJ.data.shape_keys.key_blocks[-1].name=SHAPE.name[:8]+"_L"
-            ACTOBJ.data.shape_keys.key_blocks[-1].vertex_group="_L"
-            bpy.ops.object.shape_key_add(from_mix=True)
-            ACTOBJ.data.shape_keys.key_blocks[-1].name=SHAPE.name[:8]+"_R"
-            ACTOBJ.data.shape_keys.key_blocks[-1].vertex_group="_R"
-            bpy.ops.object.shape_key_clear()
-        ACTOBJ.active_shape_key_index=INDEX 
-
-
-class CreaShapes(bpy.types.Operator):
-    bl_idname = "mesh.split_lr_shapes_osc"
-    bl_label = "Split LR Shapes"
-    bl_options = {"REGISTER", "UNDO"}
-
-    @classmethod
-    def poll(cls, context):
-        return context.object is not None
-
-    activeshape=bpy.props.BoolProperty(name="Only Active Shape", default=False)  
-    layoutcompat=bpy.props.BoolProperty(name="Layout Compatible", default=False)
-
-    def execute(self, context):
-
-        DefSplitShapes(self,self.activeshape,self.layoutcompat)
-
-        return {'FINISHED'}
-
-##----------------------------SHAPES LAYOUT-----------------------
-
-class CreaShapesLayout(bpy.types.Operator):
-    bl_idname = "mesh.create_symmetrical_layout_osc"
-    bl_label = "Symmetrical Layout"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-
-        SEL_OBJ= bpy.context.active_object
-        LISTA_KEYS = bpy.context.active_object.data.shape_keys.key_blocks[1:]
-        
-        
-        ##MODOS
-        EDITMODE = "bpy.ops.object.mode_set(mode='EDIT')"
-        OBJECTMODE = "bpy.ops.object.mode_set(mode='OBJECT')"
-        POSEMODE = "bpy.ops.object.mode_set(mode='POSE')"
-        
-        ##INDICE DE DRIVERS
-        varindex = 0
-        
-        ##CREA NOMBRES A LA ARMATURE
-        amt = bpy.data.armatures.new("ArmatureData")
-        ob = bpy.data.objects.new("RIG_LAYOUT_"+SEL_OBJ.name, amt)
-        
-        ##LINK A LA ESCENA
-        scn = bpy.context.scene
-        scn.objects.link(ob)
-        scn.objects.active = ob
-        ob.select = True
-        
-        ## CREO DATA PARA SLIDERS        
-        ## creo data para los contenedores
-        verticess = [(-1,1,0),(1,1,0),(1,-1,0),(-1,-1,0)]
-        edgess = [(0,1),(1,2),(2,3),(3,0)]        
-        mesh = bpy.data.meshes.new("%s_data_container" % (SEL_OBJ))
-        object = bpy.data.objects.new("GRAPHIC_CONTAINER", mesh)
-        bpy.context.scene.objects.link(object)
-        mesh.from_pydata(verticess,edgess,[])          
-        
-        gx = 0
-        gy = 0
-        
-        
-        for keyblock in LISTA_KEYS:    
-            if keyblock.name[-2:] != "_L":
-                if keyblock.name[-2:] != "_R":                     
-                    
-                    ## OBJETO ACTIVO
-                    scn.objects.active = ob
-                    eval(EDITMODE)
-                      
-                    ##CREA HUESOS
-                    bone = amt.edit_bones.new(keyblock.name)
-                    bone.head = (gx,0,0)
-                    bone.tail = (gx,0,1)
-                    
-                    bonectrl = amt.edit_bones.new(keyblock.name+"_CTRL")
-                    bonectrl.head = (gy,0,0)
-                    bonectrl.tail = (gy,0,0.2)        
-            
-                    ##EMPARENTA HUESOS             
-                    ## EMPARENTO
-                    ob.data.edit_bones[bonectrl.name].parent = ob.data.edit_bones[bone.name]                         
-                    bpy.context.scene.objects.active = ob
-                    
-                    for SIDE in ["L","R"]:
-                        ##LE HAGO UNA VARIABLE
-                        DR = SEL_OBJ.data.shape_keys.key_blocks[keyblock.name+"_"+SIDE].driver_add("value")
-                        if SIDE == "L":
-                            DR.driver.expression = "var+var_001"
-                        else:
-                            DR.driver.expression = "-var+var_001"    
-                        VAR1 = DR.driver.variables.new()
-                        VAR2 = DR.driver.variables.new()
-            
-                        VAR1.targets[0].id = ob
-                        VAR1.type = 'TRANSFORMS'
-                        VAR1.targets[0].bone_target = bonectrl.name      
-                        VAR1.targets[0].transform_space = "LOCAL_SPACE"
-                        VAR1.targets[0].transform_type = "LOC_X"
-                        VAR2.targets[0].id = ob
-                        VAR2.type = 'TRANSFORMS'                    
-                        VAR2.targets[0].bone_target = bonectrl.name
-                        VAR2.targets[0].transform_space = "LOCAL_SPACE"
-                        VAR2.targets[0].transform_type = "LOC_Y"         
-                    
-                    eval(POSEMODE)
-                    
-                    ## SETEO ICONOS
-                    ob.pose.bones[keyblock.name].custom_shape = object            
-                    ob.pose.bones[keyblock.name+"_CTRL"].custom_shape = object
-                    CNS = ob.pose.bones[keyblock.name+"_CTRL"].constraints.new(type='LIMIT_LOCATION')               
-                    CNS.min_x = -1
-                    CNS.use_min_x = 1
-                    CNS.min_z = 0
-                    CNS.use_min_z = 1
-                    CNS.min_y = -1
-                    CNS.use_min_y = 1    
-                    CNS.max_x =  1
-                    CNS.use_max_x = 1
-                    CNS.max_z =  0
-                    CNS.use_max_z = 1
-                    CNS.max_y =  1
-                    CNS.use_max_y = 1    
-                    CNS.owner_space  = "LOCAL"
-                    CNS.use_transform_limit = True
-                    
-                    eval(OBJECTMODE)
-                    ## creo tipografias
-                    bpy.ops.object.text_add(location=(gx,0,0))
-                    gx = gx+2.2
-                    gy = gy+2.2            
-                    texto = bpy.context.object
-        
-                    texto.data.body = keyblock.name
-                    texto.name = "TEXTO_"+keyblock.name
-        
-                    texto.rotation_euler[0] = math.pi/2
-                    texto.location.x = -1
-                    texto.location.z = -1
-                    texto.data.size = .2
-        
-                    CNS = texto.constraints.new(type="COPY_LOCATION")
-                    CNS.target = ob
-                    CNS.subtarget = ob.pose.bones[keyblock.name].name
-                    CNS.use_offset = True
-    
-
-
-        return {'FINISHED'}
-
-##----------------------------CREATE LMR GROUPS-------------------
-def createLMRGroups(self, FACTORVG, ADDVG):
-    ## SETEO VERTEX MODE EDIT
-    bpy.context.window.screen.scene.tool_settings.mesh_select_mode = (True, False, False)
-
-    ## VARIABLES
-    ACTOBJ=bpy.context.active_object
-    bpy.ops.object.mode_set(mode="EDIT", toggle=False)
-    bpy.ops.mesh.select_all(action='DESELECT')
-    bpy.ops.object.mode_set(mode="OBJECT")
-    GRUPOS=["_L","_R"]
-    MIRRORINDEX=0
-
-    for LADO in GRUPOS:
-        if MIRRORINDEX == 0:
-            ## SUMO DOS VG
-            bpy.ops.object.vertex_group_add()
-            ## ASIGNO TODOS LOS VERTICES AL GRUPO
-            bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-            bpy.ops.mesh.select_all(action='SELECT')
-            bpy.ops.object.vertex_group_assign(new=False)
-            bpy.ops.mesh.select_all(action='DESELECT')
-            bpy.ops.object.mode_set(mode='WEIGHT_PAINT', toggle=False)
-            ## SETEO VALORES
-            for VERTICE in ACTOBJ.data.vertices:
-                VERTICE.groups[-1].weight=(VERTICE.co[0]*FACTORVG)+ADDVG
-            ## RENOMBRO
-            ACTOBJ.vertex_groups[-1].name=LADO
-
-        else:
-            ## SUMO DOS VG
-            bpy.ops.object.vertex_group_add()
-            ## ASIGNO TODOS LOS VERTICES AL GRUPO
-            bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-            bpy.ops.mesh.select_all(action='SELECT')
-            bpy.ops.object.vertex_group_assign(new=False)
-            bpy.ops.mesh.select_all(action='DESELECT')
-            bpy.ops.object.mode_set(mode='WEIGHT_PAINT', toggle=False)
-            ## SETEO VALORES
-            for VERTICE in ACTOBJ.data.vertices:
-                VERTICE.groups[-1].weight=(-VERTICE.co[0]*FACTORVG)+ADDVG
-            ## RENOMBRO
-            ACTOBJ.vertex_groups[-1].name=LADO
-        ## CAMBIO MIRROR INDEX
-        MIRRORINDEX+=1
-
-    ## SETEO GRUPO ACTIVO
-    ACTOBJ.vertex_groups.active_index=len(ACTOBJ.vertex_groups)
-
-
-class CreaGrupos(bpy.types.Operator):
-    bl_idname = "mesh.create_lmr_groups_osc"
-    bl_label = "Create Mix groups"
-    bl_description = "Create Mix groups"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    FACTORVG= bpy.props.FloatProperty(name="Factor", default=1, min=0, max=1000)
-    ADDVG= bpy.props.FloatProperty(name="Addition", default=.5, min=0, max=1000)
-
-    def execute(self, context):
-
-        createLMRGroups(self, self.FACTORVG, self.ADDVG)
-
-        return {'FINISHED'}
-
-##------------------------------NORMALS OUTSIDE--------------------
-class normalsOutside(bpy.types.Operator):
-    bl_idname = "mesh.normals_outside_osc"
-    bl_label = "Normals Outside"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-        for OBJETO in bpy.context.selected_objects:
-            ## SETEA OBJETO ACTIVO
-            bpy.data.scenes[0].objects.active = bpy.data.objects[OBJETO.name]
-            ## EDICION
-            bpy.ops.object.mode_set(mode='EDIT', toggle=False)
-            ## SELECCIONA TODOS LOS COMPONENTES
-            bpy.ops.mesh.select_all(action="SELECT")
-            ## EXPULSA NORMALES
-            bpy.ops.mesh.normals_make_consistent(inside=False)
-            ## EDICION
-            bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-        return {'FINISHED'}
-
-
-
-##-------------------------------- RENDER ALL SCENES ----------------------------
-
-
-def defRenderAll (frametype):
-    LISTMAT=[]
-    SCENES=bpy.data.scenes[:]
-    ACTSCENE=bpy.context.scene
-    FC=bpy.context.scene.frame_current
-    FS=bpy.context.scene.frame_start
-    FE=bpy.context.scene.frame_end
-    print("---------------------")
-    ## GUARDO MATERIALES DE OBJETOS EN GRUPOS
-    for OBJECT in bpy.data.objects[:]:
-        SLOTLIST=[]
-        try:
-            if OBJECT.type=="MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                for SLOT in OBJECT.material_slots[:]:
-                    SLOTLIST.append(SLOT.material)
-
-                LISTMAT.append((OBJECT,SLOTLIST))
-
-        except:
-            pass
-    for SCENE in SCENES:
-        PROPTOLIST=list(eval(SCENE['OVERRIDE']))
-        CURSC= SCENE.name
-        PATH = SCENE.render.filepath
-        ENDPATH = PATH
-        FILEPATH=bpy.data.filepath
-        # CAMBIO SCENE
-        bpy.context.window.screen.scene=SCENE
-        if frametype == True:
-            bpy.context.scene.frame_start=FC
-            bpy.context.scene.frame_end=FC
-            bpy.context.scene.frame_end=FC
-            bpy.context.scene.frame_start=FC
-        ## SETEO MATERIALES  DE OVERRIDES
-        try:
-            for OVERRIDE in PROPTOLIST:
-                for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                    if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                        for SLOT in OBJECT.material_slots[:]:
-                            SLOT.material=bpy.data.materials[OVERRIDE[1]]
-        except:
-            pass
-        SCENENAME=os.path.basename(FILEPATH.rpartition(".")[0])
-        LAYERLIST=[]
-        for layer in SCENE.render.layers:
-            if layer.use == 1:
-                LAYERLIST.append(layer)
-        for layers in LAYERLIST:
-            for rl in LAYERLIST:
-                rl.use= 0
-            print("SCENE: "+CURSC)
-            print("LAYER: "+layers.name)
-            print("OVERRIDE: "+str(PROPTOLIST))
-            SCENE.render.filepath = "%s/%s/%s/%s/%s_%s_%s_" % (PATH,SCENENAME,CURSC,layers.name,SCENENAME,SCENE.name,layers.name)
-            SCENE.render.layers[layers.name].use = 1
-            bpy.ops.render.render(animation=True, write_still=True, layer=layers.name, scene= SCENE.name)
-            print("DONE")
-            print("---------------------")
-
-        ## REESTABLECE LOS LAYERS
-        for layer in LAYERLIST:
-            layer.use = 1
-        ## RESTAURA EL PATH FINAL
-        SCENE.render.filepath = ENDPATH
-        #RESTAURO MATERIALES  DE OVERRIDES
-        for OBJECT in LISTMAT:
-            SLOTIND=0
-            try:
-                for SLOT in OBJECT[1]:
-                    OBJECT[0].material_slots[SLOTIND].material=SLOT
-                    SLOTIND+=1
-            except:
-                print("OUT OF RANGE")
-        # RESTAURO FRAMES
-        if frametype == True:
-            SCENE.frame_start=FS
-            SCENE.frame_end=FE
-            SCENE.frame_end=FE
-            SCENE.frame_start=FS
-    # RESTAURO SCENE
-    bpy.context.window.screen.scene=ACTSCENE
-
-
-class renderAll (bpy.types.Operator):
-    bl_idname="render.render_all_scenes_osc"
-    bl_label="Render All Scenes"
-
-    frametype=bpy.props.BoolProperty(default=False)
-
-
-    def execute(self,context):
-        defRenderAll(self.frametype)
-        return {'FINISHED'}
-
-
-
-##--------------------------------RENDER SELECTED SCENES----------------------------
-
-
-bpy.types.Scene.use_render_scene = bpy.props.BoolProperty()
-
-
-def defRenderSelected(frametype):
-    ACTSCENE = bpy.context.scene
-    LISTMAT = []
-    SCENES = bpy.data.scenes[:]
-    FC = bpy.context.scene.frame_current
-    FS = bpy.context.scene.frame_start
-    FE = bpy.context.scene.frame_end
-    ## GUARDO MATERIALES DE OBJETOS EN GRUPOS
-    for OBJECT in bpy.data.objects[:]:
-        SLOTLIST=[]
-        try:
-            if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                for SLOT in OBJECT.material_slots[:]:
-                    SLOTLIST.append(SLOT.material)
-
-                LISTMAT.append((OBJECT,SLOTLIST))
-        except:
-            pass
-    for SCENE in SCENES:
-        if SCENE.use_render_scene:
-            PROPTOLIST = list(eval(SCENE['OVERRIDE']))
-            CURSC = SCENE.name
-            PATH = SCENE.render.filepath
-            ENDPATH = PATH
-            FILEPATH = bpy.data.filepath
-            print("---------------------")
-            # CAMBIO SCENE
-            bpy.context.window.screen.scene = SCENE
-            if frametype  ==  True:
-                bpy.context.scene.frame_start = FC
-                bpy.context.scene.frame_end = FC
-                bpy.context.scene.frame_end = FC
-                bpy.context.scene.frame_start = FC
-            ## SETEO MATERIALES  DE OVERRIDES
-            try:
-                for OVERRIDE in PROPTOLIST:
-                    for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                        if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                            for SLOT in OBJECT.material_slots[:]:
-                                SLOT.material=bpy.data.materials[OVERRIDE[1]]
-            except:
-                pass
-            SCENENAME=os.path.basename(FILEPATH.rpartition(".")[0])
-            LAYERLIST=[]
-            for layer in SCENE.render.layers:
-                if layer.use == 1:
-                    LAYERLIST.append(layer)
-            for layers in LAYERLIST:
-                for rl in LAYERLIST:
-                    rl.use= 0
-                print("SCENE: "+CURSC)
-                print("LAYER: "+layers.name)
-                print("OVERRIDE: "+str(PROPTOLIST))
-                SCENE.render.filepath = "%s/%s/%s/%s/%s_%s_%s_" % (PATH,SCENENAME,CURSC,layers.name,SCENENAME,SCENE.name,layers.name)
-                SCENE.render.layers[layers.name].use = 1
-                bpy.ops.render.render(animation=True, layer=layers.name, write_still=True, scene= SCENE.name)
-                print("DONE")
-                print("---------------------")
-            ## REESTABLECE LOS LAYERS
-            for layer in LAYERLIST:
-                layer.use = 1
-            ## RESTAURA EL PATH FINAL
-            SCENE.render.filepath = ENDPATH
-            #RESTAURO MATERIALES  DE OVERRIDES
-            for OBJECT in LISTMAT:
-                SLOTIND = 0
-                try:
-                    for SLOT in OBJECT[1]:
-                        OBJECT[0].material_slots[SLOTIND].material = SLOT
-                        SLOTIND += 1
-                except:
-                    print("OUT OF RANGE")
-            # RESTAURO FRAMES
-            if frametype == True:
-                SCENE.frame_start = FS
-                SCENE.frame_end = FE
-                SCENE.frame_end = FE
-                SCENE.frame_start = FS
-    # RESTAURO SCENE
-    bpy.context.window.screen.scene = ACTSCENE
-
-
-class renderSelected (bpy.types.Operator):
-    bl_idname="render.render_selected_scenes_osc"
-    bl_label="Render Selected Scenes"
-
-    frametype=bpy.props.BoolProperty(default=False)
-
-    def execute(self,context):
-        defRenderSelected(self.frametype)
-        return {'FINISHED'}
-
-
-
-
-##--------------------------------RENDER CURRENT SCENE----------------------------
-
-
-def defRenderCurrent (frametype):
-    LISTMAT = []
-    SCENE = bpy.context.scene
-    FC = bpy.context.scene.frame_current
-    FS = bpy.context.scene.frame_start
-    FE = bpy.context.scene.frame_end
-
-    print("---------------------")
-    ## GUARDO MATERIALES DE OBJETOS EN GRUPOS
-    for OBJECT in bpy.data.objects[:]:
-        SLOTLIST = []
-        try:
-            if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                for SLOT in OBJECT.material_slots[:]:
-                    SLOTLIST.append(SLOT.material)
-                LISTMAT.append((OBJECT,SLOTLIST))
-        except:
-            pass
-    PROPTOLIST = list(eval(SCENE['OVERRIDE']))
-    CURSC = SCENE.name
-    PATH = SCENE.render.filepath
-    ENDPATH = PATH
-    FILEPATH = bpy.data.filepath
-    if frametype == True:
-        bpy.context.scene.frame_start = FC
-        bpy.context.scene.frame_end = FC
-        bpy.context.scene.frame_end = FC
-        bpy.context.scene.frame_start = FC
-    ## SETEO MATERIALES  DE OVERRIDES
-    try:
-        for OVERRIDE in PROPTOLIST:
-            for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-                if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE":
-                    for SLOT in OBJECT.material_slots[:]:
-                        SLOT.material = bpy.data.materials[OVERRIDE[1]]
-    except:
-        pass
-    SCENENAME=os.path.basename(FILEPATH.rpartition(".")[0])
-    LAYERLIST=[]
-    for layer in SCENE.render.layers:
-        if layer.use == 1:
-            LAYERLIST.append(layer)
-    for layers in LAYERLIST:
-        for rl in LAYERLIST:
-            rl.use= 0
-        print("SCENE: "+CURSC)
-        print("LAYER: "+layers.name)
-        print("OVERRIDE: "+str(PROPTOLIST))
-        SCENE.render.filepath = "%s/%s/%s/%s/%s_%s_%s_" % (PATH,SCENENAME,CURSC,layers.name,SCENENAME,SCENE.name,layers.name)
-        SCENE.render.layers[layers.name].use = 1
-        bpy.ops.render.render(animation=True, layer=layers.name, write_still=1, scene= SCENE.name)
-        print("DONE")
-        print("---------------------")
-    ## REESTABLECE LOS LAYERS
-    for layer in LAYERLIST:
-        layer.use = 1
-    ## RESTAURA EL PATH FINAL
-    SCENE.render.filepath = ENDPATH
-    #RESTAURO MATERIALES  DE OVERRIDES
-    for OBJECT in LISTMAT:
-        SLOTIND = 0
-        try:
-            for SLOT in OBJECT[1]:
-                OBJECT[0].material_slots[SLOTIND].material=SLOT
-                SLOTIND += 1
-        except:
-            print("FUERA DE RANGO")
-    # RESTAURO FRAMES
-    if frametype == True:
-        SCENE.frame_start = FS
-        SCENE.frame_end = FE
-        SCENE.frame_end = FE
-        SCENE.frame_start = FS
-
-
-class renderCurrent (bpy.types.Operator):
-    bl_idname="render.render_current_scene_osc"
-    bl_label="Render Current Scene"
-
-    frametype=bpy.props.BoolProperty(default=False)
-
-    def execute(self,context):
-
-        defRenderCurrent(self.frametype)
-
-        return {'FINISHED'}
-
-
-
-
-
-##--------------------------RENDER CROP----------------------
-## CREO DATA PARA EL SLIDER
-bpy.types.Scene.rcPARTS = bpy.props.IntProperty(default=0, min=2, max=50, step=1)
-
-
-class renderCrop (bpy.types.Operator):
-    bl_idname="render.render_crop_osc"
-    bl_label="Render Crop: Render!"
-    def execute(self,context):
-
-        FILEPATH = bpy.data.filepath
-        SCENENAME=os.path.basename(FILEPATH.rpartition(".")[0])
-        PARTS = bpy.context.scene.rcPARTS
-        PARTS = PARTS+1
-        PARTES=[i for i in range(1,PARTS)]            
-
-        NUMERODECORTE=1
-        SCACT = bpy.context.scene
-        SCACT.render.use_crop_to_border = 1
-        SCACT.render.use_border = 1
-        RESY = SCACT.render.resolution_y
-        OUTPUTFILEPATH = SCACT.render.filepath
-        LENPARTES = len(PARTES)
-        DIVISOR = 1/PARTES[LENPARTES-1]
-        CMIN = 0
-        CMAX = DIVISOR
-        PARTESRESTADA = PARTES.pop(LENPARTES-1)
-        SCACT.render.border_min_y = CMIN
-        SCACT.render.border_max_y = CMAX
-        SCACT.render.filepath =  "%s/%s/%s_PART%s_" % (OUTPUTFILEPATH,SCENENAME,SCENENAME,str(PARTES[0]))
-        bpy.ops.render.render(animation=True)
-        bpy.context.scene.render.filepath
-        NUMERODECORTE = NUMERODECORTE + 1
-        ## RENDER!
-        for PARTE in PARTES:
-            CMIN = CMIN + DIVISOR
-            CMAX = CMAX + DIVISOR
-            SCACT.render.border_min_y = CMIN
-            SCACT.render.border_max_y = CMAX
-            bpy.context.scene.render.filepath =  "%s%s/%s_PART%s_" % (OUTPUTFILEPATH,SCENENAME,SCENENAME,str(NUMERODECORTE))
-            bpy.ops.render.render(animation=True)
-            NUMERODECORTE = NUMERODECORTE + 1
-
-        SCACT.render.filepath = OUTPUTFILEPATH
-        SCACT.render.use_border = False
-        return {'FINISHED'}
-
-
-##------------------------ SEARCH AND SELECT ------------------------
-
-## SETEO VARIABLE DE ENTORNO
-bpy.types.Scene.SearchAndSelectOt = bpy.props.StringProperty(default="Object name initials")
-
-
-class SearchAndSelectOt(bpy.types.Operator):
-    bl_idname = "object.search_and_select_osc"
-    bl_label = "Search And Select"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-        for objeto in bpy.context.scene.objects:
-            variableNombre = bpy.context.scene.SearchAndSelectOt
-            if objeto.name.startswith(variableNombre) == True :
-                objeto.select = 1
-                print("Selecciona:" + str(objeto.name))
-        return {'FINISHED'}
-
-##-------------------------RENAME OBJECTS----------------------------------
-
-## CREO VARIABLE
-bpy.types.Scene.RenameObjectOt = bpy.props.StringProperty(default="Type here")
-
-class renameObjectsOt (bpy.types.Operator):
-    bl_idname = "object.rename_objects_osc"
-    bl_label = "Rename Objects"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-
-        ## LISTA
-        listaObj = bpy.context.selected_objects
-
-
-        for objeto in listaObj:
-            print(objeto.name)
-            objeto.name = bpy.context.scene.RenameObjectOt
-        return {'FINISHED'}
-
-
-##-------------------------RESYM VG----------------------------------
-
-
-
-class resymVertexGroups (bpy.types.Operator):
-    bl_idname = "mesh.resym_vertex_weights_osc"
-    bl_label = "Resym Vertex Weights"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-
-        OBACTIVO = bpy.context.active_object
-        VGACTIVO = OBACTIVO.vertex_groups.active.index
-        
-        bpy.ops.object.mode_set(mode='EDIT')
-        BM = bmesh.from_edit_mesh(bpy.context.object.data)  
-        bpy.ops.mesh.select_all(action='DESELECT')
-        bpy.ops.object.vertex_group_select()
-        SELVER=[VERT.index for VERT in BM.verts[:] if VERT.select]
-        
-        if sys.platform.startswith("w"):
-            SYSBAR = "\\"
-        else:
-             SYSBAR = "/" 
-         
-        FILEPATH=bpy.data.filepath
-        ACTIVEFOLDER=FILEPATH.rpartition(SYSBAR)[0]
-        ENTFILEPATH= "%s%s%s_%s_SYM_TEMPLATE.xml" %  (ACTIVEFOLDER, SYSBAR, bpy.context.scene.name, bpy.context.object.name)
-        XML=open(ENTFILEPATH ,mode="r")
-        
-        SYMAP = eval(XML.readlines()[0])
-        
-
-        # SUMO LOS VERTICES QUE NO EXISTEN EN EL VG        
-        INL = [VERT for VERT in SYMAP if SYMAP[VERT] in SELVER if VERT!= SYMAP[VERT]] 
-        bpy.ops.mesh.select_all(action='DESELECT')
-
-        for VERT in INL:
-            BM.verts[VERT].select = True
-        bpy.ops.object.vertex_group_assign(new=False)    
-     
-
-        # PASO A WEIGHT Y SETEO LOS VALORES
-        bpy.ops.object.mode_set(mode='WEIGHT_PAINT')        
-        for VERT in INL:
-            print(VERT)
-            i = 0
-            for GRA in OBACTIVO.data.vertices[SYMAP[VERT]].groups[:]:
-                if GRA.group == VGACTIVO:
-                    print (i)
-                    EM = i                    
-                i+=1  
-            a = 0
-            for GRA in OBACTIVO.data.vertices[VERT].groups[:]:     
-                if GRA.group == VGACTIVO:
-                    print (a)
-                    REC = a
-                a+=1
-                    
-            OBACTIVO.data.vertices[VERT].groups[REC].weight = OBACTIVO.data.vertices[SYMAP[VERT]].groups[EM].weight  
-                
-
-        XML.close()
-        SYMAP.clear()  
-      
-
-        print("===============(JOB DONE)=============")
-        return {'FINISHED'}
-
-
-##------------------------ SHAPES LAYOUT SYMMETRICA ------------------------
-
-
-class CreateLayoutAsymmetrical(bpy.types.Operator):
-    bl_idname = "mesh.create_asymmetrical_layout_osc"
-    bl_label = "Asymmetrical Layout"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-
-        SEL_OBJ= bpy.context.active_object
-        LISTA_KEYS = bpy.context.active_object.data.shape_keys.key_blocks[1:]
-        
-        ##MODOS
-        EDITMODE = "bpy.ops.object.mode_set(mode='EDIT')"
-        OBJECTMODE = "bpy.ops.object.mode_set(mode='OBJECT')"
-        POSEMODE = "bpy.ops.object.mode_set(mode='POSE')"
-        
-        ##CREA NOMBRES A LA ARMATURE
-        amtas = bpy.data.armatures.new("ArmatureData")
-        obas = bpy.data.objects.new("RIG_LAYOUT_"+SEL_OBJ.name, amtas)
-        
-        ##LINK A LA ESCENA
-        scn = bpy.context.scene
-        scn.objects.link(obas)
-        scn.objects.active = obas
-        obas.select = True
-        
-        ## CREO DATA PARA SLIDERS            
-        ## creo data para los contenedores
-        verticess = [(-.1,1,0),(.1,1,0),(.1,0,0),(-.1,0,0)]
-        edgess = [(0,1),(1,2),(2,3),(3,0)]            
-        mesh = bpy.data.meshes.new("%s_data_container" % (SEL_OBJ))
-        object = bpy.data.objects.new("GRAPHIC_CONTAINER_AS", mesh)
-        bpy.context.scene.objects.link(object)
-        mesh.from_pydata(verticess,edgess,[])
-        
-        eval(EDITMODE)
-        gx = 0
-        gy = 0        
-        
-        for keyblock in LISTA_KEYS:        
-            if keyblock.name[-2:] != "_L":
-                if keyblock.name[-2:] != "_R":
-                    ## OBJETO ACTIVO
-                    scn.objects.active = obas
-                    eval(EDITMODE)
-        
-                    ##CREA HUESOS        
-                    bone = amtas.edit_bones.new(keyblock.name)
-                    bone.head = (gx,0,0)
-                    bone.tail = (gx,0,1)
-                    
-                    bonectrl = amtas.edit_bones.new(keyblock.name+"_CTRL")
-                    bonectrl.head = (gy,0,0)
-                    bonectrl.tail = (gy,0,0.2)
-        
-                    ##EMPARENTA HUESOS
-                    ## EMPARENTO
-                    obas.data.edit_bones[bonectrl.name].parent = obas.data.edit_bones[bone.name]                         
-                    bpy.context.scene.objects.active = obas
-                    
-                    ##DESELECCIONA (modo edit)
-                    bpy.ops.armature.select_all(action="DESELECT")
-        
-                    ##CREA DRIVERS Y LOS CONECTA
-                    DR1 = keyblock.driver_add("value")
-                    DR1.driver.expression = "var"
-                    VAR2 = DR1.driver.variables.new()     
-                    VAR2.targets[0].id = obas
-                    VAR2.targets[0].bone_target = bonectrl.name
-                    VAR2.type = 'TRANSFORMS'
-                    VAR2.targets[0].transform_space = "LOCAL_SPACE"
-                    VAR2.targets[0].transform_type = "LOC_Y"       
-                    
-                    eval(POSEMODE)
-                    
-                    ## SETEO ICONOS
-                    obas.pose.bones[keyblock.name].custom_shape = object
-                    obas.pose.bones[keyblock.name+"_CTRL"].custom_shape = object
-                    
-                    ## SETEO CONSTRAINTS
-        
-                    bpy.data.objects["RIG_LAYOUT_"+SEL_OBJ.name].data.bones.active = bpy.data.objects["RIG_LAYOUT_"+SEL_OBJ.name].data.bones[keyblock.name+"_CTRL"]
-                    ## SUMO CONSTRAINT
-                    eval(POSEMODE)
-                    CNS = obas.pose.bones[keyblock.name+"_CTRL"].constraints.new(type='LIMIT_LOCATION')                        
-                    CNS.min_x = 0
-                    CNS.use_min_x = 1
-                    CNS.min_z = 0
-                    CNS.use_min_z = 1
-                    CNS.min_y = 0
-                    CNS.use_min_y = 1
-                    
-                    CNS.max_x =  0
-                    CNS.use_max_x = 1
-                    CNS.max_z =  0
-                    CNS.use_max_z = 1
-                    CNS.max_y =  1
-                    CNS.use_max_y = 1
-                    
-                    CNS.owner_space  = "LOCAL"
-                    CNS.use_transform_limit = True        
-        
-                    ## PARA QUE EL TEXTO FUNCIONE PASAMOS A OBJECT MODE
-                    eval(OBJECTMODE)
-        
-                    ## TEXTOS
-                    ## creo tipografias
-                    bpy.ops.object.text_add(location=(0,0,0))
-                    gx = gx+2.2
-                    gy = gy+2.2
-                    texto = bpy.context.object
-                    texto.data.body = keyblock.name
-                    texto.name = "TEXTO_"+keyblock.name
-        
-                    texto.rotation_euler[0] = math.pi/2
-                    texto.location.x = -.15
-                    texto.location.z = -.15
-                    texto.data.size = .2
-                    
-                    CNS = texto.constraints.new(type="COPY_LOCATION")
-                    CNS.target = obas
-                    CNS.subtarget = obas.pose.bones[keyblock.name].name
-                    CNS.use_offset = True  
-                              
-        
-
-        return {'FINISHED'}
-
-
-##------------------------ SAVE INCREMENTAL ------------------------
-
-class saveIncremental(bpy.types.Operator):
-    bl_idname = "file.save_incremental_osc"
-    bl_label = "Save Incremental File"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-
-        # SI POSEE _V        
-        filepath = bpy.data.filepath
-        
-        if filepath.count("_v"):
-            strnum = filepath.rpartition("_v")[-1].rpartition(".blend")[0]
-            intnum = int(strnum)
-            modnum = strnum.replace(str(intnum),str(intnum+1))    
-            output = filepath.replace(strnum,modnum)
-            bpy.ops.wm.save_as_mainfile(filepath=output)   
-             
-        else:
-            output = filepath.rpartition(".blend")[0]+"_v01"
-            bpy.ops.wm.save_as_mainfile(filepath=output)         
-        
-        return {'FINISHED'}
-
-##------------------------ REPLACE FILE PATHS ------------------------
-
-bpy.types.Scene.oscSearchText = bpy.props.StringProperty(default="Search Text")
-bpy.types.Scene.oscReplaceText = bpy.props.StringProperty(default="Replace Text")
-
-class replaceFilePath(bpy.types.Operator):
-    bl_idname = "file.replace_file_path_osc"
-    bl_label = "Replace File Path"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self, context):
-        TEXTSEARCH = bpy.context.scene.oscSearchText
-        TEXTREPLACE = bpy.context.scene.oscReplaceText
-
-        for image in bpy.data.images:
-            image.filepath = image.filepath.replace(TEXTSEARCH,TEXTREPLACE)
-
-        return {'FINISHED'}
-
-
-##------------------------ DUPLICATE OBJECTS SYMMETRY ------------------------
-
-def duplicateSymmetrical (self, disconect):
-    for objeto in bpy.context.selected_objects:
-
-        OBSEL = objeto
-
-        #DESELECT AND SELECT OBJETO
-        bpy.ops.object.select_all(action='DESELECT')
-        objeto.select = 1
-        bpy.context.scene.objects.active = objeto
-
-        #DUPLICA
-        bpy.ops.object.duplicate(linked=1)
-
-        #OBJETO ACTIVO
-        OBDUP=bpy.context.active_object
-
-        print(OBDUP)
-
-        #SUMA DRIVER
-        OBDUP.driver_add("location")
-
-        ## LOCATIONS
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[0].driver.expression = "-var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[0].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[0].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[0].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[0].driver.variables[0].targets[0].transform_type = 'LOC_X'
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[1].driver.expression = "var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[1].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[1].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[1].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[1].driver.variables[0].targets[0].transform_type = 'LOC_Y'
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[2].driver.expression = "var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[2].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[2].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[2].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[2].driver.variables[0].targets[0].transform_type = 'LOC_Z'
-
-        ## SCALE
-        OBDUP.driver_add("scale")
-
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[3].driver.expression = "-var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[3].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[3].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[3].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[3].driver.variables[0].targets[0].transform_type = 'SCALE_X'
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[4].driver.expression = "var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[4].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[4].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[4].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[4].driver.variables[0].targets[0].transform_type = 'SCALE_Y'
-
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[5].driver.expression = "var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[5].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[5].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[5].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[5].driver.variables[0].targets[0].transform_type = 'SCALE_Z'
-
-
-        ## ROTATION
-        OBDUP.driver_add("rotation_euler")
-
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[6].driver.expression = "var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[6].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[6].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[6].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[6].driver.variables[0].targets[0].transform_type = 'ROT_X'
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[7].driver.expression = "-var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[7].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[7].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[7].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[7].driver.variables[0].targets[0].transform_type = 'ROT_Y'
-
-
-        #EXPRESION
-        OBDUP.animation_data.drivers[8].driver.expression = "-var"
-        #CREA VARIABLE
-        OBDUP.animation_data.drivers[8].driver.variables.new()
-        #MODIFICO VARIABLE
-        OBDUP.animation_data.drivers[8].driver.variables[0].type = "TRANSFORMS"
-        OBDUP.animation_data.drivers[8].driver.variables[0].targets[0].id = objeto
-        OBDUP.animation_data.drivers[8].driver.variables[0].targets[0].transform_type = 'ROT_Z'
-
-        if disconect != True:
-            bpy.ops.object.make_single_user(obdata=True, object=True)
-            bpy.context.active_object.driver_remove("location")
-            bpy.context.active_object.driver_remove("rotation_euler")
-            bpy.context.active_object.driver_remove("scale")
-
-
-class oscDuplicateSymmetricalOp (bpy.types.Operator):
-    bl_idname = "object.duplicate_object_symmetry_osc"
-    bl_label = "Oscurart Duplicate Symmetrical"
-    bl_options = {"REGISTER", "UNDO"}
-
-    desconecta = bpy.props.BoolProperty(name="Keep Connection", default=True)
-
-    def execute(self,context):
-
-        duplicateSymmetrical(self, self.desconecta)
-
-        return {'FINISHED'}
-
-
-##---------------------------BATCH MAKER------------------
-
-
-def defoscBatchMaker(TYPE):
-    # REVISO SISTEMA
-    if sys.platform.startswith("w"):
-        print("PLATFORM: WINDOWS")
-        SYSBAR = "\\"
-        EXTSYS = ".bat"
-        QUOTES = '"'
-    else:
-        print("PLATFORM:LINUX")
-        SYSBAR = "/"
-        EXTSYS = ".sh"
-        QUOTES = ''
-
-    # CREO VARIABLES
-    FILENAME = bpy.data.filepath.rpartition(SYSBAR)[-1].rpartition(".")[0]
-    BINDIR = bpy.app[4]
-    SHFILE = bpy.data.filepath.rpartition(SYSBAR)[0] + SYSBAR + FILENAME + EXTSYS
-    FILEBATCH = open(SHFILE,"w")
-
-    # SI ES LINUX LE DOY PERMISOS CHMOD
-    if EXTSYS == ".sh":
-        try:
-            os.chmod(SHFILE, stat.S_IRWXU)
-        except:
-            print("** Oscurart Batch maker can not modify the permissions.")    
-
-    # DEFINO ARCHIVO DE BATCH
-    FILEBATCH.writelines("%s%s%s -b %s -x 1 -o %s -P %s%s.py  -s %s -e %s -a" % (QUOTES,BINDIR,QUOTES,bpy.data.filepath,bpy.context.scene.render.filepath,bpy.data.filepath.rpartition(SYSBAR)[0]+SYSBAR,TYPE,str(bpy.context.scene.frame_start),str(bpy.context.scene.frame_end)) )
-    FILEBATCH.close()  
-
-
-    # DEFINO LOS ARCHIVOS DE SCRIPT
-    
-    RLATFILE =  "%s%sosRlat.py" % (bpy.data.filepath.rpartition(SYSBAR)[0] , SYSBAR )
-    if not os.path.isfile(RLATFILE):
-        FILESC = open(RLATFILE,"w")        
-        if EXTSYS == ".sh":
-            try:
-                os.chmod(RLATFILE, stat.S_IRWXU)  
-            except:
-                print("** Oscurart Batch maker can not modify the permissions.")                             
-        FILESC.writelines("import bpy \nbpy.ops.render.render_all_scenes_osc()\nbpy.ops.wm.quit_blender()")
-        FILESC.close()
-    else:
-        print("The All Python files Skips: Already exist!")   
-         
-    RSLATFILE = "%s%sosRSlat.py" % (bpy.data.filepath.rpartition(SYSBAR)[0] , SYSBAR)    
-    if not os.path.isfile(RSLATFILE):          
-        FILESSC = open(RSLATFILE,"w")          
-        if EXTSYS == ".sh":
-            try:
-                os.chmod(RSLATFILE, stat.S_IRWXU)   
-            except:
-                print("** Oscurart Batch maker can not modify the permissions.")                            
-        FILESSC.writelines("import bpy \nbpy.ops.render.render_selected_scenes_osc()\nbpy.ops.wm.quit_blender()")
-        FILESSC.close()
-    else:
-        print("The Selected Python files Skips: Already exist!")          
-
-class oscBatchMaker (bpy.types.Operator):
-    bl_idname = "file.create_batch_maker_osc"
-    bl_label = "Make render batch"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    type = bpy.props.EnumProperty(
-            name="Render Mode",
-            description="Select Render Mode.",
-            items=(('osRlat', "All Scenes", "Render All Layers At Time"),
-                   ('osRSlat', "Selected Scenes", "Render Only The Selected Scenes")),
-            default='osRlat',
-            )
-
-
-    def execute(self,context):
-        defoscBatchMaker(self.type)
-        return {'FINISHED'}
-
-
-##---------------------------REMOVE MODIFIERS Y APPLY MODIFIERS------------------
-
-class oscRemModifiers (bpy.types.Operator):
-    bl_idname = "object.modifiers_remove_osc"
-    bl_label = "Remove modifiers"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-        for objeto in bpy.context.selected_objects:
-            for modificador in objeto.modifiers:
-                print(modificador.type)
-                bpy.context.scene.objects.active=objeto
-                bpy.ops.object.modifier_remove(modifier=modificador.name)
-        return {'FINISHED'}
-
-class oscApplyModifiers (bpy.types.Operator):
-    bl_idname = "object.modifiers_apply_osc"
-    bl_label = "Apply modifiers"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-        for objeto in bpy.context.selected_objects:
-            bpy.ops.object.select_all(action='DESELECT')
-            bpy.context.scene.objects.active=objeto
-            objeto.select = True
-            if objeto.data.users >= 2:
-                bpy.ops.object.make_single_user(type='SELECTED_OBJECTS', object=True, obdata=True, material=False, texture=False, animation=False)
-            for modificador in objeto.modifiers:
-                try:
-                    bpy.ops.object.modifier_apply(apply_as="DATA", modifier=modificador.name)
-                except:
-                    bpy.ops.object.modifier_remove(modifier=modificador.name) 
-                    print("* Modifier %s skipping apply" % (modificador.name))   
-
-        return {'FINISHED'}
-
-
-##---------------------------SHAPES TO OBJECTS------------------
-
-class ShapeToObjects (bpy.types.Operator):
-    bl_idname = "object.shape_key_to_objects_osc"
-    bl_label = "Shapes To Objects"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-        OBJACT=bpy.context.active_object
-        for SHAPE in OBJACT.data.shape_keys.key_blocks[:]:
-            print(SHAPE.name)
-            bpy.ops.object.shape_key_clear()
-            SHAPE.value=1
-            mesh=OBJACT.to_mesh(bpy.context.scene, True, 'PREVIEW')
-            object=bpy.data.objects.new(SHAPE.name, mesh)
-            bpy.context.scene.objects.link(object)
-        return {'FINISHED'}
-
-
-##--------------------------OVERRIDES-----------------------------
-
-## PARA ESCENAS NUEVAS
-
-for scene in bpy.data.scenes[:]:
-    try:
-        scene['OVERRIDE']
-    except:
-        scene['OVERRIDE']="[]"
-
-
-class OverridesOp (bpy.types.Operator):
-    bl_idname = "render.overrides_set_list"
-    bl_label = "Overrides set list"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-        for scene in bpy.data.scenes[:]:
-            try:
-                scene['OVERRIDE']
-            except:
-                scene['OVERRIDE']="[]"
-        return {'FINISHED'}
-
-
-###------------------------IMPORT EXPORT GROUPS--------------------
-
-class OscExportVG (bpy.types.Operator):
-    bl_idname = "file.export_groups_osc"
-    bl_label = "Export Groups"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-
-        OBSEL=bpy.context.active_object
-
-        if os.sys.platform.count("win"):
-            print("WINDOWS")
-            BAR = "\\"
-        else:
-            print("LINUX")
-            BAR = "/"
-        # VARIABLES
-        FILEPATH = bpy.data.filepath
-        FILE = open(FILEPATH.rpartition(BAR)[0] + BAR+OBSEL.name + ".xml", mode = "w")
-        VERTLIST = []
-
-        LENVER = len(OBSEL.data.vertices)
-
-        for VG in OBSEL.vertex_groups:
-            BONELIST = []
-            for VERTICE in range(0,LENVER):
-                try:
-                    BONELIST.append((VERTICE,VG.weight(VERTICE),VG.name,))
-                except:
-                    pass
-            VERTLIST.append(BONELIST)
-
-        ## CREO LA LISTA CON LOS NOMBRES DE LOS GRUPOS
-        NAMEGROUPLIST=[]
-        for VG in OBSEL.vertex_groups:
-            NAMEGROUPLIST.append(VG.name)
-
-        ## AGREGO LOS NOMBRES A LA LISTA
-        VERTLIST.append(NAMEGROUPLIST)
-
-        ## GUARDO Y CIERRO
-        FILE.writelines(str(VERTLIST))
-        FILE.close()
-
-        ## ---- CREO OTRO ARCHIVO PARA LA DATA ----
-        # VARIABLES
-        FILEPATH = bpy.data.filepath
-        FILE = open(FILEPATH.rpartition(BAR)[0] + BAR + OBSEL.name + "_DATA.xml", mode = "w")
-
-        DATAVER = []
-
-        for VERT in OBSEL.data.vertices[:]:
-            TEMP = 0
-            VGTEMP = 0
-            LISTVGTEMP = []
-
-            for GROUP in VERT.groups[:]:
-                LISTVGTEMP.append((GROUP.group,VGTEMP))
-                VGTEMP += 1
-
-            LISTVGTEMP=sorted(LISTVGTEMP)
-            for GROUP in VERT.groups[:]:
-                DATAVER.append((VERT.index,TEMP,VERT.groups[LISTVGTEMP[TEMP][1]].weight))
-                TEMP += 1
-
-
-        ## GUARDO Y CIERRO
-        FILE.writelines(str(DATAVER))
-        FILE.close()
-
-        return {'FINISHED'}
-
-class OscImportVG (bpy.types.Operator):
-    bl_idname = "file.import_groups_osc"
-    bl_label = "Import Groups"
-    bl_options = {"REGISTER", "UNDO"}
-    def execute(self,context):
-
-        OBSEL = bpy.context.active_object
-        # AVERIGUO EL SISTEMA
-        if os.sys.platform.count("win"):
-            print("WINDOWS")
-            BAR = "\\"
-        else:
-            print("LINUX")
-            BAR = "/"
-        # VARIABLES
-        FILEPATH = bpy.data.filepath
-        FILE = open(FILEPATH.rpartition(BAR)[0] + BAR + OBSEL.name + ".xml", mode="r")
-        VERTLIST = FILE.readlines(0)
-        VERTLIST = eval(VERTLIST[0])
-        VERTLISTR = VERTLIST[:-1]
-        GROUPLIST = VERTLIST[-1:]
-        VGINDEX = 0
-
-        ## MODO OBJECT
-        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-
-        for GROUP in GROUPLIST[0]:
-            #CREO GRUPO
-            bpy.ops.object.vertex_group_add()
-            #CAMBIO NOMBRE
-            OBSEL.vertex_groups[-1].name=GROUP
-
-
-
-        for VG in OBSEL.vertex_groups[:]:
-            # SETEO VG
-            bpy.ops.object.vertex_group_set_active(group=VG.name)
-            # EDIT
-            bpy.ops.object.mode_set(mode='EDIT')
-            # DESELECT
-            bpy.ops.mesh.select_all(action='DESELECT')
-            # OBJECT
-            bpy.ops.object.mode_set(mode='OBJECT')
-            # SELECCIONO LOS VERTICES
-            for VERTI in VERTLISTR[VG.index]:
-                OBSEL.data.vertices[VERTI[0]].select=1
-            ## SETEO EL VALOR DEL PESO
-            bpy.context.tool_settings.vertex_group_weight=1
-            # EDIT
-            bpy.ops.object.mode_set(mode='EDIT')
-            ## ASIGNO
-            bpy.ops.object.vertex_group_assign(new=False)
-
-        # CIERRO
-        FILE.close()
-
-
-        ## ----------- LEVANTO DATA ----
-        # VARIABLES
-        FILEPATH = bpy.data.filepath
-        FILE = open(FILEPATH.rpartition(BAR)[0]+BAR+OBSEL.name+"_DATA.xml", mode="r")
-        DATAPVER = FILE.readlines(0)
-        DATAPVER = eval(DATAPVER[0])
-
-        # PASO A MODO OBJECT
-        bpy.ops.object.mode_set(mode='OBJECT')
-
-        #for VERT in DATAPVER:
-        for VERT in DATAPVER:
-            OBSEL.data.vertices[VERT[0]].groups[VERT[1]].weight = VERT[2]
-
-        # CIERRO
-        FILE.close()
-
-
-        # PASO A MODO PINTURA DE PESO
-        bpy.ops.object.mode_set(mode='WEIGHT_PAINT')
-        return {'FINISHED'}
-
-
-## ------------------------------------ RELINK OBJECTS--------------------------------------
-
-
-def relinkObjects (self):
-
-    LISTSCENE=[]
-
-    for SCENE in bpy.data.scenes[:]:
-        if bpy.selection_osc[-1] in SCENE.objects[:]:
-            LISTSCENE.append(SCENE)
-
-    OBJECTS = bpy.selection_osc[:-1]
-
-    ## REMUEVO ESCENA ACTIVA
-    LISTSCENE.remove(bpy.context.scene)
-
-    ## DESELECT
-    bpy.ops.object.select_all(action='DESELECT')
-
-    ## SELECT
-    for OBJETO in OBJECTS:
-        if OBJETO.users != len(bpy.data.scenes):
-            print(OBJETO.name)
-            OBJETO.select = True
-
-    ## LINK
-    for SCENE in LISTSCENE:
-        bpy.ops.object.make_links_scene(scene=SCENE.name)
-
-
-class OscRelinkObjectsBetween (bpy.types.Operator):
-    bl_idname = "objects.relink_objects_between_scenes"
-    bl_label = "Relink Objects Between Scenes"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        relinkObjects(self)
-        return {'FINISHED'}
-
-
-## ------------------------------------ COPY GROUPS AND LAYERS--------------------------------------
-
-
-def CopyObjectGroupsAndLayers (self):
-
-    OBSEL=bpy.selection_osc[:]
-    GLOBALLAYERS=list(OBSEL[-1].layers[:])
-    ACTSCENE=bpy.context.scene
-    GROUPS=OBSEL[-1].users_group
-    ACTOBJ=OBSEL[-1]
-    
-    for OBJECT in OBSEL[:-1]:
-        for scene in bpy.data.scenes[:]:
-            
-            # CAMBIO ESCENA EN EL UI
-            bpy.context.window.screen.scene=scene
-
-            # SI EL OBJETO ACTIVO ESTA EN LA ESCENA
-            if ACTOBJ in bpy.context.scene.objects[:] and OBJECT in bpy.context.scene.objects[:]:
-                scene.objects[OBJECT.name].layers = ACTOBJ.layers
-            elif ACTOBJ not in bpy.context.scene.objects[:] and OBJECT in bpy.context.scene.objects[:]: 
-                scene.objects[OBJECT.name].layers = list(GLOBALLAYERS)                  
-                
-        # REMUEVO DE TODO GRUPO
-        for GROUP in bpy.data.groups[:]:
-            if GROUP in OBJECT.users_group[:]:
-                GROUP.objects.unlink(OBJECT)
-                
-        # INCLUYO OBJETO EN GRUPOS    
-        for GROUP in GROUPS:
-            GROUP.objects.link(OBJECT)            
- 
-    bpy.context.window.screen.scene = ACTSCENE
-
-class OscCopyObjectGAL (bpy.types.Operator):
-    bl_idname = "objects.copy_objects_groups_layers"
-    bl_label = "Copy Groups And Layers"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        CopyObjectGroupsAndLayers (self)
-        return {'FINISHED'}
-
-
-## ------------------------------------ APPLY AND RESTORE OVERRIDES --------------------------------------
-
-def DefOscApplyOverrides(self):
-    LISTMAT = []
-    PROPTOLIST = list(eval(bpy.context.scene['OVERRIDE']))
-    # REVISO SISTEMA
-    if sys.platform.startswith("w"):
-        print("PLATFORM: WINDOWS")
-        SYSBAR = "\\"
-    else:
-        print("PLATFORM:LINUX")
-        SYSBAR = "/"
-    FILEPATH=bpy.data.filepath
-    ACTIVEFOLDER=FILEPATH.rpartition(SYSBAR)[0]
-    ENTFILEPATH= "%s%s%s_OVERRIDE.xml" %  (ACTIVEFOLDER, SYSBAR, bpy.context.scene.name)
-    XML=open(ENTFILEPATH ,mode="w")
-    ## GUARDO MATERIALES DE OBJETOS EN GRUPOS
-    
-    LISTMAT = { OBJ : [SLOT.material for SLOT in OBJ.material_slots[:]] for OBJ in bpy.data.objects[:] if OBJ.type == "MESH" or OBJ.type == "META" or OBJ.type == "CURVE" }
-    
-    
-    for OVERRIDE in PROPTOLIST:
-        for OBJECT in bpy.data.groups[OVERRIDE[0]].objects[:]:
-            if OBJECT.type == "MESH" or OBJECT.type == "META" or OBJECT.type == "CURVE": 
-                if len(OBJECT.material_slots) > 0:                   
-                    for SLOT in OBJECT.material_slots[:]:
-                        SLOT.material = bpy.data.materials[OVERRIDE[1]]                    
-                else:
-                    print ("* %s have not Material Slots" % (OBJECT.name))         
-    
-
-    XML.writelines(str(LISTMAT))
-    XML.close()    
-    
-    
-def DefOscRestoreOverrides(self):    
-    # REVISO SISTEMA
-    if sys.platform.startswith("w"):
-        #print("PLATFORM: WINDOWS")
-        SYSBAR="\\"
-    else:
-        #print("PLATFORM:LINUX")
-        SYSBAR="/"
-
-    FILEPATH = bpy.data.filepath
-    ACTIVEFOLDER = FILEPATH.rpartition(SYSBAR)[0]
-    ENTFILEPATH = "%s%s%s_OVERRIDE.xml" %  (ACTIVEFOLDER, SYSBAR, bpy.context.scene.name)
-    XML = open(ENTFILEPATH, mode="r")
-    RXML = XML.readlines(0)
-
-    LISTMAT = dict(eval(RXML[0]))
-
-    # RESTAURO MATERIALES  DE OVERRIDES
-    
-    for OBJ in LISTMAT:            
-        if OBJ.type == "MESH" or OBJ.type == "META" or OBJ.type == "CURVE":
-            SLOTIND = 0
-            for SLOT in LISTMAT[OBJ]:
-                OBJ.material_slots[SLOTIND].material = SLOT  
-                SLOTIND += 1     
-        
-    # CIERRO
-    XML.close()
-
-    
-## HAND OPERATOR    
-class OscApplyOverrides(bpy.types.Operator):
-    bl_idname = "render.apply_overrides"
-    bl_label = "Apply Overrides in this Scene"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        DefOscApplyOverrides(self)
-        return {'FINISHED'}
-
-class OscRestoreOverrides(bpy.types.Operator):
-    bl_idname = "render.restore_overrides"
-    bl_label = "Restore Overrides in this Scene"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        DefOscRestoreOverrides(self)        
-        return {'FINISHED'}
-
-
-OVERRIDESSTATUS = False
-
-    
-class OscOverridesOn(bpy.types.Operator):
-    bl_idname = "render.overrides_on"
-    bl_label = "Turn On Overrides"
-    bl_options = {"REGISTER", "UNDO"}
-
-    def execute (self, context):
-        
-        global OVERRIDESSTATUS
-        
-        if OVERRIDESSTATUS == False:
-            bpy.app.handlers.render_pre.append(DefOscApplyOverrides)
-            bpy.app.handlers.render_post.append(DefOscRestoreOverrides)  
-            OVERRIDESSTATUS = True
-            print("Overrides on!")
-        else:    
-            bpy.app.handlers.render_pre.remove(DefOscApplyOverrides)
-            bpy.app.handlers.render_post.remove(DefOscRestoreOverrides)    
-            OVERRIDESSTATUS = False
-            print("Overrides off!")           
-        return {'FINISHED'}  
-
-
-
-## ------------------------------------ CHECK OVERRIDES --------------------------------------
-
-class OscCheckOverrides (bpy.types.Operator):
-    bl_idname = "render.check_overrides"
-    bl_label = "Check Overrides"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        GROUPI = False
-        GLOBAL = 0
-        GLOBALERROR = 0
-
-        print("==== STARTING CHECKING ====")
-        print("")
-
-        for SCENE in bpy.data.scenes[:]:
-            MATLIST = []
-            MATI = False
-
-            for MATERIAL in bpy.data.materials[:]:
-                MATLIST.append(MATERIAL.name)
-
-            GROUPLIST=[]
-            for GROUP in bpy.data.groups[:]:
-                if GROUP.users > 0:
-                    GROUPLIST.append(GROUP.name)
-
-            print("   %s Scene is checking" % (SCENE.name))
-
-            for OVERRIDE in list(eval(SCENE['OVERRIDE'])):
-                # REVISO OVERRIDES EN GRUPOS
-                if OVERRIDE[0] in GROUPLIST:
-                    pass
-                else:
-                    print("** %s group are in conflict." % (OVERRIDE[0]))
-                    GROUPI = True
-                    GLOBALERROR += 1
-                # REVISO OVERRIDES EN GRUPOS
-                if OVERRIDE[1] in MATLIST:
-                    pass
-                else:
-                    print("** %s material are in conflict." % (OVERRIDE[1]))
-                    MATI = True
-                    GLOBALERROR += 1
-
-            if MATI is False:
-                print("-- Materials are ok.")
-            else:
-                GLOBAL+=1
-            if GROUPI is False:
-                print("-- Groups are ok.")
-            else:
-                GLOBAL+=1
-
-        if GLOBAL < 1:
-            self.report({'INFO'}, "Materials And Groups are Ok")
-        if GLOBALERROR > 0:
-            self.report({'WARNING'}, "Override Error: Look in the Console")
-        print("")
-
-        return {'FINISHED'}
-
-
-## ------------------------------------ SELECTION --------------------------------------
-bpy.selection_osc=[]
-
-def select_osc():
-    if bpy.context.mode == "OBJECT":
-        obj = bpy.context.object
-        sel = len(bpy.context.selected_objects)
-
-        if sel == 0:
-            bpy.selection_osc=[]
-        else:
-            if sel == 1:
-                bpy.selection_osc=[]
-                bpy.selection_osc.append(obj)
-            elif sel > len(bpy.selection_osc):
-                for sobj in bpy.context.selected_objects:
-                    if (sobj in bpy.selection_osc) == False:
-                        bpy.selection_osc.append(sobj)
-
-            elif sel < len(bpy.selection_osc):
-                for it in bpy.selection_osc:
-                    if (it in bpy.context.selected_objects) == False:
-                        bpy.selection_osc.remove(it)
-
-class OscSelection(bpy.types.Header):
-    bl_label = "Selection Osc"
-    bl_space_type = "VIEW_3D"
-
-    def __init__(self):
-        select_osc()
-
-    def draw(self, context):
-        """
-        layout = self.layout
-        row = layout.row()
-        row.label("Sels: "+str(len(bpy.selection_osc)))
-        """
-
-
-## ------------------------------------ RESYM MESH--------------------------------------
-
-
-def reSymSave (self):
-    
-    bpy.ops.object.mode_set(mode='EDIT')
-    
-    BM = bmesh.from_edit_mesh(bpy.context.object.data)   
-     
-    L = {VERT.index : [VERT.co[0],VERT.co[1],VERT.co[2]] for VERT in BM.verts[:] if VERT.co[0] < 0.0001}
-    R = {VERT.index : [-VERT.co[0],VERT.co[1],VERT.co[2]]  for VERT in BM.verts[:] if VERT.co[0] > -0.0001}
-    
-    SYMAP = {VERTL : VERTR for VERTR in R for VERTL in L if R[VERTR] == L[VERTL] }            
-    
-    if sys.platform.startswith("w"):
-        SYSBAR = "\\"
-    else:
-         SYSBAR = "/"   
-    
-    FILEPATH=bpy.data.filepath
-    ACTIVEFOLDER=FILEPATH.rpartition(SYSBAR)[0]
-    ENTFILEPATH= "%s%s%s_%s_SYM_TEMPLATE.xml" %  (ACTIVEFOLDER, SYSBAR, bpy.context.scene.name, bpy.context.object.name)
-    XML=open(ENTFILEPATH ,mode="w")
-    
-    XML.writelines(str(SYMAP))
-    XML.close()
-    SYMAP.clear()
-
-def reSymMesh (self, SELECTED, SIDE):
-    
-    bpy.ops.object.mode_set(mode='EDIT')
-    
-    BM = bmesh.from_edit_mesh(bpy.context.object.data)
-    
-    if sys.platform.startswith("w"):
-        SYSBAR = "\\"
-    else:
-         SYSBAR = "/" 
-    
-    FILEPATH=bpy.data.filepath
-    ACTIVEFOLDER=FILEPATH.rpartition(SYSBAR)[0]
-    ENTFILEPATH= "%s%s%s_%s_SYM_TEMPLATE.xml" %  (ACTIVEFOLDER, SYSBAR, bpy.context.scene.name, bpy.context.object.name)
-    XML=open(ENTFILEPATH ,mode="r")
-    
-    SYMAP = eval(XML.readlines()[0])    
-    
-    if SIDE == "+-":
-        if SELECTED:
-            for VERT in SYMAP:
-                if BM.verts[SYMAP[VERT]].select:
-                    if VERT == SYMAP[VERT]:
-                        BM.verts[VERT].co[0] = 0
-                        BM.verts[VERT].co[1] = BM.verts[SYMAP[VERT]].co[1]
-                        BM.verts[VERT].co[2] = BM.verts[SYMAP[VERT]].co[2]            
-                    else:    
-                        BM.verts[VERT].co[0] = -BM.verts[SYMAP[VERT]].co[0]
-                        BM.verts[VERT].co[1] = BM.verts[SYMAP[VERT]].co[1]
-                        BM.verts[VERT].co[2] = BM.verts[SYMAP[VERT]].co[2]        
-        else:    
-            for VERT in SYMAP:
-                if VERT == SYMAP[VERT]:
-                    BM.verts[VERT].co[0] = 0
-                    BM.verts[VERT].co[1] = BM.verts[SYMAP[VERT]].co[1]
-                    BM.verts[VERT].co[2] = BM.verts[SYMAP[VERT]].co[2]            
-                else:    
-                    BM.verts[VERT].co[0] = -BM.verts[SYMAP[VERT]].co[0]
-                    BM.verts[VERT].co[1] = BM.verts[SYMAP[VERT]].co[1]
-                    BM.verts[VERT].co[2] = BM.verts[SYMAP[VERT]].co[2]
-    else:
-        if SELECTED:
-            for VERT in SYMAP:
-                if BM.verts[VERT].select:
-                    if VERT == SYMAP[VERT]:
-                        BM.verts[SYMAP[VERT]].co[0] = 0
-                        BM.verts[SYMAP[VERT]].co[1] = BM.verts[VERT].co[1]
-                        BM.verts[SYMAP[VERT]].co[2] = BM.verts[VERT].co[2]            
-                    else:    
-                        BM.verts[SYMAP[VERT]].co[0] = -BM.verts[VERT].co[0]
-                        BM.verts[SYMAP[VERT]].co[1] = BM.verts[VERT].co[1]
-                        BM.verts[SYMAP[VERT]].co[2] = BM.verts[VERT].co[2]        
-        else:    
-            for VERT in SYMAP:
-                if VERT == SYMAP[VERT]:
-                    BM.verts[SYMAP[VERT]].co[0] = 0
-                    BM.verts[SYMAP[VERT]].co[1] = BM.verts[VERT].co[1]
-                    BM.verts[SYMAP[VERT]].co[2] = BM.verts[VERT].co[2]            
-                else:    
-                    BM.verts[SYMAP[VERT]].co[0] = -BM.verts[VERT].co[0]
-                    BM.verts[SYMAP[VERT]].co[1] = BM.verts[VERT].co[1]
-                    BM.verts[SYMAP[VERT]].co[2] = BM.verts[VERT].co[2]                        
-    
-    bpy.ops.object.mode_set(mode='OBJECT')
-    bpy.ops.object.mode_set(mode='EDIT')
-    
-    XML.close()
-    SYMAP.clear()
-
-
-class OscResymSave (bpy.types.Operator):
-    bl_idname = "mesh.resym_save_map"
-    bl_label = "Resym save XML Map"
-    bl_options = {"REGISTER", "UNDO"}
-
-
-    def execute (self, context):
-        reSymSave(self)
-        return {'FINISHED'}
-
-class OscResymMesh (bpy.types.Operator):
-    bl_idname = "mesh.resym_mesh"
-    bl_label = "Resym save Apply XML"
-    bl_options = {"REGISTER", "UNDO"}
-
-    selected=bpy.props.BoolProperty(default=False, name="Only Selected")
-    
-    side = bpy.props.EnumProperty(
-            name="Side_",
-            description="Select Side.",
-            items=(('+-', "+X to -X", "+X to -X"),
-                   ('-+', "-X to +X", "-X to +X")),
-            default='+-',
-            )    
-    
-    def execute (self, context):
-        reSymMesh(self, self.selected,self.side)
-        return {'FINISHED'}
-    
-##=============== DISTRIBUTE ======================    
-
-
-def ObjectDistributeOscurart (self, X, Y, Z):
-    if len(bpy.selection_osc[:]) > 1:
-        # VARIABLES
-        dif = bpy.selection_osc[-1].location-bpy.selection_osc[0].location
-        chunkglobal = dif/(len(bpy.selection_osc[:])-1)
-        chunkx = 0
-        chunky = 0
-        chunkz = 0
-        deltafst = bpy.selection_osc[0].location
-        
-        #ORDENA
-        for OBJECT in bpy.selection_osc[:]:          
-            if X:  OBJECT.location.x=deltafst[0]+chunkx
-            if Y:  OBJECT.location[1]=deltafst[1]+chunky
-            if Z:  OBJECT.location.z=deltafst[2]+chunkz
-            chunkx+=chunkglobal[0]
-            chunky+=chunkglobal[1]
-            chunkz+=chunkglobal[2]
-    else:  
-        self.report({'ERROR'}, "Selection is only 1!")      
-    
-class DialogDistributeOsc(bpy.types.Operator):
-    bl_idname = "object.distribute_osc"
-    bl_label = "Distribute Objects"       
-    Boolx = bpy.props.BoolProperty(name="X")
-    Booly = bpy.props.BoolProperty(name="Y")
-    Boolz = bpy.props.BoolProperty(name="Z")
-    
-    def execute(self, context):
-        ObjectDistributeOscurart(self, self.Boolx,self.Booly,self.Boolz)
-        return {'FINISHED'}
-    def invoke(self, context, event):
-        self.Boolx = True
-        self.Booly = True
-        self.Boolz = True        
-        return context.window_manager.invoke_props_dialog(self)
-    
-##--------------------------------- OVERRIDES PANEL ---------------------------------- 
-   
-class OscOverridesGUI(bpy.types.Panel):
-    bl_label = "Oscurart Material Overrides"
-    bl_idname = "Oscurart Overrides List"
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "render"
-    def draw(self,context):
-        
-        layout = self.layout
-        col = layout.column(align=1)
-        colrow = col.row(align=1)
-        colrow.operator("render.overrides_add_slot", icon = "ZOOMIN") 
-        colrow.operator("render.overrides_remove_slot", icon = "ZOOMOUT")         
-        col.operator("render.overrides_transfer", icon = "SHORTDISPLAY") 
-        i = 0
-        for m in bpy.context.scene.ovlist:
-            colrow = col.row(align=1)
-            colrow.prop_search(m, "grooverride", bpy.data, "groups", text= "")  
-            colrow.prop_search(m, "matoverride", bpy.data, "materials", text= "")
-            if i != len(bpy.context.scene.ovlist)-1:
-                pa = colrow.operator("ovlist.move_down", text="", icon="TRIA_DOWN")
-                pa.index = i                
-            if i > 0:
-                p = colrow.operator("ovlist.move_up", text="", icon="TRIA_UP")
-                p.index = i
-            pb = colrow.operator("ovlist.kill", text="", icon="X")            
-            pb.index = i
-            i+=1
- 
-class OscOverridesUp (bpy.types.Operator): 
-    bl_idname = 'ovlist.move_up'
-    bl_label = 'Move Override up'
-    bl_options = {'INTERNAL'}
-   
-    index = bpy.props.IntProperty(min=0)
-   
-    @classmethod
-    def poll(self,context):
-        return len(context.scene.ovlist) 
-    def execute(self,context):
-        ovlist = context.scene.ovlist
-        ovlist.move(self.index,self.index-1) 
-
-        return {'FINISHED'}   
-
-class OscOverridesDown (bpy.types.Operator): 
-    bl_idname = 'ovlist.move_down'
-    bl_label = 'Move Override down'
-    bl_options = {'INTERNAL'}
-   
-    index = bpy.props.IntProperty(min=0)
-   
-    @classmethod
-    def poll(self,context):
-        return len(context.scene.ovlist) 
-    def execute(self,context):
-        ovlist = context.scene.ovlist
-        ovlist.move(self.index,self.index+1) 
-        return {'FINISHED'}              
-
-class OscOverridesKill (bpy.types.Operator): 
-    bl_idname = 'ovlist.kill'
-    bl_label = 'Kill Override'
-    bl_options = {'INTERNAL'}
-   
-    index = bpy.props.IntProperty(min=0)
-   
-    @classmethod
-    def poll(self,context):
-        return len(context.scene.ovlist) 
-    def execute(self,context):
-        ovlist = context.scene.ovlist  
-        ovlist.remove(self.index)  
-        return {'FINISHED'}              
-
-
-class OscOverridesProp(bpy.types.PropertyGroup):
-    matoverride = bpy.props.StringProperty() 
-    grooverride = bpy.props.StringProperty()        
-        
-bpy.utils.register_class(OscOverridesGUI)
-bpy.utils.register_class(OscOverridesProp)
-bpy.types.Scene.ovlist = bpy.props.CollectionProperty(type=OscOverridesProp)        
-
-
-class OscTransferOverrides (bpy.types.Operator):    
-    """Tooltip"""
-    bl_idname = "render.overrides_transfer"
-    bl_label = "Transfer Overrides"
-
-    def execute(self, context):
-        # CREO LISTA
-        OSCOV = [[OVERRIDE.grooverride,OVERRIDE.matoverride]for OVERRIDE in bpy.context.scene.ovlist[:] if OVERRIDE.matoverride != "" if OVERRIDE.grooverride != ""]
-
-        bpy.context.scene["OVERRIDE"] = str(OSCOV)
-        return {'FINISHED'}   
-    
-class OscAddOverridesSlot (bpy.types.Operator):    
-    """Tooltip"""
-    bl_idname = "render.overrides_add_slot"
-    bl_label = "Add Override Slot"
-
-    def execute(self, context):
-        prop = bpy.context.scene.ovlist.add()
-        prop.matoverride = ""
-        prop.grooverride = ""
-        return {'FINISHED'}      
-
-class OscRemoveOverridesSlot (bpy.types.Operator):    
-    """Tooltip"""
-    bl_idname = "render.overrides_remove_slot"
-    bl_label = "Remove Override Slot"
-
-    def execute(self, context):
-        bpy.context.scene.ovlist.remove(len(bpy.context.scene.ovlist)-1)
-        return {'FINISHED'} 
-    
-bpy.utils.register_class(OscTransferOverrides)
-bpy.utils.register_class(OscAddOverridesSlot)
-bpy.utils.register_class(OscRemoveOverridesSlot)
-
-## --------------------------------------PYTHON BATCH--------------------------------------------------------
-def defoscPythonBatchMaker(BATCHTYPE,SIZE):
-    # REVISO SISTEMA
-    if sys.platform.startswith("w"):
-        print("PLATFORM: WINDOWS")
-        SYSBAR = "\\"
-        EXTSYS = ".bat"
-        QUOTES = '"'
-    else:
-        print("PLATFORM:LINUX")
-        SYSBAR = "/"
-        EXTSYS = ".sh"    
-        QUOTES = ''
-    
-    # CREO VARIABLES
-    FILENAME = bpy.data.filepath.rpartition(SYSBAR)[-1].rpartition(".")[0]
-    SHFILE = "%s%s%s_PythonSecureBatch.py"   % (bpy.data.filepath.rpartition(SYSBAR)[0],SYSBAR,FILENAME)
-    BATCHLOCATION = "%s%s%s%s"   % (bpy.data.filepath.rpartition(SYSBAR)[0],SYSBAR,FILENAME,EXTSYS)
-
-    FILEBATCH = open(SHFILE,"w")
-    
-    if EXTSYS == ".bat":
-        BATCHLOCATION=BATCHLOCATION.replace("\\","/")    
-    
-    # SI EL OUTPUT TIENE DOBLE BARRA LA REEMPLAZO
-    FRO=bpy.context.scene.render.filepath        
-    if bpy.context.scene.render.filepath.count("//"):
-        FRO=bpy.context.scene.render.filepath.replace("//", bpy.data.filepath.rpartition(SYSBAR)[0]+SYSBAR)         
-    if EXTSYS == ".bat":
-        FRO=FRO.replace("\\","/")        
-          
-        
-                 
-    #CREO BATCH
-    bpy.ops.file.create_batch_maker_osc(type=BATCHTYPE)
-    
-    SCRIPT = "import os \nREPITE= True \nBAT= '%s'\nSCENENAME ='%s' \nDIR='%s%s' \ndef RENDER():\n    os.system(BAT) \ndef CLEAN():\n    global REPITE\n    FILES  = [root+'/'+FILE for root, dirs, files in os.walk(os.getcwd()) if len(files) > 0 for FILE in files if FILE.count('~') == False]\n    RESPUESTA=False\n    for FILE in FILES:\n        if os.path.getsize(FILE) < %s:\n            os.remove(FILE)\n            RESPUESTA= True\n    if RESPUESTA:\n        REPITE=True\n    else:\n        REPITE=False\nREPITE=True\nwhile REPITE:\n    global REPITE\n    REPITE=False\n    RENDER()\n    os.chdir(DIR)\n    CLEAN()" % (BATCHLOCATION,FILENAME,FRO,FILENAME,SIZE)
-    
-    
-    # DEFINO ARCHIVO DE BATCH
-    FILEBATCH.writelines(SCRIPT)
-    FILEBATCH.close()  
-    
-    
-    # ARCHIVO CALL
-    CALLFILENAME = bpy.data.filepath.rpartition(SYSBAR)[-1].rpartition(".")[0]
-    CALLFILE = "%s%s%s_CallPythonSecureBatch%s"   % (bpy.data.filepath.rpartition(SYSBAR)[0],SYSBAR,CALLFILENAME,EXTSYS)  
-    CALLFILEBATCH = open(CALLFILE,"w")  
-    
-    SCRIPT = "python %s" % (SHFILE)
-    CALLFILEBATCH.writelines(SCRIPT)
-    CALLFILEBATCH.close()
-    
-    if EXTSYS == ".sh":
-        try:
-            os.chmod(CALLFILE, stat.S_IRWXU)  
-            os.chmod(SHFILE, stat.S_IRWXU) 
-        except:
-            print("** Oscurart Batch maker can not modify the permissions.")      
-    
-    
-    
-class oscPythonBatchMaker (bpy.types.Operator):
-    bl_idname = "file.create_batch_python"
-    bl_label = "Make Batch Python"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    size = bpy.props.IntProperty(name="Size in Bytes", default=10, min=0)
-    
-    type = bpy.props.EnumProperty(
-            name="Render Mode",
-            description="Select Render Mode.",
-            items=(('osRlat', "All Scenes", "Render All Layers At Time"),
-                   ('osRSlat', "Selected Scenes", "Render Only The Selected Scenes")),
-            default='osRlat',
-            )
-
-    def execute(self,context):
-        defoscPythonBatchMaker(self.type, self.size)
-        return {'FINISHED'}
- 
-##======================================================================================FIN DE SCRIPTS
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/particle_hair_lab.py b/release/scripts/addons_contrib/particle_hair_lab.py
deleted file mode 100644
index 249f7df..0000000
--- a/release/scripts/addons_contrib/particle_hair_lab.py
+++ /dev/null
@@ -1,1503 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Grass Lab",
-    "author": "Ondrej Raha(lokhorn), meta-androcto",
-    "version": (0,5),
-    "blender": (2, 6, 0),
-    "location": "View3D > Tool Shelf > Grass Preset Panel",
-    "description": "Creates particle grass with material",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Object/Hair_Lab",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=30238",
-    "category": "Object"}
-
-
-import bpy
-from bpy.props import *
-
-# Returns the action we want to take
-def getActionToDo(obj):
-    if not obj or obj.type != 'MESH':
-        return 'NOT_OBJ_DO_NOTHING'
-    elif obj.type == 'MESH':
-        return 'GENERATE'
-    else:
-        return "DO_NOTHING"
-
-# TO DO
-"""
-class saveSelectionPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-
-    bl_label = "Selection Save"
-    bl_options = {'DEFAULT_CLOSED'}
-    bl_context = "particlemode"
-    
-
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column(align=True)
-        
-        col.operator("save.selection", text="Save Selection 1")
-"""
-######GRASS########################
-class grassLabPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Grass Lab"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}  
-
-    def draw(self, context):
-        active_obj = bpy.context.active_object
-        active_scn = bpy.context.scene.name
-        layout = self.layout
-        col = layout.column(align=True)
-        
-        WhatToDo = getActionToDo(active_obj)
-      
-        
-        if WhatToDo == "GENERATE":
-            col.operator("grass.generate_grass", text="Create grass")
-
-            col.prop(context.scene, "grass_type")
-        else:
-            col.label(text="Select mesh object")
-        
-        if active_scn == "TestgrassScene":
-            col.operator("grass.switch_back", text="Switch back to scene")
-        else:
-            col.operator("grass.test_scene", text="Create Test Scene")
-
-# TO DO
-"""
-class saveSelection(bpy.types.Operator):
-    bl_idname = "save.selection"
-    bl_label = "Save Selection"
-    bl_description = "Save selected particles"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        
-        return {'FINISHED'}
-"""
-class testScene1(bpy.types.Operator):
-    bl_idname = "grass.switch_back"
-    bl_label = "Switch back to scene"
-    bl_description = "If you want keep this scene, switch scene in info window"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        scene = bpy.context.scene
-        bpy.data.scenes.remove(scene)
-        
-        return {'FINISHED'}
-        
-        
-class testScene2(bpy.types.Operator):
-    bl_idname = "grass.test_scene"
-    bl_label = "Create test scene"
-    bl_description = "You can switch scene in info panel"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "TestgrassScene"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("grassWorld")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-       
-# add text
-        bpy.ops.object.text_add(location=(-0.292,0,-0.152), rotation =(1.571,0,0))
-        text = bpy.context.active_object
-        text.scale = (0.05,0.05,0.05)
-        text.data.body = "Grass Lab"
-        
-# add material to text
-        textMaterial = bpy.data.materials.new('textMaterial')
-        text.data.materials.append(textMaterial)
-        textMaterial.use_shadeless = True
-        
-# add camera
-        bpy.ops.object.camera_add(location = (0,-1,0),rotation = (1.571,0,0))
-        cam = bpy.context.active_object.data
-        cam.lens = 50
-        cam.draw_size = 0.1
-        
-# add spot lamp
-        bpy.ops.object.lamp_add(type="SPOT", location = (-0.7,-0.5,0.3), rotation =(1.223,0,-0.960))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Key Light"
-        lamp1.energy = 1.5
-        lamp1.distance = 1.5
-        lamp1.shadow_buffer_soft = 5
-        lamp1.shadow_buffer_size = 8192
-        lamp1.shadow_buffer_clip_end = 1.5
-        lamp1.spot_blend = 0.5
-        
-# add spot lamp2
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.7,-0.6,0.1), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Fill Light"
-        lamp2.color = (0.874,0.874,1)
-        lamp2.energy = 0.5
-        lamp2.distance = 1.5
-        lamp2.shadow_buffer_soft = 5
-        lamp2.shadow_buffer_size = 4096
-        lamp2.shadow_buffer_clip_end = 1.5
-        lamp2.spot_blend = 0.5
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-# add sphere
-# add sphere
-        bpy.ops.mesh.primitive_uv_sphere_add(size=0.1)
-        bpy.ops.object.shade_smooth()
-		
-        return {'FINISHED'}
-
-
-class Generategrass(bpy.types.Operator):
-    bl_idname = "grass.generate_grass"
-    bl_label = "Generate grass"
-    bl_description = "Create a grass"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# Make variable that is the current .blend file main data blocks
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-        scene = context.scene
-
-######################################################################
-########################Test screen grass########################
-        if scene.grass_type == '0':              
-            
-###############Create New Material##################
-# add new material
-            grassMaterial = bpy.data.materials.new('greengrassMat')
-            ob.data.materials.append(grassMaterial)
-            
-#Material settings
-            grassMaterial.preview_render_type = "HAIR"
-            grassMaterial.diffuse_color = (0.09710, 0.288, 0.01687)
-            grassMaterial.specular_color = (0.604, 0.465, 0.136)
-            grassMaterial.specular_intensity = 0.3
-            grassMaterial.ambient = 0
-            grassMaterial.use_cubic = True
-            grassMaterial.use_transparency = True
-            grassMaterial.alpha = 0
-            grassMaterial.use_transparent_shadows = True
-            #strand
-            grassMaterial.strand.use_blender_units = True
-            grassMaterial.strand.root_size = 0.00030
-            grassMaterial.strand.tip_size = 0.00010
-            grassMaterial.strand.size_min = 0.7
-            grassMaterial.strand.width_fade = 0.1
-            grassMaterial.strand.shape = 0.061
-            grassMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            grassTex = bpy.data.textures.new("greengrassTex", type='BLEND')
-            grassTex.use_preview_alpha = True
-            grassTex.use_color_ramp = True
-            ramp = grassTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.114,0.375,0.004025,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.267,0.155,0.02687,0]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.281,0.598,0.03157,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.119,0.528,0.136,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.247,0.713,0.006472,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.01943,0.163,0.01242,0.64]
-    
-# add texture to material
-            MTex = grassMaterial.texture_slots.add()
-            MTex.texture = grassTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-            
-###############  Create Particles  ##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            grassParticles = bpy.context.object.particle_systems.active
-            grassParticles.name = "greengrassPar"
-            grassParticles.settings.type = "HAIR"
-            grassParticles.settings.use_advanced_hair = True
-            grassParticles.settings.count = 500
-            grassParticles.settings.normal_factor = 0.05
-            grassParticles.settings.factor_random = 0.001
-            grassParticles.settings.use_dynamic_rotation = True
-            
-            grassParticles.settings.material = NumberOfMaterials
-            
-            grassParticles.settings.use_strand_primitive = True
-            grassParticles.settings.use_hair_bspline = True
-            grassParticles.settings.render_step = 5
-            grassParticles.settings.length_random = 0.5
-            grassParticles.settings.draw_step = 5
-# children
-            grassParticles.settings.rendered_child_count = 50
-            grassParticles.settings.child_type = "INTERPOLATED"
-            grassParticles.settings.child_length = 0.250
-            grassParticles.settings.create_long_hair_children = True
-            grassParticles.settings.clump_shape = 0.074
-            grassParticles.settings.clump_factor = 0.55
-            grassParticles.settings.roughness_endpoint = 0.080
-            grassParticles.settings.roughness_end_shape = 0.80
-            grassParticles.settings.roughness_2 = 0.043
-            grassParticles.settings.roughness_2_size = 0.230
-        
-        
-######################################################################
-######################  Field Grass  ########################
-        if scene.grass_type == '1':
-###############Create New Material##################
-# add new material
-            grassMaterial = bpy.data.materials.new('fieldgrassMat')
-            ob.data.materials.append(grassMaterial)
-            
-#Material settings
-            grassMaterial.preview_render_type = "HAIR"
-            grassMaterial.diffuse_color = (0.229, 0.800, 0.010)
-            grassMaterial.specular_color = (0.010, 0.06072, 0.000825)
-            grassMaterial.specular_intensity = 0.3
-            grassMaterial.specular_hardness = 100
-            grassMaterial.use_specular_ramp = True
-            
-            ramp = grassMaterial.specular_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.0356,0.0652,0.009134,0]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.352,0.750,0.231,1]
-            rampElement1 = rampElements.new(0.255)
-            rampElement1.color = [0.214,0.342,0.0578,0.31]
-            rampElement2 = rampElements.new(0.594)
-            rampElement2.color = [0.096,0.643,0.0861,0.72]
-            
-            grassMaterial.ambient = 0
-            grassMaterial.use_cubic = True
-            grassMaterial.use_transparency = True
-            grassMaterial.alpha = 0
-            grassMaterial.use_transparent_shadows = True
-            #strand
-            grassMaterial.strand.use_blender_units = True
-            grassMaterial.strand.root_size = 0.00030
-            grassMaterial.strand.tip_size = 0.00015
-            grassMaterial.strand.size_min = 0.450
-            grassMaterial.strand.width_fade = 0.1
-            grassMaterial.strand.shape = 0.02
-            grassMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            grassTex = bpy.data.textures.new("feildgrassTex", type='BLEND')
-            grassTex.name = "feildgrassTex"
-            grassTex.use_preview_alpha = True
-            grassTex.use_color_ramp = True
-            ramp = grassTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.009721,0.006049,0.003677,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.04231,0.02029,0.01444,0.16]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.01467,0.005307,0.00316,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.0272,0.01364,0.01013,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.04445,0.02294,0.01729,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.04092,0.0185,0.01161,0.64]
-            
-# add texture to material
-            MTex = grassMaterial.texture_slots.add()
-            MTex.texture = grassTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            grassParticles = bpy.context.object.particle_systems.active
-            grassParticles.name = "fieldgrassPar"
-            grassParticles.settings.type = "HAIR"
-            grassParticles.settings.use_emit_random = True
-            grassParticles.settings.use_even_distribution = True
-            grassParticles.settings.use_advanced_hair = True
-            grassParticles.settings.count = 2000
-#Particle settings Velocity
-            grassParticles.settings.normal_factor = 0.060
-            grassParticles.settings.factor_random = 0.045
-            grassParticles.settings.use_dynamic_rotation = False
-            grassParticles.settings.brownian_factor = 0.070
-            grassParticles.settings.damping = 0.160
-            grassParticles.settings.material = NumberOfMaterials
- # strands           
-            grassParticles.settings.use_strand_primitive = True
-            grassParticles.settings.use_hair_bspline = True
-            grassParticles.settings.render_step = 7
-            grassParticles.settings.length_random = 1.0
-            grassParticles.settings.draw_step = 2
-# children
-            grassParticles.settings.child_type = "INTERPOLATED"
-            grassParticles.settings.child_length = 0.160
-            grassParticles.settings.create_long_hair_children = False
-            grassParticles.settings.clump_factor = 0.000
-            grassParticles.settings.clump_shape = 0.000
-            grassParticles.settings.roughness_endpoint = 0.000
-            grassParticles.settings.roughness_end_shape = 1
-            grassParticles.settings.roughness_2 = 0.200
-            grassParticles.settings.roughness_2_size = 0.230
-        
-        
-######################################################################
-########################Short Clumpped grass##########################
-        elif scene.grass_type == '2':
-###############Create New Material##################
-# add new material
-            grassMaterial = bpy.data.materials.new('clumpygrassMat')
-            ob.data.materials.append(grassMaterial)
-            
-#Material settings
-            grassMaterial.preview_render_type = "HAIR"
-            grassMaterial.diffuse_color = (0.01504, 0.05222, 0.007724)
-            grassMaterial.specular_color = (0.02610, 0.196, 0.04444)
-            grassMaterial.specular_intensity = 0.5
-            grassMaterial.specular_hardness = 100
-            grassMaterial.ambient = 0
-            grassMaterial.use_cubic = True
-            grassMaterial.use_transparency = True
-            grassMaterial.alpha = 0
-            grassMaterial.use_transparent_shadows = True
-#strand
-            grassMaterial.strand.use_blender_units = True
-            grassMaterial.strand.root_size = 0.000315
-            grassMaterial.strand.tip_size = 0.00020
-            grassMaterial.strand.size_min = 0.2
-            grassMaterial.strand.width_fade = 0.1
-            grassMaterial.strand.shape = -0.900
-            grassMaterial.strand.blend_distance = 0.001
-            
-# add texture
-            grassTex = bpy.data.textures.new("clumpygrasstex", type='BLEND')
-            grassTex.use_preview_alpha = True
-            grassTex.use_color_ramp = True
-            ramp = grassTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.004025,0.002732,0.002428,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.141,0.622,0.107,0.2]
-            rampElement1 = rampElements.new(0.202)
-            rampElement1.color = [0.01885,0.2177,0.01827,0.65]
-            rampElement2 = rampElements.new(0.499)
-            rampElement2.color = [0.114,0.309,0.09822,0.87]
-            rampElement3 = rampElements.new(0.828)
-            rampElement3.color = [0.141,0.427,0.117,0.64]
-            
-# add texture to material
-            MTex = grassMaterial.texture_slots.add()
-            MTex.texture = grassTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            grassParticles = bpy.context.object.particle_systems.active
-            grassParticles.name = "clumpygrass"
-            grassParticles.settings.type = "HAIR"
-            grassParticles.settings.use_advanced_hair = True
-            grassParticles.settings.hair_step = 2
-            grassParticles.settings.count = 250
-            grassParticles.settings.normal_factor = 0.0082
-            grassParticles.settings.tangent_factor = 0.001
-            grassParticles.settings.tangent_phase = 0.250
-            grassParticles.settings.factor_random = 0.001
-            grassParticles.settings.use_dynamic_rotation = True
-            
-            grassParticles.settings.material = NumberOfMaterials
-            
-            grassParticles.settings.use_strand_primitive = True
-            grassParticles.settings.use_hair_bspline = True
-            grassParticles.settings.render_step = 3
-            grassParticles.settings.length_random = 0.3
-            grassParticles.settings.draw_step = 3
-# children
-            grassParticles.settings.child_type = "INTERPOLATED"
-            grassParticles.settings.child_length = 0.667
-            grassParticles.settings.child_length_threshold = 0.111
-            grassParticles.settings.rendered_child_count = 200
-            grassParticles.settings.virtual_parents = 1
-            grassParticles.settings.clump_factor = 0.425
-            grassParticles.settings.clump_shape = -0.999
-            grassParticles.settings.roughness_endpoint = 0.003
-            grassParticles.settings.roughness_end_shape = 5
-            
-            
-        
-        return {'FINISHED'}
-		
-####
-######### HAIR LAB ##########
-####
-class HairLabPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Hair Lab"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}    
-
-    def draw(self, context):
-        active_obj = bpy.context.active_object
-        active_scn = bpy.context.scene.name
-        layout = self.layout
-        col = layout.column(align=True)
-        
-        WhatToDo = getActionToDo(active_obj)
-      
-        
-        if WhatToDo == "GENERATE":
-            col.operator("hair.generate_hair", text="Create Hair")
-
-            col.prop(context.scene, "hair_type")
-        else:
-            col.label(text="Select mesh object")
-        
-        if active_scn == "TestHairScene":
-            col.operator("hair.switch_back", text="Switch back to scene")
-        else:
-            col.operator("hair.test_scene", text="Create Test Scene")
-
-# TO DO
-"""
-class saveSelection(bpy.types.Operator):
-    bl_idname = "save.selection"
-    bl_label = "Save Selection"
-    bl_description = "Save selected particles"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        
-        return {'FINISHED'}
-"""
-class testScene3(bpy.types.Operator):
-    bl_idname = "hair.switch_back"
-    bl_label = "Switch back to scene"
-    bl_description = "If you want keep this scene, switch scene in info window"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        scene = bpy.context.scene
-        bpy.data.scenes.remove(scene)
-        
-        return {'FINISHED'}
-        
-        
-class testScene4(bpy.types.Operator):
-    bl_idname = "hair.test_scene"
-    bl_label = "Create test scene"
-    bl_description = "You can switch scene in info panel"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "TestHairScene"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("HairWorld")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        
-# add text
-        bpy.ops.object.text_add(location=(-0.292,0,-0.152), rotation =(1.571,0,0))
-        text = bpy.context.active_object
-        text.scale = (0.05,0.05,0.05)
-        text.data.body = "Hair Lab"
-        
-# add material to text
-        textMaterial = bpy.data.materials.new('textMaterial')
-        text.data.materials.append(textMaterial)
-        textMaterial.use_shadeless = True
-        
-# add camera
-        bpy.ops.object.camera_add(location = (0,-1,0),rotation = (1.571,0,0))
-        cam = bpy.context.active_object.data
-        cam.lens = 50
-        cam.draw_size = 0.1
-        
-# add spot lamp
-        bpy.ops.object.lamp_add(type="SPOT", location = (-0.7,-0.5,0.3), rotation =(1.223,0,-0.960))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Key Light"
-        lamp1.energy = 1.5
-        lamp1.distance = 1.5
-        lamp1.shadow_buffer_soft = 5
-        lamp1.shadow_buffer_size = 8192
-        lamp1.shadow_buffer_clip_end = 1.5
-        lamp1.spot_blend = 0.5
-        
-# add spot lamp2
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.7,-0.6,0.1), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Fill Light"
-        lamp2.color = (0.874,0.874,1)
-        lamp2.energy = 0.5
-        lamp2.distance = 1.5
-        lamp2.shadow_buffer_soft = 5
-        lamp2.shadow_buffer_size = 4096
-        lamp2.shadow_buffer_clip_end = 1.5
-        lamp2.spot_blend = 0.5
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-# add sphere
-        bpy.ops.mesh.primitive_uv_sphere_add(size=0.1)
-        bpy.ops.object.shade_smooth()       
-        return {'FINISHED'}
-
-
-class GenerateHair(bpy.types.Operator):
-    bl_idname = "hair.generate_hair"
-    bl_label = "Generate Hair"
-    bl_description = "Create a Hair"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# Make variable that is the current .blend file main data blocks
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-        scene = context.scene
-
-######################################################################
-########################Long Red Straight Hair########################
-        if scene.hair_type == '0':              
-            
-###############Create New Material##################
-# add new material
-            hairMaterial = bpy.data.materials.new('LongRedStraightHairMat')
-            ob.data.materials.append(hairMaterial)
-            
-#Material settings
-            hairMaterial.preview_render_type = "HAIR"
-            hairMaterial.diffuse_color = (0.287, 0.216, 0.04667)
-            hairMaterial.specular_color = (0.604, 0.465, 0.136)
-            hairMaterial.specular_intensity = 0.3
-            hairMaterial.ambient = 0
-            hairMaterial.use_cubic = True
-            hairMaterial.use_transparency = True
-            hairMaterial.alpha = 0
-            hairMaterial.use_transparent_shadows = True
-#strand
-            hairMaterial.strand.use_blender_units = True
-            hairMaterial.strand.root_size = 0.00030
-            hairMaterial.strand.tip_size = 0.00010
-            hairMaterial.strand.size_min = 0.7
-            hairMaterial.strand.width_fade = 0.1
-            hairMaterial.strand.shape = 0.061
-            hairMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            hairTex = bpy.data.textures.new("LongRedStraightHairTex", type='BLEND')
-            hairTex.use_preview_alpha = True
-            hairTex.use_color_ramp = True
-            ramp = hairTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.114,0.05613,0.004025,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.267,0.155,0.02687,0]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.281,0.168,0.03157,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.288,0.135,0.006242,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.247,0.113,0.006472,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.253,0.09919,0.01242,0.64]
-    
-# add texture to material
-            MTex = hairMaterial.texture_slots.add()
-            MTex.texture = hairTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            hairParticles = bpy.context.object.particle_systems.active
-            hairParticles.name = "LongRedStraightHairPar"
-            hairParticles.settings.type = "HAIR"
-            hairParticles.settings.use_advanced_hair = True
-            hairParticles.settings.count = 500
-            hairParticles.settings.normal_factor = 0.05
-            hairParticles.settings.factor_random = 0.001
-            hairParticles.settings.use_dynamic_rotation = True
-            
-            hairParticles.settings.material = NumberOfMaterials
-            
-            hairParticles.settings.use_strand_primitive = True
-            hairParticles.settings.use_hair_bspline = True
-            hairParticles.settings.render_step = 5
-            hairParticles.settings.length_random = 0.5
-            hairParticles.settings.draw_step = 5
-# children
-            hairParticles.settings.child_type = "INTERPOLATED"
-            hairParticles.settings.create_long_hair_children = True
-            hairParticles.settings.clump_factor = 0.55
-            hairParticles.settings.roughness_endpoint = 0.005
-            hairParticles.settings.roughness_end_shape = 5
-            hairParticles.settings.roughness_2 = 0.003
-            hairParticles.settings.roughness_2_size = 0.230
-        
-        
-######################################################################
-########################Long Brown Curl Hair##########################
-        if scene.hair_type == '1':
-###############Create New Material##################
-# add new material
-            hairMaterial = bpy.data.materials.new('LongBrownCurlHairMat')
-            ob.data.materials.append(hairMaterial)
-            
-#Material settings
-            hairMaterial.preview_render_type = "HAIR"
-            hairMaterial.diffuse_color = (0.662, 0.518, 0.458)
-            hairMaterial.specular_color = (0.351, 0.249, 0.230)
-            hairMaterial.specular_intensity = 0.3
-            hairMaterial.specular_hardness = 100
-            hairMaterial.use_specular_ramp = True
-            
-            ramp = hairMaterial.specular_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.0356,0.0152,0.009134,0]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.352,0.250,0.231,1]
-            rampElement1 = rampElements.new(0.255)
-            rampElement1.color = [0.214,0.08244,0.0578,0.31]
-            rampElement2 = rampElements.new(0.594)
-            rampElement2.color = [0.296,0.143,0.0861,0.72]
-            
-            hairMaterial.ambient = 0
-            hairMaterial.use_cubic = True
-            hairMaterial.use_transparency = True
-            hairMaterial.alpha = 0
-            hairMaterial.use_transparent_shadows = True
-#strand
-            hairMaterial.strand.use_blender_units = True
-            hairMaterial.strand.root_size = 0.00030
-            hairMaterial.strand.tip_size = 0.00015
-            hairMaterial.strand.size_min = 0.450
-            hairMaterial.strand.width_fade = 0.1
-            hairMaterial.strand.shape = 0.02
-            hairMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            hairTex = bpy.data.textures.new("HairTex", type='BLEND')
-            hairTex.name = "LongBrownCurlHairTex"
-            hairTex.use_preview_alpha = True
-            hairTex.use_color_ramp = True
-            ramp = hairTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.009721,0.006049,0.003677,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.04231,0.02029,0.01444,0.16]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.01467,0.005307,0.00316,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.0272,0.01364,0.01013,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.04445,0.02294,0.01729,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.04092,0.0185,0.01161,0.64]
-            
-# add texture to material
-            MTex = hairMaterial.texture_slots.add()
-            MTex.texture = hairTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            hairParticles = bpy.context.object.particle_systems.active
-            hairParticles.name = "LongBrownCurlHairPar"
-            hairParticles.settings.type = "HAIR"
-            hairParticles.settings.use_advanced_hair = True
-            hairParticles.settings.count = 500
-            hairParticles.settings.normal_factor = 0.05
-            hairParticles.settings.factor_random = 0.001
-            hairParticles.settings.use_dynamic_rotation = True
-            
-            hairParticles.settings.material = NumberOfMaterials
-            
-            hairParticles.settings.use_strand_primitive = True
-            hairParticles.settings.use_hair_bspline = True
-            hairParticles.settings.render_step = 7
-            hairParticles.settings.length_random = 0.5
-            hairParticles.settings.draw_step = 5
-# children
-            hairParticles.settings.child_type = "INTERPOLATED"
-            hairParticles.settings.create_long_hair_children = True
-            hairParticles.settings.clump_factor = 0.523
-            hairParticles.settings.clump_shape = 0.383
-            hairParticles.settings.roughness_endpoint = 0.002
-            hairParticles.settings.roughness_end_shape = 5
-            hairParticles.settings.roughness_2 = 0.003
-            hairParticles.settings.roughness_2_size = 2
-            
-            hairParticles.settings.kink = "CURL"
-            hairParticles.settings.kink_amplitude = 0.007597
-            hairParticles.settings.kink_frequency = 6
-            hairParticles.settings.kink_shape = 0.4
-            hairParticles.settings.kink_flat = 0.8
-        
-        
-######################################################################
-########################Short Dark Hair##########################
-        elif scene.hair_type == '2':
-###############Create New Material##################
-# add new material
-            hairMaterial = bpy.data.materials.new('ShortDarkHairMat')
-            ob.data.materials.append(hairMaterial)
-            
-#Material settings
-            hairMaterial.preview_render_type = "HAIR"
-            hairMaterial.diffuse_color = (0.560, 0.536, 0.506)
-            hairMaterial.specular_color = (0.196, 0.177, 0.162)
-            hairMaterial.specular_intensity = 0.5
-            hairMaterial.specular_hardness = 100
-            hairMaterial.ambient = 0
-            hairMaterial.use_cubic = True
-            hairMaterial.use_transparency = True
-            hairMaterial.alpha = 0
-            hairMaterial.use_transparent_shadows = True
-#strand
-            hairMaterial.strand.use_blender_units = True
-            hairMaterial.strand.root_size = 0.0002
-            hairMaterial.strand.tip_size = 0.0001
-            hairMaterial.strand.size_min = 0.3
-            hairMaterial.strand.width_fade = 0.1
-            hairMaterial.strand.shape = 0
-            hairMaterial.strand.blend_distance = 0.001
-            
-# add texture
-            hairTex = bpy.data.textures.new("ShortDarkHair", type='BLEND')
-            hairTex.use_preview_alpha = True
-            hairTex.use_color_ramp = True
-            ramp = hairTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.004025,0.002732,0.002428,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.141,0.122,0.107,0.2]
-            rampElement1 = rampElements.new(0.202)
-            rampElement1.color = [0.01885,0.0177,0.01827,0.65]
-            rampElement2 = rampElements.new(0.499)
-            rampElement2.color = [0.114,0.109,0.09822,0.87]
-            rampElement3 = rampElements.new(0.828)
-            rampElement3.color = [0.141,0.127,0.117,0.64]
-            
-# add texture to material
-            MTex = hairMaterial.texture_slots.add()
-            MTex.texture = hairTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            hairParticles = bpy.context.object.particle_systems.active
-            hairParticles.name = "ShortDarkHair"
-            hairParticles.settings.type = "HAIR"
-            hairParticles.settings.use_advanced_hair = True
-            hairParticles.settings.hair_step = 2
-            hairParticles.settings.count = 450
-            hairParticles.settings.normal_factor = 0.007
-            hairParticles.settings.factor_random = 0.001
-            hairParticles.settings.use_dynamic_rotation = True
-            
-            hairParticles.settings.material = NumberOfMaterials
-            
-            hairParticles.settings.use_strand_primitive = True
-            hairParticles.settings.use_hair_bspline = True
-            hairParticles.settings.render_step = 3
-            hairParticles.settings.length_random = 0.3
-            hairParticles.settings.draw_step = 3
-# children
-            hairParticles.settings.child_type = "INTERPOLATED"
-            hairParticles.settings.rendered_child_count = 200
-            hairParticles.settings.virtual_parents = 1
-            hairParticles.settings.clump_factor = 0.425
-            hairParticles.settings.clump_shape = 0.1
-            hairParticles.settings.roughness_endpoint = 0.003
-            hairParticles.settings.roughness_end_shape = 5
-            
-            
-        
-        return {'FINISHED'}
-####
-######## FUR LAB ########
-####
-
-class FurLabPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Fur Lab"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}    
-
-    def draw(self, context):
-        active_obj = bpy.context.active_object
-        active_scn = bpy.context.scene.name
-        layout = self.layout
-        col = layout.column(align=True)
-        
-        WhatToDo = getActionToDo(active_obj)
-      
-        
-        if WhatToDo == "GENERATE":
-            col.operator("fur.generate_fur", text="Create Fur")
-
-            col.prop(context.scene, "fur_type")
-        else:
-            col.label(text="Select mesh object")
-        
-        if active_scn == "TestFurScene":
-            col.operator("hair.switch_back", text="Switch back to scene")
-        else:
-            col.operator("fur.test_scene", text="Create Test Scene")
-
-# TO DO
-"""
-class saveSelection(bpy.types.Operator):
-    bl_idname = "save.selection"
-    bl_label = "Save Selection"
-    bl_description = "Save selected particles"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        
-        return {'FINISHED'}
-"""
-class testScene5(bpy.types.Operator):
-    bl_idname = "fur.switch_back"
-    bl_label = "Switch back to scene"
-    bl_description = "If you want keep this scene, switch scene in info window"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-        scene = bpy.context.scene
-        bpy.data.scenes.remove(scene)
-        
-        return {'FINISHED'}
-        
-        
-class testScene6(bpy.types.Operator):
-    bl_idname = "fur.test_scene"
-    bl_label = "Create test scene"
-    bl_description = "You can switch scene in info panel"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# add new scene
-        bpy.ops.scene.new(type="NEW")
-        scene = bpy.context.scene
-        scene.name = "TestFurScene"
-# render settings
-        render = scene.render
-        render.resolution_x = 1920
-        render.resolution_y = 1080
-        render.resolution_percentage = 50
-# add new world
-        world = bpy.data.worlds.new("FurWorld")
-        scene.world = world
-        world.use_sky_blend = True
-        world.use_sky_paper = True
-        world.horizon_color = (0.004393,0.02121,0.050)
-        world.zenith_color = (0.03335,0.227,0.359)
-        
-# add text
-        bpy.ops.object.text_add(location=(-0.292,0,-0.152), rotation =(1.571,0,0))
-        text = bpy.context.active_object
-        text.scale = (0.05,0.05,0.05)
-        text.data.body = "Fur Lab"
-        
-# add material to text
-        textMaterial = bpy.data.materials.new('textMaterial')
-        text.data.materials.append(textMaterial)
-        textMaterial.use_shadeless = True
-        
-# add camera
-        bpy.ops.object.camera_add(location = (0,-1,0),rotation = (1.571,0,0))
-        cam = bpy.context.active_object.data
-        cam.lens = 50
-        cam.draw_size = 0.1
-        
-# add spot lamp
-        bpy.ops.object.lamp_add(type="SPOT", location = (-0.7,-0.5,0.3), rotation =(1.223,0,-0.960))
-        lamp1 = bpy.context.active_object.data
-        lamp1.name = "Key Light"
-        lamp1.energy = 1.5
-        lamp1.distance = 1.5
-        lamp1.shadow_buffer_soft = 5
-        lamp1.shadow_buffer_size = 8192
-        lamp1.shadow_buffer_clip_end = 1.5
-        lamp1.spot_blend = 0.5
-        
-# add spot lamp2
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.7,-0.6,0.1), rotation =(1.571,0,0.785))
-        lamp2 = bpy.context.active_object.data
-        lamp2.name = "Fill Light"
-        lamp2.color = (0.874,0.874,1)
-        lamp2.energy = 0.5
-        lamp2.distance = 1.5
-        lamp2.shadow_buffer_soft = 5
-        lamp2.shadow_buffer_size = 4096
-        lamp2.shadow_buffer_clip_end = 1.5
-        lamp2.spot_blend = 0.5
-        
-# light Rim
-        """
-        # add spot lamp3
-        bpy.ops.object.lamp_add(type="SPOT", location = (0.191,0.714,0.689), rotation =(0.891,0,2.884))
-        lamp3 = bpy.context.active_object.data
-        lamp3.name = "Rim Light"
-        lamp3.color = (0.194,0.477,1)
-        lamp3.energy = 3
-        lamp3.distance = 1.5
-        lamp3.shadow_buffer_soft = 5
-        lamp3.shadow_buffer_size = 4096
-        lamp3.shadow_buffer_clip_end = 1.5
-        lamp3.spot_blend = 0.5
-        """
-# add sphere
-        bpy.ops.mesh.primitive_uv_sphere_add(size=0.1)
-        bpy.ops.object.shade_smooth()       
-        return {'FINISHED'}
-
-
-class GenerateFur(bpy.types.Operator):
-    bl_idname = "fur.generate_fur"
-    bl_label = "Generate Fur"
-    bl_description = "Create a Fur"
-    bl_register = True
-    bl_undo = True
-    
-    def execute(self, context):
-# Make variable that is the current .blend file main data blocks
-        blend_data = context.blend_data
-        ob = bpy.context.active_object
-        scene = context.scene
-
-######################################################################
-########################Short Fur########################
-        if scene.fur_type == '0':              
-            
-###############Create New Material##################
-# add new material
-            furMaterial = bpy.data.materials.new('Fur 1')
-            ob.data.materials.append(furMaterial)
-            
-#Material settings
-            furMaterial.preview_render_type = "HAIR"
-            furMaterial.diffuse_color = (0.287, 0.216, 0.04667)
-            furMaterial.specular_color = (0.604, 0.465, 0.136)
-            furMaterial.specular_intensity = 0.3
-            furMaterial.ambient = 0
-            furMaterial.use_cubic = True
-            furMaterial.use_transparency = True
-            furMaterial.alpha = 0
-            furMaterial.use_transparent_shadows = True
-#strand
-            furMaterial.strand.use_blender_units = True
-            furMaterial.strand.root_size = 0.00030
-            furMaterial.strand.tip_size = 0.00010
-            furMaterial.strand.size_min = 0.7
-            furMaterial.strand.width_fade = 0.1
-            furMaterial.strand.shape = 0.061
-            furMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            furTex = bpy.data.textures.new("Fur1Tex", type='BLEND')
-            furTex.use_preview_alpha = True
-            furTex.use_color_ramp = True
-            ramp = furTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.114,0.05613,0.004025,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.267,0.155,0.02687,0]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.281,0.168,0.03157,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.288,0.135,0.006242,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.247,0.113,0.006472,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.253,0.09919,0.01242,0.64]
-    
-# add texture to material
-            MTex = furMaterial.texture_slots.add()
-            MTex.texture = furTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True  
-            
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            furParticles = bpy.context.object.particle_systems.active
-            furParticles.name = "Fur1Par"
-            furParticles.settings.type = "HAIR"
-            furParticles.settings.use_advanced_hair = True
-            furParticles.settings.count = 500
-            furParticles.settings.normal_factor = 0.05
-            furParticles.settings.factor_random = 0.001
-            furParticles.settings.use_dynamic_rotation = True
-            
-            furParticles.settings.material = NumberOfMaterials
-            
-            furParticles.settings.use_strand_primitive = True
-            furParticles.settings.use_hair_bspline = True
-            furParticles.settings.render_step = 5
-            furParticles.settings.length_random = 0.5
-            furParticles.settings.draw_step = 5
-# children
-            furParticles.settings.child_type = "INTERPOLATED"
-            furParticles.settings.child_length = 0.134
-            furParticles.settings.create_long_hair_children = True
-            furParticles.settings.clump_factor = 0.55
-            furParticles.settings.roughness_endpoint = 0.005
-            furParticles.settings.roughness_end_shape = 5
-            furParticles.settings.roughness_2 = 0.003
-            furParticles.settings.roughness_2_size = 0.230
-        
-        
-######################################################################
-########################Dalmation Fur##########################
-        if scene.fur_type == '1':
-###############Create New Material##################
-# add new material
-            furMaterial = bpy.data.materials.new('Fur2Mat')
-            ob.data.materials.append(furMaterial)
-            
-#Material settings
-            furMaterial.preview_render_type = "HAIR"
-            furMaterial.diffuse_color = (0.300, 0.280, 0.280)
-            furMaterial.specular_color = (1.0, 1.0, 1.0)
-            furMaterial.specular_intensity = 0.500
-            furMaterial.specular_hardness = 50
-            
-            furMaterial.ambient = 0
-            furMaterial.use_cubic = True
-            furMaterial.use_transparency = True
-            furMaterial.alpha = 0
-            furMaterial.use_transparent_shadows = True
-#strand
-            furMaterial.strand.use_blender_units = True
-            furMaterial.strand.root_size = 0.00030
-            furMaterial.strand.tip_size = 0.00010
-            furMaterial.strand.size_min = 0.7
-            furMaterial.strand.width_fade = 0.1
-            furMaterial.strand.shape = 0.061
-            furMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            furTex = bpy.data.textures.new("Fur2Tex", type='BLEND')
-            furTex.name = "Fur2"
-            furTex.use_preview_alpha = True
-            furTex.use_color_ramp = True
-            ramp = furTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [1.0,1.0,1.0,1.0]
-            rampElements[1].position = 1
-            rampElements[1].color = [1.0,1.0,1.0,0.0]
-            rampElement1 = rampElements.new(0.116)
-            rampElement1.color = [1.0,1.0,1.0,1.0]
-       
-            
-# add texture to material
-            MTex = furMaterial.texture_slots.add()
-            MTex.texture = furTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-			
-# add texture 2
-            furTex = bpy.data.textures.new("Fur2bTex", type='CLOUDS')
-            furTex.name = "Fur2b"
-            furTex.use_preview_alpha = False
-            furTex.cloud_type = "COLOR"
-            furTex.noise_type = "HARD_NOISE"
-            furTex.noise_scale = 0.06410
-            furTex.use_color_ramp = True
-            ramp = furTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [1.0,1.0,1.0, 1.0]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.0,0.0,0.0,1.0]
-            rampElement1 = rampElements.new(0.317)
-            rampElement1.color = [1.0,1.0,1.0,1.0]
-            rampElement2 = rampElements.new(0.347)
-            rampElement2.color = [0.0,0.0,0.0,1.0]
-            
-# add texture 2 to material
-            MTex = furMaterial.texture_slots.add()
-            MTex.texture = furTex
-            MTex.texture_coords = "GLOBAL"
-            MTex.use_map_alpha = True      
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            furParticles = bpy.context.object.particle_systems.active
-            furParticles.name = "Fur2Par"
-            furParticles.settings.type = "HAIR"
-            furParticles.settings.use_advanced_hair = True
-            furParticles.settings.count = 500
-            furParticles.settings.normal_factor = 0.05
-            furParticles.settings.factor_random = 0.001
-            furParticles.settings.use_dynamic_rotation = True
-            
-            furParticles.settings.material = NumberOfMaterials
-            
-            furParticles.settings.use_strand_primitive = True
-            furParticles.settings.use_hair_bspline = True
-            furParticles.settings.render_step = 5
-            furParticles.settings.length_random = 0.5
-            furParticles.settings.draw_step = 5
-# children
-            furParticles.settings.child_type = "INTERPOLATED"
-            furParticles.settings.child_length = 0.07227
-            furParticles.settings.create_long_hair_children = True
-            furParticles.settings.clump_factor = 0.55
-            furParticles.settings.roughness_endpoint = 0.005
-            furParticles.settings.roughness_end_shape = 5
-            furParticles.settings.roughness_2 = 0.003
-            furParticles.settings.roughness_2_size = 0.230
-        
-######################################################################
-########################Spotted_fur##########################
-        elif scene.fur_type == '2':
-
-###############Create New Material##################
-# add new material
-            furMaterial = bpy.data.materials.new('Fur3Mat')
-            ob.data.materials.append(furMaterial)
-            
-#Material settings
-            furMaterial.preview_render_type = "HAIR"
-            furMaterial.diffuse_color = (0.300, 0.280, 0.280)
-            furMaterial.specular_color = (1.0, 1.0, 1.0)
-            furMaterial.specular_intensity = 0.500
-            furMaterial.specular_hardness = 50
-            furMaterial.use_specular_ramp = True
-            
-            ramp = furMaterial.specular_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.0356,0.0152,0.009134,0]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.352,0.250,0.231,1]
-            rampElement1 = rampElements.new(0.255)
-            rampElement1.color = [0.214,0.08244,0.0578,0.31]
-            rampElement2 = rampElements.new(0.594)
-            rampElement2.color = [0.296,0.143,0.0861,0.72]
-            
-            furMaterial.ambient = 0
-            furMaterial.use_cubic = True
-            furMaterial.use_transparency = True
-            furMaterial.alpha = 0
-            furMaterial.use_transparent_shadows = True
-#strand
-            furMaterial.strand.use_blender_units = True
-            furMaterial.strand.root_size = 0.00030
-            furMaterial.strand.tip_size = 0.00015
-            furMaterial.strand.size_min = 0.450
-            furMaterial.strand.width_fade = 0.1
-            furMaterial.strand.shape = 0.02
-            furMaterial.strand.blend_distance = 0.001
-            
-            
-# add texture
-            furTex = bpy.data.textures.new("Fur3Tex", type='BLEND')
-            furTex.name = "Fur3"
-            furTex.use_preview_alpha = True
-            furTex.use_color_ramp = True
-            ramp = furTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.009721,0.006049,0.003677,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.04231,0.02029,0.01444,0.16]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.01467,0.005307,0.00316,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.0272,0.01364,0.01013,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.04445,0.02294,0.01729,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.04092,0.0185,0.01161,0.64]
-            
-# add texture to material
-            MTex = furMaterial.texture_slots.add()
-            MTex.texture = furTex
-            MTex.texture_coords = "STRAND"
-            MTex.use_map_alpha = True
-			
-# add texture 2
-            furTex = bpy.data.textures.new("Fur3bTex", type='CLOUDS')
-            furTex.name = "Fur3b"
-            furTex.use_preview_alpha = True
-            furTex.cloud_type = "COLOR"
-            furTex.use_color_ramp = True
-            ramp = furTex.color_ramp
-            rampElements = ramp.elements
-            rampElements[0].position = 0
-            rampElements[0].color = [0.009721,0.006049,0.003677,0.38]
-            rampElements[1].position = 1
-            rampElements[1].color = [0.04231,0.02029,0.01444,0.16]
-            rampElement1 = rampElements.new(0.111)
-            rampElement1.color = [0.01467,0.005307,0.00316,0.65]
-            rampElement2 = rampElements.new(0.366)
-            rampElement2.color = [0.0272,0.01364,0.01013,0.87]
-            rampElement3 = rampElements.new(0.608)
-            rampElement3.color = [0.04445,0.02294,0.01729,0.8]
-            rampElement4 = rampElements.new(0.828)
-            rampElement4.color = [0.04092,0.0185,0.01161,0.64]
-            
-# add texture 2 to material
-            MTex = furMaterial.texture_slots.add()
-            MTex.texture = furTex
-            MTex.texture_coords = "GLOBAL"
-            MTex.use_map_alpha = False      
-            
-###############Create Particles##################
-# Add new particle system
-            
-            NumberOfMaterials = 0
-            for i in ob.data.materials:
-                NumberOfMaterials +=1
-            
-            
-            bpy.ops.object.particle_system_add()
-#Particle settings setting it up!
-            furParticles = bpy.context.object.particle_systems.active
-            furParticles.name = "Fur3Par"
-            furParticles.settings.type = "HAIR"
-            furParticles.settings.use_advanced_hair = True
-            furParticles.settings.count = 500
-            furParticles.settings.normal_factor = 0.05
-            furParticles.settings.factor_random = 0.001
-            furParticles.settings.use_dynamic_rotation = True
-            
-            furParticles.settings.material = NumberOfMaterials
-            
-            furParticles.settings.use_strand_primitive = True
-            furParticles.settings.use_hair_bspline = True
-            furParticles.settings.render_step = 5
-            furParticles.settings.length_random = 0.5
-            furParticles.settings.draw_step = 5
-# children
-            furParticles.settings.child_type = "INTERPOLATED"
-            furParticles.settings.child_length = 0.134
-            furParticles.settings.create_long_hair_children = True
-            furParticles.settings.clump_factor = 0.55
-            furParticles.settings.roughness_endpoint = 0.005
-            furParticles.settings.roughness_end_shape = 5
-            furParticles.settings.roughness_2 = 0.003
-            furParticles.settings.roughness_2_size = 0.230
-        
-        return {'FINISHED'}
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.Scene.grass_type = EnumProperty(
-        name="Type",
-        description="Select the type of grass",
-        items=[("0","Green Grass","Generate particle grass"),
-               ("1","Grassy Field","Generate particle grass"),
-               ("2","Clumpy Grass","Generate particle grass"),
-        
-              ],
-        default='0')
-    bpy.types.Scene.hair_type = EnumProperty(
-        name="Type",
-        description="Select the type of hair",
-        items=[("0","Long Red Straight Hair","Generate particle Hair"),
-               ("1","Long Brown Curl Hair","Generate particle Hair"),
-               ("2","Short Dark Hair","Generate particle Hair"),
-        
-              ],
-        default='0')
-    bpy.types.Scene.fur_type = EnumProperty(
-        name="Type",
-        description="Select the type of fur",
-        items=[("0","Short Fur","Generate particle Fur"),
-               ("1","Dalmation","Generate particle Fur"),
-               ("2","Fur3","Generate particle Fur"),
-        
-              ],
-        default='0')
-        
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    del bpy.types.Scene.hair_type
-    
-if __name__ == "__main__":
-    register()
-    
-    
-
diff --git a/release/scripts/addons_contrib/presets/interface_theme/3ds_max.xml b/release/scripts/addons_contrib/presets/interface_theme/3ds_max.xml
deleted file mode 100644
index 9189ca4..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/3ds_max.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ffffff"
-                   editmesh_active="#fcf8ff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#e69632"
-                   edge_select="#ff3d3d"
-                   edge_sharp="#ff2020"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#a8a8a84d"
-                   extra_face_angle="#000080"
-                   extra_face_area="#002000"
-                   face_dot="#883737"
-                   facedot_size="2"
-                   normal="#22dddd"
-                   face_select="#ae606066"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#505050"
-                   lamp="#00000028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#104010"
-                   object_grouped_active="#55bb55"
-                   object_selected="#fa3f00"
-                   outline_width="1"
-                   panel="#a5a5a5ff"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#5454f0"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ae6060"
-                   vertex_size="3"
-                   wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#494949"
-                             button_text_hi="#ffffff"
-                             button_title="#494949"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#505050"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#b4b4b4"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#828282"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#d7ae6d"
-                        tiles="#b4b4b4">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#0f0f0f"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#b4b4b4"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#000000"
-                        handle_sel_auto_clamped="#000000"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#60c040"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#505050"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="3"
-                        lastsel_point="#ffffff"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#b4b4b4"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff0000"
-                        facedot_size="3"
-                        face_select="#7c00003c"
-                        scope_back="#b4b4b4ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#5454f0"
-                        vertex_select="#d00000"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#757575">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#60c040"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#757575">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#b4b4b4"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#deaf66"
-                       frame_node="#9a9b9ba0"
-                       group_node="#3c753c"
-                       in_out_node="#faa044"
-                       node_backdrop="#9b9b9ba0"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#9e733e"
-                       selected_text="#7f7070"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#82878c">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#fff1e1"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#b4b4b4">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#404040"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#949494">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#5f5f00"
-                       line_numbers_background="#404040"
-                       selected_text="#c67777"
-                       syntax_builtin="#800050"
-                       syntax_comment="#006432"
-                       syntax_numbers="#0000c8"
-                       syntax_string="#640000">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#d1d1d1">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#60c040"
-                     grid="#505050">
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#999999">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#d1d1d1ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#d8c555aa"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#b4b4b4ff"
-                             inner_sel="#2d2d2dff"
-                             item="#646464ff"
-                             outline="#424242"
-                             shadedown="30"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#8897a4ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#aeaeaeff"
-                             inner_sel="#464646ff"
-                             item="#6d8da6ff"
-                             outline="#464646"
-                             shadedown="-5"
-                             shadetop="15"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#cccccc">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#c4c4c4ff"
-                             inner_sel="#999999ff"
-                             item="#708faaff"
-                             outline="#708faa"
-                             shadedown="0"
-                             shadetop="-10"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#a2a2a2ff"
-                             inner_sel="#bbb8a3ff"
-                             item="#ffffffff"
-                             outline="#747474"
-                             shadedown="0"
-                             shadetop="10"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000019"
-                            show_header="TRUE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#bebebeff"
-                             inner_sel="#646464b4"
-                             item="#444444ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#3f3f3fff"
-                             inner_sel="#536a7e26"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#c3c3c3ff"
-                             inner_sel="#ddae64ff"
-                             item="#ffffffff"
-                             outline="#708faa"
-                             shadedown="0"
-                             shadetop="10"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#708faa26"
-                             inner_sel="#646464b4"
-                             item="#a9a9a9ff"
-                             outline="#708faa"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#b4b4b4ff"
-                             inner_sel="#999999ff"
-                             item="#c9c9c9ff"
-                             outline="#747474"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#73be4c"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#b400ff"
-                                  inner_driven_sel="#9900e6"
-                                  inner_key="#f0eb64"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#d1d1d1ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#535353"
-                             shadedown="25"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#d0d0d0ff"
-                             inner_sel="#64717dff"
-                             item="#191919ff"
-                             outline="#708faa"
-                             shadedown="0"
-                             shadetop="10"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#c4c4c4ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#708faa"
-                             shadedown="0"
-                             shadetop="-10"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#b4b4b4"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#b4b4b4"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#b4b4b4">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/default.xml b/release/scripts/addons_contrib/presets/interface_theme/default.xml
deleted file mode 100644
index 0eed4f7..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/default.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ffaa40"
-                   editmesh_active="#ffffff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#db2512"
-                   edge_select="#ffa000"
-                   edge_sharp="#00ffff"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#00000012"
-                   extra_face_angle="#000080"
-                   extra_face_area="#002000"
-                   face_dot="#ff8500"
-                   facedot_size="4"
-                   normal="#22dddd"
-                   face_select="#ff85003c"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#404040"
-                   lamp="#00000028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#f15800"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#000000"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ff8500"
-                   vertex_size="3"
-                   wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#393939">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#393939">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#5e5e5e"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#828282"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#ff8c19"
-                        tiles="#919191">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#fafafa"
-                             text_hi="#0f0f0f"
-                             title="#000000"
-                             back="#4c4c4c">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#60c040"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#5e5e5e"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="4"
-                        lastsel_point="#ffffff"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff8500"
-                        facedot_size="3"
-                        face_select="#ff85003c"
-                        scope_back="#727272ff"
-                        preview_stitch_active="#00000000"
-                        preview_stitch_edge="#ff00ff33"
-                        preview_stitch_face="#7f7f0033"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#0000ff33"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#353535">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#646464">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#60c040"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#686a75"
-                       frame_node="#9a9b9ba0"
-                       group_node="#69756e"
-                       in_out_node="#646464"
-                       node_backdrop="#9b9b9ba0"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#6c696f"
-                       selected_text="#7f7070"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#393939">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#82878c">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#828282">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#404040"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#747474">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#5f5f00"
-                       line_numbers_background="#404040"
-                       selected_text="#c67777"
-                       syntax_builtin="#800050"
-                       syntax_comment="#006432"
-                       syntax_numbers="#0000c8"
-                       syntax_string="#640000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#999999">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#60c040"
-                     grid="#5b5b5b">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#808080ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#5680c2ff"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#a0a0a0"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#5680c2ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="38"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#464646ff"
-                             inner_sel="#464646ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#cccccc">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#b4b4b4ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#464646ff"
-                             inner_sel="#464646ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000019"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#bebebeff"
-                             inner_sel="#646464b4"
-                             item="#444444ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#3f3f3fff"
-                             inner_sel="#5680c2ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#464646ff"
-                             inner_sel="#5680c2ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#505050b4"
-                             inner_sel="#646464b4"
-                             item="#808080ff"
-                             outline="#323232"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#b4b4b4ff"
-                             inner_sel="#999999ff"
-                             item="#808080ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#73be4c"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#b400ff"
-                                  inner_driven_sel="#9900e6"
-                                  inner_key="#f0eb64"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#191919"
-                             shadedown="25"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/maya.xml b/release/scripts/addons_contrib/presets/interface_theme/maya.xml
deleted file mode 100644
index 0a75700..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/maya.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#43ffa3"
-                   editmesh_active="#ffffff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#db2512"
-                   edge_select="#ffa000"
-                   edge_sharp="#ff2020"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#00000012"
-                   extra_face_angle="#000080"
-                   extra_face_area="#002000"
-                   face_dot="#ff8500"
-                   facedot_size="4"
-                   normal="#22dddd"
-                   face_select="#ff85003c"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#7f7f7f"
-                   lamp="#00000028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#f15800"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#cc1b23"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ff8500"
-                   vertex_size="3"
-                   wire="#64dcff">
-        <space>
-          <ThemeSpaceGeneric header="#444444"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#444444"
-                             button_text="#ffffff"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#576471">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#3a3a3a"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#444444"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#576471">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#5e5e5e"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#828282"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#ff8c19"
-                        tiles="#919191">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#fafafa"
-                             text_hi="#0f0f0f"
-                             title="#000000"
-                             back="#4c4c4c">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#60c040"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#5e5e5e"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="3"
-                        lastsel_point="#ffffff"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff8500"
-                        facedot_size="3"
-                        face_select="#ff85003c"
-                        scope_back="#727272ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#353535">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#444444"
-                             header_text="#dddddd"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#646464">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#60c040"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#686a75"
-                       frame_node="#9a9b9ba0"
-                       group_node="#69756e"
-                       in_out_node="#646464"
-                       node_backdrop="#9b9b9ba0"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#6c696f"
-                       selected_text="#7f7070"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#393939">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#356c1a"
-                     selected_highlight="#446e1c">
-        <space>
-          <ThemeSpaceGeneric header="#444444"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#dddddd"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#444444">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#828282">
-        <space>
-          <ThemeSpaceGeneric header="#444444"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#dddddd"
-                             text_hi="#ffffff"
-                             title="#dddddd"
-                             back="#444444">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#404040"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#747474">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#5f5f00"
-                       line_numbers_background="#404040"
-                       selected_text="#c67777"
-                       syntax_builtin="#800050"
-                       syntax_comment="#006432"
-                       syntax_numbers="#0000c8"
-                       syntax_string="#640000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#999999">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#60c040"
-                     grid="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#444444"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#737373">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#696969ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#5680c2ff"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#444444ff"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#a0a0a0"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#658aaeff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="38"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#777777ff"
-                             inner_sel="#464646ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#cccccc">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#222222ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#525252"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#2b2b2bff"
-                             inner_sel="#464646ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#888284"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000019"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#bebebeff"
-                             inner_sel="#646464b4"
-                             item="#444444ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#3f3f3fff"
-                             inner_sel="#656969ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#dddddd"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#292929ff"
-                             inner_sel="#678db2ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#505050b4"
-                             inner_sel="#646464b4"
-                             item="#808080ff"
-                             outline="#323232"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#535353ff"
-                             inner_sel="#999999ff"
-                             item="#808080ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#73be4c"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#b400ff"
-                                  inner_driven_sel="#9900e6"
-                                  inner_key="#f0eb64"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#131313ff"
-                             inner_sel="#333230ff"
-                             item="#678db2ff"
-                             outline="#191919"
-                             shadedown="25"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#dddddd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#2c2c2cff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#8f8f8f"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#444444">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/modo.xml b/release/scripts/addons_contrib/presets/interface_theme/modo.xml
deleted file mode 100644
index abc94b4..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/modo.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ff8c19"
-                   editmesh_active="#ffffff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#db2512"
-                   edge_select="#ffa000"
-                   edge_sharp="#ff2020"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#00000012"
-                   extra_face_angle="#002000"
-                   extra_face_area="#000080"
-                   face_dot="#ff8500"
-                   facedot_size="4"
-                   normal="#22dddd"
-                   face_select="#ff85003c"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#5b6672"
-                   lamp="#00000028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#f15800"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#000000"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ff8500"
-                   vertex_size="3"
-                   wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#484848"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#40464e">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#484848"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#40464e">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#5b6672"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#484848"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#828282"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#ff8c19"
-                        tiles="#484848">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#726f6d"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#fafafa"
-                             text_hi="#0f0f0f"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#484848"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#60c040"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#5b6672"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="3"
-                        lastsel_point="#000000"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#484848"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff8500"
-                        facedot_size="3"
-                        face_select="#ff85003c"
-                        scope_back="#727272ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#484848"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#888888"
-                             header_text_hi="#ffffff"
-                             button="#725864"
-                             button_text="#f0f0f0"
-                             button_text_hi="#ffffff"
-                             button_title="#f1c2d8"
-                             text="#888884"
-                             text_hi="#ffffff"
-                             title="#c8c6c9"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#60c040"
-                      grid="#5b6672"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#484848"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#686a75"
-                       frame_node="#9a9b9ba0"
-                       group_node="#69756e"
-                       in_out_node="#646464"
-                       node_backdrop="#9b9b9ba0"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#6c696f"
-                       selected_text="#7f7070"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#484848"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#82878c">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#fdfcff"
-                             button_title="#070707"
-                             text="#000000"
-                             text_hi="#f49c1c"
-                             title="#0e0e0e"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#827d7d">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#dff5ff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#3f3a2f"
-                             text="#000000"
-                             text_hi="#000000"
-                             title="#000000"
-                             back="#484848">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#5b6672"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#5f5f00"
-                       line_numbers_background="#404040"
-                       selected_text="#c67777"
-                       syntax_builtin="#800050"
-                       syntax_comment="#006432"
-                       syntax_numbers="#0000c8"
-                       syntax_string="#640000">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#60c040"
-                     grid="#5b6672">
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#9098a0">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#464646ff"
-                             inner_sel="#646464ff"
-                             item="#000000ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#f49c1cff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#606060e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#a0a0a0"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#f49c1cff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="38"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#606060ff"
-                             inner_sel="#f49c1cff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#9098a0ff"
-                             inner_sel="#f49c1cff"
-                             item="#5a5a5aff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#686868ff"
-                             inner_sel="#f49c1cff"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#ffffff79"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#bebebeff"
-                             inner_sel="#646464b4"
-                             item="#444444ff"
-                             outline="#000000"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#606060ff"
-                             inner_sel="#f49c1cff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#888888"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#464646ff"
-                             inner_sel="#f49c1cff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#979999ff"
-                             inner_sel="#646464ff"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#505050b4"
-                             inner_sel="#646464b4"
-                             item="#606060ff"
-                             outline="#323232"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#b4b4b4ff"
-                             inner_sel="#999999ff"
-                             item="#9098a0ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#73be4c"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#b400ff"
-                                  inner_driven_sel="#9900e6"
-                                  inner_key="#c9ce20"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#93a56f"
-                             shadedown="25"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#fdfdfd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#f49c1cff"
-                             item="#5a5a5aff"
-                             outline="#302e2e"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#606060ff"
-                             inner_sel="#f49c1cff"
-                             item="#000000ff"
-                             outline="#191919"
-                             shadedown="-15"
-                             shadetop="15"
-                             show_shaded="FALSE"
-                             text="#f1f1f1"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#202020"
-                             header_text="#000000"
-                             header_text_hi="#fdffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#484848">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/pinkified.xml b/release/scripts/addons_contrib/presets/interface_theme/pinkified.xml
deleted file mode 100644
index 7bedb38..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/pinkified.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ff0034"
-                   editmesh_active="#ff5edece"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#424242"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#a0a0a0"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#ff0000"
-                   edge_select="#b30025"
-                   edge_sharp="#7bff00"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#ffffff0c"
-                   extra_face_angle="#008200"
-                   extra_face_area="#0000ff"
-                   face_dot="#ac0023"
-                   facedot_size="4"
-                   normal="#27ffff"
-                   face_select="#e8142f2c"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#181818"
-                   lamp="#977f491e"
-                   lastsel_point="#f0ff40"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#127112"
-                   object_grouped_active="#55bb55"
-                   object_selected="#d1687d"
-                   outline_width="1"
-                   panel="#7575757f"
-                   skin_root="#000000"
-                   speaker="#a63904"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#9a001f"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ff0034"
-                   vertex_size="4"
-                   wire="#505050">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#757575"
-                             header_text_hi="#ffffff"
-                             button="#161616"
-                             button_text="#6a6a6a"
-                             button_text_hi="#ffffff"
-                             button_title="#cccccc"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#c7c7c7"
-                             back="#111111">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffe6ea"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="6"
-                       locked_marker="#7f7f7f"
-                       marker="#f68026"
-                       marker_outline="#3c3c3c"
-                       path_after="#007dff"
-                       path_before="#ff0b22"
-                       selected_marker="#ff2550"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#232323"
-                             header_text="#aaaaaa"
-                             header_text_hi="#ffffff"
-                             button="#0b0b0b"
-                             button_text="#888888"
-                             button_text_hi="#ffffff"
-                             button_title="#adadad"
-                             text="#888888"
-                             text_hi="#ffffff"
-                             title="#6b6b6b"
-                             back="#232323">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#00df62"
-                    line_info="#ffd600"
-                    line_input="#a4a4a4"
-                    line_output="#ff336e">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#343434"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#828282"
-                             text_hi="#ffffff"
-                             title="#828282"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#676767"
-                      channels_selected="#ff8099"
-                      frame_current="#99112c"
-                      dopesheet_channel="#39434d"
-                      dopesheet_subchannel="#15171a"
-                      grid="#0b0b0b"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff7500"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#898989">
-        <space>
-          <ThemeSpaceGeneric header="#2a2a2a"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#2a2a2a"
-                             button_text="#636363"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#828282"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#2a2a2a">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#2a2a2a"
-                                 list_text="#b3b3b3"
-                                 list_text_hi="#ffffff"
-                                 list_title="#ffffff">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#ff004b"
-                        active_file_text="#ffffff"
-                        scroll_handle="#373737"
-                        scrollbar="#242424"
-                        selected_file="#88172d"
-                        tiles="#161616">
-        <space>
-          <ThemeSpaceGeneric header="#161616"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#161616"
-                             button_text="#dddddd"
-                             button_text_hi="#ffffff"
-                             button_title="#eaeaea"
-                             text="#fafafa"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#161616">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#181818"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#9b9b9b">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#99112c"
-                        dopesheet_channel="#4c5966"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#1d1d1d"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff004b"
-                        handle_vertex_size="3"
-                        lastsel_point="#000000"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff004b"
-                        vertex_size="3"
-                        window_sliders="#3b3b3b">
-        <space>
-          <ThemeSpaceGeneric header="#232323"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#232323"
-                             button_text="#757575"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#828282"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#232323">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#232323"
-                                 list_text="#cccccc"
-                                 list_text_hi="#ffffff"
-                                 list_title="#8d7878">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff3d1d"
-                        facedot_size="3"
-                        face_select="#ff1d4a1a"
-                        scope_back="#0707075e"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#f73c00"
-                        vertex_select="#df0041"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#272727"
-                             header_text_hi="#ffffff"
-                             button="#070707"
-                             button_text="#bebebe"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#9c9c9c"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#1a1a1a">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#222222"
-                             header_text="#999999"
-                             header_text_hi="#cbcbcb"
-                             button="#161616"
-                             button_text="#0d0d0d"
-                             button_text_hi="#ffffff"
-                             button_title="#0d0d0d"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#090909">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#111111">
-        <space>
-          <ThemeSpaceGeneric header="#272727"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#111111"
-                             button_text="#ffffff"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#9d9d9d"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#272727">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#99112c"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#00465d"
-                       frame_node="#9a9b9ba0"
-                       group_node="#26960e"
-                       in_out_node="#d9003a"
-                       node_backdrop="#454545ae"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#d87200"
-                       selected_text="#ffdddd"
-                       wire_select="#ffe500"
-                       wire="#ff0000">
-        <space>
-          <ThemeSpaceGeneric header="#111111"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#0c0c0c"
-                             button_text="#bebebe"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#ffffff"
-                             text_hi="#565656"
-                             title="#ffffff"
-                             back="#111111">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#343434"
-                                 list_text_hi="#ffffff"
-                                 list_title="#ffffff">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#870027">
-        <space>
-          <ThemeSpaceGeneric header="#232323"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#585858"
-                             button_text="#8f8f8f"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#939393"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#232323">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#131313">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#757575"
-                             header_text_hi="#ffffff"
-                             button="#1e1e1e"
-                             button_text="#4e4e4e"
-                             button_text_hi="#ffffff"
-                             button_title="#414141"
-                             text="#999999"
-                             text_hi="#ffffff"
-                             title="#aeaeae"
-                             back="#1a1a1a">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#99112c"
-                           draw_action="#50c8ff"
-                           effect_strip="#e270a6"
-                           grid="#414141"
-                           image_strip="#675379"
-                           keyframe="#ff9f00"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#b33d59"
-                           window_sliders="#6d6d6d">
-        <space>
-          <ThemeSpaceGeneric header="#171717"
-                             header_text="#ffffff"
-                             header_text_hi="#ffffff"
-                             button="#171717"
-                             button_text="#979797"
-                             button_text_hi="#ffffff"
-                             button_title="#ffffff"
-                             text="#757575"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#171717">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ffffff"
-                       syntax_special="#ffff00"
-                       line_numbers_background="#0a0a0a"
-                       selected_text="#561423"
-                       syntax_builtin="#ff009a"
-                       syntax_comment="#00ff7a"
-                       syntax_numbers="#0088ff"
-                       syntax_string="#f20000">
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#f2f2f2"
-                             header_text_hi="#ffffff"
-                             button="#1a1a1a"
-                             button_text="#ffffff"
-                             button_text_hi="#ffffff"
-                             button_title="#d0d0d0"
-                             text="#a9a9a9"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#050505">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#ff1d4a"
-                     grid="#343434">
-        <space>
-          <ThemeSpaceGeneric header="#232323"
-                             header_text="#828282"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#0d0d0d"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#757575"
-                             text_hi="#ffffff"
-                             title="#757575"
-                             back="#232323">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#00000066"
-                             inner_sel="#ff1d4aff"
-                             item="#ffffffff"
-                             outline="#343434"
-                             shadedown="-5"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#999999"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#c69e9e00"
-                             inner_sel="#4d262eff"
-                             item="#ffffffff"
-                             outline="#4e4e4e"
-                             shadedown="0"
-                             shadetop="-12"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#0c0c0cd0"
-                             inner_sel="#414141ff"
-                             item="#232323ff"
-                             outline="#3f3e3e"
-                             shadedown="-20"
-                             shadetop="4"
-                             show_shaded="FALSE"
-                             text="#a0a0a0"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#0c0c0c4e"
-                             inner_sel="#ff1d4aff"
-                             item="#ffffffff"
-                             outline="#222222"
-                             shadedown="0"
-                             shadetop="8"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#2a2a2aff"
-                             inner_sel="#ff1d4aff"
-                             item="#000000ff"
-                             outline="#343434"
-                             shadedown="0"
-                             shadetop="12"
-                             show_shaded="TRUE"
-                             text="#dddddd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#0c0c0cff"
-                             inner_sel="#ff1d4aff"
-                             item="#5a5a5aff"
-                             outline="#343434"
-                             shadedown="-5"
-                             shadetop="9"
-                             show_shaded="TRUE"
-                             text="#757575"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#1b1b1bff"
-                             inner_sel="#000000ff"
-                             item="#ff002eff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="-14"
-                             show_shaded="TRUE"
-                             text="#808080"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000000"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#000000ff"
-                             inner_sel="#686868ff"
-                             item="#be0037ff"
-                             outline="#5d001a"
-                             shadedown="-88"
-                             shadetop="100"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ff1d4a">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#0c0c0cff"
-                             inner_sel="#ff1d4aff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#b6b6b6"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#0c0c0cff"
-                             inner_sel="#ff1d4aff"
-                             item="#ffffffff"
-                             outline="#343434"
-                             shadedown="2"
-                             shadetop="6"
-                             show_shaded="TRUE"
-                             text="#b1b1b1"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#0c0c0cff"
-                             inner_sel="#ff1d4aff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#00000080"
-                             inner_sel="#000000ff"
-                             item="#4d4d4d33"
-                             outline="#111111"
-                             shadedown="12"
-                             shadetop="12"
-                             show_shaded="TRUE"
-                             text="#bababa"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#33141bff"
-                             inner_sel="#ff1d4aff"
-                             item="#800f26ff"
-                             outline="#343434"
-                             shadedown="0"
-                             shadetop="-16"
-                             show_shaded="TRUE"
-                             text="#f7f7f7"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#194a00"
-                                  inner_anim_sel="#287700"
-                                  blend="1"
-                                  inner_driven="#b566ff"
-                                  inner_driven_sel="#ce99ff"
-                                  inner_key="#ffdf44"
-                                  inner_key_sel="#b39400">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#0d0d0dff"
-                             inner_sel="#ff1d4aff"
-                             item="#414141ff"
-                             outline="#1a1a1a"
-                             shadedown="3"
-                             shadetop="-59"
-                             show_shaded="TRUE"
-                             text="#686868"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#3e3e3eff"
-                             inner_sel="#ff1d4aff"
-                             item="#1a1a1aff"
-                             outline="#343434"
-                             shadedown="0"
-                             shadetop="27"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#4d4d4dff"
-                             inner_sel="#ff1d4aff"
-                             item="#ffffffff"
-                             outline="#676767"
-                             shadedown="-15"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#d8d8d8"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#1a1a1a"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#414141"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#686868"
-                             text_hi="#ffffff"
-                             title="#f2f2f2"
-                             back="#1a1a1a">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/softblend.xml b/release/scripts/addons_contrib/presets/interface_theme/softblend.xml
deleted file mode 100644
index e0fbc54..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/softblend.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ffffff"
-                   editmesh_active="#ffffff00"
-                   act_spline="#c36c8c"
-                   handle_align="#e277b1"
-                   handle_sel_align="#ffffff"
-                   handle_auto="#30b6e5"
-                   handle_sel_auto="#ffffff"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#53c03b"
-                   edge_crease="#eb3bdd"
-                   extra_edge_len="#200000"
-                   edge_seam="#f0703b"
-                   edge_select="#f3f3f3"
-                   edge_sharp="#49a1ec"
-                   edge_facesel="#272727"
-                   empty="#000000"
-                   face="#838383ff"
-                   extra_face_angle="#cccccc"
-                   extra_face_area="#cccccc"
-                   face_dot="#52f27e"
-                   facedot_size="3"
-                   normal="#9cfcc8"
-                   face_select="#949494ff"
-                   handle_free="#cccccc"
-                   handle_sel_free="#ffffff"
-                   grid="#6e6e6e"
-                   lamp="#ffe56666"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#a3a3a3"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#ffffff"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#63bd87"
-                   object_grouped_active="#ffffff"
-                   object_selected="#88fca7"
-                   outline_width="1"
-                   panel="#aaa8a6ff"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#afafaf"
-                   handle_sel_vect="#ffffff"
-                   vertex="#343434"
-                   vertex_normal="#68a1db"
-                   vertex_select="#ff2f7a"
-                   vertex_size="4"
-                   wire="#242424">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#313131"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#918f8d">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#a3ff96"
-                       disabled_marker="#b54636"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ff2f7a"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#71cd7f"
-                       marker_outline="#000000"
-                       path_after="#5a7575"
-                       path_before="#22d8d1"
-                       selected_marker="#ff2f7a"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#222222"
-                             text="#1a1a1a"
-                             text_hi="#ffffff"
-                             title="#1a1a1a"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#9cfcc8"
-                    line_error="#dc3a77"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#4d4d4d"
-                             button_text="#131313"
-                             button_text_hi="#ffffff"
-                             button_title="#131313"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#0c0c0c">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#95adc1"
-                      channel_group="#8a9dac"
-                      channels="#9baeb9"
-                      channels_selected="#91ccb3"
-                      frame_current="#a3ff96"
-                      dopesheet_channel="#9baeb9"
-                      dopesheet_subchannel="#aaa8a6"
-                      grid="#7f7f7f"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ecfc37"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#333333">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#111111"
-                             button_text_hi="#a3a3a3"
-                             button_title="#111111"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#aaa8a6"
-                                 list_text="#222222"
-                                 list_text_hi="#ffffff"
-                                 list_title="#cccccc">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#f1e593"
-                        active_file_text="#ffffff"
-                        scroll_handle="#8c8a88"
-                        scrollbar="#4d4b4d"
-                        selected_file="#f1e593"
-                        tiles="#aaa8a6">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#afafaf"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#cccccc"
-                             button_text_hi="#ffffff"
-                             button_title="#222222"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#aaa8a6"
-                                 list_text="#7f7f7f"
-                                 list_text_hi="#ffffff"
-                                 list_title="#3a3a3a">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#95adc1"
-                        handle_align="#1d1d1d"
-                        handle_sel_align="#f3f3f3"
-                        handle_auto="#696969"
-                        handle_sel_auto="#d4d4d4"
-                        handle_auto_clamped="#000000"
-                        handle_sel_auto_clamped="#000000"
-                        channel_group="#8a9dac"
-                        channels_region="#4d4d4d"
-                        frame_current="#a1ff8c"
-                        dopesheet_channel="#aaa8a6"
-                        dopesheet_subchannel="#aaa8a6"
-                        handle_free="#252525"
-                        handle_sel_free="#ececec"
-                        grid="#8f8f8f"
-                        handle_vertex="#525252"
-                        handle_vertex_select="#f1f1f1"
-                        handle_vertex_size="6"
-                        lastsel_point="#000000"
-                        panel="#989898"
-                        handle_vect="#191919"
-                        handle_sel_vect="#ffffff"
-                        vertex="#575757"
-                        vertex_select="#ffffff"
-                        vertex_size="3"
-                        window_sliders="#4d4d4d">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#333333"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#aaa8a6"
-                                 list_text="#222222"
-                                 list_text_hi="#ffffff"
-                                 list_title="#676767">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#00000032"
-                        face_dot="#ffffff"
-                        facedot_size="2"
-                        face_select="#ffffff3c"
-                        scope_back="#aaa8a6ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#000000"
-                        vertex_select="#ffffff"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#383838"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#2d2d2d">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#aaa8a6">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#111111"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#202020"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#a3ff96"
-                      grid="#a39f9c"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#000000"
-                      strips_selected="#60c040"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#4d4d4d">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#a3a3a3"
-                             header_text_hi="#cccccc"
-                             button="#aaa8a6"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#333333"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#aaa8a6"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#fffa90"
-                       frame_node="#9a9b9ba0"
-                       group_node="#ffc173"
-                       in_out_node="#b1d9ff"
-                       node_backdrop="#d4d4d4ff"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#beffcb"
-                       selected_text="#ffffff"
-                       wire_select="#ffffff"
-                       wire="#222222">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#333333"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#c5c5c5"
-                             button_title="#222222"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#a3a3a3"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#4d4d4d"
-                                 list_text="#676767"
-                                 list_text_hi="#ffffff"
-                                 list_title="#383838">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#870027">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#0f0f0f"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#ffffff"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#aaa8a6">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#222222"
-                             header_text_hi="#000000"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#ffffff"
-                             button_title="#222222"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#222222"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#e0d2a0"
-                           movieclip_strip="#20208f"
-                           frame_current="#a3ff96"
-                           draw_action="#50c8ff"
-                           effect_strip="#be8c76"
-                           grid="#afafaf"
-                           image_strip="#c99ac0"
-                           keyframe="#ffeb89"
-                           meta_strip="#91918d"
-                           movie_strip="#87a4c3"
-                           preview_back="#000000"
-                           scene_strip="#91b1a0"
-                           transition_strip="#d9777a"
-                           window_sliders="#777777">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#a3a3a3"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#111111"
-                             button_text_hi="#ffffff"
-                             button_title="#111111"
-                             text="#333333"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#54da70"
-                       syntax_special="#ca0c97"
-                       line_numbers_background="#a3a3a3"
-                       selected_text="#f1e593"
-                       syntax_builtin="#3162b2"
-                       syntax_comment="#535353"
-                       syntax_numbers="#b62440"
-                       syntax_string="#c31736">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#333333"
-                             button_text_hi="#ffffff"
-                             button_title="#222222"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#a3ff96"
-                     grid="#838383">
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#a3a3a3"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#222222"
-                             button_text_hi="#a3a3a3"
-                             button_title="#aeacaa"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#cccccc"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#aaa8a6ff"
-                             item="#ccccccff"
-                             outline="#9f9d9b"
-                             shadedown="6"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#474747"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#f1e59333"
-                             inner_sel="#fff29c9a"
-                             item="#ffffffff"
-                             outline="#8c8a88"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#aaa8a6ff"
-                             item="#ccccccff"
-                             outline="#474747"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#aaa8a6ff"
-                             item="#000000ff"
-                             outline="#474747"
-                             shadedown="10"
-                             shadetop="-10"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#b0aeacff"
-                             item="#8e8c8bff"
-                             outline="#aaa8a6"
-                             shadedown="3"
-                             shadetop="-4"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#353432ff"
-                             inner_sel="#353432ff"
-                             item="#222222ff"
-                             outline="#050505"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="FALSE"
-                             text="#efefef"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#a5a3a1ff"
-                             inner_sel="#ccc9c7ff"
-                             item="#000000ff"
-                             outline="#acaaa8"
-                             shadedown="0"
-                             shadetop="-2"
-                             show_shaded="TRUE"
-                             text="#676767"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000004"
-                            show_header="TRUE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#aaa8a6ff"
-                             item="#96c78eff"
-                             outline="#474747"
-                             shadedown="-3"
-                             shadetop="3"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#aaa8a6ff"
-                             item="#ccccccff"
-                             outline="#474747"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#a8a6a4ff"
-                             inner_sel="#95adc1ff"
-                             item="#aaa8a6ff"
-                             outline="#aaa8a6"
-                             shadedown="1"
-                             shadetop="-2"
-                             show_shaded="TRUE"
-                             text="#1a1a1a"
-                             text_sel="#1a1a1a">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#7b7978ff"
-                             inner_sel="#95adc1ff"
-                             item="#979594ff"
-                             outline="#5f5e5c"
-                             shadedown="0"
-                             shadetop="-2"
-                             show_shaded="TRUE"
-                             text="#1a1a1a"
-                             text_sel="#1a1a1a">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#a4a2a0ff"
-                             inner_sel="#aaa8a6ff"
-                             item="#a2a19fff"
-                             outline="#82807f"
-                             shadedown="-5"
-                             shadetop="4"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#353432ff"
-                             inner_sel="#353432ff"
-                             item="#1f1f1fff"
-                             outline="#050505"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#adb4c7"
-                                  inner_anim_sel="#c4cee0"
-                                  blend="1"
-                                  inner_driven="#c69cb1"
-                                  inner_driven_sel="#ecaacd"
-                                  inner_key="#c0bb83"
-                                  inner_key_sel="#dad37d">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#a6a4a2ff"
-                             inner_sel="#f1e593ff"
-                             item="#c2b876ff"
-                             outline="#aaa8a6"
-                             shadedown="0"
-                             shadetop="-2"
-                             show_shaded="TRUE"
-                             text="#242424"
-                             text_sel="#242424">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#a8a6a4ff"
-                             inner_sel="#95adc1ff"
-                             item="#aaa8a6ff"
-                             outline="#aaa8a6"
-                             shadedown="0"
-                             shadetop="-3"
-                             show_shaded="TRUE"
-                             text="#1c1c1c"
-                             text_sel="#1a1a1a">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#aaa8a6ff"
-                             inner_sel="#a19f9dff"
-                             item="#a19f9dff"
-                             outline="#a6a4a2"
-                             shadedown="-6"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#aaa8a6"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaa8a6"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#222222"
-                             text_hi="#ffffff"
-                             title="#222222"
-                             back="#aaa8a6">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/softdefault.xml b/release/scripts/addons_contrib/presets/interface_theme/softdefault.xml
deleted file mode 100644
index f40d9d8..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/softdefault.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#ffffff"
-                   editmesh_active="#ffffff72"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc57b4"
-                   extra_edge_len="#200000"
-                   edge_seam="#db5c3d"
-                   edge_select="#e3e3e3"
-                   edge_sharp="#3a9fff"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#00000058"
-                   extra_face_angle="#002000"
-                   extra_face_area="#000080"
-                   face_dot="#9bff61"
-                   facedot_size="3"
-                   normal="#22dddd"
-                   face_select="#0000003c"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#555555"
-                   lamp="#e3d45966"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#ffffff"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#5c6db2"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#000000"
-                   vertex_normal="#2361dd"
-                   vertex_select="#ff6424"
-                   vertex_size="3"
-                   wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#404040">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#393939">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#8bdc66"
-                    line_error="#dc6060"
-                    line_info="#e4e585"
-                    line_input="#ffffff"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#5e5e5e"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#727272"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7979"
-                        scrollbar="#a0a0a0"
-                        selected_file="#1e1e1e"
-                        tiles="#727272">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#fafafa"
-                             text_hi="#0f0f0f"
-                             title="#000000"
-                             back="#4c4c4c">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#ffffff"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#8686b0"
-                        channels_region="#707070"
-                        frame_current="#7ec068"
-                        dopesheet_channel="#76879c"
-                        dopesheet_subchannel="#8699b0"
-                        handle_free="#ffffff"
-                        handle_sel_free="#000000"
-                        grid="#5e5e5e"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ffffff"
-                        handle_vertex_size="8"
-                        lastsel_point="#000000"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#6ee854"
-                        vertex="#000000"
-                        vertex_select="#ffffff"
-                        vertex_size="5"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff8500"
-                        facedot_size="3"
-                        face_select="#ff85003c"
-                        scope_back="#727272ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#353535">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#646464">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#7ec068"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#6b6b6b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#b5b1ea"
-                       frame_node="#9a9b9ba0"
-                       group_node="#d5ffa2"
-                       in_out_node="#b0cae0"
-                       node_backdrop="#858585ff"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#ffa46c"
-                       selected_text="#ffffff"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#337f33"
-                     selected_highlight="#82878c">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#828282">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#404040"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#747474">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#afff80"
-                       syntax_special="#92da66"
-                       line_numbers_background="#7c7c7c"
-                       selected_text="#bdbd8d"
-                       syntax_builtin="#ff5353"
-                       syntax_comment="#ffffff"
-                       syntax_numbers="#7dc8c8"
-                       syntax_string="#f7f185">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#7ec068"
-                     grid="#565656">
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#6c6c6cff"
-                             inner_sel="#6c6c6cff"
-                             item="#4a4a4aff"
-                             outline="#646464"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#6b8cafff"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#505050"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ececec">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#727272ff"
-                             item="#ffffffff"
-                             outline="#727272"
-                             shadedown="5"
-                             shadetop="-8"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#6c6c6cff"
-                             item="#464646ff"
-                             outline="#606060"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#f5f5f5">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#595959ff"
-                             inner_sel="#444444ff"
-                             item="#3b3b3bff"
-                             outline="#606060"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#838383ff"
-                             item="#000000ff"
-                             outline="#646464"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000008"
-                            show_header="TRUE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#758b69ff"
-                             inner_sel="#93af84ff"
-                             item="#93af84ff"
-                             outline="#727272"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#3f3f3fff"
-                             inner_sel="#727272ff"
-                             item="#000000ff"
-                             outline="#606060"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#6c6c6cff"
-                             inner_sel="#6b8cafff"
-                             item="#ffffffff"
-                             outline="#646464"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#646464ff"
-                             item="#626262ff"
-                             outline="#6a6a6a"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#595959ff"
-                             inner_sel="#595959ff"
-                             item="#494949ff"
-                             outline="#606060"
-                             shadedown="0"
-                             shadetop="-20"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#98cc7e"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#cf5bff"
-                                  inner_driven_sel="#ac45d7"
-                                  inner_key="#f0ec75"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#dbcc6fff"
-                             item="#91874aff"
-                             outline="#646464"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#6b8cafff"
-                             item="#000000ff"
-                             outline="#646464"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#727272ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#646464"
-                             shadedown="5"
-                             shadetop="-5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#727272"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/toxic.xml b/release/scripts/addons_contrib/presets/interface_theme/toxic.xml
deleted file mode 100644
index 9e4902d..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/toxic.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#97ff22"
-                   editmesh_active="#ffffff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#5a5a5a"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#ffedf8"
-                   edge_seam="#db2512"
-                   edge_select="#3cbc2c"
-                   edge_sharp="#ff2020"
-                   edge_facesel="#6b6b6b"
-                   empty="#000000"
-                   face="#73828f12"
-                   extra_face_angle="#00c900"
-                   extra_face_area="#fff000"
-                   face_dot="#95fd20"
-                   facedot_size="4"
-                   normal="#22dddd"
-                   face_select="#3aba2a3c"
-                   handle_free="#7f7f7f"
-                   handle_sel_free="#3b3b3b"
-                   grid="#3f3f3f"
-                   lamp="#c1d40028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#3ebe2e"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#535353"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#72cfdd"
-                   vertex_normal="#2361dd"
-                   vertex_select="#3cbc2c"
-                   vertex_size="3"
-                   wire="#888888">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#0f0f0f">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#1b501b"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#e2e2e2"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#0094af"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#070707"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#0d0d0d">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#cecece"
-                    line_output="#6080ff">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#0f0f0f">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#2a5c1c"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#212121"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#080808">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#020202"
-                                 list_text="#ebebeb"
-                                 list_text_hi="#ffffff"
-                                 list_title="#2c2c2c">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#b1b1b1"
-                        active_file_text="#ffffff"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#2f6629"
-                        tiles="#343434">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#181818"
-                                 list_text="#5d5d5d"
-                                 list_text_hi="#ffffff"
-                                 list_title="#9e9e9e">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#6d6d6d"
-                        frame_current="#336622"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#808080"
-                        handle_sel_free="#808080"
-                        grid="#262626"
-                        handle_vertex="#808080"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="3"
-                        lastsel_point="#808080"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#ffffff"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#0d0d0d">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#1a1a1a"
-                                 list_text="#bbbbbb"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#ffffff0a"
-                        face_dot="#ff8500"
-                        facedot_size="3"
-                        face_select="#ff85003c"
-                        scope_back="#050505ff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#0f13bb"
-                        vertex_select="#ff8500"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#adadad"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#9b9b9b"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#a5a5a5">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#070707">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#2f6421"
-                      grid="#5e5e5e"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#aa8d8d"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c3c3c3"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#585858"
-                             back="#0d0d0d">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#0c0c0c"
-                                 list_text="#d8d8d8"
-                                 list_text_hi="#ffffff"
-                                 list_title="#383838">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#113941"
-                       frame_node="#9a9b9ba0"
-                       group_node="#091a07"
-                       in_out_node="#273053"
-                       node_backdrop="#202030bc"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#0e3157"
-                       selected_text="#7f7070"
-                       wire_select="#0019ff"
-                       wire="#6eafff">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#c7c7c7"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#ffffff"
-                                 list_text_hi="#b8ffff"
-                                 list_title="#ffffff">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#356c1a"
-                     selected_highlight="#446e1c">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#cccccc"
-                             text_hi="#ffffff"
-                             title="#9b9b9b"
-                             back="#070707">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#6f4c82">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#0e0e0e"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#2f5f23"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#282828"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#f3f3f3"
-                             header_text_hi="#ffffff"
-                             button="#020202"
-                             button_text="#dddddd"
-                             button_text_hi="#ffffff"
-                             button_title="#bdbdbd"
-                             text="#ffffff"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#202020">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#969629"
-                       line_numbers_background="#191919"
-                       selected_text="#ffffff"
-                       syntax_builtin="#cf3d99"
-                       syntax_comment="#249d60"
-                       syntax_numbers="#3c68ff"
-                       syntax_string="#cc3535">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#b9b9b9"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#cccccc"
-                             button_text_hi="#ffffff"
-                             button_title="#d8d8d8"
-                             text="#ebebeb"
-                             text_hi="#ffffff"
-                             title="#9e9e9e"
-                             back="#050505">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#3fff00"
-                     grid="#707070">
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#161616"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#c7c7c7"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#162c0c">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#72a400ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#649600ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#fdfdfd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#6c9e00ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#6a9c00ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#fdfdfd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#70a200ff"
-                             item="#2a2a2aff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#76a800ff"
-                             item="#2a2a2aff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#929292"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#7aac00ff"
-                             item="#ffffffff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#c7c7c7"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#000000ff"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#669800ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#fdfdfd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#6ea000ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#7eb000ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#0a0a0aff"
-                             inner_sel="#84b600ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#171717ff"
-                             inner_sel="#689a00ff"
-                             item="#689a00ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#fdfdfd"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#111111ff"
-                             item="#74a600ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#56ff00"
-                                  inner_anim_sel="#56ff00"
-                                  blend="0.1"
-                                  inner_driven="#629400"
-                                  inner_driven_sel="#609200"
-                                  inner_key="#fff400"
-                                  inner_key_sel="#fff400">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#7cae00ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#e4e4e4"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#111111ff"
-                             inner_sel="#78aa00ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#79b224ff"
-                             inner_sel="#80b200ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="0"
-                             shadetop="-100"
-                             show_shaded="TRUE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#000000"
-                             header_text="#979797"
-                             header_text_hi="#ffffff"
-                             button="#000000"
-                             button_text="#c3c3c3"
-                             button_text_hi="#ffffff"
-                             button_title="#c5c5c5"
-                             text="#7d7d7d"
-                             text_hi="#ffffff"
-                             title="#5d5d5d"
-                             back="#000000">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/interface_theme/zbrush.xml b/release/scripts/addons_contrib/presets/interface_theme/zbrush.xml
deleted file mode 100644
index d2227a5..0000000
--- a/release/scripts/addons_contrib/presets/interface_theme/zbrush.xml
+++ /dev/null
@@ -1,850 +0,0 @@
-<bpy>
-  <Theme>
-    <view_3d>
-      <ThemeView3D object_active="#c28d45"
-                   editmesh_active="#ffffff80"
-                   act_spline="#db2512"
-                   handle_align="#803060"
-                   handle_sel_align="#f090a0"
-                   handle_auto="#909000"
-                   handle_sel_auto="#f0ff40"
-                   bone_pose="#50c8ff"
-                   bone_pose_active="#8cffff"
-                   bone_solid="#c8c8c8"
-                   bundle_solid="#c8c8c8"
-                   camera="#000000"
-                   camera_path="#000000"
-                   frame_current="#60c040"
-                   edge_crease="#cc0099"
-                   extra_edge_len="#200000"
-                   edge_seam="#db2512"
-                   edge_select="#c28d45"
-                   edge_sharp="#00ffff"
-                   edge_facesel="#4b4b4b"
-                   empty="#000000"
-                   face="#00000054"
-                   extra_face_angle="#000080"
-                   extra_face_area="#002000"
-                   face_dot="#c28d45"
-                   facedot_size="2"
-                   normal="#22dddd"
-                   face_select="#81602e73"
-                   handle_free="#000000"
-                   handle_sel_free="#000000"
-                   grid="#353535"
-                   lamp="#00000028"
-                   lastsel_point="#ffffff"
-                   nurb_uline="#909000"
-                   nurb_vline="#803060"
-                   nurb_sel_uline="#f0ff40"
-                   nurb_sel_vline="#f090a0"
-                   object_grouped="#083008"
-                   object_grouped_active="#55bb55"
-                   object_selected="#f1f1f1"
-                   outline_width="1"
-                   panel="#a5a5a57f"
-                   skin_root="#000000"
-                   speaker="#000000"
-                   transform="#ffffff"
-                   handle_vect="#409030"
-                   handle_sel_vect="#40c030"
-                   vertex="#a8a8a8"
-                   vertex_normal="#2361dd"
-                   vertex_select="#c28d45"
-                   vertex_size="3"
-                   wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#b9b9b9"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#878787"
-                             button_text_hi="#ffffff"
-                             button_title="#949494"
-                             text="#b8b8b8"
-                             text_hi="#e9e9e9"
-                             title="#000000"
-                             back="#2c2e30">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeView3D>
-    </view_3d>
-    <clip_editor>
-      <ThemeClipEditor active_marker="#ffffff"
-                       frame_current="#60c040"
-                       disabled_marker="#7f0000"
-                       grid="#5e5e5e"
-                       handle_vertex="#000000"
-                       handle_vertex_select="#ffff00"
-                       handle_vertex_size="4"
-                       locked_marker="#7f7f7f"
-                       marker="#7f7f00"
-                       marker_outline="#000000"
-                       path_after="#0000ff"
-                       path_before="#ff0000"
-                       selected_marker="#ffff00"
-                       strips="#0c0a0a"
-                       strips_selected="#ff8c00">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#2c2e30">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#666666"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeClipEditor>
-    </clip_editor>
-    <console>
-      <ThemeConsole cursor="#dc6060"
-                    line_error="#dc6060"
-                    line_info="#00aa00"
-                    line_input="#ffffff"
-                    line_output="#b8b8b8">
-        <space>
-          <ThemeSpaceGeneric header="#303030"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#202020">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeConsole>
-    </console>
-    <dopesheet_editor>
-      <ThemeDopeSheet active_channels_group="#87b17d"
-                      channel_group="#4f6549"
-                      channels="#707070"
-                      channels_selected="#60c040"
-                      frame_current="#60c040"
-                      dopesheet_channel="#52606e"
-                      dopesheet_subchannel="#7c8996"
-                      grid="#4b4b4b"
-                      long_key="#0c0a0a"
-                      long_key_selected="#ff8c00"
-                      summary="#00000000"
-                      value_sliders="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#aaaaaa"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#848484"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#3b3b3b"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeDopeSheet>
-    </dopesheet_editor>
-    <file_browser>
-      <ThemeFileBrowser active_file="#828282"
-                        active_file_text="#fafafa"
-                        scroll_handle="#7f7070"
-                        scrollbar="#a0a0a0"
-                        selected_file="#755729"
-                        tiles="#3b3b3b">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#8b8b8b"
-                             header_text_hi="#ffffff"
-                             button="#303030"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#cacaca"
-                             text_hi="#0f0f0f"
-                             title="#8b8b8b"
-                             back="#3a3a3a">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#3b3b3b"
-                                 list_text="#8b8b8b"
-                                 list_text_hi="#ffffff"
-                                 list_title="#8b8b8b">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeFileBrowser>
-    </file_browser>
-    <graph_editor>
-      <ThemeGraphEditor active_channels_group="#87b17d"
-                        handle_align="#803060"
-                        handle_sel_align="#f090a0"
-                        handle_auto="#909000"
-                        handle_sel_auto="#f0ff40"
-                        handle_auto_clamped="#994030"
-                        handle_sel_auto_clamped="#f0af90"
-                        channel_group="#4f6549"
-                        channels_region="#707070"
-                        frame_current="#60c040"
-                        dopesheet_channel="#52606e"
-                        dopesheet_subchannel="#7c8996"
-                        handle_free="#000000"
-                        handle_sel_free="#000000"
-                        grid="#4b4b4b"
-                        handle_vertex="#000000"
-                        handle_vertex_select="#ff8500"
-                        handle_vertex_size="4"
-                        lastsel_point="#ffffff"
-                        panel="#ffffff"
-                        handle_vect="#409030"
-                        handle_sel_vect="#40c030"
-                        vertex="#000000"
-                        vertex_select="#ff8500"
-                        vertex_size="3"
-                        window_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#8b8b8b"
-                             button_text_hi="#ffffff"
-                             button_title="#8b8b8b"
-                             text="#848484"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#3b3b3b"
-                                 list_text="#8b8b8b"
-                                 list_text_hi="#ffffff"
-                                 list_title="#8b8b8b">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeGraphEditor>
-    </graph_editor>
-    <image_editor>
-      <ThemeImageEditor editmesh_active="#ffffff80"
-                        face="#7c7c7c0a"
-                        face_dot="#c28d45"
-                        facedot_size="3"
-                        face_select="#c28d453c"
-                        scope_back="#3b3b3bff"
-                        preview_stitch_active="#e1d2c323"
-                        preview_stitch_edge="#ff8500b2"
-                        preview_stitch_face="#1242b026"
-                        preview_stitch_stitchable="#00ff00ff"
-                        preview_stitch_unstitchable="#ff0000ff"
-                        preview_stitch_vert="#ff85007f"
-                        vertex="#a8a8a8"
-                        vertex_select="#c28d45"
-                        vertex_size="3">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#8b8b8b"
-                             button_text_hi="#ffffff"
-                             button_title="#8b8b8b"
-                             text="#8b8b8b"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#303030">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeImageEditor>
-    </image_editor>
-    <info>
-      <ThemeInfo>
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#8b8b8b"
-                             header_text_hi="#000000"
-                             button="#3b3b3b"
-                             button_text="#000000"
-                             button_text_hi="#000000"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#000000"
-                             title="#000000"
-                             back="#727272">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeInfo>
-    </info>
-    <logic_editor>
-      <ThemeLogicEditor panel="#3b3b3b">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#8b8b8b"
-                             button_text_hi="#ffffff"
-                             button_title="#8b8b8b"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeLogicEditor>
-    </logic_editor>
-    <nla_editor>
-      <ThemeNLAEditor active_action="#00000000"
-                      frame_current="#60c040"
-                      grid="#585858"
-                      meta_strips="#000000"
-                      meta_strips_selected="#000000"
-                      active_action_unset="#00000000"
-                      sound_strips="#000000"
-                      sound_strips_selected="#000000"
-                      strips="#0c0a0a"
-                      strips_selected="#ff8c00"
-                      transition_strips="#000000"
-                      transition_strips_selected="#000000"
-                      tweak="#000000"
-                      tweak_duplicate="#000000"
-                      view_sliders="#969696">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#000000"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#4b4b4b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#3b3b3b"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNLAEditor>
-    </nla_editor>
-    <node_editor>
-      <ThemeNodeEditor node_active="#ffffff"
-                       converter_node="#686a75"
-                       frame_node="#9a9b9ba0"
-                       group_node="#69756e"
-                       in_out_node="#646464"
-                       node_backdrop="#9b9b9ba0"
-                       node_selected="#ffffff"
-                       noodle_curving="5"
-                       operator_node="#6c696f"
-                       selected_text="#7f7070"
-                       wire_select="#ffffff"
-                       wire="#000000">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#8b8b8b"
-                             button_text_hi="#ffffff"
-                             button_title="#8b8b8b"
-                             text="#8b8b8b"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-        <space_list>
-          <ThemeSpaceListGeneric list="#a5a5a5"
-                                 list_text="#000000"
-                                 list_text_hi="#ffffff"
-                                 list_title="#000000">
-          </ThemeSpaceListGeneric>
-        </space_list>
-      </ThemeNodeEditor>
-    </node_editor>
-    <outliner>
-      <ThemeOutliner match="#245824"
-                     selected_highlight="#212844">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#cacaca"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#3a3a3a">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeOutliner>
-    </outliner>
-    <properties>
-      <ThemeProperties panel="#828282">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#b8b8b8"
-                             button_text_hi="#ffffff"
-                             button_title="#b8b8b8"
-                             text="#b8b8b8"
-                             text_hi="#ffffff"
-                             title="#6d6d6d"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeProperties>
-    </properties>
-    <sequence_editor>
-      <ThemeSequenceEditor audio_strip="#2e8f8f"
-                           movieclip_strip="#20208f"
-                           frame_current="#60c040"
-                           draw_action="#50c8ff"
-                           effect_strip="#a9547c"
-                           grid="#818181"
-                           image_strip="#6d5881"
-                           keyframe="#ff8500"
-                           meta_strip="#6d9183"
-                           movie_strip="#516987"
-                           preview_back="#000000"
-                           scene_strip="#4e983e"
-                           transition_strip="#a25f6f"
-                           window_sliders="#a0a0a0">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#848484"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeSequenceEditor>
-    </sequence_editor>
-    <text_editor>
-      <ThemeTextEditor cursor="#ff0000"
-                       syntax_special="#5f5f00"
-                       line_numbers_background="#404040"
-                       selected_text="#c67777"
-                       syntax_builtin="#800050"
-                       syntax_comment="#006432"
-                       syntax_numbers="#0000c8"
-                       syntax_string="#640000">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#3b3b3b"
-                             button_text="#8b8b8b"
-                             button_text_hi="#ffffff"
-                             button_title="#8b8b8b"
-                             text="#b8b8b8"
-                             text_hi="#ffffff"
-                             title="#8b8b8b"
-                             back="#4b4b4b">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTextEditor>
-    </text_editor>
-    <timeline>
-      <ThemeTimeline frame_current="#60c040"
-                     grid="#464646">
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#848484"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#303030">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeTimeline>
-    </timeline>
-    <user_interface>
-      <ThemeUserInterface icon_alpha="1"
-                          icon_file="">
-        <wcol_box>
-          <ThemeWidgetColors inner="#3e3e3eff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#2a2a2a"
-                             shadedown="-7"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_box>
-        <wcol_list_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#75582aae"
-                             item="#000000ff"
-                             outline="#000000"
-                             shadedown="-10"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#e0e0e0"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_list_item>
-        <wcol_menu_back>
-          <ThemeWidgetColors inner="#3b3b3bff"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#b8b8b8"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_menu_back>
-        <wcol_menu_item>
-          <ThemeWidgetColors inner="#00000000"
-                             inner_sel="#c28d45ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="20"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_menu_item>
-        <wcol_menu>
-          <ThemeWidgetColors inner="#2f2f2fff"
-                             inner_sel="#464646ff"
-                             item="#777777ff"
-                             outline="#151515"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#cccccc">
-          </ThemeWidgetColors>
-        </wcol_menu>
-        <wcol_num>
-          <ThemeWidgetColors inner="#333333ff"
-                             inner_sel="#999999ff"
-                             item="#727272ff"
-                             outline="#1f1f1f"
-                             shadedown="0"
-                             shadetop="10"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_num>
-        <wcol_option>
-          <ThemeWidgetColors inner="#3b3b3bff"
-                             inner_sel="#c28d45ff"
-                             item="#ffffffff"
-                             outline="#1f1f1f"
-                             shadedown="0"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_option>
-        <panel>
-          <ThemePanelColors header="#00000019"
-                            show_header="FALSE">
-          </ThemePanelColors>
-        </panel>
-        <wcol_progress>
-          <ThemeWidgetColors inner="#bebebeff"
-                             inner_sel="#646464b4"
-                             item="#444444ff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_progress>
-        <wcol_pulldown>
-          <ThemeWidgetColors inner="#3f3f3fff"
-                             inner_sel="#c28d45ff"
-                             item="#ffffffff"
-                             outline="#000000"
-                             shadedown="0"
-                             shadetop="25"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_pulldown>
-        <wcol_radio>
-          <ThemeWidgetColors inner="#333333ff"
-                             inner_sel="#c28d45ff"
-                             item="#ffffffff"
-                             outline="#1f1f1f"
-                             shadedown="-5"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_radio>
-        <wcol_regular>
-          <ThemeWidgetColors inner="#999999ff"
-                             inner_sel="#646464ff"
-                             item="#191919ff"
-                             outline="#191919"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="FALSE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_regular>
-        <wcol_scroll>
-          <ThemeWidgetColors inner="#07070719"
-                             inner_sel="#646464b4"
-                             item="#2e2e2eff"
-                             outline="#1c1c1c"
-                             shadedown="0"
-                             shadetop="0"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_scroll>
-        <wcol_numslider>
-          <ThemeWidgetColors inner="#606068ff"
-                             inner_sel="#91919dff"
-                             item="#3a3a3aff"
-                             outline="#303030"
-                             shadedown="10"
-                             shadetop="-10"
-                             show_shaded="TRUE"
-                             text="#dfdfdf"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_numslider>
-        <wcol_state>
-          <ThemeWidgetStateColors inner_anim="#73be4c"
-                                  inner_anim_sel="#5aa633"
-                                  blend="0.5"
-                                  inner_driven="#b400ff"
-                                  inner_driven_sel="#9900e6"
-                                  inner_key="#f0eb64"
-                                  inner_key_sel="#d7d34b">
-          </ThemeWidgetStateColors>
-        </wcol_state>
-        <wcol_text>
-          <ThemeWidgetColors inner="#7a8287ff"
-                             inner_sel="#999999ff"
-                             item="#5a5a5aff"
-                             outline="#303030"
-                             shadedown="0"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#000000"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_text>
-        <wcol_toggle>
-          <ThemeWidgetColors inner="#333333ff"
-                             inner_sel="#c28d45ff"
-                             item="#191919ff"
-                             outline="#1f1f1f"
-                             shadedown="0"
-                             shadetop="5"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_toggle>
-        <wcol_tool>
-          <ThemeWidgetColors inner="#333333ff"
-                             inner_sel="#c28d45ff"
-                             item="#191919ff"
-                             outline="#1f1f1f"
-                             shadedown="0"
-                             shadetop="10"
-                             show_shaded="TRUE"
-                             text="#b8b8b8"
-                             text_sel="#000000">
-          </ThemeWidgetColors>
-        </wcol_tool>
-        <wcol_tooltip>
-          <ThemeWidgetColors inner="#191919e6"
-                             inner_sel="#2d2d2de6"
-                             item="#646464ff"
-                             outline="#000000"
-                             shadedown="-20"
-                             shadetop="25"
-                             show_shaded="FALSE"
-                             text="#ffffff"
-                             text_sel="#ffffff">
-          </ThemeWidgetColors>
-        </wcol_tooltip>
-      </ThemeUserInterface>
-    </user_interface>
-    <user_preferences>
-      <ThemeUserPreferences>
-        <space>
-          <ThemeSpaceGeneric header="#3b3b3b"
-                             header_text="#000000"
-                             header_text_hi="#ffffff"
-                             button="#727272"
-                             button_text="#000000"
-                             button_text_hi="#ffffff"
-                             button_title="#000000"
-                             text="#b8b8b8"
-                             text_hi="#ffffff"
-                             title="#000000"
-                             back="#3b3b3b">
-          </ThemeSpaceGeneric>
-        </space>
-      </ThemeUserPreferences>
-    </user_preferences>
-    <bone_color_sets>
-      <ThemeBoneColorSet active="#f70a0a"
-                         show_colored_constraints="FALSE"
-                         normal="#9a0000"
-                         select="#bd1111">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#fa9900"
-                         show_colored_constraints="FALSE"
-                         normal="#f74018"
-                         select="#f66913">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#83ef1d"
-                         show_colored_constraints="FALSE"
-                         normal="#1e9109"
-                         select="#59b70b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#5ec1ef"
-                         show_colored_constraints="FALSE"
-                         normal="#0a3694"
-                         select="#3667df">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f05d91"
-                         show_colored_constraints="FALSE"
-                         normal="#a9294e"
-                         select="#c1416a">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#8764d5"
-                         show_colored_constraints="FALSE"
-                         normal="#430c78"
-                         select="#543aa3">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#6fb6ab"
-                         show_colored_constraints="FALSE"
-                         normal="#24785a"
-                         select="#3c9579">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#9bc2cd"
-                         show_colored_constraints="FALSE"
-                         normal="#4b707c"
-                         select="#6a8691">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#f3ff00"
-                         show_colored_constraints="FALSE"
-                         normal="#f4c90c"
-                         select="#eec236">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#ffffff"
-                         show_colored_constraints="FALSE"
-                         normal="#1e2024"
-                         select="#484c56">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#d330d6"
-                         show_colored_constraints="FALSE"
-                         normal="#6f2f6a"
-                         select="#9845be">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bbef5b"
-                         show_colored_constraints="FALSE"
-                         normal="#6c8e22"
-                         select="#7fb022">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#dedede"
-                         show_colored_constraints="FALSE"
-                         normal="#8d8d8d"
-                         select="#b0b0b0">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#bd6a11"
-                         show_colored_constraints="FALSE"
-                         normal="#834326"
-                         select="#8b5811">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#34622b"
-                         show_colored_constraints="FALSE"
-                         normal="#08310e"
-                         select="#1c430b">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-      <ThemeBoneColorSet active="#000000"
-                         show_colored_constraints="FALSE"
-                         normal="#000000"
-                         select="#000000">
-      </ThemeBoneColorSet>
-    </bone_color_sets>
-  </Theme>
-</bpy>
diff --git a/release/scripts/addons_contrib/presets/keyconfig/blender_2012_experimental.py b/release/scripts/addons_contrib/presets/keyconfig/blender_2012_experimental.py
deleted file mode 100644
index 068a2ef..0000000
--- a/release/scripts/addons_contrib/presets/keyconfig/blender_2012_experimental.py
+++ /dev/null
@@ -1,1487 +0,0 @@
-""" An experimental new keymap for Blender.
-    Work in progress!
-"""
-import bpy
-
-######################
-# Misc configuration
-######################
-DEVELOPER_HOTKEYS = False  # Weird hotkeys that only developers use
-MAYA_STYLE_MANIPULATORS = False  # Maya-style "QWER" hotkeys for manipulators
-SUBSURF_RELATIVE = True  # Make subsurf hotkeys work by relative
-                         # shifting instead of absolute setting
-# Left mouse-button select
-bpy.context.user_preferences.inputs.select_mouse = 'LEFT'
-
-# Basic transform keys
-TRANSLATE_KEY = 'F'
-ROTATE_KEY = 'D'
-SCALE_KEY = 'S'
-
-# Specials Menu Key
-SPECIALS_MENU_KEY = 'Q'
-
-
-################################
-# Helper functions and classes
-################################
-class SetManipulator(bpy.types.Operator):
-    """Set's the manipulator mode"""
-    bl_idname = "view3d.manipulator_set"
-    bl_label = "Set Manipulator"
-    mode = bpy.props.EnumProperty(items=[("NONE", "None", ""),
-                                         ("TRANSLATE", "Translate", ""),
-                                         ("ROTATE", "Rotate", ""),
-                                         ("SCALE", "Scale", "")],
-                                         default="NONE")
-
-    def execute(self, context):
-        if self.mode == "NONE":
-            context.space_data.show_manipulator = False
-        elif self.mode == "TRANSLATE":
-            context.space_data.show_manipulator = True
-            context.space_data.use_manipulator_translate = True
-            context.space_data.use_manipulator_rotate = False
-            context.space_data.use_manipulator_scale = False
-        elif self.mode == "ROTATE":
-            context.space_data.show_manipulator = True
-            context.space_data.use_manipulator_translate = False
-            context.space_data.use_manipulator_rotate = True
-            context.space_data.use_manipulator_scale = False
-        elif self.mode == "SCALE":
-            context.space_data.show_manipulator = True
-            context.space_data.use_manipulator_translate = False
-            context.space_data.use_manipulator_rotate = False
-            context.space_data.use_manipulator_scale = True
-
-        return {'FINISHED'}
-bpy.utils.register_class(SetManipulator)
-
-
-class ModeSwitchMenu(bpy.types.Menu):
-    """ A menu for switching between object modes.
-    """
-    bl_idname = "OBJECT_MT_mode_switch_menu"
-    bl_label = "Switch Mode"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_enum("object.mode_set", "mode")
-bpy.utils.register_class(ModeSwitchMenu)
-
-
-# Temporary work around: Blender does not properly limit the mode switch menu
-# items until the first mode switch (e.g. mesh objects will show pose mode as
-# an option).
-# TODO: file a bug report for this behavior.
-bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
-
-
-class ObjectDeleteNoConfirm(bpy.types.Operator):
-    """Delete selected objects without the confirmation popup"""
-    bl_idname = "object.delete_no_confirm"
-    bl_label = "Delete Objects No Confirm"
-    bl_options = {'UNDO'}
-    
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None
-
-    def execute(self, context):
-        bpy.ops.object.delete()
-
-        return {'FINISHED'}
-bpy.utils.register_class(ObjectDeleteNoConfirm)
-
-
-class ShiftSubsurfLevel(bpy.types.Operator):
-    """Shift the subsurf level of the selected objects up or """ \
-    """down by the given amount (has maximum limit, to avoid """ \
-    """going crazy and running out of RAM)"""
-    bl_idname = "object.shift_subsurf_level"
-    bl_label = "Shift Subsurf Level"
-
-    delta = bpy.props.IntProperty(name="Delta", description="Amount to increase/decrease the subsurf level.", default=1)
-    min = bpy.props.IntProperty(name="Minimum", description="The lowest subsurf level to shift to.", default=0)
-    max = bpy.props.IntProperty(name="Maximum", description="The highest subsurf level to shift to.", default=4)
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None
-
-    def execute(self, context):
-        for obj in context.selected_objects:
-            # Find the last subsurf modifier in the stack
-            m = None
-            for mod in obj.modifiers:
-                if mod.type == "SUBSURF":
-                    m = mod
-
-            # Add a subsurf modifier if necessary
-            if not m and self.delta > 0:
-                m = obj.modifiers.new(name="Subsurf", type='SUBSURF')
-                m.levels = 0
-
-            # Adjust it's subsurf level
-            if m:
-                if self.delta > 0:
-                    if (m.levels + self.delta) <= self.max:
-                        m.levels += self.delta
-                elif self.delta < 0:
-                    if (m.levels + self.delta) >= self.min:
-                        m.levels += self.delta
-        return {'FINISHED'}
-bpy.utils.register_class(ShiftSubsurfLevel)
-
-
-class SetEditMeshSelectMode(bpy.types.Operator):
-    """Set edit mesh select mode (vert, edge, face)"""
-    bl_idname = "view3d.set_edit_mesh_select_mode"
-    bl_label = "Set Edit Mesh Select Mode"
-    mode = bpy.props.EnumProperty(items=[("VERT", "Vertex", ""),
-                                         ("EDGE", "Edge", ""),
-                                         ("FACE", "Face", "")],
-                                         default="VERT")
-    toggle = bpy.props.BoolProperty(name="Toggle", default=False)
-    
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None
-    
-    def execute(self, context):
-        if self.mode == "VERT":
-            mode = 0
-        elif self.mode == "EDGE":
-            mode = 1
-        else:  # self.mode == "FACE"
-            mode = 2
-        
-        select_mode = context.tool_settings.mesh_select_mode
-        if self.toggle:
-            select_mode[mode] = [True, False][select_mode[mode]]
-        else:
-            select_mode[mode] = True
-            for i in range(0,3):
-                if i != mode:
-                    select_mode[i] = False
-            
-        return {'FINISHED'}
-bpy.utils.register_class(SetEditMeshSelectMode)
-
-
-class MeshDeleteContextual(bpy.types.Operator):
-    """ Deletes mesh elements based on context instead
-        of forcing the user to select from a menu what
-        it should delete.
-    """
-    bl_idname = "mesh.delete_contextual"
-    bl_label = "Mesh Delete Contextual"
-    bl_options = {'UNDO'}
-    
-    @classmethod
-    def poll(cls, context):
-        return (context.active_object is not None) and (context.mode == "EDIT_MESH")
-    
-    def execute(self, context):
-        select_mode = context.tool_settings.mesh_select_mode
-        
-        if select_mode[0]:
-            bpy.ops.mesh.delete(type='VERT')
-        elif select_mode[1] and not select_mode[2]:
-            bpy.ops.mesh.delete(type='EDGE')
-        elif select_mode[2] and not select_mode[1]:
-            bpy.ops.mesh.delete(type='FACE')
-        else:
-            bpy.ops.mesh.delete(type='VERT')
-            
-        return {'FINISHED'}
-bpy.utils.register_class(MeshDeleteContextual)
-
-###########
-# Keymaps
-###########
-
-def clear_keymap(kc):
-    """ Clears all the keymaps, so we can start from scratch, building
-        things back up again one-by-one.
-    """
-    # Map Window
-    km = kc.keymaps.new('Window', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Screen
-    km = kc.keymaps.new('Screen', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Editing this part of the keymap seems
-    # to cause problems, so leaving alone.
-    # Map Screen Editing
-    #km = kc.keymaps.new('Screen Editing', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map View2D
-    km = kc.keymaps.new('View2D', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Frames
-    km = kc.keymaps.new('Frames', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Header
-    km = kc.keymaps.new('Header', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map View2D Buttons List
-    km = kc.keymaps.new('View2D Buttons List', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Property Editor
-    km = kc.keymaps.new('Property Editor', space_type='PROPERTIES', region_type='WINDOW', modal=False)
-
-    # Map Markers
-    km = kc.keymaps.new('Markers', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Animation
-    km = kc.keymaps.new('Animation', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Timeline
-    km = kc.keymaps.new('Timeline', space_type='TIMELINE', region_type='WINDOW', modal=False)
-
-    # Map Outliner
-    km = kc.keymaps.new('Outliner', space_type='OUTLINER', region_type='WINDOW', modal=False)
-
-    # Map 3D View Generic
-    km = kc.keymaps.new('3D View Generic', space_type='VIEW_3D', region_type='WINDOW', modal=False)
-
-    # Map Grease Pencil
-    km = kc.keymaps.new('Grease Pencil', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Face Mask
-    km = kc.keymaps.new('Face Mask', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Pose
-    km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Object Mode
-    km = kc.keymaps.new('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Image Paint
-    km = kc.keymaps.new('Image Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Vertex Paint
-    km = kc.keymaps.new('Vertex Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Weight Paint
-    km = kc.keymaps.new('Weight Paint', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Sculpt
-    km = kc.keymaps.new('Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Mesh
-    km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Curve
-    km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Armature
-    km = kc.keymaps.new('Armature', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Metaball
-    km = kc.keymaps.new('Metaball', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Lattice
-    km = kc.keymaps.new('Lattice', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Particle
-    km = kc.keymaps.new('Particle', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Font
-    km = kc.keymaps.new('Font', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Object Non-modal
-    km = kc.keymaps.new('Object Non-modal', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map 3D View
-    km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
-
-    # Map View3D Gesture Circle
-    km = kc.keymaps.new('View3D Gesture Circle', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map Gesture Border
-    km = kc.keymaps.new('Gesture Border', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map Standard Modal Map
-    km = kc.keymaps.new('Standard Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map Animation Channels
-    km = kc.keymaps.new('Animation Channels', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map UV Editor
-    km = kc.keymaps.new('UV Editor', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map Transform Modal Map
-    km = kc.keymaps.new('Transform Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map UV Sculpt
-    km = kc.keymaps.new('UV Sculpt', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Map View3D Fly Modal
-    km = kc.keymaps.new('View3D Fly Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map View3D Rotate Modal
-    km = kc.keymaps.new('View3D Rotate Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map View3D Move Modal
-    km = kc.keymaps.new('View3D Move Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map View3D Zoom Modal
-    km = kc.keymaps.new('View3D Zoom Modal', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Map Graph Editor Generic
-    km = kc.keymaps.new('Graph Editor Generic', space_type='GRAPH_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Graph Editor
-    km = kc.keymaps.new('Graph Editor', space_type='GRAPH_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Image Generic
-    km = kc.keymaps.new('Image Generic', space_type='IMAGE_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Image
-    km = kc.keymaps.new('Image', space_type='IMAGE_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Node Generic
-    km = kc.keymaps.new('Node Generic', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Node Editor
-    km = kc.keymaps.new('Node Editor', space_type='NODE_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map File Browser
-    km = kc.keymaps.new('File Browser', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    # Map File Browser Main
-    km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    # Map File Browser Buttons
-    km = kc.keymaps.new('File Browser Buttons', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    # Map Dopesheet
-    km = kc.keymaps.new('Dopesheet', space_type='DOPESHEET_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map NLA Generic
-    km = kc.keymaps.new('NLA Generic', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map NLA Channels
-    km = kc.keymaps.new('NLA Channels', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map NLA Editor
-    km = kc.keymaps.new('NLA Editor', space_type='NLA_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Text
-    km = kc.keymaps.new('Text', space_type='TEXT_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Sequencer
-    km = kc.keymaps.new('Sequencer', space_type='SEQUENCE_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Logic Editor
-    km = kc.keymaps.new('Logic Editor', space_type='LOGIC_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Console
-    km = kc.keymaps.new('Console', space_type='CONSOLE', region_type='WINDOW', modal=False)
-
-    # Map Clip
-    km = kc.keymaps.new('Clip', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Clip Editor
-    km = kc.keymaps.new('Clip Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
-
-    # Map Clip Graph Editor
-    km = kc.keymaps.new('Clip Graph Editor', space_type='CLIP_EDITOR', region_type='WINDOW', modal=False)
-
-
-
-
-
-def MapAdd_Window(kc):
-    """ Window Map
-    """
-    km = kc.keymaps.new('Window', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Quit
-    kmi = km.keymap_items.new('wm.quit_blender', 'Q', 'PRESS', ctrl=True)
-
-    # Operator search menu
-    kmi = km.keymap_items.new('wm.search_menu', 'TAB', 'CLICK')
-
-    # Open
-    kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('wm.link_append', 'O', 'CLICK', ctrl=True, alt=True)
-    kmi = km.keymap_items.new('wm.link_append', 'O', 'CLICK', ctrl=True, shift=True)
-    kmi.properties.link = False
-    kmi = km.keymap_items.new('wm.read_homefile', 'N', 'CLICK', ctrl=True)
-
-    # Save
-    kmi = km.keymap_items.new('wm.save_mainfile', 'S', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('wm.save_as_mainfile', 'S', 'CLICK', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('wm.save_homefile', 'U', 'CLICK', ctrl=True)
-
-    # NDof Device
-    kmi = km.keymap_items.new('wm.call_menu', 'NDOF_BUTTON_MENU', 'PRESS')
-    kmi.properties.name = 'USERPREF_MT_ndof_settings'
-    kmi = km.keymap_items.new('wm.ndof_sensitivity_change', 'NDOF_BUTTON_PLUS', 'PRESS')
-    kmi.properties.decrease = False
-    kmi.properties.fast = False
-    kmi = km.keymap_items.new('wm.ndof_sensitivity_change', 'NDOF_BUTTON_MINUS', 'PRESS')
-    kmi.properties.decrease = True
-    kmi.properties.fast = False
-    kmi = km.keymap_items.new('wm.ndof_sensitivity_change', 'NDOF_BUTTON_PLUS', 'PRESS', shift=True)
-    kmi.properties.decrease = False
-    kmi.properties.fast = True
-    kmi = km.keymap_items.new('wm.ndof_sensitivity_change', 'NDOF_BUTTON_MINUS', 'PRESS', shift=True)
-    kmi.properties.decrease = True
-    kmi.properties.fast = True
-
-    # Misc
-    kmi = km.keymap_items.new('wm.window_fullscreen_toggle', 'F11', 'CLICK', alt=True)
-
-    # Development/debugging
-    if DEVELOPER_HOTKEYS:
-        kmi = km.keymap_items.new('wm.redraw_timer', 'T', 'CLICK', ctrl=True, alt=True)
-        kmi = km.keymap_items.new('wm.debug_menu', 'D', 'CLICK', ctrl=True, alt=True)
-
-    # ???
-    kmi = km.keymap_items.new('info.reports_display_update', 'TIMER', 'ANY', any=True)
-
-
-def MapAdd_Screen(kc):
-    """ Screen Map
-    """
-    km = kc.keymaps.new('Screen', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('screen.animation_step', 'TIMER0', 'ANY', any=True)
-    kmi = km.keymap_items.new('screen.screen_set', 'RIGHT_ARROW', 'PRESS', ctrl=True)
-    kmi.properties.delta = 1
-    kmi = km.keymap_items.new('screen.screen_set', 'LEFT_ARROW', 'PRESS', ctrl=True)
-    kmi.properties.delta = -1
-    kmi = km.keymap_items.new('screen.screen_full_area', 'UP_ARROW', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('screen.screen_full_area', 'DOWN_ARROW', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('screen.screen_full_area', 'SPACE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('screen.screenshot', 'F3', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('screen.screencast', 'F3', 'PRESS', alt=True)
-    kmi = km.keymap_items.new('screen.region_quadview', 'Q', 'PRESS', ctrl=True, alt=True)
-    kmi = km.keymap_items.new('screen.repeat_history', 'F3', 'PRESS')
-    kmi = km.keymap_items.new('screen.repeat_last', 'R', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('screen.region_flip', 'F5', 'PRESS')
-    kmi = km.keymap_items.new('screen.redo_last', 'F6', 'PRESS')
-    kmi = km.keymap_items.new('script.reload', 'F8', 'PRESS')
-    kmi = km.keymap_items.new('file.execute', 'RET', 'PRESS')
-    kmi = km.keymap_items.new('file.execute', 'NUMPAD_ENTER', 'PRESS')
-    kmi = km.keymap_items.new('file.cancel', 'ESC', 'PRESS')
-    kmi = km.keymap_items.new('ed.undo', 'Z', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('ed.redo', 'Z', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('ed.undo_history', 'Z', 'PRESS', ctrl=True, alt=True)
-    kmi = km.keymap_items.new('render.render', 'F12', 'PRESS')
-    kmi = km.keymap_items.new('render.render', 'F12', 'PRESS', ctrl=True)
-    kmi.properties.animation = True
-    kmi = km.keymap_items.new('render.view_cancel', 'ESC', 'PRESS')
-    kmi = km.keymap_items.new('render.view_show', 'F11', 'PRESS')
-    kmi = km.keymap_items.new('render.play_rendered_anim', 'F11', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('screen.userpref_show', 'U', 'PRESS', ctrl=True, alt=True)
-
-    # Editing this seems to cause problems.
-    # TODO: file bug report
-    # Screen Editing
-    #km = kc.keymaps.new('Screen Editing', space_type='EMPTY', region_type='WINDOW', modal=False)
-    #
-    #kmi = km.keymap_items.new('screen.actionzone', 'LEFTMOUSE', 'PRESS')
-    #kmi.properties.modifier = 0
-    #kmi = km.keymap_items.new('screen.actionzone', 'LEFTMOUSE', 'PRESS', shift=True)
-    #kmi.properties.modifier = 1
-    #kmi = km.keymap_items.new('screen.actionzone', 'LEFTMOUSE', 'PRESS', ctrl=True)
-    #kmi.properties.modifier = 2
-    #kmi = km.keymap_items.new('screen.area_split', 'NONE', 'ANY')
-    #kmi = km.keymap_items.new('screen.area_join', 'NONE', 'ANY')
-    #kmi = km.keymap_items.new('screen.area_dupli', 'NONE', 'ANY', shift=True)
-    #kmi = km.keymap_items.new('screen.area_swap', 'NONE', 'ANY', ctrl=True)
-    #kmi = km.keymap_items.new('screen.region_scale', 'NONE', 'ANY')
-    #kmi = km.keymap_items.new('screen.area_move', 'LEFTMOUSE', 'PRESS')
-    #kmi = km.keymap_items.new('screen.area_options', 'RIGHTMOUSE', 'PRESS')
-
-
-def MapAdd_View2D(kc):
-    """ View 2D Map
-    """
-    km = kc.keymaps.new('View2D', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('view2d.scroller_activate', 'LEFTMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroller_activate', 'MIDDLEMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('view2d.pan', 'TRACKPADPAN', 'ANY')
-    kmi = km.keymap_items.new('view2d.scroll_right', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('view2d.scroll_left', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('view2d.zoom_out', 'WHEELOUTMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.zoom_in', 'WHEELINMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.zoom_out', 'NUMPAD_MINUS', 'PRESS')
-    kmi = km.keymap_items.new('view2d.zoom_in', 'NUMPAD_PLUS', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_right', 'WHEELDOWNMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_left', 'WHEELUPMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADZOOM', 'ANY')
-    kmi = km.keymap_items.new('view2d.zoom_border', 'B', 'PRESS', shift=True)
-
-    # View2D Buttons List
-    km = kc.keymaps.new('View2D Buttons List', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('view2d.scroller_activate', 'LEFTMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroller_activate', 'MIDDLEMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.pan', 'MIDDLEMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.pan', 'TRACKPADPAN', 'ANY')
-    kmi = km.keymap_items.new('view2d.scroll_down', 'WHEELDOWNMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_up', 'WHEELUPMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view2d.scroll_down', 'PAGE_DOWN', 'PRESS')
-    kmi.properties.page = True
-    kmi = km.keymap_items.new('view2d.scroll_up', 'PAGE_UP', 'PRESS')
-    kmi.properties.page = True
-    kmi = km.keymap_items.new('view2d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('view2d.zoom', 'TRACKPADZOOM', 'ANY')
-    kmi = km.keymap_items.new('view2d.zoom_out', 'NUMPAD_MINUS', 'PRESS')
-    kmi = km.keymap_items.new('view2d.zoom_in', 'NUMPAD_PLUS', 'PRESS')
-    kmi = km.keymap_items.new('view2d.reset', 'HOME', 'PRESS')
-
-
-def MapAdd_View3D_Global(kc):
-    """ View 3D Global Map
-    """
-    km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
-
-    #-----------------
-    # View navigation
-    #-----------------
-
-    # ???
-    kmi = km.keymap_items.new('view3d.rotate', 'MOUSEROTATE', 'ANY')
-    kmi = km.keymap_items.new('view3d.smoothview', 'TIMER1', 'ANY', any=True)
-
-    
-
-    # Basics with mouse
-    kmi = km.keymap_items.new('view3d.rotate', 'MIDDLEMOUSE', 'PRESS')
-    kmi = km.keymap_items.new('view3d.move', 'MIDDLEMOUSE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('view3d.zoom', 'MIDDLEMOUSE', 'PRESS', ctrl=True)
-    #kmi = km.keymap_items.new('view3d.dolly', 'MIDDLEMOUSE', 'PRESS', shift=True, ctrl=True)
-
-    # Basics with mouse wheel
-    kmi = km.keymap_items.new('view3d.zoom', 'WHEELINMOUSE', 'PRESS')
-    kmi.properties.delta = 1
-    kmi = km.keymap_items.new('view3d.zoom', 'WHEELOUTMOUSE', 'PRESS')
-    kmi.properties.delta = -1
-    kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
-    kmi.properties.type = 'PANRIGHT'
-    kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
-    kmi.properties.type = 'PANLEFT'
-    kmi = km.keymap_items.new('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', shift=True)
-    kmi.properties.type = 'PANUP'
-    kmi = km.keymap_items.new('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
-    kmi.properties.type = 'PANDOWN'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', ctrl=True, alt=True)
-    kmi.properties.type = 'ORBITLEFT'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True, alt=True)
-    kmi.properties.type = 'ORBITRIGHT'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', shift=True, alt=True)
-    kmi.properties.type = 'ORBITUP'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', shift=True, alt=True)
-    kmi.properties.type = 'ORBITDOWN'
-
-    # Basics with trackpad
-    kmi = km.keymap_items.new('view3d.rotate', 'TRACKPADPAN', 'ANY', alt=True)
-    kmi = km.keymap_items.new('view3d.move', 'TRACKPADPAN', 'ANY')
-    kmi = km.keymap_items.new('view3d.zoom', 'TRACKPADZOOM', 'ANY')
-    
-    # Perspective/ortho
-    kmi = km.keymap_items.new('view3d.view_persportho', 'NUMPAD_5', 'CLICK')
-
-    # Camera view
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_0', 'CLICK')
-    kmi.properties.type = 'CAMERA'
-    
-    # Basics with numpad
-    kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_8', 'CLICK')
-    kmi.properties.type = 'ORBITUP'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_2', 'CLICK')
-    kmi.properties.type = 'ORBITDOWN'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_4', 'CLICK')
-    kmi.properties.type = 'ORBITLEFT'
-    kmi = km.keymap_items.new('view3d.view_orbit', 'NUMPAD_6', 'CLICK')
-    kmi.properties.type = 'ORBITRIGHT'
-    kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_8', 'CLICK', ctrl=True)
-    kmi.properties.type = 'PANUP'
-    kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_2', 'CLICK', ctrl=True)
-    kmi.properties.type = 'PANDOWN'
-    kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_4', 'CLICK', ctrl=True)
-    kmi.properties.type = 'PANLEFT'
-    kmi = km.keymap_items.new('view3d.view_pan', 'NUMPAD_6', 'CLICK', ctrl=True)
-    kmi.properties.type = 'PANRIGHT'
-    kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_PLUS', 'CLICK')
-    kmi.properties.delta = 1
-    kmi = km.keymap_items.new('view3d.zoom', 'NUMPAD_MINUS', 'CLICK')
-    kmi.properties.delta = -1
-
-    # Zoom in/out alternatives
-    kmi = km.keymap_items.new('view3d.zoom', 'EQUAL', 'CLICK', ctrl=True)
-    kmi.properties.delta = 1
-    kmi = km.keymap_items.new('view3d.zoom', 'MINUS', 'CLICK', ctrl=True)
-    kmi.properties.delta = -1
-
-    # Front/Right/Top/Back/Left/Bottom
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'CLICK')
-    kmi.properties.type = 'FRONT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'CLICK')
-    kmi.properties.type = 'RIGHT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'CLICK')
-    kmi.properties.type = 'TOP'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'CLICK', ctrl=True)
-    kmi.properties.type = 'BACK'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'CLICK', ctrl=True)
-    kmi.properties.type = 'LEFT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'CLICK', ctrl=True)
-    kmi.properties.type = 'BOTTOM'
-
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'MIDDLEMOUSE', 'CLICK', alt=True)
-    kmi.properties.type = 'FRONT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'EVT_TWEAK_M', 'EAST', alt=True)
-    kmi.properties.type = 'RIGHT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'EVT_TWEAK_M', 'NORTH', alt=True)
-    kmi.properties.type = 'TOP'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'MIDDLEMOUSE', 'DOUBLE_CLICK', alt=True)
-    kmi.properties.type = 'BACK'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'EVT_TWEAK_M', 'WEST', alt=True)
-    kmi.properties.type = 'LEFT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'EVT_TWEAK_M', 'SOUTH', alt=True)
-    kmi.properties.type = 'BOTTOM'
-
-    # Selection-aligned Front/Right/Top/Back/Left/Bottom
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'CLICK', shift=True)
-    kmi.properties.type = 'FRONT'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'CLICK', shift=True)
-    kmi.properties.type = 'RIGHT'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'CLICK', shift=True)
-    kmi.properties.type = 'TOP'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_1', 'CLICK', shift=True, ctrl=True)
-    kmi.properties.type = 'BACK'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_3', 'CLICK', shift=True, ctrl=True)
-    kmi.properties.type = 'LEFT'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NUMPAD_7', 'CLICK', shift=True, ctrl=True)
-    kmi.properties.type = 'BOTTOM'
-    kmi.properties.align_active = True
-
-    # NDOF Device
-    kmi = km.keymap_items.new('view3d.ndof_orbit', 'NDOF_BUTTON_MENU', 'ANY')
-    kmi = km.keymap_items.new('view3d.ndof_pan', 'NDOF_BUTTON_MENU', 'ANY', shift=True)
-    kmi = km.keymap_items.new('view3d.view_selected', 'NDOF_BUTTON_FIT', 'PRESS')
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS')
-    kmi.properties.type = 'FRONT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BACK', 'PRESS')
-    kmi.properties.type = 'BACK'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_LEFT', 'PRESS')
-    kmi.properties.type = 'LEFT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS')
-    kmi.properties.type = 'RIGHT'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS')
-    kmi.properties.type = 'TOP'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_BOTTOM', 'PRESS')
-    kmi.properties.type = 'BOTTOM'
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_FRONT', 'PRESS', shift=True)
-    kmi.properties.type = 'FRONT'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_RIGHT', 'PRESS', shift=True)
-    kmi.properties.type = 'RIGHT'
-    kmi.properties.align_active = True
-    kmi = km.keymap_items.new('view3d.viewnumpad', 'NDOF_BUTTON_TOP', 'PRESS', shift=True)
-    kmi.properties.type = 'TOP'
-    kmi.properties.align_active = True
-
-    # Fly mode
-    #kmi = km.keymap_items.new('view3d.fly', 'F', 'CLICK', shift=True)
-
-    # Misc
-    kmi = km.keymap_items.new('view3d.view_selected', 'NUMPAD_PERIOD', 'CLICK')
-    kmi = km.keymap_items.new('view3d.view_center_cursor', 'NUMPAD_PERIOD', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('view3d.zoom_camera_1_to_1', 'NUMPAD_ENTER', 'CLICK', shift=True)
-    kmi = km.keymap_items.new('view3d.view_center_camera', 'HOME', 'CLICK')
-    kmi = km.keymap_items.new('view3d.view_all', 'HOME', 'CLICK')
-    kmi.properties.center = False
-    kmi = km.keymap_items.new('view3d.view_all', 'C', 'CLICK', shift=True)
-    kmi.properties.center = True
-
-    #-------------
-    # Manipulator
-    #-------------
-    
-    kmi = km.keymap_items.new('view3d.manipulator', 'EVT_TWEAK_L', 'ANY', any=True)
-    kmi.properties.release_confirm = True
-
-    if MAYA_STYLE_MANIPULATORS:
-        kmi = km.keymap_items.new('view3d.manipulator_set', 'Q', 'CLICK')
-        kmi.properties.mode = 'NONE'
-        kmi = km.keymap_items.new('view3d.manipulator_set', TRANSLATE_KEY, 'CLICK')
-        kmi.properties.mode = 'TRANSLATE'
-        kmi = km.keymap_items.new('view3d.manipulator_set', ROTATE_KEY, 'CLICK')
-        kmi.properties.mode = 'ROTATE'
-        kmi = km.keymap_items.new('view3d.manipulator_set', SCALE_KEY, 'CLICK')
-        kmi.properties.mode = 'SCALE'
-    else:
-        kmi = km.keymap_items.new('wm.context_toggle', 'SPACE', 'CLICK', ctrl=True)
-        kmi.properties.data_path = 'space_data.show_manipulator'
-
-    #-----------
-    # Selection
-    #-----------
-    
-    # Click select
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK') # Replace
-    kmi.properties.extend = False
-    kmi.properties.deselect = False
-    kmi.properties.toggle = False
-    kmi.properties.center = False
-    kmi.properties.enumerate = False
-    kmi.properties.object = False
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK', shift=True) # Extend
-    kmi.properties.extend = True
-    kmi.properties.deselect = False
-    kmi.properties.toggle = False
-    kmi.properties.center = False
-    kmi.properties.enumerate = False
-    kmi.properties.object = False
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK', ctrl=True) # Deselect
-    kmi.properties.extend = False
-    kmi.properties.deselect = True
-    kmi.properties.toggle = False
-    kmi.properties.center = False
-    kmi.properties.enumerate = False
-    kmi.properties.object = False
-    
-    # Enumerate select
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK', alt=True) # Replace
-    kmi.properties.extend = False
-    kmi.properties.center = False
-    kmi.properties.enumerate = True
-    kmi.properties.object = False
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK', shift=True, alt=True) # Extend
-    kmi.properties.extend = True
-    kmi.properties.center = False
-    kmi.properties.enumerate = True
-    kmi.properties.object = False
-    kmi = km.keymap_items.new('view3d.select', 'SELECTMOUSE', 'CLICK', ctrl=True, alt=True) # Center (TODO: deselect)
-    kmi.properties.extend = False
-    kmi.properties.center = True
-    kmi.properties.enumerate = True
-    kmi.properties.object = False
-
-    # Border select
-    kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY') # Replace
-    kmi.properties.extend = False
-    kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY', shift=True) # Extend
-    kmi.properties.extend = True
-    kmi = km.keymap_items.new('view3d.select_border', 'EVT_TWEAK_L', 'ANY', ctrl=True) # Deselect (handled in modal)
-    kmi.properties.extend = False
-
-    # Lasso select
-    kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_L', 'ANY', alt=True) # Replace
-    kmi.properties.extend = False
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_L', 'ANY', alt=True, shift=True) # Extend
-    kmi.properties.extend = True
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('view3d.select_lasso', 'EVT_TWEAK_L', 'ANY', alt=True, ctrl=True) # Deselect
-    kmi.properties.extend = False
-    kmi.properties.deselect = True
-
-    # Paint select
-    #kmi = km.keymap_items.new('view3d.select_circle', 'C', 'CLICK')
-
-    #-----------------------
-    # Transforms via hotkey
-    #-----------------------
-    
-    # Grab, rotate scale
-    kmi = km.keymap_items.new('transform.translate', TRANSLATE_KEY, 'PRESS')
-    #kmi = km.keymap_items.new('transform.translate', 'EVT_TWEAK_S', 'ANY')
-    kmi = km.keymap_items.new('transform.rotate', ROTATE_KEY, 'PRESS')
-    kmi = km.keymap_items.new('transform.resize', SCALE_KEY, 'PRESS')
-
-    # Mirror, shear, warp, to-sphere
-    #kmi = km.keymap_items.new('transform.mirror', 'M', 'CLICK', ctrl=True)
-    #kmi = km.keymap_items.new('transform.shear', 'S', 'CLICK', shift=True, ctrl=True, alt=True)
-    #kmi = km.keymap_items.new('transform.warp', 'W', 'CLICK', shift=True)
-    #kmi = km.keymap_items.new('transform.tosphere', 'S', 'CLICK', shift=True, alt=True)
-
-    #-------------------------
-    # Transform texture space
-    #-------------------------
-    kmi = km.keymap_items.new('transform.translate', 'T', 'CLICK', shift=True)
-    kmi.properties.texture_space = True
-    kmi = km.keymap_items.new('transform.resize', 'T', 'CLICK', shift=True, alt=True)
-    kmi.properties.texture_space = True
-
-    #------------------
-    # Transform spaces
-    #------------------
-    kmi = km.keymap_items.new('transform.select_orientation', 'SPACE', 'CLICK', alt=True)
-    kmi = km.keymap_items.new('transform.create_orientation', 'SPACE', 'CLICK', ctrl=True, alt=True)
-    kmi.properties.use = True
-
-    #----------
-    # Snapping
-    #----------
-    kmi = km.keymap_items.new('wm.context_toggle', 'TAB', 'CLICK', shift=True)
-    kmi.properties.data_path = 'tool_settings.use_snap'
-    kmi = km.keymap_items.new('transform.snap_type', 'TAB', 'CLICK', shift=True, ctrl=True)
-
-    #---------------
-    # Snapping Menu
-    #---------------
-    kmi = km.keymap_items.new('wm.call_menu', 'S', 'CLICK', shift=True)
-    kmi.properties.name = 'VIEW3D_MT_snap'
-
-    #-----------
-    # 3d cursor
-    #-----------
-    kmi = km.keymap_items.new('view3d.cursor3d', 'ACTIONMOUSE', 'CLICK')
-
-    #-------------------
-    # Toggle local view
-    #-------------------
-    kmi = km.keymap_items.new('view3d.localview', 'NUMPAD_SLASH', 'CLICK')
-
-    #--------
-    # Layers
-    #--------
-    """
-    kmi = km.keymap_items.new('view3d.layers', 'ACCENT_GRAVE', 'CLICK')
-    kmi.properties.nr = 0
-    kmi = km.keymap_items.new('view3d.layers', 'ONE', 'CLICK', any=True)
-    kmi.properties.nr = 1
-    kmi = km.keymap_items.new('view3d.layers', 'TWO', 'CLICK', any=True)
-    kmi.properties.nr = 2
-    kmi = km.keymap_items.new('view3d.layers', 'THREE', 'CLICK', any=True)
-    kmi.properties.nr = 3
-    kmi = km.keymap_items.new('view3d.layers', 'FOUR', 'CLICK', any=True)
-    kmi.properties.nr = 4
-    kmi = km.keymap_items.new('view3d.layers', 'FIVE', 'CLICK', any=True)
-    kmi.properties.nr = 5
-    kmi = km.keymap_items.new('view3d.layers', 'SIX', 'CLICK', any=True)
-    kmi.properties.nr = 6
-    kmi = km.keymap_items.new('view3d.layers', 'SEVEN', 'CLICK', any=True)
-    kmi.properties.nr = 7
-    kmi = km.keymap_items.new('view3d.layers', 'EIGHT', 'CLICK', any=True)
-    kmi.properties.nr = 8
-    kmi = km.keymap_items.new('view3d.layers', 'NINE', 'CLICK', any=True)
-    kmi.properties.nr = 9
-    kmi = km.keymap_items.new('view3d.layers', 'ZERO', 'CLICK', any=True)
-    kmi.properties.nr = 10
-    """
-
-    #------------------
-    # Viewport drawing
-    #------------------
-    kmi = km.keymap_items.new('wm.context_toggle_enum', 'Z', 'PRESS')
-    kmi.properties.data_path = 'space_data.viewport_shade'
-    kmi.properties.value_1 = 'SOLID'
-    kmi.properties.value_2 = 'WIREFRAME'
-    
-    kmi = km.keymap_items.new('wm.context_menu_enum', 'Z', 'PRESS', alt=True)
-    kmi.properties.data_path = 'space_data.viewport_shade'
-    
-    #-------------
-    # Pivot point
-    #-------------
-    kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'CLICK')
-    kmi.properties.data_path = 'space_data.pivot_point'
-    kmi.properties.value = 'BOUNDING_BOX_CENTER'
-    kmi = km.keymap_items.new('wm.context_set_enum', 'COMMA', 'CLICK', ctrl=True)
-    kmi.properties.data_path = 'space_data.pivot_point'
-    kmi.properties.value = 'MEDIAN_POINT'
-    kmi = km.keymap_items.new('wm.context_toggle', 'COMMA', 'CLICK', alt=True)
-    kmi.properties.data_path = 'space_data.use_pivot_point_align'
-    kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'CLICK')
-    kmi.properties.data_path = 'space_data.pivot_point'
-    kmi.properties.value = 'CURSOR'
-    kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'CLICK', ctrl=True)
-    kmi.properties.data_path = 'space_data.pivot_point'
-    kmi.properties.value = 'INDIVIDUAL_ORIGINS'
-    kmi = km.keymap_items.new('wm.context_set_enum', 'PERIOD', 'CLICK', alt=True)
-    kmi.properties.data_path = 'space_data.pivot_point'
-    kmi.properties.value = 'ACTIVE_ELEMENT'
-
-    #------
-    # Misc
-    #------
-    kmi = km.keymap_items.new('view3d.clip_border', 'B', 'CLICK', alt=True)
-    kmi = km.keymap_items.new('view3d.zoom_border', 'B', 'CLICK', shift=True)
-    kmi = km.keymap_items.new('view3d.render_border', 'B', 'CLICK', shift=True)
-    kmi = km.keymap_items.new('view3d.camera_to_view', 'NUMPAD_0', 'CLICK', ctrl=True, alt=True)
-    kmi = km.keymap_items.new('view3d.object_as_camera', 'NUMPAD_0', 'CLICK', ctrl=True)
-    
-
-def MapAdd_View3D_Object_Nonmodal(kc):
-    """ Object Non-modal Map
-        This essentially applies globally within the 3d view.  But technically
-        only when objects are involved (but when are they not...?).
-    """
-    km = kc.keymaps.new('Object Non-modal', space_type='EMPTY', region_type='WINDOW', modal=False)
-    
-    # Mode switching
-    kmi = km.keymap_items.new('wm.call_menu', 'SPACE', 'PRESS')
-    kmi.properties.name = 'OBJECT_MT_mode_switch_menu'
-
-
-def MapAdd_View3D_ObjectMode(kc):
-    """ Object Mode Map
-    """
-    km = kc.keymaps.new('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    # Delete
-    kmi = km.keymap_items.new('object.delete_no_confirm', 'X', 'CLICK')
-    kmi = km.keymap_items.new('object.delete_no_confirm', 'DEL', 'CLICK')
-
-    # Proportional editing
-    kmi = km.keymap_items.new('wm.context_toggle', 'O', 'PRESS')
-    kmi.properties.data_path = 'tool_settings.use_proportional_edit_objects'
-    kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
-    kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'
-    
-    # Game engine start
-    kmi = km.keymap_items.new('view3d.game_start', 'P', 'PRESS')
-    
-    # Selection
-    kmi = km.keymap_items.new('object.select_all', 'A', 'PRESS')
-    kmi.properties.action = 'TOGGLE'
-    kmi = km.keymap_items.new('object.select_all', 'I', 'PRESS', ctrl=True)
-    kmi.properties.action = 'INVERT'
-    kmi = km.keymap_items.new('object.select_linked', 'L', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('object.select_grouped', 'G', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
-    kmi.properties.direction = 'PARENT'
-    kmi.properties.extend = False
-    kmi = km.keymap_items.new('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
-    kmi.properties.direction = 'PARENT'
-    kmi.properties.extend = True
-    kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
-    kmi.properties.direction = 'CHILD'
-    kmi.properties.extend = False
-    kmi = km.keymap_items.new('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
-    kmi.properties.direction = 'CHILD'
-    kmi.properties.extend = True
-    
-    # Parenting
-    kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('object.parent_clear', 'P', 'PRESS', alt=True)
-
-    # Constraints
-    kmi = km.keymap_items.new('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
-    
-    # Transforms
-    kmi = km.keymap_items.new('object.location_clear', TRANSLATE_KEY, 'PRESS', alt=True)
-    kmi = km.keymap_items.new('object.rotation_clear', ROTATE_KEY, 'PRESS', alt=True)
-    kmi = km.keymap_items.new('object.scale_clear', SCALE_KEY, 'PRESS', alt=True)
-    kmi = km.keymap_items.new('object.origin_clear', 'O', 'PRESS', alt=True)
-    
-    # Hiding
-    kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS') # Hide selected
-    kmi.properties.unselected = False
-    kmi = km.keymap_items.new('object.hide_view_set', 'H', 'PRESS', shift=True) # Hide unselected
-    kmi.properties.unselected = True
-    kmi = km.keymap_items.new('object.hide_view_clear', 'H', 'PRESS', alt=True) # Unhide
-    
-    #kmi = km.keymap_items.new('object.hide_render_set', 'H', 'PRESS', ctrl=True)
-    #kmi = km.keymap_items.new('object.hide_render_clear', 'H', 'PRESS', ctrl=True, alt=True)
-    
-    
-    # Layer management
-    kmi = km.keymap_items.new('object.move_to_layer', 'M', 'PRESS')
-
-    # Add menus
-    kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
-    kmi.properties.name = 'INFO_MT_add'
-    kmi = km.keymap_items.new('wm.call_menu', 'L', 'PRESS', ctrl=True)
-    kmi.properties.name = 'VIEW3D_MT_make_links'
-    
-    # Duplication
-    kmi = km.keymap_items.new('object.duplicate_move', 'D', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('object.duplicate_move_linked', 'D', 'PRESS', alt=True)
-    kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('wm.call_menu', 'U', 'PRESS')
-    kmi.properties.name = 'VIEW3D_MT_make_single_user'
-    
-    # Apply menu
-    kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True)
-    kmi.properties.name = 'VIEW3D_MT_object_apply'
-    
-    # Groups
-    kmi = km.keymap_items.new('group.create', 'G', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)
-    kmi = km.keymap_items.new('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)
-    kmi = km.keymap_items.new('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)
-
-    # Make proxy
-    kmi = km.keymap_items.new('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)
-    
-    # Keyframe insertion
-    kmi = km.keymap_items.new('anim.keyframe_insert_menu', 'I', 'PRESS')
-    kmi = km.keymap_items.new('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
-    kmi = km.keymap_items.new('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
-    
-    # Misc
-    kmi = km.keymap_items.new('object.join', 'J', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('object.convert', 'C', 'PRESS', alt=True)
-    kmi = km.keymap_items.new('object.make_local', 'L', 'PRESS')
-    kmi = km.keymap_items.new('wm.call_menu', SPECIALS_MENU_KEY, 'PRESS')
-    kmi.properties.name = 'VIEW3D_MT_object_specials'
-    
-    # Subdivision surface shortcuts
-    #kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
-    #kmi.properties.level = 0
-    #kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
-    #kmi.properties.level = 1
-    #kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
-    #kmi.properties.level = 2
-    #kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
-    #kmi.properties.level = 3
-    #kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
-    #kmi.properties.level = 4
-    #kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
-    #kmi.properties.level = 5
-
-
-def MapAdd_View3D_MeshEditMode(kc):
-    """ Mesh Edit Mode Map
-    """
-    km = kc.keymaps.new('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-    #---------------------------------
-    # Vertex/Edge/Face mode switching
-    #---------------------------------
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'ONE', 'PRESS')
-    kmi.properties.mode = 'VERT'
-    kmi.properties.toggle = False
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'TWO', 'PRESS')
-    kmi.properties.mode = 'EDGE'
-    kmi.properties.toggle = False
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'THREE', 'PRESS')
-    kmi.properties.mode = 'FACE'
-    kmi.properties.toggle = False
-
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'ONE', 'PRESS', shift=True)
-    kmi.properties.mode = 'VERT'
-    kmi.properties.toggle = True
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'TWO', 'PRESS', shift=True)
-    kmi.properties.mode = 'EDGE'
-    kmi.properties.toggle = True
-    kmi = km.keymap_items.new('view3d.set_edit_mesh_select_mode', 'THREE', 'PRESS', shift=True)
-    kmi.properties.mode = 'FACE'
-    kmi.properties.toggle = True
-
-    #-----------
-    # Selection
-    #-----------
-    
-    # Shortest path
-    kmi = km.keymap_items.new('mesh.select_shortest_path', 'LEFTMOUSE', 'CLICK', alt=True) # Replace
-    # TODO: add, remove
-    
-    # Edge loop
-    kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'DOUBLE_CLICK') # Replace
-    kmi.properties.extend = False
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'DOUBLE_CLICK', shift=True) # Add
-    kmi.properties.extend = True
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('mesh.loop_select', 'LEFTMOUSE', 'DOUBLE_CLICK', ctrl=True) # Remove
-    kmi.properties.extend = False
-    kmi.properties.deselect = True
-    
-    # Edge ring
-    kmi = km.keymap_items.new('mesh.edgering_select', 'LEFTMOUSE', 'DOUBLE_CLICK', alt=True) # Replace
-    kmi.properties.extend = False
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('mesh.edgering_select', 'LEFTMOUSE', 'DOUBLE_CLICK', alt=True, shift=True) # Add
-    kmi.properties.extend = True
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('mesh.edgering_select', 'LEFTMOUSE', 'DOUBLE_CLICK', alt=True, ctrl=True) # Remove
-    kmi.properties.extend = False
-    kmi.properties.deselect = True
-    
-    kmi = km.keymap_items.new('mesh.select_all', 'A', 'PRESS')
-    kmi.properties.action = 'TOGGLE'
-    kmi = km.keymap_items.new('mesh.select_all', 'I', 'CLICK', ctrl=True)
-    kmi.properties.action = 'INVERT'
-    kmi = km.keymap_items.new('mesh.select_more', 'NUMPAD_PLUS', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('mesh.select_less', 'NUMPAD_MINUS', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('mesh.select_non_manifold', 'M', 'CLICK', shift=True, ctrl=True, alt=True)
-    kmi = km.keymap_items.new('mesh.select_linked', 'L', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'CLICK')
-    kmi.properties.deselect = False
-    kmi = km.keymap_items.new('mesh.select_linked_pick', 'L', 'CLICK', shift=True)
-    kmi.properties.deselect = True
-    kmi = km.keymap_items.new('mesh.faces_select_linked_flat', 'F', 'CLICK', shift=True, ctrl=True, alt=True)
-    kmi = km.keymap_items.new('mesh.select_similar', 'G', 'CLICK', shift=True)
-
-    # Proportional editing
-    kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'CLICK')
-    kmi.properties.data_path = 'tool_settings.proportional_edit'
-    kmi.properties.value_1 = 'DISABLED'
-    kmi.properties.value_2 = 'ENABLED'
-    kmi = km.keymap_items.new('wm.context_cycle_enum', 'O', 'CLICK', shift=True)
-    kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'
-    kmi = km.keymap_items.new('wm.context_toggle_enum', 'O', 'CLICK', alt=True)
-    kmi.properties.data_path = 'tool_settings.proportional_edit'
-    kmi.properties.value_1 = 'DISABLED'
-    kmi.properties.value_2 = 'CONNECTED'
-
-    # Hiding
-    kmi = km.keymap_items.new('mesh.hide', 'H', 'CLICK')
-    kmi.properties.unselected = False
-    kmi = km.keymap_items.new('mesh.hide', 'H', 'CLICK', shift=True)
-    kmi.properties.unselected = True
-    kmi = km.keymap_items.new('mesh.reveal', 'H', 'CLICK', alt=True)
-
-    #-----------------
-    # Create Geometry
-    #-----------------
-    
-    # Add Primitive
-    kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True)
-    kmi.properties.name = 'INFO_MT_mesh_add'
-    
-    # Add edge and face / vertex connect
-    kmi = km.keymap_items.new('mesh.edge_face_add', 'C', 'CLICK')
-    kmi = kmi = km.keymap_items.new('mesh.vert_connect', 'C', 'CLICK', shift=True)
-    
-    kmi = km.keymap_items.new('mesh.fill', 'C', 'CLICK', alt=True)
-    kmi = km.keymap_items.new('mesh.beautify_fill', 'C', 'CLICK', alt=True, shift=True)
-    
-    # Subdivide
-    kmi = km.keymap_items.new('mesh.subdivide', 'W', 'CLICK')
-    
-    # Loop cut
-    kmi = km.keymap_items.new('mesh.loopcut_slide', 'T', 'CLICK')
-    
-    # Knife
-    kmi = km.keymap_items.new('mesh.knife_tool', 'K', 'CLICK')
-    
-    # Extrude
-    kmi = km.keymap_items.new('view3d.edit_mesh_extrude_move_normal', 'E', 'CLICK')
-    kmi = km.keymap_items.new('wm.call_menu', 'E', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_extrude'
-    
-    kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)
-    kmi.properties.rotate_source = True
-    kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', shift=True, ctrl=True)
-    kmi.properties.rotate_source = False
-    
-    # Inset/Outset
-    kmi = km.keymap_items.new('mesh.inset', 'I', 'CLICK')
-    kmi.properties.use_outset = False
-    kmi = km.keymap_items.new('mesh.inset', 'I', 'CLICK', shift=True)
-    kmi.properties.use_outset = True
-    
-    # Bevel
-    kmi = km.keymap_items.new('mesh.bevel', 'B', 'CLICK')
-
-    # Duplicate
-    kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'CLICK', shift=True)
-    
-    # Rip
-    kmi = km.keymap_items.new('mesh.rip_move', 'R', 'CLICK')
-    
-    # Split / Separate
-    kmi = km.keymap_items.new('mesh.split', 'Y', 'CLICK')
-    kmi = km.keymap_items.new('mesh.separate', 'Y', 'CLICK', shift=True)
-    
-
-    #-----------------
-    # Remove Geometry
-    #-----------------
-
-    # Delete/Dissolve
-    kmi = km.keymap_items.new('mesh.delete_contextual', 'X', 'CLICK')
-    kmi = km.keymap_items.new('mesh.delete_contextual', 'DEL', 'CLICK')
-    
-    kmi = km.keymap_items.new('mesh.dissolve', 'X', 'CLICK', shift=True)
-    kmi.properties.use_verts = True
-    kmi = km.keymap_items.new('mesh.dissolve', 'DEL', 'CLICK', shift=True)
-    kmi.properties.use_verts = True
-    
-    kmi = km.keymap_items.new('wm.call_menu', 'X', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'
-    kmi = km.keymap_items.new('wm.call_menu', 'DEL', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete'
-
-    # Merge/collapse
-    kmi = km.keymap_items.new('mesh.edge_collapse', 'M', 'CLICK')
-    kmi = km.keymap_items.new('mesh.merge', 'M', 'CLICK', alt=True)
-    
-    #-----------------
-    # Deform Geometry
-    #-----------------
-    
-    # Smooth
-    kmi = km.keymap_items.new('mesh.vertices_smooth', 'W', 'PRESS', shift=True)
-    
-    # Shrink / Fatten
-    kmi = km.keymap_items.new('transform.shrink_fatten', 'S', 'CLICK', alt=True)
-    
-    #------
-    # Misc
-    #------
-    
-    # Vert/edge properties
-    #kmi = km.keymap_items.new('transform.edge_crease', 'E', 'CLICK', shift=True)
-    
-    # Tri/quad conversion
-    #kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'T', 'CLICK', ctrl=True)
-    #kmi = km.keymap_items.new('mesh.quads_convert_to_tris', 'T', 'CLICK', shift=True, ctrl=True)
-    #kmi.properties.use_beauty = False
-    #kmi = km.keymap_items.new('mesh.tris_convert_to_quads', 'J', 'CLICK', alt=True)
-
-    # Tool Menus
-    kmi = km.keymap_items.new('wm.call_menu', SPECIALS_MENU_KEY, 'CLICK')
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_specials'
-    kmi = km.keymap_items.new('wm.call_menu', 'ONE', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_vertices'
-    kmi = km.keymap_items.new('wm.call_menu', 'TWO', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_edges'
-    kmi = km.keymap_items.new('wm.call_menu', 'THREE', 'CLICK', alt=True)
-    kmi.properties.name = 'VIEW3D_MT_edit_mesh_faces'
-
-    # UV's
-    kmi = km.keymap_items.new('wm.call_menu', 'U', 'CLICK')
-    kmi.properties.name = 'VIEW3D_MT_uv_map'
-
-    # Calculate normals
-    kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'CLICK', ctrl=True)
-    kmi.properties.inside = False
-    kmi = km.keymap_items.new('mesh.normals_make_consistent', 'N', 'CLICK', shift=True, ctrl=True)
-    kmi.properties.inside = True
-
-    # Subsurf shortcuts
-    if SUBSURF_RELATIVE:
-        kmi = km.keymap_items.new('object.shift_subsurf_level', 'EQUAL', 'PRESS')
-        kmi.properties.delta = 1
-        kmi.properties.max = 4
-        kmi = km.keymap_items.new('object.shift_subsurf_level', 'MINUS', 'PRESS')
-        kmi.properties.delta = -1
-        kmi.properties.min = 0
-    else:
-        kmi = km.keymap_items.new('object.subdivision_set', 'ZERO', 'CLICK', ctrl=True)
-        kmi.properties.level = 0
-        kmi = km.keymap_items.new('object.subdivision_set', 'ONE', 'CLICK', ctrl=True)
-        kmi.properties.level = 1
-        kmi = km.keymap_items.new('object.subdivision_set', 'TWO', 'CLICK', ctrl=True)
-        kmi.properties.level = 2
-        kmi = km.keymap_items.new('object.subdivision_set', 'THREE', 'CLICK', ctrl=True)
-        kmi.properties.level = 3
-        kmi = km.keymap_items.new('object.subdivision_set', 'FOUR', 'CLICK', ctrl=True)
-        kmi.properties.level = 4
-        kmi = km.keymap_items.new('object.subdivision_set', 'FIVE', 'CLICK', ctrl=True)
-        kmi.properties.level = 5
-
-    # Rigging
-    kmi = km.keymap_items.new('object.vertex_parent_set', 'P', 'CLICK', ctrl=True)
-    kmi = km.keymap_items.new('wm.call_menu', 'H', 'CLICK', ctrl=True)
-    kmi.properties.name = 'VIEW3D_MT_hook'
-    kmi = km.keymap_items.new('wm.call_menu', 'G', 'CLICK', ctrl=True)
-    kmi.properties.name = 'VIEW3D_MT_vertex_group'
-
-
-def MapAdd_ModalStandard(kc):
-    """ Standard Modal Map
-        Super basic modal stuff that applies globally in Blender.
-    """
-    km = kc.keymaps.new('Standard Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('APPLY', 'LEFTMOUSE', 'ANY', any=True)
-    kmi = km.keymap_items.new_modal('APPLY', 'RET', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('APPLY', 'NUMPAD_ENTER', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('STEP10', 'LEFT_CTRL', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('STEP10_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
-
-
-def MapAdd_ModalTransform(kc):
-    """ Transform Modal Map
-        Keys for when the user is in a transform mode, such as grab/rotate/scale.
-    """
-    km = kc.keymaps.new('Transform Modal Map', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    # Cancel
-    kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
-
-    # Confirm
-    kmi = km.keymap_items.new_modal('CONFIRM', 'LEFTMOUSE', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('CONFIRM', 'RET', 'CLICK', any=True)
-    kmi = km.keymap_items.new_modal('CONFIRM', 'NUMPAD_ENTER', 'CLICK', any=True)
-
-    # Snapping
-    kmi = km.keymap_items.new_modal('SNAP_TOGGLE', 'TAB', 'PRESS', shift=True)
-    kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'LEFT_CTRL', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'LEFT_CTRL', 'RELEASE', any=True)
-    kmi = km.keymap_items.new_modal('SNAP_INV_ON', 'RIGHT_CTRL', 'PRESS', any=True)
-    kmi = km.keymap_items.new_modal('SNAP_INV_OFF', 'RIGHT_CTRL', 'RELEASE', any=True)
-    kmi = km.keymap_items.new_modal('ADD_SNAP', 'A', 'CLICK')
-    kmi = km.keymap_items.new_modal('REMOVE_SNAP', 'A', 'CLICK', alt=True)
-
-    # Proportional edit adjusting
-    kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'PAGE_UP', 'PRESS')
-    kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'PAGE_DOWN', 'PRESS')
-    kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_UP', 'WHEELDOWNMOUSE', 'PRESS')
-    kmi = km.keymap_items.new_modal('PROPORTIONAL_SIZE_DOWN', 'WHEELUPMOUSE', 'PRESS')
-
-    # Auto-ik adjusting
-    kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'PAGE_UP', 'PRESS', shift=True)
-    kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'PAGE_DOWN', 'PRESS', shift=True)
-    kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_UP', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new_modal('AUTOIK_CHAIN_LEN_DOWN', 'WHEELUPMOUSE', 'PRESS', shift=True)
-
-    # Constraining to axes
-    kmi = km.keymap_items.new_modal('AXIS_X', 'X', 'CLICK')
-    kmi = km.keymap_items.new_modal('AXIS_Y', 'Y', 'CLICK')
-    kmi = km.keymap_items.new_modal('AXIS_Z', 'Z', 'CLICK')
-    kmi = km.keymap_items.new_modal('PLANE_X', 'X', 'CLICK', shift=True)
-    kmi = km.keymap_items.new_modal('PLANE_Y', 'Y', 'CLICK', shift=True)
-    kmi = km.keymap_items.new_modal('PLANE_Z', 'Z', 'CLICK', shift=True)
-
-    # Overrides ("No, really, actually translate") and trackball rotate
-    kmi = km.keymap_items.new_modal('TRANSLATE', TRANSLATE_KEY, 'PRESS')
-    kmi = km.keymap_items.new_modal('ROTATE', ROTATE_KEY, 'PRESS')
-    kmi = km.keymap_items.new_modal('RESIZE', SCALE_KEY, 'PRESS')
-
-
-def MapAdd_ModalBorderSelect(kc):
-    """ Border Select Modal Map
-        Determines behavior when in border select tool.
-    """
-    km = kc.keymaps.new('Gesture Border', space_type='EMPTY', region_type='WINDOW', modal=True)
-
-    kmi = km.keymap_items.new_modal('CANCEL', 'ESC', 'PRESS', any=True)
-
-    kmi = km.keymap_items.new_modal('BEGIN', 'LEFTMOUSE', 'PRESS')
-    kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'RELEASE')
-    kmi = km.keymap_items.new_modal('SELECT', 'LEFTMOUSE', 'RELEASE', shift=True)
-    kmi = km.keymap_items.new_modal('DESELECT', 'LEFTMOUSE', 'RELEASE', ctrl=True)
-
-
-
-
-
-
-
-def MapAdd_FileBrowserGlobal(kc):
-    # Map File Browser
-    km = kc.keymaps.new('File Browser', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('file.bookmark_toggle', 'N', 'PRESS')
-    kmi = km.keymap_items.new('file.parent', 'P', 'PRESS')
-    kmi = km.keymap_items.new('file.bookmark_add', 'B', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('file.hidedot', 'H', 'PRESS')
-    kmi = km.keymap_items.new('file.previous', 'BACK_SPACE', 'PRESS')
-    kmi = km.keymap_items.new('file.next', 'BACK_SPACE', 'PRESS', shift=True)
-    kmi = km.keymap_items.new('file.directory_new', 'I', 'PRESS')
-    kmi = km.keymap_items.new('file.delete', 'X', 'PRESS')
-    kmi = km.keymap_items.new('file.delete', 'DEL', 'PRESS')
-    kmi = km.keymap_items.new('file.smoothscroll', 'TIMER1', 'ANY', any=True)
-
-def MapAdd_FileBrowserMain(kc):
-    # Map File Browser Main
-    km = kc.keymaps.new('File Browser Main', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('file.execute', 'LEFTMOUSE', 'DOUBLE_CLICK')
-    kmi.properties.need_active = True
-    kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK')
-    kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', shift=True)
-    kmi.properties.extend = True
-    kmi = km.keymap_items.new('file.select', 'LEFTMOUSE', 'CLICK', alt=True)
-    kmi.properties.extend = True
-    kmi.properties.fill = True
-    kmi = km.keymap_items.new('file.select_all_toggle', 'A', 'PRESS')
-    kmi = km.keymap_items.new('file.refresh', 'NUMPAD_PERIOD', 'PRESS')
-    kmi = km.keymap_items.new('file.select_border', 'B', 'PRESS')
-    kmi = km.keymap_items.new('file.select_border', 'EVT_TWEAK_L', 'ANY')
-    kmi = km.keymap_items.new('file.rename', 'LEFTMOUSE', 'PRESS', ctrl=True)
-    kmi = km.keymap_items.new('file.highlight', 'MOUSEMOVE', 'ANY', any=True)
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS')
-    kmi.properties.increment = 1
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', shift=True)
-    kmi.properties.increment = 10
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', ctrl=True)
-    kmi.properties.increment = 100
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS')
-    kmi.properties.increment = -1
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', shift=True)
-    kmi.properties.increment = -10
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', ctrl=True)
-    kmi.properties.increment = -100
-
-def MapAdd_FileBrowserButtons(kc):
-    # Map File Browser Buttons
-    km = kc.keymaps.new('File Browser Buttons', space_type='FILE_BROWSER', region_type='WINDOW', modal=False)
-
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS')
-    kmi.properties.increment = 1
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', shift=True)
-    kmi.properties.increment = 10
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_PLUS', 'PRESS', ctrl=True)
-    kmi.properties.increment = 100
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS')
-    kmi.properties.increment = -1
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', shift=True)
-    kmi.properties.increment = -10
-    kmi = km.keymap_items.new('file.filenum', 'NUMPAD_MINUS', 'PRESS', ctrl=True)
-    kmi.properties.increment = -100
-
-
-
-
-
-
-
-
-
-wm = bpy.context.window_manager
-kc = wm.keyconfigs.new('Blender 2012 (experimental!)')
-
-clear_keymap(kc)
-
-MapAdd_Window(kc)
-MapAdd_Screen(kc)
-
-MapAdd_View2D(kc)
-
-MapAdd_View3D_Global(kc)
-MapAdd_View3D_Object_Nonmodal(kc)
-MapAdd_View3D_ObjectMode(kc)
-MapAdd_View3D_MeshEditMode(kc)
-
-MapAdd_ModalStandard(kc)
-MapAdd_ModalTransform(kc)
-MapAdd_ModalBorderSelect(kc)
-
-MapAdd_FileBrowserGlobal(kc)
-MapAdd_FileBrowserMain(kc)
-MapAdd_FileBrowserButtons(kc)
-
-
-
-
-
-
-
-
-
-
-
diff --git a/release/scripts/addons_contrib/render_auto_save.py b/release/scripts/addons_contrib/render_auto_save.py
deleted file mode 100644
index 978faf1..0000000
--- a/release/scripts/addons_contrib/render_auto_save.py
+++ /dev/null
@@ -1,137 +0,0 @@
-#Simplified BSD License
-#
-#Copyright (c) 2012, Florian Meyer
-#tstscr at web.de
-#All rights reserved.
-#
-#Redistribution and use in source and binary forms, with or without
-#modification, are permitted provided that the following conditions are met: 
-#
-#1. Redistributions of source code must retain the above copyright notice, this
-#   list of conditions and the following disclaimer. 
-#2. Redistributions in binary form must reproduce the above copyright notice,
-#   this list of conditions and the following disclaimer in the documentation
-#   and/or other materials provided with the distribution. 
-#
-#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-#ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-#ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-#(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-#LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-#ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-#(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-#SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#################################################################
-bl_info = {
-    "name": "Auto Save Render",
-    "author": "tstscr",
-    "version": (1, 0),
-    "blender": (2, 6, 3),
-    "location": "Rendertab -> Render Panel",
-    "description": "Automatically save the image after rendering",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/Auto_Save",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=32491",
-    "category": "Render"}
-###########################################################################
-import bpy
-from bpy.props import BoolProperty, EnumProperty
-from bpy.app.handlers import persistent
-from os.path import dirname, exists, join
-from bpy.path import basename
-from os import mkdir, listdir
-from re import findall
-
-
- at persistent
-def auto_save_render(scene):
-    if not scene.save_after_render or not bpy.data.filepath:
-        return
-    rndr = scene.render
-    original_format = rndr.image_settings.file_format
-
-    format = rndr.image_settings.file_format = scene.auto_save_format
-    if format == 'OPEN_EXR_MULTILAYER': extension = '.exr'
-    if format == 'JPEG': extension = '.jpg'
-    if format == 'PNG': extension = '.png'
-    
-    blendname = basename(bpy.data.filepath).rpartition('.')[0]
-    filepath = dirname(bpy.data.filepath) + '/auto_saves'
-    
-    if not exists(filepath):
-        mkdir(filepath)
-        
-    if scene.auto_save_subfolders:
-        filepath = join(filepath, blendname)
-        if not exists(filepath):
-            mkdir(filepath)
-
-    #imagefiles starting with the blendname
-    files = [f for f in listdir(filepath) \
-            if f.startswith(blendname) \
-            and f.lower().endswith(('.png', '.jpg', '.jpeg', '.exr'))]
-    
-    highest = 0
-    if files:
-        for f in files:
-            #find last numbers in the filename after the blendname
-            suffix = findall('\d+', f.split(blendname)[-1])
-            if suffix:
-                if int(suffix[-1]) > highest:
-                    highest = int(suffix[-1])
-    
-    save_name = join(filepath, blendname) + '_' + str(highest+1).zfill(3) + extension
-
-    image = bpy.data.images['Render Result']
-    if not image:
-        print('Auto Save: Render Result not found. Image not saved')
-        return
-    
-    print('Auto_Save:', save_name)
-    image.save_render(save_name, scene=None)
-
-    rndr.image_settings.file_format = original_format
-
-###########################################################################
-def auto_save_UI(self, context):
-    layout = self.layout
-    
-    split=layout.split(percentage=0.66, align=True)
-    row = split.row()
-    row.prop(context.scene, 'save_after_render', text='Auto Save', toggle=False)
-    row.prop(context.scene, 'auto_save_subfolders', toggle=False)
-    #split=layout.split()
-    row=split.row()
-    row.prop(context.scene, 'auto_save_format', text='as', expand=False)
-    
-def register():
-    bpy.types.Scene.save_after_render = BoolProperty(
-                    name='Save after render',
-                    default=True,
-                    description='Automatically save rendered images into: //auto_save/')
-    bpy.types.Scene.auto_save_format = EnumProperty(
-                    name='Auto Save File Format',
-                    description='File Format for the auto saves.',
-                    items={
-                    ('PNG', 'png', 'Save as png'),
-                    ('JPEG', 'jpg', 'Save as jpg'),
-                    ('OPEN_EXR_MULTILAYER', 'exr', 'Save as multilayer exr')},
-                    default='PNG')
-    bpy.types.Scene.auto_save_subfolders = BoolProperty(
-                    name='subfolder',
-                    default=False,
-                    description='Save into individual subfolders per blend name')
-    bpy.app.handlers.render_post.append(auto_save_render)
-    bpy.types.RENDER_PT_render.append(auto_save_UI)
-    
-def unregister():
-    del(bpy.types.Scene.save_after_render)
-    del(bpy.types.Scene.auto_save_format)
-    del(bpy.types.Scene.auto_save_subfolders)
-    bpy.app.handlers.render_post.remove(auto_save_render)
-    bpy.types.RENDER_PT_render.remove(auto_save_UI)
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/render_clay.py b/release/scripts/addons_contrib/render_clay.py
deleted file mode 100644
index 677d1de..0000000
--- a/release/scripts/addons_contrib/render_clay.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    "name": "Clay Render",
-    "author": "Fabio Russo <ruesp83 at libero.it>",
-    "version": (1, 2),
-    "blender": (2, 5, 6),
-    "location": "Render > Clay Render",
-    "description": "This script, applies a temporary material to all objects"\
-        " of the scene.",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Clay_Render",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=22971",
-    "category": "Render"}
-
-import bpy
-from bpy.props import BoolProperty
-
-
-def Create_Mat():
-    id = bpy.data.materials.new("Clay_Render")
-    #diffuse
-    id.diffuse_shader = "OREN_NAYAR"
-    id.diffuse_color = 0.800, 0.741, 0.536
-    id.diffuse_intensity = 1
-    id.roughness = 0.909
-    #specular
-    id.specular_shader = "COOKTORR"
-    id.specular_color = 1, 1, 1
-    id.specular_hardness = 10
-    id.specular_intensity = 0.115
-
-
-def Alternative_Clay(self, msg):
-    Find = False
-    AM = None
-    i = 0
-    for mat in bpy.data.materials:
-        if (mat.Mat_Clay) and (not Find):
-            Find = True
-            AM = mat
-            i += 1
-
-        else:
-            if (mat.Mat_Clay):
-                i += 1
-
-    if msg is True:
-        if (i == 1):
-            self.report({'INFO'}, "The material \"" + AM.name + "\" is set "\
-                "as Clay!")
-        else:
-            if (i > 1):
-                self.report({'WARNING'}, "Two or more materials are set as "\
-                    "Clay. \"" + AM.name + "\" will be used!")
-
-    return AM
-
-
-def Get_Mat():
-    Mat = bpy.data.materials["Clay_Render"]
-    return Mat
-
-
-def Exist_Mat():
-    if bpy.data.materials.get("Clay_Render"):
-        return True
-
-    else:
-        return False
-
-
-class ClayPinned(bpy.types.Operator):
-    bl_idname = "render.clay_pinned"
-    bl_label = "Clay Pinned"
-    bl_description = "Clay Material Stores"
-
-    def execute(self, context):
-        if bpy.types.Scene.Clay_Pinned:
-            bpy.types.Scene.Clay_Pinned = False
-        else:
-            if bpy.types.Scene.Clay:
-                if bpy.data.materials[0].users == 0:
-                    bpy.data.materials.remove(Get_Mat())
-                    bpy.types.Scene.Clay_Pinned = True
-
-            else:
-                bpy.types.Scene.Clay_Pinned = True
-
-        return {'FINISHED'}
-
-
-class CheckClay(bpy.types.Operator):
-    bl_idname = "render.clay"
-    bl_label = "Clay Render"
-    bl_description = "Use Clay Render"
-
-    def execute(self, context):
-        if bpy.types.Scene.Clay:
-            #Clay Attivato
-            ac = Alternative_Clay(self, True)
-            if ac is None:
-                if not Exist_Mat():
-                    Create_Mat()
-                rl = context.scene.render.layers
-                rl.active.material_override = Get_Mat()
-
-            else:
-                context.scene.render.layers.active.material_override = ac
-
-            bpy.types.Scene.Clay = False
-
-        else:
-            context.scene.render.layers.active.material_override = None
-            if bpy.types.Scene.Clay_Pinned:
-                if bpy.data.materials[0].users == 0:
-                    bpy.data.materials.remove(Get_Mat())
-            bpy.types.Scene.Clay = True
-
-        return {'FINISHED'}
-
-
-def draw_clay_render(self, context):
-    ok_clay = not bpy.types.Scene.Clay
-    pin = not bpy.types.Scene.Clay_Pinned
-
-    rnl = context.scene.render.layers.active
-    split = self.layout.split()
-    col = split.column()
-
-    col.operator(CheckClay.bl_idname, emboss=False, icon='CHECKBOX_HLT'\
-        if ok_clay else 'CHECKBOX_DEHLT')
-    col = split.column()
-    if Alternative_Clay(self, False) is None:
-        if Exist_Mat():
-            if (bpy.data.materials[0].users == 0) or (ok_clay):
-                row = col.row(align=True)
-                im = Get_Mat()
-                row.prop(im, "diffuse_color", text="")
-                row.operator(ClayPinned.bl_idname, text="", icon='PINNED'\
-                    if pin else 'UNPINNED')
-
-                if ok_clay:
-                    row.active = True
-
-                else:
-                    row.active = False
-
-            else:
-                col.label('Clay Material applied to an object')
-
-    else:
-        col.label('Custom Material Clay')
-
-    self.layout.separator()
-
-
-def draw_clay_options(self, context):
-    cm = context.material
-    layout = self.layout
-    layout.prop(cm, "Mat_Clay", text="Clay")
-
-
-def draw_clay_warning(self, context):
-    if not bpy.types.Scene.Clay:
-        self.layout.label("Render Clay Enabled", "ERROR")
-
-
-def register():
-    bpy.types.Scene.Clay = BoolProperty(
-    name='Clay Render',
-    description='Use Clay Render',
-    default=False)
-
-    bpy.types.Scene.Clay_Pinned = BoolProperty(
-    name='Clay Pinned',
-    description='Clay Material Stores',
-    default=False)
-
-    bpy.types.Material.Mat_Clay = bpy.props.BoolProperty(
-        name='Use as Clay',
-        description='Use as Clay',
-        default=False)
-
-    bpy.utils.register_class(ClayPinned)
-    bpy.utils.register_class(CheckClay)
-    bpy.types.RENDER_PT_render.prepend(draw_clay_render)
-    bpy.types.MATERIAL_PT_options.append(draw_clay_options)
-    bpy.types.INFO_HT_header.append(draw_clay_warning)
-
-
-def unregister():
-    bpy.context.scene.render.layers.active.material_override = None
-    if (Exist_Mat()) and (bpy.data.materials[0].users == 0):
-        bpy.data.materials.remove(Get_Mat())
-    del bpy.types.Scene.Clay
-    del bpy.types.Scene.Clay_Pinned
-    del bpy.types.Material.Mat_Clay
-    bpy.utils.unregister_class(ClayPinned)
-    bpy.utils.unregister_class(CheckClay)
-    bpy.types.RENDER_PT_render.remove(draw_clay_render)
-    bpy.types.MATERIAL_PT_options.remove(draw_clay_options)
-    bpy.types.INFO_HT_header.remove(draw_clay_warning)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/render_time.py b/release/scripts/addons_contrib/render_time.py
deleted file mode 100644
index e7532a4..0000000
--- a/release/scripts/addons_contrib/render_time.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-
-bl_info = {
-    "name": "Render Time Estimation",
-    "author": "Jason van Gumster (Fweeb)",
-    "version": (0, 5, 1),
-    "blender": (2, 62, 1),
-    "location": "UV/Image Editor > Properties > Image",
-    "description": "Estimates the time to complete rendering on animations",
-    "warning": "Does not work on OpenGL renders",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Render/Render_Time_Estimation",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=30452&group_id=153&atid=467",
-    "category": "Render"}
-
-
-import bpy, time
-from bpy.app.handlers import persistent
-from datetime import timedelta
-import blf
-
-
-timer = {"average": 0.0, "total": 0.0, "time_start": 0.0, "is_rendering": False, "hud": False}
-
-def set_rendering(scene):
-    timer["is_rendering"] = True
-
- at persistent
-def unset_rendering(scene):
-    timer["is_rendering"] = False
-
- at persistent
-def start_timer(scene):
-    set_rendering(scene)
-
-    if scene.frame_current == scene.frame_start:
-        timer["average"] = 0.0
-        timer["total"] = 0.0
-
-    timer["time_start"] = time.time()
-
- at persistent
-def end_timer(scene):
-    render_time = time.time() - timer["time_start"]
-    timer["total"] += render_time
-    if scene.frame_current == scene.frame_start:
-        timer["average"] = render_time
-    else:
-        timer["average"] = (timer["average"] + render_time) / 2
-
-    print("Total render time: " + str(timedelta(seconds = timer["total"])))
-    print("Estimated completion: " + str(timedelta(seconds = (timer["average"] * (scene.frame_end - scene.frame_current)))))
-
-
-# UI
-
-def image_panel_rendertime(self, context):
-    scene = context.scene
-    layout = self.layout
-
-    if context.space_data.image is not None and context.space_data.image.type == 'RENDER_RESULT':
-        layout.label(text = "Total render time: " + str(timedelta(seconds = timer["total"])))
-
-        if timer["is_rendering"] and scene.frame_current != scene.frame_start:
-            layout.label(text = "Estimated completion: " + str(timedelta(seconds = (timer["average"] * (scene.frame_end - scene.frame_current)))))
-
-def draw_callback_px(self, context):
-    scene = context.scene
-
-    font_id = 0  # XXX, need to find out how best to get this.
-
-    # draw some text
-    blf.position(font_id, 15, 30, 0)
-    blf.size(font_id, 18, 72)
-    blf.enable(font_id, blf.SHADOW)
-    blf.shadow(font_id, 5, 0.0, 0.0, 0.0, 1.0)
-
-    blf.draw(font_id, "Total render time " + str(timedelta(seconds = timer["total"])))
-    if timer["is_rendering"] and scene.frame_current != scene.frame_start:
-        blf.position(font_id, 15, 12, 0)
-        blf.draw(font_id, "Estimated completion: " + str(timedelta(seconds = (timer["average"] * (scene.frame_end - scene.frame_current)))))
-
-    # restore defaults
-    blf.disable(font_id, blf.SHADOW)
-
-class RenderTimeHUD(bpy.types.Operator):
-    bl_idname = "view2d.rendertime_hud"
-    bl_label = "Display Render Times"
-    last_activity = 'NONE'
-
-    def modal(self, context, event):
-        if context.area:
-            context.area.tag_redraw()
-
-        #if event.type in {'ESC'}:
-        if timer["hud"] == False:
-            context.region.callback_remove(self._handle)
-            return {'CANCELLED'}
-
-        return {'PASS_THROUGH'}
-
-    def invoke(self, context, event):
-        if context.area.type == 'IMAGE_EDITOR':
-            if timer["hud"] == False:
-                # Add the region OpenGL drawing callback
-                self._handle = context.region.callback_add(draw_callback_px, (self, context), 'POST_PIXEL')
-                timer["hud"] = True
-
-                context.window_manager.modal_handler_add(self)
-                return {'RUNNING_MODAL'}
-            else:
-                timer["hud"] = False
-                return {'CANCELLED'}
-        else:
-            self.report({'WARNING'}, "UV/Image Editor not found, cannot run operator")
-            return {'CANCELLED'}
-
-def display_hud(self, context):
-    scene = context.scene
-    layout = self.layout
-    layout.operator("view2d.rendertime_hud")
-
-
-# Registration
-
-def register():
-    bpy.app.handlers.render_complete.append(unset_rendering)
-    bpy.app.handlers.render_cancel.append(unset_rendering)
-    bpy.app.handlers.render_pre.append(start_timer)
-    bpy.app.handlers.render_post.append(end_timer)
-    bpy.types.IMAGE_PT_image_properties.append(image_panel_rendertime)
-    bpy.utils.register_class(RenderTimeHUD)
-    bpy.types.IMAGE_HT_header.append(display_hud)
-
-    # Keymapping      XXX TODO - This doesn't work for some reason
-    #kc = bpy.context.window_manager.keyconfigs.addon
-    #km = kc.keymaps.new(name = "View 2D", space_type = 'IMAGE_EDITOR')
-    #kmi = km.keymap_items.new("view2d.rendertime_hud", 'E', 'PRESS')
-    #kmi.active = True
-
-def unregister():
-    #kc = bpy.context.window_manager.keyconfigs.addon
-    #km = kc.keymaps["View 2D"]
-    #km.keymap_items.remove(km.keymap_items["view2d.rendertime_hud"])
-
-    bpy.types.IMAGE_HT_header.remove(display_hud)
-    bpy.utils.unregister_class(RenderTimeHUD)
-    bpy.app.handlers.render_pre.remove(start_timer)
-    bpy.app.handlers.render_post.remove(end_timer)
-    bpy.app.handlers.render_cancel.remove(unset_rendering)
-    bpy.app.handlers.render_complete.remove(unset_rendering)
-    bpy.types.IMAGE_PT_image_properties.remove(image_panel_rendertime)
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/render_to_print.py b/release/scripts/addons_contrib/render_to_print.py
deleted file mode 100644
index 075e0dd..0000000
--- a/release/scripts/addons_contrib/render_to_print.py
+++ /dev/null
@@ -1,346 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-bl_info = {
-    'name': 'Render to Print',
-    'author': 'Marco Crippa <thekrypt77 at tiscali.it>, Dealga McArdle',
-    'version': (0, 2),
-    'blender': (2, 5, 8),
-    'location': 'Render > Render to Print',
-    'description': 'Set the size of the render for a print',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/'\
-        'Scripts/Render/Render to Print',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-        'func=detail&aid=24219',
-    'category': 'Render'}
-
-
-import math
-import bpy
-from bpy.types import Panel, Operator, Scene, PropertyGroup
-from bpy.props import (IntProperty,
-                       FloatProperty,
-                       StringProperty,
-                       EnumProperty,
-                       PointerProperty,
-                       )
-
-
-paper_presets = (
-    ("custom_1_1", "custom", ""),
-    ("A0_84.1_118.9", "A0 (84.1x118.9 cm)", ""),
-    ("A1_59.4_84.1", "A1 (59.4x84.1 cm)", ""),
-    ("A2_42.0_59.4", "A2 (42.0x59.4 cm)", ""),
-    ("A3_29.7_42.0", "A3 (29.7 42.0 cm)", ""),
-    ("A4_21.0_29.7", "A4 (21.0x29.7 cm)", ""),
-    ("A5_14.8_21.0", "A5 (14.8x21.0 cm)", ""),
-    ("A6_10.5_14.8", "A6 (10.5x14.8 cm)", ""),
-    ("A7_7.4_10.5", "A7 (7.4x10.5 cm)", ""),
-    ("A8_5.2_7.4", "A8 (5.2x7.4 cm)", ""),
-    ("A9_3.7_5.2", "A9 (3.7x5.2 cm)", ""),
-    ("A10_2.6_3.7", "A10 (2.6x3.7 cm)", ""),
-
-    ("B0_100.0_141.4", "B0 (100.0x141.4 cm)", ""),
-    ("B1_70.7_100.0", "B1 (70.7x100.0 cm)", ""),
-    ("B2_50.0_70.7", "B2 (50.0x70.7 cm)", ""),
-    ("B3_35.3_50.0", "B3 (35.3x50.0 cm)", ""),
-    ("B4_25.0_35.3", "B4 (25.0x35.3 cm)", ""),
-    ("B5_17.6_25.0", "B5 (17.6x25.0 cm)", ""),
-    ("B6_12.5_17.6", "B6 (12.5x17.6 cm)", ""),
-    ("B7_8.8_12.5", "B7 (8.8x12.5 cm)", ""),
-    ("B8_6.2_8.8", "B8 (6.2x8.8 cm)", ""),
-    ("B9_4.4_6.2", "B9 (4.4x6.2 cm)", ""),
-    ("B10_3.1_4.4", "B10 (3.1x4.4 cm)", ""),
-
-    ("C0_91.7_129.7", "C0 (91.7x129.7 cm)", ""),
-    ("C1_64.8_91.7", "C1 (64.8x91.7 cm)", ""),
-    ("C2_45.8_64.8", "C2 (45.8x64.8 cm)", ""),
-    ("C3_32.4_45.8", "C3 (32.4x45.8 cm)", ""),
-    ("C4_22.9_32.4", "C4 (22.9x32.4 cm)", ""),
-    ("C5_16.2_22.9", "C5 (16.2x22.9 cm)", ""),
-    ("C6_11.4_16.2", "C6 (11.4x16.2 cm)", ""),
-    ("C7_8.1_11.4", "C7 (8.1x11.4 cm)", ""),
-    ("C8_5.7_8.1", "C8 (5.7x8.1 cm)", ""),
-    ("C9_4.0_5.7", "C9 (4.0x5.7 cm)", ""),
-    ("C10_2.8_4.0", "C10 (2.8x4.0 cm)", ""),
-
-    ("Letter_21.6_27.9", "Letter (21.6x27.9 cm)", ""),
-    ("Legal_21.6_35.6", "Legal (21.6x35.6 cm)", ""),
-    ("Legal junior_20.3_12.7", "Legal junior (20.3x12.7 cm)", ""),
-    ("Ledger_43.2_27.9", "Ledger (43.2x27.9 cm)", ""),
-    ("Tabloid_27.9_43.2", "Tabloid (27.9x43.2 cm)", ""),
-
-    ("ANSI C_43.2_55.9", "ANSI C (43.2x55.9 cm)", ""),
-    ("ANSI D_55.9_86.4", "ANSI D (55.9x86.4 cm)", ""),
-    ("ANSI E_86.4_111.8", "ANSI E (86.4x111.8 cm)", ""),
-
-    ("Arch A_22.9_30.5", "Arch A (22.9x30.5 cm)", ""),
-    ("Arch B_30.5_45.7", "Arch B (30.5x45.7 cm)", ""),
-    ("Arch C_45.7_61.0", "Arch C (45.7x61.0 cm)", ""),
-    ("Arch D_61.0_91.4", "Arch D (61.0x91.4 cm)", ""),
-    ("Arch E_91.4_121.9", "Arch E (91.4x121.9 cm)", ""),
-    ("Arch E1_76.2_106.7", "Arch E1 (76.2x106.7 cm)", ""),
-    ("Arch E2_66.0_96.5", "Arch E2 (66.0x96.5 cm)", ""),
-    ("Arch E3_68.6_99.1", "Arch E3 (68.6x99.1 cm)", ""),
-    )
-
-
-def paper_enum_parse(idname):
-    tipo, dim_w, dim_h = idname.split("_")
-    return tipo, float(dim_w), float(dim_h)
-
-
-paper_presets_data = {idname: paper_enum_parse(idname)
-                      for idname, name, descr in paper_presets}
-
-
-def update_settings_cb(self, context):
-    # annoying workaround for recursive call
-    if update_settings_cb.level is False:
-        update_settings_cb.level = True
-        pixels_from_print(self)
-        update_settings_cb.level = False
-
-update_settings_cb.level = False
-
-
-class RenderPrintSertings(PropertyGroup):
-    unit_from = EnumProperty(
-            name="Set from",
-            description="Set from",
-            items=(
-                ("CM_TO_PIXELS", "CM -> Pixel", "Centermeters to Pixels"),
-                ("PIXELS_TO_CM", "Pixel -> CM", "Pixels to Centermeters")
-                ),
-            default="CM_TO_PIXELS",
-            )
-    orientation = EnumProperty(
-            name="Page Orientation",
-            description="Set orientation",
-            items=(
-                ("Portrait", "Portrait", "Portrait"),
-                ("Landscape", "Landscape", "Landscape")
-            ),
-            default="Portrait",
-            update=update_settings_cb,
-            )
-    preset = EnumProperty(
-            name="Select Preset",
-            description="Select from preset",
-            items=paper_presets,
-            default="custom_1_1",
-            update=update_settings_cb,
-            )
-    dpi = IntProperty(
-            name="DPI",
-            description="Dots per Inch",
-            default=300,
-            min=72, max=1800,
-            update=update_settings_cb,
-            )
-    width_cm = FloatProperty(
-            name="Width",
-            description="Width in CM",
-            default=5.0,
-            min=1.0, max=100000.0,
-            update=update_settings_cb,
-            )
-    height_cm = FloatProperty(
-            name="Height",
-            description="Height in CM",
-            default=3.0,
-            min=1.0, max=100000.0,
-            update=update_settings_cb,
-            )
-    width_px = IntProperty(
-            name="Pixel Width",
-            description="Pixel Width",
-            default=900,
-            min=4, max=10000,
-            update=update_settings_cb,
-            )
-    height_px = IntProperty(
-            name="Pixel Height",
-            description="Pixel Height",
-            default=600,
-            min=4, max=10000,
-            update=update_settings_cb,
-            )
-
-
-def pixels_from_print(ps):
-    tipo, dim_w, dim_h = paper_presets_data[ps.preset]
-
-    if ps.unit_from == "CM_TO_PIXELS":
-        if tipo == "custom":
-            dim_w = ps.width_cm
-            dim_h = ps.height_cm
-            ps.width_cm = dim_w
-            ps.height_cm = dim_h
-        elif tipo != "custom" and ps.orientation == "Landscape":
-            ps.width_cm = dim_h
-            ps.height_cm = dim_w
-        elif tipo != "custom" and ps.orientation == "Portrait":
-            ps.width_cm = dim_w
-            ps.height_cm = dim_h
-
-        ps.width_px = math.ceil((ps.width_cm * ps.dpi) / 2.54)
-        ps.height_px = math.ceil((ps.height_cm * ps.dpi) / 2.54)
-    else:
-        if tipo != "custom" and ps.orientation == "Landscape":
-            ps.width_cm = dim_h
-            ps.height_cm = dim_w
-            ps.width_px = math.ceil((ps.width_cm * ps.dpi) / 2.54)
-            ps.height_px = math.ceil((ps.height_cm * ps.dpi) / 2.54)
-        elif tipo != "custom" and ps.orientation == "Portrait":
-            ps.width_cm = dim_w
-            ps.height_cm = dim_h
-            ps.width_px = math.ceil((ps.width_cm * ps.dpi) / 2.54)
-            ps.height_px = math.ceil((ps.height_cm * ps.dpi) / 2.54)
-
-        ps.width_cm = (ps.width_px / ps.dpi) * 2.54
-        ps.height_cm = (ps.height_px / ps.dpi) * 2.54
-
-
-class RENDER_PT_print(Panel):
-    bl_label = "Render to Print"
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = 'render'
-
-    def draw(self, context):
-
-        layout = self.layout
-        scene = context.scene
-        ps = scene.print_settings
-
-        row = layout.row(align=True)
-        row1 = layout.row(align=True)
-        row2 = layout.row(align=True)
-        row3 = layout.row(align=True)
-        row4 = layout.row(align=True)
-        row5 = layout.row(align=True)
-        row6 = layout.row(align=True)
-        row7 = layout.row(align=True)
-        col = layout.column(align=True)
-
-        row.prop(ps, "unit_from")
-        row1.prop(ps, "orientation")
-        row2.prop(ps, "preset")
-
-        col.separator()
-        row3.prop(ps, "width_cm")
-        row3.separator()
-        row3.prop(ps, "height_cm")
-        col.separator()
-        row4.prop(ps, "dpi")
-        col.separator()
-        row5.prop(ps, "width_px")
-        row5.separator()
-        row5.prop(ps, "height_px")
-
-        col.separator()
-        row6.label("Inch Width: %.2f" % (ps.width_cm / 2.54))
-        row6.label("Inch Height: %.2f" % (ps.height_cm / 2.54))
-        col.separator()
-
-        row7.operator("render.apply_size", icon="RENDER_STILL")
-
-        #  this if else deals with hiding UI elements when logic demands it.
-        tipo = paper_presets_data[ps.preset][0]
-
-        if tipo != "custom":
-            row.active = False
-            row.enabled = False
-
-        if ps.unit_from == "CM_TO_PIXELS":
-            row5.active = False
-            row5.enabled = False
-
-            if tipo == "custom":
-                row3.active = True
-                row3.enabled = True
-                row1.active = False
-                row1.enabled = False
-            elif tipo != "custom" and ps.orientation == "Landscape":
-                row3.active = False
-                row3.enabled = False
-                row1.active = True
-                row1.enabled = True
-            elif tipo != "custom" and ps.orientation == "Portrait":
-                row3.active = False
-                row3.enabled = False
-                row1.active = True
-                row1.enabled = True
-        else:
-            row3.active = False
-            row3.enabled = False
-
-            if tipo == "custom":
-                row1.active = False
-                row1.enabled = False
-            elif tipo != "custom" and ps.orientation == "Landscape":
-                row1.active = True
-                row1.enabled = True
-                row5.active = False
-                row5.enabled = False
-            elif tipo != "custom" and ps.orientation == "Portrait":
-                row1.active = True
-                row1.enabled = True
-                row5.active = False
-                row5.enabled = False
-
-
-class RENDER_OT_apply_size(Operator):
-    bl_idname = "render.apply_size"
-    bl_label = "Apply Print to Render"
-    bl_description = "Set the render dimension"
-
-    def execute(self, context):
-
-        scene = context.scene
-        ps = scene.print_settings
-
-        pixels_from_print(ps)
-
-        render = scene.render
-        render.resolution_x = ps.width_px
-        render.resolution_y = ps.height_px
-
-        return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_class(RENDER_OT_apply_size)
-    bpy.utils.register_class(RENDER_PT_print)
-    bpy.utils.register_class(RenderPrintSertings)
-
-    Scene.print_settings = PointerProperty(type=RenderPrintSertings)
-
-
-def unregister():
-    bpy.utils.unregister_class(RENDER_OT_apply_size)
-    bpy.utils.unregister_class(RENDER_PT_print)
-    bpy.utils.unregister_class(RenderPrintSertings)
-    del Scene.print_settings
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/__init__.py b/release/scripts/addons_contrib/sequencer_extra_actions/__init__.py
deleted file mode 100644
index dcb5c71..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/__init__.py
+++ /dev/null
@@ -1,94 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': 'Extra Sequencer Actions',
-    'author': 'Turi Scandurra, Carlos Padial',
-    'version': (3, 4),
-    'blender': (2, 6, 3, 17),
-    'api': 49500,
-    'category': 'Sequencer',
-    'location': 'Sequencer',
-    'description': 'Collection of extra operators to manipulate VSE strips',
-    'wiki_url': 'http://wiki.blender.org/index.php/'
-    'Extensions:2.6/Py/Scripts/Sequencer/Extra_Sequencer_Actions',
-    'tracker_url': 'http://projects.blender.org/tracker/index.php?func=detail'\
-        '&aid=30474',
-    'support': 'COMMUNITY'}
-
-if "bpy" in locals():
-    import imp
-    imp.reload(operators_extra_actions)
-    imp.reload(ui)
-    imp.reload(operators_recursive)
-else:
-    from . import operators_extra_actions
-    from . import ui
-    from . import operators_recursive
-
-import bpy
-import os.path
-from bpy.types import Menu
-from bpy.types import Header
-
-
-# Registration
-def register():
-    bpy.utils.register_module(__name__)
-
-    # Append menu entries
-    bpy.types.SEQUENCER_MT_select.prepend(ui.sequencer_select_menu_func)
-    bpy.types.SEQUENCER_MT_strip.prepend(ui.sequencer_strip_menu_func)
-    bpy.types.SEQUENCER_HT_header.append(ui.sequencer_header_func)
-    bpy.types.CLIP_HT_header.append(ui.clip_header_func)
-    bpy.types.CLIP_MT_clip.prepend(ui.clip_clip_menu_func)
-    bpy.types.TIME_MT_frame.prepend(ui.time_frame_menu_func)
-    bpy.types.TIME_HT_header.append(ui.time_header_func)
-
-    # Add keyboard shortcut configuration
-    kc = bpy.context.window_manager.keyconfigs.addon
-    km = kc.keymaps.new(name='Frames')
-    kmi = km.keymap_items.new('screenextra.frame_skip',
-    'RIGHT_ARROW', 'PRESS', ctrl=True, shift=True)
-    kmi.properties.back = False
-    kmi = km.keymap_items.new('screenextra.frame_skip',
-    'LEFT_ARROW', 'PRESS', ctrl=True, shift=True)
-    kmi.properties.back = True
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    #  Remove menu entries
-    bpy.types.SEQUENCER_MT_select.remove(ui.sequencer_select_menu_func)
-    bpy.types.SEQUENCER_MT_strip.remove(ui.sequencer_strip_menu_func)
-    bpy.types.SEQUENCER_HT_header.remove(ui.sequencer_header_func)
-    bpy.types.CLIP_HT_header.remove(ui.clip_header_func)
-    bpy.types.CLIP_MT_clip.remove(ui.clip_clip_menu_func)
-    bpy.types.TIME_MT_frame.remove(ui.time_frame_menu_func)
-    bpy.types.TIME_HT_header.remove(ui.time_header_func)
-
-    #  Remove keyboard shortcut configuration
-    kc = bpy.context.window_manager.keyconfigs.addon
-    km = kc.keymaps['Frames']
-    km.keymap_items.remove(km.keymap_items['screenextra.frame_skip'])
-    km.keymap_items.remove(km.keymap_items['screenextra.frame_skip'])
-
-
-if __name__ == '__main__':
-    register()
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/exiftool.py b/release/scripts/addons_contrib/sequencer_extra_actions/exiftool.py
deleted file mode 100644
index 4ce6cd1..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/exiftool.py
+++ /dev/null
@@ -1,327 +0,0 @@
-# -*- coding: utf-8 -*-
-# PyExifTool <http://github.com/smarnach/pyexiftool>
-# Copyright 2012 Sven Marnach
-
-# This file is part of PyExifTool.
-#
-# PyExifTool is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# PyExifTool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with PyExifTool.  If not, see <http://www.gnu.org/licenses/>.
-
-"""
-PyExifTool is a Python library to communicate with an instance of Phil
-Harvey's excellent ExifTool_ command-line application.  The library
-provides the class :py:class:`ExifTool` that runs the command-line
-tool in batch mode and features methods to send commands to that
-program, including methods to extract meta-information from one or
-more image files.  Since ``exiftool`` is run in batch mode, only a
-single instance needs to be launched and can be reused for many
-queries.  This is much more efficient than launching a separate
-process for every single query.
-
-.. _ExifTool: http://www.sno.phy.queensu.ca/~phil/exiftool/
-
-The source code can be checked out from the github repository with
-
-::
-
-    git clone git://github.com/smarnach/pyexiftool.git
-
-Alternatively, you can download a tarball_.  There haven't been any
-releases yet.
-
-.. _tarball: https://github.com/smarnach/pyexiftool/tarball/master
-
-PyExifTool is licenced under GNU GPL version 3 or later.
-
-Example usage::
-
-    import exiftool
-
-    files = ["a.jpg", "b.png", "c.tif"]
-    with exiftool.ExifTool() as et:
-        metadata = et.get_metadata_batch(files)
-    for d in metadata:
-        print("{:20.20} {:20.20}".format(d["SourceFile"],
-                                         d["EXIF:DateTimeOriginal"]))
-"""
-
-from __future__ import unicode_literals
-
-import sys
-import subprocess
-import os
-import json
-import warnings
-import codecs
-
-try:        # Py3k compatibility
-    basestring
-except NameError:
-    basestring = (bytes, str)
-
-executable = "exiftool"
-"""The name of the executable to run.
-
-If the executable is not located in one of the paths listed in the
-``PATH`` environment variable, the full path should be given here.
-"""
-
-# Sentinel indicating the end of the output of a sequence of commands.
-# The standard value should be fine.
-sentinel = b"{ready}"
-
-# The block size when reading from exiftool.  The standard value
-# should be fine, though other values might give better performance in
-# some cases.
-block_size = 4096
-
-# This code has been adapted from Lib/os.py in the Python source tree
-# (sha1 265e36e277f3)
-def _fscodec():
-    encoding = sys.getfilesystemencoding()
-    errors = "strict"
-    if encoding != "mbcs":
-        try:
-            codecs.lookup_error("surrogateescape")
-        except LookupError:
-            pass
-        else:
-            errors = "surrogateescape"
-
-    def fsencode(filename):
-        """
-        Encode filename to the filesystem encoding with 'surrogateescape' error
-        handler, return bytes unchanged. On Windows, use 'strict' error handler if
-        the file system encoding is 'mbcs' (which is the default encoding).
-        """
-        if isinstance(filename, bytes):
-            return filename
-        else:
-            return filename.encode(encoding, errors)
-
-    return fsencode
-
-fsencode = _fscodec()
-del _fscodec
-
-class ExifTool(object):
-    """Run the `exiftool` command-line tool and communicate to it.
-
-    You can pass the file name of the ``exiftool`` executable as an
-    argument to the constructor.  The default value ``exiftool`` will
-    only work if the executable is in your ``PATH``.
-
-    Most methods of this class are only available after calling
-    :py:meth:`start()`, which will actually launch the subprocess.  To
-    avoid leaving the subprocess running, make sure to call
-    :py:meth:`terminate()` method when finished using the instance.
-    This method will also be implicitly called when the instance is
-    garbage collected, but there are circumstance when this won't ever
-    happen, so you should not rely on the implicit process
-    termination.  Subprocesses won't be automatically terminated if
-    the parent process exits, so a leaked subprocess will stay around
-    until manually killed.
-
-    A convenient way to make sure that the subprocess is terminated is
-    to use the :py:class:`ExifTool` instance as a context manager::
-
-        with ExifTool() as et:
-            ...
-
-    .. warning:: Note that there is no error handling.  Nonsensical
-       options will be silently ignored by exiftool, so there's not
-       much that can be done in that regard.  You should avoid passing
-       non-existent files to any of the methods, since this will lead
-       to undefied behaviour.
-
-    .. py:attribute:: running
-
-       A Boolean value indicating whether this instance is currently
-       associated with a running subprocess.
-    """
-
-    def __init__(self, executable_=None):
-        if executable_ is None:
-            self.executable = executable
-        else:
-            self.executable = executable_
-        self.running = False
-
-    def start(self):
-        """Start an ``exiftool`` process in batch mode for this instance.
-
-        This method will issue a ``UserWarning`` if the subprocess is
-        already running.  The process is started with the ``-G`` and
-        ``-n`` as common arguments, which are automatically included
-        in every command you run with :py:meth:`execute()`.
-        """
-        if self.running:
-            warnings.warn("ExifTool already running; doing nothing.")
-            return
-        with open(os.devnull, "w") as devnull:
-            self._process = subprocess.Popen(
-                [self.executable, "-stay_open", "True",  "-@", "-",
-                 "-common_args", "-G", "-u", "-a", "-n"],
-                stdin=subprocess.PIPE, stdout=subprocess.PIPE,
-                stderr=devnull)
-        self.running = True
-
-    def terminate(self):
-        """Terminate the ``exiftool`` process of this instance.
-
-        If the subprocess isn't running, this method will do nothing.
-        """
-        if not self.running:
-            return
-        self._process.stdin.write(b"-stay_open\nFalse\n")
-        self._process.stdin.flush()
-        self._process.communicate()
-        del self._process
-        self.running = False
-
-    def __enter__(self):
-        self.start()
-        return self
-
-    def __exit__(self, exc_type, exc_val, exc_tb):
-        self.terminate()
-
-    def __del__(self):
-        self.terminate()
-
-    def execute(self, *params):
-        """Execute the given batch of parameters with ``exiftool``.
-
-        This method accepts any number of parameters and sends them to
-        the attached ``exiftool`` process.  The process must be
-        running, otherwise ``ValueError`` is raised.  The final
-        ``-execute`` necessary to actually run the batch is appended
-        automatically; see the documentation of :py:meth:`start()` for
-        the common options.  The ``exiftool`` output is read up to the
-        end-of-output sentinel and returned as a raw ``bytes`` object,
-        excluding the sentinel.
-
-        The parameters must also be raw ``bytes``, in whatever
-        encoding exiftool accepts.  For filenames, this should be the
-        system's filesystem encoding.
-
-        .. note:: This is considered a low-level method, and should
-           rarely be needed by application developers.
-        """
-        if not self.running:
-            raise ValueError("ExifTool instance not running.")
-        self._process.stdin.write(b"\n".join(params + (b"-execute\n",)))
-        self._process.stdin.flush()
-        output = b""
-        fd = self._process.stdout.fileno()
-        while not output[-32:].strip().endswith(sentinel):
-            output += os.read(fd, block_size)
-        return output.strip()[:-len(sentinel)]
-
-    def execute_json(self, *params):
-        """Execute the given batch of parameters and parse the JSON output.
-
-        This method is similar to :py:meth:`execute()`.  It
-        automatically adds the parameter ``-j`` to request JSON output
-        from ``exiftool`` and parses the output.  The return value is
-        a list of dictionaries, mapping tag names to the corresponding
-        values.  All keys are Unicode strings with the tag names
-        including the ExifTool group name in the format <group>:<tag>.
-        The values can have multiple types.  All strings occurring as
-        values will be Unicode strings.  Each dictionary contains the
-        name of the file it corresponds to in the key ``"SourceFile"``.
-
-        The parameters to this function must be either raw strings
-        (type ``str`` in Python 2.x, type ``bytes`` in Python 3.x) or
-        Unicode strings (type ``unicode`` in Python 2.x, type ``str``
-        in Python 3.x).  Unicode strings will be encoded using
-        system's filesystem encoding.  This behaviour means you can
-        pass in filenames according to the convention of the
-        respective Python version – as raw strings in Python 2.x and
-        as Unicode strings in Python 3.x.
-        """
-        params = map(fsencode, params)
-        return json.loads(self.execute(b"-j", *params).decode("utf-8"))
-
-    def get_metadata_batch(self, filenames):
-        """Return all meta-data for the given files.
-
-        The return value will have the format described in the
-        documentation of :py:meth:`execute_json()`.
-        """
-        return self.execute_json(*filenames)
-
-    def get_metadata(self, filename):
-        """Return meta-data for a single file.
-
-        The returned dictionary has the format described in the
-        documentation of :py:meth:`execute_json()`.
-        """
-        return self.execute_json(filename)[0]
-
-    def get_tags_batch(self, tags, filenames):
-        """Return only specified tags for the given files.
-
-        The first argument is an iterable of tags.  The tag names may
-        include group names, as usual in the format <group>:<tag>.
-
-        The second argument is an iterable of file names.
-
-        The format of the return value is the same as for
-        :py:meth:`execute_json()`.
-        """
-        # Explicitly ruling out strings here because passing in a
-        # string would lead to strange and hard-to-find errors
-        if isinstance(tags, basestring):
-            raise TypeError("The argument 'tags' must be "
-                            "an iterable of strings")
-        if isinstance(filenames, basestring):
-            raise TypeError("The argument 'filenames' must be "
-                            "an iterable of strings")
-        params = ["-" + t for t in tags]
-        params.extend(filenames)
-        return self.execute_json(*params)
-
-    def get_tags(self, tags, filename):
-        """Return only specified tags for a single file.
-
-        The returned dictionary has the format described in the
-        documentation of :py:meth:`execute_json()`.
-        """
-        return self.get_tags_batch(tags, [filename])[0]
-
-    def get_tag_batch(self, tag, filenames):
-        """Extract a single tag from the given files.
-
-        The first argument is a single tag name, as usual in the
-        format <group>:<tag>.
-
-        The second argument is an iterable of file names.
-
-        The return value is a list of tag values or ``None`` for
-        non-existent tags, in the same order as ``filenames``.
-        """
-        data = self.get_tags_batch([tag], filenames)
-        result = []
-        for d in data:
-            d.pop("SourceFile")
-            result.append(next(iter(d.values()), None))
-        return result
-
-    def get_tag(self, tag, filename):
-        """Extract a single tag from a single file.
-
-        The return value is the value of the specified tag, or
-        ``None`` if this tag was not found in the file.
-        """
-        return self.get_tag_batch(tag, [filename])[0]
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/functions.py b/release/scripts/addons_contrib/sequencer_extra_actions/functions.py
deleted file mode 100644
index 34e7ccb..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/functions.py
+++ /dev/null
@@ -1,192 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-import os.path
-import operator
-
-from bpy.props import IntProperty
-from bpy.props import FloatProperty
-from bpy.props import EnumProperty
-from bpy.props import BoolProperty
-from bpy.props import StringProperty
-
-
-imb_ext_image = [
-    # IMG
-    ".png", ".tga", ".bmp", ".jpg", ".jpeg", ".sgi", ".rgb",
-    ".rgba", ".tif", ".tiff", ".tx", ".jp2", ".hdr", ".dds",
-    ".dpx", ".cin", ".exr", ".rw2",
-    # IMG QT
-    ".gif", ".psd", ".pct", ".pict", ".pntg", ".qtif"]  
-
-
-imb_ext_movie = [
-    ".avi", ".flc", ".mov", ".movie", ".mp4", ".m4v", ".m2v",
-    ".m2t", ".m2ts", ".mts", ".mv", ".avs", ".wmv", ".ogv",
-    ".dv", ".mpeg", ".mpg", ".mpg2", ".vob", ".mkv", ".flv",
-    ".divx", ".xvid", ".mxf",
-    ]    
-  
-
-# Functions
-
-def add_marker(text):
-    scene = bpy.context.scene
-    markers = scene.timeline_markers
-    mark = markers.new(name=text)
-    mark.frame = scene.frame_current
-
-
-def act_strip(context):
-    try:
-        return context.scene.sequence_editor.active_strip
-    except AttributeError:
-        return None
-
-
-def detect_strip_type(filepath):
-    imb_ext_image = [
-    # IMG
-    ".png", ".tga", ".bmp", ".jpg", ".jpeg", ".sgi", ".rgb",
-    ".rgba", ".tif", ".tiff", ".tx", ".jp2", ".hdr", ".dds",
-    ".dpx", ".cin", ".exr",
-    # IMG QT
-    ".gif", ".psd", ".pct", ".pict", ".pntg", ".qtif"]
-
-    imb_ext_movie = [
-    ".avi", ".flc", ".mov", ".movie", ".mp4", ".m4v", ".m2v",
-    ".m2t", ".m2ts", ".mts", ".mv", ".avs", ".wmv", ".ogv",
-    ".dv", ".mpeg", ".mpg", ".mpg2", ".vob", ".mkv", ".flv",
-    ".divx", ".xvid", ".mxf",
-    ]
-
-    imb_ext_audio = [
-    ".wav", ".ogg", ".oga", ".mp3", ".mp2", ".ac3", ".aac",
-    ".flac", ".wma", ".eac3", ".aif", ".aiff", ".m4a"]
-
-    extension = os.path.splitext(filepath)[1]
-    extension = extension.lower()
-    if extension in imb_ext_image:
-        type = 'IMAGE'
-    elif extension in imb_ext_movie:
-        type = 'MOVIE'
-    elif extension in imb_ext_audio:
-        type = 'SOUND'
-    else:
-        type = None
-
-    return type
-
-
-def getpathfrombrowser():
-    '''
-    returns path from filebrowser
-    '''
-    scn = bpy.context.scene
-    for a in bpy.context.window.screen.areas:
-        if a.type == 'FILE_BROWSER':
-            params = a.spaces[0].params
-            break
-    try:
-        params
-    except UnboundLocalError:
-        #print("no browser")
-        self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-        return {'CANCELLED'}
-    path = params.directory
-    return path
-
-
-def getfilepathfrombrowser():
-    '''
-    returns path and file from filebrowser
-    '''
-    scn = bpy.context.scene
-    for a in bpy.context.window.screen.areas:
-        if a.type == 'FILE_BROWSER':
-            params = a.spaces[0].params
-            break
-    try:
-        params
-    except UnboundLocalError:
-        #print("no browser")
-        self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-        return {'CANCELLED'}
-
-    if params.filename == '':
-        #print("no file selected")
-        self.report({'ERROR_INVALID_INPUT'}, 'No file selected')
-        return {'CANCELLED'}
-    path = params.directory
-    filename = params.filename
-    return path, filename
-
-
-def setpathinbrowser(path, file):
-    '''
-    set path and file in the filebrowser
-    '''
-    scn = bpy.context.scene
-    for a in bpy.context.window.screen.areas:
-        if a.type == 'FILE_BROWSER':
-            params = a.spaces[0].params
-            break
-    try:
-        params
-    except UnboundLocalError:
-        #print("no browser")
-        self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-        return {'CANCELLED'}
-
-    params.directory = path
-    params.filename = file
-    return path, params
-
-
-def sortlist(filelist):
-    '''
-    given a list of tuplas (path, filename) returns a list sorted by filename
-    '''
-    filelist_sorted = sorted(filelist, key=operator.itemgetter(1))
-    return filelist_sorted
-
-
-#------------ jump to cut functions...
-
-
-def triminout(strip,sin,sout):
-    start = strip.frame_start+strip.frame_offset_start 
-    end = start+strip.frame_final_duration
-    if end > sin:
-        if start < sin:
-            strip.select_right_handle = False            
-            strip.select_left_handle = True
-            bpy.ops.sequencer.snap(frame=sin)
-            strip.select_left_handle = False
-    if start < sout:
-        if end > sout:
-            strip.select_left_handle = False            
-            strip.select_right_handle = True
-            bpy.ops.sequencer.snap(frame=sout)
-            strip.select_right_handle = False    
-    return {'FINISHED'}
-
-
-
-
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/operators_extra_actions.py b/release/scripts/addons_contrib/sequencer_extra_actions/operators_extra_actions.py
deleted file mode 100644
index 19bfaef..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/operators_extra_actions.py
+++ /dev/null
@@ -1,1662 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-'''
-TODO
-align strip to the left (shift-s + -lenght)
-
-'''
-
-import random, math
-
-
-import bpy
-import os.path
-from bpy.props import IntProperty
-from bpy.props import FloatProperty
-from bpy.props import EnumProperty
-from bpy.props import BoolProperty
-from bpy.props import StringProperty
-
-from . import functions
-from . import functions
-from . import exiftool
-
-
-# Initialization
-def initSceneProperties(scn):
-    try:
-        if bpy.context.scene.scene_initialized == True:
-            return False
-    except AttributeError:
-        pass
-
-    bpy.types.Scene.default_slide_offset = IntProperty(
-    name='Offset',
-    description='Number of frames to slide',
-    min=-250, max=250,
-    default=0)
-    scn.default_slide_offset = 0
-
-    bpy.types.Scene.default_fade_duration = IntProperty(
-    name='Duration',
-    description='Number of frames to fade',
-    min=1, max=250,
-    default=scn.render.fps)
-    scn.default_fade_duration = scn.render.fps
-
-    bpy.types.Scene.default_fade_amount = FloatProperty(
-        name='Amount',
-        description='Maximum value of fade',
-        min=0.0,
-        max=100.0,
-        default=1.0)
-    scn.default_fade_amount = 1.0
-
-    bpy.types.Scene.default_distribute_offset = IntProperty(
-        name='Offset',
-        description='Number of frames between strip start frames',
-        min=1,
-        max=250,
-        default=2)
-    scn.default_distribute_offset = 2
-
-    bpy.types.Scene.default_distribute_reverse = BoolProperty(
-        name='Reverse Order',
-        description='Reverse the order of selected strips',
-        default=False)
-    scn.default_distribute_reverse = False
-
-    bpy.types.Scene.default_proxy_suffix = StringProperty(
-        name='default proxy suffix',
-        description='default proxy filename suffix',
-        default="-25")
-    scn.default_proxy_suffix = "-25"
-
-    bpy.types.Scene.default_proxy_extension = StringProperty(
-        name='default proxy extension',
-        description='default proxy file extension',
-        default=".mkv")
-    scn.default_proxy_extension = ".mkv"
-
-    bpy.types.Scene.default_proxy_path = StringProperty(
-        name='default proxy path',
-        description='default proxy file path (relative to original file)',
-        default="")
-    scn.default_proxy_path = ""
-
-    bpy.types.Scene.default_build_25 = BoolProperty(
-        name='default_build_25',
-        description='default build_25',
-        default=True)
-    scn.default_build_25 = True
-
-    bpy.types.Scene.default_build_50 = BoolProperty(
-        name='default_build_50',
-        description='default build_50',
-        default=False)
-    scn.default_build_50 = False
-
-    bpy.types.Scene.default_build_75 = BoolProperty(
-        name='default_build_75',
-        description='default build_75',
-        default=False)
-    scn.default_build_75 = False
-
-    bpy.types.Scene.default_build_100 = BoolProperty(
-        name='default_build_100',
-        description='default build_100',
-        default=False)
-    scn.default_build_100 = False
-
-    bpy.types.Scene.scene_initialized = BoolProperty(
-        name='Init',
-        default=False)
-    scn.scene_initialized = True
-
-    return True
-
-
-# TRIM TIMELINE
-class Sequencer_Extra_TrimTimeline(bpy.types.Operator):
-    bl_label = 'Trim to Timeline Content'
-    bl_idname = 'timeextra.trimtimeline'
-    bl_description = 'Automatically set start and end frames'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-
-        frame_start = 300000
-        frame_end = -300000
-        for i in seq.sequences:
-            try:
-                if i.frame_final_start < frame_start:
-                    frame_start = i.frame_final_start
-                if i.frame_final_end > frame_end:
-                    frame_end = i.frame_final_end - 1
-            except AttributeError:
-                    pass
-
-        if frame_start != 300000:
-            scn.frame_start = frame_start
-        if frame_end != -300000:
-            scn.frame_end = frame_end
-        return {'FINISHED'}
-
-
-# TRIM TIMELINE TO SELECTION
-class Sequencer_Extra_TrimTimelineToSelection(bpy.types.Operator):
-    bl_label = 'Trim to Selection'
-    bl_idname = 'timeextra.trimtimelinetoselection'
-    bl_description = 'Set start and end frames to selection'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-
-        frame_start = 300000
-        frame_end = -300000
-        for i in seq.sequences:
-            try:
-                if i.frame_final_start < frame_start and i.select == True:
-                    frame_start = i.frame_final_start
-                if i.frame_final_end > frame_end and i.select == True:
-                    frame_end = i.frame_final_end - 1
-            except AttributeError:
-                    pass
-
-        if frame_start != 300000:
-            scn.frame_start = frame_start
-        if frame_end != -300000:
-            scn.frame_end = frame_end
-        return {'FINISHED'}
-
-
-# SLIDE STRIP
-class Sequencer_Extra_SlideStrip(bpy.types.Operator):
-    bl_label = 'Slide'
-    bl_idname = 'sequencerextra.slide'
-    bl_description = 'Alter in and out points but not duration of a strip'
-    mode = EnumProperty(
-        name='Mode',
-        items=(
-        ('TOSTART', 'Current Frame to Strip Start', ''),
-        ('TOEND', 'Current Frame to Strip End', ''),
-        ('INPUT', 'Input...', '')),
-        default='INPUT',
-        options={'HIDDEN'})
-    bl_options = {'REGISTER', 'UNDO'}
-
-    initSceneProperties(bpy.context.scene)
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type in ('MOVIE', 'IMAGE', 'META', 'SCENE')
-        else:
-            return False
-
-    slide_offset = bpy.types.Scene.default_slide_offset
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        cf = scn.frame_current
-
-        if self.mode == 'TOSTART':
-            sx = strip.frame_final_start - cf
-        elif self.mode == 'TOEND':
-            sx = strip.frame_final_end - cf
-        else:
-            sx = self.slide_offset
-
-        frame_end = strip.frame_start + strip.frame_duration
-        pad_left = strip.frame_final_start - strip.frame_start
-        pad_right = (frame_end - strip.frame_final_end) * -1
-
-        if sx > pad_left:
-            sx = pad_left
-        elif sx < pad_right:
-            sx = pad_right
-
-        strip.frame_start += sx
-        strip.frame_final_start -= sx
-        strip.frame_final_end -= sx
-
-        self.report({'INFO'}, 'Strip slid %d frame(s)' % (sx))
-        scn.default_slide_offset = sx
-        bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.slide_offset = scn.default_slide_offset
-        if self.mode == 'INPUT':
-            return context.window_manager.invoke_props_dialog(self)
-        else:
-            return self.execute(context)
-
-
-# SLIDE GRAB
-class Sequencer_Extra_SlideGrab(bpy.types.Operator):
-    bl_label = 'Slide Grab'
-    bl_idname = 'sequencerextra.slidegrab'
-    bl_description = 'Alter in and out points but not duration of a strip'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type in ('MOVIE', 'IMAGE', 'META', 'SCENE')
-        else:
-            return False
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-
-        diff = self.prev_x - self.x
-        self.prev_x = self.x
-        sx = int(diff / 2)
-
-        frame_end = strip.frame_start + strip.frame_duration
-        pad_left = strip.frame_final_start - strip.frame_start
-        pad_right = (frame_end - strip.frame_final_end) * -1
-
-        if sx > pad_left:
-            sx = pad_left
-        elif sx < pad_right:
-            sx = pad_right
-
-        strip.frame_start += sx
-        strip.frame_final_start -= sx
-        strip.frame_final_end -= sx
-
-    def modal(self, context, event):
-        if event.type == 'MOUSEMOVE':
-            self.x = event.mouse_x
-            self.execute(context)
-        elif event.type == 'LEFTMOUSE':
-            return {'FINISHED'}
-        elif event.type in ('RIGHTMOUSE', 'ESC'):
-            return {'CANCELLED'}
-
-        return {'RUNNING_MODAL'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.x = event.mouse_x
-        self.prev_x = event.mouse_x
-        self.execute(context)
-        context.window_manager.modal_handler_add(self)
-        return {'RUNNING_MODAL'}
-
-
-# FILE NAME TO STRIP NAME
-class Sequencer_Extra_FileNameToStripName(bpy.types.Operator):
-    bl_label = 'File Name to Selected Strips Name'
-    bl_idname = 'sequencerextra.striprename'
-    bl_description = 'Set strip name to input file name'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        selection = False
-        for i in seq.sequences:
-            if i.select == True:
-                if i.type == 'IMAGE' and not i.mute:
-                    selection = True
-                    i.name = i.elements[0].filename
-                if (i.type == 'SOUND' or i.type == 'MOVIE') and not i.mute:
-                    selection = True
-                    i.name = bpy.path.display_name_from_filepath(i.filepath)
-        if selection == False:
-            self.report({'ERROR_INVALID_INPUT'},
-            'No image or movie strip selected')
-            return {'CANCELLED'}
-        return {'FINISHED'}
-
-
-# NAVIGATE UP
-class Sequencer_Extra_NavigateUp(bpy.types.Operator):
-    bl_label = 'Navigate Up'
-    bl_idname = 'sequencerextra.navigateup'
-    bl_description = 'Move to Parent Timeline'
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        try:
-            if context.scene.sequence_editor.meta_stack:
-                return True
-            else:
-                return False
-        except:
-            return False
-
-    def execute(self, context):
-        if (functions.act_strip(context)):
-            strip = functions.act_strip(context)
-            seq_type = strip.type
-            if seq_type == 'META':
-                context.scene.sequence_editor.active_strip = None
-
-        bpy.ops.sequencer.meta_toggle()
-        return {'FINISHED'}
-
-
-# RIPPLE DELETE
-class Sequencer_Extra_RippleDelete(bpy.types.Operator):
-    bl_label = 'Ripple Delete'
-    bl_idname = 'sequencerextra.rippledelete'
-    bl_description = 'Delete a strip and shift back following ones'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return True
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        #strip = functions.act_strip(context)
-        for strip in context.selected_editable_sequences:       
-            cut_frame = strip.frame_final_start
-            next_edit = 300000
-            bpy.ops.sequencer.select_all(action='DESELECT')
-            strip.select = True
-            bpy.ops.sequencer.delete()
-            striplist = []
-            for i in seq.sequences:
-                try:
-                    if (i.frame_final_start > cut_frame
-                    and not i.mute):
-                        if i.frame_final_start < next_edit:
-                            next_edit = i.frame_final_start
-                    if not i.mute:
-                        striplist.append(i)
-                except AttributeError:
-                        pass
-
-            if next_edit == 300000:
-                return {'FINISHED'}
-            ripple_length = next_edit - cut_frame
-            for i in range(len(striplist)):
-                str = striplist[i]
-                try:
-                    if str.frame_final_start > cut_frame:
-                        str.frame_start = str.frame_start - ripple_length
-                except AttributeError:
-                        pass
-            bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-
-# RIPPLE CUT
-class Sequencer_Extra_RippleCut(bpy.types.Operator):
-    bl_label = 'Ripple Cut'
-    bl_idname = 'sequencerextra.ripplecut'
-    bl_description = 'Move a strip to buffer and shift back following ones'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return True
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        strip = functions.act_strip(context)
-        bpy.ops.sequencer.select_all(action='DESELECT')
-        strip.select = True
-        temp_cf = scn.frame_current
-        scn.frame_current = strip.frame_final_start
-        bpy.ops.sequencer.copy()
-        scn.frame_current = temp_cf
-
-        bpy.ops.sequencerextra.rippledelete()
-        return {'FINISHED'}
-
-
-# INSERT
-class Sequencer_Extra_Insert(bpy.types.Operator):
-    bl_label = 'Insert'
-    bl_idname = 'sequencerextra.insert'
-    bl_description = 'Move active strip to current frame and shift '\
-    'forward following ones'
-    singlechannel = BoolProperty(
-    name='Single Channel',
-    default=False)
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return True
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        strip = functions.act_strip(context)
-        gap = strip.frame_final_duration
-        bpy.ops.sequencer.select_all(action='DESELECT')
-        current_frame = scn.frame_current
-
-        striplist = []
-        for i in seq.sequences:
-            try:
-                if (i.frame_final_start >= current_frame
-                and not i.mute):
-                    if self.singlechannel == True:
-                        if i.channel == strip.channel:
-                            striplist.append(i)
-                    else:
-                        striplist.append(i)
-            except AttributeError:
-                    pass
-        try:
-            bpy.ops.sequencerextra.selectcurrentframe('EXEC_DEFAULT',
-            mode='AFTER')
-        except:
-            self.report({'ERROR_INVALID_INPUT'}, 'Execution Error, '\
-            'check your Blender version')
-            return {'CANCELLED'}
-
-        for i in range(len(striplist)):
-            str = striplist[i]
-            try:
-                if str.select == True:
-                    str.frame_start += gap
-            except AttributeError:
-                    pass
-        try:
-            diff = current_frame - strip.frame_final_start
-            strip.frame_start += diff
-        except AttributeError:
-                pass
-
-        strip = functions.act_strip(context)
-        scn.frame_current += strip.frame_final_duration
-        bpy.ops.sequencer.reload()
-
-        return {'FINISHED'}
-
-
-# PLACE FROM FILE BROWSER
-class Sequencer_Extra_PlaceFromFileBrowser(bpy.types.Operator):
-    bl_label = 'Place'
-    bl_idname = 'sequencerextra.placefromfilebrowser'
-    bl_description = 'Place or insert active file from File Browser'
-    insert = BoolProperty(
-    name='Insert',
-    default=False)
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-        scn = context.scene
-        for a in context.window.screen.areas:
-            if a.type == 'FILE_BROWSER':
-                params = a.spaces[0].params
-                break
-        try:
-            params
-        except UnboundLocalError:
-            self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-            return {'CANCELLED'}
-
-        if params.filename == '':
-            self.report({'ERROR_INVALID_INPUT'}, 'No file selected')
-            return {'CANCELLED'}
-
-        path = os.path.join(params.directory, params.filename)
-        frame = context.scene.frame_current
-        strip_type = functions.detect_strip_type(params.filename)
-
-        try:
-            if strip_type == 'IMAGE':
-                image_file = []
-                filename = {"name": params.filename}
-                image_file.append(filename)
-                f_in = scn.frame_current
-                f_out = f_in + scn.render.fps - 1
-                bpy.ops.sequencer.image_strip_add(files=image_file,
-                directory=params.directory, frame_start=f_in,
-                frame_end=f_out, relative_path=False)
-            elif strip_type == 'MOVIE':
-                bpy.ops.sequencer.movie_strip_add(filepath=path,
-                frame_start=frame, relative_path=False)
-            elif strip_type == 'SOUND':
-                bpy.ops.sequencer.sound_strip_add(filepath=path,
-                frame_start=frame, relative_path=False)
-            else:
-                self.report({'ERROR_INVALID_INPUT'}, 'Invalid file format')
-                return {'CANCELLED'}
-        except:
-            self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-            return {'CANCELLED'}
-
-        if self.insert == True:
-            try:
-                striplist = []
-                for i in bpy.context.selected_editable_sequences:
-                    if (i.select == True and i.type == "SOUND"):
-                        striplist.append(i)
-                bpy.ops.sequencerextra.insert()
-                if striplist[0]:
-                    striplist[0].frame_start = frame
-            except:
-                self.report({'ERROR_INVALID_INPUT'}, 'Execution Error, '\
-                'check your Blender version')
-                return {'CANCELLED'}
-        else:
-            strip = functions.act_strip(context)
-            scn.frame_current += strip.frame_final_duration
-            bpy.ops.sequencer.reload()
-
-        return {'FINISHED'}
-
-
-# SELECT BY TYPE
-class Sequencer_Extra_SelectAllByType(bpy.types.Operator):
-    bl_label = 'All by Type'
-    bl_idname = 'sequencerextra.select_all_by_type'
-    bl_description = 'Select all the strips of the same type'
-    type = EnumProperty(
-            name='Strip Type',
-            items=(
-            ('ACTIVE', 'Same as Active Strip', ''),
-            ('IMAGE', 'Image', ''),
-            ('META', 'Meta', ''),
-            ('SCENE', 'Scene', ''),
-            ('MOVIE', 'Movie', ''),
-            ('SOUND', 'Sound', ''),
-            ('TRANSFORM', 'Transform', ''),
-            ('COLOR', 'Color', '')),
-            default='ACTIVE',
-            )
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    def execute(self, context):
-        strip_type = self.type
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        active_strip = functions.act_strip(context)
-        if strip_type == 'ACTIVE':
-            if active_strip == None:
-                self.report({'ERROR_INVALID_INPUT'},
-                'No active strip')
-                return {'CANCELLED'}
-            strip_type = active_strip.type
-
-        striplist = []
-        for i in seq.sequences:
-            try:
-                if (i.type == strip_type
-                and not i.mute):
-                    striplist.append(i)
-            except AttributeError:
-                    pass
-        for i in range(len(striplist)):
-            str = striplist[i]
-            try:
-                str.select = True
-            except AttributeError:
-                    pass
-
-        return {'FINISHED'}
-
-
-# CURRENT-FRAME-AWARE SELECT
-class Sequencer_Extra_SelectCurrentFrame(bpy.types.Operator):
-    bl_label = 'Current-Frame-Aware Select'
-    bl_idname = 'sequencerextra.selectcurrentframe'
-    bl_description = 'Select strips according to current frame'
-    mode = EnumProperty(
-            name='Mode',
-            items=(
-            ('BEFORE', 'Before Current Frame', ''),
-            ('AFTER', 'After Current Frame', ''),
-            ('ON', 'On Current Frame', '')),
-            default='BEFORE',
-            )
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    def execute(self, context):
-        mode = self.mode
-        scn = context.scene
-        seq = scn.sequence_editor
-        cf = scn.frame_current
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-
-        if mode == 'AFTER':
-            for i in seq.sequences:
-                try:
-                    if (i.frame_final_start >= cf
-                    and not i.mute):
-                        i.select = True
-                except AttributeError:
-                        pass
-        elif mode == 'ON':
-            for i in seq.sequences:
-                try:
-                    if (i.frame_final_start <= cf
-                    and i.frame_final_end > cf
-                    and not i.mute):
-                        i.select = True
-                except AttributeError:
-                        pass
-        else:
-            for i in seq.sequences:
-                try:
-                    if (i.frame_final_end < cf
-                    and not i.mute):
-                        i.select = True
-                except AttributeError:
-                        pass
-
-        return {'FINISHED'}
-
-
-# OPEN IMAGE WITH EXTERNAL EDITOR
-class Sequencer_Extra_EditExternally(bpy.types.Operator):
-    bl_label = 'Open with External Editor'
-    bl_idname = 'sequencerextra.editexternally'
-    bl_description = 'Open with the default external image editor'
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type == 'IMAGE'
-        else:
-            return False
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        base_dir = bpy.path.abspath(strip.directory)
-        strip_elem = strip.getStripElem(scn.frame_current)
-        path = base_dir + strip_elem.filename
-
-        try:
-            bpy.ops.image.external_edit(filepath=path)
-        except:
-            self.report({'ERROR_INVALID_INPUT'},
-            'Please specify an Image Editor in Preferences > File')
-            return {'CANCELLED'}
-
-        return {'FINISHED'}
-
-
-# OPEN IMAGE WITH EDITOR
-class Sequencer_Extra_Edit(bpy.types.Operator):
-    bl_label = 'Open with Editor'
-    bl_idname = 'sequencerextra.edit'
-    bl_description = 'Open with Movie Clip or Image Editor'
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type in ('MOVIE', 'IMAGE')
-        else:
-            return False
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        data_exists = False
-
-        if strip.type == 'MOVIE':
-            path = strip.filepath
-
-            for i in bpy.data.movieclips:
-                if i.filepath == path:
-                    data_exists = True
-                    data = i
-
-            if data_exists == False:
-                try:
-                    data = bpy.data.movieclips.load(filepath=path)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                    return {'CANCELLED'}
-
-        elif strip.type == 'IMAGE':
-            base_dir = bpy.path.abspath(strip.directory)
-            strip_elem = strip.getStripElem(scn.frame_current)
-            elem_name = strip_elem.filename
-            path = base_dir + elem_name
-
-            for i in bpy.data.images:
-                if i.filepath == path:
-                    data_exists = True
-                    data = i
-
-            if data_exists == False:
-                try:
-                    data = bpy.data.images.load(filepath=path)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                    return {'CANCELLED'}
-
-        if strip.type == 'MOVIE':
-            for a in context.window.screen.areas:
-                if a.type == 'CLIP_EDITOR':
-                    a.spaces[0].clip = data
-        elif strip.type == 'IMAGE':
-            for a in context.window.screen.areas:
-                if a.type == 'IMAGE_EDITOR':
-                    a.spaces[0].image = data
-
-        return {'FINISHED'}
-
-
-# COPY STRIP PROPERTIES
-class Sequencer_Extra_CopyProperties(bpy.types.Operator):
-    bl_label = 'Copy Properties'
-    bl_idname = 'sequencerextra.copyproperties'
-    bl_description = 'Copy properties of active strip to selected strips'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    prop = EnumProperty(
-    name='Property',
-    items=[
-    # COMMON
-    ('name', 'Name', ''),
-    ('blend_alpha', 'Opacity', ''),
-    ('blend_type', 'Blend Mode', ''),
-    ('animation_offset', 'Input - Trim Duration', ''),
-    # NON-SOUND
-    ('use_translation', 'Input - Image Offset', ''),
-    ('crop', 'Input - Image Crop', ''),
-    ('proxy', 'Proxy / Timecode', ''),
-    ('strobe', 'Filter - Strobe', ''),
-    ('color_multiply', 'Filter - Multiply', ''),
-    ('color_saturation', 'Filter - Saturation', ''),
-    ('deinterlace', 'Filter - De-Interlace', ''),
-    ('flip', 'Filter - Flip', ''),
-    ('float', 'Filter - Convert Float', ''),
-    ('premultiply', 'Filter - Premultiply', ''),
-    ('reverse', 'Filter - Backwards', ''),
-    # SOUND
-    ('pan', 'Sound - Pan', ''),
-    ('pitch', 'Sound - Pitch', ''),
-    ('volume', 'Sound - Volume', ''),
-    ('cache', 'Sound - Caching', ''),
-    # IMAGE
-    ('directory', 'Image - Directory', ''),
-    # MOVIE
-    ('mpeg_preseek', 'Movie - MPEG Preseek', ''),
-    ('stream_index', 'Movie - Stream Index', ''),
-    # WIPE
-    ('wipe', 'Effect - Wipe', ''),
-    # TRANSFORM
-    ('transform', 'Effect - Transform', ''),
-    # COLOR
-    ('color', 'Effect - Color', ''),
-    # SPEED
-    ('speed', 'Effect - Speed', ''),
-    # MULTICAM
-    ('multicam_source', 'Effect - Multicam Source', ''),
-    # EFFECT
-    ('effect_fader', 'Effect - Effect Fader', ''),
-    ],
-    default='blend_alpha')
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return True
-        else:
-            return False
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        strip = functions.act_strip(context)
-
-        for i in seq.sequences:
-            if (i.select == True and not i.mute):
-                try:
-                    if self.prop == 'name':
-                        i.name = strip.name
-                    elif self.prop == 'blend_alpha':
-                        i.blend_alpha = strip.blend_alpha
-                    elif self.prop == 'blend_type':
-                        i.blend_type = strip.blend_type
-                    elif self.prop == 'animation_offset':
-                        i.animation_offset_start = strip.animation_offset_start
-                        i.animation_offset_end = strip.animation_offset_end
-                    elif self.prop == 'use_translation':
-                        i.use_translation = strip.use_translation
-                        i.transform.offset_x = strip.transform.offset_x
-                        i.transform.offset_y = strip.transform.offset_y
-                    elif self.prop == 'crop':
-                        i.use_crop = strip.use_crop
-                        i.crop.min_x = strip.crop.min_x
-                        i.crop.min_y = strip.crop.min_y
-                        i.crop.max_x = strip.crop.max_x
-                        i.crop.max_y = strip.crop.max_y
-                    elif self.prop == 'proxy':
-                        i.use_proxy = strip.use_proxy
-                        i.use_proxy_custom_file = strip.use_proxy_custom_file
-                        p = strip.use_proxy_custom_directory  # pep80
-                        i.use_proxy_custom_directory = p
-                        i.proxy.filepath = strip.proxy.filepath
-                        i.proxy.directory = strip.proxy.directory
-                        i.proxy.build_25 = strip.proxy.build_25
-                        i.proxy.build_50 = strip.proxy.build_50
-                        i.proxy.build_75 = strip.proxy.build_75
-                        i.proxy.build_100 = strip.proxy.build_100
-                        i.proxy.quality = strip.proxy.quality
-                        i.proxy.timecode = strip.proxy.timecode
-                    elif self.prop == 'strobe':
-                        i.strobe = strip.strobe
-                    elif self.prop == 'color_multiply':
-                        i.color_multiply = strip.color_multiply
-                    elif self.prop == 'color_saturation':
-                        i.color_saturation = strip.color_saturation
-                    elif self.prop == 'deinterlace':
-                        i.use_deinterlace = strip.use_deinterlace
-                    elif self.prop == 'flip':
-                        i.use_flip_x = strip.use_flip_x
-                        i.use_flip_y = strip.use_flip_y
-                    elif self.prop == 'float':
-                        i.use_float = strip.use_float
-                    elif self.prop == 'premultiply':
-                        i.use_premultiply = strip.use_premultiply
-                    elif self.prop == 'reverse':
-                        i.use_reverse_frames = strip.use_reverse_frames
-                    elif self.prop == 'pan':
-                        i.pan = strip.pan
-                    elif self.prop == 'pitch':
-                        i.pitch = strip.pitch
-                    elif self.prop == 'volume':
-                        i.volume = strip.volume
-                    elif self.prop == 'cache':
-                        i.use_memory_cache = strip.use_memory_cache
-                    elif self.prop == 'directory':
-                        i.directory = strip.directory
-                    elif self.prop == 'mpeg_preseek':
-                        i.mpeg_preseek = strip.mpeg_preseek
-                    elif self.prop == 'stream_index':
-                        i.stream_index = strip.stream_index
-                    elif self.prop == 'wipe':
-                        i.angle = strip.angle
-                        i.blur_width = strip.blur_width
-                        i.direction = strip.direction
-                        i.transition_type = strip.transition_type
-                    elif self.prop == 'transform':
-                        i.interpolation = strip.interpolation
-                        i.rotation_start = strip.rotation_start
-                        i.use_uniform_scale = strip.use_uniform_scale
-                        i.scale_start_x = strip.scale_start_x
-                        i.scale_start_y = strip.scale_start_y
-                        i.translation_unit = strip.translation_unit
-                        i.translate_start_x = strip.translate_start_x
-                        i.translate_start_y = strip.translate_start_y
-                    elif self.prop == 'color':
-                        i.color = strip.color
-                    elif self.prop == 'speed':
-                        i.use_default_fade = strip.use_default_fade
-                        i.speed_factor = strip.speed_factor
-                        i.use_as_speed = strip.use_as_speed
-                        i.scale_to_length = strip.scale_to_length
-                        i.multiply_speed = strip.multiply_speed
-                        i.use_frame_blend = strip.use_frame_blend
-                    elif self.prop == 'multicam_source':
-                        i.multicam_source = strip.multicam_source
-                    elif self.prop == 'effect_fader':
-                        i.use_default_fade = strip.use_default_fade
-                        i.effect_fader = strip.effect_fader
-                except:
-                    pass
-
-        bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-
-# FADE IN AND OUT
-class Sequencer_Extra_FadeInOut(bpy.types.Operator):
-    bl_idname = 'sequencerextra.fadeinout'
-    bl_label = 'Fade...'
-    bl_description = 'Fade volume or opacity of active strip'
-    mode = EnumProperty(
-            name='Direction',
-            items=(
-            ('IN', 'Fade In...', ''),
-            ('OUT', 'Fade Out...', ''),
-            ('INOUT', 'Fade In and Out...', '')),
-            default='IN',
-            )
-    bl_options = {'REGISTER', 'UNDO'}
-
-    initSceneProperties(bpy.context.scene)
-
-    @classmethod
-    def poll(cls, context):
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return True
-        else:
-            return False
-
-    fade_duration = bpy.types.Scene.default_fade_duration
-    fade_amount = bpy.types.Scene.default_fade_amount
-
-    def execute(self, context):
-        seq = context.scene.sequence_editor
-        scn = context.scene
-        strip = seq.active_strip
-        tmp_current_frame = context.scene.frame_current
-
-        if strip.type == 'SOUND':
-            if(self.mode) == 'OUT':
-                scn.frame_current = strip.frame_final_end - self.fade_duration
-                strip.volume = self.fade_amount
-                strip.keyframe_insert('volume')
-                scn.frame_current = strip.frame_final_end
-                strip.volume = 0
-                strip.keyframe_insert('volume')
-            elif(self.mode) == 'INOUT':
-                scn.frame_current = strip.frame_final_start
-                strip.volume = 0
-                strip.keyframe_insert('volume')
-                scn.frame_current += self.fade_duration
-                strip.volume = self.fade_amount
-                strip.keyframe_insert('volume')
-                scn.frame_current = strip.frame_final_end - self.fade_duration
-                strip.volume = self.fade_amount
-                strip.keyframe_insert('volume')
-                scn.frame_current = strip.frame_final_end
-                strip.volume = 0
-                strip.keyframe_insert('volume')
-            else:
-                scn.frame_current = strip.frame_final_start
-                strip.volume = 0
-                strip.keyframe_insert('volume')
-                scn.frame_current += self.fade_duration
-                strip.volume = self.fade_amount
-                strip.keyframe_insert('volume')
-
-        else:
-            if(self.mode) == 'OUT':
-                scn.frame_current = strip.frame_final_end - self.fade_duration
-                strip.blend_alpha = self.fade_amount
-                strip.keyframe_insert('blend_alpha')
-                scn.frame_current = strip.frame_final_end
-                strip.blend_alpha = 0
-                strip.keyframe_insert('blend_alpha')
-            elif(self.mode) == 'INOUT':
-                scn.frame_current = strip.frame_final_start
-                strip.blend_alpha = 0
-                strip.keyframe_insert('blend_alpha')
-                scn.frame_current += self.fade_duration
-                strip.blend_alpha = self.fade_amount
-                strip.keyframe_insert('blend_alpha')
-                scn.frame_current = strip.frame_final_end - self.fade_duration
-                strip.blend_alpha = self.fade_amount
-                strip.keyframe_insert('blend_alpha')
-                scn.frame_current = strip.frame_final_end
-                strip.blend_alpha = 0
-                strip.keyframe_insert('blend_alpha')
-            else:
-                scn.frame_current = strip.frame_final_start
-                strip.blend_alpha = 0
-                strip.keyframe_insert('blend_alpha')
-                scn.frame_current += self.fade_duration
-                strip.blend_alpha = self.fade_amount
-                strip.keyframe_insert('blend_alpha')
-
-        scn.frame_current = tmp_current_frame
-
-        scn.default_fade_duration = self.fade_duration
-        scn.default_fade_amount = self.fade_amount
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.fade_duration = scn.default_fade_duration
-        self.fade_amount = scn.default_fade_amount
-        return context.window_manager.invoke_props_dialog(self)
-
-
-# DISTRIBUTE
-class Sequencer_Extra_Distribute(bpy.types.Operator):
-    bl_idname = 'sequencerextra.distribute'
-    bl_label = 'Distribute...'
-    bl_description = 'Evenly distribute selected strips'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(self, context):
-        scn = context.scene
-        if scn and scn.sequence_editor:
-            return scn.sequence_editor.sequences
-        else:
-            return False
-
-    initSceneProperties(bpy.context.scene)
-
-    distribute_offset = bpy.types.Scene.default_distribute_offset
-    distribute_reverse = bpy.types.Scene.default_distribute_reverse
-
-    def execute(self, context):
-        scn = context.scene
-        seq = scn.sequence_editor
-        seq_all = scn.sequence_editor
-        meta_level = len(seq.meta_stack)
-        if meta_level > 0:
-            seq = seq.meta_stack[meta_level - 1]
-        seq_list = {}
-        first_start = 300000
-        item_num = 0
-        for i in seq.sequences:
-            if i.select == True:
-                seq_list[i.frame_start] = i.name
-                item_num += 1
-                if i.frame_start < first_start:
-                    first_start = i.frame_start
-        n = item_num - 1
-        if(self.distribute_reverse):
-            for key in sorted(seq_list.keys()):
-                dest = first_start + (n * self.distribute_offset)
-                seq_all.sequences_all[str(seq_list[key])].frame_start = dest
-                n -= 1
-        else:
-            for key in sorted(seq_list.keys(), reverse=True):
-                dest = first_start + (n * self.distribute_offset)
-                seq_all.sequences_all[str(seq_list[key])].frame_start = dest
-                n -= 1
-
-        scn.default_distribute_offset = self.distribute_offset
-        scn.default_distribute_reverse = self.distribute_reverse
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.distribute_offset = scn.default_distribute_offset
-        self.distribute_reverse = scn.default_distribute_reverse
-        return context.window_manager.invoke_props_dialog(self)
-
-
-# SKIP ONE SECOND
-class Sequencer_Extra_FrameSkip(bpy.types.Operator):
-    bl_label = 'Skip One Second'
-    bl_idname = 'screenextra.frame_skip'
-    bl_description = 'Skip through the Timeline by one-second increments'
-    bl_options = {'REGISTER', 'UNDO'}
-    back = BoolProperty(
-        name='Back',
-        default=False)
-
-    def execute(self, context):
-        one_second = bpy.context.scene.render.fps
-        if self.back == True:
-            one_second *= -1
-        bpy.ops.screen.frame_offset(delta=one_second)
-        return {'FINISHED'}
-
-
-# JOG/SHUTTLE
-class Sequencer_Extra_JogShuttle(bpy.types.Operator):
-    bl_label = 'Jog/Shuttle'
-    bl_idname = 'sequencerextra.jogshuttle'
-    bl_description = 'Jog through current sequence'
-
-    def execute(self, context):
-        scn = context.scene
-        start_frame = scn.frame_start
-        end_frame = scn.frame_end
-        duration = end_frame - start_frame
-        diff = self.x - self.init_x
-        diff /= 5
-        diff = int(diff)
-        extended_frame = diff + (self.init_current_frame - start_frame)
-        looped_frame = extended_frame % (duration + 1)
-        target_frame = start_frame + looped_frame
-        context.scene.frame_current = target_frame
-
-    def modal(self, context, event):
-        if event.type == 'MOUSEMOVE':
-            self.x = event.mouse_x
-            self.execute(context)
-        elif event.type == 'LEFTMOUSE':
-            return {'FINISHED'}
-        elif event.type in ('RIGHTMOUSE', 'ESC'):
-            return {'CANCELLED'}
-
-        return {'RUNNING_MODAL'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.x = event.mouse_x
-        self.init_x = self.x
-        self.init_current_frame = scn.frame_current
-        self.execute(context)
-        context.window_manager.modal_handler_add(self)
-        return {'RUNNING_MODAL'}
-
-
-# OPEN IN MOVIE CLIP EDITOR FROM FILE BROWSER
-class Clip_Extra_OpenFromFileBrowser(bpy.types.Operator):
-    bl_label = 'Open from File Browser'
-    bl_idname = 'clipextra.openfromfilebrowser'
-    bl_description = 'Load a Movie or Image Sequence from File Browser'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-        for a in context.window.screen.areas:
-            if a.type == 'FILE_BROWSER':
-                params = a.spaces[0].params
-                break
-        try:
-            params
-        except:
-            self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-            return {'CANCELLED'}
-
-        if params.filename == '':
-            self.report({'ERROR_INVALID_INPUT'}, 'No file selected')
-            return {'CANCELLED'}
-
-        strip = functions.act_strip(context)
-        path = params.directory + params.filename
-        strip_type = functions.detect_strip_type(params.filename)
-        data_exists = False
-
-        if strip_type in ('MOVIE', 'IMAGE'):
-            for i in bpy.data.movieclips:
-                if i.filepath == path:
-                    data_exists = True
-                    data = i
-
-            if data_exists == False:
-                try:
-                    data = bpy.data.movieclips.load(filepath=path)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                    return {'CANCELLED'}
-        else:
-            self.report({'ERROR_INVALID_INPUT'}, 'Invalid file format')
-            return {'CANCELLED'}
-
-        for a in context.window.screen.areas:
-            if a.type == 'CLIP_EDITOR':
-                a.spaces[0].clip = data
-
-        return {'FINISHED'}
-
-
-# OPEN IN MOVIE CLIP EDITOR FROM SEQUENCER
-class Clip_Extra_OpenActiveStrip(bpy.types.Operator):
-    bl_label = 'Open Active Strip'
-    bl_idname = 'clipextra.openactivestrip'
-    bl_description = 'Load a Movie or Image Sequence from Sequence Editor'
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        scn = context.scene
-        strip = functions.act_strip(context)
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type in ('MOVIE', 'IMAGE')
-        else:
-            return False
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        data_exists = False
-
-        if strip.type == 'MOVIE':
-            path = strip.filepath
-        elif strip.type == 'IMAGE':
-            base_dir = bpy.path.relpath(strip.directory)
-            filename = strip.elements[0].filename
-            path = base_dir + '/' + filename
-        else:
-            self.report({'ERROR_INVALID_INPUT'}, 'Invalid file format')
-            return {'CANCELLED'}
-
-        for i in bpy.data.movieclips:
-            if i.filepath == path:
-                data_exists = True
-                data = i
-        if data_exists == False:
-            try:
-                data = bpy.data.movieclips.load(filepath=path)
-            except:
-                self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                return {'CANCELLED'}
-
-        for a in context.window.screen.areas:
-            if a.type == 'CLIP_EDITOR':
-                a.spaces[0].clip = data
-
-        return {'FINISHED'}
-
-
-# PLACE FROM FILE BROWSER WITH PROXY
-class Sequencer_Extra_PlaceFromFileBrowserProxy(bpy.types.Operator):
-    bl_label = 'Place'
-    bl_idname = 'sequencerextra.placefromfilebrowserproxy'
-    bl_description = 'Place or insert active file from File Browser, '\
-    'and add proxy file with according suffix and extension'
-    insert = BoolProperty(
-    name='Insert',
-    default=False)
-
-    proxy_suffix = bpy.types.Scene.default_proxy_suffix
-    proxy_extension = bpy.types.Scene.default_proxy_extension
-    proxy_path = bpy.types.Scene.default_proxy_path
-    build_25 = bpy.types.Scene.default_build_25
-    build_50 = bpy.types.Scene.default_build_50
-    build_75 = bpy.types.Scene.default_build_75
-    build_100 = bpy.types.Scene.default_build_100
-
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def invoke(self, context, event):
-        scn = context.scene
-        self.build_25 = scn.default_build_25
-        self.build_50 = scn.default_build_50
-        self.build_75 = scn.default_build_75
-        self.build_100 = scn.default_build_100
-        self.proxy_suffix = scn.default_proxy_suffix
-        self.proxy_extension = scn.default_proxy_extension
-        self.proxy_path = scn.default_proxy_path
-
-        return context.window_manager.invoke_props_dialog(self)
-
-    def execute(self, context):
-        scn = context.scene
-        for a in context.window.screen.areas:
-            if a.type == 'FILE_BROWSER':
-                params = a.spaces[0].params
-                break
-        try:
-            params
-        except UnboundLocalError:
-            self.report({'ERROR_INVALID_INPUT'}, 'No visible File Browser')
-            return {'CANCELLED'}
-
-        if params.filename == '':
-            self.report({'ERROR_INVALID_INPUT'}, 'No file selected (proxy)')
-            return {'CANCELLED'}
-        path = os.path.join(params.directory, params.filename)
-        frame = context.scene.frame_current
-        strip_type = functions.detect_strip_type(params.filename)
-
-        try:
-            if strip_type == 'IMAGE':
-                image_file = []
-                filename = {"name": params.filename}
-                image_file.append(filename)
-                f_in = scn.frame_current
-                f_out = f_in + scn.render.fps - 1
-                bpy.ops.sequencer.image_strip_add(files=image_file,
-                directory=params.directory, frame_start=f_in,
-                frame_end=f_out, relative_path=False)
-            elif strip_type == 'MOVIE':
-                bpy.ops.sequencer.movie_strip_add(filepath=path,
-                frame_start=frame, relative_path=False)
-
-                strip = functions.act_strip(context)
-                strip.use_proxy = True
-
-                # check if proxy exists, otherwise, uncheck proxy custom file
-                proxy_filepath = params.directory + self.proxy_path
-                proxy_filename = params.filename.rpartition(".")[0] + \
-                self.proxy_suffix + self.proxy_extension
-                proxypath = os.path.join(proxy_filepath, proxy_filename)
-                strip.proxy.build_25 = self.build_25
-                strip.proxy.build_50 = self.build_50
-                strip.proxy.build_75 = self.build_75
-                strip.proxy.build_100 = self.build_100
-                #print("----------------", proxypath)
-                if os.path.isfile(proxypath):
-                    strip.use_proxy_custom_file = True
-                    strip.proxy.filepath = proxypath
-
-            elif strip_type == 'SOUND':
-                bpy.ops.sequencer.sound_strip_add(filepath=path,
-                frame_start=frame, relative_path=False)
-            else:
-                self.report({'ERROR_INVALID_INPUT'}, 'Invalid file format')
-                return {'CANCELLED'}
-
-        except:
-            self.report({'ERROR_INVALID_INPUT'}, 'Error loading file (proxy)')
-            return {'CANCELLED'}
-
-        scn.default_proxy_suffix = self.proxy_suffix
-        scn.default_proxy_extension = self.proxy_extension
-        scn.default_proxy_path = self.proxy_path
-        scn.default_build_25 = self.build_25
-        scn.default_build_50 = self.build_50
-        scn.default_build_75 = self.build_75
-        scn.default_build_100 = self.build_100
-
-        if self.insert == True:
-            try:
-                bpy.ops.sequencerextra.insert()
-            except:
-                self.report({'ERROR_INVALID_INPUT'}, 'Execution Error, '\
-                'check your Blender version')
-                return {'CANCELLED'}
-        else:
-            strip = functions.act_strip(context)
-            scn.frame_current += strip.frame_final_duration
-            bpy.ops.sequencer.reload()
-
-        return {'FINISHED'}
-
-
-# OPEN IMAGE WITH EDITOR AND create movie clip strip
-class Sequencer_Extra_CreateMovieclip(bpy.types.Operator):
-    bl_label = 'Create a Movieclip from selected strip'
-    bl_idname = 'sequencerextra.createmovieclip'
-    bl_description = 'Create a Movieclip strip from a MOVIE or IMAGE strip'
-
-    """
-    When a movie or image strip is selected, this operator creates a movieclip 
-    or find the correspondent movieclip that already exists for this footage, 
-    and add a VSE clip strip with same cuts the original strip has. 
-    It can convert movie strips and image sequences, both with hard cuts or
-    soft cuts.
-    """
-
-    @classmethod
-    def poll(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        if scn and scn.sequence_editor and scn.sequence_editor.active_strip:
-            return strip.type in ('MOVIE', 'IMAGE')
-        else:
-            return False
-
-    def execute(self, context):
-        strip = functions.act_strip(context)
-        scn = context.scene
-        
-
-        if strip.type == 'MOVIE':
-            #print("movie", strip.frame_start)
-            path = strip.filepath
-            #print(path)
-            data_exists = False
-            for i in bpy.data.movieclips:
-                if i.filepath == path:
-                    data_exists = True
-                    data = i
-            newstrip = None
-            if data_exists == False:
-                try:
-                    data = bpy.data.movieclips.load(filepath=path)
-                    newstrip = bpy.ops.sequencer.movieclip_strip_add(\
-                        replace_sel = True, overlap=False, clip=data.name)
-                    newstrip = functions.act_strip(context)
-                    newstrip.frame_start = strip.frame_start\
-                        - strip.animation_offset_start
-                    tin = strip.frame_offset_start + strip.frame_start
-                    tout = tin + strip.frame_final_duration
-                    #print(newstrip.frame_start, strip.frame_start, tin, tout)
-                    functions.triminout(newstrip, tin, tout)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                    return {'CANCELLED'}
-                
-            else:
-                try:
-                    newstrip = bpy.ops.sequencer.movieclip_strip_add(\
-                        replace_sel = True, overlap=False, clip=data.name)
-                    newstrip = functions.act_strip(context)
-                    newstrip.frame_start = strip.frame_start\
-                        - strip.animation_offset_start
-                    #i need to declare the strip this way in order to get triminout() working
-                    clip = bpy.context.scene.sequence_editor.sequences[newstrip.name]
-                    # i cannot change this movie clip atributes via scripts... 
-                    # but it works in the python console...
-                    #clip.animation_offset_start = strip.animation.offset_start
-                    #clip.animation_offset_end = strip.animation.offset_end
-                    #clip.frame_final_duration = strip.frame_final_duration 
-                    tin = strip.frame_offset_start + strip.frame_start
-                    tout = tin + strip.frame_final_duration
-                    #print(newstrip.frame_start, strip.frame_start, tin, tout)
-                    functions.triminout(clip, tin, tout)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading file')
-                    return {'CANCELLED'}
-                 
-        elif strip.type == 'IMAGE':
-            #print("image")
-            base_dir = bpy.path.abspath(strip.directory)
-            scn.frame_current = strip.frame_start - strip.animation_offset_start
-            # searching for the first frame of the sequencer. This is mandatory 
-            # for hard cutted sequence strips to be correctly converted, 
-            # avoiding to create a new movie clip if not needed
-            filename = sorted(os.listdir(base_dir))[0]
-            path = os.path.join(base_dir,filename)
-            #print(path)
-            data_exists = False
-            for i in bpy.data.movieclips:
-                #print(i.filepath, path)
-                if i.filepath == path:
-                    data_exists = True
-                    data = i
-            #print(data_exists)
-            if data_exists == False:
-                try:
-                    data = bpy.data.movieclips.load(filepath=path)
-                    newstrip = bpy.ops.sequencer.movieclip_strip_add(\
-                        replace_sel = True, overlap=False, clip=data.name)
-                    newstrip = functions.act_strip(context)
-                    newstrip.frame_start = strip.frame_start\
-                        - strip.animation_offset_start
-                    
-                    clip = bpy.context.scene.sequence_editor.sequences[newstrip.name]
-                    tin = strip.frame_offset_start + strip.frame_start
-                    tout = tin + strip.frame_final_duration
-                    #print(newstrip.frame_start, strip.frame_start, tin, tout)
-                    functions.triminout(clip, tin, tout)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading filetin')
-                    return {'CANCELLED'}
-                
-            else:
-                try:
-                    newstrip = bpy.ops.sequencer.movieclip_strip_add(\
-                        replace_sel = True, overlap=False, clip=data.name)
-                    newstrip = functions.act_strip(context)
-                    newstrip.frame_start = strip.frame_start\
-                        - strip.animation_offset_start
-                    # need to declare the strip this way in order to get triminout() working
-                    clip = bpy.context.scene.sequence_editor.sequences[newstrip.name]
-                    # cannot change this atributes via scripts... 
-                    # but it works in the python console...
-                    #clip.animation_offset_start = strip.animation.offset_start
-                    #clip.animation_offset_end = strip.animation.offset_end
-                    #clip.frame_final_duration = strip.frame_final_duration 
-                    tin = strip.frame_offset_start + strip.frame_start
-                    tout = tin + strip.frame_final_duration
-                    #print(newstrip.frame_start, strip.frame_start, tin, tout)
-                    functions.triminout(clip, tin, tout)
-                except:
-                    self.report({'ERROR_INVALID_INPUT'}, 'Error loading filete')
-                    return {'CANCELLED'}
-
-        # to show the new clip in a movie clip editor, if available.
-        if strip.type == 'MOVIE' or 'IMAGE':
-            for a in context.window.screen.areas:
-                if a.type == 'CLIP_EDITOR':
-                    a.spaces[0].clip = data
-        
-
-        return {'FINISHED'}
-    
-    
-# READ EXIF DATA
-class Sequencer_Extra_ReadExifData(bpy.types.Operator):
-    # load exifdata from strip to scene['metadata'] property
-    bl_label = 'Read EXIF Data'
-    bl_idname = 'sequencerextra.read_exif'
-    bl_description = 'load exifdata from strip to metadata property in scene'
-    bl_options = {'REGISTER', 'UNDO'}
-    
-
-    
-    def execute(self, context):
-        
-        def getexifdata(strip):
-            
-            def getlist(lista):
-                for root, dirs, files in os.walk(path):
-                    for f in files:
-                        if "."+f.rpartition(".")[2].lower() in functions.imb_ext_image:
-                            lista.append(f)
-                        #if "."+f.rpartition(".")[2] in imb_ext_movie:
-                        #    lista.append(f)
-                strip.elements
-                
-                lista.sort()
-                return lista
-            
-            def getexifvalues(lista):
-                metadata=[]
-                with exiftool.ExifTool() as et:
-                    try:
-                        metadata = et.get_metadata_batch(lista)
-                    except UnicodeDecodeError as Err:
-                        print(Err)
-                return metadata
-            
-            #print("----------------------------")
-            
-            if strip.type == "IMAGE":
-                path = bpy.path.abspath(strip.directory)
-            if strip.type == "MOVIE":
-                path = bpy.path.abspath(strip.filepath.rpartition("/")[0])
-            os.chdir(path)
-            #get a list of files
-            lista = []
-            
-            for i in strip.elements:
-                lista.append(i.filename)
-            
-            return getexifvalues(lista)
-        
-        
-        sce = bpy.context.scene
-        frame=sce.frame_current
-        text= bpy.context.active_object
-        strip = context.scene.sequence_editor.active_strip
-        sce['metadata'] = getexifdata(strip)
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/operators_recursive.py b/release/scripts/addons_contrib/sequencer_extra_actions/operators_recursive.py
deleted file mode 100644
index 44498e2..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/operators_recursive.py
+++ /dev/null
@@ -1,162 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-"""
-TODO: Add 'scene creation for each clip' option
-
-"""
-
-import bpy
-import os
-import sys
-from bpy.props import BoolProperty
-from bpy.props import EnumProperty
-from . import functions
-
-scn = bpy.context.scene
-
-bpy.types.Scene.default_recursive = BoolProperty(
-name='Recursive',
-description='Load in recursive folders',
-default=False)
-scn.default_recursive = False
-
-bpy.types.Scene.default_recursive_ext = BoolProperty(
-name='Recursive ext',
-description='Load only clips with selected extension',
-default=False)
-scn.default_recursive_ext = False
-
-bpy.types.Scene.default_recursive_proxies = BoolProperty(
-name='Recursive proxies',
-description='Load in recursive folders + proxies',
-default=False)
-scn.default_recursive_proxies = False
-
-movieextlist = [("1", ".avi", ""),
-            ("2", ".flc", ""),
-            ("3", ".mov", ""),
-            ("4", ".movie", ""),
-            ("5", ".mp4", ""),
-            ("6", ".m4v", ""),
-            ("7", ".m2v", ""),
-            ("8", ".m2t", ""),
-            ("9", ".m2ts", ""),
-            ("10", ".mts", ""),
-            ("11", ".mv", ""),
-            ("12", ".avs", ""),
-            ("13", ".wmv", ""),
-            ("14", ".ogv", ""),
-            ("15", ".dv", ""),
-            ("16", ".mpeg", ""),
-            ("17", ".mpg", ""),
-            ("18", ".mpg2", ""),
-            ("19", ".vob", ""),
-            ("20", ".mkv", ""),
-            ("21", ".flv", ""),
-            ("22", ".divx", ""),
-            ("23", ".xvid", ""),
-            ("24", ".mxf", "")]
-
-bpy.types.Scene.default_ext = EnumProperty(
-items=movieextlist,
-name="ext enum",
-default="3")
-scn.default_ext = "3"
-
-
-def loader(filelist):
-    if filelist:
-        for i in filelist:
-            functions.setpathinbrowser(i[0], i[1])
-            try:
-                if scn.default_recursive_proxies:
-                    bpy.ops.sequencerextra.placefromfilebrowserproxy(
-                        proxy_suffix=scn.default_proxy_suffix,
-                        proxy_extension=scn.default_proxy_extension,
-                        proxy_path=scn.default_proxy_path,
-                        build_25=scn.default_build_25,
-                        build_50=scn.default_build_50,
-                        build_75=scn.default_build_75,
-                        build_100=scn.default_build_100)
-                else:
-                    bpy.ops.sequencerextra.placefromfilebrowser()
-            except:
-                print("Error loading file (recursive loader error): ", i[1])
-                functions.add_marker(i[1])
-                #self.report({'ERROR_INVALID_INPUT'}, 'Error loading file ')
-                #return {'CANCELLED'}
-                pass
-
-
-def onefolder():
-    '''
-    returns a list of MOVIE type files from folder selected in file browser
-    '''
-    filelist = []
-    path, filename = functions.getfilepathfrombrowser()
-    extension = filename.rpartition(".")[2]
-    #extension = scn.default_ext
-    scn = bpy.context.scene
-
-    if functions.detect_strip_type(path + filename) == 'MOVIE':
-        if scn.default_recursive_ext == True:
-            for file in os.listdir(path):
-                if file.rpartition(".")[2] == extension:
-                    filelist.append((path, file))
-        else:
-            for file in os.listdir(path):
-                filelist.append((path, file))
-    return (filelist)
-    #loader(sortlist(filelist))
-
-
-def recursive():
-    '''
-    returns a list of MOVIE type files recursively from file browser
-    '''
-    filelist = []
-    path = functions.getpathfrombrowser()
-    scn = bpy.context.scene
-    for i in movieextlist:
-        if i[0] == scn.default_ext:
-            extension = i[1].rpartition(".")[2]
-    #pythonic way to magic:
-    for root, dirs, files in os.walk(path):
-        for f in files:
-            if scn.default_recursive_ext == True:
-                if f.rpartition(".")[2] == extension:
-                    filelist.append((root, f))
-            else:
-                filelist.append((root, f))
-    return filelist
-    #loader(sortlist(filelist))
-
-
-class Sequencer_Extra_RecursiveLoader(bpy.types.Operator):
-    bl_idname = "sequencerextra.recursiveload"
-    bl_label = "recursive load"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    def execute(self, context):
-        scn = bpy.context.scene
-        if scn["default_recursive"] == True:
-            loader(functions.sortlist(recursive()))
-        else:
-            loader(functions.sortlist(onefolder()))
-        return {'FINISHED'}
diff --git a/release/scripts/addons_contrib/sequencer_extra_actions/ui.py b/release/scripts/addons_contrib/sequencer_extra_actions/ui.py
deleted file mode 100644
index e08da67..0000000
--- a/release/scripts/addons_contrib/sequencer_extra_actions/ui.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-
-
-# UI
-class SEQUENCER_EXTRA_MT_input(bpy.types.Menu):
-    bl_label = "Input"
-
-    def draw(self, context):
-        self.layout.operator_context = 'INVOKE_REGION_WIN'
-        self.layout.operator('sequencerextra.striprename',
-        text='File Name to Strip Name', icon='PLUGIN')
-        self.layout.operator('sequencerextra.editexternally',
-        text='Open with External Editor', icon='PLUGIN')
-        self.layout.operator('sequencerextra.edit',
-        text='Open with Editor', icon='PLUGIN')
-        self.layout.operator('sequencerextra.createmovieclip',
-        text='Create Movieclip strip', icon='PLUGIN')
-
-
-
-class AddRecursiveLoadPanel(bpy.types.Panel):
-    bl_label = "Recursive Load"
-    bl_space_type = "SEQUENCE_EDITOR"
-    bl_region_type = "UI"
-    
-    @staticmethod
-    def has_sequencer(context):
-        return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
-
-    @classmethod
-    def poll(cls, context):
-        return cls.has_sequencer(context)
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(text="", icon="NLA")
-
-    def draw(self, context):
-
-        scn = bpy.context.scene
-        self.layout.prop(scn, "default_recursive_ext", text="Same extension")
-        if scn.default_recursive_ext:
-            split = self.layout.split()
-            col = split.column()
-            col.prop(scn, "default_ext", text="extension: ")
-
-        self.layout.prop(scn, "default_recursive", text="Recursive Folders")
-        split = self.layout.split(percentage=0.3)
-
-        split.label(text="")
-        split.prop(scn, "default_recursive_proxies", text="Proxies")
-
-        self.layout.operator("sequencerextra.recursiveload",
-            text="Import from Browser")
-
-
-def sequencer_select_menu_func(self, context):
-    self.layout.operator_menu_enum('sequencerextra.select_all_by_type',
-    'type', text='All by Type', icon='PLUGIN')
-    self.layout.separator()
-    self.layout.operator('sequencerextra.selectcurrentframe',
-    text='Before Current Frame', icon='PLUGIN').mode = 'BEFORE'
-    self.layout.operator('sequencerextra.selectcurrentframe',
-    text='After Current Frame', icon='PLUGIN').mode = 'AFTER'
-    self.layout.operator('sequencerextra.selectcurrentframe',
-    text='On Current Frame', icon='PLUGIN').mode = 'ON'
-    self.layout.separator()
-
-
-def sequencer_strip_menu_func(self, context):
-    self.layout.operator('sequencerextra.distribute',
-    text='Distribute', icon='PLUGIN')
-    self.layout.operator_menu_enum('sequencerextra.fadeinout',
-    'mode', text='Fade', icon='PLUGIN')
-    self.layout.operator_menu_enum('sequencerextra.copyproperties',
-    'prop', icon='PLUGIN')
-    self.layout.operator('sequencerextra.slidegrab',
-    text='Slide Grab', icon='PLUGIN')
-    self.layout.operator_menu_enum('sequencerextra.slide',
-    'mode', icon='PLUGIN')
-    self.layout.operator('sequencerextra.insert',
-    text='Insert (Single Channel)', icon='PLUGIN').singlechannel = True
-    self.layout.operator('sequencerextra.insert',
-    text='Insert', icon='PLUGIN').singlechannel = False
-    self.layout.operator('sequencerextra.ripplecut',
-    text='Ripple Cut', icon='PLUGIN')
-    self.layout.operator('sequencerextra.rippledelete',
-    text='Ripple Delete', icon='PLUGIN')
-    self.layout.separator()
-
-
-def sequencer_header_func(self, context):
-    self.layout.menu("SEQUENCER_EXTRA_MT_input")
-    if context.space_data.view_type in ('PREVIEW', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.jogshuttle',
-        text='Jog/Shuttle', icon='NDOF_TURN')
-    if context.space_data.view_type in ('SEQUENCER', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.navigateup',
-        text='Navigate Up', icon='FILE_PARENT')
-    if context.space_data.view_type in ('SEQUENCER', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.placefromfilebrowser',
-        text='File Place', icon='TRIA_DOWN').insert = False
-    if context.space_data.view_type in ('SEQUENCER', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.placefromfilebrowser',
-        text='File Insert', icon='TRIA_RIGHT').insert = True
-    if context.space_data.view_type in ('SEQUENCER', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.placefromfilebrowserproxy',
-        text='Proxy Place', icon='TRIA_DOWN')
-    if context.space_data.view_type in ('SEQUENCER', 'SEQUENCER_PREVIEW'):
-        self.layout.operator('sequencerextra.placefromfilebrowserproxy',
-        text='Proxy Insert', icon='TRIA_RIGHT').insert = True
-
-
-def time_frame_menu_func(self, context):
-    self.layout.operator('timeextra.trimtimelinetoselection',
-    text='Trim to Selection', icon='PLUGIN')
-    self.layout.operator('timeextra.trimtimeline',
-    text='Trim to Timeline Content', icon='PLUGIN')
-    self.layout.separator()
-    self.layout.operator('screenextra.frame_skip',
-    text='Skip Forward One Second', icon='PLUGIN').back = False
-    self.layout.operator('screenextra.frame_skip',
-    text='Skip Back One Second', icon='PLUGIN').back = True
-    self.layout.separator()
-
-
-def time_header_func(self, context):
-    self.layout.operator('sequencerextra.jogshuttle',
-    text='Jog/Shuttle', icon='NDOF_TURN')
-
-
-def clip_header_func(self, context):
-    self.layout.operator('sequencerextra.jogshuttle',
-    text='Jog/Shuttle', icon='NDOF_TURN')
-
-
-def clip_clip_menu_func(self, context):
-    self.layout.operator('clipextra.openactivestrip',
-    text='Open Active Strip', icon='PLUGIN')
-    self.layout.operator('clipextra.openfromfilebrowser',
-    text='Open from File Browser', icon='PLUGIN')
-    self.layout.separator()
-
-class ExifInfoPanel(bpy.types.Panel):
-    """Creates a Panel in the Object properties window"""
-    bl_label = "EXIF Info Panel"
-    bl_space_type = 'SEQUENCE_EDITOR'
-    bl_region_type = 'UI'
-    
-    @staticmethod
-    def has_sequencer(context):
-        return (context.space_data.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'})
-
-    @classmethod
-    def poll(cls, context):
-        return cls.has_sequencer(context)
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(text="", icon="NLA")
-
-    def draw(self, context):
-        layout = self.layout
-        sce = context.scene
-        row = layout.row()
-        row.operator("sequencerextra.read_exif")
-        row = layout.row()
-        row.label(text="Exif Data!", icon='RENDER_REGION')
-        row = layout.row()
-        
-        try:
-            strip = context.scene.sequence_editor.active_strip
-        
-            f=strip.frame_start
-            frame=sce.frame_current
-            try:
-                if len(sce['metadata']) == 1:
-                    for d in sce['metadata'][0]:
-                        split = layout.split(percentage=0.5)
-                        col = split.column()
-                        row = col.row()
-                        col.label(text=d) 
-                        col = split.column()
-                        col.label(str(sce['metadata'][0][d]))
-                else:    
-                    for d in sce['metadata'][frame-f]:
-                        split = layout.split(percentage=0.5)
-                        col = split.column()
-                        row = col.row()
-                        col.label(text=d) 
-                        col = split.column()
-                        col.label(str(sce['metadata'][frame-f][d]))
-            except KeyError:
-                pass
-        except AttributeError:
-            pass
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/sequencer_jumptocut.py b/release/scripts/addons_contrib/sequencer_jumptocut.py
deleted file mode 100644
index f51bfde..0000000
--- a/release/scripts/addons_contrib/sequencer_jumptocut.py
+++ /dev/null
@@ -1,439 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-bl_info = {
-    "name": "Jump to Cut",
-    "author": "Carlos Padial",
-    "version": (5,0,2),
-    "blender": (2, 6, 3, 0),
-    "api": 44539,
-    "category": "Sequencer",
-    "location": "Sequencer > UI > Jump to Cut",
-    "description": "Tool collection to help speed up editting and grade videos with blender",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Sequencer/Jump_to_cut",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?func=detail&aid=24279",}
-
-#
-# 
-#
-#-----------------------------------------------------------------------------------------------------
-import bpy
-
-class Jumptocut(bpy.types.Panel):
-    bl_space_type = "SEQUENCE_EDITOR"
-    bl_region_type = "UI"
-    bl_label = "Jump to Cut"  
-
-    def draw_header(self, context):
-        layout = self.layout
-        layout.label(text="", icon="NLA")
-    
-    def draw(self, context):
-        layout = self.layout
-       
-        row=layout.row()
-        split=row.split(percentage=0.5)
-        colL = split.column()
-        colR = split.column()
-        colL.operator("sequencer.jumpprev", icon="PLAY_REVERSE")
-        colR.operator("sequencer.jumpnext", icon='PLAY')
-
-        row=layout.row()
-        split=row.split()
-        colL = split.column()
-        colR = split.column()
-        colL.operator("sequencer.markprev", icon="MARKER_HLT")
-        colR.operator("sequencer.marknext", icon='MARKER_HLT')
-        
-        row=layout.row()
-        split=row.split()
-        colL1 = split.column()
-        colL2 = split.column()
-        colL1.operator("sequencer.sourcein", icon="REW")
-        colL2.operator("sequencer.sourceout", icon='FF')
- 
-        
-        row=layout.row()
-        split=row.split()
-        colR1 = split.column()
-        colR1.operator("sequencer.setinout", icon="ARROW_LEFTRIGHT")
-        row=layout.row()
-        split=row.split(percentage=0.5)
-        colR1 = split.column()
-        colR1.operator("sequencer.triminout", icon="FULLSCREEN_EXIT") 
-        colR2 = split.column()
-        colR2.operator("sequencer.setstartend", icon="SETTINGS")
-
-        row=layout.row()
-        split=row.split()
-        colR1 = split.column()
-        colR2 = split.column()
-        colR1.operator("sequencer.metacopy", icon="COPYDOWN")
-        colR2.operator("sequencer.metapaste", icon='PASTEDOWN')
-        
-#-----------------------------------------------------------------------------------------------------
-
-class OBJECT_OT_Setinout(bpy.types.Operator):  
-    bl_label = "Mark in & out to active strip"
-    bl_idname = "sequencer.setinout"
-    bl_description = "set IN and OUT markers to the active strip limits"
-        
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        markers=scene.timeline_markers
-        seq=scene.sequence_editor
-        if seq:
-            strip= seq.active_strip
-            if strip != None:
-                sin = strip.frame_start + strip.frame_offset_start
-                sout = sin + strip.frame_final_duration 
-                if "IN" not in markers:
-                    mark=markers.new(name="IN")
-                    mark.frame=sin
-                else:
-                    mark=markers["IN"]
-                    mark.frame=sin
-                if "OUT" not in markers:
-                    mark= markers.new(name="OUT")
-                    mark.frame=sout
-                else:
-                    mark=markers["OUT"]
-                    mark.frame=sout 
-        return {'FINISHED'}
-    
-
-def triminout(strip,sin,sout):
-    start = strip.frame_start+strip.frame_offset_start 
-    end = start+strip.frame_final_duration
-    if end > sin:
-        if start < sin:
-            strip.select_right_handle = False            
-            strip.select_left_handle = True
-            bpy.ops.sequencer.snap(frame=sin)
-            strip.select_left_handle = False
-    if start < sout:
-        if end > sout:
-            strip.select_left_handle = False            
-            strip.select_right_handle = True
-            bpy.ops.sequencer.snap(frame=sout)
-            strip.select_right_handle = False    
-    return {'FINISHED'}
-
-
-class OBJECT_OT_Triminout(bpy.types.Operator):  
-    bl_label = "Trim to in & out"
-    bl_idname = "sequencer.triminout"
-    bl_description = "trim the selected strip to IN and OUT markers (if exists)"
-        
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        markers=scene.timeline_markers
-        seq=scene.sequence_editor
-        if seq:
-            strip= seq.active_strip
-            if strip != None:
-                if "IN" and "OUT" in markers:
-                    sin=markers["IN"].frame
-                    sout=markers["OUT"].frame
-                    triminout(strip,sin,sout)
-                else:
-                    self.report({'WARNING'}, "there is no IN and OUT")
-            bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-def searchprev(j, list):
-    list.sort()
-    list.reverse()
-    for i in list:
-        if i < j:
-            result = i
-            break 
-    else: result = j
-    return result
-
-def searchnext(j, list): 
-    list.sort()
-    for i in list:
-        if i > j:
-            result = i
-            break
-    else: result = j
-    return result  
-
-def geteditpoints(seq):
-    #this create a list of editpoints including strips from
-    # inside metastrips. It reads only 1 level into the metastrip
-    editpoints = []
-    cliplist = []
-    metalist = []
-    if seq:
-        for i in seq.sequences:
-            if i.type == 'META':
-                metalist.append(i)
-                start = i.frame_start + i.frame_offset_start
-                end = start + i.frame_final_duration
-                editpoints.append(start)
-                editpoints.append(end)
-            else:
-                cliplist.append(i)
-        for i in metalist:
-            for j in i.sequences:
-                cliplist.append(j)  
-        for i in cliplist:
-            start = i.frame_start + i.frame_offset_start
-            end = start + i.frame_final_duration
-            editpoints.append(start)
-            editpoints.append(end)
-            #print(start," ",end)
-    return editpoints
-
-#JUMP    
-class OBJECT_OT_Jumpprev(bpy.types.Operator):  #Operator jump previous edit point
-    bl_label = "Cut previous"
-    bl_idname = "sequencer.jumpprev"
-    bl_description = "jump to previous edit point"
-    
-    editpoints = []
-        
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        seq=scene.sequence_editor
-        editpoints = geteditpoints(seq)
-        bpy.context.scene.frame_current = searchprev(scene.frame_current, editpoints) 
-        return {'FINISHED'}   
-           
-class OBJECT_OT_Jumpnext(bpy.types.Operator):  #Operator jump next edit point
-    bl_label = "Cut next"
-    bl_idname = "sequencer.jumpnext"
-    bl_description = "jump to next edit point"
-    
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        seq=scene.sequence_editor
-        editpoints = geteditpoints(seq)
-        bpy.context.scene.frame_current = searchnext(scene.frame_current, editpoints)
-        last = 0
-        for i in editpoints:
-            if i > last: last = i
-        if bpy.context.scene.frame_current == last:
-            bpy.context.scene.frame_current = last-1
-            self.report({'INFO'},'Last Frame')
-        return {'FINISHED'}
- 
-# MARKER 
-class OBJECT_OT_Markerprev(bpy.types.Operator): 
-    bl_label = "Marker previous"
-    bl_idname = "sequencer.markprev"
-    bl_description = "jump to previous marker"
-        
-    def invoke(self, context, event):
-        markerlist = []
-        scene= bpy.context.scene
-        markers = scene.timeline_markers
-        for i in markers: markerlist.append(i.frame)
-        bpy.context.scene.frame_current = searchprev(scene.frame_current, markerlist)
-        return {'FINISHED'}
-    
-class OBJECT_OT_Markernext(bpy.types.Operator):  
-    bl_label = "Marker next"
-    bl_idname = "sequencer.marknext"
-    bl_description = "jump to next marker"
-        
-    def invoke(self, context, event):
-        markerlist = []
-        scene= bpy.context.scene
-        markers = scene.timeline_markers
-        for i in markers: markerlist.append(i.frame)
-        bpy.context.scene.frame_current = searchnext(scene.frame_current, markerlist)
-        return {'FINISHED'}
-
-# SOURCE IN OUT
-              
-class OBJECT_OT_Sourcein(bpy.types.Operator):  #Operator source in
-    bl_label = "Source IN"
-    bl_idname = "sequencer.sourcein"
-    bl_description = "add a marker named IN"
-    
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        seq = scene.sequence_editor
-        markers=scene.timeline_markers
-        if "OUT" in markers:
-            sout=markers["OUT"]
-            if scene.frame_current <= sout.frame:
-                if "IN" not in markers:
-                    sin=markers.new(name="IN")
-                    sin.frame=scene.frame_current
-                else:
-                    sin=markers["IN"]
-                    sin.frame=scene.frame_current
-            #trying to set in after out
-            else:  
-                if "IN" not in markers:
-                    sin=markers.new(name="IN")
-                    sin.frame=sout.frame
-                else:
-                    sin=markers["IN"]
-                    sin.frame=sout.frame
-                self.report({'WARNING'},'IN after OUT')
-        else:
-            if "IN" not in markers:
-                sin=markers.new(name="IN")
-                sin.frame=scene.frame_current
-            else:
-                sin=markers["IN"]
-                sin.frame=scene.frame_current
-        if seq:
-            bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-class OBJECT_OT_Sourceout(bpy.types.Operator):  #Operator source out
-    bl_label = "Source OUT"
-    bl_idname = "sequencer.sourceout"
-    bl_description = "add a marker named OUT"
-    
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        seq = scene.sequence_editor
-        markers=scene.timeline_markers
-        if "IN" in markers:
-            sin=markers["IN"]
-            if scene.frame_current >= sin.frame:
-                if "OUT" not in markers:
-                    sout= markers.new(name="OUT")
-                    sout.frame=scene.frame_current
-                else:
-                    sout=markers["OUT"]
-                    sout.frame=scene.frame_current 
-            #trying to set out before in 
-            else:
-                if "OUT" not in markers:
-                    sout= markers.new(name="OUT")
-                    sout.frame = sin.frame
-                else:
-                    sout=markers["OUT"]
-                    sout.frame = sin.frame 
-                self.report({'WARNING'}, "OUT before IN")
-        else:
-            sout= markers.new(name="OUT")
-            sout.frame=scene.frame_current
-        if seq:
-            bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-
-
-class OBJECT_OT_Setstartend(bpy.types.Operator):  #Operator set start & end
-    bl_label = "set Start & End"
-    bl_idname = "sequencer.setstartend"
-    bl_description = "set Start = In and End = Out"
-    
-    def invoke(self, context, event):
-        scene=bpy.context.scene
-        seq = scene.sequence_editor
-        markers=scene.timeline_markers
-        if seq:
-            if "IN" and "OUT" in markers:
-                sin=markers["IN"]
-                sout=markers["OUT"]
-                scene.frame_start = sin.frame
-                scene.frame_end = sout.frame
-                print("change")
-            else:
-                self.report({'WARNING'}, "there is no IN and OUT")
-            bpy.ops.sequencer.reload()
-        return {'FINISHED'}
-
-    
-# COPY PASTE
-
-class OBJECT_OT_Metacopy(bpy.types.Operator):  #Operator copy source in/out
-    bl_label = "Trim & Meta-Copy"
-    bl_idname = "sequencer.metacopy"
-    bl_description = "make meta from selected strips, trim it to in/out (if available) and copy it to clipboard"
-    
-    def invoke(self, context, event):
-        # rehacer
-        scene=bpy.context.scene
-        seq = scene.sequence_editor
-        markers=scene.timeline_markers
-        strip1= seq.active_strip
-        if strip1 != None:
-            if "IN" and "OUT" in markers:
-                sin=markers["IN"].frame
-                sout=markers["OUT"].frame
-                bpy.ops.sequencer.meta_make()
-                strip2= seq.active_strip
-                triminout(strip2,sin,sout)
-                bpy.ops.sequencer.copy()
-                bpy.ops.sequencer.meta_separate()
-                self.report({'INFO'}, "META has been trimed and copied")              
-            else:
-                bpy.ops.sequencer.meta_make()
-                bpy.ops.sequencer.copy()
-                bpy.ops.sequencer.meta_separate()
-                self.report({'WARNING'}, "No In & Out!! META has been copied")
-        else:
-            self.report({'ERROR'}, "No strip selected")
-        return {'FINISHED'}
-        
-class OBJECT_OT_Metapaste(bpy.types.Operator):  #Operator paste source in/out
-    bl_label = "Paste in current Frame"
-    bl_idname = "sequencer.metapaste"
-    bl_description = "paste source from clipboard to current frame"
-    
-    def invoke(self, context, event):
-        # rehacer
-        scene=bpy.context.scene
-        bpy.ops.sequencer.paste()
-        bpy.ops.sequencer.snap(frame=scene.frame_current)
-        return {'FINISHED'}
-
-# Registering / Unregister
- 
-def register():
-    bpy.utils.register_class(Jumptocut)
-    bpy.utils.register_class(OBJECT_OT_Jumpprev)
-    bpy.utils.register_class(OBJECT_OT_Jumpnext)
-    bpy.utils.register_class(OBJECT_OT_Markerprev)
-    bpy.utils.register_class(OBJECT_OT_Markernext)    
-    bpy.utils.register_class(OBJECT_OT_Sourcein)
-    bpy.utils.register_class(OBJECT_OT_Sourceout)
-    bpy.utils.register_class(OBJECT_OT_Metacopy)
-    bpy.utils.register_class(OBJECT_OT_Metapaste)
-    bpy.utils.register_class(OBJECT_OT_Triminout)
-    bpy.utils.register_class(OBJECT_OT_Setinout)
-    bpy.utils.register_class(OBJECT_OT_Setstartend)
-    
-def unregister():
-    bpy.utils.unregister_class(Jumptocut)
-    bpy.utils.unregister_class(OBJECT_OT_Jumpprev)
-    bpy.utils.unregister_class(OBJECT_OT_Jumpnext)
-    bpy.utils.unregister_class(OBJECT_OT_Markerprev)
-    bpy.utils.unregister_class(OBJECT_OT_Markernext)      
-    bpy.utils.unregister_class(OBJECT_OT_Sourcein)
-    bpy.utils.unregister_class(OBJECT_OT_Sourceout)
-    bpy.utils.unregister_class(OBJECT_OT_Metacopy)
-    bpy.utils.unregister_class(OBJECT_OT_Metapaste)
-    bpy.utils.unregister_class(OBJECT_OT_Triminout)
-    bpy.utils.unregister_class(OBJECT_OT_Setinout)
-    bpy.utils.unregister_class(OBJECT_OT_Setstartend)
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/sequencer_tools/__init__.py b/release/scripts/addons_contrib/sequencer_tools/__init__.py
deleted file mode 100644
index 3d1cce2..0000000
--- a/release/scripts/addons_contrib/sequencer_tools/__init__.py
+++ /dev/null
@@ -1,120 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Sequencer Tools",
-    "author": "mont29",
-    "version": (0, 0, 1),
-    "blender": (2, 6, 3),
-    "location": "Sequencer menus/UI",
-    "description": "Various Sequencer tools.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Sequencer/Tools",
-    "tracker_url": "projects.blender.org/tracker/index.php?func=detail&aid=31549",
-    "support": 'TESTING',
-    "category": "Sequencer"
-}
-
-
-import bpy
-
-from sequencer_tools.export_strips import SEQExportStrip
-
-
-KEYMAPS = (
-    # First, keymap identifiers (last bool is True for modal km).
-    (("Sequencer", "WINDOW", "SEQUENCE_EDITOR", False), (
-    # Then a tuple of keymap items, defined by a dict of kwargs for
-    # the km new func, and a tuple of tuples (name, val) for ops properties,
-    # if needing non-default values.
-        ({"idname": SEQExportStrip.bl_idname, "type": "P", "value": "PRESS",
-                                              "shift": True, "ctrl": True},
-         ()),
-    )),
-)
-
-
-def menu_func(self, context):
-    self.layout.operator(SEQExportStrip.bl_idname, text="Export Selected")
-
-
-def find_keymap_items(km, idname):
-    return (i for i in km.keymap_items if i.idname == idname)
-
-
-def update_keymap(activate):
-    # Add.
-    if activate:
-        kconf = bpy.context.window_manager.keyconfigs.addon
-        for km_info, km_items in KEYMAPS:
-            km_name, km_regtype, km_sptype, km_ismodal = km_info
-            kmap = [k for k in kconf.keymaps
-                    if k.name == km_name and k.region_type == km_regtype and
-                       k.space_type == km_sptype and k.is_modal == km_ismodal]
-            if kmap:
-                kmap = kmap[0]
-            else:
-                kmap = kconf.keymaps.new(km_name, region_type=km_regtype,
-                                         space_type=km_sptype,
-                                         modal=km_ismodal)
-            for kmi_kwargs, props in km_items:
-                kmi = kmap.keymap_items.new(**kmi_kwargs)
-                kmi.active = True
-                for prop, val in props:
-                    setattr(kmi.properties, prop, val)
-
-    # Remove.
-    else:
-        # XXX We must also clean up user keyconfig, else, if user has
-        #     customized one of our shortcut, this customization
-        #     remains in memory, and comes back when re-enabling the addon,
-        #     causing a sigsev... :/
-        kconfs = bpy.context.window_manager.keyconfigs
-        for kconf in (kconfs.user, kconfs.addon):
-            for km_info, km_items in KEYMAPS:
-                km_name, km_regtype, km_sptype, km_ismodal = km_info
-                kmaps = (k for k in kconf.keymaps
-                         if k.name == km_name and
-                            k.region_type == km_regtype and
-                            k.space_type == km_sptype and
-                            k.is_modal == km_ismodal)
-                for kmap in kmaps:
-                    for kmi_kwargs, props in km_items:
-                        for kmi in find_keymap_items(kmap,
-                                                     kmi_kwargs["idname"]):
-                            kmap.keymap_items.remove(kmi)
-                # XXX We won’t remove addons keymaps themselves,
-                #     other addons might also use them!
-
-
-def register():
-    bpy.utils.register_module(__name__)
-    bpy.types.SEQUENCER_MT_strip.append(menu_func)
-
-    update_keymap(True)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-    bpy.types.SEQUENCER_MT_strip.remove(menu_func)
-
-    update_keymap(False)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/sequencer_tools/export_strips.py b/release/scripts/addons_contrib/sequencer_tools/export_strips.py
deleted file mode 100644
index 5857eb3..0000000
--- a/release/scripts/addons_contrib/sequencer_tools/export_strips.py
+++ /dev/null
@@ -1,72 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-from bpy.props import StringProperty
-
-class SEQExportStrip(bpy.types.Operator):
-    """
-    Export (render) selected strips in sequencer
-    """
-    bl_idname = "sequencer.export_strips"
-    bl_label = "Export Strips"
-    filepath = StringProperty(subtype='FILE_PATH')
-
-    def execute(self, context):
-        sce = bpy.context.scene
-        back_filepath = sce.render.filepath
-        back_seq = sce.render.use_sequencer
-        back_start = sce.frame_start
-        back_end = sce.frame_end
-        hidden_seq = []
-
-        sce.render.use_sequencer = True
-        sce.render.filepath = self.filepath
-        seq = sce.sequence_editor
-        start = end = None
-        for strip in seq.sequences_all:
-            if not strip.select:
-                if not strip.mute:
-                    strip.mute = True
-                    hidden_seq.append(strip)
-                continue
-            if start is None or strip.frame_final_start < start:
-                start = strip.frame_final_start
-            if end is None or strip.frame_final_end < end:
-                end = strip.frame_final_end
-        sce.frame_start = start
-        sce.frame_end = end
-
-        # Non-blocking render!
-        bpy.ops.render.render("INVOKE_DEFAULT", animation=True)
-
-        for strip in hidden_seq:
-            strip.mute = False
-        sce.render.use_sequencer = back_seq
-        sce.render.filepath = back_filepath
-        sce.frame_start = back_start
-        sce.frame_end = back_end
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        if not self.filepath:
-            self.filepath = bpy.context.scene.render.filepath
-        winman = context.window_manager
-        winman.fileselect_add(self)
-        return {'RUNNING_MODAL'}
-
diff --git a/release/scripts/addons_contrib/space_view3d_add_surround_cameras.py b/release/scripts/addons_contrib/space_view3d_add_surround_cameras.py
deleted file mode 100644
index f01b52a..0000000
--- a/release/scripts/addons_contrib/space_view3d_add_surround_cameras.py
+++ /dev/null
@@ -1,247 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': "Surround Projection Tools",
-    'author': "Cole Ingraham",
-    'location': "View3D > Tool Shelf > Surround Projection panel",
-    'description': "Setup cameras and create rendering scenes for n-screen surround projection.",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Surround_Projection_Tools",
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-                   'func=detail&aid=29266',
-    'version': (0,1,2),
-    'blender': (2, 6, 0),
-    'category': '3D View'
-}
-
-import bpy
-from bpy.props import IntProperty
-from bpy.props import BoolProperty
-from math import pi
-import re
-
-CAMERA_ORIGIN_NAME = "CameraOrigin"
-
-# property for how many screens to add
-bpy.types.WindowManager.num_surround_screens = IntProperty(
-    name="Number of screens",
-    description="How many screens to add",
-    default=4,
-    min=3)
-
-# safeguard for removing previous cameras/scenes
-bpy.types.WindowManager.previous_num_surround_screens = IntProperty(
-    name="Previous number of screens",
-    description="used for removing cameras/scenes",
-    default=-1)
-
-# used to enable/disable make/remove scenes and cameras
-bpy.types.WindowManager.surround_screens_init = BoolProperty(
-    name="SurroundScenesInit",
-    default=False)
-
-# GUI panel
-class AddSurroundCamerasPanel(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Surround Projection"
-    bl_options = {'DEFAULT_CLOSED'}
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column(align=True)
-
-        row = col.row()
-        row.prop(context.window_manager, "num_surround_screens")
-        row = col.row()
-        
-        if context.window_manager.previous_num_surround_screens is not -1:
-             row.operator('objects.remove_surround_cameras', icon='X')
-        else:
-             row.operator('objects.add_surround_cameras', icon='CAMERA_DATA')
-        
-        row = col.row()
-        
-        if context.window_manager.surround_screens_init is True:
-             row.operator('objects.remove_linked_scenes_for_surround_cameras', icon='X')
-        else:
-             row.operator('scene.add_linked_scenes_for_surround_cameras', icon='SCENE_DATA')
-
-        #col = layout.column(align=True)
-        #row = col.row()
-        #row.operator('objects.remove_surround_cameras', icon='X')
-        #row = col.row()
-        #row.operator('objects.remove_linked_scenes_for_surround_cameras', icon='X')
-
-
-# operator for adding cameras
-class AddSurroundCamerasOperator(bpy.types.Operator):
-    bl_idname = 'objects.add_surround_cameras'
-    bl_label = "Add Cameras"
-    bl_description = "Add n cameras"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        return context.window_manager.previous_num_surround_screens is -1
-
-    def execute(self, context):
-
-        scene = context.scene
-        numScreens = context.window_manager.num_surround_screens
-
-        # add an empty for the camera origin if not already present
-        obj_origin = scene.objects.get(CAMERA_ORIGIN_NAME)
-        if not obj_origin:
-            bpy.ops.object.add()
-            obj_origin = context.active_object
-            obj_origin.name = CAMERA_ORIGIN_NAME
-            obj_origin.location = scene.cursor_location
-
-        for i in range(0,numScreens):
-
-            # add a new camer
-            bpy.ops.object.camera_add()
-
-            # get the current camera
-            cam = context.active_object
-
-            # name the camera
-            cameraName = "Camera" + str(i)
-            cam.name = cameraName
-            cam.data.name = cameraName
-
-            # position camera
-            cam.location = 0,0,0
-            cam.rotation_euler = (pi/2), 0, ((-2*pi)/numScreens) * i
-
-            # set the field of view angle
-            cam.data.angle = (2*pi)/numScreens
-
-            # make the parent of the camera the origin
-            cam.parent = obj_origin
-
-        # sel/activate origin
-        bpy.ops.object.select_all(action='DESELECT')
-        obj_origin.select = True
-        scene.objects.active = obj_origin
-
-        context.window_manager.previous_num_surround_screens = numScreens
-        return {'FINISHED'}
-
-
-# operator for creating new linked scenes for each camera
-class AddSurroundScenesOperator(bpy.types.Operator):
-    bl_idname = 'scene.add_linked_scenes_for_surround_cameras'
-    bl_label = "Make Scenes"
-    bl_description = "Creates new scenes with linked object data for each camera"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        if context.window_manager.previous_num_surround_screens is not -1 and context.window_manager.surround_screens_init is False:
-            return True
-        return False
-
-    def execute(self, context):
-        scene_base = context.scene
-        numScreens = context.window_manager.previous_num_surround_screens
-        sceneName = scene_base.name
-        renderpath = scene_base.render.filepath
-
-        for i in range(0, numScreens):
-
-            thisScene = sceneName + "-Camera" + str(i)
-
-            bpy.ops.scene.new(type='EMPTY')
-            scene_new = context.scene
-            scene_new.name = thisScene
-
-            camera_object = bpy.data.objects["Camera" + str(i)]
-            scene_new.camera = camera_object
-            scene_new.background_set = scene_base
-            
-            # not essential but nice to have the camera in the scene
-            scene_new.objects.link(camera_object)
-
-            scene_new.render.filepath = renderpath + thisScene
-
-        context.screen.scene = scene_base
-        context.window_manager.surround_screens_init = True
-        return {'FINISHED'}
-
-
-# operator for removing the surround scenes
-class RemoveSurroundScenesOperator(bpy.types.Operator):
-    bl_idname = 'objects.remove_linked_scenes_for_surround_cameras'
-    bl_label = "Remove Scenes"
-    bl_description = "Removes all surround scenes"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        return context.window_manager.surround_screens_init is True
-
-    def execute(self, context):
-        numScreens = context.window_manager.previous_num_surround_screens
-
-        for scene in list(bpy.data.scenes):
-            if re.search("-Camera",scene.name):
-                bpy.data.scenes.remove(scene)
-
-        context.window_manager.surround_screens_init = False
-        return {'FINISHED'}
-
-
-# operator for removing the surround cameras/scenes
-class RemoveSurroundCamerasOperator(bpy.types.Operator):
-    bl_idname = 'objects.remove_surround_cameras'
-    bl_label = "Remove Cameras"
-    bl_description = "Removes all surround cameras"
-    bl_options = {'REGISTER', 'UNDO'}
-
-    @classmethod
-    def poll(cls, context):
-        if context.window_manager.previous_num_surround_screens is not -1 and context.window_manager.surround_screens_init is False:
-            return True
-        return False
-
-    def execute(self, context):
-
-        scene = context.scene
-
-        # XXX. shouldnt there be some less general way to do this?
-        # like check if they are the child of origin? - campbell
-        for obj in scene.objects[:]:
-            if obj.type == 'CAMERA':
-                scene.objects.unlink(obj)
-
-        context.window_manager.previous_num_surround_screens = -1
-        return {'FINISHED'}
-
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/space_view3d_enhanced_3d_cursor.py b/release/scripts/addons_contrib/space_view3d_enhanced_3d_cursor.py
deleted file mode 100644
index ef23ebb..0000000
--- a/release/scripts/addons_contrib/space_view3d_enhanced_3d_cursor.py
+++ /dev/null
@@ -1,5562 +0,0 @@
-#  ***** BEGIN GPL LICENSE BLOCK *****
-#
-#  This program is free software: you can redistribute it and/or modify
-#  it under the terms of the GNU General Public License as published by
-#  the Free Software Foundation, either version 3 of the License, or
-#  (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-#  ***** END GPL LICENSE BLOCK *****
-
-# <pep8-80 compliant>
-
-bl_info = {
-    "name": "Enhanced 3D Cursor",
-    "description": "Cursor history and bookmarks; drag/snap cursor.",
-    "author": "dairin0d",
-    "version": (2, 8, 7),
-    "blender": (2, 6, 3),
-    "location": "View3D > Action mouse; F10; Properties panel",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/3D_interaction/Enhanced_3D_Cursor",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=28451",
-    "category": "3D View"}
-#============================================================================#
-
-"""
-ATTENTION:
-somewhere around 45447 revision object.ray_cast() starts conflicting with
-mesh.update(calc_tessface=True) -- at least when invoked within one
-operator cycle, object.ray_cast() crashes if object's tessfaces were
-update()d earlier in the code. However, not update()ing the meshes
-seems to work fine -- ray_cast() does its job, and it's possible to
-access tessfaces afterwards.
-mesh.calc_tessface() -- ? crashes too
-
-Seems like now axes are stored in columns instead of rows.
-Perhaps it's better to write utility functions to create/decompose
-matrices from/to 3D-vector axes and a translation component
-
-Breakdown:
-    Addon registration
-    Keymap utils
-    Various utils (e.g. find_region)
-    OpenGL; drawing utils
-    Non-undoable data storage
-    Cursor utils
-    Stick-object
-    Cursor monitor
-    Addon's GUI
-    Addon's properties
-    Addon's operators
-    ID Block emulator
-    Mesh cache
-    Snap utils
-    View3D utils
-    Transform orientation / coordinate system utils
-    Generic transform utils
-    Main operator
-    ...
-.
-
-First step is to re-make the cursor addon (make something usable first).
-CAD tools should be done without the hassle.
-
-TODO:
-    strip trailing space? (one of campbellbarton's commits did that)
-    
-    IDEAS:
-        - implement 'GIMBAL' orientation (euler axes)
-        - mini-Z-buffer in the vicinity of mouse coords (using raycasts)
-        - an orientation that points towards cursor
-          (from current selection to cursor)
-        - user coordinate systems (using e.g. empties to store different
-          systems; when user switches to such UCS, origin will be set to
-          "cursor", cursor will be sticked to the empty, and a custom
-          transform orientation will be aligned with the empty)
-          - "Stick" transform orientation that is always aligned with the
-            object cursor is "sticked" to?
-        - make 'NORMAL' system also work for bones?
-        - user preferences? (stored in a file)
-        - create spline/edge_mesh from history?
-        - API to access history/bookmarks/operators from other scripts?
-        - Snap selection to bookmark?
-        - Optimize
-        - Clean up code, move to several files?
-    LATER:
-    ISSUES:
-        Limitations:
-            - I need to emulate in Python some things that Blender doesn't
-              currently expose through API:
-              - obtaining matrix of predefined transform orientation
-              - obtaining position of pivot
-              For some kinds of information (e.g. active vertex/edge,
-              selected meta-elements), there is simply no workaround.
-            - Snapping to vertices/edges works differently than in Blender.
-              First of all, iteration over all vertices/edges of all
-              objects along the ray is likely to be very slow.
-              Second, it's more human-friendly to snap to visible
-              elements (or at least with approximately known position).
-            - In editmode I have to exit-and-enter it to get relevant
-              information about current selection. Thus any operator
-              would automatically get applied when you click on 3D View.
-        Mites:
-    QUESTIONS:
-==============================================================================
-Borrowed code/logic:
-- space_view3d_panel_measure.py (Buerbaum Martin "Pontiac"):
-  - OpenGL state storing/restoring; working with projection matrices.
-"""
-
-import bpy
-import bgl
-import blf
-import bmesh
-
-from mathutils import Vector, Matrix, Quaternion, Euler
-
-from mathutils.geometry import (intersect_line_sphere,
-                                intersect_ray_tri,
-                                barycentric_transform,
-                                tessellate_polygon,
-                                intersect_line_line,
-                                intersect_line_plane,
-                                )
-
-from bpy_extras.view3d_utils import (region_2d_to_location_3d,
-                                     location_3d_to_region_2d,
-                                     )
-
-import math
-import time
-
-# ====== MODULE GLOBALS / CONSTANTS ====== #
-tmp_name = chr(0x10ffff) # maximal Unicode value
-epsilon = 0.000001
-
-# ====== SET CURSOR OPERATOR ====== #
-class EnhancedSetCursor(bpy.types.Operator):
-    """Cursor history and bookmarks; drag/snap cursor."""
-    bl_idname = "view3d.cursor3d_enhanced"
-    bl_label = "Enhanced Set Cursor"
-    
-    key_char_map = {
-        'PERIOD':".", 'NUMPAD_PERIOD':".",
-        'MINUS':"-", 'NUMPAD_MINUS':"-",
-        'EQUAL':"+", 'NUMPAD_PLUS':"+",
-        #'E':"e", # such big/small numbers aren't useful
-        'ONE':"1", 'NUMPAD_1':"1",
-        'TWO':"2", 'NUMPAD_2':"2",
-        'THREE':"3", 'NUMPAD_3':"3",
-        'FOUR':"4", 'NUMPAD_4':"4",
-        'FIVE':"5", 'NUMPAD_5':"5",
-        'SIX':"6", 'NUMPAD_6':"6",
-        'SEVEN':"7", 'NUMPAD_7':"7",
-        'EIGHT':"8", 'NUMPAD_8':"8",
-        'NINE':"9", 'NUMPAD_9':"9",
-        'ZERO':"0", 'NUMPAD_0':"0",
-        'SPACE':" ",
-        'SLASH':"/", 'NUMPAD_SLASH':"/",
-        'NUMPAD_ASTERIX':"*",
-    }
-    
-    key_coordsys_map = {
-        'LEFT_BRACKET':-1,
-        'RIGHT_BRACKET':1,
-        'J':'VIEW',
-        'K':"Surface",
-        'L':'LOCAL',
-        'B':'GLOBAL',
-        'N':'NORMAL',
-        'M':"Scaled",
-    }
-    
-    key_pivot_map = {
-        'H':'ACTIVE',
-        'U':'CURSOR',
-        'I':'INDIVIDUAL',
-        'O':'CENTER',
-        'P':'MEDIAN',
-    }
-    
-    key_snap_map = {
-        'C':'INCREMENT',
-        'V':'VERTEX',
-        'E':'EDGE',
-        'F':'FACE',
-    }
-    
-    key_tfm_mode_map = {
-        'G':'MOVE',
-        'R':'ROTATE',
-        'S':'SCALE',
-    }
-    
-    key_map = {
-        "confirm":{'ACTIONMOUSE'}, # also 'RET' ?
-        "cancel":{'SELECTMOUSE', 'ESC'},
-        "free_mouse":{'F10'},
-        "make_normal_snapshot":{'W'},
-        "make_tangential_snapshot":{'Q'},
-        "use_absolute_coords":{'A'},
-        "snap_to_raw_mesh":{'D'},
-        "use_object_centers":{'T'},
-        "precision_up":{'PAGE_UP'},
-        "precision_down":{'PAGE_DOWN'},
-        "move_caret_prev":{'LEFT_ARROW'},
-        "move_caret_next":{'RIGHT_ARROW'},
-        "move_caret_home":{'HOME'},
-        "move_caret_end":{'END'},
-        "change_current_axis":{'TAB', 'RET', 'NUMPAD_ENTER'},
-        "prev_axis":{'UP_ARROW'},
-        "next_axis":{'DOWN_ARROW'},
-        "remove_next_character":{'DEL'},
-        "remove_last_character":{'BACK_SPACE'},
-        "copy_axes":{'C'},
-        "paste_axes":{'V'},
-        "cut_axes":{'X'},
-    }
-    
-    gizmo_factor = 0.15
-    click_period = 0.25
-    
-    angle_grid_steps = {True:1.0, False:5.0}
-    scale_grid_steps = {True:0.01, False:0.1}
-    
-    # ====== OPERATOR METHOD OVERLOADS ====== #
-    @classmethod
-    def poll(cls, context):
-        area_types = {'VIEW_3D',} # also: IMAGE_EDITOR ?
-        return (context.area.type in area_types) and \
-               (context.region.type == "WINDOW")
-    
-    def modal(self, context, event):
-        context.area.tag_redraw()
-        return self.try_process_input(context, event)
-    
-    def invoke(self, context, event):
-        # Attempt to launch the monitor
-        if bpy.ops.view3d.cursor3d_monitor.poll():
-            bpy.ops.view3d.cursor3d_monitor()
-        
-        # Don't interfere with these modes when only mouse is pressed
-        if ('SCULPT' in context.mode) or ('PAINT' in context.mode):
-            if "MOUSE" in event.type:
-                return {'CANCELLED'}
-        
-        CursorDynamicSettings.active_transform_operator = self
-        
-        tool_settings = context.tool_settings
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        settings_scene = context.scene.cursor_3d_tools_settings
-        
-        self.setup_keymaps(context, event)
-        
-        # Coordinate System Utility
-        self.particles, self.csu = gather_particles(context=context)
-        self.particles = [View3D_Cursor(context)]
-        
-        self.csu.source_pos = self.particles[0].get_location()
-        self.csu.source_rot = self.particles[0].get_rotation()
-        self.csu.source_scale = self.particles[0].get_scale()
-        
-        # View3D Utility
-        self.vu = ViewUtility(context.region, context.space_data,
-            context.region_data)
-        
-        # Snap Utility
-        self.su = SnapUtility(context)
-        
-        # turn off view locking for the duration of the operator
-        self.view_pos = self.vu.get_position(True)
-        self.vu.set_position(self.vu.get_position(), True)
-        self.view_locks = self.vu.get_locks()
-        self.vu.set_locks({})
-        
-        # Initialize runtime states
-        self.initiated_by_mouse = ("MOUSE" in event.type)
-        self.free_mouse = not self.initiated_by_mouse
-        self.use_object_centers = False
-        self.axes_values = ["", "", ""]
-        self.axes_coords = [None, None, None]
-        self.axes_eval_success = [True, True, True]
-        self.allowed_axes = [True, True, True]
-        self.current_axis = 0
-        self.caret_pos = 0
-        self.coord_format = "{:." + str(settings.free_coord_precision) + "f}"
-        self.transform_mode = 'MOVE'
-        self.init_xy_angle_distance(context, event)
-        
-        self.click_start = time.time()
-        if not self.initiated_by_mouse:
-            self.click_start -= self.click_period
-        
-        self.stick_obj_name = settings_scene.stick_obj_name
-        self.stick_obj_pos = settings_scene.stick_obj_pos
-        
-        # Initial run
-        self.try_process_input(context, event, True)
-
-        context.window_manager.modal_handler_add(self)
-        return {'RUNNING_MODAL'}
-    
-    def cancel(self, context):
-        for particle in self.particles:
-            particle.revert()
-        
-        set_stick_obj(context.scene, self.stick_obj_name, self.stick_obj_pos)
-        
-        self.finalize(context)
-        return {'CANCELLED'}
-    
-    # ====== CLEANUP/FINALIZE ====== #
-    def finalize(self, context):
-        # restore view locking
-        self.vu.set_locks(self.view_locks)
-        self.vu.set_position(self.view_pos, True)
-        
-        self.cleanup(context)
-        
-        # This is to avoid "blinking" of
-        # between-history-positions line
-        settings = find_settings()
-        history = settings.history
-        # make sure the most recent history entry is displayed
-        history.curr_id = 0
-        history.last_id = 0
-        
-        # Ensure there are no leftovers from draw_callback
-        context.area.tag_redraw()
-        
-        return {'FINISHED'}
-    
-    def cleanup(self, context):
-        self.particles = None
-        self.csu = None
-        self.vu = None
-        if self.su is not None:
-            self.su.dispose()
-        self.su = None
-        
-        CursorDynamicSettings.active_transform_operator = None
-    
-    # ====== USER INPUT PROCESSING ====== #
-    def setup_keymaps(self, context, event=None):
-        self.key_map = self.key_map.copy()
-        
-        # There is no such event as 'ACTIONMOUSE',
-        # it's always 'LEFTMOUSE' or 'RIGHTMOUSE'
-        if event:
-            if event.type == 'LEFTMOUSE':
-                self.key_map["confirm"] = {'LEFTMOUSE'}
-                self.key_map["cancel"] = {'RIGHTMOUSE', 'ESC'}
-            elif event.type == 'RIGHTMOUSE':
-                self.key_map["confirm"] = {'RIGHTMOUSE'}
-                self.key_map["cancel"] = {'LEFTMOUSE', 'ESC'}
-            else:
-                event = None
-        if event is None:
-            select_mouse = context.user_preferences.inputs.select_mouse
-            if select_mouse == 'RIGHT':
-                self.key_map["confirm"] = {'LEFTMOUSE'}
-                self.key_map["cancel"] = {'RIGHTMOUSE', 'ESC'}
-            else:
-                self.key_map["confirm"] = {'RIGHTMOUSE'}
-                self.key_map["cancel"] = {'LEFTMOUSE', 'ESC'}
-        
-        # Use user-defined "free mouse" key, if it exists
-        wm = context.window_manager
-        if '3D View' in wm.keyconfigs.user.keymaps:
-            km = wm.keyconfigs.user.keymaps['3D View']
-            for kmi in km.keymap_items:
-                if kmi.idname == 'view3d.cursor3d_enhanced':
-                    if kmi.map_type == 'KEYBOARD':
-                        self.key_map["free_mouse"] = {kmi.type,}
-                        break
-    
-    def try_process_input(self, context, event, initial_run=False):
-        try:
-            return self.process_input(context, event, initial_run)
-        except:
-            # If anything fails, at least dispose the resources
-            self.cleanup(context)
-            raise
-    
-    def process_input(self, context, event, initial_run=False):
-        wm = context.window_manager
-        v3d = context.space_data
-        
-        if event.type in self.key_map["confirm"]:
-            if self.free_mouse:
-                finished = (event.value == 'PRESS')
-            else:
-                finished = (event.value == 'RELEASE')
-            
-            if finished:
-                return self.finalize(context)
-        
-        if event.type in self.key_map["cancel"]:
-            return self.cancel(context)
-        
-        tool_settings = context.tool_settings
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        make_snapshot = False
-        tangential_snapshot = False
-        
-        if event.value == 'PRESS':
-            if event.type in self.key_map["free_mouse"]:
-                if self.free_mouse and (not initial_run):
-                    # confirm if pressed second time
-                    return self.finalize(context)
-                else:
-                    self.free_mouse = True
-            
-            if event.type in self.key_tfm_mode_map:
-                new_mode = self.key_tfm_mode_map[event.type]
-                
-                if self.transform_mode != new_mode:
-                    # snap cursor to its initial state
-                    if new_mode != 'MOVE':
-                        for particle in self.particles:
-                            initial_matrix = particle.get_initial_matrix()
-                            particle.set_matrix(initial_matrix)
-                    # reset intial mouse position
-                    self.init_xy_angle_distance(context, event)
-                
-                self.transform_mode = new_mode
-            
-            if event.type in self.key_map["make_normal_snapshot"]:
-                make_snapshot = True
-                tangential_snapshot = False
-            
-            if event.type in self.key_map["make_tangential_snapshot"]:
-                make_snapshot = True
-                tangential_snapshot = True
-            
-            if event.type in self.key_map["snap_to_raw_mesh"]:
-                tool_settings.use_snap_self = \
-                    not tool_settings.use_snap_self
-            
-            if (not event.alt) and (event.type in {'X', 'Y', 'Z'}):
-                axis_lock = [(event.type == 'X') != event.shift,
-                             (event.type == 'Y') != event.shift,
-                             (event.type == 'Z') != event.shift]
-                
-                if self.allowed_axes != axis_lock:
-                    self.allowed_axes = axis_lock
-                else:
-                    self.allowed_axes = [True, True, True]
-            
-            if event.type in self.key_map["use_absolute_coords"]:
-                tfm_opts.use_relative_coords = \
-                    not tfm_opts.use_relative_coords
-                
-                self.update_origin_projection(context)
-            
-            incr = 0
-            if event.type in self.key_map["change_current_axis"]:
-                incr = (-1 if event.shift else 1)
-            elif event.type in self.key_map["next_axis"]:
-                incr = 1
-            elif event.type in self.key_map["prev_axis"]:
-                incr = -1
-            
-            if incr != 0:
-                self.current_axis = (self.current_axis + incr) % 3
-                self.caret_pos = len(self.axes_values[self.current_axis])
-            
-            incr = 0
-            if event.type in self.key_map["precision_up"]:
-                incr = 1
-            elif event.type in self.key_map["precision_down"]:
-                incr = -1
-            
-            if incr != 0:
-                settings.free_coord_precision += incr
-                self.coord_format = "{:." + \
-                    str(settings.free_coord_precision) + "f}"
-            
-            if (event.type == 'ZERO') and event.ctrl:
-                self.snap_to_system_origin()
-            else:
-                self.process_axis_input(event)
-            
-            if event.alt:
-                jc = (", " if tfm_opts.use_comma_separator else "\t")
-                if event.type in self.key_map["copy_axes"]:
-                    wm.clipboard = jc.join(self.get_axes_text(True))
-                elif event.type in self.key_map["cut_axes"]:
-                    wm.clipboard = jc.join(self.get_axes_text(True))
-                    self.set_axes_text("\t\t\t")
-                elif event.type in self.key_map["paste_axes"]:
-                    if jc == "\t":
-                        self.set_axes_text(wm.clipboard, True)
-                    else:
-                        jc = jc.strip()
-                        ttext = ""
-                        brackets = 0
-                        for c in wm.clipboard:
-                            if c in "[{(":
-                                brackets += 1
-                            elif c in "]})":
-                                brackets -= 1
-                            if (brackets == 0) and (c == jc):
-                                c = "\t"
-                            ttext += c
-                        self.set_axes_text(ttext, True)
-            
-            if event.type in self.key_coordsys_map:
-                new_orientation = self.key_coordsys_map[event.type]
-                self.csu.set_orientation(new_orientation)
-                
-                self.update_origin_projection(context)
-                
-                if event.ctrl:
-                    self.snap_to_system_origin()
-            
-            if event.type in self.key_map["use_object_centers"]:
-                v3d.use_pivot_point_align = not v3d.use_pivot_point_align
-            
-            if event.type in self.key_pivot_map:
-                self.csu.set_pivot(self.key_pivot_map[event.type])
-                
-                self.update_origin_projection(context)
-                
-                if event.ctrl:
-                    self.snap_to_system_origin(force_pivot=True)
-            
-            if (not event.alt) and (event.type in self.key_snap_map):
-                snap_element = self.key_snap_map[event.type]
-                if tool_settings.snap_element == snap_element:
-                    if snap_element == 'VERTEX':
-                        snap_element = 'VOLUME'
-                    elif snap_element == 'VOLUME':
-                        snap_element = 'VERTEX'
-                tool_settings.snap_element = snap_element
-        # end if
-        
-        if initial_run or (('MOVE' not in event.type) and \
-                ('TIMER' not in event.type)):
-            use_snap = (tool_settings.use_snap != event.ctrl)
-            if use_snap:
-                snap_type = tool_settings.snap_element
-            else:
-                snap_type = None
-            
-            axes_coords = [None, None, None]
-            if self.transform_mode == 'MOVE':
-                for i in range(3):
-                    if self.axes_coords[i] is not None:
-                        axes_coords[i] = self.axes_coords[i]
-                    elif not self.allowed_axes[i]:
-                        axes_coords[i] = 0.0
-            
-            self.su.set_modes(
-                interpolation=tfm_opts.snap_interpolate_normals_mode,
-                use_relative_coords=tfm_opts.use_relative_coords,
-                editmode=tool_settings.use_snap_self,
-                snap_type=snap_type,
-                snap_align=tool_settings.use_snap_align_rotation,
-                axes_coords=axes_coords,
-                )
-        
-        self.do_raycast = ("MOUSE" in event.type)
-        self.grid_substep = event.shift
-        self.modify_surface_orientation = (len(self.particles) == 1)
-        self.xy = Vector((event.mouse_region_x, event.mouse_region_y))
-        
-        self.use_object_centers = v3d.use_pivot_point_align
-        
-        if event.type == 'MOUSEMOVE':
-            self.update_transform_mousemove()
-        
-        if self.transform_mode == 'MOVE':
-            transform_func = self.transform_move
-        elif self.transform_mode == 'ROTATE':
-            transform_func = self.transform_rotate
-        elif self.transform_mode == 'SCALE':
-            transform_func = self.transform_scale
-        
-        for particle in self.particles:
-            transform_func(particle)
-        
-        if make_snapshot:
-            self.make_normal_snapshot(context.scene, tangential_snapshot)
-        
-        return {'RUNNING_MODAL'}
-    
-    def update_origin_projection(self, context):
-        r = context.region
-        rv3d = context.region_data
-        
-        origin = self.csu.get_origin()
-        # prehaps not projection, but intersection with plane?
-        self.origin_xy = location_3d_to_region_2d(r, rv3d, origin)
-        if self.origin_xy is None:
-            self.origin_xy = Vector((r.width / 2, r.height / 2))
-        
-        self.delta_xy = (self.start_xy - self.origin_xy).to_3d()
-        self.prev_delta_xy = self.delta_xy
-    
-    def init_xy_angle_distance(self, context, event):
-        self.start_xy = Vector((event.mouse_region_x, event.mouse_region_y))
-        
-        self.update_origin_projection(context)
-        
-        # Distinction between angles has to be made because
-        # angles can go beyond 360 degrees (we cannot snap
-        # to increment the original ones).
-        self.raw_angles = [0.0, 0.0, 0.0]
-        self.angles = [0.0, 0.0, 0.0]
-        self.scales = [1.0, 1.0, 1.0]
-    
-    def update_transform_mousemove(self):
-        delta_xy = (self.xy - self.origin_xy).to_3d()
-        
-        n_axes = sum(int(v) for v in self.allowed_axes)
-        if n_axes == 1:
-            # rotate using angle as value
-            rd = self.prev_delta_xy.rotation_difference(delta_xy)
-            offset = -rd.angle * round(rd.axis[2])
-            
-            sys_matrix = self.csu.get_matrix()
-            
-            i_allowed = 0
-            for i in range(3):
-                if self.allowed_axes[i]:
-                    i_allowed = i
-            
-            view_dir = self.vu.get_direction()
-            if view_dir.dot(sys_matrix[i_allowed][:3]) < 0:
-                offset = -offset
-            
-            for i in range(3):
-                if self.allowed_axes[i]:
-                    self.raw_angles[i] += offset
-        elif n_axes == 2:
-            # rotate using XY coords as two values
-            offset = (delta_xy - self.prev_delta_xy) * (math.pi / 180.0)
-            
-            if self.grid_substep:
-                offset *= 0.1
-            else:
-                offset *= 0.5
-            
-            j = 0
-            for i in range(3):
-                if self.allowed_axes[i]:
-                    self.raw_angles[i] += offset[1 - j]
-                    j += 1
-        elif n_axes == 3:
-            # rotate around view direction
-            rd = self.prev_delta_xy.rotation_difference(delta_xy)
-            offset = -rd.angle * round(rd.axis[2])
-            
-            view_dir = self.vu.get_direction()
-            
-            sys_matrix = self.csu.get_matrix()
-            
-            try:
-                view_dir = sys_matrix.inverted().to_3x3() * view_dir
-            except:
-                # this is some degenerate system
-                pass
-            view_dir.normalize()
-            
-            rot = Matrix.Rotation(offset, 3, view_dir)
-            
-            matrix = Euler(self.raw_angles, 'XYZ').to_matrix()
-            matrix.rotate(rot)
-            
-            euler = matrix.to_euler('XYZ')
-            self.raw_angles[0] += clamp_angle(euler.x - self.raw_angles[0])
-            self.raw_angles[1] += clamp_angle(euler.y - self.raw_angles[1])
-            self.raw_angles[2] += clamp_angle(euler.z - self.raw_angles[2])
-        
-        scale = delta_xy.length / self.delta_xy.length
-        if self.delta_xy.dot(delta_xy) < 0:
-            scale *= -1
-        for i in range(3):
-            if self.allowed_axes[i]:
-                self.scales[i] = scale
-        
-        self.prev_delta_xy = delta_xy
-    
-    def transform_move(self, particle):
-        src_matrix = particle.get_matrix()
-        initial_matrix = particle.get_initial_matrix()
-        
-        matrix = self.su.snap(
-            self.xy, src_matrix, initial_matrix,
-            self.do_raycast, self.grid_substep,
-            self.vu, self.csu,
-            self.modify_surface_orientation,
-            self.use_object_centers)
-        
-        particle.set_matrix(matrix)
-    
-    def rotate_matrix(self, matrix):
-        sys_matrix = self.csu.get_matrix()
-        
-        try:
-            matrix = sys_matrix.inverted() * matrix
-        except:
-            # this is some degenerate system
-            pass
-        
-        # Blender's order of rotation [in local axes]
-        rotation_order = [2, 1, 0]
-        
-        # Seems that 4x4 matrix cannot be rotated using rotate() ?
-        sys_matrix3 = sys_matrix.to_3x3()
-        
-        for i in range(3):
-            j = rotation_order[i]
-            axis = sys_matrix3[j]
-            angle = self.angles[j]
-            
-            rot = angle_axis_to_quat(angle, axis)
-            # this seems to be buggy too
-            #rot = Matrix.Rotation(angle, 3, axis)
-            
-            sys_matrix3 = rot.to_matrix() * sys_matrix3
-            # sys_matrix3.rotate has a bug? or I don't understand how it works?
-            #sys_matrix3.rotate(rot)
-        
-        for i in range(3):
-            sys_matrix[i][:3] = sys_matrix3[i]
-        
-        matrix = sys_matrix * matrix
-        
-        return matrix
-    
-    def transform_rotate(self, particle):
-        grid_step = self.angle_grid_steps[self.grid_substep]
-        grid_step *= (math.pi / 180.0)
-        
-        for i in range(3):
-            if self.axes_values[i] and self.axes_eval_success[i]:
-                self.raw_angles[i] = self.axes_coords[i] * (math.pi / 180.0)
-            
-            self.angles[i] = self.raw_angles[i]
-        
-        if self.su.implementation.snap_type == 'INCREMENT':
-            for i in range(3):
-                self.angles[i] = round_step(self.angles[i], grid_step)
-        
-        initial_matrix = particle.get_initial_matrix()
-        matrix = self.rotate_matrix(initial_matrix)
-        
-        particle.set_matrix(matrix)
-    
-    def scale_matrix(self, matrix):
-        sys_matrix = self.csu.get_matrix()
-        
-        try:
-            matrix = sys_matrix.inverted() * matrix
-        except:
-            # this is some degenerate system
-            pass
-        
-        for i in range(3):
-            sys_matrix[i] *= self.scales[i]
-        
-        matrix = sys_matrix * matrix
-        
-        return matrix
-    
-    def transform_scale(self, particle):
-        grid_step = self.scale_grid_steps[self.grid_substep]
-        
-        for i in range(3):
-            if self.axes_values[i] and self.axes_eval_success[i]:
-                self.scales[i] = self.axes_coords[i]
-        
-        if self.su.implementation.snap_type == 'INCREMENT':
-            for i in range(3):
-                self.scales[i] = round_step(self.scales[i], grid_step)
-        
-        initial_matrix = particle.get_initial_matrix()
-        matrix = self.scale_matrix(initial_matrix)
-        
-        particle.set_matrix(matrix)
-    
-    def set_axis_input(self, axis_id, axis_val):
-        if axis_val == self.axes_values[axis_id]:
-            return
-        
-        self.axes_values[axis_id] = axis_val
-        
-        if len(axis_val) == 0:
-            self.axes_coords[axis_id] = None
-            self.axes_eval_success[axis_id] = True
-        else:
-            try:
-                #self.axes_coords[axis_id] = float(eval(axis_val, {}, {}))
-                self.axes_coords[axis_id] = \
-                    float(eval(axis_val, math.__dict__))
-                self.axes_eval_success[axis_id] = True
-            except:
-                self.axes_eval_success[axis_id] = False
-    
-    def snap_to_system_origin(self, force_pivot=False):
-        if self.transform_mode == 'MOVE':
-            pivot = self.csu.get_pivot_name(raw=force_pivot)
-            p = self.csu.get_origin(relative=False, pivot=pivot)
-            m = self.csu.get_matrix()
-            try:
-                p = m.inverted() * p
-            except:
-                # this is some degenerate system
-                pass
-            for i in range(3):
-                self.set_axis_input(i, str(p[i]))
-        elif self.transform_mode == 'ROTATE':
-            for i in range(3):
-                self.set_axis_input(i, "0")
-        elif self.transform_mode == 'SCALE':
-            for i in range(3):
-                self.set_axis_input(i, "1")
-    
-    def get_axes_values(self, as_string=False):
-        if self.transform_mode == 'MOVE':
-            localmat = CursorDynamicSettings.local_matrix
-            raw_axes = localmat.translation
-        elif self.transform_mode == 'ROTATE':
-            raw_axes = Vector(self.angles) * (180.0 / math.pi)
-        elif self.transform_mode == 'SCALE':
-            raw_axes = Vector(self.scales)
-        
-        axes_values = []
-        for i in range(3):
-            if as_string and self.axes_values[i]:
-                value = self.axes_values[i]
-            elif self.axes_eval_success[i] and \
-                    (self.axes_coords[i] is not None):
-                value = self.axes_coords[i]
-            else:
-                value = raw_axes[i]
-                if as_string:
-                    value = self.coord_format.format(value)
-            axes_values.append(value)
-        
-        return axes_values
-    
-    def get_axes_text(self, offset=False):
-        axes_values = self.get_axes_values(as_string=True)
-        
-        axes_text = []
-        for i in range(3):
-            j = i
-            if offset:
-                j = (i + self.current_axis) % 3
-            
-            axes_text.append(axes_values[j])
-        
-        return axes_text
-    
-    def set_axes_text(self, text, offset=False):
-        if "\n" in text:
-            text = text.replace("\r", "")
-        else:
-            text = text.replace("\r", "\n")
-        text = text.replace("\n", "\t")
-        #text = text.replace(",", ".") # ???
-        
-        axes_text = text.split("\t")
-        for i in range(min(len(axes_text), 3)):
-            j = i
-            if offset:
-                j = (i + self.current_axis) % 3
-            self.set_axis_input(j, axes_text[i])
-    
-    def process_axis_input(self, event):
-        axis_id = self.current_axis
-        axis_val = self.axes_values[axis_id]
-        
-        if event.type in self.key_map["remove_next_character"]:
-            if event.ctrl:
-                # clear all
-                for i in range(3):
-                    self.set_axis_input(i, "")
-                self.caret_pos = 0
-                return
-            else:
-                axis_val = axis_val[0:self.caret_pos] + \
-                           axis_val[self.caret_pos + 1:len(axis_val)]
-        elif event.type in self.key_map["remove_last_character"]:
-            if event.ctrl:
-                # clear current
-                axis_val = ""
-            else:
-                axis_val = axis_val[0:self.caret_pos - 1] + \
-                           axis_val[self.caret_pos:len(axis_val)]
-                self.caret_pos -= 1
-        elif event.type in self.key_map["move_caret_next"]:
-            self.caret_pos += 1
-            if event.ctrl:
-                snap_chars = ".-+*/%()"
-                i = self.caret_pos
-                while axis_val[i:i + 1] not in snap_chars:
-                    i += 1
-                self.caret_pos = i
-        elif event.type in self.key_map["move_caret_prev"]:
-            self.caret_pos -= 1
-            if event.ctrl:
-                snap_chars = ".-+*/%()"
-                i = self.caret_pos
-                while axis_val[i - 1:i] not in snap_chars:
-                    i -= 1
-                self.caret_pos = i
-        elif event.type in self.key_map["move_caret_home"]:
-            self.caret_pos = 0
-        elif event.type in self.key_map["move_caret_end"]:
-            self.caret_pos = len(axis_val)
-        elif event.type in self.key_char_map:
-            # Currently accessing event.ascii seems to crash Blender
-            c = self.key_char_map[event.type]
-            if event.shift:
-                if c == "8":
-                    c = "*"
-                elif c == "5":
-                    c = "%"
-                elif c == "9":
-                    c = "("
-                elif c == "0":
-                    c = ")"
-            axis_val = axis_val[0:self.caret_pos] + c + \
-                       axis_val[self.caret_pos:len(axis_val)]
-            self.caret_pos += 1
-        
-        self.caret_pos = min(max(self.caret_pos, 0), len(axis_val))
-        
-        self.set_axis_input(axis_id, axis_val)
-    
-    # ====== DRAWING ====== #
-    def gizmo_distance(self, pos):
-        rv3d = self.vu.region_data
-        if rv3d.view_perspective == 'ORTHO':
-            dist = rv3d.view_distance
-        else:
-            view_pos = self.vu.get_viewpoint()
-            view_dir = self.vu.get_direction()
-            dist = (pos - view_pos).dot(view_dir)
-        return dist
-    
-    def gizmo_scale(self, pos):
-        return self.gizmo_distance(pos) * self.gizmo_factor
-    
-    def check_v3d_local(self, context):
-        csu_v3d = self.csu.space_data
-        v3d = context.space_data
-        if csu_v3d.local_view:
-            return csu_v3d != v3d
-        return v3d.local_view
-    
-    def draw_3d(self, context):
-        if self.check_v3d_local(context):
-            return
-        
-        if time.time() < (self.click_start + self.click_period):
-            return
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        initial_matrix = self.particles[0].get_initial_matrix()
-        
-        sys_matrix = self.csu.get_matrix()
-        if tfm_opts.use_relative_coords:
-            sys_matrix.translation = initial_matrix.translation.copy()
-        sys_origin = sys_matrix.to_translation()
-        dest_point = self.particles[0].get_location()
-        
-        if self.is_normal_visible():
-            p0, x, y, z, _x, _z = \
-                self.get_normal_params(tfm_opts, dest_point)
-            
-            # use theme colors?
-            #ThemeView3D.normal
-            #ThemeView3D.vertex_normal
-            
-            bgl.glDisable(bgl.GL_LINE_STIPPLE)
-            
-            if settings.draw_N:
-                bgl.glColor4f(0, 1, 1, 1)
-                draw_arrow(p0, _x, y, z) # Z (normal)
-            if settings.draw_T1:
-                bgl.glColor4f(1, 0, 1, 1)
-                draw_arrow(p0, y, _z, x) # X (1st tangential)
-            if settings.draw_T2:
-                bgl.glColor4f(1, 1, 0, 1)
-                draw_arrow(p0, _z, x, y) # Y (2nd tangential)
-            
-            bgl.glEnable(bgl.GL_BLEND)
-            bgl.glDisable(bgl.GL_DEPTH_TEST)
-            
-            if settings.draw_N:
-                bgl.glColor4f(0, 1, 1, 0.25)
-                draw_arrow(p0, _x, y, z) # Z (normal)
-            if settings.draw_T1:
-                bgl.glColor4f(1, 0, 1, 0.25)
-                draw_arrow(p0, y, _z, x) # X (1st tangential)
-            if settings.draw_T2:
-                bgl.glColor4f(1, 1, 0, 0.25)
-                draw_arrow(p0, _z, x, y) # Y (2nd tangential)
-        
-        if settings.draw_guides:
-            p0 = dest_point
-            try:
-                p00 = sys_matrix.inverted() * p0
-            except:
-                # this is some degenerate system
-                p00 = p0.copy()
-            
-            axes_line_params = [
-                (Vector((0, p00.y, p00.z)), (1, 0, 0)),
-                (Vector((p00.x, 0, p00.z)), (0, 1, 0)),
-                (Vector((p00.x, p00.y, 0)), (0, 0, 1)),
-            ]
-            
-            for i in range(3):
-                p1, color = axes_line_params[i]
-                p1 = sys_matrix * p1
-                constrained = (self.axes_coords[i] is not None) or \
-                    (not self.allowed_axes[i])
-                alpha = (0.25 if constrained else 1.0)
-                draw_line_hidden_depth(p0, p1, color, \
-                    alpha, alpha, False, True)
-            
-            # line from origin to cursor
-            p0 = sys_origin
-            p1 = dest_point
-            
-            bgl.glEnable(bgl.GL_LINE_STIPPLE)
-            bgl.glColor4f(1, 1, 0, 1)
-            
-            draw_line_hidden_depth(p0, p1, (1, 1, 0), 1.0, 0.5, True, True)
-        
-        if settings.draw_snap_elements:
-            sui = self.su.implementation
-            if sui.potential_snap_elements and (sui.snap_type == 'EDGE'):
-                bgl.glDisable(bgl.GL_LINE_STIPPLE)
-                
-                bgl.glEnable(bgl.GL_BLEND)
-                bgl.glDisable(bgl.GL_DEPTH_TEST)
-                
-                bgl.glLineWidth(2)
-                bgl.glColor4f(0, 0, 1, 0.5)
-                
-                bgl.glBegin(bgl.GL_LINE_LOOP)
-                for p in sui.potential_snap_elements:
-                    bgl.glVertex3f(p[0], p[1], p[2])
-                bgl.glEnd()
-            elif sui.potential_snap_elements and (sui.snap_type == 'FACE'):
-                bgl.glEnable(bgl.GL_BLEND)
-                bgl.glDisable(bgl.GL_DEPTH_TEST)
-                
-                bgl.glColor4f(0, 1, 0, 0.5)
-                
-                co = sui.potential_snap_elements
-                tris = tessellate_polygon([co])
-                bgl.glBegin(bgl.GL_TRIANGLES)
-                for tri in tris:
-                    for vi in tri:
-                        p = co[vi]
-                        bgl.glVertex3f(p[0], p[1], p[2])
-                bgl.glEnd()
-    
-    def draw_2d(self, context):
-        if self.check_v3d_local(context):
-            return
-        
-        r = context.region
-        rv3d = context.region_data
-        
-        settings = find_settings()
-        
-        if settings.draw_snap_elements:
-            sui = self.su.implementation
-            
-            snap_points = []
-            if sui.potential_snap_elements and \
-                    (sui.snap_type in {'VERTEX', 'VOLUME'}):
-                snap_points.extend(sui.potential_snap_elements)
-            if sui.extra_snap_points:
-                snap_points.extend(sui.extra_snap_points)
-            
-            if snap_points:
-                bgl.glEnable(bgl.GL_BLEND)
-                
-                bgl.glPointSize(5)
-                bgl.glColor4f(1, 0, 0, 0.5)
-                
-                bgl.glBegin(bgl.GL_POINTS)
-                for p in snap_points:
-                    p = location_3d_to_region_2d(r, rv3d, p)
-                    if p is not None:
-                        bgl.glVertex2f(p[0], p[1])
-                bgl.glEnd()
-                
-                bgl.glPointSize(1)
-        
-        if self.transform_mode == 'MOVE':
-            return
-        
-        bgl.glEnable(bgl.GL_LINE_STIPPLE)
-        
-        bgl.glLineWidth(1)
-        
-        bgl.glColor4f(0, 0, 0, 1)
-        draw_line_2d(self.origin_xy, self.xy)
-        
-        bgl.glDisable(bgl.GL_LINE_STIPPLE)
-        
-        line_width = 3
-        bgl.glLineWidth(line_width)
-        
-        L = 12.0
-        arrow_len = 6.0
-        arrow_width = 8.0
-        arrow_space = 5.0
-        
-        Lmax = arrow_space * 2 + L * 2 + line_width
-        
-        pos = self.xy.to_2d()
-        normal = self.prev_delta_xy.to_2d().normalized()
-        dist = self.prev_delta_xy.length
-        tangential = Vector((-normal[1], normal[0]))
-        
-        if self.transform_mode == 'ROTATE':
-            n_axes = sum(int(v) for v in self.allowed_axes)
-            if n_axes == 2:
-                bgl.glColor4f(0.4, 0.15, 0.15, 1)
-                for sgn in (-1, 1):
-                    n = sgn * Vector((0, 1))
-                    p0 = pos + arrow_space * n
-                    draw_arrow_2d(p0, n, L, arrow_len, arrow_width)
-                
-                bgl.glColor4f(0.11, 0.51, 0.11, 1)
-                for sgn in (-1, 1):
-                    n = sgn * Vector((1, 0))
-                    p0 = pos + arrow_space * n
-                    draw_arrow_2d(p0, n, L, arrow_len, arrow_width)
-            else:
-                bgl.glColor4f(0, 0, 0, 1)
-                for sgn in (-1, 1):
-                    n = sgn * tangential
-                    if dist < Lmax:
-                        n *= dist / Lmax
-                    p0 = pos + arrow_space * n
-                    draw_arrow_2d(p0, n, L, arrow_len, arrow_width)
-        elif self.transform_mode == 'SCALE':
-            bgl.glColor4f(0, 0, 0, 1)
-            for sgn in (-1, 1):
-                n = sgn * normal
-                p0 = pos + arrow_space * n
-                draw_arrow_2d(p0, n, L, arrow_len, arrow_width)
-        
-        bgl.glLineWidth(1)
-    
-    def draw_axes_coords(self, context, header_size):
-        if self.check_v3d_local(context):
-            return
-        
-        if time.time() < (self.click_start + self.click_period):
-            return
-        
-        v3d = context.space_data
-        
-        userprefs_view = context.user_preferences.view
-        
-        tool_settings = context.tool_settings
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        localmat = CursorDynamicSettings.local_matrix
-        
-        font_id = 0 # default font
-        
-        font_size = 11
-        blf.size(font_id, font_size, 72) # font, point size, dpi
-        
-        tet = context.user_preferences.themes[0].text_editor
-        
-        # Prepare the table...
-        if self.transform_mode == 'MOVE':
-            axis_prefix = ("D" if tfm_opts.use_relative_coords else "")
-        elif self.transform_mode == 'SCALE':
-            axis_prefix = "S"
-        else:
-            axis_prefix = "R"
-        axis_names = ["X", "Y", "Z"]
-        
-        axis_cells = []
-        coord_cells = []
-        #caret_cell = TextCell("_", tet.cursor)
-        caret_cell = TextCell("|", tet.cursor)
-        
-        try:
-            axes_text = self.get_axes_text()
-            
-            for i in range(3):
-                color = tet.space.text
-                alpha = (1.0 if self.allowed_axes[i] else 0.5)
-                text = axis_prefix + axis_names[i] + " : "
-                axis_cells.append(TextCell(text, color, alpha))
-                
-                if self.axes_values[i]:
-                    if self.axes_eval_success[i]:
-                        color = tet.syntax_numbers
-                    else:
-                        color = tet.syntax_string
-                else:
-                    color = tet.space.text
-                text = axes_text[i]
-                coord_cells.append(TextCell(text, color))
-        except Exception as e:
-            print(e)
-        
-        mode_cells = []
-        
-        try:
-            snap_type = self.su.implementation.snap_type
-            if snap_type is None:
-                color = tet.space.text
-            elif (not self.use_object_centers) or \
-                    (snap_type == 'INCREMENT'):
-                color = tet.syntax_numbers
-            else:
-                color = tet.syntax_special
-            text = tool_settings.snap_element
-            if text == 'VOLUME':
-                text = "BBOX"
-            mode_cells.append(TextCell(text, color))
-            
-            if self.csu.tou.is_custom:
-                color = tet.space.text
-            else:
-                color = tet.syntax_builtin
-            text = self.csu.tou.get_title()
-            mode_cells.append(TextCell(text, color))
-            
-            color = tet.space.text
-            text = self.csu.get_pivot_name(raw=True)
-            if self.use_object_centers:
-                color = tet.syntax_special
-            mode_cells.append(TextCell(text, color))
-        except Exception as e:
-            print(e)
-        
-        hdr_w, hdr_h = header_size
-        
-        try:
-            xyz_x_start_min = 12
-            xyz_x_start = xyz_x_start_min
-            mode_x_start = 6
-            
-            mode_margin = 4
-            xyz_margin = 16
-            blend_margin = 32
-            
-            color = tet.space.back
-            bgl.glColor4f(color[0], color[1], color[2], 1.0)
-            draw_rect(0, 0, hdr_w, hdr_h)
-            
-            if tool_settings.use_snap_self:
-                x = hdr_w - mode_x_start
-                y = hdr_h / 2
-                cell = mode_cells[0]
-                x -= cell.w
-                y -= cell.h * 0.5
-                bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-                draw_rect(x, y, cell.w, cell.h, 1, True)
-            
-            x = hdr_w - mode_x_start
-            y = hdr_h / 2
-            for cell in mode_cells:
-                cell.draw(x, y, (1, 0.5))
-                x -= (cell.w + mode_margin)
-            
-            curr_axis_x_start = 0
-            curr_axis_x_end = 0
-            caret_x = 0
-            
-            xyz_width = 0
-            for i in range(3):
-                if i == self.current_axis:
-                    curr_axis_x_start = xyz_width
-                
-                xyz_width += axis_cells[i].w
-                
-                if i == self.current_axis:
-                    char_offset = 0
-                    if self.axes_values[i]:
-                        char_offset = blf.dimensions(font_id,
-                            coord_cells[i].text[:self.caret_pos])[0]
-                    caret_x = xyz_width + char_offset
-                
-                xyz_width += coord_cells[i].w
-                
-                if i == self.current_axis:
-                    curr_axis_x_end = xyz_width
-                
-                xyz_width += xyz_margin
-            
-            xyz_width = int(xyz_width)
-            xyz_width_ext = xyz_width + blend_margin
-            
-            offset = (xyz_x_start + curr_axis_x_end) - hdr_w
-            if offset > 0:
-                xyz_x_start -= offset
-            
-            offset = xyz_x_start_min - (xyz_x_start + curr_axis_x_start)
-            if offset > 0:
-                xyz_x_start += offset
-            
-            offset = (xyz_x_start + caret_x) - hdr_w
-            if offset > 0:
-                xyz_x_start -= offset
-            
-            # somewhy GL_BLEND should be set right here
-            # to actually draw the box with blending %)
-            # (perhaps due to text draw happened before)
-            bgl.glEnable(bgl.GL_BLEND)
-            bgl.glShadeModel(bgl.GL_SMOOTH)
-            gl_enable(bgl.GL_SMOOTH, True)
-            color = tet.space.back
-            bgl.glBegin(bgl.GL_TRIANGLE_STRIP)
-            bgl.glColor4f(color[0], color[1], color[2], 1.0)
-            bgl.glVertex2i(0, 0)
-            bgl.glVertex2i(0, hdr_h)
-            bgl.glVertex2i(xyz_width, 0)
-            bgl.glVertex2i(xyz_width, hdr_h)
-            bgl.glColor4f(color[0], color[1], color[2], 0.0)
-            bgl.glVertex2i(xyz_width_ext, 0)
-            bgl.glVertex2i(xyz_width_ext, hdr_h)
-            bgl.glEnd()
-            
-            x = xyz_x_start
-            y = hdr_h / 2
-            for i in range(3):
-                cell = axis_cells[i]
-                cell.draw(x, y, (0, 0.5))
-                x += cell.w
-                
-                cell = coord_cells[i]
-                cell.draw(x, y, (0, 0.5))
-                x += (cell.w + xyz_margin)
-            
-            caret_x -= blf.dimensions(font_id, caret_cell.text)[0] * 0.5
-            caret_cell.draw(xyz_x_start + caret_x, y, (0, 0.5))
-            
-            bgl.glEnable(bgl.GL_BLEND)
-            bgl.glShadeModel(bgl.GL_SMOOTH)
-            gl_enable(bgl.GL_SMOOTH, True)
-            color = tet.space.back
-            bgl.glBegin(bgl.GL_TRIANGLE_STRIP)
-            bgl.glColor4f(color[0], color[1], color[2], 1.0)
-            bgl.glVertex2i(0, 0)
-            bgl.glVertex2i(0, hdr_h)
-            bgl.glVertex2i(xyz_x_start_min, 0)
-            bgl.glColor4f(color[0], color[1], color[2], 0.0)
-            bgl.glVertex2i(xyz_x_start_min, hdr_h)
-            bgl.glEnd()
-            
-        except Exception as e:
-            print(e)
-        
-        return
-    
-    # ====== NORMAL SNAPSHOT ====== #
-    def is_normal_visible(self):
-        if self.csu.tou.get() == "Surface":
-            return True
-        
-        if self.use_object_centers:
-            return False
-        
-        return self.su.implementation.snap_type \
-            not in {None, 'INCREMENT', 'VOLUME'}
-    
-    def get_normal_params(self, tfm_opts, dest_point):
-        surf_matrix = self.csu.get_matrix("Surface")
-        if tfm_opts.use_relative_coords:
-            surf_origin = dest_point
-        else:
-            surf_origin = surf_matrix.to_translation()
-        
-        m3 = surf_matrix.to_3x3()
-        p0 = surf_origin
-        scl = self.gizmo_scale(p0)
-        
-        # Normal and tangential are not always orthogonal
-        # (e.g. when normal is interpolated)
-        x = (m3 * Vector((1, 0, 0))).normalized()
-        y = (m3 * Vector((0, 1, 0))).normalized()
-        z = (m3 * Vector((0, 0, 1))).normalized()
-        
-        _x = z.cross(y)
-        _z = y.cross(x)
-        
-        return p0, x * scl, y * scl, z * scl, _x * scl, _z * scl
-    
-    def make_normal_snapshot(self, scene, tangential=False):
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        dest_point = self.particles[0].get_location()
-        
-        if self.is_normal_visible():
-            p0, x, y, z, _x, _z = \
-                self.get_normal_params(tfm_opts, dest_point)
-            
-            snapshot = bpy.data.objects.new("normal_snapshot", None)
-            
-            if tangential:
-                m = MatrixCompose(_z, y, x, p0)
-            else:
-                m = MatrixCompose(_x, y, z, p0)
-            snapshot.matrix_world = m
-            
-            snapshot.empty_draw_type = 'SINGLE_ARROW'
-            #snapshot.empty_draw_type = 'ARROWS'
-            #snapshot.layers = [True] * 20 # ?
-            scene.objects.link(snapshot)
-#============================================================================#
-
-
-class Particle:
-    pass
-
-class View3D_Cursor(Particle):
-    def __init__(self, context):
-        assert context.space_data.type == 'VIEW_3D'
-        self.v3d = context.space_data
-        self.initial_pos = self.get_location()
-        self.initial_matrix = Matrix.Translation(self.initial_pos)
-    
-    def revert(self):
-        self.set_location(self.initial_pos)
-    
-    def get_location(self):
-        return get_cursor_location(v3d=self.v3d)
-    
-    def set_location(self, value):
-        set_cursor_location(Vector(value), v3d=self.v3d)
-    
-    def get_rotation(self):
-        return Quaternion()
-    
-    def set_rotation(self, value):
-        pass
-    
-    def get_scale(self):
-        return Vector((1.0, 1.0, 1.0))
-    
-    def set_scale(self, value):
-        pass
-    
-    def get_matrix(self):
-        return Matrix.Translation(self.get_location())
-    
-    def set_matrix(self, value):
-        self.set_location(value.to_translation())
-    
-    def get_initial_matrix(self):
-        return self.initial_matrix
-
-class View3D_Object(Particle):
-    def __init__(self, obj):
-        self.obj = obj
-    
-    def get_location(self):
-        # obj.location seems to be in parent's system...
-        # or even maybe not bounded by constraints %)
-        return self.obj.matrix_world.to_translation()
-
-class View3D_EditMesh_Vertex(Particle):
-    pass
-
-class View3D_EditMesh_Edge(Particle):
-    pass
-
-class View3D_EditMesh_Face(Particle):
-    pass
-
-class View3D_EditSpline_Point(Particle):
-    pass
-
-class View3D_EditSpline_BezierPoint(Particle):
-    pass
-
-class View3D_EditSpline_BezierHandle(Particle):
-    pass
-
-class View3D_EditMeta_Element(Particle):
-    pass
-
-class View3D_EditBone_Bone(Particle):
-    pass
-
-class View3D_EditBone_HeadTail(Particle):
-    pass
-
-class View3D_PoseBone(Particle):
-    pass
-
-class UV_Cursor(Particle):
-    pass
-
-class UV_Vertex(Particle):
-    pass
-
-class UV_Edge(Particle):
-    pass
-
-class UV_Face(Particle):
-    pass
-
-# Other types:
-# NLA / Dopesheet / Graph editor ...
-
-# Particles are used in the following situations:
-# - as subjects of transformation
-# - as reference point(s) for cursor transformation
-# Note: particles 'dragged' by Proportional Editing
-# are a separate issue (they can come and go).
-def gather_particles(**kwargs):
-    context = kwargs.get("context", bpy.context)
-    
-    area_type = kwargs.get("area_type", context.area.type)
-    
-    scene = kwargs.get("scene", context.scene)
-    
-    space_data = kwargs.get("space_data", context.space_data)
-    region_data = kwargs.get("region_data", context.region_data)
-    
-    particles = []
-    pivots = {}
-    normal_system = None
-    
-    active_element = None
-    cursor_pos = None
-    median = None
-    
-    if area_type == 'VIEW_3D':
-        context_mode = kwargs.get("context_mode", context.mode)
-        
-        selected_objects = kwargs.get("selected_objects",
-            context.selected_objects)
-        
-        active_object = kwargs.get("active_object",
-            context.active_object)
-        
-        if context_mode == 'OBJECT':
-            for obj in selected_objects:
-                particle = View3D_Object(obj)
-                particles.append(particle)
-            
-            if active_object:
-                active_element = active_object.\
-                    matrix_world.to_translation()
-        
-        # On Undo/Redo scene hash value is changed ->
-        # -> the monitor tries to update the CSU ->
-        # -> object.mode_set seem to somehow conflict
-        # with Undo/Redo mechanisms.
-        elif active_object and active_object.data and \
-        (context_mode in {
-        'EDIT_MESH', 'EDIT_METABALL',
-        'EDIT_CURVE', 'EDIT_SURFACE',
-        'EDIT_ARMATURE', 'POSE'}):
-            
-            m = active_object.matrix_world
-            
-            positions = []
-            normal = Vector((0, 0, 0))
-            
-            if context_mode == 'EDIT_MESH':
-                bm = bmesh.from_edit_mesh(active_object.data)
-                
-                if bm.select_history:
-                    elem = bm.select_history[-1]
-                    if isinstance(elem, bmesh.types.BMVert):
-                        active_element = elem.co.copy()
-                    else:
-                        active_element = Vector()
-                        for v in elem.verts:
-                            active_element += v.co
-                        active_element *= 1.0 / len(elem.verts)
-                
-                for v in bm.verts:
-                    if v.select:
-                        positions.append(v.co)
-                        normal += v.normal
-                
-                # mimic Blender's behavior (as of now,
-                # order of selection is ignored)
-                if len(positions) == 2:
-                    normal = positions[1] - positions[0]
-                elif len(positions) == 3:
-                    a = positions[0] - positions[1]
-                    b = positions[2] - positions[1]
-                    normal = a.cross(b)
-            elif context_mode == 'EDIT_METABALL':
-                active_elem = active_object.data.elements.active
-                if active_elem:
-                    active_element = active_elem.co.copy()
-                    active_element = active_object.\
-                        matrix_world * active_element
-                
-                # Currently there is no API for element.select
-                #for element in active_object.data.elements:
-                #    if element.select:
-                #        positions.append(element.co)
-            elif context_mode == 'EDIT_ARMATURE':
-                # active bone seems to have the same pivot
-                # as median of the selection
-                '''
-                active_bone = active_object.data.edit_bones.active
-                if active_bone:
-                    active_element = active_bone.head + \
-                                     active_bone.tail
-                    active_element = active_object.\
-                        matrix_world * active_element
-                '''
-                
-                for bone in active_object.data.edit_bones:
-                    if bone.select_head:
-                        positions.append(bone.head)
-                    if bone.select_tail:
-                        positions.append(bone.tail)
-            elif context_mode == 'POSE':
-                active_bone = active_object.data.bones.active
-                if active_bone:
-                    active_element = active_bone.\
-                        matrix_local.translation.to_3d()
-                    active_element = active_object.\
-                        matrix_world * active_element
-                
-                # consider only topmost parents
-                bones = set()
-                for bone in active_object.data.bones:
-                    if bone.select:
-                        bones.add(bone)
-                
-                parents = set()
-                for bone in bones:
-                    if not set(bone.parent_recursive).intersection(bones):
-                        parents.add(bone)
-                
-                for bone in parents:
-                    positions.append(bone.matrix_local.translation.to_3d())
-            else:
-                for spline in active_object.data.splines:
-                    for point in spline.bezier_points:
-                        if point.select_control_point:
-                            positions.append(point.co)
-                        else:
-                            if point.select_left_handle:
-                                positions.append(point.handle_left)
-                            if point.select_right_handle:
-                                positions.append(point.handle_right)
-                        
-                        n = None
-                        nL = point.co - point.handle_left
-                        nR = point.co - point.handle_right
-                        #nL = point.handle_left.copy()
-                        #nR = point.handle_right.copy()
-                        if point.select_control_point:
-                            n = nL + nR
-                        elif point.select_left_handle or \
-                             point.select_right_handle:
-                            n = nL + nR
-                        else:
-                            if point.select_left_handle:
-                                n = -nL
-                            if point.select_right_handle:
-                                n = nR
-                        
-                        if n is not None:
-                            if n.length_squared < epsilon:
-                                n = -nL
-                            normal += n.normalized()
-                    
-                    for point in spline.points:
-                        if point.select:
-                            positions.append(point.co)
-            
-            if len(positions) != 0:
-                if normal.length_squared < epsilon:
-                    normal = Vector((0, 0, 1))
-                normal.rotate(m)
-                normal.normalize()
-                
-                if (1.0 - abs(normal.z)) < epsilon:
-                    t1 = Vector((1, 0, 0))
-                else:
-                    t1 = Vector((0, 0, 1)).cross(normal)
-                t2 = t1.cross(normal)
-                normal_system = MatrixCompose(t1, t2, normal)
-                
-                median, bbox_center = calc_median_bbox_pivots(positions)
-                median = m * median
-                bbox_center = m * bbox_center
-                
-                # Currently I don't know how to get active mesh element
-                if active_element is None:
-                    if context_mode == 'EDIT_ARMATURE':
-                        # Somewhy EDIT_ARMATURE has such behavior
-                        active_element = bbox_center
-                    else:
-                        active_element = median
-            else:
-                if active_element is None:
-                    active_element = active_object.\
-                        matrix_world.to_translation()
-                
-                median = active_element
-                bbox_center = active_element
-                
-                normal_system = active_object.matrix_world.to_3x3()
-                normal_system.col[0].normalize()
-                normal_system.col[1].normalize()
-                normal_system.col[2].normalize()
-        else:
-            # paint/sculpt, etc.?
-            particle = View3D_Object(active_object)
-            particles.append(particle)
-            
-            if active_object:
-                active_element = active_object.\
-                    matrix_world.to_translation()
-        
-        cursor_pos = get_cursor_location(v3d=space_data)
-    
-    #elif area_type == 'IMAGE_EDITOR':
-        # currently there is no way to get UV editor's
-        # offset (and maybe some other parameters
-        # required to implement these operators)
-        #cursor_pos = space_data.uv_editor.cursor_location
-    
-    #elif area_type == 'EMPTY':
-    #elif area_type == 'GRAPH_EDITOR':
-    #elif area_type == 'OUTLINER':
-    #elif area_type == 'PROPERTIES':
-    #elif area_type == 'FILE_BROWSER':
-    #elif area_type == 'INFO':
-    #elif area_type == 'SEQUENCE_EDITOR':
-    #elif area_type == 'TEXT_EDITOR':
-    #elif area_type == 'AUDIO_WINDOW':
-    #elif area_type == 'DOPESHEET_EDITOR':
-    #elif area_type == 'NLA_EDITOR':
-    #elif area_type == 'SCRIPTS_WINDOW':
-    #elif area_type == 'TIMELINE':
-    #elif area_type == 'NODE_EDITOR':
-    #elif area_type == 'LOGIC_EDITOR':
-    #elif area_type == 'CONSOLE':
-    #elif area_type == 'USER_PREFERENCES':
-    
-    else:
-        print("gather_particles() not implemented for '{}'".\
-              format(area_type))
-        return None, None
-    
-    # 'INDIVIDUAL_ORIGINS' is not handled here
-    
-    if cursor_pos:
-        pivots['CURSOR'] = cursor_pos.copy()
-    
-    if active_element:
-        # in v3d: ACTIVE_ELEMENT
-        pivots['ACTIVE'] = active_element.copy()
-    
-    if (len(particles) != 0) and (median is None):
-        positions = (p.get_location() for p in particles)
-        median, bbox_center = calc_median_bbox_pivots(positions)
-    
-    if median:
-        # in v3d: MEDIAN_POINT, in UV editor: MEDIAN
-        pivots['MEDIAN'] = median.copy()
-        # in v3d: BOUNDING_BOX_CENTER, in UV editor: CENTER
-        pivots['CENTER'] = bbox_center.copy()
-    
-    csu = CoordinateSystemUtility(scene, space_data, region_data, \
-        pivots, normal_system)
-    
-    return particles, csu
-
-def calc_median_bbox_pivots(positions):
-    median = None # pos can be 3D or 2D
-    bbox = [None, None]
-    
-    n = 0
-    for pos in positions:
-        extend_bbox(bbox, pos)
-        try:
-            median += pos
-        except:
-            median = pos.copy()
-        n += 1
-    
-    median = median / n
-    bbox_center = (Vector(bbox[0]) + Vector(bbox[1])) * 0.5
-    
-    return median, bbox_center
-
-def extend_bbox(bbox, pos):
-    try:
-        bbox[0] = tuple(min(e0, e1) for e0, e1 in zip(bbox[0], pos))
-        bbox[1] = tuple(max(e0, e1) for e0, e1 in zip(bbox[1], pos))
-    except:
-        bbox[0] = tuple(pos)
-        bbox[1] = tuple(pos)
-
-
-# ====== COORDINATE SYSTEM UTILITY ====== #
-class CoordinateSystemUtility:
-    pivot_name_map = {
-        'CENTER':'CENTER',
-        'BOUNDING_BOX_CENTER':'CENTER',
-        'MEDIAN':'MEDIAN',
-        'MEDIAN_POINT':'MEDIAN',
-        'CURSOR':'CURSOR', 
-        'INDIVIDUAL_ORIGINS':'INDIVIDUAL',
-        'ACTIVE_ELEMENT':'ACTIVE',
-        'WORLD':'WORLD',
-        'SURFACE':'SURFACE', # ?
-        'BOOKMARK':'BOOKMARK',
-    }
-    pivot_v3d_map = {
-        'CENTER':'BOUNDING_BOX_CENTER',
-        'MEDIAN':'MEDIAN_POINT',
-        'CURSOR':'CURSOR', 
-        'INDIVIDUAL':'INDIVIDUAL_ORIGINS',
-        'ACTIVE':'ACTIVE_ELEMENT',
-    }
-    
-    def __init__(self, scene, space_data, region_data, \
-                 pivots, normal_system):
-        self.space_data = space_data
-        self.region_data = region_data
-        
-        if space_data.type == 'VIEW_3D':
-            self.pivot_map_inv = self.pivot_v3d_map
-        
-        self.tou = TransformOrientationUtility(
-            scene, space_data, region_data)
-        self.tou.normal_system = normal_system
-        
-        self.pivots = pivots
-        
-        # Assigned by caller (for cursor or selection)
-        self.source_pos = None
-        self.source_rot = None
-        self.source_scale = None
-    
-    def set_orientation(self, name):
-        self.tou.set(name)
-    
-    def set_pivot(self, pivot):
-        self.space_data.pivot_point = self.pivot_map_inv[pivot]
-    
-    def get_pivot_name(self, name=None, relative=None, raw=False):
-        pivot = self.pivot_name_map[self.space_data.pivot_point]
-        if raw:
-            return pivot
-        
-        if not name:
-            name = self.tou.get()
-        
-        if relative is None:
-            settings = find_settings()
-            tfm_opts = settings.transform_options
-            relative = tfm_opts.use_relative_coords
-        
-        if relative:
-            pivot = "RELATIVE"
-        elif (name == 'GLOBAL') or (pivot == 'WORLD'):
-            pivot = 'WORLD'
-        elif (name == "Surface") or (pivot == 'SURFACE'):
-            pivot = "SURFACE"
-        
-        return pivot
-    
-    def get_origin(self, name=None, relative=None, pivot=None):
-        if not pivot:
-            pivot = self.get_pivot_name(name, relative)
-        
-        if relative or (pivot == "RELATIVE"):
-            # "relative" parameter overrides "pivot"
-            return self.source_pos
-        elif pivot == 'WORLD':
-            return Vector()
-        elif pivot == "SURFACE":
-            runtime_settings = find_runtime_settings()
-            return Vector(runtime_settings.surface_pos)
-        else:
-            if pivot == 'INDIVIDUAL':
-                pivot = 'MEDIAN'
-            
-            #if pivot == 'ACTIVE':
-            #    print(self.pivots)
-            
-            try:
-                return self.pivots[pivot]
-            except:
-                return Vector()
-    
-    def get_matrix(self, name=None, relative=None, pivot=None):
-        if not name:
-            name = self.tou.get()
-        
-        matrix = self.tou.get_matrix(name)
-        
-        if isinstance(pivot, Vector):
-            pos = pivot
-        else:
-            pos = self.get_origin(name, relative, pivot)
-        
-        return to_matrix4x4(matrix, pos)
-
-# ====== TRANSFORM ORIENTATION UTILITIES ====== #
-class TransformOrientationUtility:
-    special_systems = {"Surface", "Scaled"}
-    predefined_systems = {
-        'GLOBAL', 'LOCAL', 'VIEW', 'NORMAL', 'GIMBAL',
-        "Scaled", "Surface",
-    }
-    
-    def __init__(self, scene, v3d, rv3d):
-        self.scene = scene
-        self.v3d = v3d
-        self.rv3d = rv3d
-        
-        self.custom_systems = [item for item in scene.orientations \
-            if item.name not in self.special_systems]
-        
-        self.is_custom = False
-        self.custom_id = -1
-        
-        # This is calculated elsewhere
-        self.normal_system = None
-        
-        self.set(v3d.transform_orientation)
-    
-    def get(self):
-        return self.transform_orientation
-    
-    def get_title(self):
-        if self.is_custom:
-            return self.transform_orientation
-        
-        name = self.transform_orientation
-        return name[:1].upper() + name[1:].lower()
-    
-    def set(self, name, set_v3d=True):
-        if isinstance(name, int):
-            n = len(self.custom_systems)
-            if n == 0:
-                # No custom systems, do nothing
-                return
-            
-            increment = name
-            
-            if self.is_custom:
-                # If already custom, switch to next custom system
-                self.custom_id = (self.custom_id + increment) % n
-            
-            self.is_custom = True
-            
-            name = self.custom_systems[self.custom_id].name
-        else:
-            self.is_custom = name not in self.predefined_systems
-            
-            if self.is_custom:
-                self.custom_id = next((i for i, v in \
-                    enumerate(self.custom_systems) if v.name == name), -1)
-            
-            if name in self.special_systems:
-                # Ensure such system exists
-                self.get_custom(name)
-        
-        self.transform_orientation = name
-        
-        if set_v3d:
-            self.v3d.transform_orientation = name
-    
-    def get_matrix(self, name=None):
-        active_obj = self.scene.objects.active
-        
-        if not name:
-            name = self.transform_orientation
-        
-        if self.is_custom:
-            matrix = self.custom_systems[self.custom_id].matrix.copy()
-        else:
-            if (name == 'VIEW') and self.rv3d:
-                matrix = self.rv3d.view_rotation.to_matrix()
-            elif name == "Surface":
-                matrix = self.get_custom(name).matrix.copy()
-            elif (name == 'GLOBAL') or (not active_obj):
-                matrix = Matrix().to_3x3()
-            elif (name == 'NORMAL') and self.normal_system:
-                matrix = self.normal_system.copy()
-            else:
-                matrix = active_obj.matrix_world.to_3x3()
-                if name == "Scaled":
-                    self.get_custom(name).matrix = matrix
-                else: # 'LOCAL', 'GIMBAL', ['NORMAL'] for now
-                    matrix[0].normalize()
-                    matrix[1].normalize()
-                    matrix[2].normalize()
-        
-        return matrix
-    
-    def get_custom(self, name):
-        try:
-            return self.scene.orientations[name]
-        except:
-            return create_transform_orientation(
-                self.scene, name, Matrix())
-
-# Is there a less cumbersome way to create transform orientation?
-def create_transform_orientation(scene, name=None, matrix=None):
-    active_obj = scene.objects.active
-    prev_mode = None
-    
-    if active_obj:
-        prev_mode = active_obj.mode
-        bpy.ops.object.mode_set(mode='OBJECT')
-    else:
-        bpy.ops.object.add()
-    
-    # ATTENTION! This uses context's scene
-    bpy.ops.transform.create_orientation()
-    
-    tfm_orient = scene.orientations[-1]
-    
-    if name is not None:
-        basename = name
-        i = 1
-        while name in scene.orientations:
-            name = "%s.%03i" % (basename, i)
-            i += 1
-        tfm_orient.name = name
-    
-    if matrix:
-        tfm_orient.matrix = matrix.to_3x3()
-    
-    if active_obj:
-        bpy.ops.object.mode_set(mode=prev_mode)
-    else:
-        bpy.ops.object.delete()
-    
-    return tfm_orient
-
-# ====== VIEW UTILITY CLASS ====== #
-class ViewUtility:
-    methods = dict(
-        get_locks = lambda: {},
-        set_locks = lambda locks: None,
-        get_position = lambda: Vector(),
-        set_position = lambda: None,
-        get_rotation = lambda: Quaternion(),
-        get_direction = lambda: Vector((0, 0, 1)),
-        get_viewpoint = lambda: Vector(),
-        get_matrix = lambda: Matrix(),
-        get_point = lambda xy, pos: \
-            Vector((xy[0], xy[1], 0)),
-        get_ray = lambda xy: tuple(
-            Vector((xy[0], xy[1], 0)),
-            Vector((xy[0], xy[1], 1)),
-            False),
-    )
-    
-    def __init__(self, region, space_data, region_data):
-        self.region = region
-        self.space_data = space_data
-        self.region_data = region_data
-        
-        if space_data.type == 'VIEW_3D':
-            self.implementation = View3DUtility(
-                region, space_data, region_data)
-        else:
-            self.implementation = None
-        
-        if self.implementation:
-            for name in self.methods:
-                setattr(self, name,
-                    getattr(self.implementation, name))
-        else:
-            for name, value in self.methods.items():
-                setattr(self, name, value)
-
-class View3DUtility:
-    lock_types = {"lock_cursor":False, "lock_object":None, "lock_bone":""}
-    
-    # ====== INITIALIZATION / CLEANUP ====== #
-    def __init__(self, region, space_data, region_data):
-        self.region = region
-        self.space_data = space_data
-        self.region_data = region_data
-    
-    # ====== GET VIEW MATRIX AND ITS COMPONENTS ====== #
-    def get_locks(self):
-        v3d = self.space_data
-        return {k:getattr(v3d, k) for k in self.lock_types}
-    
-    def set_locks(self, locks):
-        v3d = self.space_data
-        for k in self.lock_types:
-            setattr(v3d, k, locks.get(k, self.lock_types[k]))
-    
-    def _get_lock_obj_bone(self):
-        v3d = self.space_data
-        
-        obj = v3d.lock_object
-        if not obj:
-            return None, None
-        
-        if v3d.lock_bone:
-            try:
-                # this is not tested!
-                if obj.mode == 'EDIT':
-                    bone = obj.data.edit_bones[v3d.lock_bone]
-                else:
-                    bone = obj.data.bones[v3d.lock_bone]
-            except:
-                bone = None
-        
-        return obj, bone
-    
-    # TODO: learn how to get these values from
-    # rv3d.perspective_matrix and rv3d.view_matrix ?
-    def get_position(self, no_locks=False):
-        v3d = self.space_data
-        rv3d = self.region_data
-        
-        if no_locks:
-            return rv3d.view_location.copy()
-        
-        # rv3d.perspective_matrix and rv3d.view_matrix
-        # seem to have some weird translation components %)
-        
-        if rv3d.view_perspective == 'CAMERA':
-            p = v3d.camera.matrix_world.to_translation()
-            d = self.get_direction()
-            return p + d * rv3d.view_distance
-        else:
-            if v3d.lock_object:
-                obj, bone = self._get_lock_obj_bone()
-                if bone:
-                    return (obj.matrix_world * bone.matrix).to_translation()
-                else:
-                    return obj.matrix_world.to_translation()
-            elif v3d.lock_cursor:
-                return get_cursor_location(v3d=v3d)
-            else:
-                return rv3d.view_location.copy()
-    
-    def set_position(self, pos, no_locks=False):
-        v3d = self.space_data
-        rv3d = self.region_data
-        
-        pos = pos.copy()
-        
-        if no_locks:
-            rv3d.view_location = pos
-            return
-        
-        if rv3d.view_perspective == 'CAMERA':
-            d = self.get_direction()
-            v3d.camera.matrix_world.translation = pos - d * rv3d.view_distance
-        else:
-            if v3d.lock_object:
-                obj, bone = self._get_lock_obj_bone()
-                if bone:
-                    try:
-                        bone.matrix.translation = \
-                            obj.matrix_world.inverted() * pos
-                    except:
-                        # this is some degenerate object
-                        bone.matrix.translation = pos
-                else:
-                    obj.matrix_world.translation = pos
-            elif v3d.lock_cursor:
-                set_cursor_location(pos, v3d=v3d)
-            else:
-                rv3d.view_location = pos
-    
-    def get_rotation(self):
-        v3d = self.space_data
-        rv3d = self.region_data
-        
-        if rv3d.view_perspective == 'CAMERA':
-            return v3d.camera.matrix_world.to_quaternion()
-        else:
-            return rv3d.view_rotation
-    
-    def get_direction(self):
-        # Camera (as well as viewport) looks in the direction of -Z;
-        # Y is up, X is left
-        d = self.get_rotation() * Vector((0, 0, -1))
-        d.normalize()
-        return d
-    
-    def get_viewpoint(self):
-        v3d = self.space_data
-        rv3d = self.region_data
-        
-        if rv3d.view_perspective == 'CAMERA':
-            return v3d.camera.matrix_world.to_translation()
-        else:
-            p = self.get_position()
-            d = self.get_direction()
-            return p - d * rv3d.view_distance
-    
-    def get_matrix(self):
-        m = self.get_rotation().to_matrix()
-        m.resize_4x4()
-        m.translation = self.get_viewpoint()
-        return m
-    
-    def get_point(self, xy, pos):
-        region = self.region
-        rv3d = self.region_data
-        return region_2d_to_location_3d(region, rv3d, xy, pos)
-    
-    def get_ray(self, xy):
-        region = self.region
-        v3d = self.space_data
-        rv3d = self.region_data
-        
-        viewPos = self.get_viewpoint()
-        viewDir = self.get_direction()
-        
-        near = viewPos + viewDir * v3d.clip_start
-        far = viewPos + viewDir * v3d.clip_end
-        
-        a = region_2d_to_location_3d(region, rv3d, xy, near)
-        b = region_2d_to_location_3d(region, rv3d, xy, far)
-        
-        # When viewed from in-scene camera, near and far
-        # planes clip geometry even in orthographic mode.
-        clip = rv3d.is_perspective or (rv3d.view_perspective == 'CAMERA')
-        
-        return a, b, clip
-
-# ====== SNAP UTILITY CLASS ====== #
-class SnapUtility:
-    def __init__(self, context):
-        if context.area.type == 'VIEW_3D':
-            v3d = context.space_data
-            shade = v3d.viewport_shade
-            self.implementation = Snap3DUtility(context.scene, shade)
-            self.implementation.update_targets(
-                context.visible_objects, [])
-    
-    def dispose(self):
-        self.implementation.dispose()
-    
-    def update_targets(self, to_include, to_exclude):
-        self.implementation.update_targets(to_include, to_exclude)
-    
-    def set_modes(self, **kwargs):
-        return self.implementation.set_modes(**kwargs)
-    
-    def snap(self, *args, **kwargs):
-        return self.implementation.snap(*args, **kwargs)
-    
-class SnapUtilityBase:
-    def __init__(self):
-        self.targets = set()
-        # TODO: set to current blend settings?
-        self.interpolation = 'NEVER'
-        self.editmode = False
-        self.snap_type = None
-        self.projection = [None, None, None]
-        self.potential_snap_elements = None
-        self.extra_snap_points = None
-    
-    def update_targets(self, to_include, to_exclude):
-        self.targets.update(to_include)
-        self.targets.difference_update(to_exclude)
-    
-    def set_modes(self, **kwargs):
-        if "use_relative_coords" in kwargs:
-            self.use_relative_coords = kwargs["use_relative_coords"]
-        if "interpolation" in kwargs:
-            # NEVER, ALWAYS, SMOOTH
-            self.interpolation = kwargs["interpolation"]
-        if "editmode" in kwargs:
-            self.editmode = kwargs["editmode"]
-        if "snap_align" in kwargs:
-            self.snap_align = kwargs["snap_align"]
-        if "snap_type" in kwargs:
-            # 'INCREMENT', 'VERTEX', 'EDGE', 'FACE', 'VOLUME'
-            self.snap_type = kwargs["snap_type"]
-        if "axes_coords" in kwargs:
-            # none, point, line, plane
-            self.axes_coords = kwargs["axes_coords"]
-    
-    # ====== CURSOR REPOSITIONING ====== #
-    def snap(self, xy, src_matrix, initial_matrix, do_raycast, \
-        alt_snap, vu, csu, modify_Surface, use_object_centers):
-        
-        grid_step = self.grid_steps[alt_snap]
-        
-        su = self
-        use_relative_coords = su.use_relative_coords
-        snap_align = su.snap_align
-        axes_coords = su.axes_coords
-        snap_type = su.snap_type
-        
-        runtime_settings = find_runtime_settings()
-        
-        matrix = src_matrix.to_3x3()
-        pos = src_matrix.to_translation().copy()
-        
-        sys_matrix = csu.get_matrix()
-        if use_relative_coords:
-            sys_matrix.translation = initial_matrix.translation.copy()
-        
-        # Axes of freedom and line/plane parameters
-        start = Vector(((0 if v is None else v) for v in axes_coords))
-        direction = Vector(((v is not None) for v in axes_coords))
-        axes_of_freedom = 3 - int(sum(direction))
-        
-        # do_raycast is False when mouse is not moving
-        if do_raycast:
-            su.hide_bbox(True)
-            
-            self.potential_snap_elements = None
-            self.extra_snap_points = None
-            
-            set_stick_obj(csu.tou.scene, None)
-            
-            raycast = None
-            snap_to_obj = (snap_type != 'INCREMENT') #or use_object_centers
-            snap_to_obj = snap_to_obj and (snap_type is not None)
-            if snap_to_obj:
-                a, b, clip = vu.get_ray(xy)
-                view_dir = vu.get_direction()
-                raycast = su.snap_raycast(a, b, clip, view_dir, csu, alt_snap)
-            
-            if raycast:
-                surf_matrix, face_id, obj, orig_obj = raycast
-                
-                if not use_object_centers:
-                    self.potential_snap_elements = [
-                        (obj.matrix_world * obj.data.vertices[vi].co)
-                        for vi in obj.data.tessfaces[face_id].vertices
-                    ]
-                
-                if use_object_centers:
-                    self.extra_snap_points = \
-                        [obj.matrix_world.to_translation()]
-                elif alt_snap:
-                    pse = self.potential_snap_elements
-                    n = len(pse)
-                    if self.snap_type == 'EDGE':
-                        self.extra_snap_points = []
-                        for i in range(n):
-                            v0 = pse[i]
-                            v1 = pse[(i + 1) % n]
-                            self.extra_snap_points.append((v0 + v1) / 2)
-                    elif self.snap_type == 'FACE':
-                        self.extra_snap_points = []
-                        v0 = Vector()
-                        for v1 in pse:
-                            v0 += v1
-                        self.extra_snap_points.append(v0 / n)
-                
-                if snap_align:
-                    matrix = surf_matrix.to_3x3()
-                
-                if not use_object_centers:
-                    pos = surf_matrix.to_translation()
-                else:
-                    pos = orig_obj.matrix_world.to_translation()
-                
-                try:
-                    local_pos = orig_obj.matrix_world.inverted() * pos
-                except:
-                    # this is some degenerate object
-                    local_pos = pos
-                
-                set_stick_obj(csu.tou.scene, orig_obj.name, local_pos)
-                
-                modify_Surface = modify_Surface and \
-                    (snap_type != 'VOLUME') and (not use_object_centers)
-                
-                # === Update "Surface" orientation === #
-                if modify_Surface:
-                    # Use raycast[0], not matrix! If snap_align == False,
-                    # matrix will be src_matrix!
-                    coordsys = csu.tou.get_custom("Surface")
-                    coordsys.matrix = surf_matrix.to_3x3()
-                    runtime_settings.surface_pos = pos
-                    if csu.tou.get() == "Surface":
-                        sys_matrix = to_matrix4x4(matrix, pos)
-            else:
-                if axes_of_freedom == 0:
-                    # Constrained in all axes, can't move.
-                    pass
-                elif axes_of_freedom == 3:
-                    # Not constrained, move in view plane.
-                    pos = vu.get_point(xy, pos)
-                else:
-                    a, b, clip = vu.get_ray(xy)
-                    view_dir = vu.get_direction()
-                    
-                    start = sys_matrix * start
-                    
-                    if axes_of_freedom == 1:
-                        direction = Vector((1, 1, 1)) - direction
-                    direction.rotate(sys_matrix)
-                    
-                    if axes_of_freedom == 2:
-                        # Constrained in one axis.
-                        # Find intersection with plane.
-                        i_p = intersect_line_plane(a, b, start, direction)
-                        if i_p is not None:
-                            pos = i_p
-                    elif axes_of_freedom == 1:
-                        # Constrained in two axes.
-                        # Find nearest point to line.
-                        i_p = intersect_line_line(a, b, start,
-                                                  start + direction)
-                        if i_p is not None:
-                            pos = i_p[1]
-        #end if do_raycast
-        
-        try:
-            sys_matrix_inv = sys_matrix.inverted()
-        except:
-            # this is some degenerate system
-            sys_matrix_inv = Matrix()
-        
-        _pos = sys_matrix_inv * pos
-        
-        # don't snap when mouse hasn't moved
-        if (snap_type == 'INCREMENT') and do_raycast:
-            for i in range(3):
-                _pos[i] = round_step(_pos[i], grid_step)
-        
-        for i in range(3):
-            if axes_coords[i] is not None:
-                _pos[i] = axes_coords[i]
-        
-        if (snap_type == 'INCREMENT') or (axes_of_freedom != 3):
-            pos = sys_matrix * _pos
-        
-        res_matrix = to_matrix4x4(matrix, pos)
-        
-        CursorDynamicSettings.local_matrix = \
-            sys_matrix_inv * res_matrix
-        
-        return res_matrix
-
-class Snap3DUtility(SnapUtilityBase):
-    grid_steps = {False:1.0, True:0.1}
-    
-    cube_verts = [Vector((i, j, k))
-        for i in (-1, 1)
-        for j in (-1, 1)
-        for k in (-1, 1)]
-    
-    def __init__(self, scene, shade):
-        SnapUtilityBase.__init__(self)
-        
-        convert_types = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META'}
-        self.cache = MeshCache(scene, convert_types)
-        
-        # ? seems that dict is enough
-        self.bbox_cache = {}#collections.OrderedDict()
-        self.sys_matrix_key = [0.0] * 9
-        
-        bm = prepare_gridbox_mesh(subdiv=2)
-        mesh = bpy.data.meshes.new(tmp_name)
-        bm.to_mesh(mesh)
-        mesh.update(calc_tessface=True)
-        #mesh.calc_tessface()
-        
-        self.bbox_obj = self.cache._make_obj(mesh, None)
-        self.bbox_obj.hide = True
-        self.bbox_obj.draw_type = 'WIRE'
-        self.bbox_obj.name = "BoundBoxSnap"
-        
-        self.shade_bbox = (shade == 'BOUNDBOX')
-    
-    def update_targets(self, to_include, to_exclude):
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        only_solid = tfm_opts.snap_only_to_solid
-        
-        # Ensure this is a set and not some other
-        # type of collection
-        to_exclude = set(to_exclude)
-        
-        for target in to_include:
-            if only_solid and ((target.draw_type == 'BOUNDS') \
-                    or (target.draw_type == 'WIRE')):
-                to_exclude.add(target)
-        
-        SnapUtilityBase.update_targets(self, to_include, to_exclude)
-    
-    def dispose(self):
-        self.hide_bbox(True)
-        
-        mesh = self.bbox_obj.data
-        bpy.data.objects.remove(self.bbox_obj)
-        bpy.data.meshes.remove(mesh)
-        
-        self.cache.clear()
-    
-    def hide_bbox(self, hide):
-        if self.bbox_obj.hide == hide:
-            return
-        
-        self.bbox_obj.hide = hide
-        
-        # We need to unlink bbox until required to show it,
-        # because otherwise outliner will blink each
-        # time cursor is clicked
-        if hide:
-            self.cache.scene.objects.unlink(self.bbox_obj)
-        else:
-            self.cache.scene.objects.link(self.bbox_obj)
-    
-    def get_bbox_obj(self, obj, sys_matrix, sys_matrix_inv, is_local):
-        if is_local:
-            bbox = None
-        else:
-            bbox = self.bbox_cache.get(obj, None)
-        
-        if bbox is None:
-            m = obj.matrix_world
-            if is_local:
-                sys_matrix = m.copy()
-                try:
-                    sys_matrix_inv = sys_matrix.inverted()
-                except Exception:
-                    # this is some degenerate system
-                    sys_matrix_inv = Matrix()
-            m_combined = sys_matrix_inv * m
-            bbox = [None, None]
-            
-            variant = ('RAW' if (self.editmode and
-                       (obj.type == 'MESH') and (obj.mode == 'EDIT'))
-                       else 'PREVIEW')
-            mesh_obj = self.cache.get(obj, variant, reuse=False)
-            if (mesh_obj is None) or self.shade_bbox or \
-                    (obj.draw_type == 'BOUNDS'):
-                if is_local:
-                    bbox = [(-1, -1, -1), (1, 1, 1)]
-                else:
-                    for p in self.cube_verts:
-                        extend_bbox(bbox, m_combined * p.copy())
-            elif is_local:
-                bbox = [mesh_obj.bound_box[0], mesh_obj.bound_box[6]]
-            else:
-                for v in mesh_obj.data.vertices:
-                    extend_bbox(bbox, m_combined * v.co.copy())
-            
-            bbox = (Vector(bbox[0]), Vector(bbox[1]))
-            
-            if not is_local:
-                self.bbox_cache[obj] = bbox
-        
-        half = (bbox[1] - bbox[0]) * 0.5
-        
-        m = MatrixCompose(half[0], half[1], half[2])
-        m = sys_matrix.to_3x3() * m
-        m.resize_4x4()
-        m.translation = sys_matrix * (bbox[0] + half)
-        self.bbox_obj.matrix_world = m
-        
-        return self.bbox_obj
-    
-    # TODO: ?
-    # - Sort snap targets according to raycasted distance?
-    # - Ignore targets if their bounding sphere is further
-    #   than already picked position?
-    # Perhaps these "optimizations" aren't worth the overhead.
-    
-    def raycast(self, a, b, clip, view_dir, is_bbox, \
-                sys_matrix, sys_matrix_inv, is_local, x_ray):
-        # If we need to interpolate normals or snap to
-        # vertices/edges, we must convert mesh.
-        #force = (self.interpolation != 'NEVER') or \
-        #    (self.snap_type in {'VERTEX', 'EDGE'})
-        # Actually, we have to always convert, since
-        # we need to get face at least to find tangential.
-        force = True
-        edit = self.editmode
-        
-        res = None
-        L = None
-        
-        for obj in self.targets:
-            orig_obj = obj
-            
-            if obj.name == self.bbox_obj.name:
-                # is there a better check?
-                # ("a is b" doesn't work here)
-                continue
-            if obj.show_x_ray != x_ray:
-                continue
-            
-            if is_bbox:
-                obj = self.get_bbox_obj(obj, \
-                    sys_matrix, sys_matrix_inv, is_local)
-            elif obj.draw_type == 'BOUNDS':
-                # Outside of BBox, there is no meaningful visual snapping
-                # for such display mode
-                continue
-            
-            m = obj.matrix_world.copy()
-            try:
-                mi = m.inverted()
-            except:
-                # this is some degenerate object
-                continue
-            la = mi * a
-            lb = mi * b
-            
-            # Bounding sphere check (to avoid unnecesary conversions
-            # and to make ray 'infinite')
-            bb_min = Vector(obj.bound_box[0])
-            bb_max = Vector(obj.bound_box[6])
-            c = (bb_min + bb_max) * 0.5
-            r = (bb_max - bb_min).length * 0.5
-            sec = intersect_line_sphere(la, lb, c, r, False)
-            if sec[0] is None:
-                continue # no intersection with the bounding sphere
-            
-            if not is_bbox:
-                # Ensure we work with raycastable object.
-                variant = ('RAW' if (edit and
-                           (obj.type == 'MESH') and (obj.mode == 'EDIT'))
-                           else 'PREVIEW')
-                obj = self.cache.get(obj, variant, reuse=(not force))
-                if (obj is None) or (not obj.data.polygons):
-                    continue # the object has no raycastable geometry
-            
-            # If ray must be infinite, ensure that
-            # endpoints are outside of bounding volume
-            if not clip:
-                # Seems that intersect_line_sphere()
-                # returns points in flipped order
-                lb, la = sec
-            
-            # Does ray actually intersect something?
-            lp, ln, face_id = obj.ray_cast(la, lb)
-            if face_id == -1:
-                continue
-            
-            # transform position to global space
-            p = m * lp
-            
-            # This works both for prespective and ortho
-            l = p.dot(view_dir)
-            if (L is None) or (l < L):
-                res = (lp, ln, face_id, obj, p, m, la, lb, orig_obj)
-                L = l
-        #end for
-        
-        return res
-    
-    # Returns:
-    # Matrix(X -- tangential,
-    #        Y -- 2nd tangential,
-    #        Z -- normal,
-    #        T -- raycasted/snapped position)
-    # Face ID (-1 if not applicable)
-    # Object (None if not applicable)
-    def snap_raycast(self, a, b, clip, view_dir, csu, alt_snap):
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        if self.shade_bbox and tfm_opts.snap_only_to_solid:
-            return None
-        
-        # Since introduction of "use object centers",
-        # this check is useless (use_object_centers overrides
-        # even INCREMENT snapping)
-        #if self.snap_type not in {'VERTEX', 'EDGE', 'FACE', 'VOLUME'}:
-        #    return None
-        
-        # key shouldn't depend on system origin;
-        # for bbox calculation origin is always zero
-        #if csu.tou.get() != "Surface":
-        #    sys_matrix = csu.get_matrix().to_3x3()
-        #else:
-        #    sys_matrix = csu.get_matrix('LOCAL').to_3x3()
-        sys_matrix = csu.get_matrix().to_3x3()
-        sys_matrix_key = list(c for v in sys_matrix for c in v)
-        sys_matrix_key.append(self.editmode)
-        sys_matrix = sys_matrix.to_4x4()
-        try:
-            sys_matrix_inv = sys_matrix.inverted()
-        except:
-            # this is some degenerate system
-            return None
-        
-        if self.sys_matrix_key != sys_matrix_key:
-            self.bbox_cache.clear()
-            self.sys_matrix_key = sys_matrix_key
-        
-        # In this context, Volume represents BBox :P
-        is_bbox = (self.snap_type == 'VOLUME')
-        is_local = (csu.tou.get() in \
-            {'LOCAL', "Scaled"})
-        
-        res = self.raycast(a, b, clip, view_dir, \
-            is_bbox, sys_matrix, sys_matrix_inv, is_local, True)
-        
-        if res is None:
-            res = self.raycast(a, b, clip, view_dir, \
-                is_bbox, sys_matrix, sys_matrix_inv, is_local, False)
-        
-        # Occlusion-based edge/vertex snapping will be
-        # too inefficient in Python (well, even without
-        # the occlusion, iterating over all edges/vertices
-        # of each object is inefficient too)
-        
-        if not res:
-            return None
-        
-        lp, ln, face_id, obj, p, m, la, lb, orig_obj = res
-        
-        if is_bbox:
-            self.bbox_obj.matrix_world = m.copy()
-            self.bbox_obj.show_x_ray = orig_obj.show_x_ray
-            self.hide_bbox(False)
-        
-        _ln = ln.copy()
-        
-        face = obj.data.tessfaces[face_id]
-        L = None
-        t1 = None
-        
-        if self.snap_type == 'VERTEX' or self.snap_type == 'VOLUME':
-            for v0 in face.vertices:
-                v = obj.data.vertices[v0]
-                p0 = v.co
-                l = (lp - p0).length_squared
-                if (L is None) or (l < L):
-                    p = p0
-                    ln = v.normal.copy()
-                    #t1 = ln.cross(_ln)
-                    L = l
-            
-            _ln = ln.copy()
-            '''
-            if t1.length < epsilon:
-                if (1.0 - abs(ln.z)) < epsilon:
-                    t1 = Vector((1, 0, 0))
-                else:
-                    t1 = Vector((0, 0, 1)).cross(_ln)
-            '''
-            p = m * p
-        elif self.snap_type == 'EDGE':
-            use_smooth = face.use_smooth
-            if self.interpolation == 'NEVER':
-                use_smooth = False
-            elif self.interpolation == 'ALWAYS':
-                use_smooth = True
-            
-            for v0, v1 in face.edge_keys:
-                p0 = obj.data.vertices[v0].co
-                p1 = obj.data.vertices[v1].co
-                dp = p1 - p0
-                q = dp.dot(lp - p0) / dp.length_squared
-                if (q >= 0.0) and (q <= 1.0):
-                    ep = p0 + dp * q
-                    l = (lp - ep).length_squared
-                    if (L is None) or (l < L):
-                        if alt_snap:
-                            p = (p0 + p1) * 0.5
-                            q = 0.5
-                        else:
-                            p = ep
-                        if not use_smooth:
-                            q = 0.5
-                        ln = obj.data.vertices[v1].normal * q + \
-                             obj.data.vertices[v0].normal * (1.0 - q)
-                        t1 = dp
-                        L = l
-            
-            p = m * p
-        else:
-            if alt_snap:
-                lp = face.center
-                p = m * lp
-            
-            if self.interpolation != 'NEVER':
-                ln = self.interpolate_normal(
-                    obj, face_id, lp, la, lb - la)
-            
-            # Comment this to make 1st tangential 
-            # always lie in the face's plane
-            _ln = ln.copy()
-            
-            '''
-            for v0, v1 in face.edge_keys:
-                p0 = obj.data.vertices[v0].co
-                p1 = obj.data.vertices[v1].co
-                dp = p1 - p0
-                q = dp.dot(lp - p0) / dp.length_squared
-                if (q >= 0.0) and (q <= 1.0):
-                    ep = p0 + dp * q
-                    l = (lp - ep).length_squared
-                    if (L is None) or (l < L):
-                        t1 = dp
-                        L = l
-            '''
-        
-        n = ln.copy()
-        n.rotate(m)
-        n.normalize()
-        
-        if t1 is None:
-            _ln.rotate(m)
-            _ln.normalize()
-            if (1.0 - abs(_ln.z)) < epsilon:
-                t1 = Vector((1, 0, 0))
-            else:
-                t1 = Vector((0, 0, 1)).cross(_ln)
-            t1.normalize()
-        else:
-            t1.rotate(m)
-            t1.normalize()
-        
-        t2 = t1.cross(n)
-        t2.normalize()
-        
-        matrix = MatrixCompose(t1, t2, n, p)
-        
-        return (matrix, face_id, obj, orig_obj)
-    
-    def interpolate_normal(self, obj, face_id, p, orig, ray):
-        face = obj.data.tessfaces[face_id]
-        
-        use_smooth = face.use_smooth
-        if self.interpolation == 'NEVER':
-            use_smooth = False
-        elif self.interpolation == 'ALWAYS':
-            use_smooth = True
-        
-        if not use_smooth:
-            return face.normal.copy()
-        
-        # edge.use_edge_sharp affects smoothness only if
-        # mesh has EdgeSplit modifier
-        
-        # ATTENTION! Coords/Normals MUST be copied
-        # (a bug in barycentric_transform implementation ?)
-        # Somewhat strangely, the problem also disappears
-        # if values passed to barycentric_transform
-        # are print()ed beforehand.
-        
-        co = [obj.data.vertices[vi].co.copy()
-            for vi in face.vertices]
-        
-        normals = [obj.data.vertices[vi].normal.copy()
-            for vi in face.vertices]
-        
-        if len(face.vertices) != 3:
-            tris = tessellate_polygon([co])
-            for tri in tris:
-                i0, i1, i2 = tri
-                if intersect_ray_tri(co[i0], co[i1], co[i2], ray, orig):
-                    break
-        else:
-            i0, i1, i2 = 0, 1, 2
-        
-        n = barycentric_transform(p, co[i0], co[i1], co[i2],
-            normals[i0], normals[i1], normals[i2])
-        n.normalize()
-        
-        return n
-
-# ====== CONVERTED-TO-MESH OBJECTS CACHE ====== #
-#============================================================================#
-class ToggleObjectMode:
-    def __init__(self, mode='OBJECT'):
-        if not isinstance(mode, str):
-            mode = ('OBJECT' if mode else None)
-        
-        self.mode = mode
-    
-    def __enter__(self):
-        if self.mode:
-            edit_preferences = bpy.context.user_preferences.edit
-            
-            self.global_undo = edit_preferences.use_global_undo
-            self.prev_mode = bpy.context.object.mode
-            
-            if self.prev_mode != self.mode:
-                edit_preferences.use_global_undo = False
-                bpy.ops.object.mode_set(mode=self.mode)
-        
-        return self
-    
-    def __exit__(self, type, value, traceback):
-        if self.mode:
-            edit_preferences = bpy.context.user_preferences.edit
-            
-            if self.prev_mode != self.mode:
-                bpy.ops.object.mode_set(mode=self.prev_mode)
-                edit_preferences.use_global_undo = self.global_undo
-
-class MeshCacheItem:
-    def __init__(self):
-        self.variants = {}
-    
-    def __getitem__(self, variant):
-        return self.variants[variant][0]
-    
-    def __setitem__(self, variant, conversion):
-        mesh = conversion[0].data
-        #mesh.update(calc_tessface=True)
-        #mesh.calc_tessface()
-        mesh.calc_normals()
-        
-        self.variants[variant] = conversion
-    
-    def __contains__(self, variant):
-        return variant in self.variants
-    
-    def dispose(self):
-        for obj, converted in self.variants.values():
-            if converted:
-                mesh = obj.data
-                bpy.data.objects.remove(obj)
-                bpy.data.meshes.remove(mesh)
-        self.variants = None
-
-class MeshCache:
-    """
-    Keeps a cache of mesh equivalents of requested objects.
-    It is assumed that object's data does not change while
-    the cache is in use.
-    """
-    
-    variants_enum = {'RAW', 'PREVIEW', 'RENDER'}
-    variants_normalization = {
-        'MESH':{},
-        'CURVE':{},
-        'SURFACE':{},
-        'FONT':{},
-        'META':{'RAW':'PREVIEW'},
-        'ARMATURE':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-        'LATTICE':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-        'EMPTY':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-        'CAMERA':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-        'LAMP':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-        'SPEAKER':{'RAW':'PREVIEW', 'RENDER':'PREVIEW'},
-    }
-    conversible_types = {'MESH', 'CURVE', 'SURFACE', 'FONT',
-                         'META', 'ARMATURE', 'LATTICE'}
-    convert_types = conversible_types
-    
-    def __init__(self, scene, convert_types=None):
-        self.scene = scene
-        if convert_types:
-            self.convert_types = convert_types
-        self.cached = {}
-    
-    def __del__(self):
-        self.clear()
-    
-    def clear(self, expect_zero_users=False):
-        for cache_item in self.cached.values():
-            if cache_item:
-                try:
-                    cache_item.dispose()
-                except RuntimeError:
-                    if expect_zero_users:
-                        raise
-        self.cached.clear()
-    
-    def __delitem__(self, obj):
-        cache_item = self.cached.pop(obj, None)
-        if cache_item:
-            cache_item.dispose()
-    
-    def __contains__(self, obj):
-        return obj in self.cached
-    
-    def __getitem__(self, obj):
-        if isinstance(obj, tuple):
-            return self.get(*obj)
-        return self.get(obj)
-    
-    def get(self, obj, variant='PREVIEW', reuse=True):
-        if variant not in self.variants_enum:
-            raise ValueError("Mesh variant must be one of %s" %
-                             self.variants_enum)
-        
-        # Make sure the variant is proper for this type of object
-        variant = (self.variants_normalization[obj.type].
-                   get(variant, variant))
-        
-        if obj in self.cached:
-            cache_item = self.cached[obj]
-            try:
-                # cache_item is None if object isn't conversible to mesh
-                return (None if (cache_item is None)
-                        else cache_item[variant])
-            except KeyError:
-                pass
-        else:
-            cache_item = None
-        
-        if obj.type not in self.conversible_types:
-            self.cached[obj] = None
-            return None
-        
-        if not cache_item:
-            cache_item = MeshCacheItem()
-            self.cached[obj] = cache_item
-        
-        conversion = self._convert(obj, variant, reuse)
-        cache_item[variant] = conversion
-        
-        return conversion[0]
-    
-    def _convert(self, obj, variant, reuse=True):
-        obj_type = obj.type
-        obj_mode = obj.mode
-        data = obj.data
-        
-        if obj_type == 'MESH':
-            if reuse and ((variant == 'RAW') or (len(obj.modifiers) == 0)):
-                return (obj, False)
-            else:
-                force_objectmode = (obj_mode in {'EDIT', 'SCULPT'})
-                return (self._to_mesh(obj, variant, force_objectmode), True)
-        elif obj_type in {'CURVE', 'SURFACE', 'FONT'}:
-            if variant == 'RAW':
-                bm = bmesh.new()
-                for spline in data.splines:
-                    for point in spline.bezier_points:
-                        bm.verts.new(point.co)
-                        bm.verts.new(point.handle_left)
-                        bm.verts.new(point.handle_right)
-                    for point in spline.points:
-                        bm.verts.new(point.co[:3])
-                return (self._make_obj(bm, obj), True)
-            else:
-                if variant == 'RENDER':
-                    resolution_u = data.resolution_u
-                    resolution_v = data.resolution_v
-                    if data.render_resolution_u != 0:
-                        data.resolution_u = data.render_resolution_u
-                    if data.render_resolution_v != 0:
-                        data.resolution_v = data.render_resolution_v
-                
-                result = (self._to_mesh(obj, variant), True)
-                
-                if variant == 'RENDER':
-                    data.resolution_u = resolution_u
-                    data.resolution_v = resolution_v
-                
-                return result
-        elif obj_type == 'META':
-            if variant == 'RAW':
-                # To avoid the hassle of snapping metaelements
-                # to themselves, we just create an empty mesh
-                bm = bmesh.new()
-                return (self._make_obj(bm, obj), True)
-            else:
-                if variant == 'RENDER':
-                    resolution = data.resolution
-                    data.resolution = data.render_resolution
-                
-                result = (self._to_mesh(obj, variant), True)
-                
-                if variant == 'RENDER':
-                    data.resolution = resolution
-                
-                return result
-        elif obj_type == 'ARMATURE':
-            bm = bmesh.new()
-            if obj_mode == 'EDIT':
-                for bone in data.edit_bones:
-                    head = bm.verts.new(bone.head)
-                    tail = bm.verts.new(bone.tail)
-                    bm.edges.new((head, tail))
-            elif obj_mode == 'POSE':
-                for bone in obj.pose.bones:
-                    head = bm.verts.new(bone.head)
-                    tail = bm.verts.new(bone.tail)
-                    bm.edges.new((head, tail))
-            else:
-                for bone in data.bones:
-                    head = bm.verts.new(bone.head_local)
-                    tail = bm.verts.new(bone.tail_local)
-                    bm.edges.new((head, tail))
-            return (self._make_obj(bm, obj), True)
-        elif obj_type == 'LATTICE':
-            bm = bmesh.new()
-            for point in data.points:
-                bm.verts.new(point.co_deform)
-            return (self._make_obj(bm, obj), True)
-    
-    def _to_mesh(self, obj, variant, force_objectmode=False):
-        tmp_name = chr(0x10ffff) # maximal Unicode value
-        
-        with ToggleObjectMode(force_objectmode):
-            if variant == 'RAW':
-                mesh = obj.to_mesh(self.scene, False, 'PREVIEW')
-            else:
-                mesh = obj.to_mesh(self.scene, True, variant)
-            mesh.name = tmp_name
-        
-        return self._make_obj(mesh, obj)
-    
-    def _make_obj(self, mesh, src_obj):
-        tmp_name = chr(0x10ffff) # maximal Unicode value
-        
-        if isinstance(mesh, bmesh.types.BMesh):
-            bm = mesh
-            mesh = bpy.data.meshes.new(tmp_name)
-            bm.to_mesh(mesh)
-        
-        tmp_obj = bpy.data.objects.new(tmp_name, mesh)
-        
-        if src_obj:
-            tmp_obj.matrix_world = src_obj.matrix_world
-            
-            # This is necessary for correct bbox display # TODO
-            # (though it'd be better to change the logic in the raycasting)
-            tmp_obj.show_x_ray = src_obj.show_x_ray
-            
-            tmp_obj.dupli_faces_scale = src_obj.dupli_faces_scale
-            tmp_obj.dupli_frames_end = src_obj.dupli_frames_end
-            tmp_obj.dupli_frames_off = src_obj.dupli_frames_off
-            tmp_obj.dupli_frames_on = src_obj.dupli_frames_on
-            tmp_obj.dupli_frames_start = src_obj.dupli_frames_start
-            tmp_obj.dupli_group = src_obj.dupli_group
-            #tmp_obj.dupli_list = src_obj.dupli_list
-            tmp_obj.dupli_type = src_obj.dupli_type
-        
-        # Make Blender recognize object as having geometry
-        # (is there a simpler way to do this?)
-        self.scene.objects.link(tmp_obj)
-        self.scene.update()
-        # We don't need this object in scene
-        self.scene.objects.unlink(tmp_obj)
-        
-        return tmp_obj
-
-#============================================================================#
-
-# A base class for emulating ID-datablock behavior
-class PseudoIDBlockBase(bpy.types.PropertyGroup):
-    # TODO: use normal metaprogramming?
-
-    @staticmethod
-    def create_props(type, name, options={'ANIMATABLE'}):
-        def active_update(self, context):
-            # necessary to avoid recursive calls
-            if self._self_update[0]:
-                return
-            
-            if self._dont_rename[0]:
-                return
-            
-            if len(self.collection) == 0:
-                return
-            
-            # prepare data for renaming...
-            old_key = (self.enum if self.enum else self.collection[0].name)
-            new_key = (self.active if self.active else "Untitled")
-            
-            if old_key == new_key:
-                return
-            
-            old_item = None
-            new_item = None
-            existing_names = []
-            
-            for item in self.collection:
-                if (item.name == old_key) and (not new_item):
-                    new_item = item
-                elif (item.name == new_key) and (not old_item):
-                    old_item = item
-                else:
-                    existing_names.append(item.name)
-            existing_names.append(new_key)
-            
-            # rename current item
-            new_item.name = new_key
-            
-            if old_item:
-                # rename other item if it has that name
-                name = new_key
-                i = 1
-                while name in existing_names:
-                    name = "{}.{:0>3}".format(new_key, i)
-                    i += 1
-                old_item.name = name
-            
-            # update the enum
-            self._self_update[0] += 1
-            self.update_enum()
-            self._self_update[0] -= 1
-        # end def
-        
-        def enum_update(self, context):
-            # necessary to avoid recursive calls
-            if self._self_update[0]:
-                return
-            
-            self._dont_rename[0] = True
-            self.active = self.enum
-            self._dont_rename[0] = False
-            
-            self.on_item_select()
-        # end def
-        
-        collection = bpy.props.CollectionProperty(
-            type=type)
-        active = bpy.props.StringProperty(
-            name="Name",
-            description="Name of the active {}".format(name),
-            options=options,
-            update=active_update)
-        enum = bpy.props.EnumProperty(
-            items=[],
-            name="Choose",
-            description="Choose {}".format(name),
-            default=set(),
-            options={'ENUM_FLAG'},
-            update=enum_update)
-        
-        return collection, active, enum
-    # end def
-    
-    def add(self, name="", **kwargs):
-        if not name:
-            name = 'Untitled'
-        _name = name
-        
-        existing_names = [item.name for item in self.collection]
-        i = 1
-        while name in existing_names:
-            name = "{}.{:0>3}".format(_name, i)
-            i += 1
-        
-        instance = self.collection.add()
-        instance.name = name
-        
-        for key, value in kwargs.items():
-            setattr(instance, key, value)
-        
-        self._self_update[0] += 1
-        self.active = name
-        self.update_enum()
-        self._self_update[0] -= 1
-        
-        return instance
-    
-    def remove(self, key):
-        if isinstance(key, int):
-            i = key
-        else:
-            i = self.indexof(key)
-        
-        # Currently remove() ignores non-existing indices...
-        # In the case this behavior changes, we have the try block.
-        try:
-            self.collection.remove(i)
-        except:
-            pass
-        
-        self._self_update[0] += 1
-        if len(self.collection) != 0:
-            i = min(i, len(self.collection) - 1)
-            self.active = self.collection[i].name
-        else:
-            self.active = ""
-        self.update_enum()
-        self._self_update[0] -= 1
-    
-    def get_item(self, key=None):
-        if key is None:
-            i = self.indexof(self.active)
-        elif isinstance(key, int):
-            i = key
-        else:
-            i = self.indexof(key)
-        
-        try:
-            return self.collection[i]
-        except:
-            return None
-    
-    def indexof(self, key):
-        return next((i for i, v in enumerate(self.collection) \
-            if v.name == key), -1)
-        
-        # Which is more Pythonic?
-        
-        #for i, item in enumerate(self.collection):
-        #    if item.name == key:
-        #        return i
-        #return -1 # non-existing index
-    
-    def update_enum(self):
-        names = []
-        items = []
-        for item in self.collection:
-            names.append(item.name)
-            items.append((item.name, item.name, ""))
-        
-        prop_class, prop_params = type(self).enum
-        prop_params["items"] = items
-        if len(items) == 0:
-            prop_params["default"] = set()
-            prop_params["options"] = {'ENUM_FLAG'}
-        else:
-            # Somewhy active may be left from previous times,
-            # I don't want to dig now why that happens.
-            if self.active not in names:
-                self.active = items[0][0]
-            prop_params["default"] = self.active
-            prop_params["options"] = set()
-        
-        # Can this cause problems? In the near future, shouldn't...
-        type(self).enum = (prop_class, prop_params)
-        #type(self).enum = bpy.props.EnumProperty(**prop_params)
-        
-        if len(items) != 0:
-            self.enum = self.active
-    
-    def on_item_select(self):
-        pass
-    
-    data_name = ""
-    op_new = ""
-    op_delete = ""
-    icon = 'DOT'
-    
-    def draw(self, context, layout):
-        if len(self.collection) == 0:
-            if self.op_new:
-                layout.operator(self.op_new, icon=self.icon)
-            else:
-                layout.label(
-                    text="({})".format(self.data_name),
-                    icon=self.icon)
-            return
-        
-        row = layout.row(align=True)
-        row.prop_menu_enum(self, "enum", text="", icon=self.icon)
-        row.prop(self, "active", text="")
-        if self.op_new:
-            row.operator(self.op_new, text="", icon='ZOOMIN')
-        if self.op_delete:
-            row.operator(self.op_delete, text="", icon='X')
-# end class
-#============================================================================#
-# ===== PROPERTY DEFINITIONS ===== #
-
-# ===== TRANSFORM EXTRA OPTIONS ===== #
-class TransformExtraOptionsProp(bpy.types.PropertyGroup):
-    use_relative_coords = bpy.props.BoolProperty(
-        name="Relative coordinates", 
-        description="Consider existing transformation as the starting point", 
-        default=True)
-    snap_interpolate_normals_mode = bpy.props.EnumProperty(
-        items=[('NEVER', "Never", "Don't interpolate normals"),
-               ('ALWAYS', "Always", "Always interpolate normals"),
-               ('SMOOTH', "Smoothness-based", "Interpolate normals only "\
-               "for faces with smooth shading"),],
-        name="Normal interpolation", 
-        description="Normal interpolation mode for snapping", 
-        default='SMOOTH')
-    snap_only_to_solid = bpy.props.BoolProperty(
-        name="Snap only to soild", 
-        description="Ignore wireframe/non-solid objects during snapping", 
-        default=False)
-    snap_element_screen_size = bpy.props.IntProperty(
-        name="Snap distance", 
-        description="Radius in pixels for snapping to edges/vertices", 
-        default=8,
-        min=2,
-        max=64)
-    use_comma_separator = bpy.props.BoolProperty(
-        name="Use comma separator",
-        description="Use comma separator when copying/pasting"\
-                    "coordinate values (instead of Tab character)",
-        default=True,
-        options={'HIDDEN'})
-
-# ===== 3D VECTOR LOCATION ===== #
-class LocationProp(bpy.types.PropertyGroup):
-    pos = bpy.props.FloatVectorProperty(
-        name="xyz", description="xyz coords",
-        options={'HIDDEN'}, subtype='XYZ')
-
-# ===== HISTORY ===== #
-def update_history_max_size(self, context):
-    settings = find_settings()
-    
-    history = settings.history
-    
-    prop_class, prop_params = type(history).current_id
-    old_max = prop_params["max"]
-    
-    size = history.max_size
-    try:
-        int_size = int(size)
-        int_size = max(int_size, 0)
-        int_size = min(int_size, history.max_size_limit)
-    except:
-        int_size = old_max
-    
-    if old_max != int_size:
-        prop_params["max"] = int_size
-        type(history).current_id = (prop_class, prop_params)
-    
-    # also: clear immediately?
-    for i in range(len(history.entries) - 1, int_size, -1):
-        history.entries.remove(i)
-    
-    if str(int_size) != size:
-        # update history.max_size if it's not inside the limits
-        history.max_size = str(int_size)
-
-def update_history_id(self, context):
-    scene = bpy.context.scene
-    
-    settings = find_settings()
-    history = settings.history
-    
-    pos = history.get_pos()
-    if pos is not None:
-        # History doesn't depend on view (?)
-        cursor_pos = get_cursor_location(scene=scene)
-        
-        if CursorHistoryProp.update_cursor_on_id_change:
-            # Set cursor position anyway (we're changing v3d's
-            # cursor, which may be separate from scene's)
-            # This, however, should be done cautiously
-            # from scripts, since, e.g., CursorMonitor
-            # can supply wrong context -> cursor will be set
-            # in a different view than required
-            set_cursor_location(pos, v3d=context.space_data)
-        
-        if pos != cursor_pos:
-            if (history.current_id == 0) and (history.last_id <= 1):
-                history.last_id = 1
-            else:
-                history.last_id = history.curr_id
-            history.curr_id = history.current_id
-
-class CursorHistoryProp(bpy.types.PropertyGroup):
-    max_size_limit = 500
-    
-    update_cursor_on_id_change = True
-    
-    show_trace = bpy.props.BoolProperty(
-        name="Trace",
-        description="Show history trace",
-        default=False)
-    max_size = bpy.props.StringProperty(
-        name="Size",
-        description="History max size",
-        default=str(50),
-        update=update_history_max_size)
-    current_id = bpy.props.IntProperty(
-        name="Index",
-        description="Current position in cursor location history",
-        default=50,
-        min=0,
-        max=50,
-        update=update_history_id)
-    entries = bpy.props.CollectionProperty(
-        type=LocationProp)
-    
-    curr_id = bpy.props.IntProperty(options={'HIDDEN'})
-    last_id = bpy.props.IntProperty(options={'HIDDEN'})
-    
-    def get_pos(self, id = None):
-        if id is None:
-            id = self.current_id
-        
-        id = min(max(id, 0), len(self.entries) - 1)
-        
-        if id < 0:
-            # history is empty
-            return None
-        
-        return self.entries[id].pos
-    
-    # for updating the upper bound on file load
-    def update_max_size(self):
-        prop_class, prop_params = type(self).current_id
-        # self.max_size expected to be always a correct integer
-        prop_params["max"] = int(self.max_size)
-        type(self).current_id = (prop_class, prop_params)
-    
-    def draw_trace(self, context):
-        bgl.glColor4f(0.75, 1.0, 0.75, 1.0)
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        for entry in self.entries:
-            p = entry.pos
-            bgl.glVertex3f(p[0], p[1], p[2])
-        bgl.glEnd()
-    
-    def draw_offset(self, context):
-        bgl.glShadeModel(bgl.GL_SMOOTH)
-        
-        tfm_operator = CursorDynamicSettings.active_transform_operator
-        
-        bgl.glBegin(bgl.GL_LINE_STRIP)
-        
-        if tfm_operator:
-            p = tfm_operator.particles[0]. \
-                get_initial_matrix().to_translation()
-        else:
-            p = self.get_pos(self.last_id)
-        bgl.glColor4f(1.0, 0.75, 0.5, 1.0)
-        bgl.glVertex3f(p[0], p[1], p[2])
-        
-        p = get_cursor_location(v3d=context.space_data)
-        bgl.glColor4f(1.0, 1.0, 0.25, 1.0)
-        bgl.glVertex3f(p[0], p[1], p[2])
-        
-        bgl.glEnd()
-
-# ===== BOOKMARK ===== #
-class BookmarkProp(bpy.types.PropertyGroup):
-    name = bpy.props.StringProperty(
-        name="name", description="bookmark name",
-        options={'HIDDEN'})
-    pos = bpy.props.FloatVectorProperty(
-        name="xyz", description="xyz coords",
-        options={'HIDDEN'}, subtype='XYZ')
-
-class BookmarkIDBlock(PseudoIDBlockBase):
-    # Somewhy instance members aren't seen in update()
-    # callbacks... but class members are.
-    _self_update = [0]
-    _dont_rename = [False]
-    
-    data_name = "Bookmark"
-    op_new = "scene.cursor_3d_new_bookmark"
-    op_delete = "scene.cursor_3d_delete_bookmark"
-    icon = 'CURSOR'
-    
-    collection, active, enum = PseudoIDBlockBase.create_props(
-        BookmarkProp, "Bookmark")
-
-class NewCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_new_bookmark"
-    bl_label = "New Bookmark"
-    bl_description = "Add a new bookmark"
-    
-    name = bpy.props.StringProperty(
-        name="Name",
-        description="Name of the new bookmark",
-        default="Mark")
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        bookmark = library.bookmarks.add(name=self.name)
-        
-        cusor_pos = get_cursor_location(v3d=context.space_data)
-        
-        try:
-            bookmark.pos = library.convert_from_abs(context.space_data,
-                                                    cusor_pos, True)
-        except Exception as exc:
-            self.report({'ERROR_INVALID_CONTEXT'}, exc.args[0])
-            return {'CANCELLED'}
-        
-        return {'FINISHED'}
-
-class DeleteCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_delete_bookmark"
-    bl_label = "Delete Bookmark"
-    bl_description = "Delete active bookmark"
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        name = library.bookmarks.active
-        
-        library.bookmarks.remove(key=name)
-        
-        return {'FINISHED'}
-
-class OverwriteCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_overwrite_bookmark"
-    bl_label = "Overwrite"
-    bl_description = "Overwrite active bookmark "\
-        "with the current cursor location"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        bookmark = library.bookmarks.get_item()
-        if not bookmark:
-            return {'CANCELLED'}
-        
-        cusor_pos = get_cursor_location(v3d=context.space_data)
-        
-        try:
-            bookmark.pos = library.convert_from_abs(context.space_data,
-                                                    cusor_pos, True)
-        except Exception as exc:
-            self.report({'ERROR_INVALID_CONTEXT'}, exc.args[0])
-            return {'CANCELLED'}
-        
-        CursorDynamicSettings.recalc_csu(context, 'PRESS')
-        
-        return {'FINISHED'}
-
-class RecallCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_recall_bookmark"
-    bl_label = "Recall"
-    bl_description = "Move cursor to the active bookmark"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        bookmark = library.bookmarks.get_item()
-        if not bookmark:
-            return {'CANCELLED'}
-        
-        try:
-            bookmark_pos = library.convert_to_abs(context.space_data,
-                                                  bookmark.pos, True)
-            set_cursor_location(bookmark_pos, v3d=context.space_data)
-        except Exception as exc:
-            self.report({'ERROR_INVALID_CONTEXT'}, exc.args[0])
-            return {'CANCELLED'}
-        
-        CursorDynamicSettings.recalc_csu(context)
-        
-        return {'FINISHED'}
-
-class SwapCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_swap_bookmark"
-    bl_label = "Swap"
-    bl_description = "Swap cursor position with the active bookmark"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        bookmark = library.bookmarks.get_item()
-        if not bookmark:
-            return {'CANCELLED'}
-        
-        cusor_pos = get_cursor_location(v3d=context.space_data)
-        
-        try:
-            bookmark_pos = library.convert_to_abs(context.space_data,
-                                                  bookmark.pos, True)
-            
-            set_cursor_location(bookmark_pos, v3d=context.space_data)
-            
-            bookmark.pos = library.convert_from_abs(context.space_data,
-                                                    cusor_pos, True,
-                use_history=False)
-        except Exception as exc:
-            self.report({'ERROR_INVALID_CONTEXT'}, exc.args[0])
-            return {'CANCELLED'}
-        
-        CursorDynamicSettings.recalc_csu(context)
-        
-        return {'FINISHED'}
-
-# Will this be used?
-class SnapSelectionToCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_snap_selection_to_bookmark"
-    bl_label = "Snap Selection"
-    bl_description = "Snap selection to the active bookmark"
-
-# Will this be used?
-class AddEmptyAtCursor3DBookmark(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_add_empty_at_bookmark"
-    bl_label = "Add Empty"
-    bl_description = "Add new Empty at the active bookmark"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        settings = find_settings()
-        library = settings.libraries.get_item()
-        if not library:
-            return {'CANCELLED'}
-        
-        bookmark = library.bookmarks.get_item()
-        if not bookmark:
-            return {'CANCELLED'}
-        
-        try:
-            matrix = library.get_matrix(use_history=False,
-                                        v3d=context.space_data, warn=True)
-            bookmark_pos = matrix * bookmark.pos
-        except Exception as exc:
-            self.report({'ERROR_INVALID_CONTEXT'}, exc.args[0])
-            return {'CANCELLED'}
-        
-        name = "{}.{}".format(library.name, bookmark.name)
-        obj = bpy.data.objects.new(name, None)
-        obj.matrix_world = to_matrix4x4(matrix, bookmark_pos)
-        context.scene.objects.link(obj)
-        
-        """
-        for sel_obj in list(context.selected_objects):
-            sel_obj.select = False
-        obj.select = True
-        context.scene.objects.active = obj
-        
-        # We need this to update bookmark position if
-        # library's system is local/scaled/normal/etc.
-        CursorDynamicSettings.recalc_csu(context, "PRESS")
-        """
-        
-        # TODO: exit from editmode? It has separate history!
-        # If we just link object to scene, it will not trigger
-        # addition of new entry to Undo history
-        bpy.ops.ed.undo_push(message="Add Object")
-        
-        return {'FINISHED'}
-
-# ===== BOOKMARK LIBRARY ===== #
-class BookmarkLibraryProp(bpy.types.PropertyGroup):
-    name = bpy.props.StringProperty(
-        name="Name", description="Name of the bookmark library",
-        options={'HIDDEN'})
-    bookmarks = bpy.props.PointerProperty(
-        type=BookmarkIDBlock,
-        options={'HIDDEN'})
-    system = bpy.props.EnumProperty(
-        items=[
-            ('GLOBAL', "Global", "Global (absolute) coordinates"),
-            ('LOCAL', "Local", "Local coordinate system, "\
-                "relative to the active object"),
-            ('SCALED', "Scaled", "Scaled local coordinate system, "\
-                "relative to the active object"),
-            ('NORMAL', "Normal", "Normal coordinate system, "\
-                "relative to the selected elements"),
-            ('CONTEXT', "Context", "Current transform orientation; "\
-                "origin depends on selection"),
-        ],
-        default="GLOBAL",
-        name="System",
-        description="Coordinate system in which to store/recall "\
-                    "cursor locations",
-        options={'HIDDEN'})
-    offset = bpy.props.BoolProperty(
-        name="Offset",
-        description="Store/recall relative to the last cursor position",
-        default=False,
-        options={'HIDDEN'})
-    
-    # Returned None means "operation is not aplicable"
-    def get_matrix(self, use_history, v3d, warn=True, **kwargs):
-        #particles, csu = gather_particles(**kwargs)
-        
-        # Ensure we have relevant CSU (Blender will crash
-        # if we use the old one after Undo/Redo)
-        CursorDynamicSettings.recalc_csu(bpy.context)
-        
-        csu = CursorDynamicSettings.csu
-        
-        if self.offset:
-            # history? or keep separate for each scene?
-            if not use_history:
-                csu.source_pos = get_cursor_location(v3d=v3d)
-            else:
-                settings = find_settings()
-                history = settings.history
-                csu.source_pos = history.get_pos(history.last_id)
-        else:
-            csu.source_pos = Vector()
-        
-        active_obj = csu.tou.scene.objects.active
-        
-        if self.system == 'GLOBAL':
-            sys_name = 'GLOBAL'
-            pivot = 'WORLD'
-        elif self.system == 'LOCAL':
-            if not active_obj:
-                if warn:
-                    raise Exception("There is no active object")
-                return None
-            sys_name = 'LOCAL'
-            pivot = 'ACTIVE'
-        elif self.system == 'SCALED':
-            if not active_obj:
-                if warn:
-                    raise Exception("There is no active object")
-                return None
-            sys_name = 'Scaled'
-            pivot = 'ACTIVE'
-        elif self.system == 'NORMAL':
-            if (not active_obj) or ('EDIT' not in active_obj.mode):
-                if warn:
-                    raise Exception("Active object must be in Edit mode")
-                return None
-            sys_name = 'NORMAL'
-            pivot = 'MEDIAN' # ?
-        elif self.system == 'CONTEXT':
-            sys_name = None # use current orientation
-            pivot = None
-            
-            if active_obj and (active_obj.mode != 'OBJECT'):
-                if len(particles) == 0:
-                    pivot = active_obj.matrix_world.to_translation()
-        
-        return csu.get_matrix(sys_name, self.offset, pivot)
-    
-    def convert_to_abs(self, v3d, pos, warn=False, **kwargs):
-        kwargs.pop("use_history", None)
-        matrix = self.get_matrix(False, v3d, warn, **kwargs)
-        if not matrix:
-            return None
-        return matrix * pos
-    
-    def convert_from_abs(self, v3d, pos, warn=False, **kwargs):
-        use_history = kwargs.pop("use_history", True)
-        matrix = self.get_matrix(use_history, v3d, warn, **kwargs)
-        if not matrix:
-            return None
-        
-        try:
-            return matrix.inverted() * pos
-        except:
-            # this is some degenerate object
-            return Vector()
-    
-    def draw_bookmark(self, context):
-        r = context.region
-        rv3d = context.region_data
-        
-        bookmark = self.bookmarks.get_item()
-        if not bookmark:
-            return
-        
-        pos = self.convert_to_abs(context.space_data, bookmark.pos)
-        if pos is None:
-            return
-        
-        projected = location_3d_to_region_2d(r, rv3d, pos)
-        
-        if projected:
-            # Store previous OpenGL settings
-            smooth_prev = gl_get(bgl.GL_SMOOTH)
-            
-            bgl.glShadeModel(bgl.GL_SMOOTH)
-            bgl.glLineWidth(2)
-            bgl.glColor4f(0.0, 1.0, 0.0, 1.0)
-            bgl.glBegin(bgl.GL_LINE_STRIP)
-            radius = 6
-            n = 8
-            da = 2 * math.pi / n
-            x, y = projected
-            x, y = int(x), int(y)
-            for i in range(n + 1):
-                a = i * da
-                dx = math.sin(a) * radius
-                dy = math.cos(a) * radius
-                if (i % 2) == 0:
-                    bgl.glColor4f(0.0, 1.0, 0.0, 1.0)
-                else:
-                    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-                bgl.glVertex2i(x + int(dx), y + int(dy))
-            bgl.glEnd()
-            
-            # Restore previous OpenGL settings
-            gl_enable(bgl.GL_SMOOTH, smooth_prev)
-
-class BookmarkLibraryIDBlock(PseudoIDBlockBase):
-    # Somewhy instance members aren't seen in update()
-    # callbacks... but class members are.
-    _self_update = [0]
-    _dont_rename = [False]
-    
-    data_name = "Bookmark Library"
-    op_new = "scene.cursor_3d_new_bookmark_library"
-    op_delete = "scene.cursor_3d_delete_bookmark_library"
-    icon = 'BOOKMARKS'
-    
-    collection, active, enum = PseudoIDBlockBase.create_props(
-        BookmarkLibraryProp, "Bookmark Library")
-    
-    def on_item_select(self):
-        library = self.get_item()
-        library.bookmarks.update_enum()
-
-class NewCursor3DBookmarkLibrary(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_new_bookmark_library"
-    bl_label = "New Library"
-    bl_description = "Add a new bookmark library"
-    
-    name = bpy.props.StringProperty(
-        name="Name",
-        description="Name of the new library",
-        default="Lib")
-    
-    def execute(self, context):
-        settings = find_settings()
-        
-        settings.libraries.add(name=self.name)
-        
-        return {'FINISHED'}
-
-class DeleteCursor3DBookmarkLibrary(bpy.types.Operator):
-    bl_idname = "scene.cursor_3d_delete_bookmark_library"
-    bl_label = "Delete Library"
-    bl_description = "Delete active bookmark library"
-    
-    def execute(self, context):
-        settings = find_settings()
-        
-        name = settings.libraries.active
-        
-        settings.libraries.remove(key=name)
-        
-        return {'FINISHED'}
-
-# ===== MAIN PROPERTIES ===== #
-# TODO: ~a bug? Somewhy tooltip shows "Cursor3DToolsSettings.foo"
-# instead of "bpy.types.Screen.cursor_3d_tools_settings.foo"
-class Cursor3DToolsSettings(bpy.types.PropertyGroup):
-    transform_options = bpy.props.PointerProperty(
-        type=TransformExtraOptionsProp,
-        options={'HIDDEN'})
-    
-    cursor_visible = bpy.props.BoolProperty(
-        name="Cursor visibility",
-        description="Cursor visibility (causing bugs, commented out)",
-        default=True)
-    
-    draw_guides = bpy.props.BoolProperty(
-        name="Guides",
-        description="Display guides",
-        default=True)
-    
-    draw_snap_elements = bpy.props.BoolProperty(
-        name="Snap elements",
-        description="Display snap elements",
-        default=True)
-    
-    draw_N = bpy.props.BoolProperty(
-        name="Surface normal",
-        description="Display surface normal",
-        default=True)
-    
-    draw_T1 = bpy.props.BoolProperty(
-        name="Surface 1st tangential",
-        description="Display 1st surface tangential",
-        default=True)
-    
-    draw_T2 = bpy.props.BoolProperty(
-        name="Surface 2nd tangential",
-        description="Display 2nd surface tangential",
-        default=True)
-    
-    stick_to_obj = bpy.props.BoolProperty(
-        name="Stick to objects",
-        description="Move cursor along with object it was snapped to",
-        default=True)
-    
-    # HISTORY-RELATED
-    history = bpy.props.PointerProperty(
-        type=CursorHistoryProp,
-        options={'HIDDEN'})
-    
-    # BOOKMARK-RELATED
-    libraries = bpy.props.PointerProperty(
-        type=BookmarkLibraryIDBlock,
-        options={'HIDDEN'})
-    
-    show_bookmarks = bpy.props.BoolProperty(
-        name="Show bookmarks",
-        description="Show active bookmark in 3D view",
-        default=True,
-        options={'HIDDEN'})
-    
-    free_coord_precision = bpy.props.IntProperty(
-        name="Coord precision",
-        description="Numer of digits afer comma "\
-                    "for displayed coordinate values",
-        default=4,
-        min=0,
-        max=10,
-        options={'HIDDEN'})
-
-class Cursor3DToolsSceneSettings(bpy.types.PropertyGroup):
-    stick_obj_name = bpy.props.StringProperty(
-        name="Stick-to-object name",
-        description="Name of the object to stick cursor to",
-        options={'HIDDEN'})
-    stick_obj_pos = bpy.props.FloatVectorProperty(
-        default=(0.0, 0.0, 0.0),
-        options={'HIDDEN'},
-        subtype='XYZ')
-
-# ===== CURSOR RUNTIME PROPERTIES ===== #
-class CursorRuntimeSettings(bpy.types.PropertyGroup):
-    current_monitor_id = bpy.props.IntProperty(
-        default=0,
-        options={'HIDDEN'})
-    
-    surface_pos = bpy.props.FloatVectorProperty(
-        default=(0.0, 0.0, 0.0),
-        options={'HIDDEN'},
-        subtype='XYZ')
-
-class CursorDynamicSettings:
-    local_matrix = Matrix()
-    
-    active_transform_operator = None
-    
-    csu = None
-    
-    active_scene_hash = 0
-    
-    @classmethod
-    def recalc_csu(cls, context, event_value=None):
-        scene_hash_changed = (cls.active_scene_hash != hash(context.scene))
-        cls.active_scene_hash = hash(context.scene)
-        
-        # Don't recalc if mouse is over some UI panel!
-        # (otherwise, this may lead to applying operator
-        # (e.g. Subdivide) in Edit Mode, even if user
-        # just wants to change some operator setting)
-        clicked = (event_value in {'PRESS', 'RELEASE'}) and \
-            (context.region.type == 'WINDOW')
-        
-        if clicked or scene_hash_changed:
-            particles, cls.csu = gather_particles()
-
-#============================================================================#
-# ===== PANELS AND DIALOGS ===== #
-class TransformExtraOptions(bpy.types.Panel):
-    bl_label = "Transform Extra Options"
-    bl_idname = "OBJECT_PT_transform_extra_options"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "UI"
-    #bl_context = "object"
-    bl_options = {'DEFAULT_CLOSED'}
-    
-    def draw(self, context):
-        layout = self.layout
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        layout.prop(tfm_opts, "use_relative_coords")
-        layout.prop(tfm_opts, "snap_only_to_solid")
-        layout.prop(tfm_opts, "snap_interpolate_normals_mode", text="")
-        layout.prop(tfm_opts, "use_comma_separator")
-        #layout.prop(tfm_opts, "snap_element_screen_size")
-
-class Cursor3DTools(bpy.types.Panel):
-    bl_label = "3D Cursor Tools"
-    bl_idname = "OBJECT_PT_cursor_3d_tools"
-    bl_space_type = "VIEW_3D"
-    bl_region_type = "UI"
-    bl_options = {'DEFAULT_CLOSED'}
-    
-    def draw(self, context):
-        layout = self.layout
-        
-        # Attempt to launch the monitor
-        if bpy.ops.view3d.cursor3d_monitor.poll():
-            bpy.ops.view3d.cursor3d_monitor()
-        
-        # If addon is enabled by default, the new scene
-        # created on Blender startup will have disabled
-        # standard Cursor3D behavior. However, if user
-        # creates new scene, somehow Cursor3D is active
-        # as if nothing happened xD
-        update_keymap(True)
-        #=============================================#
-        
-        settings = find_settings()
-        
-        row = layout.split(0.5)
-        #row = layout.row()
-        row.operator("view3d.set_cursor3d_dialog",
-            "Set", 'CURSOR')
-        row = row.split(1 / 3, align=True)
-        #row = row.row(align=True)
-        row.prop(settings, "draw_guides",
-            text="", icon='MANIPUL', toggle=True)
-        row.prop(settings, "draw_snap_elements",
-            text="", icon='EDITMODE_HLT', toggle=True)
-        row.prop(settings, "stick_to_obj",
-            text="", icon='SNAP_ON', toggle=True)
-        
-        row = layout.row()
-        #row.label(text="Draw")
-        #row.prop(settings, "cursor_visible", text="", toggle=True,
-        #         icon=('RESTRICT_VIEW_OFF' if settings.cursor_visible
-        #               else 'RESTRICT_VIEW_ON'))
-        subrow = row.row()
-        subrow.enabled = False
-        subrow.alert = True
-        subrow.prop(settings, "cursor_visible", text="", toggle=True,
-                 icon='RESTRICT_VIEW_OFF')
-        row = row.split(1 / 3, align=True)
-        row.prop(settings, "draw_N",
-            text="N", toggle=True, index=0)
-        row.prop(settings, "draw_T1",
-            text="T1", toggle=True, index=1)
-        row.prop(settings, "draw_T2",
-            text="T2", toggle=True, index=2)
-        
-        # === HISTORY === #
-        history = settings.history
-        row = layout.row(align=True)
-        row.prop(history, "show_trace", text="", icon='SORTTIME')
-        row = row.split(0.35, True)
-        row.prop(history, "max_size", text="")
-        row.prop(history, "current_id", text="")
-        
-        # === BOOKMARK LIBRARIES === #
-        settings.libraries.draw(context, layout)
-        
-        library = settings.libraries.get_item()
-        
-        if library is None:
-            return
-        
-        row = layout.row()
-        row.prop(settings, "show_bookmarks",
-            text="", icon='RESTRICT_VIEW_OFF')
-        row = row.row(align=True)
-        row.prop(library, "system", text="")
-        row.prop(library, "offset", text="",
-            icon='ARROW_LEFTRIGHT')
-        
-        # === BOOKMARKS === #
-        library.bookmarks.draw(context, layout)
-        
-        if len(library.bookmarks.collection) == 0:
-            return
-        
-        row = layout.row()
-        row = row.split(align=True)
-        # PASTEDOWN
-        # COPYDOWN
-        row.operator("scene.cursor_3d_overwrite_bookmark",
-            text="", icon='REC')
-        row.operator("scene.cursor_3d_swap_bookmark",
-            text="", icon='FILE_REFRESH')
-        row.operator("scene.cursor_3d_recall_bookmark",
-            text="", icon='FILE_TICK')
-        row.operator("scene.cursor_3d_add_empty_at_bookmark",
-            text="", icon='EMPTY_DATA')
-        # Not implemented (and maybe shouldn't)
-        #row.operator("scene.cursor_3d_snap_selection_to_bookmark",
-        #    text="", icon='SNAP_ON')
-
-class SetCursorDialog(bpy.types.Operator):
-    bl_idname = "view3d.set_cursor3d_dialog"
-    bl_label = "Set 3D Cursor"
-    bl_description = "Set 3D Cursor XYZ values"
-    
-    pos = bpy.props.FloatVectorProperty(
-        name="Location",
-        description="3D Cursor location in current coordinate system",
-        subtype='XYZ',
-        )
-    
-    @classmethod
-    def poll(cls, context):
-        return context.area.type == 'VIEW_3D'
-    
-    def execute(self, context):
-        scene = context.scene
-        
-        # "current system" / "relative" could have changed
-        self.matrix = self.csu.get_matrix()
-        
-        pos = self.matrix * self.pos
-        set_cursor_location(pos, v3d=context.space_data)
-        
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-        scene = context.scene
-        
-        cursor_pos = get_cursor_location(v3d=context.space_data)
-        
-        particles, self.csu = gather_particles(context=context)
-        self.csu.source_pos = cursor_pos
-        
-        self.matrix = self.csu.get_matrix()
-        
-        try:
-            self.pos = self.matrix.inverted() * cursor_pos
-        except:
-            # this is some degenerate system
-            self.pos = Vector()
-        
-        wm = context.window_manager
-        return wm.invoke_props_dialog(self, width=160)
-    
-    def draw(self, context):
-        layout = self.layout
-        
-        settings = find_settings()
-        tfm_opts = settings.transform_options
-        
-        v3d = context.space_data
-        
-        col = layout.column()
-        col.prop(self, "pos", text="")
-        
-        row = layout.row()
-        row.prop(tfm_opts, "use_relative_coords", text="Relative")
-        row.prop(v3d, "transform_orientation", text="")
-
-class AlignOrientationProperties(bpy.types.PropertyGroup):
-    axes_items = [
-        ('X', 'X', 'X axis'),
-        ('Y', 'Y', 'Y axis'),
-        ('Z', 'Z', 'Z axis'),
-        ('-X', '-X', '-X axis'),
-        ('-Y', '-Y', '-Y axis'),
-        ('-Z', '-Z', '-Z axis'),
-    ]
-    
-    axes_items_ = [
-        ('X', 'X', 'X axis'),
-        ('Y', 'Y', 'Y axis'),
-        ('Z', 'Z', 'Z axis'),
-        (' ', ' ', 'Same as source axis'),
-    ]
-    
-    def get_orients(self, context):
-        orients = []
-        orients.append(('GLOBAL', "Global", ""))
-        orients.append(('LOCAL', "Local", ""))
-        orients.append(('GIMBAL', "Gimbal", ""))
-        orients.append(('NORMAL', "Normal", ""))
-        orients.append(('VIEW', "View", ""))
-        
-        for orientation in context.scene.orientations:
-            name = orientation.name
-            orients.append((name, name, ""))
-        
-        return orients
-    
-    src_axis = bpy.props.EnumProperty(default='Z', items=axes_items,
-                                      name="Initial axis")
-    #src_orient = bpy.props.EnumProperty(default='GLOBAL', items=get_orients)
-    
-    dest_axis = bpy.props.EnumProperty(default=' ', items=axes_items_,
-                                       name="Final axis")
-    dest_orient = bpy.props.EnumProperty(items=get_orients,
-                                         name="Final orientation")
-
-class AlignOrientation(bpy.types.Operator):
-    bl_idname = "view3d.align_orientation"
-    bl_label = "Align Orientation"
-    bl_description = "Rotates active object to match axis of current "\
-        "orientation to axis of another orientation"
-    bl_options = {'REGISTER', 'UNDO'}
-    
-    axes_items = [
-        ('X', 'X', 'X axis'),
-        ('Y', 'Y', 'Y axis'),
-        ('Z', 'Z', 'Z axis'),
-        ('-X', '-X', '-X axis'),
-        ('-Y', '-Y', '-Y axis'),
-        ('-Z', '-Z', '-Z axis'),
-    ]
-    
-    axes_items_ = [
-        ('X', 'X', 'X axis'),
-        ('Y', 'Y', 'Y axis'),
-        ('Z', 'Z', 'Z axis'),
-        (' ', ' ', 'Same as source axis'),
-    ]
-    
-    axes_ids = {'X':0, 'Y':1, 'Z':2}
-    
-    def get_orients(self, context):
-        orients = []
-        orients.append(('GLOBAL', "Global", ""))
-        orients.append(('LOCAL', "Local", ""))
-        orients.append(('GIMBAL', "Gimbal", ""))
-        orients.append(('NORMAL', "Normal", ""))
-        orients.append(('VIEW', "View", ""))
-        
-        for orientation in context.scene.orientations:
-            name = orientation.name
-            orients.append((name, name, ""))
-        
-        return orients
-    
-    src_axis = bpy.props.EnumProperty(default='Z', items=axes_items,
-                                      name="Initial axis")
-    #src_orient = bpy.props.EnumProperty(default='GLOBAL', items=get_orients)
-    
-    dest_axis = bpy.props.EnumProperty(default=' ', items=axes_items_,
-                                       name="Final axis")
-    dest_orient = bpy.props.EnumProperty(items=get_orients,
-                                         name="Final orientation")
-    
-    @classmethod
-    def poll(cls, context):
-        return (context.area.type == 'VIEW_3D') and context.object
-    
-    def execute(self, context):
-        wm = context.window_manager
-        obj = context.object
-        scene = context.scene
-        v3d = context.space_data
-        rv3d = context.region_data
-        
-        particles, csu = gather_particles(context=context)
-        tou = csu.tou
-        #tou = TransformOrientationUtility(scene, v3d, rv3d)
-        
-        aop = wm.align_orientation_properties # self
-        
-        src_matrix = tou.get_matrix()
-        src_axes = MatrixDecompose(src_matrix)
-        src_axis_name = aop.src_axis
-        if src_axis_name.startswith("-"):
-            src_axis_name = src_axis_name[1:]
-            src_axis = -src_axes[self.axes_ids[src_axis_name]]
-        else:
-            src_axis = src_axes[self.axes_ids[src_axis_name]]
-        
-        tou.set(aop.dest_orient, False)
-        dest_matrix = tou.get_matrix()
-        dest_axes = MatrixDecompose(dest_matrix)
-        if self.dest_axis != ' ':
-            dest_axis_name = aop.dest_axis
-        else:
-            dest_axis_name = src_axis_name
-        dest_axis = dest_axes[self.axes_ids[dest_axis_name]]
-        
-        q = src_axis.rotation_difference(dest_axis)
-        
-        m = obj.matrix_world.to_3x3()
-        m.rotate(q)
-        m.resize_4x4()
-        m.translation = obj.matrix_world.translation.copy()
-        
-        obj.matrix_world = m
-        
-        #bpy.ops.ed.undo_push(message="Align Orientation")
-        
-        return {'FINISHED'}
-    
-    # ATTENTION!
-    # This _must_ be a dialog, because with 'UNDO' option
-    # the last selected orientation may revert to the previous state
-    def invoke(self, context, event):
-        wm = context.window_manager
-        return wm.invoke_props_dialog(self, width=200)
-    
-    def draw(self, context):
-        layout = self.layout
-        wm = context.window_manager
-        aop = wm.align_orientation_properties # self
-        layout.prop(aop, "src_axis")
-        layout.prop(aop, "dest_axis")
-        layout.prop(aop, "dest_orient")
-
-class CopyOrientation(bpy.types.Operator):
-    bl_idname = "view3d.copy_orientation"
-    bl_label = "Copy Orientation"
-    bl_description = "Makes a copy of current orientation"
-    
-    def execute(self, context):
-        scene = context.scene
-        v3d = context.space_data
-        rv3d = context.region_data
-        
-        particles, csu = gather_particles(context=context)
-        tou = csu.tou
-        #tou = TransformOrientationUtility(scene, v3d, rv3d)
-        
-        orient = create_transform_orientation(scene,
-            name=tou.get()+".copy", matrix=tou.get_matrix())
-        
-        tou.set(orient.name)
-        
-        return {'FINISHED'}
-
-def transform_orientations_panel_extension(self, context):
-    row = self.layout.row()
-    row.operator("view3d.align_orientation", text="Align")
-    row.operator("view3d.copy_orientation", text="Copy")
-
-# ===== CURSOR MONITOR ===== #
-class CursorMonitor(bpy.types.Operator):
-    """Monitor changes in cursor location and write to history"""
-    bl_idname = "view3d.cursor3d_monitor"
-    bl_label = "Cursor Monitor"
-    
-    # A class-level variable (it must be accessed from poll())
-    is_running = False
-    
-    storage = {}
-    
-    @classmethod
-    def poll(cls, context):
-        try:
-            runtime_settings = find_runtime_settings()
-            if not runtime_settings:
-                return False
-            
-            # When addon is enabled by default and
-            # user started another new scene, is_running
-            # would still be True
-            return (not CursorMonitor.is_running) or \
-                (runtime_settings.current_monitor_id == 0)
-        except Exception as e:
-            print("Cursor monitor exeption in poll:\n" + str(e))
-            return False
-    
-    def modal(self, context, event):
-        try:
-            return self._modal(context, event)
-        except Exception as e:
-            print("Cursor monitor exeption in modal:\n" + str(e))
-            # Remove callbacks at any cost
-            self.cancel(context)
-            #raise
-            return {'CANCELLED'}
-    
-    def _modal(self, context, event):
-        runtime_settings = find_runtime_settings()
-        
-        # ATTENTION: will this work correctly when another
-        # blend is loaded? (it should, since all scripts
-        # seem to be reloaded in such case)
-        if (runtime_settings is None) or \
-                (self.id != runtime_settings.current_monitor_id):
-            # Another (newer) monitor was launched;
-            # this one should stop.
-            # (OR addon was disabled)
-            return self.cancel(context)
-        
-        # Somewhy after addon re-registration
-        # this permanently becomes False
-        CursorMonitor.is_running = True
-        
-        if self.update_storage(runtime_settings):
-            # hmm... can this cause flickering of menus?
-            context.area.tag_redraw()
-        
-        settings = find_settings()
-        
-        # ================== #
-        # Update bookmark enums when addon is initialized.
-        # Since CursorMonitor operator can be called from draw(),
-        # we have to postpone all re-registration-related tasks
-        # (such as redefining the enums).
-        if self.just_initialized:
-            # update the relevant enums, bounds and other options
-            # (is_running becomes False once another scene is loaded,
-            # so this operator gets restarted)
-            settings.history.update_max_size()
-            settings.libraries.update_enum()
-            library = settings.libraries.get_item()
-            if library:
-                library.bookmarks.update_enum()
-            
-            self.just_initialized = False
-        # ================== #
-        
-        # Seems like recalc_csu() in this place causes trouble
-        # if space type is switched from 3D to e.g. UV
-        '''
-        tfm_operator = CursorDynamicSettings.active_transform_operator
-        if tfm_operator:
-            CursorDynamicSettings.csu = tfm_operator.csu
-        else:
-            CursorDynamicSettings.recalc_csu(context, event.value)
-        '''
-        
-        return {'PASS_THROUGH'}
-    
-    def update_storage(self, runtime_settings):
-        if CursorDynamicSettings.active_transform_operator:
-            # Don't add to history while operator is running
-            return False
-        
-        new_pos = None
-        
-        last_locations = {}
-        
-        for scene in bpy.data.scenes:
-            # History doesn't depend on view (?)
-            curr_pos = get_cursor_location(scene=scene)
-            
-            last_locations[scene.name] = curr_pos
-            
-            # Ignore newly-created or some renamed scenes
-            if scene.name in self.last_locations:
-                if curr_pos != self.last_locations[scene.name]:
-                    new_pos = curr_pos
-            elif runtime_settings.current_monitor_id == 0:
-                # startup location should be added
-                new_pos = curr_pos
-        
-        # Seems like scene.cursor_location is fast enough here
-        # -> no need to resort to v3d.cursor_location.
-        """
-        screen = bpy.context.screen
-        scene = screen.scene
-        v3d = None
-        for area in screen.areas:
-            for space in area.spaces:
-                if space.type == 'VIEW_3D':
-                    v3d = space
-                    break
-        
-        if v3d is not None:
-            curr_pos = get_cursor_location(v3d=v3d)
-            
-            last_locations[scene.name] = curr_pos
-            
-            # Ignore newly-created or some renamed scenes
-            if scene.name in self.last_locations:
-                if curr_pos != self.last_locations[scene.name]:
-                    new_pos = curr_pos
-        """
-        
-        self.last_locations = last_locations
-        
-        if new_pos is not None:
-            settings = find_settings()
-            history = settings.history
-            
-            pos = history.get_pos()
-            if (pos is not None):# and (history.current_id != 0): # ?
-                if pos == new_pos:
-                    return False # self.just_initialized ?
-            
-            entry = history.entries.add()
-            entry.pos = new_pos
-            
-            last_id = len(history.entries) - 1
-            history.entries.move(last_id, 0)
-            
-            if last_id > int(history.max_size):
-                history.entries.remove(last_id)
-            
-            # make sure the most recent history entry is displayed
-            
-            CursorHistoryProp.update_cursor_on_id_change = False
-            history.current_id = 0
-            CursorHistoryProp.update_cursor_on_id_change = True
-            
-            history.curr_id = history.current_id
-            history.last_id = 1
-            
-            return True
-        
-        return False # self.just_initialized ?
-    
-    def execute(self, context):
-        print("Cursor monitor: launched")
-        
-        runtime_settings = find_runtime_settings()
-        
-        self.just_initialized = True
-        
-        self.id = 0
-        
-        self.last_locations = {}
-        
-        # Important! Call update_storage() before assigning
-        # current_monitor_id (used to add startup cursor location)
-        self.update_storage(runtime_settings)
-        
-        # Indicate that this is the most recent monitor.
-        # All others should shut down.
-        self.id = runtime_settings.current_monitor_id + 1
-        runtime_settings.current_monitor_id = self.id
-        
-        CursorMonitor.is_running = True
-        
-        CursorDynamicSettings.recalc_csu(context, 'PRESS')
-
-        # I suppose that cursor position would change
-        # only with user interaction.
-        #self._timer = context.window_manager. \
-        #    event_timer_add(0.1, context.window)
-        
-        #'''
-        #self._draw_callback_view = context.region.callback_add( \
-        #    draw_callback_view, (self, context), 'POST_VIEW')
-        self._draw_callback_view = find_region(context.area).\
-            callback_add(draw_callback_view, \
-            (self, context), 'POST_VIEW')
-        self._draw_callback_px = find_region(context.area).\
-            callback_add(draw_callback_px, \
-            (self, context), 'POST_PIXEL')
-        
-        self._draw_header_px = find_region(context.area, 'HEADER').\
-            callback_add(draw_callback_header_px, \
-            (self, context), 'POST_PIXEL')
-        #'''
-        
-        # Here we cannot return 'PASS_THROUGH',
-        # or Blender will crash!
-
-        # Currently there seems to be only one window
-        context.window_manager.modal_handler_add(self)
-        return {'RUNNING_MODAL'}
-    
-    def cancel(self, context):
-        CursorMonitor.is_running = False
-        #type(self).is_running = False
-        
-        # Unregister callbacks...
-        #'''
-        #context.region.callback_remove(self._draw_callback_view)
-        find_region(context.area).callback_remove(self._draw_callback_view)
-        find_region(context.area).callback_remove(self._draw_callback_px)
-        
-        find_region(context.area, 'HEADER').\
-            callback_remove(self._draw_header_px)
-        #'''
-        
-        return {'CANCELLED'}
-
-
-# ===== MATH / GEOMETRY UTILITIES ===== #
-def to_matrix4x4(orient, pos):
-    if not isinstance(orient, Matrix):
-        orient = orient.to_matrix()
-    m = orient.to_4x4()
-    m.translation = pos.to_3d()
-    return m
-
-def MatrixCompose(*args):
-    size = len(args)
-    m = Matrix.Identity(size)
-    axes = m.col # m.row
-    
-    if size == 2:
-        for i in (0, 1):
-            c = args[i]
-            if isinstance(c, Vector):
-                axes[i] = c.to_2d()
-            elif hasattr(c, "__iter__"):
-                axes[i] = Vector(c).to_2d()
-            else:
-                axes[i][i] = c
-    else:
-        for i in (0, 1, 2):
-            c = args[i]
-            if isinstance(c, Vector):
-                axes[i][:3] = c.to_3d()
-            elif hasattr(c, "__iter__"):
-                axes[i][:3] = Vector(c).to_3d()
-            else:
-                axes[i][i] = c
-        
-        if size == 4:
-            c = args[3]
-            if isinstance(c, Vector):
-                m.translation = c.to_3d()
-            elif hasattr(c, "__iter__"):
-                m.translation = Vector(c).to_3d()
-    
-    return m
-
-def MatrixDecompose(m, res_size=None):
-    size = len(m)
-    axes = m.col # m.row
-    if res_size is None:
-        res_size = size
-    
-    if res_size == 2:
-        return (axes[0].to_2d(), axes[1].to_2d())
-    else:
-        x = axes[0].to_3d()
-        y = axes[1].to_3d()
-        z = (axes[2].to_3d() if size > 2 else Vector())
-        if res_size == 3:
-            return (x, y, z)
-        
-        t = (m.translation.to_3d() if size == 4 else Vector())
-        if res_size == 4:
-            return (x, y, z, t)
-
-def angle_axis_to_quat(angle, axis):
-    w = math.cos(angle / 2.0)
-    xyz = axis.normalized() * math.sin(angle / 2.0)
-    return Quaternion((w, xyz.x, xyz.y, xyz.z))
-
-def round_step(x, s=1.0):
-    #return math.floor(x * s + 0.5) / s
-    return math.floor(x / s + 0.5) * s
-
-twoPi = 2.0 * math.pi
-def clamp_angle(ang):
-    # Attention! In Python the behaviour is:
-    # -359.0 % 180.0 == 1.0
-    # -359.0 % -180.0 == -179.0
-    ang = (ang % twoPi)
-    return ((ang - twoPi) if (ang > math.pi) else ang)
-
-def prepare_grid_mesh(bm, nx=1, ny=1, sx=1.0, sy=1.0,
-                      z=0.0, xyz_indices=(0,1,2)):
-    vertices = []
-    for i in range(nx + 1):
-        x = 2 * (i / nx) - 1
-        x *= sx
-        for j in range(ny + 1):
-            y = 2 * (j / ny) - 1
-            y *= sy
-            pos = (x, y, z)
-            vert = bm.verts.new((pos[xyz_indices[0]],
-                                 pos[xyz_indices[1]],
-                                 pos[xyz_indices[2]]))
-            vertices.append(vert)
-    
-    nxmax = nx + 1
-    for i in range(nx):
-        i1 = i + 1
-        for j in range(ny):
-            j1 = j + 1
-            verts = [vertices[j + i * nxmax],
-                     vertices[j1 + i * nxmax],
-                     vertices[j1 + i1 * nxmax],
-                     vertices[j + i1 * nxmax]]
-            bm.faces.new(verts)
-    #return
-
-def prepare_gridbox_mesh(subdiv=1):
-    bm = bmesh.new()
-    
-    sides = [
-        (-1, (0,1,2)), # -Z
-        (1, (1,0,2)), # +Z
-        (-1, (1,2,0)), # -Y
-        (1, (0,2,1)), # +Y
-        (-1, (2,0,1)), # -X
-        (1, (2,1,0)), # +X
-        ]
-    
-    for side in sides:
-        prepare_grid_mesh(bm, nx=subdiv, ny=subdiv,
-            z=side[0], xyz_indices=side[1])
-    
-    return bm
-
-# ===== DRAWING UTILITIES ===== #
-class GfxCell:
-    def __init__(self, w, h, color=None, alpha=None, draw=None):
-        self.w = w
-        self.h = h
-        
-        self.color = (0, 0, 0, 1)
-        self.set_color(color, alpha)
-        
-        if draw:
-            self.draw = draw
-    
-    def set_color(self, color=None, alpha=None):
-        if color is None:
-            color = self.color
-        if alpha is None:
-            alpha = (color[3] if len(color) > 3 else self.color[3])
-        self.color = Vector((color[0], color[1], color[2], alpha))
-    
-    def prepare_draw(self, x, y, align=(0, 0)):
-        if self.color[3] <= 0.0:
-            return None
-        
-        if (align[0] != 0) or (align[1] != 0):
-            x -= self.w * align[0]
-            y -= self.h * align[1]
-        
-        x = int(math.floor(x + 0.5))
-        y = int(math.floor(y + 0.5))
-        
-        bgl.glColor4f(*self.color)
-        
-        return x, y
-    
-    def draw(self, x, y, align=(0, 0)):
-        xy = self.prepare_draw(x, y, align)
-        if not xy:
-            return
-        
-        draw_rect(xy[0], xy[1], w, h)
-
-class TextCell(GfxCell):
-    font_id = 0
-    
-    def __init__(self, text="", color=None, alpha=None, font_id=None):
-        if font_id is None:
-            font_id = TextCell.font_id
-        self.font_id = font_id
-        
-        self.set_text(text)
-        
-        self.color = (0, 0, 0, 1)
-        self.set_color(color, alpha)
-    
-    def set_text(self, text):
-        self.text = str(text)
-        dims = blf.dimensions(self.font_id, self.text)
-        self.w = dims[0]
-        dims = blf.dimensions(self.font_id, "dp") # fontheight
-        self.h = dims[1]
-    
-    def draw(self, x, y, align=(0, 0)):
-        xy = self.prepare_draw(x, y, align)
-        if not xy:
-            return
-        
-        blf.position(self.font_id, xy[0], xy[1], 0)
-        blf.draw(self.font_id, self.text)
-
-def find_region(area, region_type='WINDOW'):
-    # 'WINDOW', 'HEADER', 'CHANNELS', 'TEMPORARY',
-    # 'UI', 'TOOLS', 'TOOL_PROPS', 'PREVIEW'
-    for region in area.regions:
-        if region.type == region_type:
-            return region
-
-def draw_text(x, y, value, font_id=0, align=(0, 0), font_height=None):
-    value = str(value)
-    
-    if (align[0] != 0) or (align[1] != 0):
-        dims = blf.dimensions(font_id, value)
-        if font_height is not None:
-            dims = (dims[0], font_height)
-        x -= dims[0] * align[0]
-        y -= dims[1] * align[1]
-    
-    x = int(math.floor(x + 0.5))
-    y = int(math.floor(y + 0.5))
-    
-    blf.position(font_id, x, y, 0)
-    blf.draw(font_id, value)
-
-def draw_rect(x, y, w, h, margin=0, outline=False):
-    if w < 0:
-        x += w
-        w = abs(w)
-    
-    if h < 0:
-        y += h
-        h = abs(h)
-    
-    x = int(x)
-    y = int(y)
-    w = int(w)
-    h = int(h)
-    margin = int(margin)
-    
-    if outline:
-        bgl.glBegin(bgl.GL_LINE_LOOP)
-    else:
-        bgl.glBegin(bgl.GL_TRIANGLE_FAN)
-    bgl.glVertex2i(x - margin, y - margin)
-    bgl.glVertex2i(x + w + margin, y - margin)
-    bgl.glVertex2i(x + w + margin, y + h + margin)
-    bgl.glVertex2i(x - margin, y + h + margin)
-    bgl.glEnd()
-
-def append_round_rect(verts, x, y, w, h, rw, rh=None):
-    if rh is None:
-        rh = rw
-    
-    if w < 0:
-        x += w
-        w = abs(w)
-    
-    if h < 0:
-        y += h
-        h = abs(h)
-    
-    if rw < 0:
-        rw = min(abs(rw), w * 0.5)
-        x += rw
-        w -= rw * 2
-    
-    if rh < 0:
-        rh = min(abs(rh), h * 0.5)
-        y += rh
-        h -= rh * 2
-    
-    n = int(max(rw, rh) * math.pi / 2.0)
-    
-    a0 = 0.0
-    a1 = math.pi / 2.0
-    append_oval_segment(verts, x + w, y + h, rw, rh, a0, a1, n)
-    
-    a0 = math.pi / 2.0
-    a1 = math.pi
-    append_oval_segment(verts, x + w, y, rw, rh, a0, a1, n)
-    
-    a0 = math.pi
-    a1 = 3.0 * math.pi / 2.0
-    append_oval_segment(verts, x, y, rw, rh, a0, a1, n)
-    
-    a0 = 3.0 * math.pi / 2.0
-    a1 = math.pi * 2.0
-    append_oval_segment(verts, x, y + h, rw, rh, a0, a1, n)
-
-def append_oval_segment(verts, x, y, rw, rh, a0, a1, n, skip_last=False):
-    nmax = n - 1
-    da = a1 - a0
-    for i in range(n - int(skip_last)):
-        a = a0 + da * (i / nmax)
-        dx = math.sin(a) * rw
-        dy = math.cos(a) * rh
-        verts.append((x + int(dx), y + int(dy)))
-
-def draw_line(p0, p1, c=None):
-    if c is not None:
-        bgl.glColor4f(c[0], c[1], c[2], \
-            (c[3] if len(c) > 3 else 1.0))
-    bgl.glBegin(bgl.GL_LINE_STRIP)
-    bgl.glVertex3f(p0[0], p0[1], p0[2])
-    bgl.glVertex3f(p1[0], p1[1], p1[2])
-    bgl.glEnd()
-
-def draw_line_2d(p0, p1, c=None):
-    if c is not None:
-        bgl.glColor4f(c[0], c[1], c[2], \
-            (c[3] if len(c) > 3 else 1.0))
-    bgl.glBegin(bgl.GL_LINE_STRIP)
-    bgl.glVertex2f(p0[0], p0[1])
-    bgl.glVertex2f(p1[0], p1[1])
-    bgl.glEnd()
-
-def draw_line_hidden_depth(p0, p1, c, a0=1.0, a1=0.5, s0=None, s1=None):
-    bgl.glEnable(bgl.GL_DEPTH_TEST)
-    bgl.glColor4f(c[0], c[1], c[2], a0)
-    if s0 is not None:
-        gl_enable(bgl.GL_LINE_STIPPLE, int(bool(s0)))
-    draw_line(p0, p1)
-    bgl.glDisable(bgl.GL_DEPTH_TEST)
-    if (a1 == a0) and (s1 == s0):
-        return
-    bgl.glColor4f(c[0], c[1], c[2], a1)
-    if s1 is not None:
-        gl_enable(bgl.GL_LINE_STIPPLE, int(bool(s1)))
-    draw_line(p0, p1)
-
-def draw_arrow(p0, x, y, z, n_scl=0.2, ort_scl=0.035):
-    p1 = p0 + z
-    
-    bgl.glBegin(bgl.GL_LINE_STRIP)
-    bgl.glVertex3f(p0[0], p0[1], p0[2])
-    bgl.glVertex3f(p1[0], p1[1], p1[2])
-    bgl.glEnd()
-    
-    p2 = p1 - z * n_scl
-    bgl.glBegin(bgl.GL_TRIANGLE_FAN)
-    bgl.glVertex3f(p1[0], p1[1], p1[2])
-    p3 = p2 + (x + y) * ort_scl
-    bgl.glVertex3f(p3[0], p3[1], p3[2])
-    p3 = p2 + (-x + y) * ort_scl
-    bgl.glVertex3f(p3[0], p3[1], p3[2])
-    p3 = p2 + (-x - y) * ort_scl
-    bgl.glVertex3f(p3[0], p3[1], p3[2])
-    p3 = p2 + (x - y) * ort_scl
-    bgl.glVertex3f(p3[0], p3[1], p3[2])
-    p3 = p2 + (x + y) * ort_scl
-    bgl.glVertex3f(p3[0], p3[1], p3[2])
-    bgl.glEnd()
-
-def draw_arrow_2d(p0, n, L, arrow_len, arrow_width):
-    p1 = p0 + n * L
-    t = Vector((-n[1], n[0]))
-    pA = p1 - n * arrow_len + t * arrow_width
-    pB = p1 - n * arrow_len - t * arrow_width
-    
-    bgl.glBegin(bgl.GL_LINES)
-    
-    bgl.glVertex2f(p0[0], p0[1])
-    bgl.glVertex2f(p1[0], p1[1])
-    
-    bgl.glVertex2f(p1[0], p1[1])
-    bgl.glVertex2f(pA[0], pA[1])
-    
-    bgl.glVertex2f(p1[0], p1[1])
-    bgl.glVertex2f(pB[0], pB[1])
-    
-    bgl.glEnd()
-
-# Store/restore OpenGL settings and working with
-# projection matrices -- inspired by space_view3d_panel_measure
-# of Buerbaum Martin (Pontiac).
-
-# OpenGl helper functions/data
-gl_state_info = {
-    bgl.GL_MATRIX_MODE:(bgl.GL_INT, 1),
-    bgl.GL_PROJECTION_MATRIX:(bgl.GL_DOUBLE, 16),
-    bgl.GL_LINE_WIDTH:(bgl.GL_FLOAT, 1),
-    bgl.GL_BLEND:(bgl.GL_BYTE, 1),
-    bgl.GL_LINE_STIPPLE:(bgl.GL_BYTE, 1),
-    bgl.GL_COLOR:(bgl.GL_FLOAT, 4),
-    bgl.GL_SMOOTH:(bgl.GL_BYTE, 1),
-    bgl.GL_DEPTH_TEST:(bgl.GL_BYTE, 1),
-    bgl.GL_DEPTH_WRITEMASK:(bgl.GL_BYTE, 1),
-}
-gl_type_getters = {
-    bgl.GL_INT:bgl.glGetIntegerv,
-    bgl.GL_DOUBLE:bgl.glGetFloatv, # ?
-    bgl.GL_FLOAT:bgl.glGetFloatv,
-    #bgl.GL_BYTE:bgl.glGetFloatv, # Why GetFloat for getting byte???
-    bgl.GL_BYTE:bgl.glGetBooleanv, # maybe like that?
-}
-
-def gl_get(state_id):
-    type, size = gl_state_info[state_id]
-    buf = bgl.Buffer(type, [size])
-    gl_type_getters[type](state_id, buf)
-    return (buf if (len(buf) != 1) else buf[0])
-
-def gl_enable(state_id, enable):
-    if enable:
-        bgl.glEnable(state_id)
-    else:
-        bgl.glDisable(state_id)
-
-def gl_matrix_to_buffer(m):
-    tempMat = [m[i][j] for i in range(4) for j in range(4)]
-    return bgl.Buffer(bgl.GL_FLOAT, 16, tempMat)
-
-
-# ===== DRAWING CALLBACKS ===== #
-cursor_save_location = Vector()
-
-def draw_callback_view(self, context):
-    global cursor_save_location
-    
-    settings = find_settings()
-    if settings is None:
-        return
-    
-    update_stick_to_obj(context)
-    
-    if "EDIT" not in context.mode:
-        # It's nice to have bookmark position update interactively
-        # However, this still can be slow if there are many
-        # selected objects
-        
-        # ATTENTION!!!
-        # This eats a lot of processor time!
-        #CursorDynamicSettings.recalc_csu(context, 'PRESS')
-        pass
-    
-    history = settings.history
-    
-    tfm_operator = CursorDynamicSettings.active_transform_operator
-    
-    is_drawing = history.show_trace or tfm_operator
-    
-    if is_drawing:
-        # Store previous OpenGL settings
-        MatrixMode_prev = gl_get(bgl.GL_MATRIX_MODE)
-        ProjMatrix_prev = gl_get(bgl.GL_PROJECTION_MATRIX)
-        lineWidth_prev = gl_get(bgl.GL_LINE_WIDTH)
-        blend_prev = gl_get(bgl.GL_BLEND)
-        line_stipple_prev = gl_get(bgl.GL_LINE_STIPPLE)
-        color_prev = gl_get(bgl.GL_COLOR)
-        smooth_prev = gl_get(bgl.GL_SMOOTH)
-        depth_test_prev = gl_get(bgl.GL_DEPTH_TEST)
-        depth_mask_prev = gl_get(bgl.GL_DEPTH_WRITEMASK)
-    
-    if history.show_trace:
-        bgl.glDepthRange(0.0, 0.9999)
-        
-        history.draw_trace(context)
-        
-        library = settings.libraries.get_item()
-        if library and library.offset:
-            history.draw_offset(context)
-        
-        bgl.glDepthRange(0.0, 1.0)
-    
-    if tfm_operator:
-        tfm_operator.draw_3d(context)
-    
-    if is_drawing:
-        # Restore previous OpenGL settings
-        bgl.glLineWidth(lineWidth_prev)
-        gl_enable(bgl.GL_BLEND, blend_prev)
-        gl_enable(bgl.GL_LINE_STIPPLE, line_stipple_prev)
-        gl_enable(bgl.GL_SMOOTH, smooth_prev)
-        gl_enable(bgl.GL_DEPTH_TEST, depth_test_prev)
-        bgl.glDepthMask(depth_mask_prev)
-        bgl.glColor4f(color_prev[0],
-            color_prev[1],
-            color_prev[2],
-            color_prev[3])
-    
-    cursor_save_location = Vector(bpy.context.space_data.cursor_location)
-    if not settings.cursor_visible:
-        # This is causing problems! See <http://projects.blender.org/
-        # tracker/index.php?func=detail&aid=33197&group_id=9&atid=498>
-        #bpy.context.space_data.cursor_location = Vector([float('nan')] * 3)
-        pass
-
-def draw_callback_header_px(self, context):
-    r = context.region
-    
-    tfm_operator = CursorDynamicSettings.active_transform_operator
-    if not tfm_operator:
-        return
-    
-    smooth_prev = gl_get(bgl.GL_SMOOTH)
-    
-    tfm_operator.draw_axes_coords(context, (r.width, r.height))
-    
-    gl_enable(bgl.GL_SMOOTH, smooth_prev)
-    
-    bgl.glDisable(bgl.GL_BLEND)
-    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-
-def draw_callback_px(self, context):
-    global cursor_save_location
-    settings = find_settings()
-    if settings is None:
-        return
-    library = settings.libraries.get_item()
-    
-    if not settings.cursor_visible:
-        bpy.context.space_data.cursor_location = cursor_save_location
-    
-    tfm_operator = CursorDynamicSettings.active_transform_operator
-    
-    if settings.show_bookmarks and library:
-        library.draw_bookmark(context)
-    
-    if tfm_operator:
-        tfm_operator.draw_2d(context)
-    
-    # restore opengl defaults
-    bgl.glLineWidth(1)
-    bgl.glDisable(bgl.GL_BLEND)
-    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)
-
-
-# ===== UTILITY FUNCTIONS ===== #
-
-def update_stick_to_obj(context):
-    settings = find_settings()
-    
-    if not settings.stick_to_obj:
-        return
-    
-    scene = context.scene
-    
-    settings_scene = scene.cursor_3d_tools_settings
-    
-    name = settings_scene.stick_obj_name
-    
-    try:
-        obj = scene.objects[name]
-        pos = settings_scene.stick_obj_pos
-        pos = obj.matrix_world * pos
-        context.space_data.cursor_location = pos
-    except Exception as e:
-        pass
-
-def get_cursor_location(v3d=None, scene=None):
-    if v3d:
-        pos = v3d.cursor_location
-    elif scene:
-        pos = scene.cursor_location
-    
-    return pos.copy()
-
-def set_cursor_location(pos, v3d=None, scene=None):
-    pos = pos.to_3d().copy()
-    
-    if v3d:
-        scene = bpy.context.scene
-        # Accessing scene.cursor_location is SLOW
-        # (well, at least assigning to it).
-        # Accessing v3d.cursor_location is fast.
-        v3d.cursor_location = pos
-    elif scene:
-        scene.cursor_location = pos
-    
-    set_stick_obj(scene, None)
-
-def set_stick_obj(scene, name=None, pos=None):
-    settings_scene = scene.cursor_3d_tools_settings
-    
-    if name:
-        settings_scene.stick_obj_name = name
-    else:
-        settings_scene.stick_obj_name = ""
-    
-    if pos is not None:
-        settings_scene.stick_obj_pos = Vector(pos).to_3d()
-
-# WHERE TO STORE SETTINGS:
-# Currently there are two types of ID blocks
-# which properties don't change on Undo/Redo.
-# - WindowManager seems to be unique (at least
-#   for majority of situations). However, the
-#   properties stored in it are not saved
-#   with the blend.
-# - Screen. Properties are saved with blend,
-#   but there is some probability that any of
-#   the pre-chosen screen names may not exist
-#   in the user's blend.
-
-def find_settings():
-    #wm = bpy.data.window_managers[0]
-    #settings = wm.cursor_3d_tools_settings
-    
-    screen = bpy.data.screens.get("Default", bpy.data.screens[0])
-    try:
-        settings = screen.cursor_3d_tools_settings
-    except:
-        # addon was unregistered
-        settings = None
-    
-    return settings
-
-def find_runtime_settings():
-    wm = bpy.data.window_managers[0]
-    try:
-        runtime_settings = wm.cursor_3d_runtime_settings
-    except:
-        # addon was unregistered
-        runtime_settings = None
-    
-    return runtime_settings
-
-# ===== REGISTRATION ===== #
-def find_keymap_items(km, idname):
-    items = []
-    for kmi in km.keymap_items:
-        if kmi.idname == idname:
-            items.append(kmi)
-    return items
-
-def update_keymap(activate):
-    #if activate:
-    #    if bpy.ops.view3d.cursor3d_monitor.poll():
-    #        bpy.ops.view3d.cursor3d_monitor()
-    
-    wm = bpy.context.window_manager
-    
-    try:
-        km = wm.keyconfigs.user.keymaps['3D View']
-    except:
-        # wm.keyconfigs.user is empty on Blender startup!
-        if activate:
-            # activate temporary operator
-            km = wm.keyconfigs.active.keymaps['Window']
-            kmi = km.keymap_items.new( \
-                'wm.enhanced_3d_cursor_registration', \
-                'MOUSEMOVE', 'ANY')
-        return
-    
-    # We need for the enhanced operator to take precedence over
-    # the default cursor3d, but not over the manipulator.
-    # If we add the operator to "addon" keymaps, it will
-    # take precedence over both. If we add it to "user"
-    # keymaps, the default will take precedence.
-    # However, we may just simply turn it off or remove
-    # (depending on what saves with blend).
-    
-    items = find_keymap_items(km, 'view3d.cursor3d_enhanced')
-    if activate and (len(items) == 0):
-        kmi = km.keymap_items.new('view3d.cursor3d_enhanced', \
-            'ACTIONMOUSE', 'PRESS')
-        for key in EnhancedSetCursor.key_map["free_mouse"]:
-            kmi = km.keymap_items.new('view3d.cursor3d_enhanced', \
-                key, 'PRESS')
-    else:
-        if activate:
-            for kmi in items:
-                kmi.active = activate
-        else:
-            for kmi in items:
-                km.keymap_items.remove(kmi)
-    
-    for kmi in find_keymap_items(km, 'view3d.cursor3d'):
-        kmi.active = not activate
-    
-    try:
-        km = wm.keyconfigs.active.keymaps['3D View']
-        for kmi in find_keymap_items(km, 'view3d.cursor3d'):
-            kmi.active = not activate
-    except KeyError:
-        # seems like in recent builds (after 2.63a)
-        # 'bpy_prop_collection[key]: key "3D View" not found'
-        pass
-    
-    try:
-        km = wm.keyconfigs.default.keymaps['3D View']
-        for kmi in find_keymap_items(km, 'view3d.cursor3d'):
-            kmi.active = not activate
-    except KeyError:
-        pass
-
-def register():
-    bpy.utils.register_class(AlignOrientationProperties)
-    bpy.utils.register_class(AlignOrientation)
-    bpy.utils.register_class(CopyOrientation)
-    bpy.types.WindowManager.align_orientation_properties = \
-        bpy.props.PointerProperty(type=AlignOrientationProperties)
-    bpy.types.VIEW3D_PT_transform_orientations.append(
-        transform_orientations_panel_extension)
-    
-    bpy.utils.register_class(SetCursorDialog)
-    
-    bpy.utils.register_class(NewCursor3DBookmarkLibrary)
-    bpy.utils.register_class(DeleteCursor3DBookmarkLibrary)
-    
-    bpy.utils.register_class(NewCursor3DBookmark)
-    bpy.utils.register_class(DeleteCursor3DBookmark)
-    bpy.utils.register_class(OverwriteCursor3DBookmark)
-    bpy.utils.register_class(RecallCursor3DBookmark)
-    bpy.utils.register_class(SwapCursor3DBookmark)
-    bpy.utils.register_class(SnapSelectionToCursor3DBookmark)
-    bpy.utils.register_class(AddEmptyAtCursor3DBookmark)
-    
-    bpy.utils.register_class(TransformExtraOptionsProp)
-    bpy.utils.register_class(TransformExtraOptions)
-    
-    # View properties panel is already long. Appending something
-    # to it would make it too inconvenient
-    #bpy.types.VIEW3D_PT_view3d_properties.append(draw_cursor_tools)
-    bpy.utils.register_class(Cursor3DTools)
-    
-    bpy.utils.register_class(LocationProp)
-    bpy.utils.register_class(CursorHistoryProp)
-    
-    bpy.utils.register_class(BookmarkProp)
-    bpy.utils.register_class(BookmarkIDBlock)
-    
-    bpy.utils.register_class(BookmarkLibraryProp)
-    bpy.utils.register_class(BookmarkLibraryIDBlock)
-    
-    bpy.utils.register_class(Cursor3DToolsSettings)
-    
-    bpy.utils.register_class(CursorRuntimeSettings)
-    bpy.utils.register_class(CursorMonitor)
-    
-    bpy.utils.register_class(Cursor3DToolsSceneSettings)
-    
-    bpy.types.Screen.cursor_3d_tools_settings = \
-        bpy.props.PointerProperty(type=Cursor3DToolsSettings)
-    
-    bpy.types.WindowManager.cursor_3d_runtime_settings = \
-        bpy.props.PointerProperty(type=CursorRuntimeSettings)
-    
-    bpy.types.Scene.cursor_3d_tools_settings = \
-        bpy.props.PointerProperty(type=Cursor3DToolsSceneSettings)
-    
-    bpy.utils.register_class(EnhancedSetCursor)
-    
-    bpy.utils.register_class(DelayRegistrationOperator)
-    
-    update_keymap(True)
-
-def unregister():
-    # Manually set this to False on unregister
-    CursorMonitor.is_running = False
-    
-    update_keymap(False)
-    
-    bpy.utils.unregister_class(DelayRegistrationOperator)
-    
-    bpy.utils.unregister_class(EnhancedSetCursor)
-    
-    if hasattr(bpy.types.Scene, "cursor_3d_tools_settings"):
-        del bpy.types.Scene.cursor_3d_tools_settings
-    
-    if hasattr(bpy.types.WindowManager, "cursor_3d_runtime_settings"):
-        del bpy.types.WindowManager.cursor_3d_runtime_settings
-    
-    if hasattr(bpy.types.Screen, "cursor_3d_tools_settings"):
-        del bpy.types.Screen.cursor_3d_tools_settings
-    
-    bpy.utils.unregister_class(Cursor3DToolsSceneSettings)
-    
-    bpy.utils.unregister_class(CursorMonitor)
-    bpy.utils.unregister_class(CursorRuntimeSettings)
-    
-    bpy.utils.unregister_class(Cursor3DToolsSettings)
-    
-    bpy.utils.unregister_class(BookmarkLibraryIDBlock)
-    bpy.utils.unregister_class(BookmarkLibraryProp)
-    
-    bpy.utils.unregister_class(BookmarkIDBlock)
-    bpy.utils.unregister_class(BookmarkProp)
-    
-    bpy.utils.unregister_class(CursorHistoryProp)
-    bpy.utils.unregister_class(LocationProp)
-    
-    bpy.utils.unregister_class(Cursor3DTools)
-    #bpy.types.VIEW3D_PT_view3d_properties.remove(draw_cursor_tools)
-    
-    bpy.utils.unregister_class(TransformExtraOptions)
-    bpy.utils.unregister_class(TransformExtraOptionsProp)
-    
-    bpy.utils.unregister_class(NewCursor3DBookmarkLibrary)
-    bpy.utils.unregister_class(DeleteCursor3DBookmarkLibrary)
-    
-    bpy.utils.unregister_class(NewCursor3DBookmark)
-    bpy.utils.unregister_class(DeleteCursor3DBookmark)
-    bpy.utils.unregister_class(OverwriteCursor3DBookmark)
-    bpy.utils.unregister_class(RecallCursor3DBookmark)
-    bpy.utils.unregister_class(SwapCursor3DBookmark)
-    bpy.utils.unregister_class(SnapSelectionToCursor3DBookmark)
-    bpy.utils.unregister_class(AddEmptyAtCursor3DBookmark)
-    
-    bpy.utils.unregister_class(SetCursorDialog)
-    
-    bpy.types.VIEW3D_PT_transform_orientations.remove(
-        transform_orientations_panel_extension)
-    del bpy.types.WindowManager.align_orientation_properties
-    bpy.utils.unregister_class(CopyOrientation)
-    bpy.utils.unregister_class(AlignOrientation)
-    bpy.utils.unregister_class(AlignOrientationProperties)
-
-class DelayRegistrationOperator(bpy.types.Operator):
-    bl_idname = "wm.enhanced_3d_cursor_registration"
-    bl_label = "[Enhanced 3D Cursor] registration delayer"
-    
-    _timer = None
-    
-    def modal(self, context, event):
-        if (not self.keymap_updated) and \
-            ((event.type == 'TIMER') or ("MOVE" in event.type)):
-            # clean up (we don't need this operator to run anymore)
-            wm = bpy.context.window_manager
-            
-            for kcfg in wm.keyconfigs.values():
-                for km in kcfg.keymaps.values():
-                    items = find_keymap_items(km,
-                        'wm.enhanced_3d_cursor_registration')
-                    for kmi in items:
-                        km.keymap_items.remove(kmi)
-            
-            """
-            try:
-                # A bug when using Maya keymap presets
-                # (reported by chafouin in BlenderArtists thread)
-                # KeyError: key "Window" not found'
-                # Circumvent for now.
-                km = wm.keyconfigs.active.keymaps['Window']
-            except KeyError:
-                km = None
-            
-            if km:
-                items = find_keymap_items(km,
-                    'wm.enhanced_3d_cursor_registration')
-                for kmi in items:
-                    km.keymap_items.remove(kmi)
-            """
-            
-            update_keymap(True)
-            
-            self.keymap_updated = True
-            
-            # No, better don't (at least in current version),
-            # since the monitor has dependencies on View3D context.
-            # Attempt to launch the monitor
-            #if bpy.ops.view3d.cursor3d_monitor.poll():
-            #    bpy.ops.view3d.cursor3d_monitor()
-            
-            return self.cancel(context)
-        
-        return {'PASS_THROUGH'}
-    
-    def execute(self, context):
-        self.keymap_updated = False
-
-        self._timer = context.window_manager.\
-            event_timer_add(0.1, context.window)
-
-        context.window_manager.modal_handler_add(self)        
-        return {'RUNNING_MODAL'}
-    
-    def cancel(self, context):
-        context.window_manager.event_timer_remove(self._timer)
-        
-        return {'CANCELLED'}
-
-if __name__ == "__main__":
-    # launched from the Blender text editor
-    try:
-        register()
-    except Exception as e:
-        print(e)
-        raise
diff --git a/release/scripts/addons_contrib/space_view3d_game_props_visualiser.py b/release/scripts/addons_contrib/space_view3d_game_props_visualiser.py
deleted file mode 100644
index ea7a1a5..0000000
--- a/release/scripts/addons_contrib/space_view3d_game_props_visualiser.py
+++ /dev/null
@@ -1,198 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-
-bl_info = {
-    'name': 'Game Property Visualizer',
-    'author': 'Bartius Crouch/Vilem Novak',
-    'version': (2,5),
-    'blender': (2, 5, 3),
-    'location': 'View3D > Properties panel > Display tab',
-    'description': 'Display the game properties next to selected objects '\
-        'in the 3d-view',
-    'warning': 'Script is returning errors',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Game_Property_Visualiser',
-    'tracker_url': 'http://projects.blender.org/tracker/?func=detail&aid=22607&group_id=153&atid=468',
-    'category': '3D View'}
-
-"""
-Displays game properties next to selected objects(under name)
-
-How to use:
-    just toggle the button 'Visualize game props' in the right side panel
-"""
-
-import bgl
-import blf
-import bpy
-import mathutils
-
-
-# calculate locations and store them as ID property in the mesh
-def calc_callback(self, context):
-    # polling
-    if context.mode == 'EDIT_MESH':
-        return
-    
-    # get screen information
-    mid_x = context.region.width/2.0
-    mid_y = context.region.height/2.0
-    width = context.region.width
-    height = context.region.height
-    
-    # get matrices
-    view_mat = context.space_data.region_3d.perspective_matrix
-
-    ob_mat = context.active_object.matrix_world
-    total_mat = view_mat*ob_mat
-    
-    # calculate location info
-    texts = []
-    
-    # uncomment 2 lines below, to enable live updating of the selection
-    #ob=context.active_object
-    for ob in context.selected_objects:
-        locs = []
-        ob_mat = ob.matrix_world
-        total_mat = view_mat*ob_mat
- 
-        for p in ob.game.properties:
-            # d = {'data':p.name+':'+str(p.value)}
-            # print (d)
-            locs.append([ mathutils.Vector([0,0,0]).resize_4d()])
-    
-    
-        for loc in locs:
-    
-            vec = loc[0]*total_mat # order is important
-            # dehomogenise
-            vec = mathutils.Vector((vec[0]/vec[3],vec[1]/vec[3],vec[2]/vec[3]))
-            x = int(mid_x + vec[0]*width/2.0)
-            y = int(mid_y + vec[1]*height/2.0)
-            texts+=[x, y]
-        
-
-    # store as ID property in mesh
-    #print (texts)
-    context.scene['GamePropsVisualizer'] = texts
-
-
-# draw in 3d-view
-def draw_callback(self, context):
-    # polling
-    if context.mode == 'EDIT_MESH':
-        return
-    # retrieving ID property data
-    try:
-        #print(context.scene['GamePropsVisualizer'])
-        texts = context.scene['GamePropsVisualizer']
-        
-    except:
-        return
-    if not texts:
-        return
-    
-    # draw
-    i=0
-
-    blf.size(0, 12, 72)
-   
-        
-    bgl.glColor3f(1.0,1.0,1.0)
-    for ob in bpy.context.selected_objects:
-        for pi,p in enumerate(ob.game.properties):
-            blf.position(0, texts[i], texts[i+1]-(pi+1)*14, 0)
-            if p.type=='FLOAT':
-                t=p.name+':  '+ str('%g'% p.value)
-            else:    
-                t=p.name+':  '+ str(p.value)
-            blf.draw(0, t)
-            i+=2
-
-
-# operator
-class GamePropertyVisualizer(bpy.types.Operator):
-    bl_idname = "view3d.game_props_visualizer"
-    bl_label = "Game Properties Visualizer"
-    bl_description = "Toggle the visualization of game properties"
-    
-    @classmethod
-    def poll(cls, context):
-        return context.mode!='EDIT_MESH'
-    
-    def modal(self, context, event):
-        context.area.tag_redraw()
-
-        # removal of callbacks when operator is called again
-        #print(context.scene.display_game_properties)
-        if context.scene.display_game_properties == -1:
-           # print('deinit2')
-
-            context.scene.display_game_properties = 0
-            context.region.callback_remove(self.handle1)
-            context.region.callback_remove(self.handle2)
-            context.scene.display_game_properties = 0
-            
-            return {'FINISHED'}
-        
-        return {'PASS_THROUGH'}
-    
-    def invoke(self, context, event):
-        if context.area.type == 'VIEW_3D':
-            print(context.scene.display_game_properties)
-            if context.scene.display_game_properties == 0 or context.scene.display_game_properties == -1:
-                print('init')
-                # operator is called for the first time, start everything
-                context.scene.display_game_properties = 1
-                self.handle1 = context.region.callback_add(calc_callback,
-                    (self, context), 'POST_VIEW')
-                self.handle2 = context.region.callback_add(draw_callback,
-                    (self, context), 'POST_PIXEL')
-
-                context.window_manager.modal_handler_add(self)
-                return {'RUNNING_MODAL'}
-            else:
-                # operator is called again, stop displaying
-                context.scene.display_game_properties = -1
-                #print(dir(self))
-                #
-                return {'RUNNING_MODAL'}
-        else:
-            self.report({'WARNING'}, "View3D not found, can't run operator")
-            return {'CANCELLED'}
-
-
-# defining the panel
-def menu_func(self, context):
-    col = self.layout.column(align=True)
-    col.operator(GamePropertyVisualizer.bl_idname, text="Visualize game props")
-    self.layout.separator()
-
-
-def register():
-    bpy.types.Scene.display_game_properties = bpy.props.IntProperty(name='Visualize Game Poperties')
-    bpy.types.VIEW3D_PT_view3d_display.prepend(menu_func)
-
-def unregister():
-    del bpy.types.Scene.display_game_properties
-    bpy.types.VIEW3D_PT_view3d_display.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/space_view3d_library_hide.py b/release/scripts/addons_contrib/space_view3d_library_hide.py
deleted file mode 100644
index ee4f747..0000000
--- a/release/scripts/addons_contrib/space_view3d_library_hide.py
+++ /dev/null
@@ -1,254 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-# Script copyright (C) Campbell Barton
-
-bl_info = {
-    "name": "Library Hide",
-    "description": "Hide objects within library dupligroups",
-    "author": "Campbell Barton",
-    "version": (1, 0),
-    "blender": (2, 6, 3),
-    'location': 'Search: RayCast View Operator',
-    "wiki_url": "",
-    "tracker_url":"",
-    "category": "3D View",
-}
-
-import bpy
-from mathutils import Vector
-from bpy_extras import view3d_utils
-
-LIB_HIDE_TEXT_ID = "blender_hide_objects.py"
-
-LIB_HIDE_TEXT_HEADER = """
-import bpy
-print("running: %r" % __file__)
-def hide(name, lib):
-    obj = bpy.data.objects.get((name, lib))
-    if obj is None:
-        print("hide can't find: %r %r" % (name, lib))
-    else:
-        obj.hide = obj.hide_render = True
-
-"""
-
-def pick_object(context, event, pick_objects, ray_max=10000.0):
-    """Run this function on left mouse, execute the ray cast"""
-    # get the context arguments
-    scene = context.scene
-    region = context.region
-    rv3d = context.region_data
-    coord = event.mouse_region_x, event.mouse_region_y
-
-    # get the ray from the viewport and mouse
-    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
-    ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)
-    ray_target = ray_origin + (view_vector * ray_max)
-
-    scene.cursor_location = ray_target
-
-    def visible_objects_and_duplis():
-        """Loop over (object, matrix) pairs (mesh only)"""
-
-        for obj in context.visible_objects:  # scene.objects:
-            if obj.hide:
-                continue
-
-            if obj.type == 'MESH':
-                yield (None, obj, obj.matrix_world.copy())
-
-            if obj.dupli_type != 'NONE':
-                print("DupliInst: %r" % obj)
-                obj.dupli_list_create(scene)
-                # matrix = obj.matrix_world.copy()
-                for dob in obj.dupli_list:
-                    obj_dupli = dob.object
-                    if not obj_dupli.hide:
-                        # print("Dupli: %r" % obj_dupli)
-                        if obj_dupli.type == 'MESH':
-                            yield (obj, obj_dupli, dob.matrix.copy())
-
-                obj.dupli_list_clear()
-
-    def obj_ray_cast(obj, matrix):
-        """Wrapper for ray casting that moves the ray into object space"""
-
-        # get the ray relative to the object
-        matrix_inv = matrix.inverted()
-        ray_origin_obj = matrix_inv * ray_origin
-        ray_target_obj = matrix_inv * ray_target
-
-        mesh = obj.data
-        if not mesh.polygons:
-            return None, None, None
-
-        hit, normal, face_index = obj.ray_cast(ray_origin_obj, ray_target_obj)
-
-        if face_index == -1:
-            hit, normal, face_index = obj.ray_cast(ray_target_obj, ray_origin_obj)
-
-        if face_index != -1:
-            return hit, normal, face_index
-        else:
-            return None, None, None
-
-    # cast rays and find the closest object
-    best_length_squared = ray_max * ray_max
-    best_obj = None
-    best_obj_parent = None
-
-    for obj_parent, obj, matrix in visible_objects_and_duplis():
-        if obj.type == 'MESH':
-            hit, normal, face_index = obj_ray_cast(obj, matrix)
-            if hit is not None:
-                length_squared = (hit - ray_origin).length_squared
-                if length_squared < best_length_squared:
-                    best_length_squared = length_squared
-                    best_obj = obj
-                    best_obj_parent = obj_parent
-
-    # now we have the object under the mouse cursor,
-    # we could do lots of stuff but for the example just select.
-    if best_obj is not None:
-        pick_objects.append((best_obj, best_obj.hide, best_obj.hide_render))
-        best_obj.hide = True
-        best_obj.hide_render = True
-        
-        #if best_obj_parent:
-        #    best_obj_parent.update_tag(refresh={'OBJECT'})
-        #scene.update()
-        return True
-    else:
-        print("found none")
-        return False
-
-
-def pick_finalize(context, pick_objects):
-    text = bpy.data.texts.get((LIB_HIDE_TEXT_ID, None))
-    if text is None:
-        text = bpy.data.texts.new(LIB_HIDE_TEXT_ID)
-        text.use_module = True
-        is_new = True
-    else:
-        is_new = False
-
-    if is_new:
-        data = []
-        
-        data += LIB_HIDE_TEXT_HEADER.split("\n")
-    else:
-        data = text.as_string().split("\n")
-
-    data.append("# ---")
-    
-    for pick_obj_tuple in pick_objects:
-        
-        pick_obj = pick_obj_tuple[0]
-        
-        pick_obj.hide = True
-        pick_obj.hide_render = True
-
-        line = "hide(%r, %s)" % (pick_obj.name, repr(pick_obj.library.filepath) if pick_obj.library is not None else "None")
-        data.append(line)
-    
-    text.from_string("\n".join(data))
-
-
-def pick_restore(pick_obj):
-    best_obj, hide, hide_render = pick_obj
-    best_obj.hide = hide
-    best_obj.hide_render = hide_render
-
-
-class ViewOperatorRayCast(bpy.types.Operator):
-    """Modal object selection with a ray cast"""
-    bl_idname = "view3d.modal_operator_raycast"
-    bl_label = "RayCast View Operator"
-
-    _header_text = "Add: LMB, Undo: BackSpace, Finish: Enter"
-
-    def _update_header(self, context):
-        if self.pick_objects:
-            pick_obj = self.pick_objects[-1][0]
-            info_obj = "%s, %s" % (pick_obj.name, pick_obj.library.filepath if pick_obj.library is not None else "None")
-            info = "%s - added: %s" % (ViewOperatorRayCast._header_text, info_obj)
-        else:
-            info = ViewOperatorRayCast._header_text
-
-        context.area.header_text_set(info)
-
-    def modal(self, context, event):
-        if event.type in {'MIDDLEMOUSE', 'WHEELUPMOUSE', 'WHEELDOWNMOUSE'}:
-            # allow navigation
-            return {'PASS_THROUGH'}
-        elif event.type == 'LEFTMOUSE':
-            if event.value == 'RELEASE':
-                if pick_object(context, event, self.pick_objects):
-                    self._update_header(context)
-                return {'RUNNING_MODAL'}
-        elif event.type == 'BACK_SPACE':
-            if event.value == 'RELEASE':
-                if self.pick_objects:
-                    pick_obj = self.pick_objects.pop()
-                    pick_restore(pick_obj)
-                    self._update_header(context)
-
-        elif event.type in {'RET', 'NUMPAD_ENTER'}:
-            if event.value == 'RELEASE':
-                if self.pick_objects:  # avoid enter taking effect on startup
-                    pick_finalize(context, self.pick_objects)
-                    context.area.header_text_set()
-                    self.report({'INFO'}, "Finished")
-                    return {'FINISHED'}
-                
-        elif event.type in {'RIGHTMOUSE', 'ESC'}:
-            if event.value == 'RELEASE':
-                for pick_obj in self.pick_objects:
-                    pick_restore(pick_obj)
-                context.area.header_text_set()
-                self.report({'INFO'}, "Cancelled")
-                return {'CANCELLED'}
-
-        return {'RUNNING_MODAL'}
-
-    def invoke(self, context, event):
-        if context.space_data.type == 'VIEW_3D':
-            
-            self.pick_objects = []
-            self._update_header(context)
-
-            context.window_manager.modal_handler_add(self)
-            return {'RUNNING_MODAL'}
-        else:
-            self.report({'WARNING'}, "Active space must be a View3d")
-            return {'CANCELLED'}
-
-
-def register():
-    bpy.utils.register_class(ViewOperatorRayCast)
-
-
-def unregister():
-    bpy.utils.unregister_class(ViewOperatorRayCast)
-
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/space_view3d_manipulator_Menu.py b/release/scripts/addons_contrib/space_view3d_manipulator_Menu.py
deleted file mode 100644
index b197e5c..0000000
--- a/release/scripts/addons_contrib/space_view3d_manipulator_Menu.py
+++ /dev/null
@@ -1,113 +0,0 @@
-#re creating the functionality of the manipulator menu from 2.49
-
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-
-bl_info = {
-    'name': '3d View: Manipulator Menu',
-    'author': 'MichaelW',
-    'version': (1, 2 ,1),
-    'blender': (2, 6, 1),
-    'location': 'View3D > Ctrl Space ',
-    'description': 'Menu to change the manipulator type and/or disable it',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/'\
-        'Scripts/3D_interaction/Manipulator_Menu',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'\
-        'func=detail&aid=22092',
-    'category': '3D View'}
-
-
-
-
-
-
-import bpy
-
-def main(context):
-    bpy.context.space_data.manipulator = False
-
-#class VIEW3D_OT_disable_manipulator(bpy.types.Operator):
-#    """"""
-#    bl_idname = "VIEW3D_OT_disable_manipulator"
-#    bl_label = "disable manipulator"
-#
-#    def poll(self, context):
-#        return context.active_object != None
-#
-#    def execute(self, context):
-#        main(context)
-#        return {'FINISHED'}
-#
-
-
-class VIEW3D_MT_ManipulatorMenu(bpy.types.Menu):
-    bl_label = "ManipulatorType"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        props = layout.operator("view3d.enable_manipulator",text ='Translate', icon='MAN_TRANS')
-        props.translate = True
-
-        props = layout.operator("view3d.enable_manipulator",text ='Rotate', icon='MAN_ROT')
-        props.rotate = True
-
-        props = layout.operator("view3d.enable_manipulator",text ='Scale', icon='MAN_SCALE')
-        props.scale = True
-        layout.separator()
-
-        props = layout.operator("view3d.enable_manipulator",text ='Combo', icon='MAN_SCALE')
-        props.scale = True
-        props.rotate = True
-        props.translate = True
-
-        layout.separator()
-
-        props = layout.operator("view3d.enable_manipulator",text ='Hide', icon='MAN_SCALE')
-        props.scale = False
-        props.rotate = False
-        props.translate = False
-        
-        layout.separator()
-
-
-            
-def register():
-    bpy.utils.register_module(__name__)
-
-    wm = bpy.context.window_manager
-    km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')
-    kmi = km.keymap_items.new('wm.call_menu', 'SPACE', 'PRESS', ctrl=True)
-    kmi.properties.name = "VIEW3D_MT_ManipulatorMenu"
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    wm = bpy.context.window_manager
-    km = wm.keyconfigs.addon.keymaps['3D View Generic']
-    for kmi in km.keymap_items:
-        if kmi.idname == 'wm.call_menu':
-            if kmi.properties.name == "VIEW3D_MT_ManipulatorMenu":
-                km.keymap_items.remove(kmi)
-                break
-
-if __name__ == "__main__":
-    register
diff --git a/release/scripts/addons_contrib/space_view3d_multiselect_menu.py b/release/scripts/addons_contrib/space_view3d_multiselect_menu.py
deleted file mode 100644
index 91a6aa8..0000000
--- a/release/scripts/addons_contrib/space_view3d_multiselect_menu.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#view3d_multiselect_menu.py (c) 2011 Sean Olson (liquidApe)
-#Original Script by: Mariano Hidalgo (uselessdreamer)
-#contributed to by: Crouch, sim88, sam, meta-androcto, and Michael W
-#
-#Tested with r37702
-#
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': '3D View: Multiselect Menu',
-    'author': 'Sean Olson (liquidApe)',
-    'version': (1, 2),
-    'blender': (2, 6, 1),
-    'location': 'View3D > Mouse > Menu ',
-    'warning':'',
-    'description': 'Added options for multiselect to the ctrl-tab menu',
-    'wiki_url': 'http://wiki.blender.org/index.php/Extensions:2.6/Py/' \
-        'Scripts/3D_interaction/multiselect_Menu',
-    'tracker_url': 'https://projects.blender.org/tracker/index.php?'
-                   'func=detail&aid=22132',
-    'category': '3D View'}
-
-import bpy
-
-# multiselect menu
-class VIEW3D_MT_Multiselect_Menu(bpy.types.Menu):
-    bl_label = "MultiSelect Menu"
-
-    def draw(self, context):
-        layout = self.layout
-        layout.operator_context = 'INVOKE_REGION_WIN'
-
-        layout.separator()
-        prop = layout.operator("wm.context_set_value", text="Vertex Select",
-            icon='VERTEXSEL')
-        prop.value = "(True, False, False)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-
-        prop = layout.operator("wm.context_set_value", text="Edge Select",
-            icon='EDGESEL')
-        prop.value = "(False, True, False)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-
-        prop = layout.operator("wm.context_set_value", text="Face Select",
-            icon='FACESEL')
-        prop.value = "(False, False, True)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-        layout.separator()
-
-        prop = layout.operator("wm.context_set_value",
-            text="Vertex & Edge Select", icon='EDITMODE_HLT')
-        prop.value = "(True, True, False)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-
-        prop = layout.operator("wm.context_set_value",
-            text="Vertex & Face Select", icon='ORTHO')
-        prop.value = "(True, False, True)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-
-        prop = layout.operator("wm.context_set_value",
-            text="Edge & Face Select", icon='SNAP_FACE')
-        prop.value = "(False, True, True)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-        layout.separator()
-
-        prop = layout.operator("wm.context_set_value",
-            text="Vertex & Edge & Face Select", icon='SNAP_VOLUME')
-        prop.value = "(True, True, True)"
-        prop.data_path = "tool_settings.mesh_select_mode"
-        layout.separator()
-
-def register():
-    bpy.utils.register_module(__name__)
-    
-    #add multiselect keybinding
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['Mesh']
-    kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
-    kmi.properties.name = "VIEW3D_MT_Multiselect_Menu"
-
-    #remove default keybinding
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['Mesh']
-    for kmi in km.keymap_items:
-        if kmi.idname == 'wm.call_menu':
-            if kmi.properties.name == "VIEW3D_MT_edit_mesh_select_mode":
-                km.keymap_items.remove(kmi)
-                break
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    #remove multiselect keybinding
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['Mesh']
-    for kmi in km.keymap_items:
-        if kmi.idname == 'wm.call_menu':
-            if kmi.properties.name == "VIEW3D_MT_Multiselect_Menu":
-                km.keymap_items.remove(kmi)
-                break
-
-    #replace default keymap
-    km = bpy.context.window_manager.keyconfigs.active.keymaps['Mesh']
-    kmi = km.keymap_items.new('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
-    kmi.properties.name = "VIEW3D_MT_edit_mesh_select_mode"
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/space_view3d_objects_panel.py b/release/scripts/addons_contrib/space_view3d_objects_panel.py
deleted file mode 100644
index 0533eda..0000000
--- a/release/scripts/addons_contrib/space_view3d_objects_panel.py
+++ /dev/null
@@ -1,75 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Add Objects Panel",
-    "author": "Murat Egretli (Demohero)",
-    "version": (1,2),
-    "blender": (2, 6, 1),
-    "location": "View3D > Toolbar",
-    "description": "add objects(mesh, curve etc.) from Toolbar",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=22154",
-    "category": "3D View"}
-
-
-import bpy
-
-
-class View3DPanel():
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    
-
-class VIEW3D_PT_add_menu(View3DPanel,bpy.types.Panel):
-    bl_context = "objectmode"
-    bl_label = "Add Objects"
-    bl_options = {"DEFAULT_CLOSED"}
-    
-    def draw(self, context):
-        layout = self.layout
-
-        layout.menu("INFO_MT_mesh_add", text="Mesh", icon='OUTLINER_OB_MESH')
-        layout.menu("INFO_MT_curve_add", text="Curve", icon='OUTLINER_OB_CURVE')
-        layout.menu("INFO_MT_surface_add", text="Surface", icon='OUTLINER_OB_SURFACE')
-        layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
-        layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
-        layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
-        layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
-        layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
-        layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
-        layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
-        layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
-        layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
-      
-# register the class
-def register():
-    bpy.utils.register_module(__name__)
- 
-    pass 
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
- 
-    pass 
-
-if __name__ == "__main__": 
-    register()
diff --git a/release/scripts/addons_contrib/space_view3d_paint_bprojection.py b/release/scripts/addons_contrib/space_view3d_paint_bprojection.py
deleted file mode 100644
index 9189999..0000000
--- a/release/scripts/addons_contrib/space_view3d_paint_bprojection.py
+++ /dev/null
@@ -1,1396 +0,0 @@
-bl_info = {
-    "name": "BProjection",
-    "description": "Help Clone tool",
-    "author": "kgeogeo",
-    "version": (1, 0),
-    "blender": (2, 6, 3),
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/bprojection",
-    "tracker_url":"http://projects.blender.org/tracker/index.php?func=detail&aid=30521&group_id=153&atid=468",
-    "category": "Paint"}
-
-import bpy
-from bpy.app.handlers import persistent
-from bpy.types import Panel, Operator
-from bpy.props import IntProperty, FloatProperty, BoolProperty, IntVectorProperty, StringProperty, FloatVectorProperty, CollectionProperty
-from bpy_extras import view3d_utils
-import math
-from math import *
-import mathutils
-from mathutils import *
-
-BProjection_Empty    = 'Empty for BProjection'
-BProjection_Material = 'Material for BProjection'
-BProjection_Texture  = 'Texture for BProjection'
-
-# Main function for align the plan to view
-def align_to_view(context):
-    ob = context.object
-    em = bpy.data.objects[BProjection_Empty]       
-    rotation = em.custom_rotation
-    scale = em.custom_scale
-    z = em.custom_location.z
-    pos = [em.custom_location.x, em.custom_location.y]
-    
-    reg = context.area.regions[4]        
-    width = reg.width
-    height = reg.height 
-    
-    sd = context.space_data    
-    r3d = sd.region_3d     
-    r3d.update()
-    vr = r3d.view_rotation
-    quat = mathutils.Quaternion((0.0, 0.0, 1.0), math.radians(float(rotation)))
-    v = Vector((pos[0],pos[1],z))
-    v.rotate(vr)
-
-    em = bpy.data.objects[BProjection_Empty]
-    img = bpy.data.textures[BProjection_Texture].image
-    if img and img.size[1] != 0:
-        prop = img.size[0]/img.size[1]
-    else: prop = 1    
-    
-    if em.custom_linkscale:    
-        em.scale = Vector((prop*scale[0], scale[0], 1))
-    else:
-        em.scale = Vector((prop*scale[0], scale[1], 1))
-    pos_cur = em.location - sd.cursor_location
-    rot_cur1 = em.rotation_euler.to_quaternion()
-    em.location = v + ob.location
-    em.rotation_euler = Quaternion.to_euler(vr*quat)   
-    if em.custom_c3d:
-        if em.custom_old_scale != em.custom_scale:
-            pos_cur = em.location - sd.cursor_location       
-        rot_cur2 = em.rotation_euler.to_quaternion()
-        rot_cur1.invert()
-        pos_cur.rotate(rot_cur1)
-        pos_cur.rotate(rot_cur2)
-        v = em.location - pos_cur
-        sd.cursor_location =  v
-
-def applyimage(context):        
-        img = bpy.data.textures[BProjection_Texture].image
-        em = bpy.data.objects[BProjection_Empty]
-        ob = context.object
-               
-        face = ob.data.polygons
-        uvdata = ob.data.uv_textures.active.data 
-            
-        for f,d in zip(face,uvdata):
-            if f.select:
-                d.image = img
-               
-        align_to_view(context)
-        ob.data.update()
-
-# Function to update the properties
-def update_Location(self, context):          
-    align_to_view(context)
-
-def find_uv(context):
-    obj = context.object
-    me = obj.data.vertices
-    vg = obj.vertex_groups
-    l=[]
-    index_uv = 0      
-    for face in obj.data.polygons:
-        x=len(face.vertices)
-        for vertex in face.vertices:
-            if len(me[vertex].groups)>0:
-                for g in me[vertex].groups:
-                    if vg[g.group].name == 'texture plane':
-                        x-=1
-        
-                        
-        if x == 0:
-            l.append([index_uv,len(face.vertices)])
-        index_uv += len(face.vertices)
-    return l
-
-# Function to update the scaleUV
-def update_UVScale(self, context):
-    ob = context.object
-    em = bpy.data.objects[BProjection_Empty]
-    v = Vector((em.custom_offsetuv[0]/10 + 0.5, em.custom_offsetuv[1]/10 + 0.5))
-    l = Vector((0.0,0.0))
-    s = em.custom_scaleuv
-    os = em.custom_old_scaleuv 
-    scale = s - os
-    l = find_uv(context)
-    for i,j in l:
-        for t in range(j):
-            d = context.object.data.uv_layers.active.data[i+t]
-            vres =  v - d.uv  
-            d.uv.x = v.x - vres.x/os[0]*s[0]
-            d.uv.y = v.y - vres.y/os[1]*s[1]
-
-    em.custom_old_scaleuv = s  
-    
-    applyimage(context)
-
-def update_PropUVScale(self, context):
-    em = bpy.data.objects[BProjection_Empty]
-    if em.custom_linkscaleuv:
-        em.custom_scaleuv = [em.custom_propscaleuv,em.custom_propscaleuv]
-
-def update_LinkUVScale(self, context):
-    em = bpy.data.objects[BProjection_Empty]
-    if em.custom_linkscaleuv:
-        em.custom_propscaleuv = em.custom_scaleuv.x
-        update_PropUVScale(self, context)
-    else:
-        update_UVScale(self, context) 
-        
-# Function to update the offsetUV
-def update_UVOffset(self, context):
-    ob = context.object
-    em = bpy.data.objects[BProjection_Empty]
-    o = em.custom_offsetuv
-    oo = em.custom_old_offsetuv 
-    l = find_uv(context)
-    for i,j in l:
-        for t in range(j):
-            d = context.object.data.uv_layers.active.data[i+t]
-            d.uv = [d.uv[0] - oo[0]/10 + o[0]/10, d.uv[1] - oo[1]/10 + o[1]/10]   
-    em.custom_old_offsetuv = o
-    
-    applyimage(context)
-
-# Function to update the flip horizontal
-def update_FlipUVX(self, context):
-    l = find_uv(context)
-    for i,j in l:
-        for t in range(j):
-            d = context.object.data.uv_layers.active.data[i+t]
-            x = d.uv.x
-            d.uv.x = 1 - x
-    
-    applyimage(context)
-
-# Function to update the flip vertical
-def update_FlipUVY(self, context):
-    l = find_uv(context)
-    for i,j in l:
-        for t in range(j):
-            d = context.object.data.uv_layers.active.data[i+t]
-            y = d.uv[1]
-            d.uv[1] = 1 - y
-    
-    applyimage(context)
-
-# Function to update
-def update_Rotation(self, context):              
-    ob = context.object
-    em = bpy.data.objects[BProjection_Empty]
-    if em.custom_rotc3d:
-        angle = em.custom_rotation - em.custom_old_rotation
-        sd = context.space_data
-        vr = sd.region_3d.view_rotation.copy()        
-        c = sd.cursor_location - ob.location
-        e = bpy.data.objects[BProjection_Empty].location - ob.location
-        vo = Vector((0.0, 0.0, 1.0))
-        vo.rotate(vr)
-        quat = mathutils.Quaternion(vo, math.radians(angle))
-        v = e-c
-        v.rotate(quat)
-        vr.invert()
-        v.rotate(vr)
-        c.rotate(vr)
-        em.custom_location = c + v
-    else:        
-        align_to_view(context)
-   
-    em.custom_old_rotation = em.custom_rotation
-
-# Function to update scale
-def update_Scale(self, context):              
-    ob = context.object
-    em = bpy.data.objects[BProjection_Empty]
-    
-    if em.custom_scac3d:
-        sd = context.space_data
-        r3d =  sd.region_3d
-        vr = r3d.view_rotation.copy()
-        vr.invert()
-        e = em.location - ob.location
-        c = sd.cursor_location - ob.location
-        ce = e - c
-        
-        s = em.custom_scale
-        os = em.custom_old_scale
-        c.rotate(vr)
-        ce.rotate(vr)
-        
-        img = bpy.data.textures[BProjection_Texture].image
-        if img and img.size[1] != 0:
-            prop = img.size[0]/img.size[1]
-        else: prop = 1
-        
-        v = Vector((s.x*ce.x/os.x, s.y*ce.y/os.y,0.0))
-        em.custom_location = c + v
-        
-
-    else:          
-        align_to_view(context)
-            
-    
-    em.custom_old_scale = em.custom_scale
-
-def update_PropScale(self, context):
-    em = bpy.data.objects[BProjection_Empty]
-    if em.custom_linkscale:
-        em.custom_scale = [em.custom_propscale,em.custom_propscale]
-    
-def update_LinkScale(self, context):
-    em = bpy.data.objects[BProjection_Empty]
-    if em.custom_linkscale:
-        em.custom_propscale = em.custom_scale.x
-        update_PropScale(self, context)
-    else:
-        update_Scale(self, context) 
-
-def update_activeviewname(self, context):
-    em = bpy.data.objects[BProjection_Empty]
-    if self.custom_active:
-        em.custom_active_view = self.custom_active_view
-
-class custom_props(bpy.types.PropertyGroup):
-    custom_location = FloatVectorProperty(name="Location", description="Location of the plane",
-                                          default=(0,0,-1.0),
-                                          subtype = 'XYZ', 
-                                          soft_min = -10,
-                                          soft_max = 10,
-                                          step=0.1,
-                                          size=3)
-                                           
-    custom_rotation = FloatProperty(name="Rotation", description="Rotate the plane",
-                                    min=-180, max=180, default=0)
-                                         
-    custom_scale = FloatVectorProperty(name="Scales", description="Scale the planes",
-                                       default=(1.0, 1.0),
-                                       subtype = 'XYZ',
-                                       min = 0.1,
-                                       max = 10,
-                                       soft_min=0.1,
-                                       soft_max=10,
-                                       step=0.1,
-                                       size=2)
-    custom_propscale = FloatProperty(name="PropScale", description="Scale the Plane",
-                                     default=1.0,
-                                     min = 0.1,
-                                     max = 10,
-                                     soft_min=0.1,
-                                     soft_max=10,
-                                     step=0.1)
-                                                                                    
-    custom_linkscale = BoolProperty(name="linkscale", default=True)
-   
-    # UV properties
-    custom_scaleuv = FloatVectorProperty(name="ScaleUV", description="Scale the texture's UV",
-                                            default=(1.0,1.0),min = 0.01, subtype = 'XYZ', size=2)
-    custom_propscaleuv = FloatProperty(name="PropScaleUV", description="Scale the texture's UV",
-                                           default=1.0,min = 0.01) 
-    custom_offsetuv = FloatVectorProperty(name="OffsetUV", description="Decal the texture's UV",
-                                            default=(0.0,0.0), subtype = 'XYZ', size=2)       
-    custom_linkscaleuv = BoolProperty(name="linkscaleUV", default=True)
-    custom_flipuvx = BoolProperty(name="flipuvx", default=False)
-    custom_flipuvy = BoolProperty(name="flipuvy", default=False)
-    
-    # other properties
-    custom_active= BoolProperty(name="custom_active", default=True)   
-    custom_expand = BoolProperty(name="expand", default=False)
-    
-    custom_active_view = StringProperty(name = "custom_active_view",default = "View",update = update_activeviewname)
-    
-    custom_image = StringProperty(name = "custom_image",default = "")
-    
-    custom_index = IntProperty()
-
-# Function to create custom properties
-def createcustomprops(context):
-    Ob = bpy.types.Object
-    
-    # plane properties 
-    Ob.custom_location = FloatVectorProperty(name="Location", description="Location of the plane",
-                                           default  = (0, 0, -1.0),
-                                           subtype  = 'XYZ', 
-                                           size     = 3,
-                                           step     = 0.5,
-                                           soft_min = -10,
-                                           soft_max = 10,
-                                           update   = update_Location)
-                                           
-    Ob.custom_rotation = FloatProperty(name="Rotation", description="Rotate the plane",
-                                       min=-180, max=180, default=0,update = update_Rotation)
-                                     
-    Ob.custom_old_rotation = FloatProperty(name="old_Rotation", description="Old Rotate the plane",
-                                           min=-180, max=180, default=0)
-                                         
-    Ob.custom_scale = FloatVectorProperty(name="Scales", description="Scale the planes",
-                                          subtype = 'XYZ',
-                                          default=(1.0, 1.0),
-                                          min = 0.1,
-                                          max = 10,
-                                          soft_min = 0.1,
-                                          soft_max = 10,
-                                          size=2,
-                                          step=0.5,
-                                          update = update_Scale)
-                                          
-    Ob.custom_propscale = FloatProperty(name="PropScale", description="Scale the Plane",
-                                        default  = 1.0,
-                                        min      = 0.1,
-                                        soft_min = 0.1,
-                                        soft_max = 10,
-                                        step     = 0.5,
-                                        update   = update_PropScale)
-                                           
-    Ob.custom_old_scale = FloatVectorProperty(name="old_Scales", description="Old Scale the planes",
-                                          subtype = 'XYZ', default=(1.0, 1.0),min = 0.1, size=2)
-                                          
-    Ob.custom_linkscale = BoolProperty(name="linkscale", default=True, update = update_LinkScale)
-    
-                                
-    Ob.custom_sub = IntProperty(name="Subdivide", description="Number of subdivision of the plane",
-                                     min=0, max=20, default=0)                                
-    
-    # UV properties
-    Ob.custom_scaleuv = FloatVectorProperty(name="ScaleUV", description="Scale the texture's UV",
-                                            default  = (1.0,1.0),
-                                            soft_min = 0.01,
-                                            soft_max = 100,
-                                            min      = 0.01, 
-                                            subtype  = 'XYZ',
-                                            size     = 2,
-                                            update   = update_UVScale)
-                                            
-    Ob.custom_propscaleuv = FloatProperty(name="PropScaleUV", description="Scale the texture's UV",
-                                          default    = 1.0,
-                                          soft_min   = 0.01,
-                                          soft_max   = 100,
-                                          min        = 0.01,
-                                          update     = update_PropUVScale)    
-
-    Ob.custom_old_scaleuv = FloatVectorProperty(name="old_ScaleUV", description="Scale the texture's UV",
-                                                default=(1.0,1.0),min = 0.01, subtype = 'XYZ', size=2)
-    Ob.custom_offsetuv = FloatVectorProperty(name="OffsetUV", description="Decal the texture's UV",
-                                            default=(0.0,0.0), subtype = 'XYZ', size=2,update = update_UVOffset)    
-    Ob.custom_old_offsetuv = FloatVectorProperty(name="old_OffsetUV", description="Decal the texture's UV",
-                                                 default=(0.0,0.0), subtype = 'XYZ', size=2)    
-    Ob.custom_linkscaleuv = BoolProperty(name="linkscaleUV", default=True, update = update_LinkUVScale)
-    Ob.custom_flipuvx = BoolProperty(name="flipuvx", default=False, update = update_FlipUVX)
-    Ob.custom_flipuvy = BoolProperty(name="flipuvy", default=False, update = update_FlipUVY)
-    
-    # other properties    
-    Ob.custom_c3d = BoolProperty(name="c3d", default=True)
-    Ob.custom_rotc3d = BoolProperty(name="rotc3d", default=False)
-    Ob.custom_scac3d = BoolProperty(name="scac3d", default=False)
-    Ob.custom_expand = BoolProperty(name="expand", default=True)
-    Ob.custom_active_view = StringProperty(name = "custom_active_view",default = "View")
-    try:
-        Ob.custom_active_object = StringProperty(name = "custom_active_object",default = context.object.name)
-    except:
-        Ob.custom_active_object = StringProperty(name = "custom_active_object",default = 'debut')    
-    Ob.custom_props = CollectionProperty(type = custom_props)
-
-# Function to remove custom properties
-def removecustomprops():    
-    list_prop = ['custom_location', 'custom_rotation', 'custom_old_rotation', 'custom_scale', 'custom_old_scale', 'custom_c3d',
-                 'custom_rotc3d', 'custom_scaleuv', 'custom_flipuvx', 'custom_flipuvy', 'custom_linkscale',
-                 'custom_linkscaleuv', 'custom_old_scaleuv', 'custom_offsetuv', 'custom_old_offsetuv', 'custom_scac3d', 'custom_sub',
-                 'custom_expand', 'custom_active_view', 'custom_propscaleuv', 'custom_props', 'custom_propscale']
-    for prop in list_prop:
-        try:
-            del bpy.data.objects[BProjection_Empty][prop]
-        except:
-            pass
-        
-def clear_props(context):
-    em = bpy.data.objects[BProjection_Empty] 
-    em.custom_scale = [1,1]
-    em.custom_rotation = 0
-    em.custom_scaleuv =[1.0,1.0]
-    em.custom_offsetuv =[0.0,0.0]
-    em.custom_propscaleuv = 1.0
-    em.custom_propscale = 1.0
-    if em.custom_flipuvx == True:
-        em.custom_flipuvx = False
-    if em.custom_flipuvy == True:
-        em.custom_flipuvy = False
-
-# Oprerator Class to create view            
-class CreateView(Operator):
-    bl_idname = "object.create_view"
-    bl_label = "Create a new view"
-
-    def execute(self, context):              
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        new_props = em.custom_props.add()        
-        em.custom_active_view = new_props.custom_active_view               
-        ob.data.shape_keys.key_blocks[ob.active_shape_key_index].mute = True
-        bpy.ops.object.shape_key_add(from_mix = False)
-        ob.data.shape_keys.key_blocks[ob.active_shape_key_index].value = 1.0
-        new_props.custom_index = len(em.custom_props)-1
-        bpy.ops.object.active_view(index = new_props.custom_index)
-        return {'FINISHED'}
-
-# Oprerator Class to copy view 
-class SaveView(Operator):
-    bl_idname = "object.save_view"
-    bl_label = "copy the view"
-    
-    index = IntProperty(default = 0)
-    
-    def execute(self, context):              
-        em = bpy.data.objects[BProjection_Empty]
-        prop = em.custom_props[self.index]                            
-        prop.custom_rotation =  em.custom_rotation                    
-        prop.custom_scale =  em.custom_scale                  
-        prop.custom_linkscale =  em.custom_linkscale                                      
-        prop.custom_scaleuv = em.custom_scaleuv
-        prop.custom_propscale = em.custom_propscale
-        prop.custom_offsetuv =  em.custom_offsetuv  
-        prop.custom_linkscaleuv = em.custom_linkscaleuv
-        prop.custom_propscaleuv = em.custom_propscaleuv
-        prop.custom_flipuvx = em.custom_flipuvx
-        prop.custom_flipuvy = em.custom_flipuvy
-        try:
-            prop.custom_image = bpy.data.textures[BProjection_Texture].image.name
-        except:
-            pass
-        
-        return {'FINISHED'}
-
-# Oprerator Class to copy view 
-class PasteView(Operator):
-    bl_idname = "object.paste_view"
-    bl_label = "paste the view"
-    
-    index = IntProperty(default = 0)
-    
-    def execute(self, context):              
-        em = bpy.data.objects[BProjection_Empty]
-        tmp_scac3d = em.custom_scac3d
-        tmp_rotc3d = em.custom_rotc3d
-        em.custom_scac3d = False
-        em.custom_rotc3d = False
-        prop = em.custom_props[self.index]
-        em.custom_linkscale =  prop.custom_linkscale
-        em.custom_offsetuv =  prop.custom_offsetuv 
-        em.custom_linkscaleuv = prop.custom_linkscaleuv
-        em.custom_scaleuv = prop.custom_scaleuv
-        em.custom_propscaleuv = prop.custom_propscaleuv       
-        em.custom_rotation =  prop.custom_rotation                    
-        em.custom_scale =  prop.custom_scale
-        em.custom_propscale = prop.custom_propscale                     
-        if prop.custom_image != '':
-            if bpy.data.textures[BProjection_Texture].image.name != prop.custom_image:
-                bpy.data.textures[BProjection_Texture].image = bpy.data.images[prop.custom_image]
-                applyimage(context)
-        if em.custom_flipuvx != prop.custom_flipuvx:
-            em.custom_flipuvx = prop.custom_flipuvx
-        if em.custom_flipuvy != prop.custom_flipuvy:
-            em.custom_flipuvy = prop.custom_flipuvy
-        em.custom_scac3d = tmp_scac3d
-        em.custom_rotc3d = tmp_rotc3d        
-        return {'FINISHED'}
-
-# Oprerator Class to remove view 
-class RemoveView(Operator):
-    bl_idname = "object.remove_view"
-    bl_label = "Rmeove the view"
-    
-    index = IntProperty(default = 0)
-    
-    def execute(self, context):              
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        
-        ob.active_shape_key_index =  self.index + 1
-        bpy.ops.object.shape_key_remove()
-        
-        if  em.custom_props[self.index].custom_active: 
-            if len(em.custom_props) > 0:
-                bpy.ops.object.active_view(index = self.index-1)
-            if self.index == 0 and len(em.custom_props) > 1:
-                bpy.ops.object.active_view(index = 1)            
-                
-        em.custom_props.remove(self.index)
-                
-        if len(em.custom_props) == 0:
-            clear_props(context)
-            
-            bpy.ops.object.create_view()            
-                 
-        i=0
-        for item in em.custom_props:
-            item.custom_index = i           
-            i+=1 
-
-        for item in (item for item in em.custom_props if item.custom_active):
-                ob.active_shape_key_index = item.custom_index+1
-           
-        return {'FINISHED'}
-
-# Oprerator Class to copy view 
-class ActiveView(Operator):
-    bl_idname = "object.active_view"
-    bl_label = "Active the view"
-    
-    index = IntProperty(default = 0)
-    
-    def execute(self, context):
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        for item in (item for item in em.custom_props if item.custom_active == True):
-            bpy.ops.object.save_view(index = item.custom_index)
-            item.custom_active = False
-        em.custom_props[self.index].custom_active  = True
-        em.custom_active_view = em.custom_props[self.index].custom_active_view 
-        ob.active_shape_key_index =  self.index + 1
-        
-        for i in ob.data.shape_keys.key_blocks:
-            i.mute = True
-        
-        ob.data.shape_keys.key_blocks[ob.active_shape_key_index].mute = False
-        
-        bpy.ops.object.paste_view(index = self.index)         
-        
-        return {'FINISHED'}
-
-# Draw Class to show the panel
-class BProjection(Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "BProjection"
-
-    @classmethod
-    def poll(cls, context):
-        return (context.image_paint_object or context.sculpt_object)
-
-    def draw(self, context):
-        layout = self.layout        
-        if  BProjection_Empty in [ob.name for ob in bpy.data.objects]:
-            tex = bpy.data.textures[BProjection_Texture]
-
-            ob = context.object
-            em = bpy.data.objects[BProjection_Empty]
-            if ob == bpy.data.objects[em.custom_active_object]:            
-                col = layout.column(align =True)
-                col.operator("object.removebprojectionplane", text="Remove BProjection plane")           
-
-            try:
-                matBProjection = bpy.data.materials[BProjection_Material]
-            except:
-                matBProjection = None
-            
-            box = layout.box()
-
-            row = box.row()
-            if not em.custom_expand:
-                row.prop(em, "custom_expand", text  = "", icon="TRIA_RIGHT", emboss=False)
-                row.label(text= 'Paint Object: '+ ob.name)
-            else:
-                row.prop(em, "custom_expand", text = "" , icon="TRIA_DOWN", emboss=False)                
-                row.label(text= 'Paint Object: '+ ob.name)
-                
-                if ob == bpy.data.objects[em.custom_active_object]:
-                    col = box.column(align =True)
-                    col.template_ID(tex, "image", open="image.open")
-                    row  = box.row(align=True)
-                    row.operator('object.applyimage', text="Apply image", icon = 'FILE_TICK')
-                    row.prop(em, "custom_c3d",text="", icon='CURSOR')
-                    row  = box.row(align =True)
-                    row.label(text="Location:")
-                    row  = box.row(align =True)
-                    row.prop(em,'custom_location', text='')
-                    row  = box.row(align =True)            
-                    row.prop(em,'custom_rotation')
-                    row.prop(em,'custom_rotc3d',text="",icon='MANIPUL')            
-                    row  = box.row(align =True)
-                    row.label(text="Scale:")
-                    row  = box.row(align =True) 
-                    if em.custom_linkscale :
-                        row.prop(em, "custom_propscale",text="")
-                        row.prop(em, "custom_linkscale",text="",icon='LINKED')
-                    else: 
-                        row.prop(em,'custom_scale',text='')
-                        row.prop(em, "custom_linkscale",text="",icon='UNLINKED')
-                    row.prop(em,'custom_scac3d',text="",icon='MANIPUL')                            
-                    row  = box.row(align =True)
-                    row.label(text="UV's Offset:")
-                    row  = box.row(align =True)
-                    row.prop(em,'custom_offsetuv',text='')
-                    row.prop(em, "custom_flipuvx",text="",icon='ARROW_LEFTRIGHT')   
-                    row.prop(em, "custom_flipuvy",text="",icon='FULLSCREEN_ENTER') 
-                    row  = box.row(align =True)
-                    row.label(text="UV's Scale:")
-                    row  = box.row(align =True)                            
-                    if em.custom_linkscaleuv:
-                        row.prop(em,'custom_propscaleuv',text='')
-                        row.prop(em, "custom_linkscaleuv",text="",icon='LINKED')
-                    else: 
-                        row.prop(em,'custom_scaleuv',text='')
-                        row.prop(em, "custom_linkscaleuv",text="",icon='UNLINKED')            
-                    
-                    if matBProjection:
-                        row = box.column(align =True)
-                        row.prop(matBProjection,'alpha', slider = True)
-                        row = box.column(align =True)
-    
-                if ob == bpy.data.objects[em.custom_active_object]:    
-                    for item in em.custom_props:
-                        box = layout.box()
-                        row = box.row()
-                        if item.custom_active:
-                            row.operator("object.active_view",text = "", icon='RADIOBUT_ON', emboss = False).index = item.custom_index 
-                        else:
-                            row.operator("object.active_view",text = "", icon='RADIOBUT_OFF', emboss = False).index = item.custom_index 
-                        row.prop(item, "custom_active_view", text="")        
-                        row.operator('object.remove_view', text="", icon = 'PANEL_CLOSE', emboss = False).index = item.custom_index
-                    row = layout.row()
-                    row.operator('object.create_view', text="Create View", icon = 'RENDER_STILL') 
-                else:
-                    col = box.column(align =True)
-                    col.operator("object.change_object", text="Change Object")       
-
-        else:
-            ob = context.object
-            col = layout.column(align = True)
-            
-            if ob.active_material is None:
-                col.label(text="Add a material first!", icon="ERROR")
-            elif ob.data.uv_textures.active is None:
-                col.label(text="Create UVMap first!!", icon="ERROR")
-            else:
-                col.operator("object.addbprojectionplane", text="Add BProjection plane")
-                col = layout.column(align = True)
-                col.prop(ob, "custom_sub",text="Subdivision level")
-                   
-
-# Oprerator Class to apply the image to the plane             
-class ApplyImage(Operator):
-    bl_idname = "object.applyimage"
-    bl_label = "Apply image"
-
-    def execute(self, context):        
-        applyimage(context)
-        
-        return {'FINISHED'}
-
-# Oprerator Class to make the 4 or 6 point and scale the plan
-class IntuitiveScale(Operator):
-    bl_idname = "object.intuitivescale"
-    bl_label = "Draw lines"
-
-    def invoke(self, context, event):
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        x = event.mouse_region_x
-        y = event.mouse_region_y                
-        if len(ob.grease_pencil.layers.active.frames) == 0: 
-            bpy.ops.gpencil.draw(mode='DRAW', stroke=[{"name":"", "pen_flip":False,
-                                                       "is_start":True, "location":(0, 0, 0),
-                                                       "mouse":(x,y), "pressure":1, "time":0}])
-        else:
-            if em.custom_linkscale:
-                nb_point = 4
-            else:
-                nb_point = 6
-                   
-            if len(ob.grease_pencil.layers.active.frames[0].strokes) < nb_point:
-                bpy.ops.gpencil.draw(mode='DRAW', stroke=[{"name":"", "pen_flip":False,
-                                                           "is_start":True, "location":(0, 0, 0),
-                                                           "mouse":(x,y), "pressure":1, "time":0}])
-                                                           
-            if len(ob.grease_pencil.layers.active.frames[0].strokes) == nb_point:
-                s = ob.grease_pencil.layers.active.frames[0]
-                v1 = s.strokes[1].points[0].co - s.strokes[0].points[0].co
-                if not em.custom_linkscale:
-                    v2 = s.strokes[4].points[0].co - s.strokes[3].points[0].co
-                else:
-                    v2 = s.strokes[3].points[0].co - s.strokes[2].points[0].co
-                propx = v1.x/v2.x                
-                em.custom_scale[0] *= abs(propx)
-                
-                if not em.custom_linkscale:
-                    v1 = s.strokes[2].points[0].co - s.strokes[0].points[0].co
-                    v2 = s.strokes[5].points[0].co - s.strokes[3].points[0].co
-                    propy = v1.y/v2.y
-                    em.custom_scale[1] *= abs(propy)
-                bpy.ops.gpencil.active_frame_delete()
-        
-        return {'FINISHED'}
-
-# Oprerator Class to configure all wath is needed
-class AddBProjectionPlane(Operator):
-    bl_idname = "object.addbprojectionplane"
-    bl_label = "Configure"
-    
-    def creatematerial(self, context):        
-        if 'Material for BProjection' not in [mat.name for mat in bpy.data.materials]:            
-            bpy.data.textures.new(name='Texture for BProjection',type='IMAGE')
-    
-            bpy.data.materials.new(name='Material for BProjection')
-            
-            matBProjection = bpy.data.materials['Material for BProjection']
-            matBProjection.texture_slots.add()
-            matBProjection.use_shadeless = True
-            matBProjection.use_transparency = True
-            matBProjection.active_texture = bpy.data.textures['Texture for BProjection']
-        
-            index = matBProjection.active_texture_index
-            matBProjection.texture_slots[index].texture_coords = 'UV'
-        
-        ob = context.object 
-        old_index = ob.active_material_index
-        bpy.ops.object.material_slot_add()
-        index = ob.active_material_index
-        ob.material_slots[index].material = bpy.data.materials['Material for BProjection']
-        bpy.ops.object.material_slot_assign()
-        ob.active_material_index = old_index
-        ob.data.update()
-            
-    def execute(self, context):    
-        if  BProjection_Empty not in [ob.name for ob in bpy.data.objects]:                
-            
-            cm = bpy.context.object.mode
-            '''tmp = context.object
-            for ob in (ob for ob in bpy.data.objects if ob.type == 'MESH' and ob.hide == False and context.scene in ob.users_scene):
-                context.scene.objects.active = ob
-                bpy.ops.object.mode_set(mode = cm, toggle=False) 
-            
-            context.scene.objects.active = tmp'''
-            bpy.ops.object.mode_set(mode = 'OBJECT', toggle=False)
-            
-            context.space_data.show_relationship_lines = False
-            
-            ob = context.object
-        
-            bpy.ops.object.add()
-            em = context.object
-            em.name = BProjection_Empty
-                        
-            context.scene.objects.active = ob
-            ob.select = True
-    
-            bpy.ops.object.editmode_toggle()
-    
-            bpy.ops.mesh.primitive_plane_add()
-            bpy.ops.object.vertex_group_assign(new = True)
-            ob.vertex_groups.active.name = 'texture plane'   
-            bpy.ops.uv.unwrap()
-            
-            bpy.ops.mesh.select_all(action='DESELECT')                                
-            bpy.ops.object.vertex_group_select()
-            
-            bpy.ops.object.editmode_toggle()
-            for i in range(4):
-                ob.data.edges[len(ob.data.edges)-1-i].crease = 1
-            bpy.ops.object.editmode_toggle()
-            
-            em.custom_sub = ob.custom_sub
-            if em.custom_sub > 0:
-                bpy.ops.mesh.subdivide(number_cuts = em.custom_sub)
-    
-            em.select = True
-            bpy.ops.object.hook_add_selob()
-            em.select = False
-            em.hide = True   
-                     
-            self.creatematerial(context)
-  
-          
-            bpy.ops.gpencil.data_add()
-            ob.grease_pencil.draw_mode = 'VIEW'
-            bpy.ops.gpencil.layer_add()
-            ob.grease_pencil.layers.active.color = [1.0,0,0]
-            
-            bpy.ops.object.editmode_toggle()
-            
-            bpy.ops.object.shape_key_add(from_mix = False)
-            
-            bpy.ops.object.create_view()
-            # ----------------------------------------------
-            # XXX, this isnt future proof, DON'T USE INDEX's - campbell                    
-            km = bpy.data.window_managers['WinMan'].keyconfigs['Blender'].keymaps['3D View']
-            km.keymap_items[3-1].idname = 'view3d.rotate_view3d'
-            km.keymap_items[21-1].idname = 'view3d.zoom_view3d'
-            km.keymap_items[21-1].properties.delta = 1.0
-            km.keymap_items[22-1].idname = 'view3d.zoom_view3d'
-            km.keymap_items[22-1].properties.delta = -1.0
-            km.keymap_items[4-1].idname = 'view3d.pan_view3d'
-            km.keymap_items[29-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[29-1].properties.view = 'FRONT'
-            km.keymap_items[31-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[31-1].properties.view = 'RIGHT'            
-            km.keymap_items[35-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[35-1].properties.view = 'TOP'
-            km.keymap_items[37-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[37-1].properties.view = 'BACK'
-            km.keymap_items[38-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[38-1].properties.view = 'LEFT'            
-            km.keymap_items[39-1].idname = 'view3d.preset_view3d'
-            km.keymap_items[39-1].properties.view = 'BOTTOM'                                   
-            km = context.window_manager.keyconfigs.default.keymaps['Image Paint']
-            kmi = km.keymap_items.new("object.intuitivescale", 'LEFTMOUSE', 'PRESS', shift=True)
-                        
-            align_to_view(context)
-            
-            context.space_data.cursor_location = em.location
-            
-            bpy.ops.object.mode_set(mode = cm, toggle=False)
-            bpy.data.objects[BProjection_Empty].custom_active_object = context.object.name
-            
-        return {'FINISHED'}
-
-# Oprerator Class to remove what is no more needed    
-class RemoveBProjectionPlane(Operator):
-    bl_idname = "object.removebprojectionplane"
-    bl_label = "Configure"
-
-    def removematerial(self, context):
-        ob = context.object 
-        i = 0
-
-        for ms in ob.material_slots:
-            if ms.name == BProjection_Material:
-                index = i
-            i+=1
-                
-        ob.active_material_index = index
-        bpy.ops.object.material_slot_remove()
-    
-    def execute(self, context):
-        try:               
-            cm = bpy.context.object.mode
-            bpy.ops.object.mode_set(mode = 'OBJECT', toggle=False)
-            
-            context.space_data.show_relationship_lines = True
-            
-            bpy.ops.object.modifier_remove(modifier="Hook-Empty for BProjection")
-            
-            self.removematerial(context)
-
-            ob = context.object
-    
-            bpy.ops.object.editmode_toggle()
-    
-            bpy.ops.mesh.reveal()
-                                   
-            bpy.ops.mesh.select_all(action='DESELECT')                    
-            
-            ob.vertex_groups.active_index = ob.vertex_groups['texture plane'].index
-            bpy.ops.object.vertex_group_select()
-            bpy.ops.mesh.delete()
-            bpy.ops.object.vertex_group_remove()
-    
-            bpy.ops.object.editmode_toggle()
-   
-            ob.select = False
-                
-            em = bpy.data.objects[BProjection_Empty]
-            context.scene.objects.active = em
-            em.hide = False
-            em.select = True
-            bpy.ops.object.delete()
-    
-            context.scene.objects.active = ob
-            ob.select = True
-            
-            reinitkey()
-                        
-            '''tmp = context.object
-            for ob in (ob for ob in bpy.data.objects if ob.type == 'MESH' and ob.hide == False and context.scene in ob.users_scene):
-                context.scene.objects.active = ob
-                bpy.ops.object.mode_set(mode = 'OBJECT', toggle=False) 
-            
-            context.scene.objects.active = tmp'''
-            ob = context.object           
-            
-            
-            for i in ob.data.shape_keys.key_blocks:
-                bpy.ops.object.shape_key_remove()
-            bpy.ops.object.shape_key_remove()
-               
-            bpy.ops.object.mode_set(mode = cm, toggle=False)
-            removecustomprops()
-                    
-        except:
-            nothing = 0
-        
-        return {'FINISHED'}
-
-def reinitkey():
-    km = bpy.data.window_managers['WinMan'].keyconfigs['Blender'].keymaps['3D View']
-    # ----------------------------------------------
-    # XXX, this isnt future proof, DON'T USE INDEX's - campbell
-    km.keymap_items[3-1].idname = 'view3d.rotate'
-    km.keymap_items[21-1].idname = 'view3d.zoom'
-    km.keymap_items[21-1].properties.delta = 1.0
-    km.keymap_items[22-1].idname = 'view3d.zoom'
-    km.keymap_items[22-1].properties.delta = -1.0
-    km.keymap_items[4-1].idname = 'view3d.move'
-    km.keymap_items[29-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[29-1].properties.type = 'FRONT'
-    km.keymap_items[31-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[31-1].properties.type = 'RIGHT'            
-    km.keymap_items[35-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[35-1].properties.type = 'TOP'
-    km.keymap_items[37-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[37-1].properties.type = 'BACK'
-    km.keymap_items[38-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[38-1].properties.type = 'LEFT'            
-    km.keymap_items[39-1].idname = 'view3d.viewnumpad'
-    km.keymap_items[39-1].properties.type = 'BOTTOM'            
-            
-    km = bpy.context.window_manager.keyconfigs.default.keymaps['Image Paint']
-    #to do
-    for kmi in (kmi for kmi in km.keymap_items if kmi.idname in {"object.intuitivescale", }):
-            km.keymap_items.remove(kmi)
-
-# Oprerator Class to remove what is no more needed    
-class ChangeObject(Operator):
-    bl_idname = "object.change_object"
-    bl_label = "Change Object"
-
-    def removematerial(self, context):
-        ob = context.object 
-        i = 0
-
-        for ms in ob.material_slots:
-            if ms.name == BProjection_Material:
-                index = i
-            i+=1
-                
-        ob.active_material_index = index
-        bpy.ops.object.material_slot_remove()
-    
-    def execute(self, context):
-            new_ob = context.object
-            em = bpy.data.objects[BProjection_Empty]              
-            context.scene.objects.active = bpy.data.objects[em.custom_active_object]
-            ob = context.object
-            if ob != new_ob:
-                cm = bpy.context.object.mode
-                bpy.ops.object.mode_set(mode = 'OBJECT', toggle=False)
-                
-                bpy.ops.object.modifier_remove(modifier="Hook-Empty for BProjection") 
-    
-                ob = context.object
-        
-                bpy.ops.object.editmode_toggle()
-        
-                bpy.ops.mesh.reveal()
-                                       
-                bpy.ops.mesh.select_all(action='DESELECT')                               
-                ob.vertex_groups.active_index = ob.vertex_groups['texture plane'].index
-                bpy.ops.object.vertex_group_select()
-                lo_b = [ob for ob in bpy.data.objects if ob.type == 'MESH']
-                bpy.ops.mesh.separate(type='SELECTED')
-                lo_a = [ob for ob in bpy.data.objects if ob.type == 'MESH']
-                bpy.ops.object.vertex_group_remove()
-                
-                for i in lo_b:
-                    lo_a.remove(i)
-                bplane = lo_a[0]
-                
-                bpy.ops.object.editmode_toggle()
-                
-                self.removematerial(context)
-                
-                bpy.ops.object.mode_set(mode = cm, toggle=False)
-                
-                shape_index = ob.active_shape_key_index
-                
-                for i in ob.data.shape_keys.key_blocks:
-                    bpy.ops.object.shape_key_remove()
-                bpy.ops.object.shape_key_remove()
-                
-                ob.select = False
-                
-                bplane.select = True            
-                context.scene.objects.active = bplane
-                for ms in (ms for ms in bplane.material_slots if ms.name != BProjection_Material):
-                    bplane.active_material = ms.material
-                    bpy.ops.object.material_slot_remove()
-                
-                for gs in (gs for gs in bplane.vertex_groups if gs.name != 'texture plane'):
-                    bplane.vertex_groups.active_index = gs.index
-                    bpy.ops.object.vertex_group_remove()
-              
-                context.scene.objects.active = new_ob
-                cm = new_ob.mode
-                bpy.ops.object.mode_set(mode = 'OBJECT', toggle=False) 
-                bpy.ops.object.join()
-    
-                em.hide = False
-                em.select = True
-                new_ob.select = False
-                bpy.ops.object.location_clear()
-                bpy.ops.object.rotation_clear()
-                bpy.ops.object.scale_clear()
-                context.scene.objects.active = new_ob
-                bpy.ops.object.editmode_toggle()            
-                bpy.ops.object.hook_add_selob()
-                bpy.ops.object.editmode_toggle()
-                em.hide = True
-                em.select = False
-                new_ob.select = True
-                em.custom_active_object = new_ob.name
-                tmp = em.custom_c3d
-                em.custom_c3d = False
-                bpy.ops.object.active_view(index = shape_index-1)
-                bpy.ops.object.mode_set(mode = cm, toggle=False)
-                        
-                sd = context.space_data
-                r3d = sd.region_3d 
-                vr = r3d.view_rotation.copy()
-                vr.invert()
-                ob_loc = ob.location.copy()            
-                new_ob_loc = new_ob.location.copy() 
-                ob_loc.rotate(vr)
-                new_ob_loc.rotate(vr)
-                em.custom_location += Vector((ob_loc.x - new_ob_loc.x, ob_loc.y - new_ob_loc.y, 0.0))
-                em.custom_c3d = tmp
-                    
-            return {'FINISHED'}
-
-# Oprerator Class to rotate the view3D
-class RotateView3D(Operator):
-    bl_idname = "view3d.rotate_view3d"
-    bl_label = "Rotate the View3D"
-    
-    first_mouse = Vector((0,0))
-
-    pan = Vector((0,0))
-
-    key = ['']
-    block = 0
- 
-    first_time = True
-    tmp_level = -1
-
-    def vect_sphere(self, context, mx, my):
-        width = context.area.regions[4].width
-        height = context.area.regions[4].height
-           
-        if width >= height:
-            ratio = height/width
-        
-            x = 2*mx/width
-            y = 2*ratio*my/height
-            
-            x = x - 1
-            y = y - ratio
-        else:
-            ratio = width/height
-        
-            x = 2*ratio*mx/width
-            y = 2*my/height
- 
-            x = x - ratio
-            y = y - 1
-        
-        z2 = 1 - x * x - y * y
-        if z2 > 0:
-            z= sqrt(z2)
-        else : z=0
-            
-        p = Vector((x, y, z))
-        p.normalize()
-        return p
-    
-    def tracball(self, context, mx, my, origine):
-        sd = context.space_data
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-            
-        vr_b = sd.region_3d.view_rotation.copy()
-        vr_b.invert()
-        pos_init = sd.region_3d.view_location - origine
-        sd.region_3d.view_location = origine
-        
-        v1 = self.vect_sphere(context, self.first_mouse.x, self.first_mouse.y)
-        v2 = self.vect_sphere(context, mx, my)
-                        
-        axis = Vector.cross(v1,v2);
-        angle = Vector.angle(v1,v2);
-            
-        q =  Quaternion(axis,-2*angle)
-                        
-        sd.region_3d.view_rotation *=q
-        sd.region_3d.update()
-        
-        vr_a = sd.region_3d.view_rotation.copy()                           
-        pos_init.rotate(vr_a*vr_b)            
-        sd.region_3d.view_location =  pos_init + origine
-        
-        self.first_mouse = Vector((mx, my))
-                
-    def modal(self, context, event):                                
-        ob = context.object
-        em = bpy.data.objects['Empty for BProjection'] 
-        reg = context.area.regions[4]        
-            
-                    
-        if event.type not in {'MOUSEMOVE','INBETWEEN_MOUSEMOVE'}:
-            self.pan = Vector((event.mouse_region_x, event.mouse_region_y))
-            self.key = [event.type]
-            self.block = 1
-            
-        if event.value == 'RELEASE':
-            return {'FINISHED'}
-
-        if event.type == 'MOUSEMOVE':                        
-            if self.block == 0:
-                self.tracball(context, event.mouse_region_x, event.mouse_region_y,ob.location)
-                align_to_view(context)
-                #to unlock the camera
-                if self.first_time:                    
-                    rot_ang = context.user_preferences.view.rotation_angle            
-                    context.user_preferences.view.rotation_angle = 0
-                    bpy.ops.view3d.view_orbit(type='ORBITLEFT')
-                    context.user_preferences.view.rotation_angle = rot_ang   
-                    bpy.ops.view3d.view_persportho()         
-                    bpy.ops.view3d.view_persportho()
-                    self.first_time = False
-            else:          
-                deltax = event.mouse_region_x - round(self.pan.x)
-                deltay = event.mouse_region_y - round(self.pan.y)          
-     
-                if 'G' in self.key:     
-                    sd = context.space_data              
-                    l =  sd.region_3d
-                    vr = l.view_rotation.copy()
-                    vr.invert()
-                    
-                    v_init = Vector((0.0,0.0,1.0))
-                    
-                    pos = [-deltax,-deltay]
-                    v = view3d_utils.region_2d_to_location_3d(context.region, l, pos, v_init)
-                    pos = [0,0]
-                    vbl = view3d_utils.region_2d_to_location_3d(context.region, l, pos, v_init)        
-                    loc = vbl - v 
-              
-                    loc.rotate(vr)
-                    em.custom_location += loc              
-                                       
-                if 'S' in self.key:                
-                    s = em.custom_scale
-                    if em.custom_linkscale:
-                        em.custom_propscale += deltax/20
-                    else:
-                        em.custom_scale = [s[0] + deltax/20, s[1] + deltay/20]
-                                              
-                if 'Z' in self.key:                
-                    em.custom_location.z+=deltax/10
-                          
-                if 'R' in self.key:
-                    em.custom_rotation+=deltax
-                        
-                if 'U' in self.key:
-                    suv = em.custom_scaleuv
-                    if em.custom_linkscaleuv:    
-                        em.custom_propscaleuv += deltax/50
-                    else:
-                        em.custom_scaleuv= [suv[0] + deltax/50 , suv[1] + deltay/50]               
-    
-                if 'Y' in self.key:       
-                    ouv = em.custom_offsetuv
-                    em.custom_offsetuv = [ouv[0] - deltax/50,ouv[1] - deltay/50] 
-    
-                self.pan = Vector((event.mouse_region_x, event.mouse_region_y))
-                
-                        
-        elif event.type == 'MIDDLEMOUSE'and event.value == 'RELEASE':
-            if self.tmp_level > -1:
-                for sub in context.object.modifiers:
-                    if sub.type in ['SUBSURF','MULTIRES']:
-                        sub.levels = self.tmp_level   
-            
-            return {'FINISHED'}
-        
-        if 'C' in self.key:
-            clear_props(context)
-        
-        if 'O' in self.key:
-            bpy.ops.object.change_object()           
-        return {'RUNNING_MODAL'}
-    
-    def execute(self, context):        
-        align_to_view(context)  
-        
-        return{'FINISHED'}
-
-    def invoke(self, context, event):
-        bpy.data.objects['Empty for BProjection']
-        context.window_manager.modal_handler_add(self)
-        self.first_mouse = Vector((event.mouse_region_x,event.mouse_region_y))
-        self.first_time = True
-        for sub in context.object.modifiers:
-            if sub.type in ['SUBSURF', 'MULTIRES']:
-                self.tmp_level = sub.levels
-                sub.levels = 0
-        return {'RUNNING_MODAL'}
-            
-
-# Oprerator Class to pan the view3D
-class PanView3D(bpy.types.Operator):
-    bl_idname = "view3d.pan_view3d"
-    bl_label = "Pan View3D"
-    
-    first_mouse = Vector((0,0))
-    tmp_level = -1
-
-    def modal(self, context, event):
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        width = context.area.regions[4].width
-        height = context.area.regions[4].height
-
-        deltax = event.mouse_region_x - self.first_mouse.x
-        deltay = event.mouse_region_y - self.first_mouse.y                
-        
-        sd = context.space_data              
-        r3d =  sd.region_3d
-        vr = r3d.view_rotation.copy()
-        vr.invert()
-        
-        v_init = Vector((0.0,0.0,1.0))
-        
-        pos = [deltax,deltay]
-        v = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init)
-        pos = [0,0]
-        vbl = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init)        
-        loc = vbl - v       
-        sd.region_3d.view_location += loc         
-        loc.rotate(vr)
-        em.custom_location += loc
-
-        self.first_mouse.x = event.mouse_region_x
-        self.first_mouse.y = event.mouse_region_y
-
-        if event.type == 'MIDDLEMOUSE'and event.value == 'RELEASE':
-            if self.tmp_level > -1:
-                for sub in context.object.modifiers:
-                    if sub.type in ['SUBSURF','MULTIRES']:
-                        sub.levels = self.tmp_level
-            return {'FINISHED'}
-        
-        return {'RUNNING_MODAL'}
-                
-    def invoke(self, context, event):
-        bpy.data.objects['Empty for BProjection']    
-        context.window_manager.modal_handler_add(self)
-        self.first_mouse.x = event.mouse_region_x
-        self.first_mouse.y = event.mouse_region_y   
-        for sub in context.object.modifiers:
-            if sub.type in ['SUBSURF', 'MULTIRES']:
-                self.tmp_level = sub.levels
-                sub.levels = 0  
-                      
-        return {'RUNNING_MODAL'}
-        
-    def execute(self, context):        
-        align_to_view(context)  
-        
-        return{'FINISHED'}
-
-# Oprerator Class to zoom the view3D
-class ZoomView3D(Operator):
-    bl_idname = "view3d.zoom_view3d"
-    bl_label = "Zoom View3D"
-
-    delta = FloatProperty(
-        name="delta",
-        description="Delta",
-        min=-1.0, max=1,
-        default=1.0)
-
-    def invoke(self, context, event):                   
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        sd = context.space_data
-
-        width = context.area.regions[4].width
-        height = context.area.regions[4].height              
-                    
-        r3d =  sd.region_3d
-        v_init = Vector((0.0,0.0,1.0))
-
-        pos = [width,height]
-        vtr_b = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init)
-        pos = [0,0]
-        vbl_b = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init)
-        len_b = vtr_b - vbl_b
-       
-        bpy.ops.view3d.zoom(delta = self.delta)
-        r3d.update()
-
-        pos = [width,height]
-        vtr_a = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init)
-        pos = [0,0]
-        vbl_a = view3d_utils.region_2d_to_location_3d(context.region, r3d, pos, v_init) 
-        len_a = vtr_a - vbl_a
-        
-        fac = len_a.length/len_b.length
-        r3d.view_location -= ob.location
-        r3d.view_location *= fac
-        r3d.view_location += ob.location
-        vres = Vector((em.custom_location.x*fac,em.custom_location.y*fac,em.custom_location.z))
-        em.custom_location = vres
-        
-        
-        align_to_view(context)
-        
-        return {'FINISHED'}
-
-    def execute(self, context):        
-        align_to_view(context)
-        
-        return{'FINISHED'}
-
-# Oprerator Class to use numpad shortcut
-class PresetView3D(Operator):
-    bl_idname = "view3d.preset_view3d"
-    bl_label = "Preset View3D"
-
-    view = StringProperty(name="View", description="Select the view", default='TOP')
-    def invoke(self, context, event):                   
-        ob = context.object
-        em = bpy.data.objects[BProjection_Empty]
-        origine = ob.location
-        sd = context.space_data
-
-        vr_b = sd.region_3d.view_rotation.copy()
-        vr_b.invert()
-        pos_init = sd.region_3d.view_location - origine
-        sd.region_3d.view_location = origine
-
-        tmp = context.user_preferences.view.smooth_view
-        context.user_preferences.view.smooth_view = 0
-        bpy.ops.view3d.viewnumpad(type=self.view)
-        align_to_view(context)        
-        context.user_preferences.view.smooth_view = tmp
-
-        vr_a = sd.region_3d.view_rotation.copy()                           
-        pos_init.rotate(vr_a*vr_b)            
-        sd.region_3d.view_location =  pos_init + origine              
-                    
-        return {'FINISHED'}
-
- at persistent
-def load_handler(dummy):
-    reinitkey()
-
-def register():
-    bpy.utils.register_module(__name__)
-    createcustomprops(bpy.context)
-    bpy.app.handlers.load_post.append(load_handler)
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/space_view3d_quickPrefs.py b/release/scripts/addons_contrib/space_view3d_quickPrefs.py
deleted file mode 100644
index 0a82e48..0000000
--- a/release/scripts/addons_contrib/space_view3d_quickPrefs.py
+++ /dev/null
@@ -1,900 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    'name': "QuickPrefs",
-    'author': "Sean Olson",
-    'version': (2,1),
-    'blender': (2, 6, 4),
-    'location': "3DView->Properties Panel (N-Key)",
-    'description': "Add often changed User Preference options to Properties panel.",
-    'warning': "",
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-                "Scripts/3D_interaction/QuickPrefs",
-    'tracker_url': "http://projects.blender.org/tracker/index.php?"\
-                   "func=detail&aid=27822",
-    'category': "3D View"}
-
-import os
-    
-import bpy
-from bpy.types import Menu, Panel
-from rna_prop_ui import PropertyPanel
-from bpy.app.handlers import persistent
-
-import bpy_extras
-
-#Global Variables
-recursive  = False
-renaming   = True
-lastindex  = 0
-lastname   = ""
-debug = 0
-defaultfilepath=os.path.join(bpy.utils.script_paths(subdir="addons")[0], "quickprefpresets")
-
-
-##########################################
-####### Import/Export Functions ##########
-##########################################
-
-#import all grabs all files in the given directory and imports them
- at persistent
-def gllightpreset_importall():
-    path = bpy.context.scene.gllightpreset_importdirectory
-    directorylisting = os.listdir(path)
-
-    for infile in directorylisting:
-        if not os.path.isdir(infile):           #check if the file is a directory
-            if '.preset' in infile:                     #check that this is a .preset file
-                thefile=os.path.join(path, infile)      #join the filename with the path
-                gllightpreset_importsingle(thefile)     #import it!
-       
-#import single takes a given filename and imports it
-def gllightpreset_importsingle(filename):
-    
-    if not os.path.isdir(filename):           #check if the file is a directory
-        if '.preset' in filename:               #check to make sure this is a preset file
-            readfile=open(filename, 'r')
-            
-            name=readfile.readline()
-            name=name[:-1]
-            
-            illuminationString0=readfile.readline()
-            illuminationString0=illuminationString0[:-1]
-            
-            if illuminationString0=="True":
-                illumination0=True
-            else:
-                illumination0=False
-           
-            illuminationString1=readfile.readline()
-            illuminationString1=illuminationString1[:-1]
-            if illuminationString1=="True":
-                illumination1=True
-            else:
-                illumination1=False
-                
-            illuminationString2=readfile.readline()
-            illuminationString2=illuminationString2[:-1]
-            if illuminationString2=="True":
-                illumination2=True
-            else:
-                illumination2=False
-            
-            #convert strings to booleans
-
-            str=readfile.readline()
-            strArray=str.split()
-            direction0x=strArray[0]
-            direction0y=strArray[1]
-            direction0z=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            direction1x=strArray[0]
-            direction1y=strArray[1]
-            direction1z=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            direction2x=strArray[0]
-            direction2y=strArray[1]
-            direction2z=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            diffuse0r=strArray[0]
-            diffuse0g=strArray[1]
-            diffuse0b=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            diffuse1r=strArray[0]
-            diffuse1g=strArray[1]
-            diffuse1b=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            diffuse2r=strArray[0]
-            diffuse2g=strArray[1]
-            diffuse2b=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            spec0r=strArray[0]
-            spec0g=strArray[1]
-            spec0b=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            spec1r=strArray[0]
-            spec1g=strArray[1]
-            spec1b=strArray[2]
-
-            str=readfile.readline()
-            strArray=str.split()
-            spec2r=strArray[0]
-            spec2g=strArray[1]
-            spec2b=strArray[2]
-            
-            #set the variables
-            system=bpy.context.user_preferences.system
-            system.solid_lights[0].use=illumination0
-            system.solid_lights[1].use=illumination1
-            system.solid_lights[2].use=illumination2
-
-            system.solid_lights[0].direction = (float(direction0x), float(direction0y), float(direction0z))
-            system.solid_lights[1].direction = (float(direction1x), float(direction1y), float(direction1z))
-            system.solid_lights[2].direction = (float(direction2x), float(direction2y), float(direction2z))
-
-            system.solid_lights[0].diffuse_color=(float(diffuse0r), float(diffuse0g), float(diffuse0b))
-            system.solid_lights[1].diffuse_color=(float(diffuse1r), float(diffuse1g), float(diffuse1b))
-            system.solid_lights[2].diffuse_color=(float(diffuse2r), float(diffuse2g), float(diffuse2b))
-
-            system.solid_lights[0].specular_color=(float(spec0r), float(spec0g), float(spec0b))
-            system.solid_lights[1].specular_color=(float(spec1r), float(spec1g), float(spec1b))
-            system.solid_lights[2].specular_color=(float(spec2r), float(spec2g), float(spec2b))
-            gllightpreset_add(name)
-            gllightpreset_save()
-
-#Export all exports the entire contents of your presets list to the given file    
- at persistent     
-def gllightpreset_exportall(context):
-   for i in range(len(bpy.context.scene.gllightpreset)):
-        gllightpreset_exportsingle(i, True)
-             
-    
-def gllightpreset_exportsingle(index, multiimport):
-    scn=bpy.context.scene
-    name=scn.gllightpreset[index].name
-    
-    illuminatedBool0=scn.gllightpreset[index].illuminated0
-    illuminatedBool1=scn.gllightpreset[index].illuminated1
-    illuminatedBool2=scn.gllightpreset[index].illuminated2
-    
-    #illuminations
-    if illuminatedBool0==True:
-        illuminated0="True"
-    else:
-        illuminated0="False"
-    
-    if illuminatedBool1==True:
-        illuminated1="True"
-    else:
-        illuminated1="False"
-        
-    if illuminatedBool2==True:
-        illuminated2="True"
-    else:
-        illuminated2="False"
-        
-    #direction light0
-    dirx=str(scn.gllightpreset[index].direction0[0])
-    diry=str(scn.gllightpreset[index].direction0[1])
-    dirz=str(scn.gllightpreset[index].direction0[2])
-    direction0=dirx + " " + diry + " " + dirz + " "
-    
-    #direction light1
-    dirx=str(scn.gllightpreset[index].direction1[0])
-    diry=str(scn.gllightpreset[index].direction1[1])
-    dirz=str(scn.gllightpreset[index].direction1[2])
-    direction1=dirx + " " + diry + " " + dirz + " "
-    
-    #direction light2
-    dirx=str(scn.gllightpreset[index].direction2[0])
-    diry=str(scn.gllightpreset[index].direction2[1])
-    dirz=str(scn.gllightpreset[index].direction2[2])
-    direction2=dirx + " " + diry + " " + dirz + " "
-    
-    #diffuse light0
-    difr=str(scn.gllightpreset[index].diffuse0[0])
-    difg=str(scn.gllightpreset[index].diffuse0[1])
-    difb=str(scn.gllightpreset[index].diffuse0[2])
-    diffuse0=difr + " " + difg + " " + difb + " "
-    
-    #diffuse light1
-    difr=str(scn.gllightpreset[index].diffuse1[0])
-    difg=str(scn.gllightpreset[index].diffuse1[1])
-    difb=str(scn.gllightpreset[index].diffuse1[2])
-    diffuse1=difr + " " + difg + " " + difb + " "
-    
-    #diffuse light2
-    difr=str(scn.gllightpreset[index].diffuse2[0])
-    difg=str(scn.gllightpreset[index].diffuse2[1])
-    difb=str(scn.gllightpreset[index].diffuse2[2])
-    diffuse2=difr + " " + difg + " " + difb + " "
-    
-    #specular light 0
-    specr=str(scn.gllightpreset[index].specular0[0])
-    specg=str(scn.gllightpreset[index].specular0[1])
-    specb=str(scn.gllightpreset[index].specular0[2])
-    specular0=specr + " " + specg + " " + specb + " "
-    
-    #specular light 1
-    specr=str(scn.gllightpreset[index].specular1[0])
-    specg=str(scn.gllightpreset[index].specular1[1])
-    specb=str(scn.gllightpreset[index].specular1[2])
-    specular1=specr + " " + specg + " " + specb + " "
-    
-    #specular light 2
-    specr=str(scn.gllightpreset[index].specular2[0])
-    specg=str(scn.gllightpreset[index].specular2[1])
-    specb=str(scn.gllightpreset[index].specular2[2])
-    specular2=specr + " " + specg + " " + specb + " "
-    
-    printstring=name+"\n"
-    printstring+=illuminated0 +"\n"+ illuminated1 +"\n"+ illuminated2+"\n"
-    printstring+=direction0  +"\n"+ direction1 +"\n"+ direction2 +"\n"
-    printstring+=diffuse0+"\n"+diffuse1 +"\n"+ diffuse2 +"\n"
-    printstring+=specular0+"\n"+specular1+"\n"+specular2+"\n"
-
-    if multiimport==True:
-        filepath = scn.gllightpreset_exportdirectory
-    else:
-        filepath = scn.gllightpreset_exportfile
-
-    if not os.path.exists(filepath):
-        os.mkdir(filepath)
-    filepath=os.path.join(filepath, (name+".preset"))        
-    writefile = open(filepath, 'w') 
-    writefile.write(printstring) 
-
-##########################################
-####### General  Presets Functions #######
-##########################################
-
-def gllightpreset_addPresets():
-    print('in addPresets')
-    system=bpy.context.user_preferences.system
-  
-    system.solid_lights[0].use=True
-    system.solid_lights[1].use=True
-    system.solid_lights[2].use=True
-  
-    system.solid_lights[0].direction = (-0.8920, 0.3000, 0.8999)
-    system.solid_lights[1].direction = (0.5880, 0.4600, 0.2480)
-    system.solid_lights[2].direction = (0.2159, -0.3920, -0.2159)
-    
-    system.solid_lights[0].diffuse_color=(0.8000, 0.8000, 0.8000)
-    system.solid_lights[1].diffuse_color=(0.4980, 0.5000, 0.6000)
-    system.solid_lights[2].diffuse_color=(0.7980, 0.8379, 1.0)
-    
-    system.solid_lights[0].specular_color=(0.5, 0.5, 0.5)
-    system.solid_lights[1].specular_color=(0.2000, 0.2, 0.2)
-    system.solid_lights[2].specular_color=(0.0659, 0.0, 0.0)
-    gllightpreset_add("(Default)")
-    gllightpreset_save()
-    
-    system.solid_lights[0].use=True
-    system.solid_lights[1].use=True
-    system.solid_lights[2].use=True
-    
-    system.solid_lights[0].direction = (-0.3207, 0.4245, 0.8466)
-    system.solid_lights[1].direction = (0.4259, -0.0555, 0.9030)
-    system.solid_lights[2].direction = (-0.4485, 0.2400, -0.8609)
-    
-    system.solid_lights[0].diffuse_color=(0.4292, 0.0457, 0.0457)
-    system.solid_lights[1].diffuse_color=(0.7873, 0.4424, 0.2893)
-    system.solid_lights[2].diffuse_color=(0.7483, 0.7168, 0.6764)
-    
-    system.solid_lights[0].specular_color=(0.2000, 0.2000, 0.2000)
-    system.solid_lights[1].specular_color=(0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color=(0.0, 0.0, 0.0)
-    gllightpreset_add("Orange Clay")
-    gllightpreset_save()
-    
-    system.solid_lights[0].use=True
-    system.solid_lights[1].use=True
-    system.solid_lights[2].use=True
-    
-    system.solid_lights[0].direction=(-0.06666, 0.8222, 0.5652)
-    system.solid_lights[1].direction=(-0.8555, 0.1111, 0.5056)
-    system.solid_lights[2].direction=(0.9000, 0.1555, 0.4071)
-    
-    system.solid_lights[0].diffuse_color=(0.1000, 0.1000, 0.1000)
-    system.solid_lights[1].diffuse_color=(1.0, 0.9734, 0.8713)
-    system.solid_lights[2].diffuse_color=(0.7835, 0.9215, 1.0)
-    
-    system.solid_lights[0].specular_color=(0.0, 0.0, 0.0)
-    system.solid_lights[1].specular_color=(0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color=(0.0, 0.0, 0.0)
-    gllightpreset_add("Softblend")
-    gllightpreset_save()
-    
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = True
-    system.solid_lights[2].use = True
-
-    system.solid_lights[0].direction = (0.3666, 0.2888, 0.8843)
-    system.solid_lights[1].direction = (0.1111, 0.0888, 0.9898)
-    system.solid_lights[2].direction = (-0.5142, 0.5142, -0.6864)
-
-    system.solid_lights[0].diffuse_color = (0.6618, 0.5481, 0.5054)
-    system.solid_lights[1].diffuse_color = (0.3672, 0.2371, 0.1752)
-    system.solid_lights[2].diffuse_color = (1.0, 0.9574, 0.9058)
-
-    system.solid_lights[0].specular_color = (0.4969, 0.4886, 0.4820)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (1.0, 1.0, 1.0)
-    gllightpreset_add("Skin")
-    gllightpreset_save()
-
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = False
-    system.solid_lights[2].use = False
-
-    system.solid_lights[0].direction = (0.0111, 0.4000, 0.9164)
-    system.solid_lights[1].direction = (0.1111, 0.0888, 0.9898)
-    system.solid_lights[2].direction = (-0.5142, 0.5142, -0.6864)
-
-    system.solid_lights[0].diffuse_color = (1.0, 0.5912, 0.4148)
-    system.solid_lights[1].diffuse_color = (0.4962, 0.4962, 0.4962)
-    system.solid_lights[2].diffuse_color = (1.0, 0.9574, 0.9058)
-
-    system.solid_lights[0].specular_color = (0.2036, 0.4206, 0.7873)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (1.0, 1.0, 1.0)
-    gllightpreset_add("Candy")
-    gllightpreset_save();
-    
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = True
-    system.solid_lights[2].use = True
-
-    system.solid_lights[0].direction = (-0.6124, 0.6046, 0.5092)
-    system.solid_lights[1].direction = (0.1627, 0.5271, 0.8340)
-    system.solid_lights[2].direction = (-0.5858, 0.7811, -0.2160)
-
-    system.solid_lights[0].diffuse_color = (0.0, 0.3564, 0.4292)
-    system.solid_lights[1].diffuse_color = (0.7873, 0.0038, 0.7197)
-    system.solid_lights[2].diffuse_color = (0.1994, 0.2014, 0.2330)
-
-    system.solid_lights[0].specular_color = (0.0946, 0.0946, 0.0946)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (0.0, 0.0, 0.0)
-    gllightpreset_add("Purpleboogers.com")
-    gllightpreset_save();
-    
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = False
-    system.solid_lights[2].use = False
-
-    system.solid_lights[0].direction = (0.0111, 0.4000, 0.9164)
-    system.solid_lights[1].direction = (0.1111, 0.0888, 0.9898)
-    system.solid_lights[2].direction = (-0.5142, 0.5142, -0.6864)
-
-    system.solid_lights[0].diffuse_color = (0.8000, 0.8000, 0.8000)
-    system.solid_lights[1].diffuse_color = (0.4962, 0.4962, 0.4962)
-    system.solid_lights[2].diffuse_color = (1.0, 0.9574, 0.9058)
-
-    system.solid_lights[0].specular_color = (0.4540, 0.4540, 0.4540)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (1.0, 1.0, 1.0)
-    gllightpreset_add("Dark Gray")
-    gllightpreset_save()
-
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = False
-    system.solid_lights[2].use = False
-
-    system.solid_lights[0].direction = (0.0333, 0.2444, 0.9690)
-    system.solid_lights[1].direction = (0.1111, 0.08888, 0.9898)
-    system.solid_lights[2].direction = (-0.5142, 0.5142, -0.6864)
-
-    system.solid_lights[0].diffuse_color = (0.8000, 0.6670, 0.6020)
-    system.solid_lights[1].diffuse_color = (0.4962, 0.4962, 0.4962)
-    system.solid_lights[2].diffuse_color = (1.0, 0.9574, 0.9058)
-
-    system.solid_lights[0].specular_color = (0.3281, 0.3281, 0.3281)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (1.0, 1.0, 1.0)
-    gllightpreset_add("Turntable")
-    gllightpreset_save()
-
-    system.solid_lights[0].use = True
-    system.solid_lights[1].use = True
-    system.solid_lights[2].use = True
-
-    system.solid_lights[0].direction = (-0.2555, 0.5444, 0.7989)
-    system.solid_lights[1].direction = (0.5666, -0.7333, 0.3756)
-    system.solid_lights[2].direction = (-0.5142, 0.5142, -0.6864)
-
-    system.solid_lights[0].diffuse_color = (1.0, 0.9475, 0.3194)
-    system.solid_lights[1].diffuse_color = (0.3851, 0.2978, 0.1612)
-    system.solid_lights[2].diffuse_color = (1.0, 1.0, 1.0)
-
-    system.solid_lights[0].specular_color = (0.2740, 0.2740, 0.2740)
-    system.solid_lights[1].specular_color = (0.0, 0.0, 0.0)
-    system.solid_lights[2].specular_color = (0.0, 0.0, 0.0)
-    gllightpreset_add("Yellow Clay")
-    gllightpreset_save()
-    print('exit addpresets')
-##########################################
-####### LightPreset Functions #######
-##########################################
-
-def gllightpreset_name(self, context):
-    global recursive
-    global renaming
-    global lastname
-    if recursive==True: return
-    recursive=True
-
-    tmp=self.name
-    self.name=self.name+"@temporaryname"
-    self.name=gllightpreset_checkname(tmp)
-    tmp=self.name
-    if renaming==True: gllightpreset_rename(lastname, tmp)
-    #gllightpreset_sort()
-
-    recursive=False
-    
-def gllightpreset_checkname(name):
-    collection=bpy.context.scene.gllightpreset
-    if name=="": name="Preset"
-
-    if not name in collection:
-        return name
-
-    pos = name.rfind(".")
-    if pos==-1:
-        name=name+".001"
-        pos=len(name)-4
-
-    for i in range(1, 1000):
-        nr="00"+str(i)
-        tmp=name[:pos+1]+nr[len(nr)-3:]
-        if not tmp in collection:
-            return tmp        
-    return "Preset.???"
-    
-def gllightpreset_rename(old, new):
-    for o in bpy.context.scene.objects:
-        if o.get("gllightpreset", "Default")==old:
-            o.gllightpreset=new
-
- at persistent            
-def gllightpreset_index(self, context):
-    global recursive
-    if recursive==True: return
-    recursive=True
-
-    scene=bpy.context.scene
-    if scene.gllightpreset_index > len(scene.gllightpreset)-1:
-        scene.gllightpreset_index = len(scene.gllightpreset)-1
-
-    recursive=False
-
-def gllightpreset_add(name=""):
-    global renaming
-    renaming=False
-
-    entry=bpy.context.scene.gllightpreset.add()
-    bpy.context.scene['gllightpreset_index']=len(bpy.context.scene.gllightpreset)-1
-    entry.name=gllightpreset_checkname(name)
-    
-    renaming=True
-    gllightpreset_save()
-       
-def gllightpreset_delete():
-    index=bpy.context.scene.gllightpreset_index
-    name=bpy.context.scene.gllightpreset[index].name
-    
-    for o in bpy.context.scene.objects:
-        if o.get("gllightpreset", "Default")==name:
-            o.gllightpreset="Default"
-    
-    bpy.context.scene.gllightpreset.remove(index)
-   
-    
-def gllightpreset_save():
-    index=bpy.context.scene.gllightpreset_index
-    name=bpy.context.scene.gllightpreset[index].name
-    
-    bpy.context.scene.gllightpreset[index].illuminated0 = bpy.context.user_preferences.system.solid_lights[0].use
-    bpy.context.scene.gllightpreset[index].illuminated1 = bpy.context.user_preferences.system.solid_lights[1].use
-    bpy.context.scene.gllightpreset[index].illuminated2 = bpy.context.user_preferences.system.solid_lights[2].use
-    
-    bpy.context.scene.gllightpreset[index].direction0 = bpy.context.user_preferences.system.solid_lights[0].direction
-    bpy.context.scene.gllightpreset[index].direction1 = bpy.context.user_preferences.system.solid_lights[1].direction
-    bpy.context.scene.gllightpreset[index].direction2 = bpy.context.user_preferences.system.solid_lights[2].direction
-    
-    bpy.context.scene.gllightpreset[index].diffuse0 = bpy.context.user_preferences.system.solid_lights[0].diffuse_color
-    bpy.context.scene.gllightpreset[index].diffuse1 = bpy.context.user_preferences.system.solid_lights[1].diffuse_color
-    bpy.context.scene.gllightpreset[index].diffuse2 = bpy.context.user_preferences.system.solid_lights[2].diffuse_color
-    
-    bpy.context.scene.gllightpreset[index].specular0 = bpy.context.user_preferences.system.solid_lights[0].specular_color
-    bpy.context.scene.gllightpreset[index].specular1 = bpy.context.user_preferences.system.solid_lights[1].specular_color
-    bpy.context.scene.gllightpreset[index].specular2 = bpy.context.user_preferences.system.solid_lights[2].specular_color
-        
-#select the current light    
-def gllightpreset_select():
-    index=bpy.context.scene.gllightpreset_index
-    name=bpy.context.scene.gllightpreset[index].name
-    
-    bpy.context.user_preferences.system.solid_lights[0].use=bpy.context.scene.gllightpreset[index].illuminated0
-    bpy.context.user_preferences.system.solid_lights[1].use=bpy.context.scene.gllightpreset[index].illuminated1
-    bpy.context.user_preferences.system.solid_lights[2].use=bpy.context.scene.gllightpreset[index].illuminated2
-    
-    bpy.context.user_preferences.system.solid_lights[0].direction=bpy.context.scene.gllightpreset[index].direction0
-    bpy.context.user_preferences.system.solid_lights[1].direction=bpy.context.scene.gllightpreset[index].direction1
-    bpy.context.user_preferences.system.solid_lights[2].direction=bpy.context.scene.gllightpreset[index].direction2
-    
-    bpy.context.user_preferences.system.solid_lights[0].diffuse_color=bpy.context.scene.gllightpreset[index].diffuse0
-    bpy.context.user_preferences.system.solid_lights[1].diffuse_color=bpy.context.scene.gllightpreset[index].diffuse1
-    bpy.context.user_preferences.system.solid_lights[2].diffuse_color=bpy.context.scene.gllightpreset[index].diffuse2
-    
-    bpy.context.user_preferences.system.solid_lights[0].specular_color=bpy.context.scene.gllightpreset[index].specular0
-    bpy.context.user_preferences.system.solid_lights[1].specular_color=bpy.context.scene.gllightpreset[index].specular1
-    bpy.context.user_preferences.system.solid_lights[2].specular_color=bpy.context.scene.gllightpreset[index].specular2
-    
-#sort alphabetically
-def gllightpreset_sort():
-    collection=bpy.context.scene.gllightpreset
-    count=len(collection)
-    for i in range(0, count):
-        for j in range(i+1, count):
-            if collection[i].name > collection[j].name:
-                collection.move(j, i)
-
-#Add default setting
-def gllightpreset_addDefault():
-    print('adding default presets')  
-    gllightpreset_addPresets()
-    gllightpreset_sort();
-    bpy.context.scene['gllightpreset_index']=0
-    gllightpreset_select()
-
-##########################################
-####### Persistant functions##############
-##########################################       
-
-
-#This function decides where to load presets from - The order goes: BPY>File>Defaults
- at persistent
-def gllightpreset_chooseLoadLocation(context):
-
-    filepath=bpy.context.scene.gllightpreset_importdirectory
-
-    print(bpy.context.scene.gllightpreset)
-
-    if len(bpy.context.scene.gllightpreset)==0:                 #is it in bpy?
-          if not os.path.exists(filepath):                      #is it in the folder?
-               print('quickprefs: loading default presets')
-               gllightpreset_addDefault()                       #it's not, add the default
-          else:                                                 #the folder exists
-               directorylisting = os.listdir(filepath)
-               if len(directorylisting)==0:                     #is the folder empty?
-                    print('quickprefs: loading default presets')
-                    gllightpreset_addDefault()                  #the folder is empty, add default
-               else:                                            #the folder is not empty
-                    print('quickprefs: loading preset folder')
-                    gllightpreset_loadpresets(1)                #go ahead and load it    
-    print('quickprefs: loading from bpy')
-
-#This function scans for changes of the index of the selected preset and updates the selection if needed
- at persistent
-def gllightpreset_scan(context):
-    global lastindex
-    if debug==0:
-        if lastindex!=bpy.context.scene['gllightpreset_index']:
-            lastindex=bpy.context.scene['gllightpreset_index']
-            gllightpreset_select()
-
-#This function loads all the presets from a given folder (stored in bpy)
- at persistent
-def gllightpreset_loadpresets(context):
-       gllightpreset_importall()
-       bpy.context.scene['gllightpreset_index']=0
-       gllightpreset_select()
-           
-##########################################
-####### GUI ##############################
-##########################################
-
-#This function defines the layout of the openGL lamps
-def opengl_lamp_buttons(column, lamp):
-    split = column.split(percentage=0.1)
-
-    split.prop(lamp, "use", text="", icon='OUTLINER_OB_LAMP' if lamp.use else 'LAMP_DATA')
-
-    col = split.column()
-    col.active = lamp.use
-    row = col.row()
-    row.label(text="Diffuse:")
-    row.prop(lamp, "diffuse_color", text="")
-    row = col.row()
-    row.label(text="Specular:")
-    row.prop(lamp, "specular_color", text="")
-
-    col = split.column()
-    col.active = lamp.use
-    col.prop(lamp, "direction", text="")
-
-class gllightpreset(bpy.types.PropertyGroup):
-
-    props=bpy.props
-    name = props.StringProperty(update=gllightpreset_name)
-    
-    illuminated0 = props.BoolProperty(default = True)
-    illuminated1 = props.BoolProperty(default = True)
-    illuminated2 = props.BoolProperty(default = True)
-    
-    direction0 = props.FloatVectorProperty(name="",  default=(-0.8920, 0.3000, 0.8999))
-    direction1 = props.FloatVectorProperty(name="",  default=(0.5880, 0.4600, 0.2480))
-    direction2 = props.FloatVectorProperty(name="",  default=(0.2159, -0.3920, -0.2159))
-    
-    diffuse0 = props.FloatVectorProperty(name="",  default=(0.8000, 0.8000, 0.8000))
-    diffuse1 = props.FloatVectorProperty(name="",  default=(0.4980, 0.5000, 0.6000))
-    diffuse2 = props.FloatVectorProperty(name="",  default=(0.7980, 0.8379, 1.0))
-    
-    specular0 = props.FloatVectorProperty(name="",  default=(0.5, 0.5, 0.5))
-    specular1 = props.FloatVectorProperty(name="",  default=(0.2000, 0.2000, 0.2000))
-    specular2 = props.FloatVectorProperty(name="",  default=(0.0659, 0.0, 0.0))
-
-    count = props.IntProperty(name="", default=0)
-    count2 = props.IntProperty(name="", default=0)
-
-class SCENE_OT_gllightpreset(bpy.types.Operator):
-    bl_label ="Preset Action"
-    bl_idname="gllightpreset.action"
-
-    #alias
-    
-
-    button=bpy.props.StringProperty(default="")
-
-    def execute(self, context):
-        scn=bpy.context.scene
-        button=self.button
-           
-        
-        if   button=="add":
-            gllightpreset_add()
-        elif button=="delete":   
-            if len(scn.gllightpreset)>1:
-                gllightpreset_delete()
-            else:
-                self.report({'INFO'}, "Must have at least 1 Preset")
-                
-        elif button=="save":     
-            gllightpreset_save()
-            self.report({'INFO'}, "Saved Preset to Blend File.")
-        elif button=="sort":     gllightpreset_sort()
-        elif button=="select":   gllightpreset_select()
-        elif button=="export":   
-            gllightpreset_exportsingle(scn.gllightpreset_index, False)
-            self.report({'INFO'}, "Exported Preset to: "+scn.gllightpreset_exportfile)
-        elif button=="exportall":
-            gllightpreset_exportall(1)
-            self.report({'INFO'}, "Exported Presets to: "+scn.gllightpreset_exportdirectory)
-        elif button=="import":   
-            if not os.path.isdir(scn.gllightpreset_importfile):
-                if not scn.gllightpreset_importdirectory=="":
-                    gllightpreset_importsingle(scn.gllightpreset_importfile)
-                else:
-                    self.report({'INFO'}, "Please choose a valid preset file")
-            else:
-                self.report({'INFO'}, "Please choose a valid preset file")
-        elif button=="importall":
-            gllightpreset_importall()
-            self.report({'INFO'}, "Imported Presets from: "+scn.gllightpreset_importdirectory)
-        elif button=="defaults":
-                gllightpreset_addDefault()
-  
-        if scn.gllightpreset_index > len(scn.gllightpreset)-1:
-            scn.gllightpreset_index = len(scn.gllightpreset)-1
-
-        return {"FINISHED"}
-         
-#Panel for tools
-class PANEL(bpy.types.Panel):
-    bl_label = 'Quick Preferences'
-    bl_space_type = 'VIEW_3D'
-    bl_context = "render"
-    bl_region_type = 'UI'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    
-    def draw(self, context):
-        global lastname
-    
-        #aliases
-        scn = bpy.context.scene
-        system = context.user_preferences.system
-        inputs = context.user_preferences.inputs
-        edit = context.user_preferences.edit
-        layout = self.layout
-        split = layout.split()
-        
-#Setup the OpenGL lights box
-#Draw the Lights
-        box = layout.box().column(align=False)
-        box.prop(scn,'lights')
-        if scn.lights:
-
-            split = box.split(percentage=0.1)
-            split.label()
-            split.label(text="Colors:")
-            split.label(text="Direction:")
-
-            lamp = system.solid_lights[0]
-            opengl_lamp_buttons(box, lamp)
-
-            lamp = system.solid_lights[1]
-            opengl_lamp_buttons(box, lamp)
-
-            lamp = system.solid_lights[2]
-            opengl_lamp_buttons(box, lamp)
-
-            box.separator()
-            
-#Draw the selection box        
-            split = box.split(percentage=0.7)
-            col = split.row()
-            col.template_list(scn, "gllightpreset", scn, "gllightpreset_index", rows=5, maxrows=5)
-
-#Draw the buttons
-            split = split.split()
-            col = split.column()
-            col.operator("gllightpreset.action", icon="ZOOMIN", text="Add").button="add"
-            col.operator("gllightpreset.action", icon="ZOOMOUT", text="Delete").button="delete"
-            col.operator("gllightpreset.action", icon="FILE_TICK", text="Save to Blend").button="save"
-            col.operator("gllightpreset.action", icon="SORTALPHA", text="Sort").button="sort"
-            col.operator("gllightpreset.action", icon="SHORTDISPLAY", text="Add Defaults").button="defaults"                     
-            col=box.row()
-            col=col.column()
-#Draw the text box            
-            count=len(scn.gllightpreset)           
-            if count>0:
-                entry=scn.gllightpreset[scn.gllightpreset_index]
-                lastname=entry.name
-                
-                if entry.count==0: 
-                    col.prop(entry, "name", text="")
-                if entry.count> 0: 
-                    col.prop(entry, "name", text="")
-                if scn.objects.active != None:
-                    name=scn.objects.active.get("gllightpreset", "Default")
-#Draw the import/export part of the box                
-                col.prop(scn,'importexport')
-                if scn.importexport:
-                    split = box.split(percentage=0.5)
-                    col = split.column()
-                    col.label("Import Directory or File")
-                    col.prop(scn, 'gllightpreset_importfile')
-                    col.prop(scn, 'gllightpreset_importdirectory')
-                    col.label("Export Directory or File")
-                    col.prop(scn, 'gllightpreset_exportfile')
-                    col.prop(scn, 'gllightpreset_exportdirectory')
-                                
-                    split = split.split()
-                    col = split.column()
-                    
-                    col.label("")
-                    col.operator("gllightpreset.action", icon="IMPORT", text="Import File").button="import"
-                    col.operator("gllightpreset.action", icon="IMPORT", text="Import All").button="importall"  
-                    col.label("")
-                    col.operator("gllightpreset.action", icon="EXPORT", text="Export Selection").button="export"
-                    col.operator("gllightpreset.action", icon="EXPORT", text="Export All").button="exportall"
-                    
-                    
-#The second box containing interface options is here
-        #interface options   
-        box = layout.box().column(align=True)
-        box.prop(scn,'interface')
-        
-        
-        if scn.interface:
-            #Select with
-            boxrow=box.row()
-            boxrow.label(text="Select With:")
-            boxrow=box.row()
-            boxrow.prop(inputs, "select_mouse", expand=True)
-
-            #Orbit
-            boxrow=box.row()
-            boxrow.label(text="Orbit Style:")
-            boxrow=box.row()
-            boxrow.prop(inputs, "view_rotate_method", expand=True)
-        
-            #continuous grab
-            boxrow=box.row()
-            boxrow.prop(inputs, "use_mouse_continuous")
-
-            #Color Picker
-            boxrow=box.row()
-            boxrow.label(text="Color Picker Type")
-            boxrow=box.row()
-            boxrow.row().prop(system, "color_picker_type", text="")
-
-            #Align To
-            boxrow=box.row()
-            boxrow.label(text="Align New Objects To:")
-            boxrow=box.row()
-            boxrow.prop(edit, "object_align", text="")
-         
-##########################################
-####### Registration Functions ############
-##########################################
-def register():
-    #aliases
-    scn=bpy.types.Scene
-    handler=bpy.app.handlers
-
-    #register classes
-    bpy.utils.register_class(PANEL)
-    bpy.utils.register_class(gllightpreset)
-    bpy.utils.register_class(SCENE_OT_gllightpreset)
-        
-    #strings for file IO
-    scn.gllightpreset_importfile = bpy.props.StringProperty(name = "", subtype='FILE_PATH', default=defaultfilepath)
-    scn.gllightpreset_importdirectory = bpy.props.StringProperty(name = "", subtype='DIR_PATH', default=defaultfilepath)
-    scn.gllightpreset_exportfile = bpy.props.StringProperty(name = "", subtype='FILE_PATH', default=defaultfilepath)    
-    scn.gllightpreset_exportdirectory = bpy.props.StringProperty(name = "", subtype='DIR_PATH', default=defaultfilepath)
-
-    #Set up values for UI stuff
-    scn.lights = bpy.props.BoolProperty(name='Lights', default=True)
-    scn.lightPresets = bpy.props.BoolProperty(name='Light Presets', default=False)
-    scn.interface = bpy.props.BoolProperty(name='Interface', default=False)
-    scn.importexport = bpy.props.BoolProperty(name='Show Import/Export Options', default=False)    
-    bpy.types.Object.gllightpreset = bpy.props.StringProperty()
-   
-    #important storage of stuff
-    scn.gllightpreset = bpy.props.CollectionProperty(type=gllightpreset)
-    scn.gllightpreset_index = bpy.props.IntProperty(min=0, default=0, update=gllightpreset_index)
-    
-
-    #handlers    
-    #handler.load_post.append(gllightpreset_chooseLoadLocation)     #was crashing blender on new file load - comment for now
-    handler.scene_update_pre.append(gllightpreset_scan)
-
-    #let the fun begin!
-    gllightpreset_chooseLoadLocation(1)
-    
-           
-# unregistering and removing menus
-def unregister():
-    bpy.utils.unregister_class(PANEL)
-    bpy.utils.unregister_class(gllightpreset)
-    bpy.utils.unregister_class(SCENE_OT_gllightpreset)
-
-
-if __name__ == "__main__":
-    register()
-    
diff --git a/release/scripts/addons_contrib/space_view3d_simple_align.py b/release/scripts/addons_contrib/space_view3d_simple_align.py
deleted file mode 100644
index 0adf1df..0000000
--- a/release/scripts/addons_contrib/space_view3d_simple_align.py
+++ /dev/null
@@ -1,341 +0,0 @@
-# AlingTools.py (c) 2009, 2010 Gabriel Beaudin (gabhead)
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Simple Align",
-    "author": "Gabriel Beaudin (gabhead)",
-    "version": (0,1),
-    "blender": (2, 6, 1),
-    "location": "View3D > Tool Shelf > Simple Align Panel",
-    "description": "Align Selected Objects to Active Object",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/3D interaction/Align_Tools",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=22389",
-    "category": "3D View"}
-
-"""Align Selected Objects"""
-
-import bpy
-
-
-class AlignUi(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = "Simple Align"
-    bl_context = "objectmode"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        obj = context.object
-
-        if obj != None:
-            row = layout.row()
-            row.label(text="Active object is: ", icon='OBJECT_DATA')
-            row = layout.row()
-            row.label(obj.name, icon='EDITMODE_HLT')
-        
-        layout.separator()
-        
-        col = layout.column()
-        col.label(text="Align Loc + Rot:", icon='MANIPUL')
-
-        
-        col = layout.column(align=False)
-        col.operator("object.align",text="XYZ")
-        
-        col = layout.column()
-        col.label(text="Align Location:", icon='MAN_TRANS')
-
-        col = layout.column_flow(columns=5,align=True)
-        col.operator("object.align_location_x",text="X")
-        col.operator("object.align_location_y",text="Y")
-        col.operator("object.align_location_z",text="Z")
-        col.operator("object.align_location_all",text="All")
-
-        col = layout.column()
-        col.label(text="Align Rotation:", icon='MAN_ROT')
-
-        col = layout.column_flow(columns=5,align=True)
-        col.operator("object.align_rotation_x",text="X")
-        col.operator("object.align_rotation_y",text="Y")
-        col.operator("object.align_rotation_z",text="Z")
-        col.operator("object.align_rotation_all",text="All")
-        
-        col = layout.column()
-        col.label(text="Align Scale:", icon='MAN_SCALE')
-
-        col = layout.column_flow(columns=5,align=True)
-        col.operator("object.align_objects_scale_x",text="X")
-        col.operator("object.align_objects_scale_y",text="Y")
-        col.operator("object.align_objects_scale_z",text="Z")
-        col.operator("object.align_objects_scale_all",text="All")
-
-
-##Align all
-def main(context):
-    for i in bpy.context.selected_objects:
-        i.location = bpy.context.active_object.location
-        i.rotation_euler = bpy.context.active_object.rotation_euler
-
-## Align Location
-
-def LocAll(context):
-    for i in bpy.context.selected_objects:
-        i.location = bpy.context.active_object.location
-
-def LocX(context):
-    for i in bpy.context.selected_objects:
-        i.location.x = bpy.context.active_object.location.x
-
-def LocY(context):
-    for i in bpy.context.selected_objects:
-        i.location.y = bpy.context.active_object.location.y
-
-def LocZ(context):
-    for i in bpy.context.selected_objects:
-        i.location.z = bpy.context.active_object.location.z
-
-## Aling Rotation
-def RotAll(context):
-    for i in bpy.context.selected_objects:
-        i.rotation_euler = bpy.context.active_object.rotation_euler
-
-def RotX(context):
-    for i in bpy.context.selected_objects:
-        i.rotation_euler.x = bpy.context.active_object.rotation_euler.x
-
-def RotY(context):
-    for i in bpy.context.selected_objects:
-        i.rotation_euler.y = bpy.context.active_object.rotation_euler.y
-
-def RotZ(context):
-    for i in bpy.context.selected_objects:
-        i.rotation_euler.z = bpy.context.active_object.rotation_euler.z
-## Aling Scale
-def ScaleAll(context):
-    for i in bpy.context.selected_objects:
-        i.scale = bpy.context.active_object.scale
-
-def ScaleX(context):
-    for i in bpy.context.selected_objects:
-        i.scale.x = bpy.context.active_object.scale.x
-
-def ScaleY(context):
-    for i in bpy.context.selected_objects:
-        i.scale.y = bpy.context.active_object.scale.y
-
-def ScaleZ(context):
-    for i in bpy.context.selected_objects:
-        i.scale.z = bpy.context.active_object.scale.z
-
-## Classes
-
-## Align All Rotation And Location
-class AlignOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align"
-    bl_label = "Align Selected To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        main(context)
-        return {'FINISHED'}
-
-#######################Align Location########################
-## Align LocationAll
-class AlignLocationOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_location_all"
-    bl_label = "Align Selected Location To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        LocAll(context)
-        return {'FINISHED'}
-## Align LocationX
-class AlignLocationXOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_location_x"
-    bl_label = "Align Selected Location X To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        LocX(context)
-        return {'FINISHED'}
-## Align LocationY
-class AlignLocationYOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_location_y"
-    bl_label = "Align Selected Location Y To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        LocY(context)
-        return {'FINISHED'}
-## Align LocationZ
-class AlignLocationZOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_location_z"
-    bl_label = "Align Selected Location Z To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        LocZ(context)
-        return {'FINISHED'}
-
-#######################Align Rotation########################
-## Align RotationAll
-class AlignRotationOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_rotation_all"
-    bl_label = "Align Selected Rotation To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        RotAll(context)
-        return {'FINISHED'}
-## Align RotationX
-class AlignRotationXOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_rotation_x"
-    bl_label = "Align Selected Rotation X To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        RotX(context)
-        return {'FINISHED'}
-## Align RotationY
-class AlignRotationYOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_rotation_y"
-    bl_label = "Align Selected Rotation Y To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        RotY(context)
-        return {'FINISHED'}
-## Align RotationZ
-class AlignRotationZOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_rotation_z"
-    bl_label = "Align Selected Rotation Z To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        RotZ(context)
-        return {'FINISHED'}
-#######################Align Scale########################
-## Scale All
-class AlignScaleOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_objects_scale_all"
-    bl_label = "Align Selected Scale To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        ScaleAll(context)
-        return {'FINISHED'}
-## Align ScaleX
-class AlignScaleXOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_objects_scale_x"
-    bl_label = "Align Selected Scale X To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        ScaleX(context)
-        return {'FINISHED'}
-## Align ScaleY
-class AlignScaleYOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_objects_scale_y"
-    bl_label = "Align Selected Scale Y To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        ScaleY(context)
-        return {'FINISHED'}
-## Align ScaleZ
-class AlignScaleZOperator(bpy.types.Operator):
-    """"""
-    bl_idname = "object.align_objects_scale_z"
-    bl_label = "Align Selected Scale Z To Active"
-
-    @classmethod
-    def poll(cls, context):
-        return context.active_object != None
-
-    def execute(self, context):
-        ScaleZ(context)
-        return {'FINISHED'}
-
-## registring
-def register():
-    bpy.utils.register_module(__name__)
-
-    pass
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    pass
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/system_cycles_material_text_node.py b/release/scripts/addons_contrib/system_cycles_material_text_node.py
deleted file mode 100644
index e1d5c54..0000000
--- a/release/scripts/addons_contrib/system_cycles_material_text_node.py
+++ /dev/null
@@ -1,608 +0,0 @@
-# system_cycles_material_text_node.py Copyright (C) 5-mar-2012, Silvio Falcinelli 
-#
-# 
-# special thanks to user blenderartists.org cmomoney  
-# 
-#
-# Show Information About the Blend.
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Cycles Auto Material Texures Node Editor",
-    "author": "Silvio Falcinelli",
-    "version": (0,5),
-    "blender": (2, 6, 2),
-    "api": 44136,
-    "location": "Properties > Material > Automatic Node Editor ",
-    "description": "automatic cycles texture map",
-    "warning": "beta",
-    "wiki_url": 'http://www.rendering3d.net/' \
-        'scripts/materialedior',
-    "tracker_url": "https://projects.blender.org/tracker/index.php?" \
-        "func=detail&aid=????",
-    "category": "System"}
-
-
-import bpy
-import math
-from math import log
-from math import pow
-from math import exp
-import os.path
-
-
-
-def AutoNodeOff():
-    mats = bpy.data.materials
-    for cmat in mats:
-        cmat.use_nodes=False
-    bpy.context.scene.render.engine='BLENDER_RENDER'
-
-
-def BakingText(tex,mode):
-    print('________________________________________')
-    print('INFO start bake texture ' + tex.name)
-    bpy.ops.object.mode_set(mode='OBJECT')
-    sc=bpy.context.scene
-    tmat=''
-    img=''
-    Robj=bpy.context.active_object
-    for n in bpy.data.materials:
-
-        if n.name=='TMP_BAKING':
-            tmat=n
-   
-    if not tmat:
-        tmat = bpy.data.materials.new('TMP_BAKING')
-        tmat.name="TMP_BAKING"
-    
-    
-    bpy.ops.mesh.primitive_plane_add()
-    tm=bpy.context.active_object
-    tm.name="TMP_BAKING"
-    tm.data.name="TMP_BAKING"
-    bpy.ops.object.select_pattern(extend=False, pattern="TMP_BAKING", case_sensitive=False)
-    sc.objects.active = tm
-    bpy.context.scene.render.engine='BLENDER_RENDER'
-    tm.data.materials.append(tmat)
-    if len(tmat.texture_slots.items()) == 0:
-        tmat.texture_slots.add()
-    tmat.texture_slots[0].texture_coords='UV'
-    tmat.texture_slots[0].use_map_alpha=True
-    tmat.texture_slots[0].texture = tex.texture
-    tmat.texture_slots[0].use_map_alpha=True
-    tmat.texture_slots[0].use_map_color_diffuse=False
-    tmat.use_transparency=True
-    tmat.alpha=0
-    tmat.use_nodes=False
-    tmat.diffuse_color=1,1,1
-    bpy.ops.object.mode_set(mode='EDIT')
-    bpy.ops.uv.unwrap()
-
-    for n in bpy.data.images:
-        if n.name=='TMP_BAKING':
-            n.user_clear()
-            bpy.data.images.remove(n)
-
-
-    if mode == "ALPHA" and tex.texture.type=='IMAGE':
-        sizeX=tex.texture.image.size[0]
-        sizeY=tex.texture.image.size[1]
-    else:
-        sizeX=600
-        sizeY=600
-    bpy.ops.image.new(name="TMP_BAKING", width=sizeX, height=sizeY, color=(0.0, 0.0, 0.0, 1.0), alpha=True, uv_test_grid=False, float=False)
-    bpy.data.screens['UV Editing'].areas[1].spaces[0].image = bpy.data.images["TMP_BAKING"]
-    sc.render.engine='BLENDER_RENDER'
-    img = bpy.data.images["TMP_BAKING"]
-    img=bpy.data.images.get("TMP_BAKING")
-    img.file_format = "JPEG"
-    if mode == "ALPHA" and tex.texture.type=='IMAGE':
-        img.filepath_raw = tex.texture.image.filepath + "_BAKING.jpg"
-
-    else:
-        img.filepath_raw = tex.texture.name + "_PTEXT.jpg"
-    
-    sc.render.bake_type = 'ALPHA'
-    sc.render.use_bake_selected_to_active = True
-    sc.render.use_bake_clear = True
-    bpy.ops.object.bake_image()
-    img.save()
-    bpy.ops.object.mode_set(mode='OBJECT')
-    bpy.ops.object.delete() 
-    bpy.ops.object.select_pattern(extend=False, pattern=Robj.name, case_sensitive=False)           
-    sc.objects.active = Robj       
-    img.user_clear()
-    bpy.data.images.remove(img)
-    bpy.data.materials.remove(tmat)
-
-    print('INFO : end Bake ' + img.filepath_raw )
-    print('________________________________________')
-
-def AutoNode():
-    
-    mats = bpy.data.materials
-    sc = bpy.context.scene
-
-    for cmat in mats:
-
-        cmat.use_nodes=True
-        TreeNodes=cmat.node_tree
-        links = TreeNodes.links
-    
-        shader=''
-        shmix=''
-        shtsl=''
-        Add_Emission=''
-        Add_Translucent=''
-        Mix_Alpha=''        
-        sT=False
-        lock=True
-        
-        for n in TreeNodes.nodes:
-            if n.type == 'OUTPUT_MATERIAL':
-                if n.label == 'Lock':
-                    lock=False
-
-                    
-        if lock:        
-            for n in TreeNodes.nodes:
-                TreeNodes.nodes.remove(n)
-        
-     
-    
-            if not shader :
-                shader = TreeNodes.nodes.new('BSDF_DIFFUSE')    
-                shader.location = 0,470
-                 
-                shout = TreeNodes.nodes.new('OUTPUT_MATERIAL')
-                shout.location = 200,400          
-                links.new(shader.outputs[0],shout.inputs[0])
-                
-            textures = cmat.texture_slots
-            sM=True
-    
-            for tex in textures:
-                if tex:
-                    if tex.use:
-                        if tex.use_map_alpha:
-                            sM=False
-                            
-                            if sc.EXTRACT_ALPHA:
-                                
-                                if tex.texture.type =='IMAGE' and tex.texture.use_alpha: 
-                                    
-                                    if not os.path.exists(bpy.path.abspath(tex.texture.image.filepath + "_BAKING.jpg")) or sc.EXTRACT_OW:
-
-                                        BakingText(tex,'ALPHA')
-                                else:
-                                    if not tex.texture.type =='IMAGE': 
-                                    
-                                        if not os.path.exists(bpy.path.abspath(tex.texture.name + "_PTEXT.jpg")) or sc.EXTRACT_OW:
-    
-                                            BakingText(tex,'PTEXT')                                             
-                                    
-                            
-
-
-
-    
-            if  cmat.use_transparency and cmat.raytrace_transparency.ior == 1 and not cmat.raytrace_mirror.use  and sM:
-                if not shader.type == 'BSDF_TRANSPARENT':
-                    print("INFO:  Make TRANSPARENT shader node " + cmat.name)
-                    TreeNodes.nodes.remove(shader)
-                    shader = TreeNodes.nodes.new('BSDF_TRANSPARENT')    
-                    shader.location = 0,470
-                    links.new(shader.outputs[0],shout.inputs[0]) 
-    
-    
-    
-            if not cmat.raytrace_mirror.use and not cmat.use_transparency:
-                if not shader.type == 'BSDF_DIFFUSE':
-                    print("INFO:  Make DIFFUSE shader node" + cmat.name)
-                    TreeNodes.nodes.remove(shader)
-                    shader = TreeNodes.nodes.new('BSDF_DIFFUSE')    
-                    shader.location = 0,470
-                    links.new(shader.outputs[0],shout.inputs[0]) 
-                    
-                    
-    
-            if cmat.raytrace_mirror.use and cmat.raytrace_mirror.reflect_factor>0.001 and cmat.use_transparency:
-                if not shader.type == 'BSDF_GLASS':
-                    print("INFO:  Make GLASS shader node" + cmat.name)
-                    TreeNodes.nodes.remove(shader)
-                    shader = TreeNodes.nodes.new('BSDF_GLASS')  
-                    shader.location = 0,470
-                    links.new(shader.outputs[0],shout.inputs[0]) 
-    
-    
-    
-    
-            if cmat.raytrace_mirror.use and not cmat.use_transparency and cmat.raytrace_mirror.reflect_factor>0.001 :
-                if not shader.type == 'BSDF_GLOSSY':
-                    print("INFO:  Make MIRROR shader node" + cmat.name)
-                    TreeNodes.nodes.remove(shader)
-                    shader = TreeNodes.nodes.new('BSDF_GLOSSY') 
-                    shader.location = 0,520
-                    links.new(shader.outputs[0],shout.inputs[0]) 
-                    
-                    
-                            
-            if cmat.emit > 0.001 :
-                if not shader.type == 'EMISSION' and not cmat.raytrace_mirror.reflect_factor>0.001 and not cmat.use_transparency:
-                    print("INFO:  Mix EMISSION shader node" + cmat.name)
-                    TreeNodes.nodes.remove(shader)
-                    shader = TreeNodes.nodes.new('EMISSION')    
-                    shader.location = 0,450
-                    links.new(shader.outputs[0],shout.inputs[0])               
-                       
-                else:
-                    if not Add_Emission:
-                        print("INFO:  Add EMISSION shader node" + cmat.name)
-                        shout.location = 550,330
-                        Add_Emission = TreeNodes.nodes.new('ADD_SHADER')
-                        Add_Emission.location = 370,490
-                        
-                        shem = TreeNodes.nodes.new('EMISSION')
-                        shem.location = 180,380  
-                        
-                        links.new(Add_Emission.outputs[0],shout.inputs[0]) 
-                        links.new(shem.outputs[0],Add_Emission.inputs[1])
-                        links.new(shader.outputs[0],Add_Emission.inputs[0])
-                        
-                        shem.inputs['Color'].default_value=cmat.diffuse_color.r,cmat.diffuse_color.g,cmat.diffuse_color.b,1
-                        shem.inputs['Strength'].default_value=cmat.emit
-    
-                                   
-    
-    
-            if cmat.translucency > 0.001 : 
-                print("INFO:  Add BSDF_TRANSLUCENT shader node" + cmat.name)
-                shout.location = 770,330
-                Add_Translucent = TreeNodes.nodes.new('ADD_SHADER')
-                Add_Translucent.location = 580,490
-                        
-                shtsl = TreeNodes.nodes.new('BSDF_TRANSLUCENT')
-                shtsl.location = 400,350     
-                        
-                links.new(Add_Translucent.outputs[0],shout.inputs[0]) 
-                links.new(shtsl.outputs[0],Add_Translucent.inputs[1])
-    
-                
-                if Add_Emission:
-                    links.new(Add_Emission.outputs[0],Add_Translucent.inputs[0])
-     
-                    pass
-                else:
-    
-                    links.new(shader.outputs[0],Add_Translucent.inputs[0]) 
-                    pass               
-                shtsl.inputs['Color'].default_value=cmat.translucency, cmat.translucency,cmat.translucency,1                             
-          
-                       
-
-
-            shader.inputs['Color'].default_value=cmat.diffuse_color.r,cmat.diffuse_color.g,cmat.diffuse_color.b,1
-            
-            if shader.type=='BSDF_DIFFUSE':
-                shader.inputs['Roughness'].default_value=cmat.specular_intensity    
-                       
-            if shader.type=='BSDF_GLOSSY':
-                shader.inputs['Roughness'].default_value=1-cmat.raytrace_mirror.gloss_factor  
-                
-                
-            if shader.type=='BSDF_GLASS':
-                shader.inputs['Roughness'].default_value=1-cmat.raytrace_mirror.gloss_factor                   
-                shader.inputs['IOR'].default_value=cmat.raytrace_transparency.ior
-                
-                
-            if shader.type=='EMISSION':
-                shader.inputs['Strength'].default_value=cmat.emit              
-              
-                      
-                                  
-            textures = cmat.texture_slots
-            for tex in textures:
-                sT=False   
-                pText=''            
-                if tex:
-                    if tex.use:
-                        if tex.texture.type=='IMAGE':
-                            img = tex.texture.image
-                            shtext = TreeNodes.nodes.new('TEX_IMAGE')
-                            shtext.location = -200,400 
-                            shtext.image=img
-                            sT=True
-    
-
-               
-                            
-  
-                        if not tex.texture.type=='IMAGE':                           
-                            if sc.EXTRACT_PTEX:
-                                print('INFO : Extract Procedural Texture  ' )
-                                
-                                if not os.path.exists(bpy.path.abspath(tex.texture.name + "_PTEXT.jpg")) or sc.EXTRACT_OW:
-                                    BakingText(tex,'PTEX')    
-                                                     
-                                img=bpy.data.images.load(tex.texture.name + "_PTEXT.jpg")
-                                shtext = TreeNodes.nodes.new('TEX_IMAGE')
-                                shtext.location = -200,400 
-                                shtext.image=img                                
-                                sT=True
-                                                                     
-
-                if sT:
-                        if tex.use_map_color_diffuse :
-                            links.new(shtext.outputs[0],shader.inputs[0]) 
-                            
-                                                
-                        if tex.use_map_emit:                            
-                            if not Add_Emission:
-                                print("INFO:  Mix EMISSION + Texure shader node " + cmat.name)
-                                
-                                intensity=0.5+(tex.emit_factor / 2)
-                                
-                                shout.location = 550,330
-                                Add_Emission = TreeNodes.nodes.new('ADD_SHADER')
-                                Add_Emission.name="Add_Emission"
-                                Add_Emission.location = 370,490
-                                
-                                shem = TreeNodes.nodes.new('EMISSION')
-                                shem.location = 180,380  
-                                
-                                links.new(Add_Emission.outputs[0],shout.inputs[0]) 
-                                links.new(shem.outputs[0],Add_Emission.inputs[1])
-                                links.new(shader.outputs[0],Add_Emission.inputs[0])
-                                
-                                shem.inputs['Color'].default_value=cmat.diffuse_color.r,cmat.diffuse_color.g,cmat.diffuse_color.b,1
-                                shem.inputs['Strength'].default_value=intensity * 2
-
-                            links.new(shtext.outputs[0],shem.inputs[0]) 
-
-
-                        if tex.use_map_mirror:   
-                            links.new(shader.inputs[0],shtext.outputs[0]) 
-
-
-                        if tex.use_map_translucency:
-                            if not Add_Translucent:   
-                                print("INFO:  Add Translucency + Texure shader node " + cmat.name)
-                                
-                                intensity=0.5+(tex.emit_factor / 2)
-                                
-                                shout.location = 550,330
-                                Add_Translucent = TreeNodes.nodes.new('ADD_SHADER')
-                                Add_Translucent.name="Add_Translucent"
-                                Add_Translucent.location = 370,290
-                                
-                                shtsl = TreeNodes.nodes.new('BSDF_TRANSLUCENT')
-                                shtsl.location = 180,240     
-                                
-                                links.new(shtsl.outputs[0],Add_Translucent.inputs[1])
-                                
-                                if Add_Emission:
-                                    links.new(Add_Translucent.outputs[0],shout.inputs[0]) 
-                                    links.new(Add_Emission.outputs[0],Add_Translucent.inputs[0]) 
-                                    pass
-                                else:
-                                    links.new(Add_Translucent.outputs[0],shout.inputs[0]) 
-                                    links.new(shader.outputs[0],Add_Translucent.inputs[0])
-                                                            
-                            links.new(shtext.outputs[0],shtsl.inputs[0]) 
-                            
-
-                        if tex.use_map_alpha:
-                            if not Mix_Alpha:   
-                                print("INFO:  Mix Alpha + Texure shader node " + cmat.name)
-
-                                shout.location = 750,330
-                                Mix_Alpha = TreeNodes.nodes.new('MIX_SHADER')
-                                Mix_Alpha.name="Add_Alpha"
-                                Mix_Alpha.location = 570,290
-                                sMask = TreeNodes.nodes.new('BSDF_TRANSPARENT') 
-                                sMask.location = 250,180                                
-                                tMask = TreeNodes.nodes.new('TEX_IMAGE')
-                                tMask.location = -200,250
-
-                                if tex.texture.type=='IMAGE':
-                                    if tex.texture.use_alpha:
-                                        imask=bpy.data.images.load(img.filepath+"_BAKING.jpg")       
-                                    else:  
-                                        imask=bpy.data.images.load(img.filepath)   
-                                else:
-                                    imask=bpy.data.images.load(img.name)         
-                                      
-
-                                tMask.image = imask
-                                links.new(Mix_Alpha.inputs[0],tMask.outputs[0])
-                                links.new(shout.inputs[0],Mix_Alpha.outputs[0])
-                                links.new(sMask.outputs[0],Mix_Alpha.inputs[1])
-                                
-                                if not Add_Emission and not Add_Translucent:
-                                    links.new(Mix_Alpha.inputs[2],shader.outputs[0])
-                                
-                                if Add_Emission and not Add_Translucent:
-                                    links.new(Mix_Alpha.inputs[2],Add_Emission.outputs[0])  
-                                
-                                if Add_Translucent:
-                                    links.new(Mix_Alpha.inputs[2],Add_Translucent.outputs[0])                                    
-                                    
-                                    
-                            
-                        if tex.use_map_normal:
-                            t = TreeNodes.nodes.new('RGBTOBW')
-                            t.location = -0,300 
-                            links.new(t.outputs[0],shout.inputs[2]) 
-                            links.new(shtext.outputs[0],t.inputs[0])    
-    bpy.context.scene.render.engine='CYCLES'                                                      
-                                                     
- 
-class mllock(bpy.types.Operator):
-    bl_idname = "ml.lock"
-    bl_label = "Lock"
-    bl_description = "Safe to overwrite of mssive BL conversion"
-    bl_register = True
-    bl_undo = True
-    @classmethod
-    def poll(cls, context):
-        return True
-    def execute(self, context):
-        cmat=bpy.context.selected_objects[0].active_material
-        TreeNodes=cmat.node_tree
-        links = TreeNodes.links
-        for n in TreeNodes.nodes:
-            if n.type == 'OUTPUT_MATERIAL':
-                if n.label == 'Lock':
-                    n.label=''
-                else:
-                    n.label='Lock'     
-
-
-
-
-        return {'FINISHED'}
- 
- 
-class mlrefresh(bpy.types.Operator):
-    bl_idname = "ml.refresh"
-    bl_label = "Refresh"
-    bl_description = "Refresh"
-    bl_register = True
-    bl_undo = True
-    @classmethod
-    def poll(cls, context):
-        return True
-    def execute(self, context):
-        AutoNode()
-        return {'FINISHED'}
-
-
-class mlrestore(bpy.types.Operator):
-    bl_idname = "ml.restore"
-    bl_label = "Restore"
-    bl_description = "Restore"
-    bl_register = True
-    bl_undo = True
-    @classmethod
-    def poll(cls, context):
-        return True
-    def execute(self, context):
-        AutoNodeOff()
-        return {'FINISHED'}
-
-from bpy.props import *
-sc = bpy.types.Scene
-sc.EXTRACT_ALPHA= BoolProperty(attr="EXTRACT_ALPHA",default= False)
-sc.EXTRACT_PTEX= BoolProperty(attr="EXTRACT_PTEX",default= False)
-sc.EXTRACT_OW= BoolProperty(attr="Overwrite",default= False)
-
-class OBJECT_PT_scenemassive(bpy.types.Panel):
-    bl_label = "Automatic Massive Material Nodes"
-    bl_space_type = "PROPERTIES"
-    bl_region_type = "WINDOW"
-    bl_context = "material"
-    
-
-    def draw(self, context):
-        sc = context.scene
-        t=''
-        lock=''
-        try:
-            cmat=bpy.context.selected_objects[0].active_material
-            t="Material : " + cmat.name
-            
-            
-            TreeNodes=cmat.node_tree
-            links = TreeNodes.links
-        
-      
-            lock=False
-            
-            for n in TreeNodes.nodes:
-                if n.type == 'OUTPUT_MATERIAL':
-                    if n.label == 'Lock':
-                        lock=True          
-            
-            
-        except:
-            pass    
-        
-        ob_cols = []
-        db_cols = []
-        layout = self.layout
-        row = layout.row()
-        row.prop(sc,"EXTRACT_ALPHA",text='Extract Alpha Texture  (slow)',icon='FORCE_TEXTURE')
-        row = layout.row()
-        row.prop(sc,"EXTRACT_PTEX",text='Extract Procedural Texture (slow)',icon='FORCE_TEXTURE')        
-        row = layout.row()
-        row.prop(sc,"EXTRACT_OW",text='Extract Texture Overwrite') 
-        row = layout.row()
-        row = layout.row()
-        l_row = layout.row()
-        ob_cols.append(l_row.column())
-        layout.separator()
-        row = ob_cols[0].row() 
-        row.operator("ml.refresh", text='BLENDER > CYCLES', icon='TEXTURE')
-        layout.separator()
-        row = ob_cols[0].row() 
-        row.operator("ml.restore", text='BLENDER Mode  (Node Off)', icon='MATERIAL')        
-        layout.separator()
-        row = ob_cols[0].row() 
-        layout.separator()
-        layout.separator()
-        row = ob_cols[0].row() 
-        layout.separator()
-        row = ob_cols[0].row() 
-
-
-
-        if t:
-            row.label(text=t)
-            row.label(text='', icon='MATERIAL')
-            if lock:
-                row.operator("ml.lock", text="Lock" )
-            else:
-                row.operator("ml.lock", text="UnLock" ) 
-            
-        layout.separator()
-        row = ob_cols[0].row() 
-        layout.separator()          
-        row = ob_cols[0].row() 
-        layout.separator()
-        row = ob_cols[0].row() 
-        row.label(text="Ver 0,4 beta  blender 2.62 - 2.63    Silvio Falcinelli")
-        layout.separator()
-        row = ob_cols[0].row() 
-        row.label(text="wwww.rendering3d.net")
-
-
- 
-def register():
-    bpy.utils.register_module(__name__)
-    pass
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-    pass
-
-if __name__ == "__main__":
-    register()
\ No newline at end of file
diff --git a/release/scripts/addons_contrib/system_keyboard_svg.py b/release/scripts/addons_contrib/system_keyboard_svg.py
deleted file mode 100644
index 64a65ac..0000000
--- a/release/scripts/addons_contrib/system_keyboard_svg.py
+++ /dev/null
@@ -1,273 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-# this script creates Keyboard layout images of the current keyboard configuration.
-# the result will be writen to the blender default directory.
-
-# first implementation done by jbakker
-
-bl_info = {
-    "name": "Keyboard Layout (svg)",
-    "author": "Jbakker",
-    "version": (0, 1),
-    "blender": (2, 6, 0),
-    "location": "",
-    "description": "Save the hotkeys as a .svg file (search: Keyboard)",
-    "warning": "may not work in recent svn",
-    "wiki_url": 'http://wiki.blender.org/index.php/Extensions:2.6/Py/' \
-        'Scripts/System/keymaps_to_svg',
-    "tracker_url": "https://projects.blender.org/tracker/index.php?" \
-        "func==detail&aid=21490",
-    "category": "System"}
-
-import bpy
-
-keyboard = (
-    ('`', 'ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'ZERO', 'MINUS', 'EQUAL', 'BACKSPACE'),
-    ('TAB', 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '(', ')', '\\'),
-    ('CAPSLOCK', 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';', "'", 'ENTER'),
-    ('SHIFT', 'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', '.', '/', 'SHIFT'),
-    ('CONTROL', 'OSKEY', 'ALT', 'SPACE', 'ALT', 'OSKEY', 'MENUKEY', 'CONTROL')
-    )
-
-# default dimension of a single key [width, heidgh]
-DEFAULT_KEY_DIMENSION = 100, 100
-# alternative dimensions of specufic keys [keyname,[width, height]]
-ALTERNATIVE_KEY_DIMENSIONS = {
-    'BACKSPACE': (250, 100),
-    'TAB': (175, 100),
-    '\\': (175, 100),
-    'CAPSLOCK': (225, 100),
-    'ENTER': (240, 100),
-    'SHIFT': (290, 100),
-    'CONTROL': (225, 100),
-    'ALT': (100, 100),
-    'OSKEY': (100, 100),
-    'MENUKEY': (100, 100),
-    'SPACE': (690, 100),
-}
-
-
-def createKeyboard(viewtype):
-    """
-    Creates a keyboard layout (.svg) file of the current configuration for a specific viewtype.
-    example of a viewtype is "VIEW_3D".
-    """
-    for keyconfig in bpy.data.window_managers[0].keyconfigs:
-        kc_map = {}
-        for keymap in keyconfig.keymaps:
-            if keymap.space_type == viewtype:
-                for key in keymap.keymap_items:
-                    if key.map_type == 'KEYBOARD':
-                        test = 0
-                        pre = []
-                        cont = ""
-                        if key.ctrl:
-                            test = test + 1
-                            cont = "C"
-                        if key.alt:
-                            test = test + 2
-                            cont = cont + "A"
-                        if key.shift:
-                            test = test + 4
-                            cont = cont + "S"
-                        if key.oskey:
-                            test = test + 8
-                            cont = cont + "O"
-                        if len(cont) > 0:
-                            cont = "[" + cont + "] "
-                        ktype = key.type
-                        if ktype not in kc_map:
-                            kc_map[ktype] = []
-                        kc_map[ktype].append((test, cont + key.name))
-
-        filename = "keyboard_%s.svg" % viewtype
-        print(filename)
-        svgfile = open(filename, "w")
-        svgfile.write("""<?xml version="1.0" standalone="no"?>
-    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-    """)
-        svgfile.write("""<svg width="2000" height="800" version="1.1" xmlns="http://www.w3.org/2000/svg">
-    """)
-        svgfile.write("""<style>
-    rect {
-        fill:rgb(192,192,192);
-        stroke-width:1;
-        stroke:rgb(0,0,0);
-    }
-    text.header {
-        font-size:xx-large;
-    }
-    text.key {
-        stroke-width:1;
-        stroke:rgb(0,0,0);
-    }
-    text.action {
-        font-size:smaller;
-    }
-    text.add0 {
-        font-size:smaller;
-        fill:rgb(0,0,0)
-    }
-    text.add1 {
-        font-size:smaller;
-        fill:rgb(255,0,0)
-    }
-    text.add2 {
-        font-size:smaller;
-        fill:rgb(0,255,0)
-    }
-    text.add3 {
-       font-size:smaller;
-       fill:rgb(128,128,0)
-    }
-    text.add4 {
-        font-size:smaller;
-        fill:rgb(0,0,255)
-    }
-    text.add5 {
-        font-size:smaller;
-        fill:rgb(128,0,128)
-    }
-    text.add6 {
-        font-size:smaller;
-        fill:rgb(0, 128, 128)
-    }
-    text.add7 {
-        font-size:smaller;
-        fill:rgb(128,128,128)
-    }
-    text.add8 {
-        font-size:smaller;
-        fill:rgb(128,128,128)
-    }
-    text.add9 {
-        font-size:smaller;
-        fill:rgb(255,128,128)
-    }
-    text.add10 {
-        font-size:smaller;
-        fill:rgb(128,255,128)
-    }
-    text.add11 {
-        font-size:smaller;
-        fill:rgb(255,255,128)
-    }
-    text.add12 {
-        font-size:smaller;
-        fill:rgb(128,128,255)
-    }
-    text.add13 {
-        font-size:smaller;
-        fill:rgb(255,128,255)
-    }
-    text.add14 {
-        font-size:smaller;
-        fill:rgb(128,255,255)
-    }
-    text.add15 {
-        font-size:smaller;
-        fill:rgb(255,255,128)
-    }
-    </style>
-    """)
-        svgfile.write("""<text class="header" x="100" y="24">keyboard layout - """ + viewtype + """</text>
-""")
-
-        x = 0
-        xgap = 15
-        ygap = 15
-        y = 32
-        for row in keyboard:
-            x = 0
-            for key in row:
-                width, height = ALTERNATIVE_KEY_DIMENSIONS.get(key, DEFAULT_KEY_DIMENSION)
-                tx = 16
-                ty = 16
-                svgfile.write("""<rect x=\"""" + str(x) +
-                              """\" y=\"""" + str(y) +
-                              """\" width=\"""" + str(width) +
-                              """\" height=\"""" + str(height) +
-                              """\" rx="20" ry="20" />
-    """)
-                svgfile.write("""<text class="key" x=\"""" + str(x + tx) +
-                              """\" y=\"""" + str(y + ty) +
-                              """\" width=\"""" + str(width) +
-                              """\" height=\"""" + str(height) + """\">
-    """)
-                svgfile.write(key)
-                svgfile.write("</text>")
-                ty = ty + 16
-                tx = 4
-                if key in kc_map:
-                    for a in kc_map[key]:
-                        svgfile.write("""<text class="add""" + str(a[0]) +
-                                      """" x=\"""" + str(x + tx) +
-                                      """\" y=\"""" + str(y + ty) +
-                                      """\" width=\"""" + str(width) +
-                                      """\" height=\"""" + str(height) + """\">
-    """)
-                        svgfile.write(a[1])
-                        svgfile.write("</text>")
-                        ty = ty + 16
-                x = x + width + xgap
-            y = y + 100 + ygap
-        svgfile.write("""</svg>""")
-        svgfile.flush()
-        svgfile.close()
-
-
-class WM_OT_Keyboardlayout(bpy.types.Operator):
-    """
-        Windows manager operator for keyboard leyout export
-    """
-    bl_idname = "wm.keyboardlayout"
-    bl_label = "Keyboard layout (SVG)"
-
-    def execute(self, context):
-        """
-        Iterate over all viewtypes to export the keyboard layout.
-        """
-        for vt in ('VIEW_3D',
-                   'LOGIC_EDITOR',
-                   'NODE_EDITOR',
-                   'CONSOLE',
-                   'GRAPH_EDITOR',
-                   'PROPERTIES',
-                   'SEQUENCE_EDITOR',
-                   'OUTLINER',
-                   'IMAGE_EDITOR',
-                   'TEXT_EDITOR',
-                   'DOPESHEET_EDITOR',
-                   'Window'):
-
-            createKeyboard(vt)
-        return {'FINISHED'}
-
-
-def register():
-    bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/system_project_folder.py b/release/scripts/addons_contrib/system_project_folder.py
deleted file mode 100644
index c5163ee..0000000
--- a/release/scripts/addons_contrib/system_project_folder.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# system_project_folder.py (c) 2010 Dany Lebel (Axon_D)
-#
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-    "name": "Project Folder",
-    "author": "Dany Lebel (Axon_D), Spirou4D",
-    "version": (0,3, 1),
-    "blender": (2, 6, 1),
-    "api": 43260,
-    "location": "Info -> File Menu -> Project Folder",
-    "description": "Open the project folder in a file browser",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/System/Project_Folder",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?func=detail&aid=25910",
-    "category": "System"}
-
-
-import bpy
-import os
-from platform import system as currentOS
-
-
-class ProjectFolder(bpy.types.Operator):
-    """Open the Project Folder in a file Browser"""
-    bl_idname = "file.project_folder"
-    bl_label = "Project Folder"
-    
-    
-    def execute(self, context):
-        try :
-            path = self.path()
-        except ValueError:
-            self.report({'INFO'}, "No project folder yet")
-            return {'FINISHED'}
-        
-        bpy.ops.wm.path_open(filepath=path)
-
-        
-        return {'FINISHED'}
-
-    def path(self):
-        filepath = bpy.data.filepath
-        relpath = bpy.path.relpath(filepath)
-        path = filepath[0: -1 * (relpath.__len__() - 2)]
-        return path
-
-
-# Registration
-
-def menu_func(self, context):
-    self.layout.operator(
-        ProjectFolder.bl_idname,
-        text="Project Folder", 
-        icon="FILESEL")
-
-def register():
-    bpy.utils.register_class(ProjectFolder)
-    bpy.types.INFO_MT_file.prepend(menu_func)
-
-def unregister():
-    bpy.utils.unregister_class(ProjectFolder)
-    bpy.types.INFO_MT_file.remove(menu_func)
-
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/text_editor_pasteall.py b/release/scripts/addons_contrib/text_editor_pasteall.py
deleted file mode 100644
index b74da5f..0000000
--- a/release/scripts/addons_contrib/text_editor_pasteall.py
+++ /dev/null
@@ -1,221 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "PasteAll",
-    "author": "Dalai Felinto (dfelinto)",
-    "version": (0,7),
-    "blender": (2, 6, 0),
-    "location": "Text editor > Properties panel",
-    "description": "Send your selection or text to www.pasteall.org",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Text_Editor/PasteAll",
-    "tracker_url": "https://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=23493",
-    "category": "Text Editor"}
-
-# ########################################################
-# PasteAll.org Text Sender Script
-#
-# Dalai Felinto (dfelinto)
-# blenderecia.orgfree.com
-#
-# Rio de Janeiro - Brasil
-# Vancouver - Canada
-#
-# Original code: 23rd August 2010 (Blender 2.5.3 rev. 31525)
-#
-# Important Note:
-# This script is not official. I did it for fun and for my own usage.
-# And please do not abuse of their generosity - use it wisely (a.k.a no flood).
-#
-# ########################################################
-
-
-import bpy
-import urllib
-import urllib.request
-import webbrowser
-
-class TEXT_PT_pasteall(bpy.types.Panel):
-    bl_space_type = 'TEXT_EDITOR'
-    bl_region_type = 'UI'
-    bl_label = "PasteAll.org"
-
-    def draw(self, context):
-        layout = self.layout        
-        layout.operator("text.pasteall", icon='URL')
-        layout.prop(context.scene, "use_webbrowser")
-
-class TEXT_OT_pasteall(bpy.types.Operator):
-    """"""
-    bl_idname = "text.pasteall"
-    bl_label = "PasteAll.org"
-    bl_description = "Send the current text or selection to www.pasteall.org"
-
-    @classmethod
-    def poll(cls, context):
-        if context.area.type != 'TEXT_EDITOR':
-            return False
-        else:
-            return context.space_data.text != None
-
-    def invoke(self, context, event):
-        import webbrowser
-        st = context.space_data
-
-        # get the selected text
-        text = self.get_selected_text(st.text)
-        # if no text is selected send the whole file
-        if text is None: text = st.text.as_string()
-
-        # get the file type based on the extension
-        format = self.get_file_format(st.text)
-
-        # send the text and receive the returned page
-        html = self.send_text(text, format)
-
-        if html is None:
-            self.report({'ERROR'}, "Error in sending the text to the server.")
-            return {'CANCELLED'}
-
-        # get the link of the posted page
-        page = self.get_page(str(html))
-        
-        if page is None or page == "":
-            self.report({'ERROR'}, "Error in retrieving the page.")
-            return {'CANCELLED'}
-        else:
-            self.report({'INFO'}, page)
-
-        # store the link in the clipboard
-        bpy.context.window_manager.clipboard = page
-
-        if context.scene.use_webbrowser:
-            try:
-                webbrowser.open_new_tab(page)
-            except:
-                self.report({'WARNING'}, "Error in opening the page %s." % (page))
-
-        return {'FINISHED'}
-            
-    def send_text(self, text, format):
-        """"""
-        import urllib
-        url = "http://www.pasteall.org/index.php"
-        values = {  'action' : 'savepaste',
-                    'parent_id' : '0',
-                    'language_id': format,
-                    'code' : text }
-
-        try:
-            data = urllib.parse.urlencode(values).encode()
-            req = urllib.request.Request(url, data)
-            response = urllib.request.urlopen(req)
-            page_source = response.read()
-        except:
-            return None
-        else:
-            return page_source
-
-    def get_page(self, html):
-        """"""
-        id = html.find('directlink')
-        id_begin = id + 12 # hardcoded: directlink">
-        id_end = html[id_begin:].find("</a>")
-
-        if id != -1 and id_end != -1:
-            return html[id_begin:id_begin + id_end]
-        else:
-            return None
-
-    def get_selected_text(self, text):
-        """"""
-        current_line = text.current_line
-        select_end_line = text.select_end_line
-        
-        current_character = text.current_character
-        select_end_character = text.select_end_character
-        
-        # if there is no selected text return None
-        if current_line == select_end_line:
-            if current_character == select_end_character:
-                return None
-            else:
-                return current_line.body[min(current_character,select_end_character):max(current_character,select_end_character)]
-
-        text_return = None
-        writing = False
-        normal_order = True # selection from top to bottom
-
-        for line in text.lines:
-            if not writing:
-                if line == current_line:
-                    text_return = current_line.body[current_character:] + "\n"
-                    writing = True
-                    continue
-                elif line == select_end_line:
-                    text_return =  select_end_line.body[select_end_character:] + "\n"
-                    writing = True
-                    normal_order = False
-                    continue
-            else:
-                if normal_order:
-                    if line == select_end_line:
-                        text_return += select_end_line.body[:select_end_character]
-                        break
-                    else:
-                        text_return += line.body + "\n"
-                        continue
-                else:
-                    if line == current_line:
-                        text_return += current_line.body[:current_character]
-                        break
-                    else:
-                        text_return += line.body + "\n"
-                        continue
-
-        return text_return
-    
-    def get_file_format(self, text):
-        """Try to guess what is the format based on the file extension"""
-        extensions =   {'diff':'24',
-                        'patch':'24',
-                        'py':'62',
-                        'c':'12',
-                        'cpp':'18'}
-
-        type = text.name.split(".")[-1]
-        return extensions.get(type, '0')
-
-def register():
-    bpy.types.Scene.use_webbrowser = bpy.props.BoolProperty(
-        name='Launch Browser',
-        description='Opens the page with the submitted text.',
-        default=True)
-
-    bpy.utils.register_module(__name__)
-
-def unregister():
-    del bpy.types.Scene.use_webbrowser
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()
-
-
diff --git a/release/scripts/addons_contrib/text_intellisense.py b/release/scripts/addons_contrib/text_intellisense.py
deleted file mode 100644
index 167a940..0000000
--- a/release/scripts/addons_contrib/text_intellisense.py
+++ /dev/null
@@ -1,436 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ***** END GPL LICENCE BLOCK *****
-
-bl_info = {
-	"name": "Intellisense for Text Editor",
-	"author": "Mackraken",
-	"version": (0, 2),
-	"blender": (2, 6, 0),
-	"api": 41851,
-	"location": "Ctrl + Space at Text Editor",
-	"description": "Adds intellense to the Text Editor",
-	"warning": "Only works with 2.57 intellisense",
-	"wiki_url": "",
-	"tracker_url": "",
-	"category": "Development"}
-
-import bpy
-
-def complete(context):
-	from console import intellisense
-	from console_python import get_console
-	
-	sc = context.space_data
-	text = sc.text
-	
-	region = context.region
-	for area in context.screen.areas:
-		if area.type=="CONSOLE":
-			region = area.regions[1]
-			break
-	
-	console = get_console(hash(region))[0]
-
-	line = text.current_line.body
-	cursor = text.current_character
-	
-	result  = intellisense.expand(line, cursor, console.locals, bpy.app.debug)
-	
-	return result
-
-	
-class Intellimenu(bpy.types.Menu):
-	bl_label = ""
-	bl_idname = "IntelliMenu"
-	
-	text = ""
-	
-	def draw(self, context):
-		layout = self.layout
-		#Very ugly see how can i fix this
-		options = complete(context)
-		
-		options = options[2].split("  ")
-		for op in options:
-			layout.operator("text.intellioptions", text=op).text=op
-		
-#This operator executes when hits Ctrl+Space at the text editor
-
-class Intellisense(bpy.types.Operator):
-	#"""Tooltip"""
-	bl_idname = "text.intellisense"
-	bl_label = "Text Editor Intellisense"
-	
-	text = ""
-	
-#	@classmethod
-#	def poll(cls, context):
-#		return context.active_object is not None
-
-	def execute(self, context):
-		sc = context.space_data
-		text = sc.text
-		
-		if text.current_character>0:
-			result = complete(context)
-	
-			#print(result)
-			
-			if result[2]=="":
-				text.current_line.body = result[0]
-				bpy.ops.text.move(type='LINE_END')
-			else:
-				bpy.ops.wm.call_menu(name=Intellimenu.bl_idname)
-
-		return {'FINISHED'}
-	
-#this operator completes the line with the options you choose from the menu
-class Intellioptions(bpy.types.Operator):
-	#"""Tooltip"""
-	bl_idname = "text.intellioptions"
-	bl_label = "Intellisense options"
-
-	text = bpy.props.StringProperty()
-	
-	@classmethod
-	def poll(cls, context):
-		return context.active_object is not None
-
-	def execute(self, context):
-		sc = context.space_data
-		text = sc.text
-		
-		comp = self.text
-		line = text.current_line.body
-		
-		lline = len(line)
-		lcomp = len(comp)
-		
-		#intersect text 
-		intersect = [-1,-1]
-		
-		for i in range(lcomp):
-			val1 = comp[0:i+1]
-			
-			for j in range(lline):
-				val2 = line[lline-j-1::]
-				#print("	",j, val2)
-			
-				if val1==val2:
-					intersect = [i, j]
-					break
-				
-		if intersect[0]>-1:
-			newline = line[0:lline-intersect[1]-1]+comp
-		else:
-			newline = line + comp
-			
-		#print(newline)		
-		text.current_line.body = newline
-			
-		bpy.ops.text.move(type='LINE_END')
-		   
-
-		return {'FINISHED'}
-
-def send_console(context, all=0):
-	
-	sc = context.space_data
-	text = sc.text
-	
-	console = None
-	
-	for area in bpy.context.screen.areas:
-		if area.type=="CONSOLE":
-			from console_python import get_console
-				
-			console = get_console(hash(area.regions[1]))[0]
-
-	if console==None:
-		return {'FINISHED'}
-	
-	if all:
-		
-		for l in text.lines:
-			console.push(l.body)
-			
-	else:
-		#print(console.prompt)
-		console.push(text.current_line.body)
-	
-	
-	
-	
-class TestLine(bpy.types.Operator):
-	#"""Tooltip"""
-	bl_idname = "text.test_line"
-	bl_label = "Test line"
-
-	all = bpy.props.BoolProperty(default=False)
-	
-	
-#   @classmethod
-#   def poll(cls, context):
-#	   return context.active_object is not None
-
-	def execute(self, context):
-		#print("test line")
-		
-		#send_console(context, self.all)
-		sc = context.space_data
-		text = sc.text
-		
-		line = text.current_line.body
-		console = None
-		
-		for area in bpy.context.screen.areas:
-			if area.type=="CONSOLE":
-				from console_python import get_console
-					
-				console = get_console(hash(area.regions[1]))[0]
-		
-		if console==None:
-			return {'FINISHED'}
-				
-		command = ""
-			
-		forindex = line.find("for ")
-		if forindex >-1:
-			
-			var = line[forindex+4:-1]
-			var = var[0:var.find(" ")]
-			state = line[line.rindex(" ")+1:-1]
-			 
-			command = var + " = " +state+"[0]"
-			
-				
-		else:
-			command = line
-			
-		#print(command)
-		try:
-			console.push(command)
-		except:
-			pass
-		
-		bpy.ops.text.line_break()
-		
-
-		return {'FINISHED'}
-class SetBreakPoint(bpy.types.Operator):
-	bl_idname = "text.set_breakpoint"
-	bl_label = "Set Breakpoint"
-	
-	def execute(self, context):
-		
-		sc = bpy.context.space_data
-		text = sc.text
-		
-		line = text.current_line
-		br = " #breakpoint"
-		#print(line.body.find(br))
-		if line.body.find(br)>-1:
-			
-			line.body = line.body.replace(br, "")
-		else:
-			
-			line.body += br
-		
-		return {'FINISHED'}
-
-class Debug(bpy.types.Operator):
-	bl_idname = "text.debug"
-	bl_label = "Debug"
-	
-	def execute(self, context):
-		
-		binpath = bpy.app.binary_path
-			
-		addonspath = binpath[0:binpath.rindex("\\")+1]+str(bpy.app.version[0])+"."+str(bpy.app.version[1])+"\\scripts\\addons\\"
-		
-		print(addonspath)
-			
-		sc = context.space_data
-		text = sc.text
-		
-		br = " #breakpoint"
-	
-		filepath = addonspath+"debug.py"
-		file = open(filepath, "w")
-		file.write("import pdb\n")
-		
-		for line in text.lines:
-			l = line.body
-			
-			if line.body.find(br)>-1:
-				indent = ""
-				for letter in line.body:
-					
-					if not letter.isalpha():
-						indent+=letter
-					else:
-						break
-				file.write(l[0:-len(br)]+"\n")
-				
-				file.write(indent+"pdb.set_trace()\n")
-				
-			else:
-				file.write(line.body+"\n")
-						
-				
-		
-		file.close()
-		
-		import pdb
-		import debug
-		
-		pdb.runcall("debug")	
-		
-		
-		return {'FINISHED'}
-
-
-class DebugPanel(bpy.types.Panel):
-	bl_label = "Debug"
-	bl_idname = "text.test_line"
-	bl_space_type = "TEXT_EDITOR"
-	bl_region_type = "UI"
-	#bl_context = "object"
-
-	text = bpy.props.StringProperty()
-	
-	def draw(self, context):
-		layout = self.layout
-		row = layout.row()
-		
-		text = self.text
-		row = layout.row()
-		row.operator("text.debug", text ="Debug")
-		row = layout.row()
-		row.operator("text.set_breakpoint")
-		row = layout.row()
-		row.operator("text.test_line").all=False
-		row = layout.row()
-		row.operator("text.test_line", text ="Test All").all=True
-		
-		row = layout.row()
-		row.label(text="Coming Soon ...")
-
-
-### ASSIGN A KEY
- 
-#section = Input section. "Window, Text, ..."
-#name = operator name or wm.call_menu 
-#type = key 
-#event = keyboard event (Press, release, ...)
-#mods = array containing key modifiers (["ctrl", "alt", "shift"]
-#propvalue = menu name, if name is set to "wm.call_menu"
-#overwrite doesnt work at the moment
-
-def assignKey(section, name, type, event, mods=[],propvalue = "",  overwrite=0):
-	
-	kconf = bpy.context.window_manager.keyconfigs.active
-	
-	
-	#check section
-	validsections = [item.name for item in kconf.keymaps]
-	if not section in validsections:
-		print(section  + " is not a valid section.")
-		#print(validsections)	
-		return False
-	
-	#check type
-	type = type.upper()
-	validkeys = [item.identifier for item in bpy.types.KeyMapItem.bl_rna.properties['type'].enum_items]
-	if not type in validkeys:
-		print(type + " is not a valid key.")
-		#print(validkeys)
-		return False
-
-
-	#check event
-	event = event.upper()   
-	validevents = [item.identifier for item in bpy.types.KeyMapItem.bl_rna.properties['value'].enum_items]
-	if not event in validevents:
-		print(event + " is not a valid event.")
-		#print(validevents)
-		
-	kmap = kconf.keymaps[section] 
-
-	
-#   get mods
-	for i, mod in enumerate(mods):
-		mods[i]= mod.lower()
-		
-	#any, shift, ctrl, alt, oskey
-	kmod = [False, False, False, False, False]
-	
-	if "any" in mods: kmod[0] = True
-	if "shift" in mods: kmod[1] = True
-	if "ctrl" in mods: kmod[2] = True
-	if "alt" in mods: kmod[3] = True
-	if "oskey" in mods: kmod[4] = True
-	
-#   #check if key exist
-	kexists = False
-  
-	for key in kmap.keymap_items:
-		keymods = [key.any, key.shift, key.ctrl, key.alt, key.oskey]
-		if key.type == type and keymods == kmod:
-			kexists = True
-			print(key,"key exists")
-			break
-			
-	if kexists:
-		#overwrite?
-		if overwrite:
-			key.idname=name
-			
-			#key.type = type
-		
-	else:
-		#create key
-		key = kmap.keymap_items.new(name, type, event, False)
-		key.any = kmod[0]
-		key.shift = kmod[1]
-		key.ctrl = kmod[2]
-		key.alt = kmod[3]
-		key.oskey = kmod[4]
-				
-		if propvalue!="": key.properties.name = propvalue
-
-
-
-
-classes = [Intellisense, Intellioptions, Intellimenu, DebugPanel, TestLine, SetBreakPoint, Debug]
-
-def register():
-	
-	for c in classes:
-		bpy.utils.register_class(c)
-
-	assignKey("Text", "text.intellisense", "SPACE", "Press",  ["ctrl"])
-	assignKey("Text", "text.test_line", "RET", "Press", [],"",1)
-
-def unregister():
-	for c in classes:
-		bpy.utils.unregister_class(c)
-
-if __name__ == "__main__":
-	register()
diff --git a/release/scripts/addons_contrib/ui_layer_manager.py b/release/scripts/addons_contrib/ui_layer_manager.py
deleted file mode 100644
index e682e7c..0000000
--- a/release/scripts/addons_contrib/ui_layer_manager.py
+++ /dev/null
@@ -1,762 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-#
-bl_info = {
-    'name': 'Layer Management',
-    'author': 'Alfonso Annarumma',
-    'version': (1,4),
-    'blender': (2, 6, 3),
-    'location': 'View3D > Properties panel > Layer Management',
-    'warning': '',
-    'description': 'Display and Edit Layer Name',
-    'wiki_url': "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-                "Scripts/3D_interaction/layer_manager",
-    'tracker_url': "http://projects.blender.org/tracker/index.php?"\
-                   "func=detail&aid=32472",
-    'category': '3D View'}
-    
-import bpy
-from bpy.props import StringProperty, BoolProperty, IntProperty, CollectionProperty, BoolVectorProperty
-
-EDIT = ["EDIT_MESH", "EDIT_CURVE", "EDIT_SURFACE", "EDIT_METABALL", "EDIT_TEXT", "EDIT_ARMATURE"]
-
-class LayerGroups(bpy.types.PropertyGroup):
-    
-    toggle    = BoolProperty(name="",default=False)
-    
-    lock    = BoolProperty(name="",default=False)
-
-    layer_groups = BoolVectorProperty(name="Layer Groups", default = ([False]*20), size=20, subtype='LAYER')
-    
-    # A list of identifiers (colon-separated strings) which property’s controls should be displayed
-    # in a template_list.
-    # Note that the order is respected.
-    #template_list_controls = StringProperty(default="toggle", options={"HIDDEN"})
- 
-bpy.utils.register_class(LayerGroups)
- 
-bpy.types.Scene.layergroups = CollectionProperty(type=LayerGroups)
-# Unused, but this is needed for the TemplateList to work…
-bpy.types.Scene.layergroups_index = IntProperty(default=-1)
-
-class RemoveLayerGroup(bpy.types.Operator):
-    '''Tooltip'''
-    bl_idname = "object.layergroup_remove"
-    bl_label = "Remove select Layer Group"
-    
-    index_group = bpy.props.IntProperty()
-    
-    @classmethod
-    def poll(cls, context):
-        return context.scene is not None
-
-    def execute(self, context):
-        scene = context.scene
-        
-        index_group =self.index_group
-        
-        scene.layergroups.remove(index_group)
-       
-        scene.layergroups_index= index_group-1
-        
-        return {'FINISHED'}
-
-class AddLayerGroup(bpy.types.Operator):
-    '''Tooltip'''
-    bl_idname = "object.layergroup_add"
-    bl_label = "Add select Layer group"
-    
-    index = bpy.props.IntProperty()
-    layer = layer = BoolVectorProperty(name="Layer", default = ([False]*20), size=20)
-    
-    @classmethod
-    def poll(cls, context):
-        return context.scene is not None
-
-    def execute(self, context):
-        
-        scene = context.scene
-        layergroups = scene.layergroups
-        
-        index = self.index
-        layer = self.layer
-        
-        item = layergroups.add()
-        index_number= str(index)
-
-        if len(index_number)==2:
-            index_number = "0"+index_number
-            if len(index_number)==3:
-                index_number = index_number
-        else:
-            index_number = "00"+index_number
-        item.name= 'LayerGroup.'+index_number
-        #item.use=True
-        scene.layergroups_index= index
-        scene.layergroups[index].layer_groups = layer
-        
-        return {'FINISHED'}
-
-class LayerToggle(bpy.types.Operator):
-    '''Visualize this Layer, Shift-Click to select multiple layers'''
-    bl_idname = "object.layertoggle"
-    bl_label = "Visualize this layer"
-    
-    #prop definition
-    #layer number
-    layerN = bpy.props.IntProperty()
-    spacecheck = bpy.props.BoolProperty()
-    index_group = bpy.props.IntProperty()
-
-    @classmethod
- 
-    def poll(cls, context):
-        
-        return context.scene
-
-    def execute(self, context):
-
-        spacecheck = self.spacecheck
-        scene = context.scene
-        
-        layerN = self.layerN
-
-        if spacecheck:
-            
-            space = context.area.spaces.active
-        else:
-            space = context.scene
-
-        if layerN==-1:
-            index = self.index_group
-            groups = scene.layergroups[index].layer_groups
-            layergroups = scene.layergroups[index]
-            
-            layers = space.layers
-            union= [False]*20
-            
-            if not layergroups.toggle:
-                for i in range(0,20):
-                    
-                    union[i]= groups[i] or layers[i]
-
-                space.layers=union  
-                layergroups.toggle=True
-            else:
-                for i in range(0,20):
-                    
-                    union[i]=  not groups[i]  and layers[i]
-
-                space.layers=union  
-                layergroups.toggle=False
-                        
-        else:
-        
-            if self.shift:
-                
-                if space.layers[layerN]:
-                    toggle = False
-                else:
-
-                    toggle= True                            
-                space.layers[layerN]=toggle
-            
-            else:
-
-                layer = [False]*20
-                layer[layerN]=True
-                space.layers=layer
-
-                if space.layers[layerN]:
-                    toggle = False   
-
-        return {'FINISHED'}
-    def invoke(self, context, event):
-        self.shift = event.shift
-        
-        return self.execute(context)
-
-class MergeSelected(bpy.types.Operator):
-    '''Move Selected Objects in this Layer Shift-Click to select multiple layers'''
-    bl_idname = "object.mergeselected"
-    bl_label = "Merge Selected object in this layer"
-    
-    #prop definition
-    #layer number
-    layerN = bpy.props.IntProperty()
-
-    @classmethod
- 
-    def poll(cls, context):
-        
-        return context.scene
-
-    def execute(self, context):
-        
-        layerN = self.layerN
-        
-        scene= context.scene
-           
-        #cyecle all object in the layer 
-        
-        for obj in scene.objects:
-            
-            if obj.select:
-                visible=False
-                
-                for i in range(0,20):
-                    if obj.layers[i] and scene.layers[i]:
-                        visible=True
-                        break
-               
-                if visible:
-                    if self.shift:
-                        
-                        if obj.layers[layerN]:
-                            toggle = False
-                        else:
-
-                            toggle= True                            
-                        obj.layers[layerN]=toggle
-                    
-                    else:
-
-                        layer = [False]*20
-                        layer[layerN]=True
-                        obj.layers=layer
-
-                        if obj.layers[layerN]:
-                            toggle = False   
-
-        return {'FINISHED'}
-    
-    def invoke(self, context, event):
-        self.shift = event.shift
-        
-        return self.execute(context)
-
-class LockSelected(bpy.types.Operator):
-    '''Loock All Objects on this Layer'''
-    bl_idname = "object.lockselected"
-    bl_label = "Hide Select of Selected"
-    
-    #prop definition
-    #layer number
-    layerN = bpy.props.IntProperty()
-    
-    #lock status
-    lock = bpy.props.BoolProperty()
-
-    index_group = bpy.props.IntProperty()
-    
-    @classmethod
-    
-    def poll(cls, context):
-        
-        return context.scene
-
-    def execute(self, context):
-        
-        scene = context.scene
-        layerN = self.layerN
-        lock =self.lock  
-        
-        view_3d = context.area.spaces.active
-        
-        #check if layer have some thing
-        if view_3d.layers_used[layerN] or  layerN==-1:
-            
-            #cyecle all object in the layer 
-            for obj in context.scene.objects:
-                
-                if layerN==-1:
-                    
-                    index = self.index_group
-                    groups = scene.layergroups[index].layer_groups
-                    layers = obj.layers
-                    
-                    layergroup=[False]*20
-
-                    for i in range (0,20):
-                        layergroup[i]= layers[i] and groups[i]
-                    
-                    if True in layergroup:
-                        obj.hide_select=not lock
-                        obj.select=False
-
-                        scene.layergroups[index].lock=not lock
-
-                else:
-                    if obj.layers[layerN]:
-                        obj.hide_select=not lock
-                        obj.select=False
-
-                        scene.LockLayer[layerN]= not lock
-
-        return {'FINISHED'}
-
-class SelectObjectsLayer(bpy.types.Operator):
-    '''Select All the Objects on this Layer'''
-    bl_idname = "object.selectobjectslayer"
-    bl_label = "Select objects in Layer"
-    
-    select_obj = bpy.props.BoolProperty()
-    layerN = bpy.props.IntProperty()
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene
-
-    def execute(self, context):
-        
-        view_3d = context.area.spaces.active
-        select_obj= self.select_obj
-        layerN = self.layerN
-        scene = context.scene
-        i=0
-        s=0
-        #check if layer have some thing       
-        if view_3d.layers_used[layerN]:
-     
-            for obj in context.scene.objects:
-
-                if obj.layers[layerN]:
-                    i = i+1
-                if obj.layers[layerN] and obj.select:
-                    s = s+1
-
-            if s==i:
-                for obj in context.scene.objects:
-                        
-                    if obj.layers[layerN]:
-                        obj.select=False
-
-            else:
-                bpy.ops.object.select_by_layer(extend=True, layers=layerN+1)        
-
-        return {'FINISHED'}
-
-class AllLayersSelect(bpy.types.Operator):
-    '''Active all Layer in scene'''
-    bl_idname = "scene.layersselect"
-    bl_label = "Select All Layer"
-    
-    vis = bpy.props.BoolProperty()
-
-    @classmethod
-    def poll(cls, context):
-        return context.scene
-
-    def execute(self, context):
-        
-        scene = context.scene
-        vis = self.vis
-        #store the active layer
-        active = scene.active_layer
-        
-        view_3d = context.area.spaces.active
-                #check for lock camera and layer is active
-        if view_3d.lock_camera_and_layers is True:
-            space= scene
-
-        else:
-            space= view_3d         
-
-        if not vis:
-            for i in range (0,20):           
-            
-                 #keep selection of active layer
-                if active == i:
-                    space.layers[i]= True
-                
-                #deselect the other...
-                else: 
-                    space.layers[i]= False
-
-        else:
-            for i in range (0,20):     
-                #select all layer
-                space.layers[i]=True
-                
-            #after the cycle, deselect and select the previus active layer        
-            space.layers[active]=False
-            space.layers[active]=True
-        return {'FINISHED'}
-
-class LayerName(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Layer Management"
-    bl_idname = "_PT_rig_layers"
-    bl_options = {'DEFAULT_CLOSED'}
-    
-    # layer name prop definition
-    bpy.types.Scene.LayerName1 = bpy.props.StringProperty(name="Layer Name", default='layer1')
-    bpy.types.Scene.LayerName2 = bpy.props.StringProperty(name="Layer Name", default='layer2')
-    bpy.types.Scene.LayerName3 = bpy.props.StringProperty(name="Layer Name", default='layer3')
-    bpy.types.Scene.LayerName4 = bpy.props.StringProperty(name="Layer Name", default='layer4')
-    bpy.types.Scene.LayerName5 = bpy.props.StringProperty(name="Layer Name", default='layer5')
-    bpy.types.Scene.LayerName6 = bpy.props.StringProperty(name="Layer Name", default='layer6')
-    bpy.types.Scene.LayerName7 = bpy.props.StringProperty(name="Layer Name", default='layer7')
-    bpy.types.Scene.LayerName8 = bpy.props.StringProperty(name="Layer Name", default='layer8')
-    bpy.types.Scene.LayerName9 = bpy.props.StringProperty(name="Layer Name", default='layer9')
-    bpy.types.Scene.LayerName10 = bpy.props.StringProperty(name="Layer Name", default='layer10')
-    bpy.types.Scene.LayerName11 = bpy.props.StringProperty(name="Layer Name", default='layer11')
-    bpy.types.Scene.LayerName12 = bpy.props.StringProperty(name="Layer Name", default='layer12')
-    bpy.types.Scene.LayerName13 = bpy.props.StringProperty(name="Layer Name", default='layer13')
-    bpy.types.Scene.LayerName14 = bpy.props.StringProperty(name="Layer Name", default='layer14')
-    bpy.types.Scene.LayerName15 = bpy.props.StringProperty(name="Layer Name", default='layer15')
-    bpy.types.Scene.LayerName16 = bpy.props.StringProperty(name="Layer Name", default='layer16')
-    bpy.types.Scene.LayerName17 = bpy.props.StringProperty(name="Layer Name", default='layer17')
-    bpy.types.Scene.LayerName18 = bpy.props.StringProperty(name="Layer Name", default='layer18')
-    bpy.types.Scene.LayerName19 = bpy.props.StringProperty(name="Layer Name", default='layer19')
-    bpy.types.Scene.LayerName20 = bpy.props.StringProperty(name="Layer Name", default='layer20')
-    
-    #prop for hide empty
-    bpy.types.Scene.LayerVisibility = bpy.props.BoolProperty(name="Hide empty Layer", default=False)
-    
-    #prop for extra option
-    bpy.types.Scene.ExtraOptions = bpy.props.BoolProperty(name="Show extra options", default=True)
-    
-    #lock layer status
-    bpy.types.Scene.LockLayer = bpy.props.BoolVectorProperty(name="Lock Layer", default = ([False]*20), size=20)
-
-    #prop for show index
-    bpy.types.Scene.LayerIndex = bpy.props.BoolProperty(name="Show Index", default=False)
-   
-    #prop for show classic
-    bpy.types.Scene.Classic = bpy.props.BoolProperty(name="Classic", default=False,description="Use a classic layer selection visibility")
-    #Select object Status
-    bpy.types.Scene.ObjectSelect = bpy.props.BoolVectorProperty(name="Object Select", default = ([True]*20), size=20)
-      
-    #toggle for merge
-    #bpy.types.Scene.MergeToggle = bpy.props.BoolVectorProperty(name="Merge Toggle", default = (False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False,False), size=20)
-
-    @classmethod
-    def poll(self, context):
-        try:
-            return (context.mode not in EDIT)
-        except (AttributeError, KeyError, TypeError):
-            return False
-
-    def draw(self, context):
-
-        scene = context.scene
-
-        view_3d = context.area.spaces.active
-                #check for lock camera and layer is active
-        if view_3d.lock_camera_and_layers is True:
-            space= scene
-            spacecheck=False
-            
-        else:
-            space= view_3d  
-            spacecheck=True     
-        
-        #row = layout.row(align=True)
-
-        vis=False
-        allIcon='RESTRICT_VIEW_OFF'
-        allText="Isolate active"
-
-        #check if there is a layer off
-        for layer in space.layers:
-            
-            if not layer:
-                vis=True
-                allIcon='RESTRICT_VIEW_ON'
-                allText="All Visible"
-
-        layout = self.layout
-        column = layout.column()
-        row = column.row()
-        col2= row.column()
-           
-        #lock camera and layers button 
-           
-        col2.prop(view_3d, "lock_camera_and_layers", text="")
-        
-        #select all
-        
-        allView = col2.operator("scene.layersselect", emboss=False, icon=allIcon, text="")
-        allView.vis=vis
-        
-        col= row.column()  
-        col.alignment='RIGHT'
-        #classic
-        col.prop(scene, "Classic", text="Classic")
-        
-        #show extra option checkbox
-        
-        col.alignment='RIGHT'
-        col.prop(scene, "ExtraOptions", text="Options")
-
-        col1= row.column()  
-
-        #show index        
-        col1.prop(scene, "LayerIndex", text="Index")
-        
-        # hide empty
-
-        if context.object:
-            col1.alignment='RIGHT'
-            col1.prop(scene, "LayerVisibility", toggle=False, text="Hide Empty")        
-
-        ##########
-
-        #list the layer
-        for i in range(0,20): 
-
-            #inizializing the icon 
-            #lockIcon='UNLOCKED'            
-            iconUsed= 'RADIOBUT_OFF'
-            iconAc='NONE'
-            iconLayer='NONE'
-            #selectIcon ='RESTRICT_SELECT_OFF'
-            #inizializing the bool value
-            noitem = False
-            
-            active=False
-            
-            layer=20
-            scene = context.scene
-            
-            extra = scene.ExtraOptions
-            
-            layer_used = view_3d.layers_used[i]
-            
-            #check the hide empty value
-            if scene.LayerVisibility:
-               
-                #find the empty layer                  
-                if layer_used:
-                    #print (i)
-                    layer = i
-                
-                    'Add ad object to see the layer' 
-            else:
-                layer=i
-                #the layer number
-                            
-            #set icon for lock layer
-            lock = scene.LockLayer[i]
-                     
-            if lock:
-                lockIcon= 'LOCKED'
-            else:
-                lockIcon= 'UNLOCKED'
-
-            #check if there are Selected obj in the layer
-
-            #check if layer have some thing       
-            if layer_used:
-               
-                iconUsed= 'LAYER_USED'
-                
-                active_object = context.object
-                
-                if active_object:
-                    
-                    if context.object.layers[i]:
-                        
-                        active = True     
-
-            else:
-                scene.ObjectSelect[i]= True
-
-            if layer ==i:
-
-                #check for active layer and set the icon 
-                if view_3d.lock_camera_and_layers:
-                   
-                    if scene.active_layer==layer:
-                        iconAc = 'FILE_TICK'
-                        noitem = True
-                
-                if active:
-                    iconUsed = 'LAYER_ACTIVE'
-
-                #set icon for layer view        
-                if view_3d.layers[layer]:
-                    viewIcon = 'RESTRICT_VIEW_OFF'
-                    noitem = True
-                else:
-                    viewIcon = 'RESTRICT_VIEW_ON'
-                    noitem = False
-
-                row2=column.row(align=True)
-#                if space==scene:
-#                    
-#                    colb1= row2.column()
-#                    #layer visibility operator   
-#                    tog = colb1.operator("view3d.layers", text="",icon=viewIcon, emboss=False)
-#                    tog.nr=layer+1
-#                    tog.toggle=True
-#                    viewemboss = True
-                
-                iconLayer=viewIcon
-
-                # layer index
-                if scene.LayerIndex:
-                    
-                    col6 = row2.column()
-                    col6.scale_x=0.14
-                    col6.label(text=str(i+1)+".")
-                
-                # visualization 
-                classic = scene.Classic
-                if not classic:
-                    
-                    colb2= row2.column()
-                    colb2.prop(space, "layers", index=layer, emboss=True, icon=iconLayer, toggle=True, text="")
-                else:    
-                    colb6 = row2.column() 
-                    used = colb6.operator("object.layertoggle", text="", icon= iconLayer, emboss=True)
-                    used.layerN=i
-                    used.spacecheck=spacecheck
-
-                #text prop
-                s = "LayerName"+str(i+1)
-                colb3= row2.column()
-                colb3.prop(scene,s,text="",icon=iconAc)
-
-                if extra:
-
-                    #Select by type operator
-                    colb4 = row2.column()
-                    select = colb4.operator("object.selectobjectslayer", icon='RESTRICT_SELECT_OFF',text="", emboss=True ) 
-                    select.layerN = i 
-                    #select.select_obj= selobj
-
-                    #lock operator 
-                    colb5 = row2.column()   
-                    lk = colb5.operator("object.lockselected", text="", emboss=True, icon= lockIcon)
-                    
-                    lk.layerN = i
-                    lk.lock=lock
-
-    #                #occuped layer
-    #                colb6.label(text="", icon=iconUsed)
-
-                    #merge layer
-                    colb7 = row2.column()
-                    merge = colb7.operator("object.mergeselected", text="", emboss=True, icon= iconUsed)
-                    merge.layerN=i
-
-                if not scene.LayerVisibility:
-                    if i==4 or i==9 or i==14 or i==19:
-                        row3 = column.row() 
-                        row3.separator()
-        if len(scene.objects)==0:            
-            layout.label(text='No objects in scene')
-class LayerGroupsUI(bpy.types.Panel):
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'UI'
-    bl_label = "Layer Groups"
-    bl_idname = "_PT_layer_group"
-    bl_options = {'DEFAULT_CLOSED'}     
-
-    @classmethod
-    def poll(self, context):
-        try:
-            return (context.mode not in EDIT)
-        except (AttributeError, KeyError, TypeError):
-            return False
-
-    def draw(self, context):
-
-        scene = context.scene
-        view_3d = context.area.spaces.active
-
-        #check for lock camera and layer is active
-        if view_3d.lock_camera_and_layers is True:
-            space= scene
-            spacecheck = False
-        else:
-            space= view_3d  
-            spacecheck = True   
-        #######################
-        
-        index_group =  scene.layergroups_index   
-        items =len(scene.layergroups) 
-        viewIcon = 'RESTRICT_VIEW_OFF'
-        layout = self.layout
-        row = layout.row()
-        row.template_list(context.scene, "layergroups", context.scene, "layergroups_index", rows=items)
-        col =row.column(align =True)
-        add = col.operator("object.layergroup_add", icon='ZOOMIN', text="")        
-        add.index= items
-        add.layer= scene.layers               
-        remove = col.operator("object.layergroup_remove", icon='ZOOMOUT', text="")
-        remove.index_group= index_group         
-        if index_group >= 0:
-
-            lock=scene.layergroups[index_group].lock
-            toggle = scene.layergroups[index_group].toggle
-            if lock:
-                iconLock= 'LOCKED'
-            else:
-                iconLock='UNLOCKED'
-            
-            lk = col.operator("object.lockselected", text="", emboss=True, icon= iconLock)                        
-            lk.index_group = index_group
-            lk.lock=lock
-            lk.layerN=-1
-
-            #set icon for layer view        
-            if toggle:
-                iconLayer = 'RESTRICT_VIEW_OFF'
-                #noitem = True
-            else:
-                iconLayer = 'RESTRICT_VIEW_ON'
-                #noitem = False
-            
-            view = col.operator("object.layertoggle", text="", icon= iconLayer, emboss=True)
-            view.index_group = index_group
-            view.layerN=-1
-            view.spacecheck=spacecheck
-
-            layout.prop(scene.layergroups[index_group], "layer_groups", text="", toggle=True)
-            layout.prop(scene.layergroups[index_group], "name", text="Name:")
- 
-def register():
-    
-    bpy.utils.register_class(AddLayerGroup)
-    bpy.utils.register_class(RemoveLayerGroup)
-    bpy.utils.register_class(LayerGroupsUI)
-    bpy.utils.register_class(AllLayersSelect)
-    bpy.utils.register_class(LayerToggle)
-    bpy.utils.register_class(MergeSelected)
-    bpy.utils.register_class(LayerName)
-    bpy.utils.register_class(LockSelected)
-    bpy.utils.register_class(SelectObjectsLayer)
-
-def unregister():
-    bpy.utils.unregister_class(AddLayerGroup)
-    bpy.utils.unregister_class(RemoveLayerGroup)
-    bpy.utils.unregister_class(LayerGroupsUI)
-    bpy.utils.unregister_class(LayerName)
-    bpy.utils.uregister_class(AllLayersSelect)
-    bpy.utils.unregister_class(LayerToggle)
-    bpy.utils.uregister_class(MergeSelected)
-    bpy.utils.unregister_class(LockSelected)
-    bpy.utils.unregister_class(SelectObjectsLayer)
-if __name__ == "__main__":
-    register()
diff --git a/release/scripts/addons_contrib/wetted_mesh.py b/release/scripts/addons_contrib/wetted_mesh.py
deleted file mode 100644
index 41de811..0000000
--- a/release/scripts/addons_contrib/wetted_mesh.py
+++ /dev/null
@@ -1,373 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-bl_info = {
-    "name": "Add Wetted Mesh",
-    "author": "freejack",
-    "version": (0, 2, 1),
-    "blender": (2, 5, 8),
-    "location": "View3D > Tool Shelf > Wetted Mesh Panel",
-    "description": "Adds separated fluid, dry and wetted mesh for selected pair.",
-    "warning": "",
-    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
-        "Scripts/Mesh/Wetted_Mesh",
-    "tracker_url": "http://projects.blender.org/tracker/index.php?"\
-        "func=detail&aid=27156",
-    "category": "Mesh"}
-
-import bpy
-import collections
-import math
-
-### Tool Panel ###
-class VIEW3D_PT_tools_WettedMesh(bpy.types.Panel):
-    """Wetted Mesh Tool Panel"""
-    bl_space_type = 'VIEW_3D'
-    bl_region_type = 'TOOLS'
-    bl_label = 'Wetted Mesh'
-    bl_context = 'objectmode'
-    bl_options = {'DEFAULT_CLOSED'}
-
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column(align=True)
-        slcnt = len(context.selected_objects)
-
-        if slcnt != 2:
-            col.label(text = 'Select two mesh objects')
-            col.label(text = 'to generate separated')
-            col.label(text = 'fluid, dry and wetted')
-            col.label(text = 'meshes.')
-        else:
-            (solid, fluid) = getSelectedPair(context)
-            col.label(text = 'solid = '+solid.name)
-            col.label(text = 'fluid = '+fluid.name)
-            col.operator('mesh.primitive_wetted_mesh_add', text='Generate Meshes')
-
-### Operator ###
-class AddWettedMesh(bpy.types.Operator):
-    """Add wetted mesh for selected mesh pair"""
-    bl_idname = "mesh.primitive_wetted_mesh_add"
-    bl_label = "Add Wetted Mesh"
-    bl_options = {'REGISTER', 'UNDO'}
-    statusMessage = ''
-
-    def draw(self, context):
-        layout = self.layout
-        col = layout.column(align=True)
-        col.label(text = self.statusMessage)
-
-    def execute(self, context):
-        # make sure a pair of objects is selected
-        if len(context.selected_objects) != 2:
-            # should not happen if called from tool panel
-            self.report({'WARNING'}, "no mesh pair selected, operation cancelled")
-            return {'CANCELLED'}
-
-        print("add_wetted_mesh begin")
-        
-        # super-selected object is solid, other object is fluid
-        (solid, fluid) = getSelectedPair(context)
-        print("   solid = "+solid.name)
-        print("   fluid = "+fluid.name)
-            
-        # make a copy of fluid object, convert to mesh if required
-        print("   copy fluid")
-        bpy.ops.object.select_all(action='DESELECT')
-        fluid.select = True
-        context.scene.objects.active = fluid
-        bpy.ops.object.duplicate()
-        bpy.ops.object.convert(target='MESH', keep_original=False)
-        bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
-        fluidCopy = context.object
-        
-        # substract solid from fluidCopy
-        print("   bool: fluidCopy DIFFERENCE solid")
-        bpy.ops.object.modifier_add(type='BOOLEAN')
-        bop = fluidCopy.modifiers.items()[0]
-        bop[1].operation = 'DIFFERENCE'
-        bop[1].object = solid
-        bpy.ops.object.modifier_apply(apply_as='DATA', modifier=bop[0])
-        fluidMinusSolid = fluidCopy
-        fluidMinusSolid.name = "fluidMinusSolid"
-        
-        # make a second copy of fluid object
-        print("   copy fluid")
-        bpy.ops.object.select_all(action='DESELECT')
-        fluid.select = True
-        context.scene.objects.active = fluid
-        bpy.ops.object.duplicate()
-        bpy.ops.object.convert(target='MESH', keep_original=False)
-        bpy.ops.object.transform_apply(location=True, rotation=True, scale=True)
-        fluidCopy = context.object
-        
-        # make union from fluidCopy and solid
-        print("   bool: fluidCopy UNION solid")
-        bpy.ops.object.modifier_add(type='BOOLEAN')
-        bop = fluidCopy.modifiers.items()[0]
-        bop[1].operation = 'UNION'
-        bop[1].object = solid
-        bpy.ops.object.modifier_apply(apply_as='DATA', modifier=bop[0])
-        fluidUnionSolid = fluidCopy
-        fluidUnionSolid.name = "fluidUnionSolid"
-        
-        # index meshes
-        print("   KDTree index fluidMinusSolid")
-        fluidMinusSolidKDT = KDTree(3, fluidMinusSolid.data.vertices)
-        print("   KDTree index fluidUnionSolid")
-        fluidUnionSolidKDT = KDTree(3, fluidUnionSolid.data.vertices)
-        kdtrees = (fluidMinusSolidKDT, fluidUnionSolidKDT)
-        
-        # build mesh face sets
-        faceDict = { }
-        vertDict = { }
-        
-        print("   processing fluidMinusSolid faces")
-        cacheDict = { }
-        setFMSfaces = set()
-        numFaces = len(fluidUnionSolid.data.faces)
-        i = 0
-        for f in fluidMinusSolid.data.faces:
-            if i % 500 == 0:
-                print("      ", i, " / ", numFaces)
-            i += 1
-            fuid = unifiedFaceId(kdtrees, f, fluidMinusSolid.data.vertices, \
-                                 faceDict, vertDict, cacheDict)
-            setFMSfaces.add(fuid)
-        
-        print("   processing fluidUnionSolid faces")
-        cacheDict = { }
-        setFUSfaces = set()
-        numFaces = len(fluidUnionSolid.data.faces)
-        i = 0
-        for f in fluidUnionSolid.data.faces:
-            if i % 500 == 0:
-                print("      ", i, " / ", numFaces)
-            i += 1
-            fuid = unifiedFaceId(kdtrees, f, fluidUnionSolid.data.vertices, \
-                                 faceDict, vertDict, cacheDict)
-            setFUSfaces.add(fuid)
-        
-        # remove boolean helpers
-        print("   delete helper objects")
-        bpy.ops.object.select_all(action='DESELECT')
-        fluidUnionSolid.select = True
-        fluidMinusSolid.select = True
-        bpy.ops.object.delete()
-
-        # wetted = FMS - FUS
-        print("   set operation FMS diff FUS")
-        setWetFaces = setFMSfaces.difference(setFUSfaces)
-        print("   build wetted mesh")
-        verts, faces = buildMesh(setWetFaces, faceDict, vertDict)
-        print("   create wetted mesh")
-        wetted = createMesh("Wetted", verts, faces)
-
-        # fluid = FMS x FUS
-        print("   set operation FMS intersect FUS")
-        setFluidFaces = setFMSfaces.intersection(setFUSfaces)
-        print("   build fluid mesh")
-        verts, faces = buildMesh(setFluidFaces, faceDict, vertDict)
-        print("   create fluid mesh")
-        fluid = createMesh("Fluid", verts, faces)
-        
-        # solid = FUS - FMS
-        print("   set operation FUS diff FMS")
-        setSolidFaces = setFUSfaces.difference(setFMSfaces)
-        print("   build solid mesh")
-        verts, faces = buildMesh(setSolidFaces, faceDict, vertDict)
-        print("   create solid mesh")
-        solid = createMesh("Solid", verts, faces)
-        
-        # parent wetted mesh
-        print("   parent mesh")
-        bpy.ops.object.add(type='EMPTY')
-        wettedMesh = context.object
-        solid.select = True
-        fluid.select = True
-        wetted.select = True
-        wettedMesh.select = True
-        bpy.ops.object.parent_set(type='OBJECT')
-        wettedMesh.name = 'WettedMesh'
-        
-        print("add_wetted_mesh done")
-        self.statusMessage = 'created '+wettedMesh.name
-
-        return {'FINISHED'}
-
-
-### Registration ###
-def register():
-    bpy.utils.register_class(VIEW3D_PT_tools_WettedMesh)
-    bpy.utils.register_class(AddWettedMesh)
-
-
-def unregister():
-    bpy.utils.unregister_class(VIEW3D_PT_tools_WettedMesh)
-    bpy.utils.unregister_class(AddWettedMesh)
-
-if __name__ == "__main__":
-    register()
-
-
-#
-# KD tree (used to create a geometric index of mesh vertices)
-#
-
-def distance(a, b):
-    return (a-b).length
-
-Node = collections.namedtuple("Node", 'point axis label left right')
-
-class KDTree(object):
-    """A tree for nearest neighbor search in a k-dimensional space.
-
-    For information about the implementation, see
-    http://en.wikipedia.org/wiki/Kd-tree
-
-    Usage:
-    objects is an iterable of (co, index) tuples (so MeshVertex is useable)
-    k is the number of dimensions (=3)
-    
-    t = KDTree(k, objects)
-    point, label, distance = t.nearest_neighbor(destination)
-    """
-
-    def __init__(self, k, objects=[]):
-
-        def build_tree(objects, axis=0):
-
-            if not objects:
-                return None
-
-            objects.sort(key=lambda o: o.co[axis])
-            median_idx = len(objects) // 2
-            median_point = objects[median_idx].co
-            median_label = objects[median_idx].index
-
-            next_axis = (axis + 1) % k
-            return Node(median_point, axis, median_label,
-                        build_tree(objects[:median_idx], next_axis),
-                        build_tree(objects[median_idx + 1:], next_axis))
-
-        self.root = build_tree(list(objects))
-        self.size = len(objects)
-
-
-    def nearest_neighbor(self, destination):
-
-        best = [None, None, float('inf')]
-        # state of search: best point found, its label,
-        # lowest distance
-
-        def recursive_search(here):
-
-            if here is None:
-                return
-            point, axis, label, left, right = here
-
-            here_sd = distance(point, destination)
-            if here_sd < best[2]:
-                best[:] = point, label, here_sd
-
-            diff = destination[axis] - point[axis]
-            close, away = (left, right) if diff <= 0 else (right, left)
-
-            recursive_search(close)
-            if math.fabs(diff) < best[2]:
-                recursive_search(away)
-
-        recursive_search(self.root)
-        return best[0], best[1], best[2]
-
-
-#
-# helper functions
-#
-
-# get super-selected object and other object from selected pair
-def getSelectedPair(context):
-    objA = context.object
-    objB = context.selected_objects[0]
-    if objA == objB:
-        objB = context.selected_objects[1]
-    return (objA, objB)
-
-# get a unified vertex id for given coordinates
-def unifiedVertexId(kdtrees, location, vertDict):
-    eps = 0.0001
-    offset = 0
-    for t in kdtrees:
-        co, index, d = t.nearest_neighbor(location)
-        if d < eps:
-            uvid = offset + index
-            if uvid not in vertDict:
-                vertDict[uvid] = co
-            return uvid
-        offset += t.size
-    return -1
-
-# get a unified face id tuple
-#    Stores the ordered face id tuple in faceDict
-#    and the used coordinates for vertex id in vertDict.
-#    cacheDict caches the unified vertex id (lookup in kdtree is expensive).
-#    For each mesh (where the face belongs to) a separate cacheDict is expected.
-def unifiedFaceId(kdtrees, face, vertices, faceDict, vertDict, cacheDict):
-    fids = [ ]
-    for v in face.vertices:
-        uvid = cacheDict.get(v)
-        if uvid == None:
-            uvid = unifiedVertexId(kdtrees, vertices[v].co, vertDict)
-            cacheDict[v] = uvid
-        fids.append(uvid)
-    ofids = tuple(fids)
-    fids.sort()
-    fuid = tuple(fids)
-    if fuid not in faceDict:
-        faceDict[fuid] = ofids
-    return fuid
-
-# build vertex and face array from unified face sets
-def buildMesh(unifiedFaceSet, faceDict, vertDict):
-    verts = [ ]
-    nextV = 0
-    myV = { }
-    faces = [ ]
-    for uf in unifiedFaceSet:
-        of = faceDict[uf]
-        myf = [ ]
-        for uV in of:
-            v = myV.get(uV)
-            if v == None:
-                v = nextV
-                myV[uV] = nextV
-                verts.append(vertDict[uV])
-                nextV += 1
-            myf.append(v)
-        faces.append(myf)
-    return verts, faces
-
-# create mesh object and link to scene
-def createMesh(name, verts, faces):
-    me = bpy.data.meshes.new(name+"Mesh")
-    ob = bpy.data.objects.new(name, me)
-    ob.show_name = True
-    bpy.context.scene.objects.link(ob)
-    me.from_pydata(verts, [], faces)
-    me.update(calc_edges=True)
-    return ob
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index 5a44294..91b4cc0 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -91,7 +91,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
         sub.prop(cloth, "pin_stiffness", text="Stiffness")
 
         col.label(text="Pre roll:")
-        col.prop(cloth, "pre_roll", text="Frame")
+        col.prop(cloth, "pre_roll", text="Frames")
 
         # Disabled for now
         """
diff --git a/release/scripts/templates/operator_modal_view3d_raycast.py b/release/scripts/templates/operator_modal_view3d_raycast.py
index 3236c08..eac7692 100644
--- a/release/scripts/templates/operator_modal_view3d_raycast.py
+++ b/release/scripts/templates/operator_modal_view3d_raycast.py
@@ -16,7 +16,6 @@ def main(context, event, ray_max=10000.0):
     ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)
     ray_target = ray_origin + (view_vector * ray_max)
 
-    scene.cursor_location = ray_target
 
     def visible_objects_and_duplis():
         """Loop over (object, matrix) pairs (mesh only)"""
@@ -58,7 +57,9 @@ def main(context, event, ray_max=10000.0):
         if obj.type == 'MESH':
             hit, normal, face_index = obj_ray_cast(obj, matrix)
             if hit is not None:
-                length_squared = (hit - ray_origin).length_squared
+                hit_world = matrix * hit
+                scene.cursor_location = hit_world
+                length_squared = (hit_world - ray_origin).length_squared
                 if length_squared < best_length_squared:
                     best_length_squared = length_squared
                     best_obj = obj
@@ -67,6 +68,7 @@ def main(context, event, ray_max=10000.0):
     # we could do lots of stuff but for the example just select.
     if best_obj is not None:
         best_obj.select = True
+        context.scene.objects.active = best_obj
 
 
 class ViewOperatorRayCast(bpy.types.Operator):
@@ -105,3 +107,4 @@ def unregister():
 
 if __name__ == "__main__":
     register()
+
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index b624d0f..e6f3cd3 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -50,7 +50,7 @@ extern "C" {
 
 /* used by packaging tools */
 /* can be left blank, otherwise a,b,c... etc with no quotes */
-#define BLENDER_VERSION_CHAR    
+#define BLENDER_VERSION_CHAR    a
 /* alpha/beta/rc/release, docs use this */
 #define BLENDER_VERSION_CYCLE   release
 
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index bc081b7..b9bb67f 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -62,6 +62,7 @@ void  BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const shor
 void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id);
 void id_lib_extern(struct ID *id);
 void BKE_library_filepath_set(struct Library *lib, const char *filepath);
+void id_us_ensure_real(struct ID *id);
 void id_us_plus(struct ID *id);
 void id_us_min(struct ID *id);
 
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index ec07032..6c9dc0f 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -88,7 +88,7 @@ int  BKE_object_is_libdata(struct Object *ob);
 int  BKE_object_obdata_is_libdata(struct Object *ob);
 
 void BKE_object_scale_to_mat3(struct Object *ob, float mat[][3]);
-void BKE_object_rot_to_mat3(struct Object *ob, float mat[][3]);
+void BKE_object_rot_to_mat3(struct Object *ob, float mat[][3], short use_drot);
 void BKE_object_mat3_to_rot(struct Object *ob, float mat[][3], short use_compat);
 void BKE_object_to_mat3(struct Object *ob, float mat[][3]);
 void BKE_object_to_mat4(struct Object *ob, float mat[][4]);
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index ed85e5b..77930f6 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -1193,7 +1193,68 @@ void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct Dyn
 
 	/* Copy data	*/
 	if (tpmd->canvas) {
+		DynamicPaintSurface *surface;
 		tpmd->canvas->pmd = tpmd;
+		/* free default surface */
+		if (tpmd->canvas->surfaces.first)
+			dynamicPaint_freeSurface(tpmd->canvas->surfaces.first);
+
+		/* copy existing surfaces */
+		for (surface = pmd->canvas->surfaces.first; surface; surface = surface->next) {
+			DynamicPaintSurface *t_surface = dynamicPaint_createNewSurface(tpmd->canvas, NULL);
+
+			/* surface settings */
+			t_surface->brush_group = surface->brush_group;
+			MEM_freeN(t_surface->effector_weights);
+			t_surface->effector_weights = MEM_dupallocN(surface->effector_weights);
+
+			BLI_strncpy(t_surface->name, surface->name, sizeof(t_surface->name));
+			t_surface->format = surface->format;
+			t_surface->type = surface->type;
+			t_surface->disp_type = surface->disp_type;
+			t_surface->image_fileformat = surface->image_fileformat;
+			t_surface->effect_ui = surface->effect_ui;
+			t_surface->preview_id = surface->preview_id;
+			t_surface->init_color_type = surface->init_color_type;
+			t_surface->flags = surface->flags;
+			t_surface->effect = surface->effect;
+
+			t_surface->image_resolution = surface->image_resolution;
+			t_surface->substeps = surface->substeps;
+			t_surface->start_frame = surface->start_frame;
+			t_surface->end_frame = surface->end_frame;
+
+			copy_v4_v4(t_surface->init_color, surface->init_color);
+			t_surface->init_texture = surface->init_texture;
+			BLI_strncpy(t_surface->init_layername, surface->init_layername, sizeof(t_surface->init_layername));
+
+			t_surface->dry_speed = surface->dry_speed;
+			t_surface->diss_speed = surface->diss_speed;
+			t_surface->color_dry_threshold = surface->color_dry_threshold;
+			t_surface->depth_clamp = surface->depth_clamp;
+			t_surface->disp_factor = surface->disp_factor;
+
+
+			t_surface->spread_speed = surface->spread_speed;
+			t_surface->color_spread_speed = surface->color_spread_speed;
+			t_surface->shrink_speed = surface->shrink_speed;
+			t_surface->drip_vel = surface->drip_vel;
+			t_surface->drip_acc = surface->drip_acc;
+
+			t_surface->influence_scale = surface->influence_scale;
+			t_surface->radius_scale = surface->radius_scale;
+
+			t_surface->wave_damping = surface->wave_damping;
+			t_surface->wave_speed = surface->wave_speed;
+			t_surface->wave_timescale = surface->wave_timescale;
+			t_surface->wave_spring = surface->wave_spring;
+
+			BLI_strncpy(t_surface->uvlayer_name, surface->uvlayer_name, sizeof(t_surface->uvlayer_name));
+			BLI_strncpy(t_surface->image_output_path, surface->image_output_path, sizeof(t_surface->image_output_path));
+			BLI_strncpy(t_surface->output_name, surface->output_name, sizeof(t_surface->output_name));
+			BLI_strncpy(t_surface->output_name2, surface->output_name2, sizeof(t_surface->output_name2));
+		}
+		dynamicPaint_resetPreview(tpmd->canvas);
 	}
 	else if (tpmd->brush) {
 		DynamicPaintBrushSettings *brush = pmd->brush, *t_brush = tpmd->brush;
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index f09f128..c4ce17c 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1400,7 +1400,9 @@ static void timecode_simple_string(char *text, size_t text_size, const int cfra,
 	}
 }
 
-/* could allow access externally - 512 is for long names, 64 is for id names */
+#define STAMP_NAME_SIZE ((MAX_ID_NAME - 2) + 16)
+/* could allow access externally - 512 is for long names,
+ * STAMP_NAME_SIZE is for id names, allowing them some room for description */
 typedef struct StampData {
 	char file[512];
 	char note[512];
@@ -1408,12 +1410,13 @@ typedef struct StampData {
 	char marker[512];
 	char time[512];
 	char frame[512];
-	char camera[64];
-	char cameralens[64];
-	char scene[64];
-	char strip[64];
-	char rendertime[64];
+	char camera[STAMP_NAME_SIZE];
+	char cameralens[STAMP_NAME_SIZE];
+	char scene[STAMP_NAME_SIZE];
+	char strip[STAMP_NAME_SIZE];
+	char rendertime[STAMP_NAME_SIZE];
 } StampData;
+#undef STAMP_NAME_SIZE
 
 static void stampdata(Scene *scene, Object *camera, StampData *stamp_data, int do_prefix)
 {
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 782d796..ad95f09 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -1078,7 +1078,7 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
 	if (key->slurph && key->type != KEY_RELATIVE) {
 		const float ctime_scaled = key->ctime / 100.0f;
 		float delta = (float)key->slurph / tot;
-		float cfra = (float)scene->r.cfra;
+		float cfra = (float)scene->r.cfra + scene->r.subframe;
 		int step, a;
 
 		if (tot > 100 && slurph_opt) {
@@ -1176,7 +1176,7 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
 	if (key->slurph && key->type != KEY_RELATIVE) {
 		const float ctime_scaled = key->ctime / 100.0f;
 		float delta = (float)key->slurph / tot;
-		float cfra = (float)scene->r.cfra;
+		float cfra = (float)scene->r.cfra + scene->r.subframe;
 		Nurb *nu;
 		int i = 0, remain = 0;
 		int step, a;
@@ -1258,7 +1258,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
 	if (key->slurph && key->type != KEY_RELATIVE) {
 		const float ctime_scaled = key->ctime / 100.0f;
 		float delta = (float)key->slurph / tot;
-		float cfra = (float)scene->r.cfra;
+		float cfra = (float)scene->r.cfra + scene->r.subframe;
 		int a;
 
 		for (a = 0; a < tot; a++, cfra += delta) {
@@ -1373,7 +1373,7 @@ float *do_ob_key(Scene *scene, Object *ob)
 	}
 	else {
 		/* do shapekey local drivers */
-		float ctime = (float)scene->r.cfra; // XXX this needs to be checked
+		float ctime = (float)scene->r.cfra + scene->r.subframe;
 
 		BKE_animsys_evaluate_animdata(scene, &key->id, key->adt, ctime, ADT_RECALC_DRIVERS);
 		
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index eb0612a..465d5ee 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -152,6 +152,16 @@ void id_lib_extern(ID *id)
 	}
 }
 
+/* ensure we have a real user */
+void id_us_ensure_real(ID *id)
+{
+	if (id) {
+		if (ID_REAL_USERS(id) <= 0) {
+			id->us = MAX2(id->us, 0) + 1;
+		}
+	}
+}
+
 void id_us_plus(ID *id)
 {
 	if (id) {
diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c
index 381e435..7df7561 100644
--- a/source/blender/blenkernel/intern/modifiers_bmesh.c
+++ b/source/blender/blenkernel/intern/modifiers_bmesh.c
@@ -40,7 +40,11 @@
 #include "BKE_bmesh.h"
 #include "BKE_tessmesh.h"
 
-/* main function for copying DerivedMesh data into BMesh */
+/**
+ * The main function for copying DerivedMesh data into BMesh.
+ *
+ * \note The mesh may already have geometry. see 'is_init'
+ */
 void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
 {
 	MVert *mv, *mvert;
@@ -56,6 +60,14 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
 	BLI_array_declare(edges);
 	int i, j, k, totvert, totedge /* , totface */ /* UNUSED */ ;
 	int is_init = (bm->totvert == 0) && (bm->totedge == 0) && (bm->totface == 0);
+	char has_orig_hflag = 0;
+
+	if (is_init == FALSE) {
+		/* check if we have an origflag */
+		has_orig_hflag |= CustomData_has_layer(&bm->vdata, CD_ORIGINDEX) ? BM_VERT : 0;
+		has_orig_hflag |= CustomData_has_layer(&bm->edata, CD_ORIGINDEX) ? BM_EDGE : 0;
+		has_orig_hflag |= CustomData_has_layer(&bm->pdata, CD_ORIGINDEX) ? BM_FACE : 0;
+	}
 
 	/*merge custom data layout*/
 	CustomData_bmesh_merge(&dm->vertData, &bm->vdata, CD_MASK_DERIVEDMESH, CD_CALLOC, bm, BM_VERT);
@@ -85,10 +97,15 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
 		BM_elem_index_set(v, i); /* set_inline */
 
 		CustomData_to_bmesh_block(&dm->vertData, &bm->vdata, i, &v->head.data);
+		vtable[i] = v;
 
 		/* add bevel weight */
 		BM_elem_float_data_set(&bm->vdata, v, CD_BWEIGHT, (float)mv->bweight / 255.0f);
-		vtable[i] = v;
+
+		if (UNLIKELY(has_orig_hflag & BM_VERT)) {
+			int *orig_index = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_ORIGINDEX);
+			*orig_index = ORIGINDEX_NONE;
+		}
 	}
 	MEM_freeN(mvert);
 	if (is_init) bm->elem_index_dirty &= ~BM_VERT;
@@ -109,6 +126,11 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
 		BM_elem_float_data_set(&bm->edata, e, CD_CREASE, (float)me->crease / 255.0f);
 		/* add bevel weight */
 		BM_elem_float_data_set(&bm->edata, e, CD_BWEIGHT, (float)me->bweight / 255.0f);
+
+		if (UNLIKELY(has_orig_hflag & BM_EDGE)) {
+			int *orig_index = CustomData_bmesh_get(&bm->edata, e->head.data, CD_ORIGINDEX);
+			*orig_index = ORIGINDEX_NONE;
+		}
 	}
 	MEM_freeN(medge);
 	if (is_init) bm->elem_index_dirty &= ~BM_EDGE;
@@ -158,6 +180,11 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm)
 		else {
 			BM_face_normal_update(f);
 		}
+
+		if (UNLIKELY(has_orig_hflag & BM_FACE)) {
+			int *orig_index = CustomData_bmesh_get(&bm->pdata, f->head.data, CD_ORIGINDEX);
+			*orig_index = ORIGINDEX_NONE;
+		}
 	}
 	if (is_init) bm->elem_index_dirty &= ~BM_FACE;
 
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 47ca502..4905a31 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1495,7 +1495,7 @@ void BKE_object_scale_to_mat3(Object *ob, float mat[][3])
 	size_to_mat3(mat, vec);
 }
 
-void BKE_object_rot_to_mat3(Object *ob, float mat[][3])
+void BKE_object_rot_to_mat3(Object *ob, float mat[3][3], short use_drot)
 {
 	float rmat[3][3], dmat[3][3];
 	
@@ -1526,7 +1526,10 @@ void BKE_object_rot_to_mat3(Object *ob, float mat[][3])
 	}
 	
 	/* combine these rotations */
-	mul_m3_m3m3(mat, dmat, rmat);
+	if(use_drot)
+		mul_m3_m3m3(mat, dmat, rmat);
+	else
+		copy_m3_m3(mat, rmat);
 }
 
 void BKE_object_mat3_to_rot(Object *ob, float mat[][3], short use_compat)
@@ -1671,7 +1674,7 @@ void BKE_object_to_mat3(Object *ob, float mat[][3]) /* no parent */
 	BKE_object_scale_to_mat3(ob, smat);
 
 	/* rot */
-	BKE_object_rot_to_mat3(ob, rmat);
+	BKE_object_rot_to_mat3(ob, rmat, TRUE);
 	mul_m3_m3m3(mat, rmat, smat);
 }
 
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index acce374..71d22ef 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -191,7 +191,9 @@ static void BKE_sequence_free_ex(Scene *scene, Sequence *seq, const int do_cache
 		((ID *)seq->sound)->us--; 
 	}
 
-	/* clipboard has no scene and will never have a sound handle or be active */
+	/* clipboard has no scene and will never have a sound handle or be active
+	 * same goes to sequences copy for proxy rebuild job
+	 */
 	if (scene) {
 		Editing *ed = scene->ed;
 
@@ -1451,7 +1453,7 @@ void BKE_sequencer_proxy_rebuild_finish(SeqIndexBuildContext *context, short sto
 		IMB_anim_index_rebuild_finish(context->index_context, stop);
 	}
 
-	seq_free_sequence_recurse(context->scene, context->seq);
+	seq_free_sequence_recurse(NULL, context->seq);
 
 	MEM_freeN(context);
 }
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 203af1d..ddb42e1 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5459,7 +5459,14 @@ static void *restore_pointer_by_name(Main *mainp, ID *id, int user)
 			for (; idn; idn = idn->next) {
 				if (idn->name[2] == name[0] && strcmp(idn->name+2, name) == 0) {
 					if (idn->lib == id->lib) {
-						if (user && idn->us == 0) idn->us++;
+						if (user == 1) {
+							if (idn->us == 0) {
+								idn->us++;
+							}
+						}
+						else if (user == 2) {
+							id_us_ensure_real(idn);
+						}
 						break;
 					}
 				}
@@ -5625,7 +5632,7 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
 				else if (sl->spacetype == SPACE_IMAGE) {
 					SpaceImage *sima = (SpaceImage *)sl;
 					
-					sima->image = restore_pointer_by_name(newmain, (ID *)sima->image, 1);
+					sima->image = restore_pointer_by_name(newmain, (ID *)sima->image, 2);
 					
 					/* this will be freed, not worth attempting to find same scene,
 					 * since it gets initialized later */
@@ -5641,7 +5648,7 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
 					 * so assume that here we're doing for undo only...
 					 */
 					sima->gpd = restore_pointer_by_name(newmain, (ID *)sima->gpd, 1);
-					sima->mask_info.mask = restore_pointer_by_name(newmain, (ID *)sima->mask_info.mask, 1);
+					sima->mask_info.mask = restore_pointer_by_name(newmain, (ID *)sima->mask_info.mask, 2);
 				}
 				else if (sl->spacetype == SPACE_SEQ) {
 					SpaceSeq *sseq = (SpaceSeq *)sl;
@@ -5716,8 +5723,8 @@ void blo_lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *cursc
 				else if (sl->spacetype == SPACE_CLIP) {
 					SpaceClip *sclip = (SpaceClip *)sl;
 					
-					sclip->clip = restore_pointer_by_name(newmain, (ID *)sclip->clip, 1);
-					sclip->mask_info.mask = restore_pointer_by_name(newmain, (ID *)sclip->mask_info.mask, 1);
+					sclip->clip = restore_pointer_by_name(newmain, (ID *)sclip->clip, 2);
+					sclip->mask_info.mask = restore_pointer_by_name(newmain, (ID *)sclip->mask_info.mask, 2);
 					
 					sclip->scopes.ok = 0;
 				}
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 9125800..8f2de4d 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -37,6 +37,7 @@
 #include "BKE_customdata.h"
 
 #include "bmesh.h"
+#include "./intern/bmesh_private.h"
 
 
 
@@ -1477,9 +1478,9 @@ static void build_vmesh(MemArena *mem_arena, BMesh *bm, BevVert *bv)
 }
 
 /* take care, this flag isn't cleared before use, it just so happens that its not set */
-#define BM_BEVEL_EDGE_TAG_ENABLE(bme)  BM_elem_flag_enable(  (bme)->l, BM_ELEM_TAG)
-#define BM_BEVEL_EDGE_TAG_DISABLE(bme) BM_elem_flag_disable( (bme)->l, BM_ELEM_TAG)
-#define BM_BEVEL_EDGE_TAG_TEST(bme)    BM_elem_flag_test(    (bme)->l, BM_ELEM_TAG)
+#define BM_BEVEL_EDGE_TAG_ENABLE(bme)  BM_ELEM_API_FLAG_ENABLE(  (bme), _FLAG_OVERLAP)
+#define BM_BEVEL_EDGE_TAG_DISABLE(bme) BM_ELEM_API_FLAG_DISABLE( (bme), _FLAG_OVERLAP)
+#define BM_BEVEL_EDGE_TAG_TEST(bme)    BM_ELEM_API_FLAG_TEST(    (bme), _FLAG_OVERLAP)
 
 /*
  * Construction around the vertex
@@ -1506,6 +1507,8 @@ static void bevel_vert_construct(BMesh *bm, BevelParams *bp, BMVert *v)
 			nsel++;
 		}
 		ntot++;
+
+		BM_BEVEL_EDGE_TAG_DISABLE(bme);
 	}
 
 	if (nsel == 0) {
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index fe83620..92e1ff1 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -1226,7 +1226,7 @@ static int animchannels_delete_exec(bContext *C, wmOperator *UNUSED(op))
 
 			case ANIMTYPE_MASKLAYER:
 			{
-				/* Grease Pencil layer */
+				/* Mask layer */
 				Mask *mask = (Mask *)ale->id;
 				MaskLayer *masklay = (MaskLayer *)ale->data;
 
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index b80025e..319116b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4629,7 +4629,6 @@ static void popup_add_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2))
 
 static int ui_but_menu(bContext *C, uiBut *but)
 {
-	ARegion *ar = CTX_wm_region(C);
 	uiPopupMenu *pup;
 	uiLayout *layout;
 	int length;
@@ -4845,9 +4844,13 @@ static int ui_but_menu(bContext *C, uiBut *but)
 	}
 
 	/* Show header tools for header buttons. */
-	if (ar->regiontype == RGN_TYPE_HEADER) {
-		uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
-		uiItemS(layout);
+	if (CTX_wm_region(C)) {
+		ARegion *ar = CTX_wm_region(C);
+			if (ar->regiontype == RGN_TYPE_HEADER) {
+			
+				uiItemMenuF(layout, IFACE_("Header"), ICON_NONE, ED_screens_header_tools_menu_create, NULL);
+				uiItemS(layout);
+			}
 	}
 
 	{   /* Docs */
@@ -6924,11 +6927,12 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user
 		if (data->state == BUTTON_STATE_MENU_OPEN) {
 			/* handle events for menus and their buttons recursively,
 			 * this will handle events from the top to the bottom menu */
-			retval = ui_handle_menus_recursive(C, event, data->menu, 0);
+			if (data->menu)
+				retval = ui_handle_menus_recursive(C, event, data->menu, 0);
 
 			/* handle events for the activated button */
 			if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) {
-				if (data->menu->menuretval)
+				if (data->menu && data->menu->menuretval)
 					ui_handle_button_return_submenu(C, event, but);
 				else
 					ui_handle_button_event(C, event, but);
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 2b170ea..10ba10d 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -164,15 +164,20 @@ static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa)
 
 /****************************** panels ******************************/
 
-static void panels_collapse_all(ScrArea *sa, ARegion *ar)
+static void panels_collapse_all(ScrArea *sa, ARegion *ar, Panel *from_pa)
 {
 	Panel *pa;
+	PanelType *pt, *from_pt;
 	int flag = ((panel_aligned(sa, ar) == BUT_HORIZONTAL) ? PNL_CLOSEDX : PNL_CLOSEDY);
 
 	for (pa = ar->panels.first; pa; pa = pa->next) {
-		if (pa->type && !(pa->type->flag & PNL_NO_HEADER)) {
-			pa->flag = flag;
-		}
+		pt = pa->type;
+		from_pt = from_pa->type;
+
+		/* close panels with headers in the same context */
+		if (pt && from_pt && !(pt->flag & PNL_NO_HEADER))
+			if (!pt->context[0] || strcmp(pt->context, from_pt->context) == 0)
+				pa->flag = flag;
 	}
 }
 
@@ -1016,7 +1021,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
 
 /* this function is supposed to call general window drawing too */
 /* also it supposes a block has panel, and isn't a menu */
-static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my, int event)
+static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my, int event, int ctrl)
 {
 	ScrArea *sa = CTX_wm_area(C);
 	ARegion *ar = CTX_wm_region(C);
@@ -1049,6 +1054,9 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
 			ED_region_tag_redraw(ar);
 		}
 		else {  /* collapse */
+			if(ctrl)
+				panels_collapse_all(sa, ar, block->panel);
+
 			if (block->panel->flag & PNL_CLOSED) {
 				block->panel->flag &= ~PNL_CLOSED;
 				/* snap back up so full panel aligns with screen edge */
@@ -1088,7 +1096,6 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
 
 int ui_handler_panel_region(bContext *C, wmEvent *event)
 {
-	ScrArea *sa = CTX_wm_area(C);
 	ARegion *ar = CTX_wm_region(C);
 	uiBlock *block;
 	Panel *pa;
@@ -1118,10 +1125,10 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
 				
 				if (pa->flag & PNL_CLOSEDY) {
 					if ((block->rect.ymax <= my) && (block->rect.ymax + PNL_HEADER >= my))
-						ui_handle_panel_header(C, block, mx, my, event->type);
+						ui_handle_panel_header(C, block, mx, my, event->type, event->ctrl);
 				}
 				else
-					ui_handle_panel_header(C, block, mx, my, event->type);
+					ui_handle_panel_header(C, block, mx, my, event->type, event->ctrl);
 				
 				continue;
 			}
@@ -1150,15 +1157,13 @@ int ui_handler_panel_region(bContext *C, wmEvent *event)
 				/* open close on header */
 				if (ELEM(event->type, RETKEY, PADENTER)) {
 					if (inside_header) {
-						ui_handle_panel_header(C, block, mx, my, RETKEY);
+						ui_handle_panel_header(C, block, mx, my, RETKEY, event->ctrl);
 						break;
 					}
 				}
 				else if (event->type == LEFTMOUSE) {
 					if (inside_header) {
-						if (event->ctrl)
-							panels_collapse_all(sa, ar);
-						ui_handle_panel_header(C, block, mx, my, 0);
+						ui_handle_panel_header(C, block, mx, my, 0, event->ctrl);
 						break;
 					}
 					else if (inside_scale && !(pa->flag & PNL_CLOSED)) {
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index c4b80f0..0643199 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -2145,10 +2145,18 @@ static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect)
 	float x = 0.0f, y = 0.0f;
 	float *hsv = ui_block_hsv_get(but->block);
 	float hsv_n[3];
+	int color_profile = but->block->color_profile;
+	
+	if (but->rnaprop && RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA)
+		color_profile = FALSE;
 	
 	copy_v3_v3(hsv_n, hsv);
 	
 	ui_get_but_vectorf(but, rgb);
+	
+	if (color_profile && (int)but->a1 != UI_GRAD_SV)
+		ui_block_to_display_space_v3(but->block, rgb);
+	
 	rgb_to_hsv_compat_v(rgb, hsv_n);
 	
 	ui_draw_gradient(rect, hsv_n, but->a1, 1.0f);
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index a59c491..cbe2661 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -720,7 +720,7 @@ static void knife_cut_through(KnifeTool_OpData *kcd)
 		for (r = firstfaces.first; r; r = r->next) {
 			f = r->ref;
 			found = 0;
-			for (j = 0, lh2 = kcd->linehits; j < kcd->totlinehit; j++, lh2++) {
+			for (j = 0, lh2 = kcd->linehits; j < kcd->totlinehit && !found; j++, lh2++) {
 				kfe2 = lh2->kfe;
 				for (r2 = kfe2->faces.first; r2; r2 = r2->next) {
 					if (r2->ref == f) {
@@ -750,7 +750,7 @@ static void knife_cut_through(KnifeTool_OpData *kcd)
 		for (r = kfe->faces.first; r; r = r->next) {
 			f = r->ref;
 			found = 0;
-			for (j = i + 1, lh2 = lh + 1; j < kcd->totlinehit; j++, lh2++) {
+			for (j = i + 1, lh2 = lh + 1; j < kcd->totlinehit && !found; j++, lh2++) {
 				kfe2 = lh2->kfe;
 				for (r2 = kfe2->faces.first; r2; r2 = r2->next) {
 					if (r2->ref == f) {
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 3335f03..6fd8f0c 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -2628,7 +2628,8 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op)
 	int nth = RNA_int_get(op->ptr, "nth");
 	int offset = RNA_int_get(op->ptr, "offset");
 
-	offset = MIN2(nth, offset);
+	/* so input of offset zero ends up being (nth - 1) */
+	offset = (offset + (nth - 1)) % nth;
 
 	if (edbm_deselect_nth(em, nth, offset) == 0) {
 		BKE_report(op->reports, RPT_ERROR, "Mesh has no active vert/edge/face");
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index ad10771..3e03522 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3777,7 +3777,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
 
 	if (!EDBM_op_init(em, &spinop, op,
 	                  "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i angle=%f use_duplicate=%b",
-	                  BM_ELEM_SELECT, cent, axis, dvec, turns * steps, 360.0f * turns, FALSE))
+	                  BM_ELEM_SELECT, cent, axis, dvec, turns * steps, DEG2RADF(360.0f * turns), FALSE))
 	{
 		return OPERATOR_CANCELLED;
 	}
@@ -3822,8 +3822,8 @@ void MESH_OT_screw(wmOperatorType *ot)
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
 	/* props */
-	RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256);
-	RNA_def_int(ot->srna, "turns", 1, 0, INT_MAX, "Turns", "Turns", 0, 256);
+	RNA_def_int(ot->srna, "steps", 9, 1, INT_MAX, "Steps", "Steps", 3, 256);
+	RNA_def_int(ot->srna, "turns", 1, 1, INT_MAX, "Turns", "Turns", 1, 256);
 
 	RNA_def_float_vector(ot->srna, "center", 3, NULL, -FLT_MAX, FLT_MAX,
 	                     "Center", "Center in global view space", -FLT_MAX, FLT_MAX);
@@ -4950,9 +4950,9 @@ static float edbm_bevel_mval_factor(wmOperator *op, wmEvent *event)
 	if (event->shift) {
 		if (opdata->shift_factor < 0.0f) {
 #ifdef NEW_BEVEL
-			opdata->shift_factor = RNA_float_get(op->ptr, "factor");
-#else
 			opdata->shift_factor = RNA_float_get(op->ptr, "percent");
+#else
+			opdata->shift_factor = RNA_float_get(op->ptr, "factor");
 #endif
 		}
 		factor = (factor - opdata->shift_factor) * 0.1f + opdata->shift_factor;
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 900bf57..7a2eb56 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -447,7 +447,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
 			float tmat[3][3], timat[3][3];
 
 			/* simple rotation matrix */
-			BKE_object_rot_to_mat3(ob, rsmat);
+			BKE_object_rot_to_mat3(ob, rsmat, TRUE);
 
 			/* correct for scale, note mul_m3_m3m3 has swapped args! */
 			BKE_object_scale_to_mat3(ob, tmat);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 94b0010..194e42e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -346,7 +346,7 @@ static void make_vertexcol(Object *ob)  /* single ob */
 	if (me->edit_btmesh) return;
 
 	/* copies from shadedisplist to mcol */
-	if (!me->mloopcol) {
+	if (!me->mloopcol && me->totloop) {
 		if (!me->mcol) {
 			CustomData_add_layer(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface);
 		}
@@ -657,11 +657,11 @@ BLI_INLINE unsigned int mcol_sub(unsigned int col1, unsigned int col2, int fac)
 	cp  = (unsigned char *)&col;
 
 	temp = cp1[0] - ((fac * cp2[0]) / 255);
-	cp1[0] = (temp < 0) ? 0 : temp;
+	cp[0] = (temp < 0) ? 0 : temp;
 	temp = cp1[1] - ((fac * cp2[1]) / 255);
-	cp1[1] = (temp < 0) ? 0 : temp;
+	cp[1] = (temp < 0) ? 0 : temp;
 	temp = cp1[2] - ((fac * cp2[2]) / 255);
-	cp1[2] = (temp < 0) ? 0 : temp;
+	cp[2] = (temp < 0) ? 0 : temp;
 	cp[3] = 255;
 
 	return col;
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 1a62af3..3088243 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -38,6 +38,7 @@
 #include "BKE_movieclip.h"
 #include "BKE_context.h"
 #include "BKE_tracking.h"
+#include "BKE_library.h"
 
 #include "DNA_mask_types.h"
 #include "DNA_object_types.h"	/* SELECT */
@@ -524,8 +525,7 @@ void ED_space_clip_set_clip(bContext *C, bScreen *screen, SpaceClip *sc, MovieCl
 	old_clip = sc->clip;
 	sc->clip = clip;
 
-	if (sc->clip && sc->clip->id.us == 0)
-		sc->clip->id.us = 1;
+	id_us_ensure_real((ID *)sc->clip);
 
 	if (screen && sc->view == SC_VIEW_CLIP) {
 		ScrArea *area;
@@ -561,9 +561,7 @@ void ED_space_clip_set_mask(bContext *C, SpaceClip *sc, Mask *mask)
 {
 	sc->mask_info.mask = mask;
 
-	if (sc->mask_info.mask && sc->mask_info.mask->id.us == 0) {
-		sc->mask_info.mask->id.us = 1;
-	}
+	id_us_ensure_real((ID *)sc->mask_info.mask);
 
 	if (C) {
 		WM_event_add_notifier(C, NC_MASK | NA_SELECTED, mask);
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 77e2a1b..7befa49 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -592,9 +592,14 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
 	WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0);
 	WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_out", PADMINUS, KM_PRESS, 0, 0);
 
+	/* ctrl now works as well, shift + numpad works as arrow keys on Windows */
+	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 8.0f);
+	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 4.0f);
+	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 2.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 2.0f);
+
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD1, KM_PRESS, 0, 0)->ptr, "ratio", 1.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD2, KM_PRESS, 0, 0)->ptr, "ratio", 0.5f);
 	RNA_float_set(WM_keymap_add_item(keymap, "CLIP_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f);
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index a29524d..77662d8 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -2025,7 +2025,7 @@ static void set_axis(Scene *scene,  Object *ob, MovieClip *clip, MovieTrackingOb
 		if (!flip) {
 			float lmat[4][4], ilmat[4][4], rmat[3][3];
 
-			BKE_object_rot_to_mat3(ob, rmat);
+			BKE_object_rot_to_mat3(ob, rmat, TRUE);
 			invert_m3(rmat);
 			mul_m4_m4m3(mat, mat, rmat);
 
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index c4e2230..34207e1 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -40,6 +40,7 @@
 #include "BKE_image.h"
 #include "BKE_main.h"
 #include "BKE_tessmesh.h"
+#include "BKE_library.h"
 
 #include "IMB_imbuf_types.h"
 
@@ -78,8 +79,7 @@ void ED_space_image_set(SpaceImage *sima, Scene *scene, Object *obedit, Image *i
 	if (sima->image)
 		BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE);
 
-	if (sima->image && ID_REAL_USERS(sima->image) <= 0)
-		sima->image->id.us = max_ii(sima->image->id.us, 0) + 1;
+	id_us_ensure_real((ID *)sima->image);
 
 	if (obedit)
 		WM_main_add_notifier(NC_GEOM | ND_DATA, obedit->data);
@@ -97,8 +97,7 @@ void ED_space_image_set_mask(bContext *C, SpaceImage *sima, Mask *mask)
 	sima->mask_info.mask = mask;
 
 	/* weak, but same as image/space */
-	if (sima->mask_info.mask && ID_REAL_USERS(sima->mask_info.mask) <= 0)
-		sima->mask_info.mask->id.us = max_ii(sima->mask_info.mask->id.us, 0) + 1;
+	id_us_ensure_real((ID *)sima->mask_info.mask);
 
 	if (C) {
 		WM_event_add_notifier(C, NC_MASK | NA_SELECTED, mask);
@@ -194,9 +193,7 @@ void ED_space_image_get_size_fl(SpaceImage *sima, float size[2])
 void ED_space_image_get_aspect(SpaceImage *sima, float *aspx, float *aspy)
 {
 	Image *ima = sima->image;
-	if ((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) ||
-	    (ima->aspx == 0.0f || ima->aspy == 0.0f))
-	{
+	if ((ima == NULL) || (ima->aspx == 0.0f || ima->aspy == 0.0f)) {
 		*aspx = *aspy = 1.0;
 	}
 	else {
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index ea69677..5616c02 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -292,9 +292,14 @@ static void image_keymap(struct wmKeyConfig *keyconf)
 	WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0);
 	WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom", MOUSEZOOM, 0, 0, 0);
 
+	/* ctrl now works as well, shift + numpad works as arrow keys on Windows */
+	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 8.0f);
+	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 4.0f);
+	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_CTRL, 0)->ptr, "ratio", 2.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 8.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 4.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD2, KM_PRESS, KM_SHIFT, 0)->ptr, "ratio", 2.0f);
+
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD1, KM_PRESS, 0, 0)->ptr, "ratio", 1.0f);
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD2, KM_PRESS, 0, 0)->ptr, "ratio", 0.5f);
 	RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f);
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 92edac3..381393e 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1351,7 +1351,7 @@ static void node_shader_buts_tex_environment(uiLayout *layout, bContext *C, Poin
 	uiItemR(layout, ptr, "color_space", 0, "", ICON_NONE);
 	uiItemR(layout, ptr, "projection", 0, "", ICON_NONE);
 
-	node_buts_image_user(layout, C, ptr, &imaptr, &iuserptr);
+	node_buts_image_user(layout, C, &iuserptr, &imaptr, &iuserptr);
 }
 
 static void node_shader_buts_tex_sky(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 5ac7327..ede2046 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4659,9 +4659,11 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit)
 				if (!(point->flag & PEP_HIDE))
 					totkeys += point->totkey;
 
-			if (edit->points && !(edit->points->keys->flag & PEK_USE_WCO))
-				pd = pdata = MEM_callocN(totkeys * 3 * sizeof(float), "particle edit point data");
-			cd = cdata = MEM_callocN(totkeys * (timed ? 4 : 3) * sizeof(float), "particle edit color data");
+			if (totkeys) {
+				if (edit->points && !(edit->points->keys->flag & PEK_USE_WCO))
+					pd = pdata = MEM_callocN(totkeys * 3 * sizeof(float), "particle edit point data");
+				cd = cdata = MEM_callocN(totkeys * (timed ? 4 : 3) * sizeof(float), "particle edit color data");
+			}
 
 			for (i = 0, point = edit->points; i < totpoint; i++, point++) {
 				if (point->flag & PEP_HIDE)
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index bf14d91..cffc5ed 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -439,7 +439,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
 			uiDefButR(block, NUM, 0, "Radius", 0, yi -= buth + but_margin, 200, buth,
 			          &data_ptr, "radius", 0, 0.0, 100.0, 1, 3, NULL);
 			uiDefButR(block, NUM, 0, "Tilt", 0, yi -= buth + but_margin, 200, buth,
-			          &data_ptr, "tilt", 0, -M_PI * 2.0, M_PI * 2.0, 1, 3, NULL);
+			          &data_ptr, "tilt", 0, -FLT_MAX, FLT_MAX, 1, 3, NULL);
 		}
 		else if (totcurvedata > 1) {
 			uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Mean Weight:"),
@@ -450,7 +450,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
 			          &(tfp->ve_median[C_RADIUS]), 0.0, 100.0, 1, 3, TIP_("Radius of curve control points"));
 			but = uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Mean Tilt:"),
 			                0, yi -= buth + but_margin, 200, buth,
-			                &(tfp->ve_median[C_TILT]), -M_PI * 2.0, M_PI * 2.0, 1, 3,
+			                &(tfp->ve_median[C_TILT]), -FLT_MAX, FLT_MAX, 1, 3,
 			                TIP_("Tilt of curve control points"));
 			uiButSetUnitType(but, PROP_UNIT_ROTATION);
 		}
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index d45013c..17e6558 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -431,8 +431,21 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
 	copy_v3_v3(vod->ofs, rv3d->ofs);
 
 	if (vod->use_dyn_ofs) {
-		/* If there's no selection, lastofs is unmodified and last value since static */
-		calculateTransformCenter(C, V3D_CENTROID, lastofs, NULL);
+		Scene *scene = CTX_data_scene(C);
+		Object *ob = OBACT;
+
+		if (ob && ob->mode & OB_MODE_ALL_PAINT) {
+			/* transformation is disabled for painting modes, which will make it
+			 * so previous offset is used. This is annoying when you open file
+			 * saved with active object in painting mode
+			 */
+			copy_v3_v3(lastofs, ob->obmat[3]);
+		}
+		else {
+			/* If there's no selection, lastofs is unmodified and last value since static */
+			calculateTransformCenter(C, V3D_CENTROID, lastofs, NULL);
+		}
+
 		negate_v3_v3(vod->dyn_ofs, lastofs);
 	}
 	else if (U.uiflag & USER_ZBUF_ORBIT) {
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index 6105b5e..b0f7b4f 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -170,6 +170,8 @@ void view3d_keymap(wmKeyConfig *keyconf)
 
 	WM_keymap_add_item(keymap, "VIEW3D_OT_view_center_camera", HOMEKEY, KM_PRESS, 0, 0); /* only with camera view */
 
+	WM_keymap_add_item(keymap, "VIEW3D_OT_view_center_cursor", HOMEKEY, KM_PRESS, KM_ALT, 0);
+
 	kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
 	RNA_boolean_set(kmi->ptr, "center", FALSE); /* only without camera view */
 	kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_view_all", HOMEKEY, KM_PRESS, KM_CTRL, 0);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 51efa2b..33afa4c 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1879,6 +1879,40 @@ static void get_edge_center(float cent_r[3], BMVert *eve)
 	}
 }
 
+/* local version of #BM_vert_calc_shell_factor which only
+ * uses selected faces */
+static float bm_vert_calc_shell_factor_selected(BMVert *v)
+{
+	BMIter iter;
+	BMLoop *l;
+	float accum_shell = 0.0f;
+	float accum_angle = 0.0f;
+	int tot_sel = 0, tot = 0;
+
+	BM_ITER_ELEM (l, &iter, v, BM_LOOPS_OF_VERT) {
+		if (BM_elem_flag_test(l->f, BM_ELEM_SELECT)) {  /* <-- only difference to BM_vert_calc_shell_factor! */
+			const float face_angle = BM_loop_calc_face_angle(l);
+			accum_shell += shell_angle_to_dist(angle_normalized_v3v3(v->no, l->f->no)) * face_angle;
+			accum_angle += face_angle;
+			tot_sel++;
+		}
+		tot++;
+	}
+
+	if (accum_angle != 0.0f) {
+		return accum_shell / accum_angle;
+	}
+	else {
+		if (tot != 0 && tot_sel == 0) {
+			/* none selected, so use all */
+			return BM_vert_calc_shell_factor(v);
+		}
+		else {
+			return 1.0f;
+		}
+	}
+}
+
 /* way to overwrite what data is edited with transform */
 static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx,
                              BMEditMesh *em, BMVert *eve, float *bweight)
@@ -1927,7 +1961,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx
 	}
 	else if (t->mode == TFM_SHRINKFATTEN) {
 		td->ext = tx;
-		tx->isize[0] = BM_vert_calc_shell_factor(eve);
+		tx->isize[0] = bm_vert_calc_shell_factor_selected(eve);
 	}
 }
 
diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c
index 7e05fda..88ed002 100644
--- a/source/blender/editors/transform/transform_input.c
+++ b/source/blender/editors/transform/transform_input.c
@@ -397,12 +397,13 @@ int handleMouseInput(TransInfo *t, MouseInput *mi, wmEvent *event)
 				 * store the mouse position where the normal movement ended */
 				copy_v2_v2_int(mi->precision_mval, event->mval);
 				mi->precision = 1;
+				redraw = TREDRAW_HARD;
 			}
-			else {
+			else if(event->val == KM_RELEASE) {
 				t->modifiers &= ~MOD_PRECISION;
 				mi->precision = 0;
+				redraw = TREDRAW_HARD;
 			}
-			redraw = TREDRAW_HARD;
 			break;
 	}
 
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index a3f45ac..c890c98 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -148,10 +148,8 @@ static void stats_pose(Scene *scene, RegionView3D *rv3d, bPoseChannel *pchan)
 	Bone *bone = pchan->bone;
 
 	if (bone) {
-		if (bone->flag & BONE_TRANSFORM) {
-			calc_tw_center(scene, pchan->pose_head);
-			protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
-		}
+		calc_tw_center(scene, pchan->pose_head);
+		protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag);
 	}
 }
 
@@ -361,18 +359,35 @@ int calc_manipulator_stats(const bContext *C)
 		else if (obedit->type == OB_ARMATURE) {
 			bArmature *arm = obedit->data;
 			EditBone *ebo;
-			for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
-				if (EBONE_VISIBLE(arm, ebo)) {
-					if (ebo->flag & BONE_TIPSEL) {
-						calc_tw_center(scene, ebo->tail);
-						totsel++;
-					}
-					if (ebo->flag & BONE_ROOTSEL) {
-						calc_tw_center(scene, ebo->head);
-						totsel++;
-					}
-					if (ebo->flag & BONE_SELECTED) {
-						stats_editbone(rv3d, ebo);
+
+			if ((v3d->around == V3D_ACTIVE) && (ebo = arm->act_edbone)) {
+				/* doesn't check selection or visibility intentionally */
+				if (ebo->flag & BONE_TIPSEL) {
+					calc_tw_center(scene, ebo->tail);
+					totsel++;
+				}
+				if ((ebo->flag & BONE_ROOTSEL) ||
+				    ((ebo->flag & BONE_TIPSEL) == FALSE))  /* ensure we get at least one point */
+				{
+					calc_tw_center(scene, ebo->head);
+					totsel++;
+				}
+				stats_editbone(rv3d, ebo);
+			}
+			else {
+				for (ebo = arm->edbo->first; ebo; ebo = ebo->next) {
+					if (EBONE_VISIBLE(arm, ebo)) {
+						if (ebo->flag & BONE_TIPSEL) {
+							calc_tw_center(scene, ebo->tail);
+							totsel++;
+						}
+						if (ebo->flag & BONE_ROOTSEL) {
+							calc_tw_center(scene, ebo->head);
+							totsel++;
+						}
+						if (ebo->flag & BONE_SELECTED) {
+							stats_editbone(rv3d, ebo);
+						}
 					}
 				}
 			}
@@ -480,17 +495,35 @@ int calc_manipulator_stats(const bContext *C)
 	else if (ob && (ob->mode & OB_MODE_POSE)) {
 		bPoseChannel *pchan;
 		int mode = TFM_ROTATION; // mislead counting bones... bah. We don't know the manipulator mode, could be mixed
+		int ok = FALSE;
 
 		if ((ob->lay & v3d->lay) == 0) return 0;
 
-		totsel = count_set_pose_transflags(&mode, 0, ob);
-
-		if (totsel) {
-			/* use channels to get stats */
-			for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+		if ((v3d->around == V3D_ACTIVE) && (pchan = BKE_pose_channel_active(ob))) {
+			/* doesn't check selection or visibility intentionally */
+			Bone *bone = pchan->bone;
+			if (bone) {
 				stats_pose(scene, rv3d, pchan);
+				totsel = 1;
+				ok = TRUE;
+			}
+		}
+		else {
+			totsel = count_set_pose_transflags(&mode, 0, ob);
+
+			if (totsel) {
+				/* use channels to get stats */
+				for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+					Bone *bone = pchan->bone;
+					if (bone && (bone->flag & BONE_TRANSFORM)) {
+						stats_pose(scene, rv3d, pchan);
+					}
+				}
+				ok = TRUE;
 			}
+		}
 
+		if (ok) {
 			mul_v3_fl(scene->twcent, 1.0f / (float)totsel);   // centroid!
 			mul_m4_v3(ob->obmat, scene->twcent);
 			mul_m4_v3(ob->obmat, scene->twmin);
@@ -552,8 +585,9 @@ int calc_manipulator_stats(const bContext *C)
 		switch (v3d->twmode) {
 		
 			case V3D_MANIP_GLOBAL:
+			{
 				break; /* nothing to do */
-
+			}
 			case V3D_MANIP_GIMBAL:
 			{
 				float mat[3][3];
@@ -562,28 +596,43 @@ int calc_manipulator_stats(const bContext *C)
 					break;
 				}
 				/* if not gimbal, fall through to normal */
+				/* pass through */
 			}
 			case V3D_MANIP_NORMAL:
+			{
 				if (obedit || ob->mode & OB_MODE_POSE) {
 					float mat[3][3];
 					ED_getTransformOrientationMatrix(C, mat, (v3d->around == V3D_ACTIVE));
 					copy_m4_m3(rv3d->twmat, mat);
 					break;
 				}
-			/* no break we define 'normal' as 'local' in Object mode */
+				/* no break we define 'normal' as 'local' in Object mode */
+				/* pass through */
+			}
 			case V3D_MANIP_LOCAL:
+			{
+				if (ob->mode & OB_MODE_POSE) {
+					/* each bone moves on its own local axis, but  to avoid confusion,
+					 * use the active pones axis for display [#33575], this works as expected on a single bone
+					 * and users who select many bones will understand whats going on and what local means
+					 * when they start transforming */
+					float mat[3][3];
+					ED_getTransformOrientationMatrix(C, mat, (v3d->around == V3D_ACTIVE));
+					copy_m4_m3(rv3d->twmat, mat);
+					break;
+				}
 				copy_m4_m4(rv3d->twmat, ob->obmat);
 				normalize_m4(rv3d->twmat);
 				break;
-
+			}
 			case V3D_MANIP_VIEW:
 			{
 				float mat[3][3];
 				copy_m3_m4(mat, rv3d->viewinv);
 				normalize_m3(mat);
 				copy_m4_m3(rv3d->twmat, mat);
+				break;
 			}
-			break;
 			default: /* V3D_MANIP_CUSTOM */
 			{
 				float mat[3][3];
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 70e4d4c..8b03e36 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -43,6 +43,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
 
+#include "BKE_action.h"
 #include "BKE_armature.h"
 #include "BKE_curve.h"
 #include "BKE_context.h"
@@ -737,7 +738,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
 				}
 			}
 			
-			if (normal[0] != 0 || normal[1] != 0 || normal[2] != 0) {
+			if (!is_zero_v3(normal)) {
 				result = ORIENTATION_NORMAL;
 			}
 		}
@@ -760,29 +761,45 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
 		else if (obedit->type == OB_ARMATURE) {
 			bArmature *arm = obedit->data;
 			EditBone *ebone;
+			int ok = FALSE;
 			
-			for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
-				if (arm->layer & ebone->layer) {
-					if (ebone->flag & BONE_SELECTED) {
-						float tmat[3][3];
-						float vec[3];
-						sub_v3_v3v3(vec, ebone->tail, ebone->head);
-						normalize_v3(vec);
-						add_v3_v3(normal, vec);
-						
-						vec_roll_to_mat3(vec, ebone->roll, tmat);
-						add_v3_v3(plane, tmat[2]);
+			/* grr,.but better then duplicate code */
+#define EBONE_CALC_NORMAL_PLANE  { \
+			float tmat[3][3]; \
+			float vec[3]; \
+			sub_v3_v3v3(vec, ebone->tail, ebone->head); \
+			normalize_v3(vec); \
+			add_v3_v3(normal, vec); \
+			\
+			vec_roll_to_mat3(vec, ebone->roll, tmat); \
+			add_v3_v3(plane, tmat[2]); \
+		} (void)0
+
+
+			if (activeOnly && (ebone = arm->act_edbone)) {
+				EBONE_CALC_NORMAL_PLANE;
+				ok = TRUE;
+			}
+			else {
+				for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
+					if (arm->layer & ebone->layer) {
+						if (ebone->flag & BONE_SELECTED) {
+							EBONE_CALC_NORMAL_PLANE;
+							ok = TRUE;
+						}
 					}
 				}
 			}
 			
-			normalize_v3(normal);
-			normalize_v3(plane);
+			if (ok) {
+				normalize_v3(normal);
+				normalize_v3(plane);
 
-			if (plane[0] != 0 || plane[1] != 0 || plane[2] != 0) {
-				result = ORIENTATION_EDGE;
+				if (!is_zero_v3(plane)) {
+					result = ORIENTATION_EDGE;
+				}
 			}
-
+#undef EBONE_CALC_NORMAL_PLANE
 		}
 
 		/* Vectors from edges don't need the special transpose inverse multiplication */
@@ -798,19 +815,32 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
 	else if (ob && (ob->mode & OB_MODE_POSE)) {
 		bArmature *arm = ob->data;
 		bPoseChannel *pchan;
-		int totsel;
-		
-		totsel = count_bone_select(arm, &arm->bonebase, 1);
-		if (totsel) {
-			float imat[3][3], mat[3][3];
-
-			/* use channels to get stats */
-			for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
-				if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) {
-					add_v3_v3(normal, pchan->pose_mat[2]);
-					add_v3_v3(plane, pchan->pose_mat[1]);
+		float imat[3][3], mat[3][3];
+		int ok = FALSE;
+
+		if (activeOnly && (pchan = BKE_pose_channel_active(ob))) {
+			add_v3_v3(normal, pchan->pose_mat[2]);
+			add_v3_v3(plane, pchan->pose_mat[1]);
+			ok = TRUE;
+		}
+		else {
+			int totsel;
+
+			totsel = count_bone_select(arm, &arm->bonebase, 1);
+			if (totsel) {
+				/* use channels to get stats */
+				for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+					if (pchan->bone && pchan->bone->flag & BONE_TRANSFORM) {
+						add_v3_v3(normal, pchan->pose_mat[2]);
+						add_v3_v3(plane, pchan->pose_mat[1]);
+					}
 				}
+				ok = TRUE;
 			}
+		}
+
+		/* use for both active & all */
+		if (ok) {
 			negate_v3(plane);
 			
 			/* we need the transpose of the inverse for a normal... */
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index d466e59..360d8de 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -252,6 +252,25 @@ void GPU_set_gpu_mipmapping(int gpu_mipmap)
 	}
 }
 
+static void gpu_generate_mipmap(GLenum target)
+{
+	int is_ati = GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY);
+	int target_enabled = 0;
+
+	/* work around bug in ATI driver, need to have GL_TEXTURE_2D enabled
+	 * http://www.opengl.org/wiki/Common_Mistakes#Automatic_mipmap_generation */
+	if (is_ati) {
+		target_enabled = glIsEnabled(target);
+		if (!target_enabled)
+			glEnable(target);
+	}
+
+	glGenerateMipmapEXT(target);
+
+	if (is_ati && !target_enabled)
+		glDisable(target);
+}
+
 void GPU_set_mipmap(int mipmap)
 {
 	if (GTS.domipmap != (mipmap != 0)) {
@@ -691,7 +710,7 @@ void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float * frect, int
 			else
 				glTexImage2D(GL_TEXTURE_2D, 0,  GL_RGBA,  rectw, recth, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix);
 
-			glGenerateMipmapEXT(GL_TEXTURE_2D);
+			gpu_generate_mipmap(GL_TEXTURE_2D);
 		}
 		else {
 			if (use_high_bit_depth)
@@ -934,7 +953,7 @@ void GPU_paint_update_image(Image *ima, int x, int y, int w, int h)
 			/* we have already accounted for the case where GTS.gpu_mipmap is false
 			 * so we will be using GPU mipmap generation here */
 			if (GPU_get_mipmap()) {
-				glGenerateMipmapEXT(GL_TEXTURE_2D);
+				gpu_generate_mipmap(GL_TEXTURE_2D);
 			}
 			else {
 				ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
@@ -959,7 +978,7 @@ void GPU_paint_update_image(Image *ima, int x, int y, int w, int h)
 
 		/* see comment above as to why we are using gpu mipmap generation here */
 		if (GPU_get_mipmap()) {
-			glGenerateMipmapEXT(GL_TEXTURE_2D);
+			gpu_generate_mipmap(GL_TEXTURE_2D);
 		}
 		else {
 			ima->tpageflag &= ~IMA_MIPMAP_COMPLETE;
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index b9e86e1..69de86d 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -403,8 +403,8 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
 
 	prop = RNA_def_property(srna, "pre_roll", PROP_INT, PROP_NONE);
 	RNA_def_property_int_sdna(prop, NULL, "preroll");
-	RNA_def_property_range(prop, 0, 200);
-	RNA_def_property_ui_text(prop, "Pre Roll", "Simulation starts on this frame");
+	RNA_def_property_range(prop, 0, MAXFRAME);
+	RNA_def_property_ui_text(prop, "Pre Roll", "Start simulation a number of frames earlier to let the cloth settle in");
 	RNA_def_property_update(prop, 0, "rna_cloth_reset");
 
 	prop = RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c
index f85c334..a43c5c1 100644
--- a/source/blender/python/bmesh/bmesh_py_utils.c
+++ b/source/blender/python/bmesh/bmesh_py_utils.c
@@ -106,7 +106,7 @@ static PyObject *bpy_bm_utils_vert_collapse_edge(PyObject *UNUSED(self), PyObjec
 PyDoc_STRVAR(bpy_bm_utils_vert_collapse_faces_doc,
 ".. method:: vert_collapse_faces(vert, edge, fac, join_faces)\n"
 "\n"
-"   Split an edge, return the newly created data.\n"
+"   Collapses a vertex that has only two manifold edges onto a vertex it shares an edge with.\n"
 "\n"
 "   :arg vert: The vert that will be collapsed.\n"
 "   :type vert: :class:`bmesh.types.BMVert`\n"
@@ -163,7 +163,7 @@ static PyObject *bpy_bm_utils_vert_collapse_faces(PyObject *UNUSED(self), PyObje
 	}
 	else {
 		PyErr_SetString(PyExc_ValueError,
-		                "vert_collapse_edge(vert, edge): no new edge created, internal error");
+		                "vert_collapse_faces(vert, edge): no new edge created, internal error");
 		return NULL;
 	}
 }
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 6ed8d6a..7422416 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -198,7 +198,6 @@ struct Render
 	ListBase strandsurface;
 	
 	/* use this instead of R.r.cfra */
-	float cfra;
 	float mblur_offs, field_offs;
 	
 	/* render database */
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 3860863..1906f97 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -3158,7 +3158,12 @@ static void init_camera_inside_volumes(Render *re)
 {
 	ObjectInstanceRen *obi;
 	VolumeOb *vo;
-	float co[3] = {0.f, 0.f, 0.f};
+	/* coordinates are all in camera space, so camera coordinate is zero. we also
+	 * add an offset for the clip start, however note that with clip start it's
+	 * actually impossible to do a single 'inside' test, since there will not be
+	 * a single point where all camera rays start from, though for small clip start
+	 * they will be close together. */
+	float co[3] = {0.f, 0.f, -re->clipsta};
 
 	for (vo= re->volumes.first; vo; vo= vo->next) {
 		for (obi= re->instancetable.first; obi; obi= obi->next) {
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 6b5b971..f241e0e 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -942,6 +942,9 @@ void RE_TileProcessor(Render *re)
 
 static void do_render_3d(Render *re)
 {
+	float cfra;
+	int cfra_backup;
+
 	/* try external */
 	if (RE_engine_render(re, 0))
 		return;
@@ -949,9 +952,13 @@ static void do_render_3d(Render *re)
 	/* internal */
 	RE_parts_clamp(re);
 	
-//	re->cfra= cfra;	/* <- unused! */
-	re->scene->r.subframe = re->mblur_offs + re->field_offs;
-	
+	/* add motion blur and fields offset to frames */
+	cfra_backup = re->scene->r.cfra;
+
+	cfra = re->scene->r.cfra + re->mblur_offs + re->field_offs;
+	re->scene->r.cfra = floorf(cfra);
+	re->scene->r.subframe = cfra - floorf(cfra);
+
 	/* lock drawing in UI during data phase */
 	if (re->draw_lock)
 		re->draw_lock(re->dlh, 1);
@@ -976,6 +983,7 @@ static void do_render_3d(Render *re)
 	/* free all render verts etc */
 	RE_Database_Free(re);
 	
+	re->scene->r.cfra = cfra_backup;
 	re->scene->r.subframe = 0.f;
 }
 
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index a540cdb..3ca4015 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -447,7 +447,7 @@ int pointdensitytex(Tex *tex, const float texvec[3], TexResult *texres)
 			turb = BLI_gTurbulence(pd->noise_size, texvec[0]+age, texvec[1]+age, texvec[2]+age, pd->noise_depth, 0, pd->noise_basis);
 		}
 		else if (pd->noise_influence == TEX_PD_NOISE_TIME) {
-			time = R.cfra / (float)R.r.efra;
+			time = R.r.cfra / (float)R.r.efra;
 			turb = BLI_gTurbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth, 0, pd->noise_basis);
 			//turb = BLI_turbulence(pd->noise_size, texvec[0]+time, texvec[1]+time, texvec[2]+time, pd->noise_depth);
 		}
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 09f7e16..d80536b 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1068,6 +1068,8 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *
 		if (wt == timer)
 			break;
 	if (wt) {
+		wmWindow *win;
+		
 		if (wm->reports.reporttimer == wt)
 			wm->reports.reporttimer = NULL;
 		
@@ -1075,6 +1077,17 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *
 		if (wt->customdata)
 			MEM_freeN(wt->customdata);
 		MEM_freeN(wt);
+		
+		/* there might be events in queue with this timer as customdata */
+		for (win = wm->windows.first; win; win = win->next) {
+			wmEvent *event;
+			for (event = win->queue.first; event; event = event->next) {
+				if (event->customdata == wt) {
+					event->customdata = NULL;
+					event->type = EVENT_NONE;	/* timer users customdata, dont want NULL == NULL */
+				}
+			}
+		}
 	}
 }
 
diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h
index 4d3d6ef..ac43510 100644
--- a/source/blender/windowmanager/wm_event_types.h
+++ b/source/blender/windowmanager/wm_event_types.h
@@ -53,6 +53,8 @@
 #define MOUSEX		4
 #define MOUSEY		5
 
+/* non-event, for example disabled timer */
+#define EVENT_NONE		0
 /* MOUSE : 0x00x */
 #define LEFTMOUSE		1
 #define MIDDLEMOUSE		2
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index eb695e6..ab0630b 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -2187,26 +2187,37 @@ static void bl_ConvertBlenderObject_Single(
 		blenderobject->loc[1]+blenderobject->dloc[1],
 		blenderobject->loc[2]+blenderobject->dloc[2]
 	);
-	MT_Vector3 eulxyz(blenderobject->rot);
+
+	MT_Matrix3x3 rotation;
+	float rotmat[3][3];
+	BKE_object_rot_to_mat3(blenderobject, rotmat, FALSE);
+	rotation.setValue3x3((float*)rotmat);
+
 	MT_Vector3 scale(blenderobject->size);
+
 	if (converter->addInitFromFrame) {//rcruiz
-		float eulxyzPrev[3];
 		blenderscene->r.cfra=blenderscene->r.sfra-1;
 		//XXX update_for_newframe();
 		MT_Vector3 tmp=pos-MT_Point3(blenderobject->loc[0]+blenderobject->dloc[0],
 		                             blenderobject->loc[1]+blenderobject->dloc[1],
 		                             blenderobject->loc[2]+blenderobject->dloc[2]
 		                             );
-		eulxyzPrev[0]=blenderobject->rot[0];
-		eulxyzPrev[1]=blenderobject->rot[1];
-		eulxyzPrev[2]=blenderobject->rot[2];
+
+		float rotmatPrev[3][3];
+		BKE_object_rot_to_mat3(blenderobject, rotmatPrev, FALSE);
+
+		float eulxyz[3], eulxyzPrev[3];
+		mat3_to_eul(eulxyz, rotmat);
+		mat3_to_eul(eulxyzPrev, rotmatPrev);
 
 		double fps = (double) blenderscene->r.frs_sec/
 		        (double) blenderscene->r.frs_sec_base;
 
 		tmp.scale(fps, fps, fps);
 		inivel.push_back(tmp);
-		tmp=eulxyz-eulxyzPrev;
+		tmp[0]=eulxyz[0]-eulxyzPrev[0];
+		tmp[1]=eulxyz[1]-eulxyzPrev[1];
+		tmp[2]=eulxyz[2]-eulxyzPrev[2];
 		tmp.scale(fps, fps, fps);
 		iniang.push_back(tmp);
 		blenderscene->r.cfra=blenderscene->r.sfra;
@@ -2214,7 +2225,7 @@ static void bl_ConvertBlenderObject_Single(
 	}
 
 	gameobj->NodeSetLocalPosition(pos);
-	gameobj->NodeSetLocalOrientation(MT_Matrix3x3(eulxyz));
+	gameobj->NodeSetLocalOrientation(rotation);
 	gameobj->NodeSetLocalScale(scale);
 	gameobj->NodeUpdateGS(0);
 
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index a82f9ce..ba7d313 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -492,6 +492,8 @@ int main(int argc, char** argv)
 
 	// XXX this one too
 	U.anisotropic_filter = 2;
+	// enable fast mipmap generation
+	U.use_gpu_mipmap = 1;
 
 	sound_init_once();
 

-- 
blender packaging



More information about the pkg-multimedia-commits mailing list