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

Document property_list_changed_notify #23854

Closed
xDGameStudios opened this issue Nov 20, 2018 · 3 comments
Closed

Document property_list_changed_notify #23854

xDGameStudios opened this issue Nov 20, 2018 · 3 comments

Comments

@xDGameStudios
Copy link
Contributor

xDGameStudios commented Nov 20, 2018

Godot version:
v3.1.alpha.calinou.d304228

OS/device including version:
Windows 10

Issue description:
There should be a way to force the redraw/refresh of the inspector when a property is changed (value is set). For example imagine working in a EditorInspectorPlugin that whenever an exported boolean is changed in a node the plugin should hide another exported property from the inspector! Right now the node must be unselected and reselected for the inspector to redraw!

I'm not saying it should be refreshed everytime as it could be bad for performance but there should be an option for plugin developers to force it! ;)

for example:
_redraw_inspector();

Steps to reproduce:

node with this code:

tool
extends Node
class_name TestNode

export(bool) var use_curve : bool = true;

export(Curve) var growth_curve : Curve
export(int) var fixed_value : int

plugin for inspector with this code:

extends EditorInspectorPlugin

func can_handle(object):
	if object is TestNode:
		return true;

func parse_property(object, type, path, hint, hint_text, usage):
	match path:
		'growth_curve':
			return !object.use_curve
		'fixed_value':
			return object.use_curve
@bojidar-bg
Copy link
Contributor

Does property_list_changed_notify work for you?

@xDGameStudios
Copy link
Contributor Author

It does work! I didn't know property_list_changed_notify() could do this! The documentation is not accurate about that!

@bojidar-bg bojidar-bg changed the title A way to refresh/force inspector redraw!! Document property_list_changed_notify Nov 20, 2018
@Calinou
Copy link
Member

Calinou commented Apr 17, 2020

Duplicate of #21009, which was resolved today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants