Fix vector/color handling for logic node live patching
This commit is contained in:
parent
5276711094
commit
256d27e289
|
@ -11,6 +11,7 @@ class Bridge {
|
||||||
public static var Input = iron.system.Input;
|
public static var Input = iron.system.Input;
|
||||||
public static var Object = iron.object.Object;
|
public static var Object = iron.object.Object;
|
||||||
public static var Data = iron.data.Data;
|
public static var Data = iron.data.Data;
|
||||||
|
public static var Vec4 = iron.math.Vec4;
|
||||||
public static function log(s: String) { trace(s); };
|
public static function log(s: String) { trace(s); };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -206,9 +206,9 @@ def send_event(event_id: str, opt_data: Any = None):
|
||||||
inp_type = socket.arm_socket_type
|
inp_type = socket.arm_socket_type
|
||||||
|
|
||||||
if inp_type in ('VECTOR', 'RGB'):
|
if inp_type in ('VECTOR', 'RGB'):
|
||||||
value = '{' + f'"x": {value[0]}, "y": {value[1]}, "z": {value[2]}' + '}'
|
value = f'new iron.Vec4({arm.node_utils.haxe_format_socket_val(value, array_outer_brackets=False)}, 1.0)'
|
||||||
elif inp_type == 'RGBA':
|
elif inp_type == 'RGBA':
|
||||||
value = '{' + f'"x": {value[0]}, "y": {value[1]}, "z": {value[2]}, "w": {value[3]}' + '}'
|
value = f'new iron.Vec4({arm.node_utils.haxe_format_socket_val(value, array_outer_brackets=False)})'
|
||||||
elif inp_type == 'OBJECT':
|
elif inp_type == 'OBJECT':
|
||||||
value = f'iron.Scene.active.getChild("{value}")' if value != '' else 'null'
|
value = f'iron.Scene.active.getChild("{value}")' if value != '' else 'null'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue