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:
Cinema 4D Version: 8.012
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 !!!!
On 21/02/2003 at 07:19, xxxxxxxx wrote:
did you try gettype()? They should have different ids that will make them comparable.
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.
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!
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.