Texture Tag
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/07/2003 at 01:50, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.303
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Hi,
I am trying to add a material to more than one object at a same time. But my control never come out of the loop. When I check with a single object it works fine. What could be the problem?
Lets consider I have five objects in my document (named 1,2,3,4,5) Here is some part of my code,NewMat = new(Material); doc->InsertMaterial(NewMat, NULL); NewMat->SetChannelState(CHANNEL_COLOR, TRUE); NewMat->SetName("NewTexture"); color_channel = NewMat->GetChannel(CHANNEL_COLOR); container = color_channel->GetContainer(); container->SetData(CH_COLOR,vector(0,100,100)); color_channel->SetContainer(container); MatMarker = NewMat->GetMarker(); NewMat->Update(); GeEventAdd(MATERIAL_CHANGED); TexTag = new(TextureTag); for(i=1; i<=5; i++) { Obj = doc->FindObject(i); Obj->InsertTag(TexTag, NULL); TexTag->SetMaterial(MatMarker); } GeEventAdd(REDRAW_ALL);
As I mentioned earlier, this code works fine for single object. But I want to update multiple objects, its getting hang. Where am I doing mistake?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/07/2003 at 10:26, xxxxxxxx wrote:
You cannot insert the same TextureTag onto several objects at the same time. Move the allocation of the tag into the loop.
(Btw. this is the 2000th post on this new forum... -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/07/2003 at 15:01, xxxxxxxx wrote:
(Btw. this is the 2000th post on this new forum...
Cool! But you still have more posts than me...I´m gonna get you sooner or later >8))