@@ -236,9 +236,7 @@ PyObject *py_ue_set_actor_location(ue_PyUObject *self, PyObject * args)
236236 FHitResult hit;
237237 bool success = false ;
238238
239- Py_BEGIN_ALLOW_THREADS;
240239 success = actor->SetActorLocation (vec, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
241- Py_END_ALLOW_THREADS;
242240
243241 if (!sweep)
244242 {
@@ -268,9 +266,8 @@ PyObject *py_ue_add_actor_world_offset(ue_PyUObject *self, PyObject * args)
268266 PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
269267
270268 FHitResult hit;
271- Py_BEGIN_ALLOW_THREADS;
269+
272270 actor->AddActorWorldOffset (vec, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
273- Py_END_ALLOW_THREADS;
274271
275272 if (!sweep)
276273 {
@@ -296,9 +293,7 @@ PyObject *py_ue_add_actor_local_offset(ue_PyUObject *self, PyObject * args)
296293 PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
297294
298295 FHitResult hit;
299- Py_BEGIN_ALLOW_THREADS;
300296 actor->AddActorLocalOffset (vec, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
301- Py_END_ALLOW_THREADS;
302297
303298 if (!sweep)
304299 {
@@ -324,9 +319,9 @@ PyObject *py_ue_add_actor_world_rotation(ue_PyUObject *self, PyObject * args)
324319 if (!actor)
325320 return PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
326321 FHitResult hit;
327- Py_BEGIN_ALLOW_THREADS;
322+
328323 actor->AddActorWorldRotation (quat, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
329- Py_END_ALLOW_THREADS;
324+
330325 if (!sweep)
331326 {
332327 Py_RETURN_NONE;
@@ -351,9 +346,9 @@ PyObject *py_ue_add_actor_local_rotation(ue_PyUObject *self, PyObject * args)
351346 return PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
352347 FHitResult hit;
353348
354- Py_BEGIN_ALLOW_THREADS;
349+
355350 actor->AddActorLocalRotation (quat, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
356- Py_END_ALLOW_THREADS;
351+
357352 if (!sweep)
358353 {
359354 Py_RETURN_NONE;
@@ -376,9 +371,9 @@ PyObject *py_ue_set_actor_scale(ue_PyUObject *self, PyObject * args)
376371 if (!actor)
377372 PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
378373
379- Py_BEGIN_ALLOW_THREADS;
374+
380375 actor->SetActorScale3D (vec);
381- Py_END_ALLOW_THREADS;
376+
382377
383378 Py_RETURN_NONE;
384379
@@ -400,9 +395,9 @@ PyObject *py_ue_set_actor_rotation(ue_PyUObject *self, PyObject * args)
400395
401396 bool success = false ;
402397
403- Py_BEGIN_ALLOW_THREADS;
398+
404399 success = actor->SetActorRotation (quat, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
405- Py_END_ALLOW_THREADS;
400+
406401
407402 if (success)
408403 {
@@ -425,9 +420,9 @@ PyObject *py_ue_set_actor_transform(ue_PyUObject *self, PyObject * args)
425420 if (!actor)
426421 PyErr_Format (PyExc_Exception, " uobject is not an actor or a component" );
427422
428- Py_BEGIN_ALLOW_THREADS;
423+
429424 actor->SetActorTransform (t);
430- Py_END_ALLOW_THREADS;
425+
431426
432427 Py_RETURN_NONE;
433428}
@@ -567,9 +562,9 @@ PyObject *py_ue_set_world_location(ue_PyUObject *self, PyObject * args)
567562
568563 if (self->ue_object ->IsA <USceneComponent>())
569564 {
570- Py_BEGIN_ALLOW_THREADS;
565+
571566 ((USceneComponent *)self->ue_object )->SetWorldLocation (vec, sweep, &hit, teleport_physics ? ETeleportType::TeleportPhysics : ETeleportType::None);
572- Py_END_ALLOW_THREADS;
567+
573568 if (!sweep)
574569 {
575570 Py_RETURN_NONE;
@@ -587,11 +582,10 @@ PyObject *py_ue_set_world_rotation(ue_PyUObject *self, PyObject * args)
587582 return NULL ;
588583 if (self->ue_object ->IsA <USceneComponent>())
589584 {
590- Py_BEGIN_ALLOW_THREADS;
585+
591586 ((USceneComponent *)self->ue_object )->SetWorldRotation (rot);
592- Py_END_ALLOW_THREADS;
593- Py_INCREF (Py_None);
594- return Py_None;
587+
588+ Py_RETURN_NONE;
595589 }
596590 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
597591}
@@ -605,10 +599,9 @@ PyObject *py_ue_set_world_scale(ue_PyUObject *self, PyObject * args)
605599
606600 if (self->ue_object ->IsA <USceneComponent>())
607601 {
608- Py_BEGIN_ALLOW_THREADS;
602+
609603 ((USceneComponent *)self->ue_object )->SetWorldScale3D (vec);
610- Py_RETURN_NONE;
611- Py_END_ALLOW_THREADS;
604+
612605 }
613606 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
614607}
@@ -626,9 +619,9 @@ PyObject *py_ue_set_world_transform(ue_PyUObject *self, PyObject * args)
626619 if (!component)
627620 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
628621
629- Py_BEGIN_ALLOW_THREADS;
622+
630623 component->SetWorldTransform (t);
631- Py_END_ALLOW_THREADS;
624+
632625
633626 Py_RETURN_NONE;
634627}
@@ -646,9 +639,9 @@ PyObject *py_ue_set_relative_transform(ue_PyUObject *self, PyObject * args)
646639 if (!component)
647640 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
648641
649- Py_BEGIN_ALLOW_THREADS;
642+
650643 component->SetRelativeTransform (t);
651- Py_END_ALLOW_THREADS;
644+
652645 Py_RETURN_NONE;
653646}
654647
@@ -661,9 +654,9 @@ PyObject *py_ue_set_relative_location(ue_PyUObject *self, PyObject * args)
661654
662655 if (self->ue_object ->IsA <USceneComponent>())
663656 {
664- Py_BEGIN_ALLOW_THREADS;
657+
665658 ((USceneComponent *)self->ue_object )->SetRelativeLocation (vec);
666- Py_END_ALLOW_THREADS;
659+
667660 Py_RETURN_NONE;
668661 }
669662 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
@@ -677,9 +670,9 @@ PyObject *py_ue_set_relative_rotation(ue_PyUObject *self, PyObject * args)
677670 return NULL ;
678671 if (self->ue_object ->IsA <USceneComponent>())
679672 {
680- Py_BEGIN_ALLOW_THREADS;
673+
681674 ((USceneComponent *)self->ue_object )->SetRelativeRotation (rot);
682- Py_END_ALLOW_THREADS;
675+
683676 Py_RETURN_NONE;
684677 }
685678 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
@@ -694,9 +687,9 @@ PyObject *py_ue_set_relative_scale(ue_PyUObject *self, PyObject * args)
694687
695688 if (self->ue_object ->IsA <USceneComponent>())
696689 {
697- Py_BEGIN_ALLOW_THREADS;
690+
698691 ((USceneComponent *)self->ue_object )->SetRelativeScale3D (vec);
699- Py_END_ALLOW_THREADS;
692+
700693 Py_RETURN_NONE;
701694 }
702695 return PyErr_Format (PyExc_Exception, " uobject is not a USceneComponent" );
0 commit comments