Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    instanceof and XRefs

    SDK Help
    0
    1
    174
    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
      Helper
      last edited by

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

      On 10/03/2008 at 09:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10.5 
      Platform:      Mac OSX  ; 
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Hello, I am adapting Rui Batista's script (from his book) which allows switching between different resolution objects depending on their distance from a camera. The one in the book uses instance objects which refer to objects stored in the same file. My version uses external XRefs which get pulled in as required. It's all working very well (which is kind of nice, seeing as I only started reading the book this morning) but one thing is driving me mad. In his book Mr Batista has his script check that it is indeed attached to an InstanceObject:

      if(!instanceof(op,InstanceObject)) return;

      I'd like to update this to work with XRefs, but I can't figure this out: using getclass (on op on a script attached to an XRef) returns BaseObject. (I've got it all to work by commenting out this check, but obviously it would be nicer if it worked like it was supposed to.)

      I'm confused (and still new to COFFEE.)

      Regards

      Charlie

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