2023-05-23 19:06:25 +02:00
|
|
|
# Start with a sanity check to ensure the loading is done from Godot-Python
|
|
|
|
# (and not from a regular Python interpreter which would lead to a segfault).
|
|
|
|
# The idea is we should have the following loading order:
|
2023-06-02 11:13:10 +02:00
|
|
|
# pandemonium binary -> pythonscript.so -> _pandemonium.so -> pandemonium/__init__.py
|
2023-05-23 19:06:25 +02:00
|
|
|
import sys
|
|
|
|
|
2023-06-02 11:13:10 +02:00
|
|
|
if "_pandemonium" not in sys.modules:
|
2023-05-23 19:06:25 +02:00
|
|
|
raise ImportError(
|
2023-06-02 11:13:10 +02:00
|
|
|
"Cannot initialize pandemonium module given Godot GDNative API not available.\n"
|
2023-05-23 19:06:25 +02:00
|
|
|
"This is most likely because you are running code from a regular Python interpreter"
|
2023-06-02 11:13:10 +02:00
|
|
|
" (i.e. doing something like `python my_script.py`) while pandemonium module is only available"
|
2023-05-23 19:06:25 +02:00
|
|
|
" to Python code loaded from Godot through Godot-Python plugin."
|
|
|
|
)
|
|
|
|
del sys
|
|
|
|
|
2023-06-02 11:13:10 +02:00
|
|
|
from pandemonium._version import __version__
|
|
|
|
from pandemonium.tags import (
|
2023-05-23 19:06:25 +02:00
|
|
|
MethodRPCMode,
|
|
|
|
PropertyHint,
|
|
|
|
PropertyUsageFlag,
|
|
|
|
rpcdisabled,
|
|
|
|
rpcremote,
|
|
|
|
rpcmaster,
|
|
|
|
rpcpuppet,
|
|
|
|
rpcslave,
|
|
|
|
rpcremotesync,
|
|
|
|
rpcsync,
|
|
|
|
rpcmastersync,
|
|
|
|
rpcpuppetsync,
|
|
|
|
signal,
|
|
|
|
export,
|
|
|
|
exposed,
|
|
|
|
)
|
2023-06-02 11:13:10 +02:00
|
|
|
from pandemonium.pool_arrays import (
|
2023-05-23 19:06:25 +02:00
|
|
|
PoolIntArray,
|
|
|
|
PoolRealArray,
|
|
|
|
PoolByteArray,
|
|
|
|
PoolVector2Array,
|
|
|
|
PoolVector3Array,
|
|
|
|
PoolColorArray,
|
|
|
|
PoolStringArray,
|
|
|
|
)
|
2023-06-02 11:13:10 +02:00
|
|
|
from pandemonium.builtins import *
|
|
|
|
from pandemonium.bindings import *
|