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-11-26 05:49:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-26 06:02:09 +0300
commit74938480083a908a5d1fad448f1214b214727bf3 (patch)
treecbc5ddb594a7676e87a10fa9f2ddcbc6acef2316 /source/blender/makesrna/intern/rna_space.c
parentb4e037fe14052619e23863ca08524c97181b3292 (diff)
3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
Diffstat (limited to 'source/blender/makesrna/intern/rna_space.c')
-rw-r--r--source/blender/makesrna/intern/rna_space.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 774fbe1f7ba..b28e0951877 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -531,47 +531,6 @@ static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, bool val
}
}
-
-static View3DCursor *rna_View3D_Cursor_get_from_scene_or_localview(PointerRNA *ptr)
-{
- View3D *v3d = (View3D *)(ptr->data);
- bScreen *screen = ptr->id.data;
- Scene *scene = ED_screen_scene_find(screen, G_MAIN->wm.first);
- return ED_view3d_cursor3d_get(scene, v3d);
-}
-
-static void rna_View3D_Cursor_location_get(PointerRNA *ptr, float *values)
-{
- const View3DCursor *cursor = rna_View3D_Cursor_get_from_scene_or_localview(ptr);
- copy_v3_v3(values, cursor->location);
-}
-
-static void rna_View3D_Cursor_location_set(PointerRNA *ptr, const float *values)
-{
- View3DCursor *cursor = rna_View3D_Cursor_get_from_scene_or_localview(ptr);
- copy_v3_v3(cursor->location, values);
-}
-
-static void rna_View3D_Cursor_rotation_get(PointerRNA *ptr, float *values)
-{
- const View3DCursor *cursor = rna_View3D_Cursor_get_from_scene_or_localview(ptr);
- copy_qt_qt(values, cursor->rotation);
-}
-
-static void rna_View3D_Cursor_rotation_set(PointerRNA *ptr, const float *values)
-{
- View3DCursor *cursor = rna_View3D_Cursor_get_from_scene_or_localview(ptr);
- copy_qt_qt(cursor->rotation, values);
-}
-
-static void rna_View3D_Cursor_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
-{
- View3D *v3d = ptr->data;
- if (v3d->localvd == NULL) {
- DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
- }
-}
-
static float rna_View3DOverlay_GridScaleUnit_get(PointerRNA *ptr)
{
View3D *v3d = (View3D *)(ptr->data);
@@ -3108,21 +3067,6 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Local View",
"Display an isolated sub-set of objects, apart from the scene visibility");
- prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LENGTH);
- RNA_def_property_array(prop, 3);
- RNA_def_property_float_funcs(prop, "rna_View3D_Cursor_location_get", "rna_View3D_Cursor_location_set", NULL);
- RNA_def_property_ui_text(prop, "3D Cursor Location",
- "3D cursor location for this view (dependent on local view setting)");
- RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, RNA_TRANSLATION_PREC_DEFAULT);
- RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_View3D_Cursor_update");
-
- prop = RNA_def_property(srna, "cursor_rotation", PROP_FLOAT, PROP_QUATERNION);
- RNA_def_property_array(prop, 4);
- RNA_def_property_float_funcs(prop, "rna_View3D_Cursor_rotation_get", "rna_View3D_Cursor_rotation_set", NULL);
- RNA_def_property_ui_text(prop, "3D Cursor Rotation",
- "Rotation in quaternions (keep normalized)");
- RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_View3D_Cursor_update");
-
prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA);
RNA_def_property_float_sdna(prop, NULL, "lens");
RNA_def_property_ui_text(prop, "Lens", "Viewport lens angle");