Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. Smolak
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    Sebastian Smolak

    @Smolak

    0
    Reputation
    6
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Email [email protected] Website www.archviz-4d.studio Location Poland

    Smolak Unfollow Follow

    Latest posts made by Smolak

    • RE: Changing OCIO View Transform doesn't work using Python

      Thank you @ferdinand for answer. Yes, most of the code is from chat but when I create Xpresso python it shows this command :

      image.png

      posted in Cinema 4D SDK
      S
      Smolak
    • Changing OCIO View Transform doesn't work using Python

      It looks like changing OCIO View Transform doesn't work using Python

      import c4d
      import maxon
      
      def main():
          # Get the active document
          doc = c4d.documents.GetActiveDocument()
          if not doc:
              print("No active document found")
              return
      
          # Create a new OCIO Config object
          ocio_config = maxon.c4d.documents.OpenColorIOConfig()
      
          # Load the OCIO configuration file (replace with your actual path)
          ocio_config_path = "$OCIO"
          result = ocio_config.Load(ocio_config_path)
          if result != c4d.OPEN_COLOR_IO_OK:
              print("Error loading OCIO configuration")
              return
      
          # Set the OCIO view transform
          ocio_view_transform = "3"  # Replace with your desired view transform
          ocio_config.SetViewTransform(ocio_view_transform)
      
          # Apply the OCIO configuration to the current document
          doc.SetOcioConfig(ocio_config)
      
          c4d.EventAdd()
      
      # Only execute the main function if the script is run directly
      if __name__ == '__main__':
          main()
      
      

      This simple version doesn't work too :

      import c4d
      
      def main():
          # Get the active document
          doc = c4d.documents.GetActiveDocument()
          if not doc:
              print("No active document found")
              return
      
          # Set the OCIO view transform
          view_transform = "3"  # Replace with your desired view transform
          doc[c4d.DOCUMENT_OCIO_VIEW_TRANSFORM] = view_transform
      
          c4d.EventAdd()
      
      if __name__ == "__main__":
          main()
      
      posted in Cinema 4D SDK python 2025
      S
      Smolak
    • RE: C4D octane materials to redshift.

      Unfortunately this script doesn't include Specular and Displacement channels conversion.

      posted in Cinema 4D SDK
      S
      Smolak
    • RE: Interaction Tag - def message seems to not work

      Thank you very much for depth explanation. I didn't know that "polygons have changed" means that they need to be deleted. I thought that it will works with polygons modification too.

      But using one of the code I have this error :

      3db1958c-04de-45b5-a257-4f34e2bb091b-image.png

      Regards,
      Sebastian

      posted in Cinema 4D SDK
      S
      Smolak
    • Interaction Tag - def message seems to not work

      Hi,

      def message (id,data) in Interaction Tag ( scripting tab ) seems to not work :

      24985db9-2285-4022-a1a0-2fe66b3dcfb9-image.png

      None of the message id's from here doesn't work : https://developers.maxon.net/docs/py/2023_2/manuals/application_development/manual_message_system.html like c4d.MSG_POLYGONS_CHANGED ( id 2 )

      posted in Cinema 4D SDK
      S
      Smolak