serialize with double quotes
This commit is contained in:
parent
ec42c6d2bd
commit
bf075b41ef
|
@ -26,7 +26,7 @@ conversion_tables = {
|
|||
"bevy_color::linear_rgba::LinearRgba": lambda value: "LinearRgba(red:"+str(value[0])+ ", green:"+str(value[1])+ ", blue:"+str(value[2])+ ", alpha:"+str(value[3])+ ")",
|
||||
"bevy_color::hsva::Hsva": lambda value: "Hsva(hue:"+str(value[0])+ ", saturation:"+str(value[1])+ ", value:"+str(value[2])+ ", alpha:"+str(value[3])+ ")",
|
||||
|
||||
"bevy_ecs::entity::Entity": lambda value: "Entity(name:" + str(value) + ")"
|
||||
"bevy_ecs::entity::Entity": lambda value: 'Entity(name: "' + str(value.name) + '")'
|
||||
}
|
||||
|
||||
#converts the value of a property group(no matter its complexity) into a single custom property value
|
||||
|
|
|
@ -128,7 +128,7 @@ def parse_color_hsva(value, caster, typeName):
|
|||
return [caster(parsed['hue']), caster(parsed['saturation']), caster(parsed['value']), caster(parsed['alpha'])]
|
||||
|
||||
def parse_entity(value):
|
||||
parsed = parse_struct_string(value.replace("Entity","").replace("(", "").replace(")","") )
|
||||
parsed = parse_struct_string(value.replace("Entity","").replace("(", "").replace(")","").replace('"', ""))
|
||||
bpy.context.scene.objects[parsed["name"]]
|
||||
|
||||
def to_int(input):
|
||||
|
|
Loading…
Reference in New Issue