Skip to content

Commit

Permalink
fix: fix ToPyList with mvVec2/4 values
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuMazzi committed Feb 4, 2025
1 parent e11d7d1 commit 4d69a29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mvPyUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ ToPyList(const std::vector<mvVec2>& value)
PyObject* item = PyList_New(2);
PyList_SetItem(item, 0, PyFloat_FromDouble (value[i].x));
PyList_SetItem(item, 1, PyFloat_FromDouble (value[i].y));
PyList_SetItem(item, i, item);
PyList_SetItem(result, i, item);
}

return result;
Expand All @@ -644,7 +644,7 @@ ToPyList(const std::vector<mvVec4>& value)
PyList_SetItem(item, 1, PyFloat_FromDouble(value[i].y));
PyList_SetItem(item, 2, PyFloat_FromDouble(value[i].z));
PyList_SetItem(item, 3, PyFloat_FromDouble(value[i].w));
PyList_SetItem(item, i, item);
PyList_SetItem(result, i, item);
}

return result;
Expand Down Expand Up @@ -2974,4 +2974,4 @@ AddCommonArgs(std::vector<mvPythonDataElement>& args, CommonParserArgs argsFlags
args.push_back({ mvPyDataType::Float, "track_offset", mvArgType::KEYWORD_ARG, "0.5", "0.0f:top, 0.5f:center, 1.0f:bottom" });
}

}
}

0 comments on commit 4d69a29

Please sign in to comment.