OIDA
08-14-2008, 03:06 AM
I have a really simple script that allows me to set the vertex colours on a vertex sub-selection on map channel 5 using a colorpicker dialog.
When dealing with an editable mesh there are no problems (using meshop.setVertColor), however, when dealing with an editable poly I get some strange issues when using my script to set the vertex colours on map channel 5. When I bring up my tool and try to set the vertex colour using the colorpicker interface the verts will only reflect the very first change I make in the colorpicker and then stay at that colour no matter how much I mess about with the colorpicker. The strange thing is that if, after making the colour change, I convert the object into an editable mesh I will suddenly see the changes that I made using my script. What is also strange is that if I set up my script to do the exact same thing but on map channel 0 (vertex colour channel) rather than map channel 5 it works flawlessly.
Anybody have any ideas why polyop.setVertColor would have issues on map channel 5 but work fine for map channel 0?
As a side note doing something like
polyop.setVertColor $ 5 $.selectedVerts green
in the listener window works fine, but when using this same command in my script that is being driven by the colorpicker UI it only accepts the very first click I make and then the vertex colours on the model stop updating. Again, this is only the case when I use map channel 5, which unfortunately is a necessity for me.
Thanks in advance for any suggestions, I hope I expressed my issue clearly enough.
When dealing with an editable mesh there are no problems (using meshop.setVertColor), however, when dealing with an editable poly I get some strange issues when using my script to set the vertex colours on map channel 5. When I bring up my tool and try to set the vertex colour using the colorpicker interface the verts will only reflect the very first change I make in the colorpicker and then stay at that colour no matter how much I mess about with the colorpicker. The strange thing is that if, after making the colour change, I convert the object into an editable mesh I will suddenly see the changes that I made using my script. What is also strange is that if I set up my script to do the exact same thing but on map channel 0 (vertex colour channel) rather than map channel 5 it works flawlessly.
Anybody have any ideas why polyop.setVertColor would have issues on map channel 5 but work fine for map channel 0?
As a side note doing something like
polyop.setVertColor $ 5 $.selectedVerts green
in the listener window works fine, but when using this same command in my script that is being driven by the colorpicker UI it only accepts the very first click I make and then the vertex colours on the model stop updating. Again, this is only the case when I use map channel 5, which unfortunately is a necessity for me.
Thanks in advance for any suggestions, I hope I expressed my issue clearly enough.
