Cleanup: use C-style comments, double quote Python text

This commit is contained in:
Campbell Barton
2024-09-03 21:22:34 +10:00
parent e242157674
commit e34d9eeac7
16 changed files with 50 additions and 50 deletions

View File

@@ -682,7 +682,7 @@ class ANIM_OT_slot_new_for_id(Operator):
@classmethod
def poll(cls, context):
animated_id = getattr(context, 'animated_id', None)
animated_id = getattr(context, "animated_id", None)
if not animated_id:
return False
if not animated_id.animation_data or not animated_id.animation_data.action:
@@ -694,7 +694,7 @@ class ANIM_OT_slot_new_for_id(Operator):
return True
def execute(self, context):
animated_id = getattr(context, 'animated_id', None)
animated_id = getattr(context, "animated_id", None)
action = animated_id.animation_data.action
slot = action.slots.new(for_id=animated_id)
@@ -706,7 +706,7 @@ class ANIM_OT_slot_unassign_from_id(Operator):
"""Un-assign the assigned Action Slot from an ID.
Note that _which_ ID should get this slot unassigned must be set in the
'animated_id' context pointer, using:
"animated_id" context pointer, using:
>>> layout.context_pointer_set("animated_id", animated_id)
"""
@@ -717,7 +717,7 @@ class ANIM_OT_slot_unassign_from_id(Operator):
@classmethod
def poll(cls, context):
animated_id = getattr(context, 'animated_id', None)
animated_id = getattr(context, "animated_id", None)
if not animated_id:
return False
if not animated_id.animation_data or not animated_id.animation_data.action_slot:
@@ -726,7 +726,7 @@ class ANIM_OT_slot_unassign_from_id(Operator):
return True
def execute(self, context):
animated_id = getattr(context, 'animated_id', None)
animated_id = getattr(context, "animated_id", None)
animated_id.animation_data.action_slot = None
return {'FINISHED'}

View File

@@ -326,11 +326,11 @@ class MaterialProperties_MixIn:
header, body = layout.panel("import_image_plane_material", default_closed=False)
header.label(text="Material")
if body:
body.prop(self, 'shader')
body.prop(self, "shader")
if self.shader == 'EMISSION':
body.prop(self, "emit_strength")
body.prop(self, 'render_method')
body.prop(self, "render_method")
if self.render_method == 'BLENDED':
body.prop(self, "show_transparent_back")
@@ -395,8 +395,8 @@ class TextureProperties_MixIn:
header, body = layout.panel("import_image_plane_texture", default_closed=False)
header.label(text="Texture")
if body:
body.prop(self, 'interpolation')
body.prop(self, 'extension')
body.prop(self, "interpolation")
body.prop(self, "extension")
row = body.row(align=False, heading="Alpha")
row.prop(self, "use_transparency", text="")

View File

@@ -516,7 +516,7 @@ class JoinUVs(Operator):
nbr_loops = len(mesh.loops)
# seems to be the fastest way to create an array
uv_array = array.array('f', [0.0] * 2) * nbr_loops
uv_array = array.array("f", [0.0] * 2) * nbr_loops
mesh.uv_layers.active.data.foreach_get("uv", uv_array)
objects = context.selected_editable_objects[:]

View File

@@ -555,7 +555,7 @@ class DATA_PT_camera_animation(CameraButtonsPanel, PropertiesAnimationMixin, Pro
'BLENDER_EEVEE_NEXT',
'BLENDER_WORKBENCH',
}
_animated_id_context_property = 'camera'
_animated_id_context_property = "camera"
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):