Supporting multiple versions of C4D



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

    On 15/03/2005 at 02:00, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   8.5/9.1 
    Platform:   Windows  ; Mac  ;  
    Language(s) :     C++  ;

    ---------
    Hi all,

    Ok, my current plugin has been developed so far under the R8 SDK, but I'd like to add N-Gon support under R9, whilst still supporting R8 users.

    Obviously the simplest approach is to make two versions, one for R8 and one for R9, but I'm wondering whether I can make a single binary which works for both (which is better for the users, and should be easier to maintain).

    Since I can ask C4d for its serial number, I can tell which version the user is running, so that's not a problem.

    But can I use the R9 API to make a binary that will still load under R8? Obviously I can't use any of the R9 functionality if they are running R8, but will this work at all?

    Just beginning to think about this, so any insight appreciated (including 'forget it' if that's the sensible answer!)

    Cheers - Steve



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

    On 15/03/2005 at 02:14, xxxxxxxx wrote:

    What's sensible is of course up to you, but I'd say that very likely "forget it" would be the official answer. The only thing that's supposed to work, at least as far as possible, is old plugins in new versions. Not the other way around.
    That being said, I believe the only thing that stops you from using R9 plugins in R8 would be the various checks in c4d_pmain.cpp. (If there really are any, the only one I can see seems to check for 7.500. You would have to see where the execution stops in R8.) Possibly also the API_VERSION passed in GeRegisterPlugin() would need to be patched for earlier versions to accept it.
    Then of course you would need to take extreme caution not to call anything R9-ish in R8. To use R8 functions with the R9 API you would need to manually call the Ex-functions that still remain in OperatingSystem.h. Using the serial number would work, but it seems easier to use GetC4DVersion(). (Ignore the strange text in the docs; afaik it simply returns the C4D version, not the API version.)



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

    On 15/03/2005 at 12:21, xxxxxxxx wrote:

    Hi Mikael,
    Thanks for the detailed reply.
    I'll need to think about this a bit, and decide whether it's worth the effort...

    Cheers - Steve


Log in to reply