📋 Metadata

💬 Content

rhyging5:

can you tell me if possible to get the curve panel of cavity mask option in texture paint mode?

I tried with this line, but doesn’t works:

ip = toolsettings.image_paint(C); L.template_curve_mapping(ip, “cavity_curve”, brush=True) if ip else None

Try this code:

bl_context.set_context(C); ip = paint_settings(bl_context); L.template_curve_mapping(ip, "cavity_curve", brush=True) if ip else None 

paint_settings function returns context sensitive paint settings (texture paint settings in this case).
bl_context is a wrapper for bpy.context which fixes some blender issues in popup dialogs.


🔗 View on Blender Artists