Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_relationships.c
| Context not available. | |||||
| if (node->parent->done & NODE_JOIN_IS_DESCENDANT) | if (node->parent->done & NODE_JOIN_IS_DESCENDANT) | ||||
| node->done |= NODE_JOIN_IS_DESCENDANT; | node->done |= NODE_JOIN_IS_DESCENDANT; | ||||
| else if (node->flag & NODE_TEST) { | else if (node->flag & NODE_TEST) { | ||||
| /* if parent is not an decendant of the frame, reattach the node */ | /* if parent is not an descendant of the frame, reattach the node */ | ||||
| nodeDetachNode(node); | nodeDetachNode(node); | ||||
| nodeAttachNode(node, frame); | nodeAttachNode(node, frame); | ||||
| node->done |= NODE_JOIN_IS_DESCENDANT; | node->done |= NODE_JOIN_IS_DESCENDANT; | ||||
| Context not available. | |||||
| if (node->parent->done & NODE_DETACH_IS_DESCENDANT) | if (node->parent->done & NODE_DETACH_IS_DESCENDANT) | ||||
| node->done |= NODE_DETACH_IS_DESCENDANT; | node->done |= NODE_DETACH_IS_DESCENDANT; | ||||
| else if (node->flag & NODE_SELECT) { | else if (node->flag & NODE_SELECT) { | ||||
| /* if parent is not a decendant of a selected node, detach */ | /* if parent is not a descendant of a selected node, detach */ | ||||
| nodeDetachNode(node); | nodeDetachNode(node); | ||||
| node->done |= NODE_DETACH_IS_DESCENDANT; | node->done |= NODE_DETACH_IS_DESCENDANT; | ||||
| } | } | ||||
| Context not available. | |||||
| /** | /** | ||||
| * Callback that applies NodeInsertOfsData.offset_x to a node or its parent, | * Callback that applies NodeInsertOfsData.offset_x to a node or its parent, | ||||
| * considering the logic needed for offseting nodes after link insert | * considering the logic needed for offsetting nodes after link insert | ||||
| */ | */ | ||||
| static bool node_link_insert_offset_chain_cb( | static bool node_link_insert_offset_chain_cb( | ||||
| bNode *fromnode, bNode *tonode, | bNode *fromnode, bNode *tonode, | ||||
| Context not available. | |||||
| /* insert->totr isn't updated yet, so totr_insert is used to get the correct worldspace coords */ | /* insert->totr isn't updated yet, so totr_insert is used to get the correct worldspace coords */ | ||||
| node_to_updated_rect(insert, &totr_insert); | node_to_updated_rect(insert, &totr_insert); | ||||
| /* frame attachement was't handled yet so we search the frame that the node will be attached to later */ | /* frame attachment wasn't handled yet so we search the frame that the node will be attached to later */ | ||||
| insert->parent = node_find_frame_to_attach(ar, ntree, mouse_xy); | insert->parent = node_find_frame_to_attach(ar, ntree, mouse_xy); | ||||
| /* this makes sure nodes are also correctly offset when inserting a node on top of a frame | /* this makes sure nodes are also correctly offset when inserting a node on top of a frame | ||||
| Context not available. | |||||