Disable node processing completely to avoid issues with tool scripts#37
Disable node processing completely to avoid issues with tool scripts#37ryevdokimov wants to merge 1 commit into4d49:masterfrom
Conversation
| node.set_process_mode(Node.PROCESS_MODE_DISABLED) | ||
|
|
||
| for child in node.get_children(): | ||
| _disable_node_processing(child) |
There was a problem hiding this comment.
I think the forced assignment of PROCESS_MODE_INHERIT is better, since if it is already assigned, then nothing will happen(c++ code under the hood of the engine).
Also, the get_children method is quite expensive (at least my old tests showed it).
| node.set_process_mode(Node.PROCESS_MODE_DISABLED) | |
| for child in node.get_children(): | |
| _disable_node_processing(child) | |
| node.set_process_mode(Node.PROCESS_MODE_INHERIT) | |
| for i: int in node.get_child_count(true): | |
| _disable_node_processing(node.get_child(i)) |
|
I'm going to see if I can get this resolved at the engine level, so will put this PR on hold. godotengine/godot-proposals#12647 and |
|
@ryevdokimov also think that in the future we will have to consider switching to the built-in thumbnail generation in the 4.5 version of the engine. |
|
That feature won't be in 4.5 anymore, it was reverted due to issues, but yeah that was partially the reason I decided to open up the PR for the engine since it will apply to either scenario (this add-on, or built-in thumbnail generation). |
In my project I have some scenes that don't inherit the processing of their parent, so tool scripts end up running despite the fact that this addon disables the processing of the viewport for generating thumbnails. This can cause a lot of weird issues such as the real scene and thumbnail scene trying to reference nodes from each other causing errors at the engine level.