Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show All 30 Lines | |||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_screen_types.h" /* TransformOrientation */ | #include "DNA_screen_types.h" /* TransformOrientation */ | ||||
| #include "DNA_userdef_types.h" | #include "DNA_userdef_types.h" | ||||
| #include "DNA_view3d_types.h" | #include "DNA_view3d_types.h" | ||||
| #include "DNA_world_types.h" | #include "DNA_world_types.h" | ||||
| #include "IMB_imbuf_types.h" | #include "IMB_imbuf_types.h" | ||||
| #include "BLI_blenlib.h" | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "BKE_armature.h" | #include "BKE_armature.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| ▲ Show 20 Lines • Show All 1,758 Lines • ▼ Show 20 Lines | static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const bool *value) | ||||
| int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) | | int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) | | ||||
| (value[2] ? SCE_SELECT_FACE : 0); | (value[2] ? SCE_SELECT_FACE : 0); | ||||
| if (flag) { | if (flag) { | ||||
| ts->selectmode = flag; | ts->selectmode = flag; | ||||
| /* Update select mode in all the workspaces in mesh edit mode. */ | /* Update select mode in all the workspaces in mesh edit mode. */ | ||||
| wmWindowManager *wm = G_MAIN->wm.first; | wmWindowManager *wm = G_MAIN->wm.first; | ||||
| for (wmWindow *win = wm->windows.first; win; win = win->next) { | LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { | ||||
| ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ViewLayer *view_layer = WM_window_get_active_view_layer(win); | ||||
| if (view_layer && view_layer->basact) { | if (view_layer && view_layer->basact) { | ||||
| Mesh *me = BKE_mesh_from_object(view_layer->basact->object); | Mesh *me = BKE_mesh_from_object(view_layer->basact->object); | ||||
| if (me && me->edit_mesh && me->edit_mesh->selectmode != flag) { | if (me && me->edit_mesh && me->edit_mesh->selectmode != flag) { | ||||
| me->edit_mesh->selectmode = flag; | me->edit_mesh->selectmode = flag; | ||||
| EDBM_selectmode_set(me->edit_mesh); | EDBM_selectmode_set(me->edit_mesh); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 607 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *rna_TransformOrientation_impl_itemf(Scene *scene, | ||||
| RNA_enum_items_add(&item, &totitem, rna_enum_transform_orientation_items); | RNA_enum_items_add(&item, &totitem, rna_enum_transform_orientation_items); | ||||
| const ListBase *transform_orientations = scene ? &scene->transform_spaces : NULL; | const ListBase *transform_orientations = scene ? &scene->transform_spaces : NULL; | ||||
| if (transform_orientations && (BLI_listbase_is_empty(transform_orientations) == false)) { | if (transform_orientations && (BLI_listbase_is_empty(transform_orientations) == false)) { | ||||
| RNA_enum_item_add_separator(&item, &totitem); | RNA_enum_item_add_separator(&item, &totitem); | ||||
| for (TransformOrientation *ts = transform_orientations->first; ts; ts = ts->next) { | LISTBASE_FOREACH (TransformOrientation *, ts, transform_orientations) { | ||||
| tmp.identifier = ts->name; | tmp.identifier = ts->name; | ||||
| tmp.name = ts->name; | tmp.name = ts->name; | ||||
| tmp.value = i++; | tmp.value = i++; | ||||
| RNA_enum_item_add(&item, &totitem, &tmp); | RNA_enum_item_add(&item, &totitem, &tmp); | ||||
| } | } | ||||
| } | } | ||||
| RNA_enum_item_end(&item, &totitem); | RNA_enum_item_end(&item, &totitem); | ||||
| ▲ Show 20 Lines • Show All 5,232 Lines • Show Last 20 Lines | |||||