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

    BaseMaterial Compare

    SDK Help
    0
    5
    482
    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.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 21/02/2003 at 06:56, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      For BaseMaterials we have the function  Compare . this compares 2 materials and reports either true , if they are the same or false if not the same.
      this function works most of the time.But it is fatally flawed.
      if you compare 2 volume shaders(of same type)  from SLA which are clearly different , it will report them as being the same!!!!
      this is a very nasty bug and renders the compare function useless.
      I have tried to catch the exeption and compare the basecontainers form the 2 materials , however these also report "same"
      the materials are clearly not the same , so this must be a bug.
      can someone offer a workaround or please fix it 🙂
      there seems to be no way to tell 2 sla volume shaders  apart !!!!

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 21/02/2003 at 07:19, xxxxxxxx wrote:

        did you try gettype()? They should have different ids that will make them comparable.
        Best
        Samir

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 21/02/2003 at 07:35, xxxxxxxx wrote:

          gettypew is not usefull for materials as they are all the same
          but I can use mat->GetNodeID() which gives 0 for a normal material
          and the plugin id of the for  any plugin shaders, like SLA vloumes
          this doesnt help if i have 2  vlume plugins , which are the same.
          I then do compare on them and it tells me they are the same , when they are not . (1e, 1 blue , 1 red)
          so I test containers as well to make sure , but this also says they are the same.
           
          so something is broken , its not possible to compare 2 CHEEN shaders.
          the result is always true .(same) if the they match or not.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 21/02/2003 at 16:29, xxxxxxxx wrote:

            ah, have missed the point. Thought you were trying to compare two volume shader but didn´t know you were talking same type!
            Good luck!

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 22/02/2003 at 23:45, xxxxxxxx wrote:

              This is not a bug. The MaterialData hook has no comparison function, so BaseMaterial::Compare() cannot compare the private data of two R7 shaders. (Cf. CHANNELSHADER::CompareSettings() in R7.)
              I'll write a suggestion about it.

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