UG\NX secondary development surface color format brush tool, copy surface color UF_OBJ_ask_display_properties

Author of the article: Caspian
Source Website: https://blog.csdn.net/WangPaiFeiXingYuan


Introduction:

In this example, two sides are selected, the color of the reference side is obtained through the UF_OBJ_ask_display_properties function, and the color of the other side is set through the UF_OBJ_set_color function. The function of continuous selection is achieved through the while loop. Exit the program if no faces are selected.

Effect:

      

code:

#include "me.hpp"

int initProcFace(UF_UI_selection_p_t select, void* user_data)
{
	int num_triples = 1;
	UF_UI_mask_t mask_triples[] = { UF_solid_type,0,20 };
	if (UF_UI_set_sel_mask(select, UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC, num_triples, mask_triples) == 0) {
		return (UF_UI_SEL_SUCCESS);
	}
	retur

Guess you like

Origin blog.csdn.net/WangPaiFeiXingYuan/article/details/130213982