forked from bartvdbraak/blender
Partial fix for #36024, don't always reset the node editor tree pointer if the type is undefined. This can happen if the tree type is defined by addon or script, in which case the tree type would be unknown the first time the context is checked, but registered right afterward. Also unknown tree types are handled fine, they just display dummy nodes in red warning color.
This commit is contained in:
parent
61bbefe40d
commit
fa7e690a91
@ -577,9 +577,10 @@ void snode_set_context(const bContext *C)
|
|||||||
if (!treetype ||
|
if (!treetype ||
|
||||||
(treetype->poll && !treetype->poll(C, treetype)))
|
(treetype->poll && !treetype->poll(C, treetype)))
|
||||||
{
|
{
|
||||||
/* invalid tree type, disable */
|
/* invalid tree type, skip
|
||||||
snode->tree_idname[0] = '\0';
|
* NB: not resetting the node path here, invalid bNodeTreeType
|
||||||
ED_node_tree_start(snode, NULL, NULL, NULL);
|
* may still be registered at a later point.
|
||||||
|
*/
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user