C4D Python: Redshift IPR Start/Stop Control
-
Hi,
I'm trying to control the Redshift IPR with Python in the latest Cinema 4D and Redshift.
I've tried using command IDs like 1038653/1038655, 1038695/1038696, but they aren't working as expected. I know command ID 1038666 opens the IPR window, but there doesn't seem to be a way to get the window's instance to check if it's open.
Could someone provide the correct command IDs or reliable methods to start/stop the Redshift IPR via Python?
A working example would be very helpful!Thanks in advance!
Anthony
-
Hi @itstanthony you can use
c4d.CallCommand(1040239)
to toggle the start/stop of the Redshift IPR.
You can know such command ID by using the Script Log and doing the action you want to.Then to check if the command is active you can use
c4d.IsCommandChecked(1040239)
.Cheers,
Maxime. -
Hey @m_adam , thanks for that info. What about for commands that don't appear in the Script Log, such as 'Send snapshot to picture viewer'? Are those commands not possible to interact with programmatically?
Thanks,
Hogan -
Hi @m_adam
Thanks a lot for your help!Unfortunately, c4d.CallCommand(1040239) didn’t work on my setup (last version of C4D+Redshift)
However, your suggestion to use the Script Log was spot on — it led me to the correct command ID for toggling the Redshift IPR:c4d.CallCommand(1040205)
Appreciate the guidance!
Cheers,
Anthony -
@hoganXYZ hi if it does not appear in the script log then there is no clear rules. Sometimes there is another way sometimes now it depends on how it is implemented. For the one you asked I do not think it is possible. Best bet would be to ask Redshift on their forum.
Cheers,
Maxime.