Hello
1. I have no idea where is the submit button ...
2. if I using default setting , the cmd show these
C4D_USER_FOLDER=
"ERROR: The User-Directory did not exist so the current python_init.py could NOT get copied!!!"
" Please set C4D_USER_FOLDER to point to the User-Directory!"
C4D_EXEC=C:\Program Files\Maxon Cinema 4D R24\Cinema 4D.exe
3. then if I try to force modify setup_c4d.cmd
set "APP_EXE=C:\Program Files\Maxon Cinema 4D R24\CINEMA 4D.exe"
set "C4D_USER_FOLDER=%MAXON_HOME%\Maxon Cinema 4D R24_C2A528F6\"
the python_init.py copied successful, but I don't know is it works?...... ((back to 1.
c4d console shows nothing about afanasy...
cgru.3.2.1
C4D S24 not sure how to setup
C4D S24 not sure how to setup
Last edited by ak47xm4 on Wed Sep 29, 2021 2:40 pm, edited 1 time in total.
Re: C4D R24 not sure how to setup
Hi!
That copying is needed to "install" this scripts to C4D:
https://github.com/CGRU/cgru/tree/maste ... pts/python
(to make C4D to "see" that scripts)
You can make C4D to "see" that scripts in any other way. You can ask C4D forums how to do it.
Also i do not think that it is correct:
set "C4D_USER_FOLDER=%MAXON_HOME%\Maxon Cinema 4D R24_C2A528F6\"
- it looks more like an installation, not home folder.
That copying is needed to "install" this scripts to C4D:
https://github.com/CGRU/cgru/tree/maste ... pts/python
(to make C4D to "see" that scripts)
You can make C4D to "see" that scripts in any other way. You can ask C4D forums how to do it.
Also i do not think that it is correct:
set "C4D_USER_FOLDER=%MAXON_HOME%\Maxon Cinema 4D R24_C2A528F6\"
- it looks more like an installation, not home folder.
Timur Hairulin
CGRU 3.4.0, Ubuntu 24.04, MS Windows 10 (clients only).
CGRU 3.4.0, Ubuntu 24.04, MS Windows 10 (clients only).
Re: C4D S24 not sure how to setup
OK...
now it works
setup_c4d.cmd " c4d version path update "
set "MAXON=%SystemDrive%\Program Files\Maxon "
For /F "Tokens=*" %%I in ('dir /b "%MAXON%CINEMA 4D*"') Do set APP_DIR=%MAXON%\%%I
set "APP_EXE=%APP_DIR%\CINEMA 4D.exe"
IF EXIST "%C4D_USER_FOLDER%\python37" (
copy /Y "%C4D_CGRU_LOCATION%\python_init.py" "%C4D_USER_FOLDER%\python37"
put these codes on top of python_init.py
import sys
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/afanasy/python')
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/lib/python')
now it works
setup_c4d.cmd " c4d version path update "
set "MAXON=%SystemDrive%\Program Files\Maxon "
For /F "Tokens=*" %%I in ('dir /b "%MAXON%CINEMA 4D*"') Do set APP_DIR=%MAXON%\%%I
set "APP_EXE=%APP_DIR%\CINEMA 4D.exe"
IF EXIST "%C4D_USER_FOLDER%\python37" (
copy /Y "%C4D_CGRU_LOCATION%\python_init.py" "%C4D_USER_FOLDER%\python37"
put these codes on top of python_init.py
import sys
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/afanasy/python')
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/lib/python')
Re: C4D S24 not sure how to setup
Hi!
Thank you for a donation!
So, the result path that python_init.py should be copied to is:
- is this correct?
Later it was:
and this is the reason that copying was not working
This lines should be not needed:
as cgru lib/python and afanasy/python are appended in PYTHONPATH
in cgru setup.cmd and afanasy/setup.cmd
https://github.com/CGRU/cgru/blob/master/setup.cmd
https://github.com/CGRU/cgru/blob/maste ... /setup.cmd
CGRU environment should be initialized on software start.
This is the reason to not to append sys.path in python directly by absolute paths.
Or you should do it at any CGRU update.
Thank you for a donation!
So, the result path that python_init.py should be copied to is:
Code: Select all
%USERPROFILE%\AppData\Roaming\MAXON\CINEMA 4D*\python37
Later it was:
Code: Select all
%USERPROFILE%\AppData\Roaming\MAXON\CINEMA 4D*\prefs\python
This lines should be not needed:
Code: Select all
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/afanasy/python')
sys.path.append('C:/cgru/cgru.3.2.1_0920/cgru.3.2.1/lib/python')
in cgru setup.cmd and afanasy/setup.cmd
https://github.com/CGRU/cgru/blob/master/setup.cmd
https://github.com/CGRU/cgru/blob/maste ... /setup.cmd
CGRU environment should be initialized on software start.
This is the reason to not to append sys.path in python directly by absolute paths.
Or you should do it at any CGRU update.
Timur Hairulin
CGRU 3.4.0, Ubuntu 24.04, MS Windows 10 (clients only).
CGRU 3.4.0, Ubuntu 24.04, MS Windows 10 (clients only).
Re: C4D S24 not sure how to setup
yes, it is correct~~~timurhai wrote: ↑Thu Sep 30, 2021 9:45 am
So, the result path that python_init.py should be copied to is:- is this correct?Code: Select all
%USERPROFILE%\AppData\Roaming\MAXON\CINEMA 4D*\python37
((temporary in R23
(((( downgraded to debug
I have tested
echo PYTHONPATH=%PYTHONPATH%
it's correct path, but C4D python can't import af
(( just using C4D for less than 1 month OTZ