diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-11-05 21:20:42 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-11-05 21:20:42 -0300 |
commit | 0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch) | |
tree | 8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/3d/camera.cpp | |
parent | d14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff) | |
download | redot-engine-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.gz |
SceneMainLoop -> SceneTree
-=-=-=-=-=-=-=-=-=-=-=-=-=-
*YOUR SOURCE MIGHT NOT WORK*
For mor information on fix:
https://github.com/okamstudio/godot/wiki/devel_scene_tree
Other stuff:
-Shower of bullets demo
-Fixes all around
Diffstat (limited to 'scene/3d/camera.cpp')
-rw-r--r-- | scene/3d/camera.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index ab28c0c8d4..933f270475 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -121,7 +121,7 @@ bool Camera::_get(const StringName& p_name,Variant &r_ret) const { r_ret= int(keep_aspect); else if (p_name=="current") { - if (is_inside_scene() && get_scene()->is_editor_hint()) { + if (is_inside_tree() && get_tree()->is_editor_hint()) { r_ret=current; } else { r_ret=is_current(); @@ -182,7 +182,7 @@ void Camera::_update_camera() { // if (viewport_ptr && is_inside_scene() && is_current()) // viewport_ptr->_camera_transform_changed_notify(); - if (is_inside_scene() && is_current()) { + if (is_inside_tree() && is_current()) { if (viewport_ptr) { viewport_ptr->_camera_transform_changed_notify(); } @@ -309,7 +309,7 @@ void Camera::make_current() { current=true; - if (!is_inside_scene()) + if (!is_inside_tree()) return; if (viewport_ptr) { @@ -324,7 +324,7 @@ void Camera::_camera_make_next_current(Node *p_exclude) { if (this==p_exclude) return; - if (!is_inside_scene()) + if (!is_inside_tree()) return; if (get_viewport()->get_camera()!=NULL) return; @@ -336,14 +336,14 @@ void Camera::_camera_make_next_current(Node *p_exclude) { void Camera::clear_current() { current=false; - if (!is_inside_scene()) + if (!is_inside_tree()) return; if (viewport_ptr) { if (viewport_ptr->get_camera()==this) { viewport_ptr->_set_camera(NULL); //a group is used beause this needs to be in order to be deterministic - get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,camera_group,"_camera_make_next_current",this); + get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,camera_group,"_camera_make_next_current",this); } } @@ -352,7 +352,7 @@ void Camera::clear_current() { bool Camera::is_current() const { - if (is_inside_scene()) { + if (is_inside_tree()) { if (viewport_ptr) return viewport_ptr->get_camera()==this; } else @@ -462,9 +462,9 @@ Vector3 Camera::project_ray_normal(const Point2& p_pos) const { Vector3 Camera::project_local_ray_normal(const Point2& p_pos) const { - if (!is_inside_scene()) { + if (!is_inside_tree()) { ERR_EXPLAIN("Camera is not inside scene."); - ERR_FAIL_COND_V(!is_inside_scene(),Vector3()); + ERR_FAIL_COND_V(!is_inside_tree(),Vector3()); } @@ -496,9 +496,9 @@ Vector3 Camera::project_local_ray_normal(const Point2& p_pos) const { Vector3 Camera::project_ray_origin(const Point2& p_pos) const { - if (!is_inside_scene()) { + if (!is_inside_tree()) { ERR_EXPLAIN("Camera is not inside scene."); - ERR_FAIL_COND_V(!is_inside_scene(),Vector3()); + ERR_FAIL_COND_V(!is_inside_tree(),Vector3()); } #if 0 @@ -540,9 +540,9 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { Point2 Camera::unproject_position(const Vector3& p_pos) const { - if (!is_inside_scene()) { + if (!is_inside_tree()) { ERR_EXPLAIN("Camera is not inside scene."); - ERR_FAIL_COND_V(!is_inside_scene(),Vector2()); + ERR_FAIL_COND_V(!is_inside_tree(),Vector2()); } Size2 viewport_size = viewport_ptr->get_visible_rect().size; @@ -571,9 +571,9 @@ Point2 Camera::unproject_position(const Vector3& p_pos) const { Vector3 Camera::project_position(const Point2& p_point) const { - if (!is_inside_scene()) { + if (!is_inside_tree()) { ERR_EXPLAIN("Camera is not inside scene."); - ERR_FAIL_COND_V(!is_inside_scene(),Vector3()); + ERR_FAIL_COND_V(!is_inside_tree(),Vector3()); } Size2 viewport_size = viewport_ptr->get_visible_rect().size; |