Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
b7741567
Unverified
Commit
b7741567
authored
May 03, 2018
by
Rémi Verschelde
Committed by
GitHub
May 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18514 from neikeq/api-hash-fixes
API hash fixes
parents
12c60eba
3a86dffc
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
37 deletions
+22
-37
class_db.cpp
core/class_db.cpp
+1
-1
register_types.cpp
modules/visual_script/register_types.cpp
+2
-0
light_occluder_2d.cpp
scene/2d/light_occluder_2d.cpp
+2
-4
light_occluder_2d.h
scene/2d/light_occluder_2d.h
+0
-2
spatial.cpp
scene/3d/spatial.cpp
+3
-6
spatial.h
scene/3d/spatial.h
+0
-2
line_edit.cpp
scene/gui/line_edit.cpp
+2
-4
line_edit.h
scene/gui/line_edit.h
+0
-2
node.cpp
scene/main/node.cpp
+6
-6
node.h
scene/main/node.h
+0
-2
scene_tree.cpp
scene/main/scene_tree.cpp
+6
-6
scene_tree.h
scene/main/scene_tree.h
+0
-2
No files found.
core/class_db.cpp
View file @
b7741567
...
...
@@ -357,7 +357,7 @@ uint64_t ClassDB::get_api_hash(APIType p_api) {
ClassInfo
*
t
=
classes
.
getptr
(
E
->
get
());
ERR_FAIL_COND_V
(
!
t
,
0
);
if
(
t
->
api
!=
p_api
)
if
(
t
->
api
!=
p_api
||
!
t
->
exposed
)
continue
;
hash
=
hash_djb2_one_64
(
t
->
name
.
hash
(),
hash
);
hash
=
hash_djb2_one_64
(
t
->
inherits
.
hash
(),
hash
);
...
...
modules/visual_script/register_types.cpp
View file @
b7741567
...
...
@@ -112,7 +112,9 @@ void register_visual_script_types() {
register_visual_script_expression_node
();
#ifdef TOOLS_ENABLED
ClassDB
::
set_current_api
(
ClassDB
::
API_EDITOR
);
ClassDB
::
register_class
<
_VisualScriptEditor
>
();
ClassDB
::
set_current_api
(
ClassDB
::
API_CORE
);
vs_editor_singleton
=
memnew
(
_VisualScriptEditor
);
Engine
::
get_singleton
()
->
add_singleton
(
Engine
::
Singleton
(
"VisualScriptEditor"
,
_VisualScriptEditor
::
get_singleton
()));
...
...
scene/2d/light_occluder_2d.cpp
View file @
b7741567
...
...
@@ -107,12 +107,12 @@ OccluderPolygon2D::~OccluderPolygon2D() {
VS
::
get_singleton
()
->
free
(
occ_polygon
);
}
#ifdef DEBUG_ENABLED
void
LightOccluder2D
::
_poly_changed
()
{
#ifdef DEBUG_ENABLED
update
();
}
#endif
}
void
LightOccluder2D
::
_notification
(
int
p_what
)
{
...
...
@@ -221,9 +221,7 @@ void LightOccluder2D::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"set_occluder_light_mask"
,
"mask"
),
&
LightOccluder2D
::
set_occluder_light_mask
);
ClassDB
::
bind_method
(
D_METHOD
(
"get_occluder_light_mask"
),
&
LightOccluder2D
::
get_occluder_light_mask
);
#ifdef DEBUG_ENABLED
ClassDB
::
bind_method
(
"_poly_changed"
,
&
LightOccluder2D
::
_poly_changed
);
#endif
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"occluder"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"OccluderPolygon2D"
),
"set_occluder_polygon"
,
"get_occluder_polygon"
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
INT
,
"light_mask"
,
PROPERTY_HINT_LAYERS_2D_RENDER
),
"set_occluder_light_mask"
,
"get_occluder_light_mask"
);
...
...
scene/2d/light_occluder_2d.h
View file @
b7741567
...
...
@@ -78,9 +78,7 @@ class LightOccluder2D : public Node2D {
int
mask
;
Ref
<
OccluderPolygon2D
>
occluder_polygon
;
#ifdef DEBUG_ENABLED
void
_poly_changed
();
#endif
protected
:
void
_notification
(
int
p_what
);
...
...
scene/3d/spatial.cpp
View file @
b7741567
...
...
@@ -430,10 +430,9 @@ Ref<SpatialGizmo> Spatial::get_gizmo() const {
#endif
}
#ifdef TOOLS_ENABLED
void
Spatial
::
_update_gizmo
()
{
#ifdef TOOLS_ENABLED
if
(
!
is_inside_world
())
return
;
data
.
gizmo_dirty
=
false
;
...
...
@@ -445,8 +444,10 @@ void Spatial::_update_gizmo() {
data
.
gizmo
->
clear
();
}
}
#endif
}
#ifdef TOOLS_ENABLED
void
Spatial
::
set_disable_gizmo
(
bool
p_enabled
)
{
data
.
gizmo_disabled
=
p_enabled
;
...
...
@@ -726,9 +727,7 @@ void Spatial::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"is_set_as_toplevel"
),
&
Spatial
::
is_set_as_toplevel
);
ClassDB
::
bind_method
(
D_METHOD
(
"get_world"
),
&
Spatial
::
get_world
);
#ifdef TOOLS_ENABLED
ClassDB
::
bind_method
(
D_METHOD
(
"_update_gizmo"
),
&
Spatial
::
_update_gizmo
);
#endif
ClassDB
::
bind_method
(
D_METHOD
(
"update_gizmo"
),
&
Spatial
::
update_gizmo
);
ClassDB
::
bind_method
(
D_METHOD
(
"set_gizmo"
,
"gizmo"
),
&
Spatial
::
set_gizmo
);
...
...
@@ -790,9 +789,7 @@ void Spatial::_bind_methods() {
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
VECTOR3
,
"scale"
,
PROPERTY_HINT_NONE
,
""
,
PROPERTY_USAGE_EDITOR
),
"set_scale"
,
"get_scale"
);
ADD_GROUP
(
"Visibility"
,
""
);
ADD_PROPERTYNO
(
PropertyInfo
(
Variant
::
BOOL
,
"visible"
),
"set_visible"
,
"is_visible"
);
#ifdef TOOLS_ENABLED
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"gizmo"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"SpatialGizmo"
,
0
),
"set_gizmo"
,
"get_gizmo"
);
#endif
ADD_SIGNAL
(
MethodInfo
(
"visibility_changed"
));
}
...
...
scene/3d/spatial.h
View file @
b7741567
...
...
@@ -100,10 +100,8 @@ class Spatial : public Node {
#endif
}
data
;
#ifdef TOOLS_ENABLED
void
_update_gizmo
();
#endif
void
_notify_dirty
();
void
_propagate_transform_changed
(
Spatial
*
p_origin
);
...
...
scene/gui/line_edit.cpp
View file @
b7741567
...
...
@@ -1349,12 +1349,12 @@ PopupMenu *LineEdit::get_menu() const {
return
menu
;
}
#ifdef TOOLS_ENABLED
void
LineEdit
::
_editor_settings_changed
()
{
#ifdef TOOLS_ENABLED
cursor_set_blink_enabled
(
EDITOR_DEF
(
"text_editor/cursor/caret_blink"
,
false
));
cursor_set_blink_speed
(
EDITOR_DEF
(
"text_editor/cursor/caret_blink_speed"
,
0.65
));
}
#endif
}
void
LineEdit
::
set_expand_to_text_length
(
bool
p_enabled
)
{
...
...
@@ -1423,9 +1423,7 @@ void LineEdit::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"_text_changed"
),
&
LineEdit
::
_text_changed
);
ClassDB
::
bind_method
(
D_METHOD
(
"_toggle_draw_caret"
),
&
LineEdit
::
_toggle_draw_caret
);
#ifdef TOOLS_ENABLED
ClassDB
::
bind_method
(
"_editor_settings_changed"
,
&
LineEdit
::
_editor_settings_changed
);
#endif
ClassDB
::
bind_method
(
D_METHOD
(
"set_align"
,
"align"
),
&
LineEdit
::
set_align
);
ClassDB
::
bind_method
(
D_METHOD
(
"get_align"
),
&
LineEdit
::
get_align
);
...
...
scene/gui/line_edit.h
View file @
b7741567
...
...
@@ -135,9 +135,7 @@ private:
void
clear_internal
();
void
changed_internal
();
#ifdef TOOLS_ENABLED
void
_editor_settings_changed
();
#endif
void
_gui_input
(
Ref
<
InputEvent
>
p_event
);
void
_notification
(
int
p_what
);
...
...
scene/main/node.cpp
View file @
b7741567
...
...
@@ -2581,18 +2581,21 @@ Array Node::_get_children() const {
return
arr
;
}
#ifdef TOOLS_ENABLED
void
Node
::
set_import_path
(
const
NodePath
&
p_import_path
)
{
#ifdef TOOLS_ENABLED
data
.
import_path
=
p_import_path
;
#endif
}
NodePath
Node
::
get_import_path
()
const
{
#ifdef TOOLS_ENABLED
return
data
.
import_path
;
}
#else
return
NodePath
();
#endif
}
static
void
_add_nodes_to_options
(
const
Node
*
p_base
,
const
Node
*
p_node
,
List
<
String
>
*
r_options
)
{
...
...
@@ -2751,13 +2754,10 @@ void Node::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"rpc_config"
,
"method"
,
"mode"
),
&
Node
::
rpc_config
);
ClassDB
::
bind_method
(
D_METHOD
(
"rset_config"
,
"property"
,
"mode"
),
&
Node
::
rset_config
);
#ifdef TOOLS_ENABLED
ClassDB
::
bind_method
(
D_METHOD
(
"_set_import_path"
,
"import_path"
),
&
Node
::
set_import_path
);
ClassDB
::
bind_method
(
D_METHOD
(
"_get_import_path"
),
&
Node
::
get_import_path
);
ADD_PROPERTYNZ
(
PropertyInfo
(
Variant
::
NODE_PATH
,
"_import_path"
,
PROPERTY_HINT_NONE
,
""
,
PROPERTY_USAGE_NOEDITOR
|
PROPERTY_USAGE_INTERNAL
),
"_set_import_path"
,
"_get_import_path"
);
#endif
{
MethodInfo
mi
;
...
...
scene/main/node.h
View file @
b7741567
...
...
@@ -380,10 +380,8 @@ public:
void
force_parent_owned
()
{
data
.
parent_owned
=
true
;
}
//hack to avoid duplicate nodes
#ifdef TOOLS_ENABLED
void
set_import_path
(
const
NodePath
&
p_import_path
);
//path used when imported, used by scene editors to keep tracking
NodePath
get_import_path
()
const
;
#endif
bool
is_owned_by_parent
()
const
;
...
...
scene/main/scene_tree.cpp
View file @
b7741567
...
...
@@ -1205,16 +1205,20 @@ void SceneTree::set_screen_stretch(StretchMode p_mode, StretchAspect p_aspect, c
_update_root_rect
();
}
#ifdef TOOLS_ENABLED
void
SceneTree
::
set_edited_scene_root
(
Node
*
p_node
)
{
#ifdef TOOLS_ENABLED
edited_scene_root
=
p_node
;
#endif
}
Node
*
SceneTree
::
get_edited_scene_root
()
const
{
#ifdef TOOLS_ENABLED
return
edited_scene_root
;
}
#else
return
NULL
;
#endif
}
void
SceneTree
::
set_current_scene
(
Node
*
p_scene
)
{
...
...
@@ -1745,10 +1749,8 @@ void SceneTree::_bind_methods() {
ClassDB
::
bind_method
(
D_METHOD
(
"set_debug_navigation_hint"
,
"enable"
),
&
SceneTree
::
set_debug_navigation_hint
);
ClassDB
::
bind_method
(
D_METHOD
(
"is_debugging_navigation_hint"
),
&
SceneTree
::
is_debugging_navigation_hint
);
#ifdef TOOLS_ENABLED
ClassDB
::
bind_method
(
D_METHOD
(
"set_edited_scene_root"
,
"scene"
),
&
SceneTree
::
set_edited_scene_root
);
ClassDB
::
bind_method
(
D_METHOD
(
"get_edited_scene_root"
),
&
SceneTree
::
get_edited_scene_root
);
#endif
ClassDB
::
bind_method
(
D_METHOD
(
"set_pause"
,
"enable"
),
&
SceneTree
::
set_pause
);
ClassDB
::
bind_method
(
D_METHOD
(
"is_paused"
),
&
SceneTree
::
is_paused
);
...
...
@@ -1823,9 +1825,7 @@ void SceneTree::_bind_methods() {
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
BOOL
,
"paused"
),
"set_pause"
,
"is_paused"
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
BOOL
,
"refuse_new_network_connections"
),
"set_refuse_new_network_connections"
,
"is_refusing_new_network_connections"
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
BOOL
,
"use_font_oversampling"
),
"set_use_font_oversampling"
,
"is_using_font_oversampling"
);
#ifdef TOOLS_ENABLED
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"edited_scene_root"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"Node"
,
0
),
"set_edited_scene_root"
,
"get_edited_scene_root"
);
#endif
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"current_scene"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"Node"
,
0
),
"set_current_scene"
,
"get_current_scene"
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"network_peer"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"NetworkedMultiplayerPeer"
,
0
),
"set_network_peer"
,
"get_network_peer"
);
ADD_PROPERTY
(
PropertyInfo
(
Variant
::
OBJECT
,
"root"
,
PROPERTY_HINT_RESOURCE_TYPE
,
"Node"
,
0
),
""
,
"get_root"
);
...
...
scene/main/scene_tree.h
View file @
b7741567
...
...
@@ -390,10 +390,8 @@ public:
//void change_scene(const String& p_path);
//Node *get_loaded_scene();
#ifdef TOOLS_ENABLED
void
set_edited_scene_root
(
Node
*
p_node
);
Node
*
get_edited_scene_root
()
const
;
#endif
void
set_current_scene
(
Node
*
p_scene
);
Node
*
get_current_scene
()
const
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment