niklas2902 / py4godot

Python scripting for Godot. This GDExtension plugin allows you to use Python like GDScript, accessing the Godot engine's features and benefiting from Python's vast ecosystem.
MIT License
64 stars 7 forks source link

Create pyi files to improve editor support #19

Closed niklas2902 closed 2 years ago

niklas2902 commented 2 years ago

currently there is no editor support. So there have to be stub files (.py/pyi) which create stub classes and methods to create editor hints.

example Transform.pyi:

from __future__ import annotations
from py4godot.core.transform.Transform import *
from py4godot.core.aabb.AABB import *
from py4godot.core.transform.Transform2D import *

class Transform:
    def __init___with_axis_origin(self,x_axis:Vector3, y_axis:Vector3, z_axis:Vector3, origin:Vector3)->None:pass
    def new(r_dest:Transform, basis:Basis, origin:Vector3)->None:pass
    def get_basis(self)->Basis:pass
    def set_basis(self, v:Basis)->None:pass
    def get_origin(self)->Vector3:pass
    def set_origin(self, v:Vector3)->None:pass
    def __str__(self)->str:pass
    def inverse(self)->Transform:pass
    def affine_inverse(self)->Transform:pass
    def orthonormalized(self)->Transform:pass
    def rotated(self, axis:Vector3, phi:float)->Transform:pass
    def scaled(self, scale:Vector3)->Transform:pass
    def translated(self, ofs:Vector3)->Transform:pass
    def looking_at(self, target:Vector3, up:Vector3)->Transform:pass
    def xform_plane(self, v:Plane)->Plane:pass
    def xform_inv_plane(self, v:Plane)->Plane:pass
    def new_identity(r_dest:Transform)->None:pass
    def operator_equal(self, b:Transform)->bool:pass
    def operator_multiply(self, b:Transform)->Transform:pass
    def xform_vector3(self, v:Vector3)->Vector3:pass
    def xform_inv_vector3(self, v:Vector3)->Vector3:pass
    def xform_aabb(self, v:AABB)->AABB:pass
    def xform_inv_aabb(self, *v:AABB)->AABB:pass