Priority confusion

Recently, the question of priority has puzzled me again. I used to think that the priority of the transformer was generators = 0 (why? Because seeing the help document prompt the priority is initial - animation - expresso -generators, which means that this is their order of calculation, but after using the transformer on a point object, the priority of expresso tag must be Genenrators = 0 to get the correct point position)

But it doesn't seem like he's working that well, because when I start using it more deeply, it's going to go against my previous conclusion. So I wrote a simple Deformer and a Rag plugin to test my thoughts.


def ModifyObject(self, mod, doc, op, op_mg, mod_mg, lod, flags, thread):
    op.SetPoint(0, c4d.Vector())
    return True

Tag plugins: (i can change priority)

def Execute(self, tag, doc, op, bt, priority, flags):
    op.SetPoint(0, c4d.Vector(100))

I used two results to compare.
  • Then I added Deformer and Tag plugin to a polygon object (priority: generators >= 0), but the final result was Deformer.
  • Close Deformer and add an Xpresso tag to control the position of point: 0 if the priority Xpresso > Tag plugin results = Xpresso. This is just like helping the document.

This result breaks my previous understanding of the order. In what order are Deformer and Tag plugincalculated?



I'm sorry, I need to ask for a bit of patience here. We'll get back to you.

I have moved this topic to "Cinema 4D Development" category.


I need your help!



I'm terribly sorry, you need to wait so long. I have not forgotten you, but still need some input from development.

Just to be sure I end up in the correct discussion, your question is, why you can not have the tag overwrite the deformer result, by increasing the tags priority to Generator+499, right?


Yes, as you said
In the time of waiting for your answer, I have been thinking and looking for answers;
I really can't understand the calculation order, for example, why can't I modify the generator or deformer priority?
In my opinion, I think of each generator or deformer as a separate calculation method, and then calculate the effect I want in a certain order, but in fact it seems to be a complicated thing in C4D.
The following picture is my new understanding of the time I wrote:
(I am a Character rigger, so sometimes I want to get more control. As my characters become more complex, the priority issues will always be confusing)



I used the result of the skin of the 01 object, after using my own objectdata plugins, after the skin, using the poly matrix to constrain the joint of the object 02, the result is correct in the rendering window, but when I drag the time slider, The viewport sometimes has a delay, or I need to redraw it by pressing "A". How can I know how the interior of cinema 4d is calculated, although the above picture is my last thought, but this time the result seems to overturn my conclusion.

Although I can know how to implement a constraint effect, how to calculate it with code, but always delay my theoretical calculation results in Cinema 4d.

How does the Priority ? Deformer /Generator cache work,Make me confused :white_frowning_face:


@a_block I need your help again!
As I said above, what I missed in my plugin, when I drag the timeline slider, sometimes it will delay, but the result in the render window is correct.(i find that if i stop drag the time slider,then rotate or pan viewport,then drag timeline slider,the delay will definitely happen)


For viewport delay: i rewrote Skin Deformer ,Add a Aim Object to Check DeformCacheDirty To achieve my purpose(keep viweport realtime Refresh),yes ,it work.
I have been updating the post, hoping that I can understand what the problem is on the right path, instead of exploring the working mechanism of Cinema 4D in other ways. Although I don't get the official answer, this will not dispel my enthusiasm for exploration the answer.:relaxed: (English is not very good, I hope to understand what I express)