apply rna naming for ToolSettings
This commit is contained in:
@@ -244,8 +244,8 @@ class IMAGE_MT_uvs(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop_menu_enum(toolsettings, "proportional_editing")
|
||||
layout.prop_menu_enum(toolsettings, "proportional_editing_falloff")
|
||||
layout.prop_menu_enum(toolsettings, "proportional_edit")
|
||||
layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -295,21 +295,21 @@ class IMAGE_HT_header(bpy.types.Header):
|
||||
uvedit = sima.uv_editor
|
||||
|
||||
layout.prop(uvedit, "pivot_point", text="", icon_only=True)
|
||||
layout.prop(toolsettings, "uv_sync_selection", text="")
|
||||
layout.prop(toolsettings, "use_uv_select_sync", text="")
|
||||
|
||||
if toolsettings.uv_sync_selection:
|
||||
if toolsettings.use_uv_select_sync:
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "mesh_selection_mode", text="", index=0, icon='VERTEXSEL')
|
||||
row.prop(toolsettings, "mesh_selection_mode", text="", index=1, icon='EDGESEL')
|
||||
row.prop(toolsettings, "mesh_selection_mode", text="", index=2, icon='FACESEL')
|
||||
row.prop(toolsettings, "mesh_select_mode", text="", index=0, icon='VERTEXSEL')
|
||||
row.prop(toolsettings, "mesh_select_mode", text="", index=1, icon='EDGESEL')
|
||||
row.prop(toolsettings, "mesh_select_mode", text="", index=2, icon='FACESEL')
|
||||
else:
|
||||
layout.prop(toolsettings, "uv_selection_mode", text="", expand=True)
|
||||
layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
|
||||
layout.prop(uvedit, "sticky_select_mode", text="", icon_only=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
|
||||
if toolsettings.proportional_editing != 'DISABLED':
|
||||
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
|
||||
row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
|
||||
if toolsettings.proportional_edit != 'DISABLED':
|
||||
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "snap", text="")
|
||||
|
||||
@@ -67,10 +67,10 @@ class TIME_HT_header(bpy.types.Header):
|
||||
row.operator("screen.frame_jump", text="", icon='FF').end = True
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.prop(tools, "use_auto_keying", text="", toggle=True)
|
||||
if screen.animation_playing and tools.use_auto_keying:
|
||||
row.prop(tools, "use_keyframe_insert_auto", text="", toggle=True)
|
||||
if screen.animation_playing and tools.use_keyframe_insert_auto:
|
||||
subsub = row.row()
|
||||
subsub.prop(tools, "record_with_nla", toggle=True)
|
||||
subsub.prop(tools, "use_record_with_nla", toggle=True)
|
||||
|
||||
layout.prop(scene, "sync_mode", text="")
|
||||
|
||||
@@ -189,8 +189,8 @@ class TIME_MT_autokey(bpy.types.Menu):
|
||||
layout = self.layout
|
||||
tools = context.tool_settings
|
||||
|
||||
layout.prop_enum(tools, "autokey_mode", 'ADD_REPLACE_KEYS')
|
||||
layout.prop_enum(tools, "autokey_mode", 'REPLACE_KEYS')
|
||||
layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
|
||||
layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
|
||||
|
||||
def register():
|
||||
pass
|
||||
|
||||
@@ -299,7 +299,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
|
||||
|
||||
sub = col.column()
|
||||
|
||||
# sub.active = edit.use_auto_keying # incorrect, timeline can enable
|
||||
# sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
|
||||
sub.prop(edit, "use_keyframe_insert_keyingset", text="Only Insert for Keying Set")
|
||||
sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
|
||||
|
||||
|
||||
@@ -60,9 +60,9 @@ class VIEW3D_HT_header(bpy.types.Header):
|
||||
'''
|
||||
if obj and obj.mode == 'EDIT' and obj.type == 'MESH':
|
||||
row_sub = row.row(align=True)
|
||||
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=0, icon='VERTEXSEL')
|
||||
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=1, icon='EDGESEL')
|
||||
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=2, icon='FACESEL')
|
||||
row_sub.prop(toolsettings, "mesh_select_mode", text="", index=0, icon='VERTEXSEL')
|
||||
row_sub.prop(toolsettings, "mesh_select_mode", text="", index=1, icon='EDGESEL')
|
||||
row_sub.prop(toolsettings, "mesh_select_mode", text="", index=2, icon='FACESEL')
|
||||
'''
|
||||
|
||||
if obj:
|
||||
@@ -77,14 +77,14 @@ class VIEW3D_HT_header(bpy.types.Header):
|
||||
# Proportional editing
|
||||
if obj.mode in ('EDIT', 'PARTICLE_EDIT'):
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
|
||||
if toolsettings.proportional_editing != 'DISABLED':
|
||||
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
|
||||
row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
|
||||
if toolsettings.proportional_edit != 'DISABLED':
|
||||
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
elif obj.mode == 'OBJECT':
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "proportional_editing_objects", text="", icon_only=True)
|
||||
if toolsettings.proportional_editing_objects:
|
||||
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
|
||||
row.prop(toolsettings, "use_proportional_edit_objects", text="", icon_only=True)
|
||||
if toolsettings.use_proportional_edit_objects:
|
||||
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
||||
|
||||
# Snap
|
||||
row = layout.row(align=True)
|
||||
@@ -93,11 +93,11 @@ class VIEW3D_HT_header(bpy.types.Header):
|
||||
if toolsettings.snap_element != 'INCREMENT':
|
||||
row.prop(toolsettings, "snap_target", text="")
|
||||
if obj and obj.mode == 'OBJECT':
|
||||
row.prop(toolsettings, "snap_align_rotation", text="")
|
||||
row.prop(toolsettings, "use_snap_align_rotation", text="")
|
||||
if toolsettings.snap_element == 'VOLUME':
|
||||
row.prop(toolsettings, "snap_peel_object", text="")
|
||||
row.prop(toolsettings, "use_snap_peel_object", text="")
|
||||
elif toolsettings.snap_element == 'FACE':
|
||||
row.prop(toolsettings, "snap_project", text="")
|
||||
row.prop(toolsettings, "use_snap_project", text="")
|
||||
|
||||
# OpenGL render
|
||||
row = layout.row(align=True)
|
||||
@@ -489,7 +489,7 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
|
||||
|
||||
layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES'
|
||||
layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS'
|
||||
if context.scene.tool_settings.mesh_selection_mode[2] == False:
|
||||
if context.scene.tool_settings.mesh_select_mode[2] == False:
|
||||
layout.operator("mesh.select_non_manifold", text="Non Manifold")
|
||||
layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER'
|
||||
layout.operator("mesh.select_similar", text="Similar")
|
||||
@@ -1296,9 +1296,9 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(settings, "automerge_editing")
|
||||
layout.prop_menu_enum(settings, "proportional_editing")
|
||||
layout.prop_menu_enum(settings, "proportional_editing_falloff")
|
||||
layout.prop(settings, "use_mesh_automerge")
|
||||
layout.prop_menu_enum(settings, "proportional_edit")
|
||||
layout.prop_menu_enum(settings, "proportional_edit_falloff")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1340,15 +1340,15 @@ class VIEW3D_MT_edit_mesh_selection_mode(bpy.types.Menu):
|
||||
|
||||
prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
|
||||
prop.value = "(True, False, False)"
|
||||
prop.data_path = "tool_settings.mesh_selection_mode"
|
||||
prop.data_path = "tool_settings.mesh_select_mode"
|
||||
|
||||
prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
|
||||
prop.value = "(False, True, False)"
|
||||
prop.data_path = "tool_settings.mesh_selection_mode"
|
||||
prop.data_path = "tool_settings.mesh_select_mode"
|
||||
|
||||
prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
|
||||
prop.value = "(False, False, True)"
|
||||
prop.data_path = "tool_settings.mesh_selection_mode"
|
||||
prop.data_path = "tool_settings.mesh_select_mode"
|
||||
|
||||
|
||||
class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
|
||||
@@ -1357,7 +1357,7 @@ class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
|
||||
@staticmethod
|
||||
def extrude_options(context):
|
||||
mesh = context.object.data
|
||||
selection_mode = context.tool_settings.mesh_selection_mode
|
||||
selection_mode = context.tool_settings.mesh_select_mode
|
||||
|
||||
totface = mesh.total_face_sel
|
||||
totedge = mesh.total_edge_sel
|
||||
@@ -1439,7 +1439,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
mesh = context.object.data
|
||||
selection_mode = context.tool_settings.mesh_selection_mode
|
||||
selection_mode = context.tool_settings.mesh_select_mode
|
||||
|
||||
totface = mesh.total_face_sel
|
||||
totedge = mesh.total_edge_sel
|
||||
@@ -1640,8 +1640,8 @@ def draw_curve(self, context):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop_menu_enum(settings, "proportional_editing")
|
||||
layout.prop_menu_enum(settings, "proportional_editing_falloff")
|
||||
layout.prop_menu_enum(settings, "proportional_edit")
|
||||
layout.prop_menu_enum(settings, "proportional_edit_falloff")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1788,8 +1788,8 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop_menu_enum(settings, "proportional_editing")
|
||||
layout.prop_menu_enum(settings, "proportional_editing_falloff")
|
||||
layout.prop_menu_enum(settings, "proportional_edit")
|
||||
layout.prop_menu_enum(settings, "proportional_edit_falloff")
|
||||
|
||||
layout.separator()
|
||||
|
||||
@@ -1825,8 +1825,8 @@ class VIEW3D_MT_edit_lattice(bpy.types.Menu):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop_menu_enum(settings, "proportional_editing")
|
||||
layout.prop_menu_enum(settings, "proportional_editing_falloff")
|
||||
layout.prop_menu_enum(settings, "proportional_edit")
|
||||
layout.prop_menu_enum(settings, "proportional_edit_falloff")
|
||||
|
||||
|
||||
class VIEW3D_MT_edit_armature(bpy.types.Menu):
|
||||
@@ -2219,7 +2219,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
|
||||
layout = self.layout
|
||||
toolsettings = context.scene.tool_settings
|
||||
|
||||
layout.prop(toolsettings, "bone_sketching", text="")
|
||||
layout.prop(toolsettings, "use_bone_sketching", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -2227,8 +2227,8 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
|
||||
|
||||
col = layout.column()
|
||||
|
||||
col.prop(toolsettings, "etch_quick")
|
||||
col.prop(toolsettings, "etch_overdraw")
|
||||
col.prop(toolsettings, "use_etch_quick")
|
||||
col.prop(toolsettings, "use_etch_overdraw")
|
||||
|
||||
col.prop(toolsettings, "etch_convert_mode")
|
||||
|
||||
@@ -2241,7 +2241,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
|
||||
elif toolsettings.etch_convert_mode == 'RETARGET':
|
||||
col.prop(toolsettings, "etch_template")
|
||||
col.prop(toolsettings, "etch_roll_mode")
|
||||
col.prop(toolsettings, "etch_autoname")
|
||||
col.prop(toolsettings, "use_etch_autoname")
|
||||
col.prop(toolsettings, "etch_number")
|
||||
col.prop(toolsettings, "etch_side")
|
||||
col.operator("sketch.convert", text="Convert")
|
||||
|
||||
@@ -680,7 +680,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
|
||||
|
||||
elif context.weight_paint_object and brush:
|
||||
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
|
||||
layout.prop(context.tool_settings, "auto_normalize", text="Auto Normalize")
|
||||
layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
|
||||
|
||||
col = layout.column()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user