weixin_39618597 2020-11-30 13:59
浏览 0

Update system - explanation

Will try to describe what is going on:

Blender update events: - depsgraph_update_pre handler - frame_change_post/post handler - node_tree.update method - node.update method - property.update method

Sverchok update events: - process_from_node function - process_from_nodes function

Triggers of depsgraph_update_pre handler: - swithch editor type - add object in scene - moving object in scene ❗️ - switch edit / object modes - moving parts of mesh ❗️ - select parts of mesh - apply mesh operators - change of any property - open close panels - and so on

Reaction upon manipulation in node tree:

| events | depsgraph_update_pre | node_tree.update | node.update | order | | --- | --- | --- | --- | --- | | Add new node | ✔️ | ✔️ | ✔️| nodes, tree, handler | | Copy node | | ✔️ | ✔️ | nodes, tree | | Dellite node | | ✔️ | ✔️ | other nodes, tree | | Rename tree | ✔️ | | | | | Add link | | ✔️ | ✔️ | nodes, tree | | Remove link | | ✔️ | ✔️ | current node, nodes, tree | | Add socket to a node | ✔️ | | | | | Remove socket | ✔️ | | | | | Rename socket | ✔️ | | | | | Rename node | ✔️ | | | |

该提问来源于开源项目:nortikin/sverchok

  • 写回答

5条回答 默认 最新

  • weixin_39618597 2020-11-30 13:59
    关注

    Sverchok tree properties: - sv_process (bool) - for switching off process tree manually, mainly - skip_tree_update (bool) - for temporary ignoring tree.update events - has_changed (bool) - only True if tree.update event and not skip_tree_update - sv_animate (bool) - process tree upon frame change events if True and sv_process is True - configuring_new_node (bool) - True during initialization of new node. - is_frozen (bool) - does not process tree if True, but sockets data will be reseted anyway

    Calling Sverchok update events: - depsgraph_update_pre handler - looks it can't call any update events because has_changed property is always False during of work of this handler. - frame_change_post/post handler - Looks like it updates all tree if sv_process and sv_animate. - node_tree.update method - Looks like it updates all tree if sv_process and not skip_tree_update and not configuring_new_node and not is frozen. - node.update method - is not used by default. - property.update method - looks like it updates tree from current node which property has updateNode function if not tree.is_frozen

    评论

报告相同问题?