예제 #1
0
void BKE_free_linestyle(FreestyleLineStyle *linestyle)
{
	LineStyleModifier *m;

	MTex *mtex;
	int a;

	for (a = 0; a < MAX_MTEX; a++) {
		mtex = linestyle->mtex[a];
		if (mtex && mtex->tex) mtex->tex->id.us--;
		if (mtex) MEM_freeN(mtex);
	}
	if (linestyle->nodetree) {
		ntreeFreeTree(linestyle->nodetree);
		MEM_freeN(linestyle->nodetree);
	}

	BKE_free_animdata(&linestyle->id);
	while ((m = (LineStyleModifier *)linestyle->color_modifiers.first))
		BKE_remove_linestyle_color_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->alpha_modifiers.first))
		BKE_remove_linestyle_alpha_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->thickness_modifiers.first))
		BKE_remove_linestyle_thickness_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->geometry_modifiers.first))
		BKE_remove_linestyle_geometry_modifier(linestyle, m);
}
예제 #2
0
void BKE_free_linestyle(FreestyleLineStyle *linestyle)
{
	LineStyleModifier *m;

	BKE_free_animdata(&linestyle->id);
	while ((m = (LineStyleModifier *)linestyle->color_modifiers.first))
		BKE_remove_linestyle_color_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->alpha_modifiers.first))
		BKE_remove_linestyle_alpha_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->thickness_modifiers.first))
		BKE_remove_linestyle_thickness_modifier(linestyle, m);
	while ((m = (LineStyleModifier *)linestyle->geometry_modifiers.first))
		BKE_remove_linestyle_geometry_modifier(linestyle, m);
}