diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/shader_fx/intern/FX_shader_light.c | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/shader_fx/intern/FX_shader_light.c')
-rw-r--r-- | source/blender/shader_fx/intern/FX_shader_light.c | 65 |
1 files changed, 33 insertions, 32 deletions
diff --git a/source/blender/shader_fx/intern/FX_shader_light.c b/source/blender/shader_fx/intern/FX_shader_light.c index d4c726a63db..d3d5b9b69cb 100644 --- a/source/blender/shader_fx/intern/FX_shader_light.c +++ b/source/blender/shader_fx/intern/FX_shader_light.c @@ -40,56 +40,57 @@ static void initData(ShaderFxData *fx) { - LightShaderFxData *gpfx = (LightShaderFxData *)fx; - gpfx->energy = 10.0f; - gpfx->ambient = 5.0f; - gpfx->object = NULL; + LightShaderFxData *gpfx = (LightShaderFxData *)fx; + gpfx->energy = 10.0f; + gpfx->ambient = 5.0f; + gpfx->object = NULL; } static void copyData(const ShaderFxData *md, ShaderFxData *target) { - BKE_shaderfx_copyData_generic(md, target); + BKE_shaderfx_copyData_generic(md, target); } static void updateDepsgraph(ShaderFxData *md, const ModifierUpdateDepsgraphContext *ctx) { - LightShaderFxData *fxd = (LightShaderFxData *)md; - if (fxd->object != NULL) { - DEG_add_object_relation(ctx->node, fxd->object, DEG_OB_COMP_TRANSFORM, "Light ShaderFx"); - } - DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "Light ShaderFx"); + LightShaderFxData *fxd = (LightShaderFxData *)md; + if (fxd->object != NULL) { + DEG_add_object_relation(ctx->node, fxd->object, DEG_OB_COMP_TRANSFORM, "Light ShaderFx"); + } + DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "Light ShaderFx"); } static bool isDisabled(ShaderFxData *fx, int UNUSED(userRenderParams)) { - LightShaderFxData *fxd = (LightShaderFxData *)fx; + LightShaderFxData *fxd = (LightShaderFxData *)fx; - return !fxd->object; + return !fxd->object; } -static void foreachObjectLink( - ShaderFxData *fx, Object *ob, - ShaderFxObjectWalkFunc walk, void *userData) +static void foreachObjectLink(ShaderFxData *fx, + Object *ob, + ShaderFxObjectWalkFunc walk, + void *userData) { - LightShaderFxData *fxd = (LightShaderFxData *)fx; + LightShaderFxData *fxd = (LightShaderFxData *)fx; - walk(userData, ob, &fxd->object, IDWALK_CB_NOP); + walk(userData, ob, &fxd->object, IDWALK_CB_NOP); } ShaderFxTypeInfo shaderfx_Type_Light = { - /* name */ "Light", - /* structName */ "LightShaderFxData", - /* structSize */ sizeof(LightShaderFxData), - /* type */ eShaderFxType_GpencilType, - /* flags */ 0, - - /* copyData */ copyData, - - /* initData */ initData, - /* freeData */ NULL, - /* isDisabled */ isDisabled, - /* updateDepsgraph */ updateDepsgraph, - /* dependsOnTime */ NULL, - /* foreachObjectLink */ foreachObjectLink, - /* foreachIDLink */ NULL, + /* name */ "Light", + /* structName */ "LightShaderFxData", + /* structSize */ sizeof(LightShaderFxData), + /* type */ eShaderFxType_GpencilType, + /* flags */ 0, + + /* copyData */ copyData, + + /* initData */ initData, + /* freeData */ NULL, + /* isDisabled */ isDisabled, + /* updateDepsgraph */ updateDepsgraph, + /* dependsOnTime */ NULL, + /* foreachObjectLink */ foreachObjectLink, + /* foreachIDLink */ NULL, }; |