use BLI_snprintf rather than sprintf for interface functions

This commit is contained in:
Campbell Barton
2011-09-26 16:53:04 +00:00
parent 8a423f59ea
commit fbdfdfefd8
10 changed files with 34 additions and 33 deletions

View File

@@ -204,7 +204,7 @@ class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
def poll(cls, context):
game = context.object.game
rd = context.scene.render
return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine in cls.COMPAT_ENGINES)
return (game.physics_type in {'DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC'}) and (rd.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
game = context.active_object.game

View File

@@ -988,7 +988,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
col.label(text="Color:")
col.prop(part, "draw_color", text="")
sub = col.row()
sub.active = part.draw_color in ('VELOCITY', 'ACCELERATION')
sub.active = (part.draw_color in {'VELOCITY', 'ACCELERATION'})
sub.prop(part, "color_maximum", text="Max")
if (path):