Differential D3076 Diff 10084 source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/manipulators/intern/wm_manipulator_group.c
| Show All 38 Lines | |||||
| #include "BLI_listbase.h" | #include "BLI_listbase.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_workspace.h" | |||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "wm_event_system.h" | #include "wm_event_system.h" | ||||
| ▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | if (mgroup->type->refresh) { | ||||
| mgroup->type->refresh(C, mgroup); | mgroup->type->refresh(C, mgroup); | ||||
| } | } | ||||
| mgroup->init_flag |= WM_MANIPULATORGROUP_INIT_REFRESH; | mgroup->init_flag |= WM_MANIPULATORGROUP_INIT_REFRESH; | ||||
| } | } | ||||
| } | } | ||||
| bool WM_manipulator_group_type_poll(const bContext *C, const struct wmManipulatorGroupType *wgt) | bool WM_manipulator_group_type_poll(const bContext *C, const struct wmManipulatorGroupType *wgt) | ||||
| { | { | ||||
| /* If we're tagged, only use compatible. */ | |||||
| if (wgt->ui_tag[0] != '\0') { | |||||
| const WorkSpace *workspace = CTX_wm_workspace(C); | |||||
| if (BKE_workspace_ui_tags_check(workspace, wgt->ui_tag) == false) { | |||||
| return false; | |||||
| } | |||||
| } | |||||
| /* Check for poll function, if manipulator-group belongs to an operator, also check if the operator is running. */ | /* Check for poll function, if manipulator-group belongs to an operator, also check if the operator is running. */ | ||||
| return (!wgt->poll || wgt->poll(C, (wmManipulatorGroupType *)wgt)); | return (!wgt->poll || wgt->poll(C, (wmManipulatorGroupType *)wgt)); | ||||
| } | } | ||||
| bool wm_manipulatorgroup_is_visible_in_drawstep( | bool wm_manipulatorgroup_is_visible_in_drawstep( | ||||
| const wmManipulatorGroup *mgroup, const eWM_ManipulatorMapDrawStep drawstep) | const wmManipulatorGroup *mgroup, const eWM_ManipulatorMapDrawStep drawstep) | ||||
| { | { | ||||
| switch (drawstep) { | switch (drawstep) { | ||||
| ▲ Show 20 Lines • Show All 712 Lines • Show Last 20 Lines | |||||