Env-o-Matic

I recently downloaded the env-o-matic script. It looks like an EXTREMELY usful script, but the instructions are in french, and I think its a little dated.
Would anyone be willing to fix the script so that it works with the new API? I would REALLY REALLY REALLY appreciate it!

Thanks

dante

I’m working on it

Works well on blender2.23/2.25/2.26/2.27
but there is just a little problem with
the .loc variable on blender2.28. yet corrected there:
http://jmsoler.free.fr/util/blenderfile/py/Envmap_O_Matic228.py

To use this script in your file
just rename the miror plane : ‘Mirror.001’,
the empty : ‘Mirror_Prime’
and the camera : ‘Camera.001’

Nothing else to do or if you want to use it in an animation
link the script to the camera in framechanged mode.

A blend file to test:
http://jmsoler.free.fr/util/blenderfile/blend/Envmap_O_Matic228.blend

so no need for me :slight_smile: hey I dont know y this script is so complicated. I wrote once a little one, cuz I was making water.

import Blender

cam = Blender.Object.Get("main_cam")
empty = Blender.Object.Get("water.env_empty")
lake = Blender.Object.Get("water")

empty.LocZ = lake.LocZ - (cam.LocZ - lake.LocZ)
empty.LocX = cam.LocX
empty.LocY = cam.LocY      

Blender.Redraw()

Your script don´t work on all posible cases (try to move the plane) but EnvMap_o_Matic works very well.

Your script don´t work on all posible cases (try to move the plane) but EnvMap_o_Matic works very well.[/quote]

You are right, to see the problem just do :

lake.RotX=30

ye I know what you mean. But guys… have you ever seen a lake who’s not flat? :wink:
this example is just with the objectpoint. very simple but works in this case