Smart 'one-click' automated object placement?

Hi,

I have searched around quite a bit but haven't found anything much so far.

I'm in need of a tool that will automatically align an object in my scene with the root of another object. Bu the tricky thing is, I need an offset applied for each instance.

To visualise:

Imagine I have imported a model of a statue

Then I have an apple imported into the scene.

I run a script with the apple selected and it is moved into the hand of the statue without any manual placement. I would need to set up the correct offset values for this to take place.

Now imagine I have many scenes with many different statues laid out

Having this script would allow me to place apples in all of their hands without manual placement.

Is it possible or even worth it?

Thanks for reading

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

How the script should know where is the hand of the statue?

For every statue put the pivot in the place where you want to put the apple. Then it is easy:

apple.pos = statue.pos

An offset can be added too.

If you don't want to change the pivot position of the statue then you can put a point helper in the place where you want the apple to be repositioned. Then link that point helper to the statue. Then:

apple.pos = pointHelper.pos

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.