channel shader / object position



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

    On 20/06/2009 at 14:24, xxxxxxxx wrote:

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

    ---------
    Hi there,

    i am facing a problem for quite a while now, not being able to solve. I have a generator plugin and a channelshader plugin, where i want to use the generated objects position to get represented by some color value.

    if the child object is a PolygonObject it works like i want it, but if it is a parametric object, for example a cube, it doesnt work. i tried ToPoly, static_cast<PolygonObject*> but this doesnt help..

    > `

      
    \>  ...  
    \>  RayObject *robj = NULL;  
    \>  robj = cd->vd->op;  
    \>  ...  
    \>  PointObject *parent = NULL;  
    \>  parent = static_cast<PointObject*>(robj->link);  
    \>  tempVec = parent->GetPos()  
    \>  ...  
    \>  
    

    `

    any ideas?
    i tried this, too, but it just crashes cinema
    parent = static_cast <PolygonObject*>((robj->link)->GetClone(0L,NULL));

    thanks for your help,
    cheers,
    ello



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

    On 25/06/2009 at 12:58, xxxxxxxx wrote:

    ok, i managed to get this working, by using the objects Matrix.off instead of its position..


Log in to reply