mirror of https://github.com/godotengine/godot
Merge pull request #114057 from BastiaanOlij/xrcamera_hide_managed_properties
Hide properties on XRCamera3D that are managed by XRInterface
This commit is contained in:
commit
7fcf2d4b6a
|
|
@ -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() {
|
||||
XRServer *xr_server = XRServer::get_singleton();
|
||||
ERR_FAIL_NULL(xr_server);
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ protected:
|
|||
StringName pose_name = SceneStringName(default_);
|
||||
Ref<XRPositionalTracker> tracker;
|
||||
|
||||
void _validate_property(PropertyInfo &p_property) const;
|
||||
|
||||
void _bind_tracker();
|
||||
void _unbind_tracker();
|
||||
void _changed_tracker(const StringName &p_tracker_name, int p_tracker_type);
|
||||
|
|
|
|||
Loading…
Reference in New Issue