1
$\begingroup$

Any ideas how to press Generate Data Layers button from DataTransfer modifier in python? Can't find it in documentation: https://docs.blender.org/api/current/bpy.types.DataTransferModifier.html

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$
import bpy

obj = bpy.data.objects["Cube"]

with bpy.context.temp_override(object=obj):
    bpy.ops.object.datalayout_transfer(modifier="DataTransfer")

https://docs.blender.org/api/current/bpy.ops.object.html#bpy.ops.object.datalayout_transfer

$\endgroup$
1
  • $\begingroup$ Wow it works, thank you. This is very unobvious thing $\endgroup$
    – Anaph
    Commented Nov 3, 2023 at 0:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .