Color Picker
Re: Color Picker
I think I see the problem.
The c_value does not change; it ADDS numbers to the existing number.
6267187874667052400000000000000000000.000
This is when it throws an error.
It starts to happen when selecting the Black slider then the main bitmap.
Edit: Actually, it is when selecting any of the V, R, G, or B sliders.
The c_value does not change; it ADDS numbers to the existing number.
6267187874667052400000000000000000000.000
This is when it throws an error.
It starts to happen when selecting the Black slider then the main bitmap.
Edit: Actually, it is when selecting any of the V, R, G, or B sliders.
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
Fixed the overflow error
Changed the combo text to colorconn <-- sourcenode
Edit: reading previous posts that I missed...
Refreshed the upload based on the default blankdxmaterial issue
Changed the code to favor the default blank dx material. It was working for me because I was testing with a converted material and the order of the nodes was different. Now it will assume the default blank dx material node order.
Edit: removed attachment for one more change
Changed the combo text to colorconn <-- sourcenode
Edit: reading previous posts that I missed...
Refreshed the upload based on the default blankdxmaterial issue
Changed the code to favor the default blank dx material. It was working for me because I was testing with a converted material and the order of the nodes was different. Now it will assume the default blank dx material node order.
Edit: removed attachment for one more change
Last edited by clintonman on 05 Feb 2023, 17:06, edited 2 times in total.
Re: Color Picker
Can you just post the whole code for the given script or scripts?clintonman wrote: ↑05 Feb 2023, 16:18 Fixed the overflow error
Changed the combo text to colorconn <-- sourcenode
Edit: reading previous posts that I missed...
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
There are some notes in the TheNodetrueBlue wrote: ↑05 Feb 2023, 15:54Just wished it went to Color firstDo you have a specific example of an undesirable value defaulting in the combo box?
Example:
Cube1 = Default Material (it only has one Color)
Cube2 = BlankDXMaterial (it has Color and Specular Color)
Now select each one
Cube1 is fine.
Cube2 shows the Specular Color and the main bitmap turns Black.
I think you mentioned you changed it to non-Alphabetized or No Sort.
TheNode:
var CBS_SORT = 256;
Are there different values I can experiment with?
Code: Select all
// from sdk docs
//CBS_SIMPLE 0x0001L
//CBS_DROPDOWN 0x0002L
//CBS_DROPDOWNLIST 0x0003L
// found in vs 2008 install on winxp vm, WinUser.h file
/*
* Combo Box styles
*/
//#define CBS_SIMPLE 0x0001L
//#define CBS_DROPDOWN 0x0002L
//#define CBS_DROPDOWNLIST 0x0003L
//#define CBS_OWNERDRAWFIXED 0x0010L
//#define CBS_OWNERDRAWVARIABLE 0x0020L
//#define CBS_AUTOHSCROLL 0x0040L
//#define CBS_OEMCONVERT 0x0080L
//#define CBS_SORT 0x0100L
//#define CBS_HASSTRINGS 0x0200L
//#define CBS_NOINTEGRALHEIGHT 0x0400L
//#define CBS_DISABLENOSCROLL 0x0800L
//#if(WINVER >= 0x0400)
//#define CBS_UPPERCASE 0x2000L
//#define CBS_LOWERCASE 0x4000L
The complete windows list shows sort 100L which is 256
You can translate the numbers using the windows calculator in programmer mode
select hex and type 100 to see 100L is 256
then you can add the numbers together inside colorSource.SetComboCtrlStyle(CBS_DROPDOWNLIST);
default ts sorted list would be
colorSource.SetComboCtrlStyle(3 + 256);
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
If you mean a list of changed nodes or the text, I changed several places to fix the error.trueBlue wrote: ↑05 Feb 2023, 16:49Can you just post the whole code for the given script or scripts?clintonman wrote: ↑05 Feb 2023, 16:18 Fixed the overflow error
Changed the combo text to colorconn <-- sourcenode
Edit: reading previous posts that I missed...
Re: Color Picker
If it is complicated just post the updated Color Picker.
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
Fixed the overflow error
Changed the combo text to colorconn <-- sourcenode
Changed the code to favor the default blank dx material. It was working for me because I was testing with a converted material and the order of the nodes was different. Now it will assume the default blank dx material node order. This should catch the most common cases, but there is no guarantee since the order of the nodes can change, different nodes can be present or absent and the nodes can have various names. There are too many combinations to handle them all but we can allow for specific cases like the YafaRay materials. Might be able to change the material converter to provide the same order as the default.
If an Object Render Attribute(ORA) node is selected the "Include ORA Connections" option will be ignored. This way if it's off, the list will still populate when directly selecting the ORA.
Changed the combo text to colorconn <-- sourcenode
Changed the code to favor the default blank dx material. It was working for me because I was testing with a converted material and the order of the nodes was different. Now it will assume the default blank dx material node order. This should catch the most common cases, but there is no guarantee since the order of the nodes can change, different nodes can be present or absent and the nodes can have various names. There are too many combinations to handle them all but we can allow for specific cases like the YafaRay materials. Might be able to change the material converter to provide the same order as the default.
If an Object Render Attribute(ORA) node is selected the "Include ORA Connections" option will be ignored. This way if it's off, the list will still populate when directly selecting the ORA.
- Attachments
-
- Color Picker1006.RsObj
- (321.29 KiB) Downloaded 41 times
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
If changing the UI is the issue you can try this untested idea
2D encapsulated everything inside the color picker
download and do the same for the new one
copy the new encapsulated node in
reconnect connectors from the old to the new
delete the old
unencapsulate the new
Edit: I did a test and it mostly works. The added step is you have to reconnect all the blue output connectors after unencapsulate.
- clintonman
- Captain
- Posts: 5428
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Color Picker
Here is a replacement for the "Material Editor/D3D Material Converter/D3D material"
This will make it so the converter creates dx materials with the same node order as the default blank dx material, so it will work better with the color picker drop down list.
This will make it so the converter creates dx materials with the same node order as the default blank dx material, so it will work better with the color picker drop down list.
- Attachments
-
- D3D material.RsObj
- (46.04 KiB) Downloaded 39 times
Re: Color Picker
Thank you for the adding my requests)clintonman wrote: ↑05 Feb 2023, 17:30If changing the UI is the issue you can try this untested idea
2D encapsulated everything inside the color picker
download and do the same for the new one
copy the new encapsulated node in
reconnect connectors from the old to the new
delete the old
unencapsulate the new
Edit: I did a test and it mostly works. The added step is you have to reconnect all the blue output connectors after unencapsulate.
Still in the early process of testing but so far looking really well.
Just a few tweaks...
Added two more SavePreset slots.
Left + button Resets 1-5
Right + button Resets 6-10 and RMB Resets 1-10
ToDo: Need to update these to util functions.
TheNode and OpenPanel scripts
Added if Camera selected or con exist "Selection" return.
Changed the width from 218 to 216 in the floating panel and OpenPanel script.
Add title "Color" and do not show floating panel's aspect.