diff --git a/tpl/bhl_bind_macro.twig b/tpl/bhl_bind_macro.twig index c2d11c0..7042489 100644 --- a/tpl/bhl_bind_macro.twig +++ b/tpl/bhl_bind_macro.twig @@ -688,7 +688,11 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {{f.type|native_type}} nv = Script_{{o.name|norm_name}}.Get_{{f.name}}(f); {{_self.native2val(f.type, 'nv', 'v')}}; {% else %} - {{_self.native2val(f.type, 'f.' ~ f.name, 'v')}}; + {%- if has_token(f, 'bhl_native_prefix') -%} + {{_self.native2val(f.type, 'f.' ~ token(f, 'bhl_native_prefix'), 'v')}}; + {% else %} + {{_self.native2val(f.type, 'f.' ~ f.name, 'v')}}; + {%- endif ~%} {%- endif ~%} #endif } @@ -712,7 +716,11 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack {{_self.val2native(f.type, 'v', 'var nv')}}; Script_{{o.name|norm_name}}.Set_{{f.name}}(ref f, nv); {% else %} - {{_self.val2native(f.type, 'v', 'f.' ~ f.name)}}; + {%- if has_token(f, 'bhl_native_prefix') -%} + {{_self.val2native(f.type, 'v', 'f.' ~ token(f, 'bhl_native_prefix'))}}; + {% else %} + {{_self.val2native(f.type, 'v', 'f.' ~ f.name)}}; + {%- endif ~%} {%- endif ~%} {%~ if has_token(o, 'bhl_custom_rw') ~%}