Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/01/2006 at 08:30, xxxxxxxx wrote:
User Information: Cinema 4D Version: 9 Platform: Mac ; Language(s) : C.O.F.F.E.E ;
--------- Hi!
I'm trying to assign a material (that is cloned by a reference material) to a C.O.F.F.E.E. generated texture tag, but always get the error
Incompatible values... OBJECT / OBJECT
The Script (the line in bold is causing the error) :
main(doc,op) { // Get the base Material var baseMat = doc->GetFirstMaterial(); // Count Objects in Instances Group var i; for (i = 1; i < 4; i++) { var obj = doc->FindObject(stradd("Instance.",tostring(i))); // Clone base Material var cloneMat = AllocMaterial(Mmaterial); cloneMat = baseMat->GetClone(); cloneMat->SetName(stradd("Instance.",tostring(i))); var colorC = cloneMat->GetChannel(CHANNEL_COLOR); var colorCc = colorC->GetContainer(); colorCc->SetData(CH_TEXTURE, stradd("Tex0", tostring(i), ".jpg")); colorC->SetContainer(colorCc); doc->InsertMaterial(cloneMat, NULL); var texTag = AllocTag(Ttexture); obj->InsertTag(texTag); texTag- >SetMaterial(cloneMat); cloneMat->Update(); } }
On 14/01/2006 at 13:55, xxxxxxxx wrote:
Solved the Problem: the line in bold must be:
texTag->SetMaterial(cloneMat->GetMarker());