PySide2 for Python 2.7 Windows Version?
-
Hi,
Have anyone tried using PySide2 for C4D?
Just wondering if you have the PySide2 for Python 2.7 Windows Version, which will for C4D R21 and below.The official repository only have Linux and Mac versions
https://pypi.org/project/PySide2/5.12.0/#filesRegards,
Ben -
Hi,
there are of course also Windows versions of Qt and its official Python bindings, just look into your link.
The problem is that
pyside2
requirespip
to be installed in its recommended way like most of Python's 3rd party libraries these days. Cinema's Python does not have thepip
tool and package included. This in turn will make it quite hard, if not impossible, to installpyside2
onc4dpy
, because you would have to handle all the dependencies and setup procedures that are embedded within thepyside2
wheel (the installation file).If I was hellbent on using an external GUI, I would probably look into
tkinter
, Python's default GUI.tkinter
however, has also been removed fromc4dpy
. So you would have to (manually) reinstall this one too, but you would probably have a better time trying to, becausetkinter
has no external dependencies except the binaries it comes with, i.e. is less complex thanpyside2
.I think Maxon said at some point, that they did remove
tkinter
, because they wanted to disencourage the usage of GUI frameworks other than their own. You can make of that statement what you want, but I want to stress, that there is no guarantee that it is technically possible to gettkinter
running onc4dpy
. Or in other words: It might not only have been a strategic decision to remove that package, but also a technical one.Cheers,
zipit -
@zipit
Thanks for the response! Yea, I guess there is no way around it unless its officially supported.
Just got off on a Maya job and discoveredPySide2
and it was joy to work with. I can use theQtDesigner
to build the layout and just focus more on the backend tasks. -
hi,
@zipit said everything
I'm agree with you, creating UI is time consuming and we know that any tool to help in that direction would be really appreciate.
Cheers,
Manuel -
@m_magalhaes
Thanks for the response. Here's hoping that PySide2 gets supported on later version.
-
Hello
Trolltech officially does not support pyside2 for py27 Win.raw test of
-
Hi @iluxa7k
I see you managed to get PySide2 working in C4D... I'm struggling to get it working - could you provide a little info on how you managed it?
Thanks,
Phil -
Hi @ph1lh00k,
what is your approach to installing it? Are you using
pip
and on which OS are you?pip
is still not delivered with Cinema's Python, but now supported in R23 (but for macOS it is broken at the moment). To install it, you have to first download get-pip.py and then run it withc4dpy
and the command line (make sure to have admin rights in the app):cd c:\program files\maxon\R23 # or where ever your cinema r23 is sitting c:\Program Files\Maxon\R23>c4dpy %USERPROFILE%\Desktop\get-pip.py # assuming you saved get-pip to your desktop
then you can install via pip
pySide
, which gave me the following output.c:\Program Files\Maxon\R23>c4dpy -m pip install `PySide2` T Collecting PySide2 Downloading PySide2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl (136.3 MB) |รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^| 136.3 MB 6.4 MB/s Collecting shiboken2==5.15.2 Downloading shiboken2-5.15.2-5.15.2-cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl (2.3 MB) |รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^รข-^| 2.3 MB 6.4 MB/s Installing collected packages: shiboken2, PySide2 WARNING: The scripts pyside2-designer.exe, pyside2-lupdate.exe, pyside2-rcc.exe and pyside2-uic.exe are installed in 'c:\Program Files\Maxon\R23\resource\modules\python\libs\python37.win64.framework\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed PySide2-5.15.2 shiboken2-5.15.2
Which is somewhat what I expected to happen, due to
c4dpy
not being onPATH
and also deviating from thepython.exe
signature. You can try to duct-tape this into place, butPySide2
is not supported by us, so you are unfortunately on your own here.Cheers,
Ferdinand -
Just to add some extra information, but PySide being a Qt port, this is not 100% supported by Cinema 4D (while you can make it working) Qt may interfere with the usual Cinema 4D interface and you will need to find Cinema 4D specifics workaround for doing usual Qt things.
So I just warn you Qt is not officially supported by Cinema 4D.
Cheers,
Maxime. -
Thanks @ferdinand @m_adam ,
I was hoping it would be straight forward as I have an existing tool built in PySide2 that I need to port to C4D... Guess I'll just have to build from scratch using the c4d GUI module. ={
Thanks,
Phil -
@ph1lh00k said in PySide2 for Python 2.7 Windows Version?:
Hi @iluxa7k
I see you managed to get PySide2 working in C4D... I'm struggling to get it working - could you provide a little info on how you managed it?
Thanks,
PhilHello Phil
Currently i stopped using of cinema4d, switch to flexible Blender. Remove any data for c4d content.For that case, i implemented injection-methods code from several topics at autodesk's beta forum for 3dsmax. That's all
-
-
Hello @bentraje,
without any further questions, we will consider this posting as solved by Wednesday and flag it accordingly.
Cheers,
Ferdinand -
Hi @ferdinand
Sorry for the late response. Sure sure. Let's close this thread.
-