MCPcopy Create free account
hub / github.com/carbonengine/trinity / Annotation

Class Annotation

shadercompiler/python/shadercompiler/effectinfo.py:435–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433
434
435class Annotation(object):
436 def __init__(self, stream, string_table):
437 self.name = string_table.get_string(stream.read_uint32())
438 self.type = stream.read_uint8()
439 if self.type == AnnotationType.BOOL:
440 self.value = stream.read_uint32() != 0
441 elif self.type == AnnotationType.INT:
442 self.value = stream.read_int32()
443 elif self.type == AnnotationType.FLOAT:
444 self.value = stream.read_float()
445 elif self.type == AnnotationType.STRING:
446 self.value = string_table.get_string(stream.read_uint32())
447 else:
448 raise RuntimeError('invalid annotation type')
449
450
451class ParameterAnnotation(object):

Callers 3

__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected