# 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 by level",
"author":"Omar ahmed",
"version":(1,0),
"blender":(2,74,0),
"location":"View3D > EditMode > Select panel",
"description":"Select vertices by level",
"warning":"",
"wiki_url":"",
"tracker_url":"",
"category":"Mesh"}
importbpy
importbmesh
classSelect_by_level(bpy.types.Operator):
"""Select by level"""
bl_idname="mesh.select_by_level"
bl_label="Select by level"
bl_options={'REGISTER','UNDO'}
#Defining the custom properties
X_boolean=bpy.props.BoolProperty(name="X",description="Select in the X axis or not",default=False)
Y_boolean=bpy.props.BoolProperty(name="Y",description="Select in the Y axis or not",default=False)
Z_boolean=bpy.props.BoolProperty(name="Z",description="Select in the Z axis or not",default=True)
Negative_threshold_x=bpy.props.FloatProperty(name="X negative threshold",description="Negative threshold to select after expanding the selection in X axis",default=0.001)
Positive_threshold_x=bpy.props.FloatProperty(name="X Positive threshold",description="Positive threshold to select after expanding the selection in X axis",default=0.001)
Negative_threshold_y=bpy.props.FloatProperty(name="Y negative threshold",description="Negative threshold to select after expanding the selection in Y axis",default=0.001)
Positive_threshold_y=bpy.props.FloatProperty(name="Y Positive threshold",description="Positive threshold to select after expanding the selection in Y axis",default=0.001)
Negative_threshold_z=bpy.props.FloatProperty(name="Z negative threshold",description="Negative threshold to select after expanding the selection in Z axis",default=0.001)
Positive_threshold_z=bpy.props.FloatProperty(name="Z Positive threshold",description="Positive threshold to select after expanding the selection in Z axis",default=0.001)