Set a projector at UVProjection modifier (script) I am trying to create a script that involves the creation and setup of a UV Project modifier. When it comes to set the UV Map of the projector, there is no problem at all:
import bpy

bpy.data.objects['piece'].select_set(True)
bpy.ops.object.modifier_add(type='UV_PROJECT')
bpy.context.object.modifiers[&quot;UVProject&quot;].uv_layer = &quot;UVMap&quot;

But when I'm trying to set the projector object, I find no way to do it, as &quot;projectors&quot; property seems to be read-only:
https://docs.blender.org/api/current/bpy.types.UVProjectModifier.html?highlight=projection%20modifier
Q: Am I missing something or precisely that property is just not scriptable?
Similar to How to add modifiers using python script and set parameters?, the recommended way is to add a new modifier to an object using ObjectModifiers.new() which returns the reference to the modifier and allows to assign whatever you like:
import bpy

# Get the object in context
obj = bpy.context.object

# Add the modifier to the object in context
modifier = obj.modifiers.new(name=&quot;project&quot;, type='UV_PROJECT')

# Properties
modifier.uv_layer = &quot;UVMap&quot;
modifier.projector_count = 10

for p in modifier.projectors:
    p.object = bpy.context.scene.camera

projectors property is of type bpy_prop_collection, which is essentially a list of object references. In order to assign an object to each Object property of the modifier, you would have to assign an object reference like bpy.context.scene.camera.