<commit_before>#include "UnrealEnginePythonPrivatePCH.h"



PyObject *py_ue_get_actor_location(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorLocation());

}

PyObject *py_ue_get_actor_scale(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorScale3D());

}

PyObject *py_ue_get_actor_forward(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorForwardVector());

}

PyObject *py_ue_get_actor_right(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorRightVector());

}

PyObject *py_ue_get_actor_up(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorUpVector());

}

PyObject *py_ue_get_actor_rotation(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	FRotator vec3 = actor->GetActorRotation();

	return Py_BuildValue("fff", vec3.Roll, vec3.Pitch, vec3.Yaw);

}

PyObject *py_ue_set_actor_location(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	FVector vec;
	if (!py_ue_vector_arg(args, vec))
		return NULL;

	AActor *actor = ue_get_actor(self);
	if (!actor)
		PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	actor->SetActorLocation(vec);

	Py_INCREF(Py_None);
	return Py_None;
}

PyObject *py_ue_set_actor_scale(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	FVector vec;
	if (!py_ue_vector_arg(args, vec))
		return NULL;

	AActor *actor = ue_get_actor(self);
	if (!actor)
		PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	actor->SetActorScale3D(vec);

	Py_INCREF(Py_None);
	return Py_None;

}

PyObject *py_ue_set_actor_rotation(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	float roll, pitch, yaw;
	if (!PyArg_ParseTuple(args, "fff:set_actor_rotation", &roll, &pitch, &yaw)) {
		return NULL;
	}

	if (self->ue_object->IsA<AActor>()) {
		((AActor *)self->ue_object)->SetActorRotation(FRotator(pitch, yaw, roll));
		goto ret;
	}

	if (self->ue_object->IsA<UActorComponent>()) {
		((UActorComponent *)self->ue_object)->GetOwner()->SetActorRotation(FRotator(pitch, yaw, roll));
		goto ret;
	}

	return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

ret:
	Py_INCREF(Py_None);
	return Py_None;

}


PyObject *py_ue_get_world_location(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->GetComponentLocation();
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_world_rotation(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FRotator vec3 = ((USceneComponent *)self->ue_object)->GetComponentRotation();
		return Py_BuildValue("fff", vec3.Roll, vec3.Pitch, vec3.Yaw);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_world_scale(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->GetComponentScale();
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_relative_location(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->RelativeLocation;
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_relative_rotation(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FRotator vec3 = ((USceneComponent *)self->ue_object)->RelativeRotation;
		return Py_BuildValue("fff", vec3.Roll, vec3.Pitch, vec3.Yaw);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}<commit_msg>returns FRotator instead of float tuples<commit_after>#include "UnrealEnginePythonPrivatePCH.h"



PyObject *py_ue_get_actor_location(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorLocation());

}

PyObject *py_ue_get_actor_scale(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorScale3D());

}

PyObject *py_ue_get_actor_forward(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorForwardVector());

}

PyObject *py_ue_get_actor_right(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorRightVector());

}

PyObject *py_ue_get_actor_up(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	return py_ue_new_fvector(actor->GetActorUpVector());

}

PyObject *py_ue_get_actor_rotation(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	AActor *actor = ue_get_actor(self);
	if (!actor)
		return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	FRotator rot = actor->GetActorRotation();

	return py_ue_new_frotator(rot);

}

PyObject *py_ue_set_actor_location(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	FVector vec;
	if (!py_ue_vector_arg(args, vec))
		return NULL;

	AActor *actor = ue_get_actor(self);
	if (!actor)
		PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	actor->SetActorLocation(vec);

	Py_INCREF(Py_None);
	return Py_None;
}

PyObject *py_ue_set_actor_scale(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	FVector vec;
	if (!py_ue_vector_arg(args, vec))
		return NULL;

	AActor *actor = ue_get_actor(self);
	if (!actor)
		PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

	actor->SetActorScale3D(vec);

	Py_INCREF(Py_None);
	return Py_None;

}

PyObject *py_ue_set_actor_rotation(ue_PyUObject *self, PyObject * args) {

	ue_py_check(self);

	float roll, pitch, yaw;
	if (!PyArg_ParseTuple(args, "fff:set_actor_rotation", &roll, &pitch, &yaw)) {
		return NULL;
	}

	if (self->ue_object->IsA<AActor>()) {
		((AActor *)self->ue_object)->SetActorRotation(FRotator(pitch, yaw, roll));
		goto ret;
	}

	if (self->ue_object->IsA<UActorComponent>()) {
		((UActorComponent *)self->ue_object)->GetOwner()->SetActorRotation(FRotator(pitch, yaw, roll));
		goto ret;
	}

	return PyErr_Format(PyExc_Exception, "uobject is not an actor or a component");

ret:
	Py_INCREF(Py_None);
	return Py_None;

}


PyObject *py_ue_get_world_location(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->GetComponentLocation();
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_world_rotation(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FRotator rot = ((USceneComponent *)self->ue_object)->GetComponentRotation();
		return py_ue_new_frotator(rot);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_world_scale(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->GetComponentScale();
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_relative_location(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FVector vec3 = ((USceneComponent *)self->ue_object)->RelativeLocation;
		return py_ue_new_fvector(vec3);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}

PyObject *py_ue_get_relative_rotation(ue_PyUObject *self, PyObject * args) {
	ue_py_check(self);
	if (self->ue_object->IsA<USceneComponent>()) {
		FRotator rot = ((USceneComponent *)self->ue_object)->RelativeRotation;
		return py_ue_new_frotator(rot);
	}
	return PyErr_Format(PyExc_Exception, "uobject is not a USceneComponent");
}
{'fraction_non_alphanumeric': 0.12722074739636513, 'fraction_numerical': 0.0028588931999183175, 'mean_word_length': 6.409228441754917, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3626250', 'n_tokens_mistral': 3820, 'n_tokens_neox': 3748, 'n_words': 730}