Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_buttons/space_buttons.c
| Show First 20 Lines • Show All 407 Lines • ▼ Show 20 Lines | case NC_OBJECT: | ||||
| buttons_area_redraw(area, BCONTEXT_BONE); | buttons_area_redraw(area, BCONTEXT_BONE); | ||||
| buttons_area_redraw(area, BCONTEXT_BONE_CONSTRAINT); | buttons_area_redraw(area, BCONTEXT_BONE_CONSTRAINT); | ||||
| buttons_area_redraw(area, BCONTEXT_DATA); | buttons_area_redraw(area, BCONTEXT_DATA); | ||||
| break; | break; | ||||
| case ND_MODIFIER: | case ND_MODIFIER: | ||||
| if (wmn->action == NA_RENAME) { | if (wmn->action == NA_RENAME) { | ||||
| ED_area_tag_redraw(area); | ED_area_tag_redraw(area); | ||||
| } | } | ||||
| else { | else { | ||||
| buttons_area_redraw(area, BCONTEXT_MODIFIER); | buttons_area_redraw(area, BCONTEXT_MODIFIER); | ||||
| } | } | ||||
Severin: Wouldn't just adding this be an alternative fix?
Did you try that?
I think it's fine to… | |||||
Done Inline ActionsYeah, I think it makes more sense to keep them decoupled. We can avoid some updates like that, and more that I didn't catch that you mentioned below. I'll note it in the commit. HooglyBoogly: Yeah, I think it makes more sense to keep them decoupled. We can avoid some updates like that… | |||||
| buttons_area_redraw(area, BCONTEXT_PHYSICS); | buttons_area_redraw(area, BCONTEXT_PHYSICS); | ||||
| break; | break; | ||||
| case ND_CONSTRAINT: | case ND_CONSTRAINT: | ||||
| buttons_area_redraw(area, BCONTEXT_CONSTRAINT); | buttons_area_redraw(area, BCONTEXT_CONSTRAINT); | ||||
| buttons_area_redraw(area, BCONTEXT_BONE_CONSTRAINT); | buttons_area_redraw(area, BCONTEXT_BONE_CONSTRAINT); | ||||
| break; | break; | ||||
| case ND_SHADERFX: | |||||
| buttons_area_redraw(area, BCONTEXT_SHADERFX); | |||||
| break; | |||||
Done Inline ActionsFunction call is duplicated. Severin: Function call is duplicated. | |||||
| case ND_PARTICLE: | case ND_PARTICLE: | ||||
| if (wmn->action == NA_EDITED) { | if (wmn->action == NA_EDITED) { | ||||
| buttons_area_redraw(area, BCONTEXT_PARTICLE); | buttons_area_redraw(area, BCONTEXT_PARTICLE); | ||||
| } | } | ||||
| sbuts->preview = 1; | sbuts->preview = 1; | ||||
| break; | break; | ||||
| case ND_DRAW: | case ND_DRAW: | ||||
| buttons_area_redraw(area, BCONTEXT_OBJECT); | buttons_area_redraw(area, BCONTEXT_OBJECT); | ||||
| buttons_area_redraw(area, BCONTEXT_DATA); | buttons_area_redraw(area, BCONTEXT_DATA); | ||||
| buttons_area_redraw(area, BCONTEXT_PHYSICS); | buttons_area_redraw(area, BCONTEXT_PHYSICS); | ||||
| /* Needed to refresh context path when changing active particle system index. */ | /* Needed to refresh context path when changing active particle system index. */ | ||||
| buttons_area_redraw(area, BCONTEXT_PARTICLE); | buttons_area_redraw(area, BCONTEXT_PARTICLE); | ||||
| break; | break; | ||||
| case ND_SHADING: | |||||
| case ND_SHADING_DRAW: | |||||
| case ND_SHADING_LINKS: | |||||
| case ND_SHADING_PREVIEW: | |||||
| /* currently works by redraws... if preview is set, it (re)starts job */ | |||||
| sbuts->preview = 1; | |||||
| break; | |||||
| default: | default: | ||||
| /* Not all object RNA props have a ND_ notifier (yet) */ | /* Not all object RNA props have a ND_ notifier (yet) */ | ||||
| ED_area_tag_redraw(area); | ED_area_tag_redraw(area); | ||||
| break; | break; | ||||
| } | } | ||||
| break; | break; | ||||
| case NC_GEOM: | case NC_GEOM: | ||||
| switch (wmn->data) { | switch (wmn->data) { | ||||
| ▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines | |||||
Wouldn't just adding this be an alternative fix?
Did you try that?
I think it's fine to decouple notifers though. Allows more fine-tuned updates and it's easier to reason about things. So adding a SHADERFX notifier type is fine with me too. But if this simple fix is possible, you should at least mention why you didn't choose it in the commit message.