- Sun Mar 25, 2012 6:49 pm
#354203
Code: Select all
I am trying to assign both a weight value and a weight texture to the layer. I can drive both individually, but not both at the same time .. What am I missing ?from pymaxwell import *
scene = Cmaxwell(mwcallback);
material = scene.createMaterial( 'mxm_test', False );
layer = material.addLayer();
bsdf = layer.addBSDF();
VAL = Cmap();
MAP = Cmap();
reflectance = bsdf.getReflectance();
VAL.type = MAP_TYPE_VALUE;
VAL.value = 100
layer.setWeight(VAL)
MAP.type = MAP_TYPE_BITMAP;
MAP.pFileName = "D:/DATA/weightMap.jpg";
layer.setWeight(MAP)
layer.setActiveWeight(MAP)
material.write('C:/Users/username/Desktop/mxm_test.mxm');