forked from bartvdbraak/blender
pedantic enum string consistancy
This commit is contained in:
parent
4e61f8a836
commit
30c4c4599d
@ -117,7 +117,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
|
|||||||
active_col_layer = me.vertex_colors[0].data
|
active_col_layer = me.vertex_colors[0].data
|
||||||
|
|
||||||
if not active_col_layer:
|
if not active_col_layer:
|
||||||
return("CANCELLED", )
|
return('CANCELLED', )
|
||||||
|
|
||||||
for i, f in enumerate(me.faces):
|
for i, f in enumerate(me.faces):
|
||||||
if not me.use_paint_mask or f.selected:
|
if not me.use_paint_mask or f.selected:
|
||||||
|
@ -133,7 +133,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
|
|||||||
def IK(self, context, layout, con):
|
def IK(self, context, layout, con):
|
||||||
if context.object.pose.ik_solver == "ITASC":
|
if context.object.pose.ik_solver == "ITASC":
|
||||||
layout.itemR(con, "ik_type")
|
layout.itemR(con, "ik_type")
|
||||||
getattr(self, "IK_" + con.ik_type)(context, layout, con)
|
getattr(self, 'IK_' + con.ik_type)(context, layout, con)
|
||||||
else:
|
else:
|
||||||
# Legacy IK constraint
|
# Legacy IK constraint
|
||||||
self.target_template(layout, con)
|
self.target_template(layout, con)
|
||||||
@ -702,7 +702,7 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel):
|
|||||||
split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
|
split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
|
||||||
split.itemL()
|
split.itemL()
|
||||||
|
|
||||||
if ob.pose.ik_solver == "ITASC":
|
if ob.pose.ik_solver == 'ITASC':
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.itemR(pchan, "ik_rot_control", text="Control Rotation")
|
row.itemR(pchan, "ik_rot_control", text="Control Rotation")
|
||||||
row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
|
row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
|
||||||
@ -723,7 +723,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
|
|||||||
|
|
||||||
if ob and bone:
|
if ob and bone:
|
||||||
pchan = ob.pose.pose_channels[bone.name]
|
pchan = ob.pose.pose_channels[bone.name]
|
||||||
return pchan.has_ik and ob.pose.ik_solver == "ITASC" and ob.pose.ik_param
|
return pchan.has_ik and ob.pose.ik_solver == 'ITASC' and ob.pose.ik_param
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -734,7 +734,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
|
|||||||
itasc = ob.pose.ik_param
|
itasc = ob.pose.ik_param
|
||||||
|
|
||||||
layout.itemR(itasc, "mode", expand=True)
|
layout.itemR(itasc, "mode", expand=True)
|
||||||
simulation = itasc.mode == "SIMULATION"
|
simulation = itasc.mode == 'SIMULATION'
|
||||||
if simulation:
|
if simulation:
|
||||||
layout.itemL(text="Reiteration:")
|
layout.itemL(text="Reiteration:")
|
||||||
layout.itemR(itasc, "reiteration", expand=True)
|
layout.itemR(itasc, "reiteration", expand=True)
|
||||||
@ -742,7 +742,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
|
|||||||
flow = layout.column_flow()
|
flow = layout.column_flow()
|
||||||
flow.itemR(itasc, "precision", text="Prec")
|
flow.itemR(itasc, "precision", text="Prec")
|
||||||
flow.itemR(itasc, "num_iter", text="Iter")
|
flow.itemR(itasc, "num_iter", text="Iter")
|
||||||
flow.active = not simulation or itasc.reiteration != "NEVER"
|
flow.active = not simulation or itasc.reiteration != 'NEVER'
|
||||||
|
|
||||||
if simulation:
|
if simulation:
|
||||||
layout.itemR(itasc, "auto_step")
|
layout.itemR(itasc, "auto_step")
|
||||||
@ -757,7 +757,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
|
|||||||
if simulation:
|
if simulation:
|
||||||
layout.itemR(itasc, "feedback")
|
layout.itemR(itasc, "feedback")
|
||||||
layout.itemR(itasc, "max_velocity")
|
layout.itemR(itasc, "max_velocity")
|
||||||
if itasc.solver == "DLS":
|
if itasc.solver == 'DLS':
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
row.itemR(itasc, "dampmax", text="Damp", slider=True)
|
row.itemR(itasc, "dampmax", text="Damp", slider=True)
|
||||||
row.itemR(itasc, "dampeps", text="Eps", slider=True)
|
row.itemR(itasc, "dampeps", text="Eps", slider=True)
|
||||||
|
@ -77,7 +77,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
|
|||||||
layout.itemS()
|
layout.itemS()
|
||||||
|
|
||||||
layout.itemR(field, "guide_kink_type")
|
layout.itemR(field, "guide_kink_type")
|
||||||
if (field.guide_kink_type != "NONE"):
|
if (field.guide_kink_type != 'NONE'):
|
||||||
layout.itemR(field, "guide_kink_axis")
|
layout.itemR(field, "guide_kink_axis")
|
||||||
|
|
||||||
flow = layout.column_flow()
|
flow = layout.column_flow()
|
||||||
|
@ -199,7 +199,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
|
|||||||
sub.active = rd.render_raytracing
|
sub.active = rd.render_raytracing
|
||||||
sub.itemL(text="Acceleration structure:")
|
sub.itemL(text="Acceleration structure:")
|
||||||
sub.itemR(rd, "raytrace_structure", text="")
|
sub.itemR(rd, "raytrace_structure", text="")
|
||||||
if rd.raytrace_structure == "OCTREE":
|
if rd.raytrace_structure == 'OCTREE':
|
||||||
sub.itemR(rd, "octree_resolution", text="Resolution")
|
sub.itemR(rd, "octree_resolution", text="Resolution")
|
||||||
else:
|
else:
|
||||||
sub.itemR(rd, "use_instances", text="Instances")
|
sub.itemR(rd, "use_instances", text="Instances")
|
||||||
|
@ -1224,16 +1224,16 @@ class USERPREF_PT_input(bpy.types.Panel):
|
|||||||
row = subcol.row()
|
row = subcol.row()
|
||||||
|
|
||||||
if kmi.expanded:
|
if kmi.expanded:
|
||||||
row.itemR(kmi, "expanded", text="", icon="ICON_TRIA_DOWN")
|
row.itemR(kmi, "expanded", text="", icon='ICON_TRIA_DOWN')
|
||||||
else:
|
else:
|
||||||
row.itemR(kmi, "expanded", text="", icon="ICON_TRIA_RIGHT")
|
row.itemR(kmi, "expanded", text="", icon='ICON_TRIA_RIGHT')
|
||||||
|
|
||||||
itemrow = row.row()
|
itemrow = row.row()
|
||||||
itemrow.enabled = km.user_defined
|
itemrow.enabled = km.user_defined
|
||||||
if kmi.active:
|
if kmi.active:
|
||||||
itemrow.itemR(kmi, "active", text="", icon="ICON_CHECKBOX_HLT")
|
itemrow.itemR(kmi, "active", text="", icon='ICON_CHECKBOX_HLT')
|
||||||
else:
|
else:
|
||||||
itemrow.itemR(kmi, "active", text="", icon="ICON_CHECKBOX_DEHLT")
|
itemrow.itemR(kmi, "active", text="", icon='ICON_CHECKBOX_DEHLT')
|
||||||
|
|
||||||
itemcol = itemrow.column()
|
itemcol = itemrow.column()
|
||||||
itemcol.active = kmi.active
|
itemcol.active = kmi.active
|
||||||
@ -1290,11 +1290,11 @@ class USERPREF_PT_input(bpy.types.Panel):
|
|||||||
|
|
||||||
itemcol.itemS()
|
itemcol.itemS()
|
||||||
|
|
||||||
itemrow.itemO("wm.keyitem_remove", text="", icon="ICON_ZOOMOUT")
|
itemrow.itemO("wm.keyitem_remove", text="", icon='ICON_ZOOMOUT')
|
||||||
|
|
||||||
itemrow = col.row()
|
itemrow = col.row()
|
||||||
itemrow.itemL()
|
itemrow.itemL()
|
||||||
itemrow.itemO("wm.keyitem_add", text="", icon="ICON_ZOOMIN")
|
itemrow.itemO("wm.keyitem_add", text="", icon='ICON_ZOOMIN')
|
||||||
itemrow.enabled = km.user_defined
|
itemrow.enabled = km.user_defined
|
||||||
|
|
||||||
bpy.types.register(USERPREF_HT_header)
|
bpy.types.register(USERPREF_HT_header)
|
||||||
@ -1439,7 +1439,7 @@ class WM_OT_keyitem_add(bpy.types.Operator):
|
|||||||
def execute(self, context):
|
def execute(self, context):
|
||||||
wm = context.manager
|
wm = context.manager
|
||||||
km = wm.active_keymap
|
km = wm.active_keymap
|
||||||
kmi = km.add_item("", "A", "PRESS")
|
kmi = km.add_item("", 'A', 'PRESS')
|
||||||
return ('FINISHED',)
|
return ('FINISHED',)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1592,13 +1592,13 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
|
|||||||
|
|
||||||
col.itemR(toolsettings, "etch_convert_mode")
|
col.itemR(toolsettings, "etch_convert_mode")
|
||||||
|
|
||||||
if toolsettings.etch_convert_mode == "LENGTH":
|
if toolsettings.etch_convert_mode == 'LENGTH':
|
||||||
col.itemR(toolsettings, "etch_length_limit")
|
col.itemR(toolsettings, "etch_length_limit")
|
||||||
elif toolsettings.etch_convert_mode == "ADAPTIVE":
|
elif toolsettings.etch_convert_mode == 'ADAPTIVE':
|
||||||
col.itemR(toolsettings, "etch_adaptive_limit")
|
col.itemR(toolsettings, "etch_adaptive_limit")
|
||||||
elif toolsettings.etch_convert_mode == "FIXED":
|
elif toolsettings.etch_convert_mode == 'FIXED':
|
||||||
col.itemR(toolsettings, "etch_subdivision_number")
|
col.itemR(toolsettings, "etch_subdivision_number")
|
||||||
elif toolsettings.etch_convert_mode == "RETARGET":
|
elif toolsettings.etch_convert_mode == 'RETARGET':
|
||||||
col.itemR(toolsettings, "etch_template")
|
col.itemR(toolsettings, "etch_template")
|
||||||
col.itemR(toolsettings, "etch_roll_mode")
|
col.itemR(toolsettings, "etch_roll_mode")
|
||||||
col.itemR(toolsettings, "etch_autoname")
|
col.itemR(toolsettings, "etch_autoname")
|
||||||
|
Loading…
Reference in New Issue
Block a user