Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    channel shader / object position

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 139 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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..

        1 Reply Last reply Reply Quote 0
        • First post
          Last post