Marker and Materials

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

On 08/11/2002 at 07:47, xxxxxxxx wrote:

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

---------
How can I get the material belonging to a texture tag? I don´t really know how to use the returned marker that I can get with GetMaterial().
I guess I have read in the C++ of R8 there are no markers anymore. How does it work for COFFEE now?
Thanks
Samir

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

On 10/11/2002 at 06:37, xxxxxxxx wrote:

Quote: Originally posted by 3D Designer on 08  November 2002
>
> * * *
>
> How can I get the material belonging to a texture tag? I don´t really know how to use the returned marker that I can get with GetMaterial().
Markers were used by iterating through all materials and checking if their markers matched. That has now been replaced by BaseLinks. (Not available in C.O.F.F.E.E.)
> I guess I have read in the C++ of R8 there are no markers anymore. How does it work for COFFEE now?
I haven't tested if Markers still work in R8. If they don't, then I don't think it's possible to find the material belonging to a texture tag in C.O.F.F.E.E.

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

On 10/11/2002 at 06:41, xxxxxxxx wrote:

Thanks, that helps. It´s not pretty elegant but what shall I do. Hope COFFEE will be updated with the next Cinema 4D update.

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

On 09/01/2003 at 07:25, xxxxxxxx wrote:

hi,
is there really no way to get an objects (tags ) material in coffee? I need to get the texture applyed to an obj.
greetings, Nico

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

On 11/01/2003 at 07:08, xxxxxxxx wrote:

As far as I can tell the markers are still maintained. At least this produces the expected results:

    
    
    main(doc,op)  
    {  
      var tag = op->GetFirstTag();  
      println(getclass(tag));  
      var mark = tag->GetMaterial();  
     println(getclass(mark));
    
    
    
    
      var mat = doc->GetFirstMaterial();  
      println(getclass(mat));
    
    
    
    
      println(mat->GetMarker()->IsEQ(mark));  
    }

So pre R8 methods of getting the material should work. (I.e. looping through all materials checking for the one with the matching marker.)

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

On 27/03/2005 at 07:12, xxxxxxxx wrote:

here i get invalid file operation on export:
----------------------------------------------------
(error must be in ...GetMarker... command)

WriteMatList(obj,dok) {
 var tag,matname,mark,mat;
 for (tag = obj->GetFirstTag(); tag; tag=tag->GetNext())
 {
  if (instanceof(tag,TextureTag))
  {
   mark=tag->GetMaterial();
   for(mat = dok->GetFirstMaterial(); mat; mat=mat->GetNext())
   {
    if (mat->Getmarker()->IsEQ(mark)) matname=mat->GetName();
   }
  }
 }
 if (matname==NULL) matname="";
 return matname;
}