Fix #127976: Actions created via Python can't be used in action constraints
The Action Constraint would only allow actions that were once assigned to objects, i.e. with `action->idroot == ID_OB`. This did not take into account the equally valid `0` case, which is what indicates that this Action has never been assigned to anything yet. Pull Request: https://projects.blender.org/blender/blender/pulls/128072
This commit is contained in:
committed by
Nathan Vegdahl
parent
892ba12bc9
commit
0c9ef75df8
@@ -360,7 +360,7 @@ static void test_constraint(
|
||||
else {
|
||||
animrig::Action &action = data->act->wrap();
|
||||
if (action.is_action_legacy()) {
|
||||
if (data->act->idroot != ID_OB) {
|
||||
if (data->act->idroot != ID_OB && data->act->idroot != 0) {
|
||||
/* Only object-rooted actions can be used. */
|
||||
data->act = nullptr;
|
||||
con->flag |= CONSTRAINT_DISABLE;
|
||||
|
||||
Reference in New Issue
Block a user