diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2022-06-29 22:50:35 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2022-06-29 22:50:35 +0300 |
commit | fa2084ae58a77b1201289b6bedac427f73c762d1 (patch) | |
tree | fd99401eb8e742415f59332d115f0f34699f92b6 /source/blender/editors/space_node/node_add.cc | |
parent | 0ea282f7462070041b2599389ba61c7ef50426b5 (diff) |
Geometry Nodes: Experimental rigid body integration.
This is an exploration of how geometry nodes might be coupled with
rigid bodies and iterative simulations in general. It's a very
rough-and-ready implementation, not meant as a final version, but rather
to prove the possiblity and to find challenging areas where redesign is
needed.
The core additions are:
- Geometry nodes to flag points and/or instances as rigid bodies.
- Depsgraph integration to ensure the necessary order of operations
between modifiers and rigid body pre/post simulation updates.
- Simple cache feature to store arbitrary geometry and loop back into
the next iteration.
Diffstat (limited to 'source/blender/editors/space_node/node_add.cc')
-rw-r--r-- | source/blender/editors/space_node/node_add.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_add.cc b/source/blender/editors/space_node/node_add.cc index 975d4eda7e3..715b7c80d1d 100644 --- a/source/blender/editors/space_node/node_add.cc +++ b/source/blender/editors/space_node/node_add.cc @@ -490,7 +490,7 @@ static int node_add_object_invoke(bContext *C, wmOperator *op, const wmEvent *ev static bool node_add_object_poll(bContext *C) { const SpaceNode *snode = CTX_wm_space_node(C); - return ED_operator_node_editable(C) && ELEM(snode->nodetree->type, NTREE_GEOMETRY) && + return ED_operator_node_editable(C) && ELEM(snode->nodetree->type, NTREE_GEOMETRY, NTREE_SIMULATION) && !UI_but_active_drop_name(C); } @@ -578,7 +578,7 @@ static int node_add_collection_invoke(bContext *C, wmOperator *op, const wmEvent static bool node_add_collection_poll(bContext *C) { const SpaceNode *snode = CTX_wm_space_node(C); - return ED_operator_node_editable(C) && ELEM(snode->nodetree->type, NTREE_GEOMETRY) && + return ED_operator_node_editable(C) && ELEM(snode->nodetree->type, NTREE_GEOMETRY, NTREE_SIMULATION) && !UI_but_active_drop_name(C); } @@ -610,7 +610,7 @@ static bool node_add_file_poll(bContext *C) { const SpaceNode *snode = CTX_wm_space_node(C); return ED_operator_node_editable(C) && - ELEM(snode->nodetree->type, NTREE_SHADER, NTREE_TEXTURE, NTREE_COMPOSIT, NTREE_GEOMETRY); + ELEM(snode->nodetree->type, NTREE_SHADER, NTREE_TEXTURE, NTREE_COMPOSIT, NTREE_GEOMETRY, NTREE_SIMULATION); } static int node_add_file_exec(bContext *C, wmOperator *op) |