You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Hide properties on XRCamera3D that are managed by XRInterface
This commit is contained in:
@@ -36,6 +36,16 @@
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void XRCamera3D::_validate_property(PropertyInfo &p_property) const {
|
||||||
|
if (!Engine::get_singleton()->is_editor_hint()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Hide properties that are managed by XRInterface or otherwise not applicable for XRCamera3D.
|
||||||
|
if (p_property.name == "fov" || p_property.name == "projection" || p_property.name == "size" || p_property.name == "frustum_offset" || p_property.name == "keep_aspect") {
|
||||||
|
p_property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void XRCamera3D::_bind_tracker() {
|
void XRCamera3D::_bind_tracker() {
|
||||||
XRServer *xr_server = XRServer::get_singleton();
|
XRServer *xr_server = XRServer::get_singleton();
|
||||||
ERR_FAIL_NULL(xr_server);
|
ERR_FAIL_NULL(xr_server);
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ protected:
|
|||||||
StringName pose_name = SceneStringName(default_);
|
StringName pose_name = SceneStringName(default_);
|
||||||
Ref<XRPositionalTracker> tracker;
|
Ref<XRPositionalTracker> tracker;
|
||||||
|
|
||||||
|
void _validate_property(PropertyInfo &p_property) const;
|
||||||
|
|
||||||
void _bind_tracker();
|
void _bind_tracker();
|
||||||
void _unbind_tracker();
|
void _unbind_tracker();
|
||||||
void _changed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
void _changed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||||
|
|||||||
Reference in New Issue
Block a user