Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_channels_defines.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| * - Even if we can draw sliders for this view, we must also check that the channel-type | * - Even if we can draw sliders for this view, we must also check that the channel-type | ||||
| * supports them (only only F-Curves really can support them for now). | * supports them (only only F-Curves really can support them for now). | ||||
| * - To make things easier, we use RNA-autobuts for this so that changes are | * - To make things easier, we use RNA-autobuts for this so that changes are | ||||
| * reflected immediately, wherever they occurred. | * reflected immediately, wherever they occurred. | ||||
| * BUT, we don't use the layout engine, otherwise we'd get wrong alignment, | * BUT, we don't use the layout engine, otherwise we'd get wrong alignment, | ||||
| * and wouldn't be able to auto-keyframe. | * and wouldn't be able to auto-keyframe. | ||||
| * - Slider should start before the toggles (if they're visible) | * - Slider should start before the toggles (if they're visible) | ||||
| * to keep a clean line down the side. | * to keep a clean line down the side. | ||||
| * - Sliders are always drawn in Shapekey mode now. Prior to this | |||||
| * the SACTION_SLIDERS flag would be set when changing into Shapekey mode. | |||||
| */ | */ | ||||
| if ((draw_sliders) && | if (((draw_sliders) | ||||
sybren: Although I agree with the removal of the superfluous parentheses, it's better to not do that in… | |||||
| ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY, ANIMTYPE_GPLAYER)) { | && ELEM(ale->type, ANIMTYPE_FCURVE, ANIMTYPE_NLACURVE, ANIMTYPE_SHAPEKEY, ANIMTYPE_GPLAYER)) | ||||
| || ale->type == ANIMTYPE_SHAPEKEY) { | |||||
Done Inline ActionsCombining && and || is ambiguous, and requires parentheses. sybren: Combining `&&` and `||` is ambiguous, and requires parentheses. | |||||
| /* adjust offset */ | /* adjust offset */ | ||||
| /* TODO: make slider width dynamic, | /* TODO: make slider width dynamic, | ||||
| * so that they can be easier to use when the view is wide enough. */ | * so that they can be easier to use when the view is wide enough. */ | ||||
| offset -= SLIDER_WIDTH; | offset -= SLIDER_WIDTH; | ||||
| /* need backdrop behind sliders... */ | /* need backdrop behind sliders... */ | ||||
| UI_block_emboss_set(block, UI_EMBOSS); | UI_block_emboss_set(block, UI_EMBOSS); | ||||
| ▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines | |||||
Although I agree with the removal of the superfluous parentheses, it's better to not do that in this patch. Cleanups, refactors, and other non-functional changes have to be committed separately from functional changes. Generally such cleanups are much easier to approve & land in master, and when that's done, the patch with functional changes will be smaller and thus easier to review as well.