-
Notifications
You must be signed in to change notification settings - Fork 23
Simplify process loop #18
Conversation
|
@SAED2906 any thoughts? |
|
I think it is a good idea |
|
FWIW this is working just fine for my project so far. If anyone with a traditional use of the add-on could please test it would be much appreciated so we can merge if desired. |
| func _process(delta): | ||
| if not configuration: | ||
| return | ||
| if Engine.is_editor_hint(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Line 173 be deleted? There is a parse error for line 174 because it is not indented after the if Engine.is_editor_hint(). If line 173 is kept, isn't it the same as
if Engine.is_editor_hint() and configuration.reload and (dynamically_update or Engine.is_editor_hint()):and will never call update_shaders() outside the editor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
propably
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, @calvinchd , that slipped in.
|
should i merge, or |
|
I'd appreciate a merge, we can see if any issues pop up with other users who have a different approach. |
|
Sorry for not noticing the message, im solving some issues with cloudflare at the moment, so i will be unable to help for a day or two |
Hi Korin, others,
I was experiencing some issues with my implementation of the post addon and while reviewing the code I gave the process function loop some thought again. I still didn't fully grok the intention with it, so I rewrote it as such. I'm not sure if this is the correct approach, I'd welcome anyone's input.
Here are my thoughts:
Regenerate the shaders (update_shaders() call) only in the following cases:
I can't think of any other cases and the logic felt fuzzy with the nesting. Does this make sense to everyone else?