Xvariation
Attributes
-
ENGLISH NAME : VariationShader
-
NAME : Xvariation
-
INCLUDE : Mpreview
-
INCLUDE : Xbase
-
PATH : shader/description/xvariation.res
-
PLUGIN : shader
-
MAXON online help (may not exist): XVARIATION
Elements
ID |
UI Name |
Type |
Parameters |
Cycle |
VARIATIONSHADER_SEED |
Seed |
REAL
|
MIN |
|
VARIATIONSHADER_SEED_MODE_OBJECT_CAT |
ObjectVariation |
LONG
|
|
VARIATIONSHADER_SEED_MODE_OBJECT_OFF |
Disabled |
VARIATIONSHADER_SEED_MODE_OBJECT_NAME |
ObjectName |
VARIATIONSHADER_SEED_MODE_OBJECT_ID |
ObjectHierarchy |
VARIATIONSHADER_SEED_MODE_PARENT |
Parent |
VARIATIONSHADER_SEED_MODE_INSTANCE_ID |
Objects |
VARIATIONSHADER_SEED_MODE_BUFFER_ID |
ObjectBufferIDs |
VARIATIONSHADER_SEED_MODE_MATERIAL_ID |
MaterialName |
|
VARIATIONSHADER_SEED_MODE_POLYGON_CAT |
PolygonVariation |
LONG
|
|
VARIATIONSHADER_SEED_MODE_POLYGON_OFF |
Disabled |
VARIATIONSHADER_SEED_MODE_POLYGON_ID |
Polygons |
VARIATIONSHADER_SEED_MODE_POLYGON_SELECTION_TAG |
PolygonSelectionTag |
VARIATIONSHADER_SEED_MODE_POLYGON_UV_TILES |
UVTiles |
|
VARIATIONSHADER_POLYGON_STEP |
PolygonStep |
REAL
|
MIN |
|
VARIATIONSHADER_PROBABILITY |
Probability |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MAX |
100.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_MASK |
GlobalMask |
SHADERLINK
|
|
|
VARIATIONSHADER_ADD |
Add |
BUTTON
|
|
|
VARIATIONSHADER_CLEAR |
Clear |
BUTTON
|
|
|
VARIATIONSHADER_ADDFOLDER |
AddfromFolder |
BUTTON
|
|
|
VARIATIONSHADER_NORMALIZE |
NormalizeDistribution |
BUTTON
|
|
|
VARIATIONSHADER_DISTRIBUTE_EVENLY |
DistributeEvenly |
BUTTON
|
|
|
VARIATIONSHADER_SECONDARY_TEXTURE |
SecondaryTexture |
SHADERLINK
|
|
|
VARIATIONSHADER_SECONDARY_TEXTURE_BLEND |
SecondaryTextureBlend |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_SECONDARY_TEXTURE_MODE |
SecondaryTextureMode |
LONG
|
|
VARIATIONSHADER_BLENDMODE_NORMAL |
Normal |
VARIATIONSHADER_BLENDMODE_REPLACE |
Replace |
VARIATIONSHADER_BLENDMODE_AVERAGE |
Average |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LIGHTEN |
Lighten |
VARIATIONSHADER_BLENDMODE_ADD |
Add |
VARIATIONSHADER_BLENDMODE_SCREEN |
Screen |
VARIATIONSHADER_BLENDMODE_COLORDODGE |
Dodge |
VARIATIONSHADER_BLENDMODE_LINEARDODGE |
LinearDodge |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DARKEN |
Darken |
VARIATIONSHADER_BLENDMODE_SUBTRACT |
Subtract |
VARIATIONSHADER_BLENDMODE_MULTIPLY |
Multiply |
VARIATIONSHADER_BLENDMODE_COLORBURN |
Burn |
VARIATIONSHADER_BLENDMODE_LINEARBURN |
LinearBurn |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_OVERLAY |
Overlay |
VARIATIONSHADER_BLENDMODE_SOFTLIGHT |
SoftLight |
VARIATIONSHADER_BLENDMODE_HARDLIGHT |
HardLight |
VARIATIONSHADER_BLENDMODE_LINEARLIGHT |
LinearLight |
VARIATIONSHADER_BLENDMODE_VIVIDLIGHT |
VividLight |
VARIATIONSHADER_BLENDMODE_PINLIGHT |
PinLight |
VARIATIONSHADER_BLENDMODE_HARDMIX |
HardMix |
VARIATIONSHADER_BLENDMODE_REFLECT |
Reflect |
VARIATIONSHADER_BLENDMODE_GLOW |
Glow |
VARIATIONSHADER_BLENDMODE_PHOENIX |
Phoenix |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DIFFERENCE |
Difference |
VARIATIONSHADER_BLENDMODE_NEGATION |
Invert |
VARIATIONSHADER_BLENDMODE_EXCLUSION |
Exclusion |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LEVR |
Levr |
VARIATIONSHADER_BLENDMODE_COLOR |
Color |
VARIATIONSHADER_BLENDMODE_COLOR_INV |
ColorInverse |
|
VARIATIONSHADER_GRADIENT |
Gradient |
GRADIENT
|
|
|
VARIATIONSHADER_GRADIENT_BLEND |
GradientBlend |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_GRADIENT_MODE |
GradientMode |
LONG
|
|
VARIATIONSHADER_BLENDMODE_NORMAL |
Normal |
VARIATIONSHADER_BLENDMODE_REPLACE |
Replace |
VARIATIONSHADER_BLENDMODE_AVERAGE |
Average |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LIGHTEN |
Lighten |
VARIATIONSHADER_BLENDMODE_ADD |
Add |
VARIATIONSHADER_BLENDMODE_SCREEN |
Screen |
VARIATIONSHADER_BLENDMODE_COLORDODGE |
Dodge |
VARIATIONSHADER_BLENDMODE_LINEARDODGE |
LinearDodge |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DARKEN |
Darken |
VARIATIONSHADER_BLENDMODE_SUBTRACT |
Subtract |
VARIATIONSHADER_BLENDMODE_MULTIPLY |
Multiply |
VARIATIONSHADER_BLENDMODE_COLORBURN |
Burn |
VARIATIONSHADER_BLENDMODE_LINEARBURN |
LinearBurn |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_OVERLAY |
Overlay |
VARIATIONSHADER_BLENDMODE_SOFTLIGHT |
SoftLight |
VARIATIONSHADER_BLENDMODE_HARDLIGHT |
HardLight |
VARIATIONSHADER_BLENDMODE_LINEARLIGHT |
LinearLight |
VARIATIONSHADER_BLENDMODE_VIVIDLIGHT |
VividLight |
VARIATIONSHADER_BLENDMODE_PINLIGHT |
PinLight |
VARIATIONSHADER_BLENDMODE_HARDMIX |
HardMix |
VARIATIONSHADER_BLENDMODE_REFLECT |
Reflect |
VARIATIONSHADER_BLENDMODE_GLOW |
Glow |
VARIATIONSHADER_BLENDMODE_PHOENIX |
Phoenix |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DIFFERENCE |
Difference |
VARIATIONSHADER_BLENDMODE_NEGATION |
Invert |
VARIATIONSHADER_BLENDMODE_EXCLUSION |
Exclusion |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LEVR |
Levr |
VARIATIONSHADER_BLENDMODE_COLOR |
Color |
VARIATIONSHADER_BLENDMODE_COLOR_INV |
ColorInverse |
|
VARIATIONSHADER_RANDOMCOLOROFFSET |
RandomColor |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_RANDOMCOLOR_MODE |
RandomColorMode |
LONG
|
|
VARIATIONSHADER_BLENDMODE_NORMAL |
Normal |
VARIATIONSHADER_BLENDMODE_REPLACE |
Replace |
VARIATIONSHADER_BLENDMODE_AVERAGE |
Average |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LIGHTEN |
Lighten |
VARIATIONSHADER_BLENDMODE_ADD |
Add |
VARIATIONSHADER_BLENDMODE_SCREEN |
Screen |
VARIATIONSHADER_BLENDMODE_COLORDODGE |
Dodge |
VARIATIONSHADER_BLENDMODE_LINEARDODGE |
LinearDodge |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DARKEN |
Darken |
VARIATIONSHADER_BLENDMODE_SUBTRACT |
Subtract |
VARIATIONSHADER_BLENDMODE_MULTIPLY |
Multiply |
VARIATIONSHADER_BLENDMODE_COLORBURN |
Burn |
VARIATIONSHADER_BLENDMODE_LINEARBURN |
LinearBurn |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_OVERLAY |
Overlay |
VARIATIONSHADER_BLENDMODE_SOFTLIGHT |
SoftLight |
VARIATIONSHADER_BLENDMODE_HARDLIGHT |
HardLight |
VARIATIONSHADER_BLENDMODE_LINEARLIGHT |
LinearLight |
VARIATIONSHADER_BLENDMODE_VIVIDLIGHT |
VividLight |
VARIATIONSHADER_BLENDMODE_PINLIGHT |
PinLight |
VARIATIONSHADER_BLENDMODE_HARDMIX |
HardMix |
VARIATIONSHADER_BLENDMODE_REFLECT |
Reflect |
VARIATIONSHADER_BLENDMODE_GLOW |
Glow |
VARIATIONSHADER_BLENDMODE_PHOENIX |
Phoenix |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_DIFFERENCE |
Difference |
VARIATIONSHADER_BLENDMODE_NEGATION |
Invert |
VARIATIONSHADER_BLENDMODE_EXCLUSION |
Exclusion |
VARIATIONSHADER_BLENDMODE_SEP |
|
VARIATIONSHADER_BLENDMODE_LEVR |
Levr |
VARIATIONSHADER_BLENDMODE_COLOR |
Color |
VARIATIONSHADER_BLENDMODE_COLOR_INV |
ColorInverse |
|
VARIATIONSHADER_CONTRASTOFFSET |
Contrast |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_GAMMAOFFSET |
Gamma |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_INVERTOFFSET |
Invert |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_HUEOFFSET |
Hue |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_SATURATIONOFFSET |
Saturation |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_LIGHTNESSOFFSET |
Lightness |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_UVW_SHIFT |
UVWShift |
VECTOR
|
STEP |
|
VARIATIONSHADER_UVW_FLIP_X |
UVWFlipX |
BOOL
|
|
|
VARIATIONSHADER_UVW_FLIP_Y |
UVWFlipY |
BOOL
|
|
|
VARIATIONSHADER_UVW_TILE_OFFSET_X |
UVWTileOffsetX |
REAL
|
UNIT |
PERCENT |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_UVW_TILE_OFFSET_Y |
UVWTileOffsetY |
REAL
|
UNIT |
PERCENT |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_UVW_ROTATE |
UVWRotate |
REAL
|
UNIT |
PERCENT |
MIN |
0.0 |
MINSLIDER |
0 |
MAXSLIDER |
100 |
CUSTOMGUI |
REALSLIDER |
|
|
VARIATIONSHADER_UVW_ROTATE_QUANTIZE_GROUP |
UVWQuantizeRotation |
LONG
|
|
VARIATIONSHADER_UVW_ROTATE_QUANTIZE_0 |
0Degrees |
VARIATIONSHADER_UVW_ROTATE_QUANTIZE_45 |
45Degrees |
VARIATIONSHADER_UVW_ROTATE_QUANTIZE_90 |
90Degrees |
VARIATIONSHADER_UVW_ROTATE_QUANTIZE_180 |
180Degrees |
|
VARIATIONSHADER_UVW_SCALE |
UVWScale |
VECTOR
|
STEP |
|
VARIATIONSHADER_CLIPONE |
ClampOne |
BOOL
|
|
|
Example Code
The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown.
This code is just to show you how to access the values for getting and setting the parameters.
Python
import c4d
from c4d import gui
def main():
shader = c4d.BaseShader(c4d.Xvariation)
#You can set parameters two different ways.
#First way
shader[c4d.VARIATIONSHADER_SEED] = 0.1
shader[c4d.VARIATIONSHADER_SEED_MODE_OBJECT_CAT] = c4d.VARIATIONSHADER_SEED_MODE_OBJECT_OFF
shader[c4d.VARIATIONSHADER_SEED_MODE_POLYGON_CAT] = c4d.VARIATIONSHADER_SEED_MODE_POLYGON_OFF
shader[c4d.VARIATIONSHADER_POLYGON_STEP] = 0.1
shader[c4d.VARIATIONSHADER_PROBABILITY] = 0.1
shader[c4d.VARIATIONSHADER_SECONDARY_TEXTURE_BLEND] = 0.1
shader[c4d.VARIATIONSHADER_SECONDARY_TEXTURE_MODE] = c4d.VARIATIONSHADER_BLENDMODE_NORMAL
shader[c4d.VARIATIONSHADER_GRADIENT_BLEND] = 0.1
shader[c4d.VARIATIONSHADER_GRADIENT_MODE] = c4d.VARIATIONSHADER_BLENDMODE_NORMAL
shader[c4d.VARIATIONSHADER_RANDOMCOLOROFFSET] = 0.1
shader[c4d.VARIATIONSHADER_RANDOMCOLOR_MODE] = c4d.VARIATIONSHADER_BLENDMODE_NORMAL
shader[c4d.VARIATIONSHADER_CONTRASTOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_GAMMAOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_INVERTOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_HUEOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_SATURATIONOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_LIGHTNESSOFFSET] = 0.1
shader[c4d.VARIATIONSHADER_UVW_SHIFT] = c4d.Vector(1.0,1.0,1.0)
shader[c4d.VARIATIONSHADER_UVW_FLIP_X] = True
shader[c4d.VARIATIONSHADER_UVW_FLIP_Y] = True
shader[c4d.VARIATIONSHADER_UVW_TILE_OFFSET_X] = 0.1
shader[c4d.VARIATIONSHADER_UVW_TILE_OFFSET_Y] = 0.1
shader[c4d.VARIATIONSHADER_UVW_ROTATE] = 0.1
shader[c4d.VARIATIONSHADER_UVW_ROTATE_QUANTIZE_GROUP] = c4d.VARIATIONSHADER_UVW_ROTATE_QUANTIZE_0
shader[c4d.VARIATIONSHADER_UVW_SCALE] = c4d.Vector(1.0,1.0,1.0)
shader[c4d.VARIATIONSHADER_CLIPONE] = True
#Second way, using the base container.
bc = shader.GetDataInstance()
bc.SetFloat(c4d.VARIATIONSHADER_SEED,0.1)
bc.SetInt32(c4d.VARIATIONSHADER_SEED_MODE_OBJECT_CAT,c4d.VARIATIONSHADER_SEED_MODE_OBJECT_OFF)
bc.SetInt32(c4d.VARIATIONSHADER_SEED_MODE_POLYGON_CAT,c4d.VARIATIONSHADER_SEED_MODE_POLYGON_OFF)
bc.SetFloat(c4d.VARIATIONSHADER_POLYGON_STEP,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_PROBABILITY,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_SECONDARY_TEXTURE_BLEND,0.1)
bc.SetInt32(c4d.VARIATIONSHADER_SECONDARY_TEXTURE_MODE,c4d.VARIATIONSHADER_BLENDMODE_NORMAL)
bc.SetFloat(c4d.VARIATIONSHADER_GRADIENT_BLEND,0.1)
bc.SetInt32(c4d.VARIATIONSHADER_GRADIENT_MODE,c4d.VARIATIONSHADER_BLENDMODE_NORMAL)
bc.SetFloat(c4d.VARIATIONSHADER_RANDOMCOLOROFFSET,0.1)
bc.SetInt32(c4d.VARIATIONSHADER_RANDOMCOLOR_MODE,c4d.VARIATIONSHADER_BLENDMODE_NORMAL)
bc.SetFloat(c4d.VARIATIONSHADER_CONTRASTOFFSET,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_GAMMAOFFSET,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_INVERTOFFSET,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_HUEOFFSET,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_SATURATIONOFFSET,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_LIGHTNESSOFFSET,0.1)
bc.SetVector(c4d.VARIATIONSHADER_UVW_SHIFT, c4d.Vector(1.0,1.0,1.0)
bc.SetBool(c4d.VARIATIONSHADER_UVW_FLIP_X,True)
bc.SetBool(c4d.VARIATIONSHADER_UVW_FLIP_Y,True)
bc.SetFloat(c4d.VARIATIONSHADER_UVW_TILE_OFFSET_X,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_UVW_TILE_OFFSET_Y,0.1)
bc.SetFloat(c4d.VARIATIONSHADER_UVW_ROTATE,0.1)
bc.SetInt32(c4d.VARIATIONSHADER_UVW_ROTATE_QUANTIZE_GROUP,c4d.VARIATIONSHADER_UVW_ROTATE_QUANTIZE_0)
bc.SetVector(c4d.VARIATIONSHADER_UVW_SCALE, c4d.Vector(1.0,1.0,1.0)
bc.SetBool(c4d.VARIATIONSHADER_CLIPONE,True)
if __name__=='__main__':
main()
C++
#include "c4d.h"
#include "../shader/description/xvariation.h"
void SampleFunction()
{
BaseDocument *pDoc = GetActiveDocument();
BaseShader *pShader = BaseShader::Alloc(Xvariation);
//You can set parameters two different ways.
//First way
//Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead.
DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
pShader->SetParameter(DescID(VARIATIONSHADER_SEED),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_SEED_MODE_OBJECT_CAT),GeData(VARIATIONSHADER_SEED_MODE_OBJECT_OFF),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_SEED_MODE_POLYGON_CAT),GeData(VARIATIONSHADER_SEED_MODE_POLYGON_OFF),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_POLYGON_STEP),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_PROBABILITY),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_SECONDARY_TEXTURE_BLEND),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_SECONDARY_TEXTURE_MODE),GeData(VARIATIONSHADER_BLENDMODE_NORMAL),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_GRADIENT_BLEND),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_GRADIENT_MODE),GeData(VARIATIONSHADER_BLENDMODE_NORMAL),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_RANDOMCOLOROFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_RANDOMCOLOR_MODE),GeData(VARIATIONSHADER_BLENDMODE_NORMAL),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_CONTRASTOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_GAMMAOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_INVERTOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_HUEOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_SATURATIONOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_LIGHTNESSOFFSET),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_SHIFT),GeData(Vector(1.0,1.0,1.0)),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_FLIP_X),GeData(true),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_FLIP_Y),GeData(true),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_TILE_OFFSET_X),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_TILE_OFFSET_Y),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_ROTATE),GeData(0.1),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_ROTATE_QUANTIZE_GROUP),GeData(VARIATIONSHADER_UVW_ROTATE_QUANTIZE_0),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_UVW_SCALE),GeData(Vector(1.0,1.0,1.0)),flags);
pShader->SetParameter(DescID(VARIATIONSHADER_CLIPONE),GeData(true),flags);
pShader->Message(MSG_UPDATE);
//Second way, using the base container.
BaseContainer *bc = pShader->GetDataInstance();
bc->SetFloat(VARIATIONSHADER_SEED,0.1);
bc->SetInt32(VARIATIONSHADER_SEED_MODE_OBJECT_CAT,VARIATIONSHADER_SEED_MODE_OBJECT_OFF);
bc->SetInt32(VARIATIONSHADER_SEED_MODE_POLYGON_CAT,VARIATIONSHADER_SEED_MODE_POLYGON_OFF);
bc->SetFloat(VARIATIONSHADER_POLYGON_STEP,0.1);
bc->SetFloat(VARIATIONSHADER_PROBABILITY,0.1);
bc->SetFloat(VARIATIONSHADER_SECONDARY_TEXTURE_BLEND,0.1);
bc->SetInt32(VARIATIONSHADER_SECONDARY_TEXTURE_MODE,VARIATIONSHADER_BLENDMODE_NORMAL);
bc->SetFloat(VARIATIONSHADER_GRADIENT_BLEND,0.1);
bc->SetInt32(VARIATIONSHADER_GRADIENT_MODE,VARIATIONSHADER_BLENDMODE_NORMAL);
bc->SetFloat(VARIATIONSHADER_RANDOMCOLOROFFSET,0.1);
bc->SetInt32(VARIATIONSHADER_RANDOMCOLOR_MODE,VARIATIONSHADER_BLENDMODE_NORMAL);
bc->SetFloat(VARIATIONSHADER_CONTRASTOFFSET,0.1);
bc->SetFloat(VARIATIONSHADER_GAMMAOFFSET,0.1);
bc->SetFloat(VARIATIONSHADER_INVERTOFFSET,0.1);
bc->SetFloat(VARIATIONSHADER_HUEOFFSET,0.1);
bc->SetFloat(VARIATIONSHADER_SATURATIONOFFSET,0.1);
bc->SetFloat(VARIATIONSHADER_LIGHTNESSOFFSET,0.1);
bc->SetVector(VARIATIONSHADER_UVW_SHIFT, c4d.Vector(1.0,1.0,1.0);
bc->SetBool(VARIATIONSHADER_UVW_FLIP_X,true);
bc->SetBool(VARIATIONSHADER_UVW_FLIP_Y,true);
bc->SetFloat(VARIATIONSHADER_UVW_TILE_OFFSET_X,0.1);
bc->SetFloat(VARIATIONSHADER_UVW_TILE_OFFSET_Y,0.1);
bc->SetFloat(VARIATIONSHADER_UVW_ROTATE,0.1);
bc->SetInt32(VARIATIONSHADER_UVW_ROTATE_QUANTIZE_GROUP,VARIATIONSHADER_UVW_ROTATE_QUANTIZE_0);
bc->SetVector(VARIATIONSHADER_UVW_SCALE, c4d.Vector(1.0,1.0,1.0);
bc->SetBool(VARIATIONSHADER_CLIPONE,true);
pShader->Message(MSG_UPDATE);
}
Buttons
This node has buttons. Buttons can manually be executed by calling the following code
Python
c4d.CallButton(shader,c4d.VARIATIONSHADER_ADD)
c4d.CallButton(shader,c4d.VARIATIONSHADER_CLEAR)
c4d.CallButton(shader,c4d.VARIATIONSHADER_ADDFOLDER)
c4d.CallButton(shader,c4d.VARIATIONSHADER_NORMALIZE)
c4d.CallButton(shader,c4d.VARIATIONSHADER_DISTRIBUTE_EVENLY)
C++
DescriptionCommand dc;
dc.id = DescID(VARIATIONSHADER_ADD);
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(VARIATIONSHADER_CLEAR);
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(VARIATIONSHADER_ADDFOLDER);
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(VARIATIONSHADER_NORMALIZE);
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(VARIATIONSHADER_DISTRIBUTE_EVENLY);
pShader->Message(MSG_DESCRIPTION_COMMAND, &dc);
Gradients
This node has gradients. Gradients can manually be edited by calling the following code
Python
C++
#include "customgui_gradient.h"
VARIATIONSHADER_GRADIENT
GeData data;
pShader->GetParameter(DescID(VARIATIONSHADER_GRADIENT),data,DESCFLAGS_GET_PARAM_GET));
Gradient *pGradient = (Gradient*)data.GetCustomDataType(CUSTOMDATATYPE_GRADIENT);
if(pGradient)
{
//must be set before any knot is set
pGradient->SetData(GRADIENT_MODE, GeData(GRADIENTMODE_ALPHA));
GradientKnot k1, k2;
k1.col = Vector(0.0, 0.0, 1.0);
k1.pos = 0.0;
k2.col = 1.0;
k2.pos = 1.0;
pGradient->InsertKnot(k1);
pGradient->InsertKnot(k2);
}
pShader->SetParameter(DescID(VARIATIONSHADER_GRADIENT),data,DESCFLAGS_SET_PARAM_SET));