I cant get parameters of TextureTag
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:05, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.111
Platform: Windows ;
Language(s) : C++ ;---------
Hi.
Im trying to get (and set) some parameters of texture tag. And I cant find the way
This code doesnt work:BaseObject *obj = doc->GetActiveObject() ; TextureTag *tg = (TextureTag* )obj->GetTag( Ttexture) ; BaseContainer bs = tg->GetData() ; BaseList2D *dd = bs.GetString( TEXTURETAG_RESTRICTION) ;
And this doesnt work too:
BaseList2D *dd = bs.GetLink( TEXTURETAG_MATERIAL, doc) ;
and this too:
tg->GetDataInstance()->GetString( TEXTURETAG_RESTRICTION)
It seems like I cant get right BaseContainer of tag
Pointer to tag is valid, coztg->GetMaterial()->GetName()
works well.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:10, xxxxxxxx wrote:
I just wanted to set "Selection" parameter in texture tag. But then I mentioned that I cant set and GET any parameter through tag's container.
Help me please. What Im doing wrong? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:16, xxxxxxxx wrote:
I tryed to write digits instead a constant names.
e. g. 1006 instead of TEXTURETAG_RESTRICTION
It not helped. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:41, xxxxxxxx wrote:
BaseList2D \*dd = bs.GetString( TEXTURETAG_RESTRICTION) ; sorry it is just wrong copy paste. Of cource I checked my code very carefully. I meant String str = bs.GetString( TEXTURETAG_RESTRICTION) ;
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:43, xxxxxxxx wrote:
GeData data;
TextureTag* ttag = static_cast<TextureTag*>(obj->GetTag(Ttexture);
if (!ttag) return FALSE; // No texture tags
ttag->GetParameter(DescID(TEXTURETAG_MATERIAL), data, NULL);
Material* mat = static_cast<Material*>(data.GetLink(baseDocument, Mbase));
if (!mat) return FALSE; // No asssociated material? -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 11:50, xxxxxxxx wrote:
Thank you a lot !!!
It is works !!! -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/07/2007 at 15:22, xxxxxxxx wrote:
Sometimes you can get data from the BaseContainer (GetDataInstance() is better than GetData()) and sometimes you need to get it from the (Description) parameters (GetParameter() or GetParameterI()). Unless there are examples here or in the cinema4dsdk examples folder, it's mainly trial and error.