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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Execution order of generators

    Scheduled Pinned Locked Moved SDK Help
    8 Posts 0 Posters 839 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 26/08/2011 at 08:34, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Is it possible to set the execution order of generators? I'm thinking of the example of the Mograph tracer. Here you have a generator (an emitter) inside another generator (the tracer). It seems that the emitter always generates particles before the tracer generates splines - if it didn't you'd get a gap between the particle and the spline.

      This is exactly what's happening to my plugin. I've got an emitter and my own tracer object, both using GetVirtualObjects to generate the particles and splines respectively. If the tracer is *below* the emitter in the OM, everything is fine because the emitter GVO is called before the tracer GVO. If the tracer is above the emitter, there's a slight gap between the end of the spline and the particle, because the tracer is always one frame behind the emitter.

      What I'd like to do - if it's possible - is to force the tracer always to generate after the emitter so it uses the up-to-date particle position to generate the spline. I could force the user to make the tracer a child of the emitter, which would work, but I'm using a link field at the moment and for various reasons I'd like to keep it like that.

      I've see this thread - https://developers.maxon.net/forum/topic/5044/4968_using-prioritylist - but it doesn't really help. Is there a way to do this reliably (since the Mograph tracer does it I'm hoping there is)?

      Steve

      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 26/08/2011 at 08:55, xxxxxxxx wrote:

        The priority list sets the order of operation (in general).  C4D processes things in a certain order (such as animation, expressions, generators, etc.).  You can tell your plugin when it should be processed.  The thread linked from your linked thread is more explanatory:

        https://developers.maxon.net/forum/topic/4115/3655_adding-priority-to-objects-am

        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 26/08/2011 at 14:17, xxxxxxxx wrote:

          Thanks Robert. Yes, I read that thread too, but I still wasn't (am not) sure about how this is supposed to work. Still, if it's the priority list I need to look at, then that's a great starting point, so many thanks for confirming that.

          Steve

          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 26/08/2011 at 15:45, xxxxxxxx wrote:

            Hm, tried this and still can't get it to work. I can add the PRIORITY description element to both objects, read/write data to those elements and use it in ObjectData::AddToExecution() but it doesn't make any difference.

            My understanding from the SDK is that AddToExecution affects the order in which ObjectData::Execute for different objects is called, but all my object generation is done in GetVirtualObjects, so I'm not sure how the AddToExecution call affects this.

            Still puzzled about how to get this to work. Is what I'm trying to do even possible?

            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 28/08/2011 at 07:39, xxxxxxxx wrote:

              Howdy,

              Have you tried to generate your virtual objects in the Execute() function and hold them in memory waiting for GetVirtualObjects() to be called?

              Adios,
              Cactus Dan

              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 28/08/2011 at 08:02, xxxxxxxx wrote:

                Thanks Dan. That's a good idea, I didn't realise you could do that. I'll give it a try!.

                Thanks,
                Steve

                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 28/08/2011 at 08:25, xxxxxxxx wrote:

                  Interesting idea.  Darn you Dan. (Dan, you darn?) ":)

                  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 29/08/2011 at 05:52, xxxxxxxx wrote:

                    Howdy,

                    Hehe, I was outside of the box when I thought of that one. 😂

                    Adios,
                    Cactus Dan

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