Checking for registration file in Team Render



  • On 03/05/2014 at 04:59, xxxxxxxx wrote:

    All my plugins require a registration file that I generate, based on the 11 numerical digits of the Cinema 4D serial of each person that buys me the plugins.
    The registration file is a simple text file that is placed inside the res folder that resides inside the plugin folder.
    It all works fine except that it returns a "IndexError: string index out of range" error when people try to render a scene containing one of my object plugins, in Team Render.
    How can I check for the registration file when the plugin is in a client?
    Thank you in advance for any reply.

    Rui Batista



  • On 03/05/2014 at 08:31, xxxxxxxx wrote:

    One possible solution is not to check at all if the plugin is running under net render or team render. It depends on your licencing model but if you are happy for people to render on any number of nodes but only develop on one, you don't need to do the licence check if the instance of Cinema is a team render node.

    Steve



  • On 03/05/2014 at 09:38, xxxxxxxx wrote:

    Well, that is, in fact a possibility.
    However, if memory serves me right, I could check if the plugin was running in NetRender (don't recall how, but I saw it on the SDK).
    But now we have Team Render.
    So, how to check if a plugin is running in a Team Render or Net Render environment?



  • On 03/05/2014 at 11:00, xxxxxxxx wrote:

    Take a look c4d.IsClient, c4d.IsServer, c4d.IsNet, c4d.GeGetVersionType. It works for TR and NET.

    Cheers, s_rath



  • On 03/05/2014 at 11:45, xxxxxxxx wrote:

    Thank you very much, s_rath.
    I was trying to check if I my plugins were running inside a client with:

    version_type=c4d.GeGetVersionType()
    if version_type!=c4d.VERSIONTYPE_NETCLIENT:

    But while initializing the application, I get a AttributeError: 'module' object has no attribute 'VERSIONTYPE_NETCLIENT'

    Should I check, instead if c4d.IsClient or c4d.IsNet return true?



  • On 03/05/2014 at 12:21, xxxxxxxx wrote:

    Since c4d.IsClient() and c4d.IsNet() were only introduced in release 15.037, I was checking the version number to determine how should I make the checks, with this:

    version_number=c4d.GetC4DVersion()
    if version_number<15037:
         is_net=c4d.GeGetVersionType()==c4d.VERSIONTYPE_NETCLIENT
    else:
         is_net=(c4d.IsClient()==True or c4d.IsNet()==True)

    if is_net==False:

    It works fine in release 15.037 but in previous versions it still returns the error:

    AttributeError: 'module' object has no attribute 'VERSIONTYPE_NETCLIENT'

    So, how can I check if I'm running in a Tem Render client or a Net Render client in versions prior 15.037?



  • On 03/05/2014 at 15:53, xxxxxxxx wrote:

    Just found the problem.
    There are some typos in the python SDK.
    Instead of:

    VERSIONTYPE_NETCLIENT
    VERSIONTYPE_NETSERVER
    VERSIONTYPE_NETSERVERUNLIMITED

    They should be:

    VERSIONTYPE_NET_CLIENT
    VERSIONTYPE_NET_SERVER_3
    VERSIONTYPE_NET_SERVER_UNLIMITED



  • On 04/05/2014 at 03:33, xxxxxxxx wrote:

    Hi, IsNet() covers (IsClient() or IsServer()).

    Cheers, s_rath



  • On 04/05/2014 at 04:07, xxxxxxxx wrote:

    A server is a Cinema4D that sends frames to be rendered, right?
    It is not a fully functional Cinema 4D.
    And a client is a render node, not a fully functional Cinema 4D, right?



  • On 04/05/2014 at 13:45, xxxxxxxx wrote:

    Well, both have no regular viewport/gui if this is the point.

    Cheers, Seb



  • On 04/05/2014 at 15:42, xxxxxxxx wrote:

    That is what I wanted to know.
    Thank you, Seb.


Log in to reply