problem with parent object and GeData

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 24/05/2009 at 12:40, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   r11 
Platform:   Windows  ;   
Language(s) :     C++  ;

---------
Hi there,
i have a strange problem reading data from a parent object.
this is my code

> `

  
\>  BaseObject* parent = op->GetUp();  
\>  if (parent)  
\>  {     GePrint(LongToString(parent->GetDataInstance()->GetLong(PLUGTYPE)));  
\>  }  
\>  

`

if the plugins init i set PLUGTYPE to 2
> `

  
\>  data->SetLong(PLUGTYPE,2);  
\>  

`

but when i read it out by a child i get 0 instead of 2

this is driving me nuts for the past hour and i hope someone can tell me what i am doing wrong.

btw, i tried this, too
> `

  
\>  parent->GetParameter(DescID(PLUGTYPE), data, 0L);  
\>  GePrint(LongToString(data.GetLong()));  
\>  

`

returns 0, too..

please help
cheers,
ello

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 26/05/2009 at 03:36, xxxxxxxx wrote:

I would need some more info to provide any help.

I guess you have to different object generator plugins, A and B. B is a child of A. Where do you set PLUGTYPE to 2, in B::Init() ?

cheers,
Matthias