Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new method for EditorInspector "get_object_edited" #82069

Closed
wants to merge 1 commit into from
Closed

Add a new method for EditorInspector "get_object_edited" #82069

wants to merge 1 commit into from

Conversation

RadiantUwU
Copy link
Contributor

Would allow plugins to know which object is being edited, for a very useful case: live-editing, sending changes back to the server

Valid use:

@tool
extends EditorPlugin

func _print_property_edited(property: String):
	print(get_editor_interface().get_inspector().get_object_edited(),".",property)

func _enter_tree():
	# Initialization of the plugin goes here.
	get_editor_interface().get_inspector().property_edited.connect(_print_property_edited)


func _exit_tree():
	# Clean-up of the plugin goes here.
	get_editor_interface().get_inspector().property_edited.disconnect(_print_property_edited)

@YuriSizov
Copy link
Contributor

Hey, thanks for making a PR. There is already one open that does exactly that, so I'm going to close this one as a duplicate of #81425.

Thanks for your contribution nevertheless!

@YuriSizov YuriSizov closed this Sep 21, 2023
@RadiantUwU RadiantUwU deleted the patch-1 branch October 7, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants