| 496 | |
| 497 | |
| 498 | class Permutation(object): |
| 499 | STATIC = 0 |
| 500 | DYNAMIC = 1 |
| 501 | |
| 502 | def __init__(self, stream, string_table, version): |
| 503 | self.name = string_table.get_string(stream.read_uint32()) |
| 504 | self.default_index = stream.read_uint8() |
| 505 | self.description = string_table.get_string(stream.read_uint32()) |
| 506 | if version > 5: |
| 507 | self.type = stream.read_uint8() |
| 508 | else: |
| 509 | self.type = Permutation.STATIC |
| 510 | count = stream.read_uint8() |
| 511 | self.options = [] |
| 512 | for i in range(count): |
| 513 | self.options.append(string_table.get_string(stream.read_uint32())) |
| 514 | |
| 515 | |
| 516 | class ShaderInfo(object): |