diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 10:46:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 10:46:07 +0400 |
commit | 11a7a406fb799843bc016e515d81a1c93d6d152e (patch) | |
tree | bd7363bad7fafca8fa417c4148d4c7e104ed9eda /source/blender/blenkernel | |
parent | f4745763514a51bf841fc2c344d62242bdc297da (diff) |
DPAINT_OT_output_toggle operator was using an index option for what was really a toggle between 2 values, changed its index option to an enum.
if a value other than 1/0 was given it would use an uninitialized pointer too (compiler warning, review should pick up this stuff).
also renamed some RNA attrs:
output_name --> output_name_a
output_name2 --> output_name_b
do_output1 --> use_output_a
do_output2 --> use_output_b
do_smudge --> use_smudge
max_velocity --> velocity_max
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_dynamicpaint.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index d7e0f8bdaae..a4a810ba177 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -64,7 +64,7 @@ void dynamicPaint_freeSurfaceData(struct DynamicPaintSurface *surface); void dynamicPaint_cacheUpdateFrames(struct DynamicPaintSurface *surface); int dynamicPaint_surfaceHasColorPreview(struct DynamicPaintSurface *surface); -int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int index); +int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, struct Object *ob, int output); void dynamicPaintSurface_updateType(struct DynamicPaintSurface *surface); void dynamicPaintSurface_setUniqueName(struct DynamicPaintSurface *surface, const char *basename); void dynamicPaint_resetPreview(struct DynamicPaintCanvasSettings *canvas); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index ebbe57a6f81..5066b558c5a 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -279,13 +279,13 @@ static void dynamicPaint_setPreview(DynamicPaintSurface *t_surface) } } -int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, Object *ob, int index) +int dynamicPaint_outputLayerExists(struct DynamicPaintSurface *surface, Object *ob, int output) { char *name; - if (index == 0) + if (output == 0) name = surface->output_name; - else if (index == 1) + else if (output == 1) name = surface->output_name2; else return 0; |