-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Signal when Inspector updates/exported property changes #16365
Comments
The |
Godot 3.0 Stable I missed that, thanks. The closest I've gotten was the EditorResourcePreview class. It has a signal preview_invalidated ( String path ), but I have no idea what the path would be. Also, I can't tell if the inspector is even implemented this way. Other editor windows seem to have some way of accessing them from the EditorInterface class, such as get_script_editor() and get_editor_settings, but I don't see one for the current inspector. As a side note how did you do the grey highlighting? |
I don't think built-in types have support for signals. I guess the Inspector could handle this in editor so plugins can make use of it. As a workaround, you can cache the properties you need and check them every frame (or even once in every ten frames or something). If some property changed, then you re-generate the things. Should not be much of a performance drop.
You can use Markdown here. If you surround a word in backticks it's formatted in monospaced font with gray background: `word` becomes |
I was looking into #6201 (auto-keyframes) and I imagine this issue here to be a specific blocker. Has anyone found a workaround? It seems the most logical way to implement auto-keyframing is by using a signal callback. Pinging @RandomShaper who might have had some luck with this basing on #12572 (comment) |
Having a way to react to property changes (e.g. an |
Godot 3.2.stable Don't works in Custom Resources |
Feature and improvement proposals for the Godot Engine are now being discussed and reviewed in a dedicated Godot Improvement Proposals (GIP) (godotengine/godot-proposals) issue tracker. The GIP tracker has a detailed issue template designed so that proposals include all the relevant information to start a productive discussion and help the community assess the validity of the proposal for the engine. The main (godotengine/godot) tracker is now solely dedicated to bug reports and Pull Requests, enabling contributors to have a better focus on bug fixing work. Therefore, we are now closing all older feature proposals on the main issue tracker. If you are interested in this feature proposal, please open a new proposal on the GIP tracker following the given issue template (after checking that it doesn't exist already). Be sure to reference this closed issue if it includes any relevant discussion (which you are also encouraged to summarize in the new proposal). Thanks in advance! |
Guys, this doesn't need changes to the language. Its already well supported for user defined signals with a bit of programming smarts.
(From memory, the syntax might vary) Then whenver your property you defined is set, your signal will be triggered (with the new value, just remove the ,value in emit_signal if you dont want that) |
For my current Project, I am working with procedural geometry. While testing, I am generating the geometry in the editor.
The problem is that I want to experiment with different property values for the generated geometry, without resorting to the trial and error approach of manually regenerating the mesh every time I make a change.
updating every frame (or even physics frame) is out of the question, with larger meshes, that would be an enormous performance drop. appending a setter function to every exported property is another option, but they would all be the same (update the geometry), so that's a bit redundant. More importantly it removes the ability to add a custom setter to each property.
Ideally I would update the mesh only when I change one of the exported inspector properties. I propose adding a signal / notification whenever the current inspector updates.
The text was updated successfully, but these errors were encountered: