UVProject with Python

Hello,

I’d like to use a camera as a projector.
I have done some search and found the UVProject-Modifier.

The problem is I need access via Python scrippting because I want to use the result in my script.

Does anybody knows a function which I can use to set a certain color on a certain position on an object? I think uv mapping may be usefull, but I can’t found any functions in the Blender Python API giving access to this.

Thanks,
semmelb

hi

a bit late but better than never :eyebrowlift:

ob.modifiers.append(15) # 15 is the id of the UVProject modifier

That doesn’t actually work in recent builds:

ob.modifiers.new("bool", "BOOLEAN")

is more like it.

Plus it doesn’t really solve the problem of projecting a ‘ray’ from a camera to an object.

…and this thread is four years old.