Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix number * FVector #745

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Source/UnrealEnginePython/Private/Wrappers/UEPyFVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,17 @@ static PyObject *ue_py_fvector_sub(ue_PyFVector *self, PyObject *value)
return py_ue_new_fvector(vec);
}

static PyObject *ue_py_fvector_mul(ue_PyFVector *self, PyObject *value)
static PyObject *ue_py_fvector_mul(PyObject *a0, PyObject *a1)
{
// At least one of the parameters is a ue_PyFVector, but we don't know which
ue_PyFVector *self = (ue_PyFVector*)a0;
PyObject *value = a1;
if (!py_ue_is_fvector(a0))
{
self = (ue_PyFVector*)a1;
value = a0;
}

FVector vec = self->vec;
ue_PyFVector *py_vec = py_ue_is_fvector(value);
if (py_vec)
Expand Down
11 changes: 10 additions & 1 deletion Source/UnrealEnginePython/Private/Wrappers/UEPyFVector2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,17 @@ static PyObject *ue_py_fvector2d_sub(ue_PyFVector2D *self, PyObject *value)
return py_ue_new_fvector2d(vec);
}

static PyObject *ue_py_fvector2d_mul(ue_PyFVector2D *self, PyObject *value)
static PyObject *ue_py_fvector2d_mul(PyObject *a0, PyObject *a1)
{
// At least one of the parameters is a ue_PyFVector2D, but we don't know which
ue_PyFVector2D *self = (ue_PyFVector2D*)a0;
PyObject *value = a1;
if (!py_ue_is_fvector2d(a0))
{
self = (ue_PyFVector2D*)a1;
value = a0;
}

FVector2D vec = self->vec;
ue_PyFVector2D *py_vec = py_ue_is_fvector2d(value);
if (py_vec)
Expand Down