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

    How to set the Priority of an ObjectData?

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 220 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

      On 28/05/2014 at 16:51, xxxxxxxx wrote:

      Hello everybody,

      as the title already says I have an ObjectData and I want it working after GENERATOR 0. Im not sure how to use AddToExecution(), Execute() and OBJECT_CALL_ADDEXECUTION and if its the right way at all.
      How can I set the Priority?

      Thx rown

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

        On 29/05/2014 at 04:35, xxxxxxxx wrote:

        Have slept on it for a night and now it works after restart.

        def AddToExecution(self, op, list) :  
          list.Add(op, c4d.EXECUTIONPRIORITY_GENERATOR, 1)  
          return True  
          
        def Execute(self, op, doc, bt, priority, flags) :  
          print "exe"  
          return c4d.EXECUTIONRESULT_OK
        

        and

        plugins.RegisterObjectPlugin(id=PLUGIN_ID, str="name",  
                                      g=name,  
                                      description="name",  
                                      info=c4d.OBJECT_POLYGONOBJECT | c4d.OBJECT_CALL_ADDEXECUTION,  
                                      icon=icon)
        

        Anyway! Now Ive to look for an answer to question how to call GetVirtualObjects() from Execute() or can I return the PolygonObject from Execute()?

        Thx rown

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