Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mask/mask_ops.c
| Show First 20 Lines • Show All 330 Lines • ▼ Show 20 Lines | switch (sa->spacetype) { | ||||
| { | { | ||||
| SpaceImage *sima = sa->spacedata.first; | SpaceImage *sima = sa->spacedata.first; | ||||
| ED_space_image_set_mask(C, sima, mask); | ED_space_image_set_mask(C, sima, mask); | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| WM_event_add_notifier(C, NC_MASK | NA_ADDED, mask); | |||||
mont29: Not sure that this is really wrong, but it feels a bit odd to add notifier in a helper func…… | |||||
brechtUnsubmitted Not Done Inline ActionsFor consistency better to put it in the operator code I think. brecht: For consistency better to put it in the operator code I think. | |||||
| return mask; | return mask; | ||||
| } | } | ||||
| /* Get ative layer. Will create mask/layer to be sure there's an active layer. */ | /* Get ative layer. Will create mask/layer to be sure there's an active layer. */ | ||||
| MaskLayer *ED_mask_layer_ensure(bContext *C) | MaskLayer *ED_mask_layer_ensure(bContext *C) | ||||
| { | { | ||||
| Mask *mask = CTX_data_edit_mask(C); | Mask *mask = CTX_data_edit_mask(C); | ||||
| MaskLayer *mask_layer; | MaskLayer *mask_layer; | ||||
| ▲ Show 20 Lines • Show All 2,035 Lines • Show Last 20 Lines | |||||
Not sure that this is really wrong, but it feels a bit odd to add notifier in a helper func… Usually they are supposed to be defined by operators's code itself…