Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/space_view3d.c
| Show First 20 Lines • Show All 1,011 Lines • ▼ Show 20 Lines | case NC_GPENCIL: | ||||
| ED_region_tag_redraw(ar); | ED_region_tag_redraw(ar); | ||||
| } | } | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| static void view3d_main_region_message_subscribe( | static void view3d_main_region_message_subscribe( | ||||
| const struct bContext *C, | const struct bContext *C, | ||||
| struct WorkSpace *workspace, struct Scene *UNUSED(scene), | struct WorkSpace *UNUSED(workspace), struct Scene *UNUSED(scene), | ||||
| struct bScreen *UNUSED(screen), struct ScrArea *UNUSED(sa), struct ARegion *ar, | struct bScreen *UNUSED(screen), struct ScrArea *sa, struct ARegion *ar, | ||||
| struct wmMsgBus *mbus) | struct wmMsgBus *mbus) | ||||
| { | { | ||||
| /* Developer note: there are many properties that impact 3D view drawing, | /* Developer note: there are many properties that impact 3D view drawing, | ||||
| * so instead of subscribing to individual properties, just subscribe to types | * so instead of subscribing to individual properties, just subscribe to types | ||||
| * accepting some redundant redraws. | * accepting some redundant redraws. | ||||
| * | * | ||||
| * For other space types we might try avoid this, keep the 3D view as an exceptional case! */ | * For other space types we might try avoid this, keep the 3D view as an exceptional case! */ | ||||
| wmMsgParams_RNA msg_key_params = {{{0}}}; | wmMsgParams_RNA msg_key_params = {{{0}}}; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | switch (obact->mode) { | ||||
| case OB_MODE_PARTICLE_EDIT: | case OB_MODE_PARTICLE_EDIT: | ||||
| WM_msg_subscribe_rna_anon_type(mbus, ParticleEdit, &msg_sub_value_region_tag_redraw); | WM_msg_subscribe_rna_anon_type(mbus, ParticleEdit, &msg_sub_value_region_tag_redraw); | ||||
| break; | break; | ||||
| default: | default: | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (workspace->tool.spacetype == SPACE_VIEW3D) { | { | ||||
| wmMsgSubscribeValue msg_sub_value_region_tag_refresh = { | wmMsgSubscribeValue msg_sub_value_region_tag_refresh = { | ||||
| .owner = ar, | .owner = ar, | ||||
| .user_data = ar, | .user_data = sa, | ||||
| .notify = WM_toolsystem_do_msg_notify_tag_refresh, | .notify = WM_toolsystem_do_msg_notify_tag_refresh, | ||||
| }; | }; | ||||
| WM_msg_subscribe_rna_anon_prop( | WM_msg_subscribe_rna_anon_prop( | ||||
| mbus, Object, mode, | mbus, Object, mode, | ||||
| &msg_sub_value_region_tag_refresh); | &msg_sub_value_region_tag_refresh); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 437 Lines • Show Last 20 Lines | |||||