📋 Metadata

💬 Content

panosz:

bpy.context.object.modifiers[“Dynamic Paint”].canvas_settings.canvas_surfaces[“Surface”].surface_type = ‘WEIGHT’

Here is an example for to the previous code:

ao = C.active_object; sos = C.selected_objects; so = len(sos) > 1 and (sos[0] if ao is sos[1] else sos[1]); bpy.ops.object.modifier_add(dict(object=so), type='DYNAMIC_PAINT'); bpy.ops.object.modifier_add(dict(object=ao), type='DYNAMIC_PAINT'); bpy.ops.dpaint.type_toggle(dict(object=so), type='CANVAS'); so.modifiers[-1].canvas_settings.canvas_surfaces[0].surface_type = 'WEIGHT'; ao.modifiers[-1].ui_type = 'BRUSH'; bpy.ops.dpaint.type_toggle(dict(object=ao), type='BRUSH')

❤️ 1 likes


🔗 View on Blender Artists