Author Topic: How to get Corona version with Python?  (Read 199 times)

2025-06-20, 09:54:46

htcg

  • Users
  • *
  • Posts: 2
    • View Profile
How to get Corona version with Python?

2025-06-20, 13:57:02
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13680
  • Marcin
    • View Profile
I am primarily a 3ds Max user so I don't know anything about Python in C4D, but I asked ChatGPT and it looks like it gave me a working code.
Just copy-paste into the Script Manager, hit Execute, and check your Console (Shift+F10 by default) for the printed Corona version:

Code: [Select]
import c4d

def main():
    # The “world” container holds all of C4D’s global settings.
    world = c4d.GetWorldContainerInstance()
    # Corona’s prefs are stored in a sub‐container under ID 1030480
    coronaPrefs = world[1030480]
    # Read the core version preference
    version = coronaPrefs[c4d.PREF_CORONA_CORE_VERSION]
    # Print it to the Console
    print(f"Corona for Cinema 4D version: {version}")

if __name__ == "__main__":
    main()

Looks like it used the information from https://forum.corona-renderer.com/index.php?topic=37328.0
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-06-20, 14:24:27
Reply #2

htcg

  • Users
  • *
  • Posts: 2
    • View Profile
Thanks, this is exactly what I wanted