Hi Guys, I'm new to this Forum. I have a question. I wrote a script which sets random offset values to the first texturetag on Objects. Then next Objecfs follow. Everything works fine, but when the values have been set, to get the Editor updated, all Tags have to be selected individually.I already tried
> doc->MultiMessae(MSG_UPDATE);
and
> obj_tag->Message(MSG_UPDATE);
while obj_tag is the iterated Tag.
Using this will cause only the first and last of the iterated Tags get updated.
Can someone help me ?Here the script in a more simple way. Look whats (not) happening after using the Script and when you click on the tags. Dont forget to use more than 2 Objects.
>
>
> var obj = doc->GetActiveObject();
> if (!obj) return false;
>
> var obj_tag = obj->GetFirstTag();
> if (!obj) return false;
>
> var i = 1;
>
> while (obj) {
>
> var bc = obj_tag->GetContainer();
> bc->SetData(TEXTURETAG_OFFSETX, i*1.05);
> bc->SetData(TEXTURETAG_OFFSETY, i*2.36);
> obj_tag->SetContainer(bc);
>
> obj = obj->GetNext();
> if (!obj) return false;
> i++;
>
> obj_tag = obj->GetFirstTag();
> while (obj_tag && !instanceof(obj_tag, TextureTag) {
> obj_tag = obj_tag->GetNext();
> if (!obj_tag) return false;
> }
> }
>
>
>
Thanks in advance.nux
PS: is it true that you can write plugins for C4D in Java, too ?
PS²: Oh i think i postet in the wrong subdirectory *mod call*