<div dir="ltr"><pre>In the patch I edited two files:<br> - ./source/blender/python/api2_2x/Material.h<br> - ./source/blender/python/api2_2x/Material.c<br><br>This patch I&#39;ve done achieves fullaccess to the Color Bands of a material instance. While it remains the actual mode<br>
Material.Modes.RAMPCOL* to know if a Color Band is active or not and the list of color points with the<br>MatInstance.colorbandDiffuse o MatInstance.colorbandSpecular, the patch adds functions to the Python Material Instance<br>
to make fully accesible. The Functions added are:<br><br>For Diffuse RampCol:<br>MatInstance.getColorBandDiffuseFactor() - Returns the actual Factor<br>MatInstance.getColorBandDiffuseMethod() - Returns the actual Method<br>
MatInstance.getColorBandDiffuseInput() - Returns the actual Input<br>MatInstance.setColorBandDiffuseFactor(float) - Sets/Chages the Factor<br>MatInstance.setColorBandDiffuseMethod(int) - Sets/Changes the Method<br>MatInstance.setColorBandDiffuseInput(int) - Sets/Changes the Input<br>
<br>For Specular RampCol:<br>MatInstance.getColorBandSpecularFactor() - Returns the actual Factor<br>MatInstance.getColorBandSpecularMethod() - Returns the actual Method<br>MatInstance.getColorBandSpecularInput() - Returns the actual Input<br>
MatInstance.setColorBandSpecularFactor(float) - Sets/Chages the Factor<br>MatInstance.setColorBandSpecularMethod(int) - Sets/Changes the Method<br>MatInstance.setColorBandSpecularInput(int) - Sets/Changes the Input<br><br>
In adittion, to make it easy to use the Patch adds two Dictionary to de Material Class, so among the Material.Modes<br>and Material.Shaders thera are two dictionaries more:<br><br>Material.ColorBandInput<br> - SHADER - Returns the value assigned to Shader Input for ColRamps<br>
 - ENERGY - Returns the value assigned to Energy Input for ColRamps<br> - NORMAL - Returns the value assigned to Normal Input for ColRamps<br> - RESULT - Returns the value assigned to Result Input for ColRamps<br><br>Material.ColorBandMethod<br>
 - BLEND - Returns the value of Blend Method for ColRamps<br> - MIX - Returns the same value of Blend, added to avoid confusion between Blend internal name and Mix name showed in<br>the GUI<br> - ADD - Returns the value of Add Method for ColRamps<br>
 - MULT - Returns the value of Multiply Method for ColRamps<br> - SUB - Returns the value of Substract Method for ColRamps<br> - SCREEN - Returns the value of Screen Method for ColRamps<br> - DIV - Returns the value of Divide Method for ColRamps<br>
 - DIFF - Returns the value of Difference Method for ColRamps<br> - DARK - Returns the value of Darken Method for ColRamps<br> - LIGHT - Returns the value of Lighten Method for ColRamps<br> - OVERLAY - Returns the value of Overlay Method for ColRamps<br>
 - DODGE - Returns the value of Dodge Method for ColRamps<br> - BURN - Returns the value of Burn Method for ColRamps<br> - HUE - Returns the value of Hue Method for ColRamps<br> - SAT - Returns the value of Saturation Method for ColRamps<br>
 - VAL - Returns the value of Value Method for ColRamps<br> - COLOR - Returns the value of Color Method for ColRamps<br><br>The only file I haven&#39;t patched is the ./source/blender/python/api2_2x/doc/Material.py, but the only thing to do is<br>
add all the new information to it.<br><br>I added the two diff files of Material.c and Material.h based on the stable source release Blender 2.46 tar package<br>downloaded from the web. (If it&#39;s of help, I would say that the diff files are generated with the comand &quot;diff<br>
original_file modified_by_me_file &gt; dif_file&quot;)</pre></div>