mirror of
https://github.com/blender/blender-addons.git
synced 2025-08-20 13:22:58 +00:00
Bool Tool: remove dead code
This code has been commented out for years.
This commit is contained in:
@ -107,26 +107,6 @@ def isFTransf():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
# EXPERIMENTAL FEATURES
|
|
||||||
def isMakeVertexGroup():
|
|
||||||
preferences = bpy.context.preferences
|
|
||||||
addon_prefs = preferences.addons[__name__].preferences
|
|
||||||
if addon_prefs.make_vertex_groups:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
def isMakeBoundary():
|
|
||||||
preferences = bpy.context.preferences
|
|
||||||
addon_prefs = preferences.addons[__name__].preferences
|
|
||||||
if addon_prefs.make_boundary:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
def ConvertToMesh(obj):
|
def ConvertToMesh(obj):
|
||||||
act = bpy.context.view_layer.objects.active
|
act = bpy.context.view_layer.objects.active
|
||||||
bpy.context.view_layer.objects.active = obj
|
bpy.context.view_layer.objects.active = obj
|
||||||
@ -147,13 +127,7 @@ def Operation(context, _operation):
|
|||||||
actObj = context.active_object
|
actObj = context.active_object
|
||||||
selObj.hide_render = True
|
selObj.hide_render = True
|
||||||
cyclesVis = selObj.cycles_visibility
|
cyclesVis = selObj.cycles_visibility
|
||||||
"""
|
|
||||||
for obj in bpy.context.view_layer.objects:
|
|
||||||
if isCanvas(obj):
|
|
||||||
for mod in obj.modifiers:
|
|
||||||
if(mod.name == "BTool_" + selObj.name):
|
|
||||||
obj.modifiers.remove(mod)
|
|
||||||
"""
|
|
||||||
if useWire:
|
if useWire:
|
||||||
selObj.display_type = "WIRE"
|
selObj.display_type = "WIRE"
|
||||||
else:
|
else:
|
||||||
@ -328,21 +302,6 @@ def ApplyThisBrush(context, brush):
|
|||||||
if isCanvas(obj):
|
if isCanvas(obj):
|
||||||
for mod in obj.modifiers:
|
for mod in obj.modifiers:
|
||||||
if ("BTool_" + brush.name in mod.name):
|
if ("BTool_" + brush.name in mod.name):
|
||||||
"""
|
|
||||||
# EXPERIMENTAL
|
|
||||||
if isMakeVertexGroup():
|
|
||||||
# Turn all faces of the Brush selected
|
|
||||||
bpy.context.view_layer.objects.active = brush
|
|
||||||
bpy.ops.object.mode_set(mode='EDIT')
|
|
||||||
bpy.ops.mesh.select_all(action='SELECT')
|
|
||||||
bpy.ops.object.mode_set(mode='OBJECT')
|
|
||||||
|
|
||||||
# Turn off al faces of the Canvas selected
|
|
||||||
bpy.context.view_layer.objects.active = canvas
|
|
||||||
bpy.ops.object.mode_set(mode='EDIT')
|
|
||||||
bpy.ops.mesh.select_all(action='DESELECT')
|
|
||||||
bpy.ops.object.mode_set(mode='OBJECT')
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Apply This Brush
|
# Apply This Brush
|
||||||
context.view_layer.objects.active = obj
|
context.view_layer.objects.active = obj
|
||||||
@ -354,18 +313,6 @@ def ApplyThisBrush(context, brush):
|
|||||||
bpy.ops.object.select_all(action='TOGGLE')
|
bpy.ops.object.select_all(action='TOGGLE')
|
||||||
bpy.ops.object.select_all(action='DESELECT')
|
bpy.ops.object.select_all(action='DESELECT')
|
||||||
|
|
||||||
"""
|
|
||||||
# EXPERIMENTAL
|
|
||||||
if isMakeVertexGroup():
|
|
||||||
# Make Vertex Group
|
|
||||||
bpy.ops.object.mode_set(mode='EDIT')
|
|
||||||
bpy.ops.object.vertex_group_assign_new()
|
|
||||||
bpy.ops.mesh.select_all(action='DESELECT')
|
|
||||||
bpy.ops.object.mode_set(mode='OBJECT')
|
|
||||||
|
|
||||||
canvas.vertex_groups.active.name = "BTool_" + brush.name
|
|
||||||
"""
|
|
||||||
|
|
||||||
# Garbage Collector
|
# Garbage Collector
|
||||||
brush.select_set(state=True)
|
brush.select_set(state=True)
|
||||||
# bpy.ops.object.delete()
|
# bpy.ops.object.delete()
|
||||||
@ -1242,12 +1189,6 @@ class PREFS_BoolTool_Props(AddonPreferences):
|
|||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
|
|
||||||
"""
|
|
||||||
# EXPERIMENTAL
|
|
||||||
col.prop(self, "make_vertex_groups")
|
|
||||||
col.prop(self, "make_boundary")
|
|
||||||
"""
|
|
||||||
|
|
||||||
layout.prop(self, "Enable_Tab_01", text="Hot Keys", icon="KEYINGSET")
|
layout.prop(self, "Enable_Tab_01", text="Hot Keys", icon="KEYINGSET")
|
||||||
if self.Enable_Tab_01:
|
if self.Enable_Tab_01:
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
|
Reference in New Issue
Block a user