Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_modifier_types.h
| Context not available. | |||||
| eModifierType_CorrectiveSmooth = 51, | eModifierType_CorrectiveSmooth = 51, | ||||
| eModifierType_MeshSequenceCache = 52, | eModifierType_MeshSequenceCache = 52, | ||||
| eModifierType_SurfaceDeform = 53, | eModifierType_SurfaceDeform = 53, | ||||
| eModifierType_GpencilNoise = 54, | |||||
sergey: GP modifiers seems to have completely own stack implementation, so i don't think it's… | |||||
| eModifierType_GpencilSubdiv = 55, | |||||
| eModifierType_GpencilThick = 56, | |||||
| eModifierType_GpencilTint = 57, | |||||
| eModifierType_GpencilArray = 58, | |||||
| eModifierType_GpencilBuild = 59, | |||||
| eModifierType_GpencilOpacity = 60, | |||||
| eModifierType_GpencilColor = 61, | |||||
| eModifierType_GpencilLattice = 62, | |||||
| eModifierType_GpencilSimplify = 63, | |||||
| eModifierType_GpencilBlur = 64, | |||||
| eModifierType_GpencilWave = 65, | |||||
| eModifierType_GpencilPixel = 66, | |||||
| eModifierType_GpencilSwirl = 67, | |||||
| eModifierType_GpencilSmooth = 68, | |||||
| eModifierType_GpencilHook = 69, | |||||
| eModifierType_GpencilFlip = 70, | |||||
| eModifierType_GpencilOffset = 71, | |||||
| eModifierType_GpencilLight = 72, | |||||
| NUM_MODIFIER_TYPES | NUM_MODIFIER_TYPES | ||||
| } ModifierType; | } ModifierType; | ||||
| Context not available. | |||||
| MOD_SDEF_MODE_CENTROID = 2, | MOD_SDEF_MODE_CENTROID = 2, | ||||
| }; | }; | ||||
| typedef struct GpencilNoiseModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* several flags */ | |||||
| float factor; /* factor of noise */ | |||||
| int step; /* how many frames before recalculate randoms */ | |||||
| int gp_frame; /* last gp frame used */ | |||||
| int scene_frame; /* last scene frame used */ | |||||
| float vrand1, vrand2; /* random values */ | |||||
| } GpencilNoiseModifierData; | |||||
| typedef enum eGpencilNoise_Flag { | |||||
| GP_NOISE_USE_RANDOM = (1 << 0), | |||||
| GP_NOISE_MOD_LOCATION = (1 << 1), | |||||
| GP_NOISE_MOD_STRENGTH = (1 << 2), | |||||
| GP_NOISE_MOD_THICKNESS = (1 << 3), | |||||
| GP_NOISE_FULL_STROKE = (1 << 4), | |||||
| GP_NOISE_MOVE_EXTREME = (1 << 5), | |||||
| GP_NOISE_INVERSE_LAYER = (1 << 6), | |||||
| GP_NOISE_INVERSE_PASS = (1 << 7), | |||||
| GP_NOISE_INVERSE_VGROUP = (1 << 8) | |||||
| } eGpencilNoise_Flag; | |||||
| typedef struct GpencilSubdivModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| int level; /* factor of subdivision */ | |||||
| char pad[4]; | |||||
| } GpencilSubdivModifierData; | |||||
| typedef enum eGpencilSubdiv_Flag { | |||||
| GP_SUBDIV_SIMPLE = (1 << 0), | |||||
| GP_SUBDIV_INVERSE_LAYER = (1 << 1), | |||||
| GP_SUBDIV_INVERSE_PASS = (1 << 2), | |||||
| } eGpencilSubdiv_Flag; | |||||
| typedef struct GpencilThickModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| int thickness; /* Thickness change */ | |||||
| char pad[4]; | |||||
| struct CurveMapping *cur_thickness; | |||||
| } GpencilThickModifierData; | |||||
| typedef enum eGpencilThick_Flag { | |||||
| GP_THICK_INVERSE_LAYER = (1 << 0), | |||||
| GP_THICK_INVERSE_PASS = (1 << 1), | |||||
| GP_THICK_INVERSE_VGROUP = (1 << 2), | |||||
| GP_THICK_CUSTOM_CURVE = (1 << 3), | |||||
| GP_THICK_NORMALIZE = (1 << 4), | |||||
| } eGpencilThick_Flag; | |||||
| typedef struct GpencilTintModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float rgb[3]; /* Tint color */ | |||||
| float factor; /* Mix factor */ | |||||
| } GpencilTintModifierData; | |||||
| typedef enum eGpencilTint_Flag { | |||||
| GP_TINT_CREATE_COLORS = (1 << 0), | |||||
| GP_TINT_INVERSE_LAYER = (1 << 1), | |||||
| GP_TINT_INVERSE_PASS = (1 << 2), | |||||
| } eGpencilTint_Flag; | |||||
| typedef struct GpencilColorModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float hsv[3]; /* hsv factors */ | |||||
| char pad[4]; | |||||
| } GpencilColorModifierData; | |||||
| typedef enum eGpencilColor_Flag { | |||||
| GP_COLOR_CREATE_COLORS = (1 << 0), | |||||
| GP_COLOR_INVERSE_LAYER = (1 << 1), | |||||
| GP_COLOR_INVERSE_PASS = (1 << 2), | |||||
| } eGpencilColor_Flag; | |||||
| typedef struct GpencilOpacityModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float factor; /* Main Opacity factor */ | |||||
| char pad[4]; | |||||
| } GpencilOpacityModifierData; | |||||
| typedef enum eGpencilOpacity_Flag { | |||||
| GP_OPACITY_INVERSE_LAYER = (1 << 0), | |||||
| GP_OPACITY_INVERSE_PASS = (1 << 1), | |||||
| GP_OPACITY_INVERSE_VGROUP = (1 << 2), | |||||
| } eGpencilOpacity_Flag; | |||||
| typedef struct GpencilArrayModifierData { | |||||
| ModifierData modifier; | |||||
| int count[3]; /* number of elements in array */ | |||||
| int flag; /* several flags */ | |||||
| float offset[3]; /* Location increments */ | |||||
| float shift[3]; /* shift increment */ | |||||
| float rnd_size; /* random size factor */ | |||||
| float rnd_rot; /* random size factor */ | |||||
| float rot[3]; /* Rotation changes */ | |||||
| float scale[3]; /* Scale changes */ | |||||
| float rnd[20]; /* (first element is the index) random values */ | |||||
| int lock_axis; /* lock shift to one axis */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| char layername[64]; /* layer name */ | |||||
| } GpencilArrayModifierData; | |||||
| typedef enum eGpencilArray_Flag { | |||||
| GP_ARRAY_RANDOM_SIZE = (1 << 0), | |||||
| GP_ARRAY_RANDOM_ROT = (1 << 1), | |||||
| GP_ARRAY_INVERSE_LAYER = (1 << 2), | |||||
| GP_ARRAY_INVERSE_PASS = (1 << 3), | |||||
| GP_ARRAY_MAKE_OBJECTS = (1 << 4), | |||||
| } eGpencilArray_Flag; | |||||
| typedef struct GpencilBuildModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* if set, restrict modifier to operating on this layer */ | |||||
| int pass_index; | |||||
| int pad; | |||||
| float start_frame; /* If GP_BUILD_RESTRICT_TIME is set, the defines the frame range where GP frames are considered */ | |||||
| float end_frame; | |||||
| float start_delay; /* For each pair of gp keys, number of frames before strokes start appearing */ | |||||
| float length; /* For each pair of gp keys, number of frames that build effect must be completed within */ | |||||
| short flag; /* (eGpencilBuild_Flag) Options for controlling modifier behaviour */ | |||||
| short mode; /* (eGpencilBuild_Mode) How are strokes ordered */ | |||||
| short transition; /* (eGpencilBuild_Transition) In what order do stroke points appear/disappear */ | |||||
| short time_alignment; /* (eGpencilBuild_TimeAlignment) For the "Concurrent" mode, when should "shorter" strips start/end */ | |||||
| } GpencilBuildModifierData; | |||||
| typedef enum eGpencilBuild_Mode { | |||||
| /* Strokes are shown one by one until all have appeared */ | |||||
| GP_BUILD_MODE_SEQUENTIAL = 0, | |||||
| /* All strokes start at the same time */ | |||||
Not Done Inline ActionsThis isn't really good to use the context in a modifier. Modifiers should be able to operate with their input arguments only. campbellbarton: This isn't really good to use the context in a modifier.
Modifiers should be able to operate… | |||||
| GP_BUILD_MODE_CONCURRENT = 1, | |||||
| } eGpencilBuild_Mode; | |||||
| typedef enum eGpencilBuild_Transition { | |||||
| /* Show in forward order */ | |||||
| GP_BUILD_TRANSITION_GROW = 0, | |||||
| /* Hide in reverse order */ | |||||
| GP_BUILD_TRANSITION_SHRINK = 1, | |||||
| /* Hide in forward order */ | |||||
| GP_BUILD_TRANSITION_FADE = 2, | |||||
| } eGpencilBuild_Transition; | |||||
| typedef enum eGpencilBuild_TimeAlignment { | |||||
| /* All strokes start at same time */ | |||||
| GP_BUILD_TIMEALIGN_START = 0, | |||||
| /* All strokes end at same time */ | |||||
| GP_BUILD_TIMEALIGN_END = 1, | |||||
| /* TODO: Random Offsets, Stretch-to-Fill */ | |||||
| } eGpencilBuild_TimeAlignment; | |||||
| typedef enum eGpencilBuild_Flag { | |||||
| /* Restrict modifier to particular layer/passes? */ | |||||
| GP_BUILD_INVERSE_LAYER = (1 << 0), | |||||
| GP_BUILD_INVERSE_PASS = (1 << 1), | |||||
| /* Restrict modifier to only operating between the nominated frames */ | |||||
| GP_BUILD_RESTRICT_TIME = (1 << 2), | |||||
| } eGpencilBuild_Flag; | |||||
| typedef struct GpencilLatticeModifierData { | |||||
| ModifierData modifier; | |||||
| struct Object *object; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float strength; | |||||
| char pad[4]; | |||||
| void *cache_data; /* runtime only (LatticeDeformData) */ | |||||
| } GpencilLatticeModifierData; | |||||
| typedef enum eGpencilLattice_Flag { | |||||
| GP_LATTICE_INVERSE_LAYER = (1 << 0), | |||||
| GP_LATTICE_INVERSE_PASS = (1 << 1), | |||||
| GP_LATTICE_INVERSE_VGROUP = (1 << 2), | |||||
| } eGpencilLattice_Flag; | |||||
| typedef struct GpencilHookModifierData { | |||||
| ModifierData modifier; | |||||
| struct Object *object; | |||||
| char subtarget[64]; /* optional name of bone target, MAX_ID_NAME-2 */ | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; | |||||
| char falloff_type; /* use enums from WarpModifier (exact same functionality) */ | |||||
| char pad[3]; | |||||
| float parentinv[4][4]; /* matrix making current transform unmodified */ | |||||
| float cent[3]; /* visualization of hook */ | |||||
| float falloff; /* if not zero, falloff is distance where influence zero */ | |||||
| float force; | |||||
| struct CurveMapping *curfalloff; | |||||
| } GpencilHookModifierData; | |||||
| typedef enum eGpencilHook_Flag { | |||||
| GP_HOOK_INVERSE_LAYER = (1 << 0), | |||||
| GP_HOOK_INVERSE_PASS = (1 << 1), | |||||
| GP_HOOK_INVERSE_VGROUP = (1 << 2), | |||||
| GP_HOOK_UNIFORM_SPACE = (1 << 3), | |||||
| } eGpencilHook_Flag; | |||||
| typedef enum eGpencilHook_Falloff { | |||||
| eGPHook_Falloff_None = 0, | |||||
| eGPHook_Falloff_Curve = 1, | |||||
| eGPHook_Falloff_Sharp = 2, | |||||
| eGPHook_Falloff_Smooth = 3, | |||||
| eGPHook_Falloff_Root = 4, | |||||
| eGPHook_Falloff_Linear = 5, | |||||
| eGPHook_Falloff_Const = 6, | |||||
| eGPHook_Falloff_Sphere = 7, | |||||
| eGPHook_Falloff_InvSquare = 8, | |||||
| } eGpencilHook_Falloff; | |||||
| typedef struct GpencilSimplifyModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float factor; /* factor of simplify */ | |||||
| short mode; /* type of simplify */ | |||||
| short step; /* every n vertex to keep */ | |||||
| } GpencilSimplifyModifierData; | |||||
| typedef enum eGpencilSimplify_Flag { | |||||
| GP_SIMPLIFY_INVERSE_LAYER = (1 << 0), | |||||
| GP_SIMPLIFY_INVERSE_PASS = (1 << 1), | |||||
| } eGpencilSimplify_Flag; | |||||
| typedef enum eGpencilSimplify_Mode { | |||||
| /* Keep only one vertex every n vertices */ | |||||
| GP_SIMPLIFY_FIXED = 0, | |||||
| /* Use RDP algorithm */ | |||||
| GP_SIMPLIFY_ADAPTATIVE = 1, | |||||
| } eGpencilSimplify_Mode; | |||||
| typedef struct GpencilOffsetModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* flags */ | |||||
| float loc[3]; | |||||
| float rot[3]; | |||||
| float scale[3]; | |||||
| char pad[4]; | |||||
| } GpencilOffsetModifierData; | |||||
| typedef enum eGpencilOffset_Flag { | |||||
| GP_OFFSET_INVERSE_LAYER = (1 << 0), | |||||
| GP_OFFSET_INVERSE_PASS = (1 << 1), | |||||
| GP_OFFSET_INVERSE_VGROUP = (1 << 2) | |||||
| } eGpencilOffset_Flag; | |||||
| typedef struct GpencilBlurModifierData { | |||||
| ModifierData modifier; | |||||
| int radius[2]; | |||||
| int flag; /* flags */ | |||||
| char pad[4]; | |||||
| } GpencilBlurModifierData; | |||||
| typedef struct GpencilWaveModifierData { | |||||
| ModifierData modifier; | |||||
| float amplitude; | |||||
| float period; | |||||
| float phase; | |||||
| int orientation; | |||||
| int flag; /* flags */ | |||||
| char pad[4]; | |||||
| } GpencilWaveModifierData; | |||||
| typedef struct GpencilPixelModifierData { | |||||
| ModifierData modifier; | |||||
| int size[2]; | |||||
| int flag; /* flags */ | |||||
| float rgba[4]; | |||||
| char pad[4]; | |||||
| } GpencilPixelModifierData; | |||||
| typedef enum eGpencilPixel_Flag { | |||||
| GP_PIXEL_USE_LINES = (1 << 0), | |||||
| } eGpencilPixel_Flag; | |||||
| typedef struct GpencilSwirlModifierData { | |||||
| ModifierData modifier; | |||||
| struct Object *object; | |||||
| int flag; /* flags */ | |||||
| int radius; | |||||
| float angle; | |||||
| char pad[4]; | |||||
| } GpencilSwirlModifierData; | |||||
| typedef enum eGpencilSwirl_Flag { | |||||
| GP_SWIRL_MAKE_TRANSPARENT = (1 << 0), | |||||
| } eGpencilSwirl_Flag; | |||||
| typedef struct GpencilFlipModifierData { | |||||
| ModifierData modifier; | |||||
| int flag; /* flags */ | |||||
| char pad[4]; | |||||
| } GpencilFlipModifierData; | |||||
| typedef enum eGpencilFlip_Flag { | |||||
| GP_FLIP_HORIZONTAL = (1 << 0), | |||||
| GP_FLIP_VERTICAL = (1 << 1), | |||||
| } eGpencilFlip_Flag; | |||||
| typedef struct GpencilLightModifierData { | |||||
| ModifierData modifier; | |||||
| struct Object *object; | |||||
| int flag; /* flags */ | |||||
| float energy; | |||||
| float ambient; | |||||
| char pad[4]; | |||||
| } GpencilLightModifierData; | |||||
| typedef struct GpencilSmoothModifierData { | |||||
| ModifierData modifier; | |||||
| char layername[64]; /* layer name */ | |||||
| char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ | |||||
| int pass_index; /* custom index for passes */ | |||||
| int flag; /* several flags */ | |||||
| float factor; /* factor of noise */ | |||||
| int step; /* how many times apply smooth */ | |||||
| } GpencilSmoothModifierData; | |||||
| typedef enum eGpencilSmooth_Flag { | |||||
| GP_SMOOTH_MOD_LOCATION = (1 << 0), | |||||
| GP_SMOOTH_MOD_STRENGTH = (1 << 1), | |||||
| GP_SMOOTH_MOD_THICKNESS = (1 << 2), | |||||
| GP_SMOOTH_INVERSE_LAYER = (1 << 3), | |||||
| GP_SMOOTH_INVERSE_PASS = (1 << 4), | |||||
| GP_SMOOTH_INVERSE_VGROUP = (1 << 5) | |||||
| } eGpencilSmooth_Flag; | |||||
| #define MOD_MESHSEQ_READ_ALL \ | #define MOD_MESHSEQ_READ_ALL \ | ||||
| (MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR) | (MOD_MESHSEQ_READ_VERT | MOD_MESHSEQ_READ_POLY | MOD_MESHSEQ_READ_UV | MOD_MESHSEQ_READ_COLOR) | ||||
| Context not available. | |||||
Not Done Inline Actionscurve_ prefix, elsewhere too. campbellbarton: `curve_` prefix, elsewhere too. | |||||
GP modifiers seems to have completely own stack implementation, so i don't think it's beneficial trying to re-use existing modifier flags / structures.