Mercurial > fife-parpg
comparison engine/python/fife/extensions/serializers/xmlmap.py @ 667:a5809f60d548
* Removed the instance id unique check from the loader.
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Mon, 08 Nov 2010 18:21:05 +0000 |
parents | e3140f01749d |
children | 4f36c890b1dd |
comparison
equal
deleted
inserted
replaced
666:3944096d12ce | 667:a5809f60d548 |
---|---|
444 for attr in ('i', 'inst', 'instance'): | 444 for attr in ('i', 'inst', 'instance'): |
445 instances.extend(instelt.findall(attr)) | 445 instances.extend(instelt.findall(attr)) |
446 | 446 |
447 for instance in instances: | 447 for instance in instances: |
448 _id = instance.get('id') | 448 _id = instance.get('id') |
449 # check for istance id name clashes | 449 if not _id: |
450 if _id: | |
451 if bool(layer.getInstance(_id)): | |
452 print "Instance with id=%s, already exists. Omitting..." % _id | |
453 continue | |
454 _id = str(_id) | |
455 else: | |
456 _id = '' | 450 _id = '' |
457 | 451 |
458 objectID = '' | 452 objectID = '' |
459 for attr in ('o', 'object', 'obj'): | 453 for attr in ('o', 'object', 'obj'): |
460 objectID = instance.get(attr) | 454 objectID = instance.get(attr) |