From 825ce0dad6f7c05c1151f53dfc9319432a6b4607 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 9 Sep 2012 17:01:23 +0900 Subject: [PATCH] Make the type of EntityClass.flagnames consistent. Sometimes list and sometimes tuple makes for a mess. --- tools/io_qfmap/entity.py | 4 ++-- tools/io_qfmap/entityclass.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/io_qfmap/entity.py b/tools/io_qfmap/entity.py index c1e5d7296..0886f9703 100644 --- a/tools/io_qfmap/entity.py +++ b/tools/io_qfmap/entity.py @@ -49,8 +49,8 @@ class EntityPanel(bpy.types.Panel): obj = context.active_object qfmap = context.scene.qfmap ec = qfmap.entity_classes.entity_classes[obj.qfentity.classname] - flags = ec.flagnames + [""] * (8 - len(ec.flagnames)) - flags += ["!easy", "!medium", "!hard", "!dm"] + flags = ec.flagnames + ("",) * (8 - len(ec.flagnames)) + flags += ("!easy", "!medium", "!hard", "!dm") layout.prop(obj.qfentity, "classname") split = layout.split() for c in range(3): diff --git a/tools/io_qfmap/entityclass.py b/tools/io_qfmap/entityclass.py index 132eb5c33..03f456f4d 100644 --- a/tools/io_qfmap/entityclass.py +++ b/tools/io_qfmap/entityclass.py @@ -39,9 +39,9 @@ class EntityClass: else: size = None if "flagnames" in d: - flagnames = list(d["flagnames"]) + flagnames = tuple(d["flagnames"]) else: - flagnames = [] + flagnames = () if "comment" in d: comment = d["comment"] else: