[Bf-blender-cvs] [9b0c270f6f1] workspaces: Merge branch 'blender2.8' into workspaces
Julian Eisel
noreply at git.blender.org
Sat May 13 19:56:13 CEST 2017
Commit: 9b0c270f6f1d6b96da3e231f3d46c395bfbca1c9
Author: Julian Eisel
Date: Fri May 12 15:56:58 2017 +0200
Branches: workspaces
https://developer.blender.org/rB9b0c270f6f1d6b96da3e231f3d46c395bfbca1c9
Merge branch 'blender2.8' into workspaces
Conflicts:
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_templates.c
source/blender/makesrna/intern/rna_space_api.c
source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
===================================================================
diff --cc source/blender/editors/interface/interface_utils.c
index 80ee13da0ac,f2e79ec0c7f..e732f60afdd
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@@ -301,8 -300,8 +301,7 @@@ void ui_rna_collection_search_cb(const
}
--/***************************** ID Utilities *******************************/
--
++/***************************** ID Utilities *******************************/
int UI_icon_from_id(ID *id)
{
Object *ob;
diff --cc source/blender/makesrna/intern/rna_space.c
index ffd8fffc14f,ad84da8c619..c6c5fd37d7d
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@@ -504,20 -491,20 +504,20 @@@ static void rna_SpaceView3D_lock_camera
static void rna_View3D_CursorLocation_get(PointerRNA *ptr, float *values)
{
View3D *v3d = (View3D *)(ptr->data);
- bScreen *sc = (bScreen *)ptr->id.data;
- Scene *scene = (Scene *)sc->scene;
+ bScreen *screen = ptr->id.data;
+ Scene *scene = ED_screen_scene_find(screen, G.main->wm.first);
const float *loc = ED_view3d_cursor3d_get(scene, v3d);
-
+
copy_v3_v3(values, loc);
}
static void rna_View3D_CursorLocation_set(PointerRNA *ptr, const float *values)
{
View3D *v3d = (View3D *)(ptr->data);
- bScreen *sc = (bScreen *)ptr->id.data;
- Scene *scene = (Scene *)sc->scene;
+ bScreen *screen = ptr->id.data;
+ Scene *scene = ED_screen_scene_find(screen, G.main->wm.first);
float *cursor = ED_view3d_cursor3d_get(scene, v3d);
-
+
copy_v3_v3(cursor, values);
}
@@@ -729,13 -716,12 +729,13 @@@ static void rna_SpaceView3D_viewport_sh
v3d->drawtype = value;
}
-static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+static EnumPropertyItem *rna_SpaceView3D_viewport_shade_itemf(bContext *C, PointerRNA *UNUSED(ptr),
PropertyRNA *UNUSED(prop), bool *r_free)
{
- Scene *scene = ((bScreen *)ptr->id.data)->scene;
+ wmWindow *win = CTX_wm_window(C);
+ Scene *scene = WM_window_get_active_scene(win);
RenderEngineType *type = RE_engines_find(scene->r.engine);
-
+
EnumPropertyItem *item = NULL;
int totitem = 0;
diff --cc source/blender/makesrna/intern/rna_space_api.c
index d8a4d092afe,8f771eda99d..aabe421b872
--- a/source/blender/makesrna/intern/rna_space_api.c
+++ b/source/blender/makesrna/intern/rna_space_api.c
@@@ -46,10 -43,11 +46,10 @@@ static void rna_RegionView3D_update(ID
area_region_from_regiondata(sc, rv3d, &sa, &ar);
if (sa && ar && sa->spacetype == SPACE_VIEW3D) {
- View3D *v3d;
-
- v3d = (View3D *)sa->spacedata.first;
+ View3D *v3d = sa->spacedata.first;
+ Scene *scene = ED_screen_scene_find(sc, G.main->wm.first);
- ED_view3d_update_viewmat(scene, v3d, ar, NULL, NULL);
- ED_view3d_update_viewmat(sc->scene, v3d, ar, NULL, NULL, NULL);
++ ED_view3d_update_viewmat(scene, v3d, ar, NULL, NULL, NULL);
}
}
More information about the Bf-blender-cvs
mailing list