示例#1
0
 def storage_get_data(self, node_ref):
     pack_pointer_property_name(self.script_pointer, node_ref,
                                "textfile_name")
     local_storage = {'lines': []}
     for line in self.script_pointer.lines:
         local_storage['lines'].append(line.body)
     node_ref['string_storage'] = json.dumps(local_storage)
示例#2
0
 def save_to_json(self, node_data):
     if self.script_pointer is None:
         return  # just empty node, nothing to do
     pack_pointer_property_name(self.script_pointer, node_data,
                                "textfile_name")
     local_storage = {'lines': []}
     for line in self.script_pointer.lines:
         local_storage['lines'].append(line.body)
     node_data['string_storage'] = json.dumps(local_storage)
示例#3
0
 def storage_get_data(self, node_ref):
     pack_pointer_property_name(self.texture_pointer, node_ref,
                                "texture_name")
示例#4
0
 def storage_get_data(self, node_ref):
     # it is technically possible to store images inside json as base64     o_0   just a thought.
     pack_pointer_property_name(self.image_pointer, node_ref, "image_name")
     self.info(
         f"You are storing this layout {self.id_data.name} as a json, it will not include images"
     )