tools/grit/grit/node/structure.py
def GetDataPackValue(self, lang, encoding):
    """Returns a bytes representation for a data_pack entry."""
    if self.ExpandVariables():
      text = self.gatherer.GetText()
      data = util.Encode(self._Substitute(text), encoding)
    else:
      data = self.gatherer.GetData(lang, encoding)
    if encoding != util.BINARY:
      data = data.encode(encoding)
    data = self.CompressDataIfNeeded(data)
    # If the asset is in the Lottie format, indicate it by prepending "LOTTIE".
    if self.attrs['type'] == 'lottie':
      data = 'LOTTIE'.encode(self.attrs['output_encoding']) + data
    return data
Returns a bytes representation for a data_pack entry.
Returns a bytes representation for a data_pack entry.
Returns a bytes representation for a data_pack entry .
def GetDataPackValue(self, lang, encoding):
    if self.ExpandVariables():
      text = self.gatherer.GetText()
      data = util.Encode(self._Substitute(text), encoding)
    else:
      data = self.gatherer.GetData(lang, encoding)
    if encoding != util.BINARY:
      data = data.encode(encoding)
    data = self.CompressDataIfNeeded(data)
    if self.attrs['type'] == 'lottie':
      data = 'LOTTIE'.encode(self.attrs['output_encoding']) + data
    return data
def GetDataPackValue ( self , lang , encoding ) : if self . ExpandVariables ( ) : text = self . gatherer . GetText ( ) data = util . Encode ( self . _Substitute ( text ) , encoding ) else : data = self . gatherer . GetData ( lang , encoding ) if encoding != util . BINARY : data = data . encode ( encoding ) data = self . CompressDataIfNeeded ( data ) if self . attrs [ 'type' ] == 'lottie' : data = 'LOTTIE' . encode ( self . attrs [ 'output_encoding' ] ) + data return data
Returns a bytes representation for a data_pack entry.
Returns a bytes representation for a data_pack entry .
"""Returns a bytes representation for a data_pack entry.""" # If the asset is in the Lottie format, indicate it by prepending "LOTTIE".
self
lang
encoding