📋 Metadata
- Author: roaoao
- Date: 2016-09-26 01:57:19
- Type:
answer - Reply to: post_00352
💬 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.