Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5785

Color Picker problems ETO Forms

$
0
0

Hello guys,
i have an issue with the Color-Picker since one of the last updates.

The issue is that the Color not be shown in the ETO Form for now but it changes the Color of the Layer.

2021-11-25 09_11_24-DIN DE Zeichnungskopf Hochformat DZ_VoSx_NuSx_VB.000_000_000_XXX__Serienname_Art

in Normal case it should be shown the selected color in the right corner but it didnt,
is it an Core System Bug or an Script Bug ?

Here is the Code part of this box

#Material 1
        self.m_mat1_label = forms.Label(Text = 'Material 1:')
        self.m_mat1_label.Size = drawing.Size(80,22)
        self.m_mat1_box = forms.ComboBox(Text = rs.GetDocumentUserText('Material1') , AutoComplete = True, ReadOnly = False)
        self.m_mat1_box.Size = drawing.Size(250,22)
        if sprache == '1' or rs.GetDocumentUserText('v_sprache') == 'DE':
            self.m_mat1_box.DataStore = material_options_DE
        if sprache == '2' or rs.GetDocumentUserText('v_sprache') == 'EN':
            self.m_mat1_box.DataStore = material_options
        self.m_mat1_box_colorpicker = forms.ColorPicker()
        if rs.GetDocumentUserText('v_material_1_color') == None:
            self.m_mat1_box_colorpicker.Value = drawing.Color.FromArgb(0, 0,0)
        else:
            Material_1 = str(hex_to_rgb(rs.GetDocumentUserText('v_material_1_color')))
            Material_1 = Material_1.replace('(', '')
            Material_1 = Material_1.replace(')', '')
            Material_1 = Material_1.split(',')
            self.m_mat1_box_colorpicker.Value = drawing.Color.FromArgb(int(Material_1[0]), int(Material_1[1]), int(Material_1[2]))
        #Material 1

Thanks for your help guys :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5785

Trending Articles