Some of my python dependencies cannot be imported inside of Substance Designer.
The following script works perfectly outside of Substance Designer
import cryptography
print(cryptography)
from cryptography import hazmat
print(hazmat)
from cryptography.hazmat import bindings
print(bindings)
print(dir(bindings))
from cryptography.hazmat.bindings import _padding
print(_padding)
It outputs the following:
PS & 'C:\Program Files\Allegorithmic\Substance Designer\plugins\pythonsdk\python.exe' .\test.py
<module 'cryptography' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\__init__.py'>
<module 'cryptography.hazmat' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\hazmat\\__init__.py'>
<module 'cryptography.hazmat.bindings' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\hazmat\\bindings\\__init__.py'>
<module 'cryptography.hazmat.bindings._padding' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\hazmat\\bindings\\_padding.pyd'>
But the same code inside of Substance Designer fails:
[MSG][2]<module 'cryptography' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\__init__.py'>
[MSG][3]<module 'cryptography.hazmat' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\hazmat\\__init__.py'>
[MSG][4]<module 'cryptography.hazmat.bindings' from 'C:\\Program Files\\Allegorithmic\\Substance Designer\\plugins\\pythonsdk\\lib\\site-packages\\cryptography\\hazmat\\bindings\\__init__.py'>
[MSG][5]['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'absolute_import', 'division', 'print_function']
[ERR][6]Traceback (most recent call last):
[ERR][7] File "<string>", line 8, in <module>
[ERR][8]ImportError
[ERR][9]:
[ERR][10]DLL load failed: Le module spécifié est introuvable.
Was dll loading completly disabled in Substance Designer ?