예제 #1
0
static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *reports, CBData *element)
{
	int index = (int)(element - coba->data);
	if(colorband_element_remove(coba, index) == 0)
		BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element");

}
예제 #2
0
파일: rna_color.c 프로젝트: diekev/blender
static void rna_ColorRampElement_remove(struct ColorBand *coba, ReportList *reports, PointerRNA *element_ptr)
{
	CBData *element = element_ptr->data;
	int index = (int)(element - coba->data);
	if (colorband_element_remove(coba, index) == false) {
		BKE_report(reports, RPT_ERROR, "Element not found in element collection or last element");
		return;
	}

	RNA_POINTER_INVALIDATE(element_ptr);
}