Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-04-18 10:12:44 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-18 10:16:15 +0300
commit7d055da327b9555f76035075ce4e228d31f04df4 (patch)
tree1baf55c36ba068acf764febed0a8ddf4bedca438 /source/blender/editors/transform/transform_manipulator.c
parent33ba170f5c2fc3b8b26b895b092a86ebd85d3e13 (diff)
Move transform orientation to scene
This was stored in the workspace, selected from the view. Move both to scene since custom orientations are closely related to your scene data.
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r--source/blender/editors/transform/transform_manipulator.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 8944817baca..6fb9ed862ab 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -59,6 +59,7 @@
#include "BKE_editmesh.h"
#include "BKE_lattice.h"
#include "BKE_gpencil.h"
+#include "BKE_scene.h"
#include "BKE_workspace.h"
#include "BIF_gl.h"
@@ -619,7 +620,7 @@ static int calc_manipulator_stats(
* if we could check 'totsel' now, this should be skipped with no selection. */
if (ob && !is_gp_edit) {
- switch (v3d->twmode) {
+ switch (scene->orientation_type) {
case V3D_MANIP_GLOBAL:
{
@@ -672,8 +673,8 @@ static int calc_manipulator_stats(
}
case V3D_MANIP_CUSTOM:
{
- TransformOrientation *custom_orientation = BKE_workspace_transform_orientation_find(
- CTX_wm_workspace(C), v3d->custom_orientation_index);
+ TransformOrientation *custom_orientation = BKE_scene_transform_orientation_find(
+ scene, scene->orientation_index_custom);
float mat[3][3];
if (applyTransformOrientation(custom_orientation, mat, NULL)) {
@@ -1133,9 +1134,9 @@ static void manipulator_xform_message_subscribe(
RNA_pointer_create(&screen->id, &RNA_SpaceView3D, sa->spacedata.first, &space_ptr);
{
- extern PropertyRNA rna_SpaceView3D_transform_orientation;
+ extern PropertyRNA rna_Scene_transform_orientation;
const PropertyRNA *props[] = {
- &rna_SpaceView3D_transform_orientation,
+ &rna_Scene_transform_orientation,
};
for (int i = 0; i < ARRAY_SIZE(props); i++) {
WM_msg_subscribe_rna(mbus, &space_ptr, props[i], &msg_sub_value_mpr_tag_refresh, __func__);