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

    Prevent material preview update

    Cinema 4D SDK
    windows python 2023
    2
    3
    763
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      datamilch
      last edited by

      Hi there,

      is it possible to prevent rendering/update of the material preview of a standard c4d material?
      I know it's possible for redshift materials in the preferences .. but I found nothing similar for standard c4d materials.

      why I want to do this:

      I need some visual feedback while working in the editor window. So when two objects are in a special constellation, the material turns red (it will be more complex with the final plugin). Currently I use a python tag to check the conditions and update the material. This works fine so far.

      Now when the condition is met and the material is set to red, the rendering of the material preview is triggered. This rendering interrupts my dragging motion of the selected object and freezes the viewport for the time of the rendering. Once it has finished the viewport is updated again and shows the object at the correct position of the mouse. The rendering only takes about 1 sec, but it is an irritating interruption - even more when it occurs multiple times while dragging the object. So I'd like to prevent this.

      For now my only idea is to prevent the material updates, but I'm open to other suggestions.
      Another solution might be to have two separate materials and switch between the two. But ultimately I'd like to update a gradient shader (more or less continuously), so switshing is no option there.

      If needed, I can prepare a demo scene ...

      cheers sebastian

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @datamilch
        last edited by ferdinand

        Hello @datamilch,

        Thank you for reaching out to us. No, that is not possible. You are here mostly asking for an end-user feature (to add an option in the preferences) which is out of scope of support for SDK. I agree that this would be useful, but we cannot help you with that. Please use our Support Center to express end-user feature wishes.

        In the API, the only way to do this would be to set a parameter without incrementing the data dirty counter of an atom so that it will not update. Doing this is not possible at the moment.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        D 1 Reply Last reply Reply Quote 0
        • D
          datamilch @ferdinand
          last edited by datamilch

          hi @ferdinand,
          thanks for the information.
          found a workaround, that is good enough so far. I use the 3d-gradient in texture space and transform the texture tag matrix as I need it. the change in color will not occur that often.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post