mesh tissue: clean up ui

This commit is contained in:
Brendon Murphy 2017-06-14 22:46:01 +10:00
parent d93ef9e6a6
commit 6de5ea8376
5 changed files with 29 additions and 13 deletions

View File

@ -36,6 +36,7 @@ if "bpy" in locals():
importlib.reload(tessellate_numpy)
importlib.reload(colors_groups_exchanger)
importlib.reload(dual_mesh)
importlib.reload(lattice)
else:
from . import tessellate_numpy
@ -72,7 +73,7 @@ def unregister():
tessellate_numpy.unregister()
colors_groups_exchanger.unregister()
dual_mesh.unregister()
lattice.unregister()
if __name__ == "__main__":
register()

View File

@ -313,10 +313,11 @@ class face_area_to_vertex_groups(bpy.types.Operator):
class colors_groups_exchanger_panel(bpy.types.Panel):
bl_label = "Data Converter"
bl_label = "Tissue Data Tools"
bl_category = "Tools"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_options = {'DEFAULT_CLOSED'}
#bl_context = "objectmode"
def draw(self, context):
@ -331,7 +332,13 @@ class colors_groups_exchanger_panel(bpy.types.Panel):
col.separator()
col.label(text="Create Vertex Colors:")
col.operator("object.vertex_group_to_vertex_colors", icon="GROUP_VERTEX")
col.separator()
col.label(text="Lattice Along Surface:")
try:
col.operator("object.lattice_along_surface", icon="MOD_LATTICE")
except:
pass
def register():

View File

@ -213,13 +213,14 @@ class dual_mesh(bpy.types.Operator):
bpy.context.scene.objects.active = act
return {'FINISHED'}
'''
class dual_mesh_panel(bpy.types.Panel):
bl_label = "Dual Mesh"
bl_category = "Tools"
bl_category = "Create"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_context = (("objectmode"))
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@ -229,16 +230,16 @@ class dual_mesh_panel(bpy.types.Panel):
col.operator("object.dual_mesh")
except:
pass
'''
def register():
bpy.utils.register_class(dual_mesh)
bpy.utils.register_class(dual_mesh_panel)
# bpy.utils.register_class(dual_mesh_panel)
def unregister():
bpy.utils.unregister_class(dual_mesh)
bpy.utils.unregister_class(dual_mesh_panel)
# bpy.utils.unregister_class(dual_mesh_panel)
if __name__ == "__main__":

View File

@ -390,13 +390,14 @@ class lattice_along_surface(bpy.types.Operator):
pass
return {'FINISHED'}
'''
class lattice_along_surface_panel(bpy.types.Panel):
bl_label = "Modifiers Tools"
bl_category = "Tools"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_context = (("objectmode"))
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
@ -405,16 +406,16 @@ class lattice_along_surface_panel(bpy.types.Panel):
col.operator("object.lattice_along_surface", icon="MOD_LATTICE")
except:
pass
'''
def register():
bpy.utils.register_class(lattice_along_surface)
bpy.utils.register_class(lattice_along_surface_panel)
# bpy.utils.register_class(lattice_along_surface_panel)
def unregister():
bpy.utils.unregister_class(lattice_along_surface)
bpy.utils.unregister_class(lattice_along_surface_panel)
# bpy.utils.unregister_class(lattice_along_surface_panel)
if __name__ == "__main__":

View File

@ -1248,10 +1248,11 @@ class settings_tessellate(bpy.types.Operator):
class tessellate_panel(bpy.types.Panel):
bl_label = "Tessellate"
bl_label = "Tessellate/Dual"
bl_category = "Create"
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
bl_options = {'DEFAULT_CLOSED'}
#bl_context = "objectmode", "editmode"
def draw(self, context):
@ -1273,7 +1274,12 @@ class tessellate_panel(bpy.types.Panel):
for ob1 in context.selected_objects:
if(ob1.name == act.name or ob1.type != 'MESH'): continue
sel = ob1
try:
if bpy.context.active_object.type == 'MESH':
col.label(text="Dual Mesh:")
col.operator("object.dual_mesh")
except:
pass
class rotate_face(bpy.types.Operator):
bl_idname = "mesh.rotate_face"