-
Notifications
You must be signed in to change notification settings - Fork 233
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
Startup safety - for nodes with side effects #144
Comments
Exactly what works and what doesn't I don't know... |
I guess the general solution is to fail during load and have post load handler that triggers on the first update event. |
@zeffii
|
I'm glad to see whatever you've done over the past 2 days has fixed that particular startup problem. So it won't reproduce anymore. Weird stuff enzyme is experiencing :( -- i'll stay out of that troubleshooting |
This is also a potential issue with script node. I guess the best solution is to defer update until the file is loaded and then do it. I want a better way to detect init than try to trigger an exception however. |
Good that the bug fixing of other issues resolved this one also. enzyme is doing a heros work as our tester. |
yeah, wish enzyme would report errors/features here and successes on WIP thread tho |
I think that is good idea, suggest it to him. |
is it mean, that operators have to be replaced in viewers and oter nodes? With what? |
No this doesn't affect operators. http://wiki.blender.org/index.php/Extensions:2.6/Py/API_Changes#Restricted_Context |
yes, about data i remember, thanks |
maybe an 'on_load' or 'on_reload' could take care of this further up the chain, if this solves it? The problem is a little vague in my mind. |
I think I have good solution for this that doesn't require that ugly code, and that removes this problem from the nodes but for now just insert that right after update. |
but yes an app handler is the right solution but for that to work we have to do whole rename all functions thing because update is called by blender... |
OK that code does indeed let the .blend load. Cool! |
If a node access external data it must fail gracefully if the external data is not ready. Either by failing or using a cached state stored in a bpy.prop
Possible cause includes trying to acces
bpy.data.node_groups
which will fail during startup. In general most nodes should avoid bpy.ops and bpy.data. For many mesh operations bmesh provides all needed functionality and data exists independent for the blender scene.This also makes for an easy quick safety fix.
The text was updated successfully, but these errors were encountered: