diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-04 16:08:57 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-09-04 17:11:27 +0300 |
commit | fc115e1ab23a9c458ea1496f160e14009e68cd54 (patch) | |
tree | f61d7a4d8c09d5ebf6839299ec00998976f31f3f /source/blender/makesrna | |
parent | 0f50caf5560f9c2f9af393eefdf2b209210dbfba (diff) |
Cleanup: remove legacy layer and dupli code.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 41 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 49 |
3 files changed, 5 insertions, 91 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 6fbd7abaa39..086c914c6ae 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -2153,12 +2153,6 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Mode", "Object interaction mode"); - prop = RNA_def_property(srna, "layers_local_view", PROP_BOOLEAN, PROP_LAYER_MEMBER); - RNA_def_property_boolean_sdna(prop, NULL, "lay", 0x01000000); - RNA_def_property_array(prop, 8); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Local View Layers", "3D local view layers the object is on"); - /* for data access */ prop = RNA_def_property(srna, "bound_box", PROP_FLOAT, PROP_NONE); RNA_def_property_multi_array(prop, 2, boundbox_dimsize); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 84910b6b1b3..7f2eeba9850 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -653,20 +653,6 @@ void rna_Scene_set_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) } } -static void rna_Scene_layer_set(PointerRNA *ptr, const bool *values) -{ - Scene *scene = (Scene *)ptr->data; - - scene->lay = ED_view3d_view_layer_set(scene->lay, values, &scene->layact); -} - -static int rna_Scene_active_layer_get(PointerRNA *ptr) -{ - Scene *scene = (Scene *)ptr->data; - - return (int)(log(scene->layact) / M_LN2); -} - static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), PointerRNA *ptr) { wmWindowManager *wm = bmain->wm.first; @@ -675,17 +661,6 @@ static void rna_Scene_view3d_update(Main *bmain, Scene *UNUSED(scene_unused), Po WM_windows_scene_data_sync(&wm->windows, scene); } -static void rna_Scene_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) -{ - /* XXX We would need do_time=true here, else we can have update issues like [#36289]... - * However, this has too much drawbacks (like slower layer switch, undesired updates...). - * That's TODO for future DAG updates. - */ - DEG_on_visible_update(bmain, false); - - /* No need to sync scene data here (WM_windows_scene_data_sync), handled through notifier. */ -} - static void rna_Scene_fps_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr)) { BKE_sound_update_fps(scene); @@ -6013,22 +5988,6 @@ void RNA_def_scene(BlenderRNA *brna) NULL, NULL, NULL, NULL); rna_def_scene_objects(brna, prop); - /* Layers */ - prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); - /* this seems to be too much trouble with depsgraph updates/etc. currently (20110420) */ - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); - RNA_def_property_array(prop, 20); - RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set"); - RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click/Drag to select multiple layers"); - RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_update"); - - /* active layer */ - prop = RNA_def_property(srna, "active_layer", PROP_INT, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); - RNA_def_property_int_funcs(prop, "rna_Scene_active_layer_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Layer", "Active scene layer index"); - /* Frame Range Stuff */ prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2e50111b01b..9629b4a877b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -516,9 +516,12 @@ static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, bool val if (value) { Scene *scene = ED_screen_scene_find(sc, G_MAIN->wm.first); - int bit; + /* TODO: restore local view. */ +#if 0 + int bit; v3d->lay = scene->lay; + /* seek for layact */ bit = 0; while (bit < 32) { @@ -528,6 +531,7 @@ static void rna_SpaceView3D_lock_camera_and_layers_set(PointerRNA *ptr, bool val } bit++; } +#endif v3d->camera = scene->camera; } } @@ -582,25 +586,6 @@ static float rna_View3DOverlay_GridScaleUnit_get(PointerRNA *ptr) return ED_view3d_grid_scale(scene, v3d, NULL); } -static void rna_SpaceView3D_layer_set(PointerRNA *ptr, const bool *values) -{ - View3D *v3d = (View3D *)(ptr->data); - - v3d->lay = ED_view3d_view_layer_set(v3d->lay, values, &v3d->layact); -} - -static int rna_SpaceView3D_active_layer_get(PointerRNA *ptr) -{ - View3D *v3d = (View3D *)(ptr->data); - - return (int)(log(v3d->layact) / M_LN2); -} - -static void rna_SpaceView3D_layer_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) -{ - DEG_on_visible_update(bmain, false); -} - static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr) { View3D *v3d = (View3D *)(ptr->data); @@ -3106,30 +3091,6 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_ui_icon(prop, ICON_LOCKVIEW_OFF, 1); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER); - RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); - RNA_def_property_array(prop, 20); - RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_layer_set"); - RNA_def_property_ui_text(prop, "Visible Layers", "Layers visible in this 3D View"); - RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_layer_update"); - - prop = RNA_def_property(srna, "active_layer", PROP_INT, PROP_NONE); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); - RNA_def_property_int_funcs(prop, "rna_SpaceView3D_active_layer_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Active Layer", "Active 3D view layer index"); - - prop = RNA_def_property(srna, "layers_local_view", PROP_BOOLEAN, PROP_LAYER_MEMBER); - RNA_def_property_boolean_sdna(prop, NULL, "lay", 0x01000000); - RNA_def_property_array(prop, 8); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Local View Layers", "Local view layers visible in this 3D View"); - - prop = RNA_def_property(srna, "layers_used", PROP_BOOLEAN, PROP_LAYER_MEMBER); - RNA_def_property_boolean_sdna(prop, NULL, "lay_used", 1); - RNA_def_property_array(prop, 20); - RNA_def_property_clear_flag(prop, PROP_EDITABLE); - RNA_def_property_ui_text(prop, "Used Layers", "Layers that contain something"); - prop = RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "RegionView3D"); RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL); |