How to create a compose modifier in MCG?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to write a compose modifier.
It allows the user to select another object, and attaches it to the modified object. In addition, a transform can be applied to the attached object.
The idea is to build a larger object, say a wall, by repeatedly composing what I already have with additional building blocks.
Here is what I have
There is a problem: The transform always starts from the original object. So, if I add two compose modifiers with the same building block and the same transform, the attached objects will be at the same position. That is not the way I want it. If the first compose has a translation by 100 and the second also has a translation by 100, the second should be translated by 200 with respect to the base object.
Can someone explain how to do that? Do I need to change the world transform of the base node? How can that be done?