setting Material-Projection
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/05/2009 at 06:28, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R11
Platform: Windows ;
Language(s) : C++ ;---------
Hi all,with the Help of Mathias (thanks a lot here again) I can run through all objetcs and allocte the material tag to do many things.
But:
Unfortunately I didn`t find a possibility to set the projektion (cubic, sphere, uvw) in the SDK and here in the forum.void StepThruHierarchy(BaseObject *obj) { while (obj) { TextureTag *ttag = NULL; ttag = static_cast<TextureTag*>(obj->GetTag(Ttexture)); if (ttag) { BaseMaterial *mat = NULL; mat = ttag->GetMaterial(); ttag = SetTag(Ttexture)->projection(cubic) // hier soll die Projektion auf "cubic"gesetzt werden if (mat) GePrint(mat->GetName()); } StepThruHierarchy(obj->GetDown()); obj = obj->GetNext(); } }Thanks Ronny
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/05/2009 at 08:43, xxxxxxxx wrote:
void StepThruHierarchy(BaseObject \*obj) \> { \> while (obj) \> { \> // No need to first set to NULL then to return value \> TextureTag \*ttag = static_cast<TextureTag\*>(obj->GetTag(Ttexture)); \> if (ttag) \> { \> // Set Projection like this (the values exist in the resource/res/description/ttexture.res) \> ttag->SetParameter(DescLevel(TEXTURETAG_PROJECTION), GeData(TEXTURETAG_PROJECTION_UVW), 0L); \> // ditto \> BaseMaterial\* mat = ttag->GetMaterial(); \> if (mat) GePrint(mat->GetName()); \> } \> // Save stack, time, recursion by not calling function if no children! \> if (obj->GetDown()) StepThruHierarchy(obj->GetDown()); \> obj = obj->GetNext(); \> } \> } -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/05/2009 at 10:20, xxxxxxxx wrote:
You can also do it this way...
-------- S N I P ---------- TextureTag *ttag = NULL; LONG ttagi = 0; while( (ttag = (TextureTag* )(obj->GetTag(Ttexture, ttagi++))) ) { BaseContainer tagvals = ttag->GetData(); tagvals.SetLong(TEXTURETAG_PROJECTION, TEXTURETAG_PROJECTION_UVW); ttag->SetData(tagvals); ttag->Message(MSG_UPDATE); } -------- S N I P ---------- -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/05/2009 at 03:13, xxxxxxxx wrote:
Hi kuroyume0161, Hi Giblet,
thanks to both of you.
the way with:ttag->SetParameter(DescLevel(TEXTURETAG_PROJECTION), GeData(TEXTURETAG_PROJECTION_UVW), 0L);wors absolutly fine.
Thanks again.