mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too. - `var2str` -> `var_to_str` - `str2var` -> `str_to_var` - `bytes2var` -> `bytes_to_var` - `bytes2var_with_objects` -> `bytes_to_var_with_objects` - `var2bytes` -> `var_to_bytes` - `var2bytes_with_objects` -> `var_to_bytes_with_objects` - `linear2db` -> `linear_to_db` - `db2linear` -> `db_to_linear` - `deg2rad` -> `deg_to_rad` - `rad2deg` -> `rad_to_deg` - `dict2inst` -> `dict_to_inst` - `inst2dict` -> `inst_to_dict`
This commit is contained in:
@@ -74,11 +74,11 @@
|
||||
[/codeblock]
|
||||
</description>
|
||||
</method>
|
||||
<method name="dict2inst">
|
||||
<method name="dict_to_inst">
|
||||
<return type="Object" />
|
||||
<param index="0" name="dictionary" type="Dictionary" />
|
||||
<description>
|
||||
Converts a dictionary (previously created with [method inst2dict]) back to an instance. Useful for deserializing.
|
||||
Converts a [param dictionary] (previously created with [method inst_to_dict]) back to an Object instance. Useful for deserializing.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_stack">
|
||||
@@ -102,15 +102,15 @@
|
||||
[b]Note:[/b] Not supported for calling from threads. Instead, this will return an empty array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="inst2dict">
|
||||
<method name="inst_to_dict">
|
||||
<return type="Dictionary" />
|
||||
<param index="0" name="instance" type="Object" />
|
||||
<description>
|
||||
Returns the passed instance converted to a dictionary (useful for serializing).
|
||||
Returns the passed [param instance] converted to a Dictionary (useful for serializing).
|
||||
[codeblock]
|
||||
var foo = "bar"
|
||||
func _ready():
|
||||
var d = inst2dict(self)
|
||||
var d = inst_to_dict(self)
|
||||
print(d.keys())
|
||||
print(d.values())
|
||||
[/codeblock]
|
||||
|
||||
Reference in New Issue
Block a user