diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-22 12:43:29 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-22 12:43:29 +0300 |
commit | 42def9a351a2c2696912288d9f1aed8b658f097c (patch) | |
tree | a7b41a8e8bd918e558695a74f311d722814b8ae3 /source/blender/editors/space_view3d | |
parent | 6d31872298e2f6fd23d06a4ccb792647879163ca (diff) |
2.5
Cleanup
- for portablity we can keep the old ugly defines for retrieving
active object, cfra and so on. But, they will use 'scene' not
G.scene.
- fixed code that uses those defines.
- some unused variables/functions removed
Diffstat (limited to 'source/blender/editors/space_view3d')
5 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 1eb0b8c2b86..c9307f8e1fb 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -2022,7 +2022,7 @@ static void draw_ebones(View3D *v3d, Object *ob, int dt) /* draw bone paths * - in view space */ -static void draw_pose_paths(View3D *v3d, Object *ob) +static void draw_pose_paths(Scene *scene, View3D *v3d, Object *ob) { bArmature *arm= ob->data; bPoseChannel *pchan; @@ -2547,7 +2547,7 @@ int draw_armature(Scene *scene, View3D *v3d, Base *base, int dt, int flag) else if(G.f & G_WEIGHTPAINT) arm->flag |= ARM_POSEMODE; - draw_pose_paths(v3d, ob); + draw_pose_paths(scene, v3d, ob); } } } diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 58a9c126324..bbe89afd411 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -452,7 +452,7 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot return 1; } -void draw_mesh_text(Object *ob, int glsl) +void draw_mesh_text(Scene *scene, Object *ob, int glsl) { Mesh *me = ob->data; DerivedMesh *ddm; @@ -561,7 +561,7 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, Object *ob, DerivedMesh *dm, /* draw game engine text hack */ if(get_ob_property(ob, "Text")) - draw_mesh_text(ob, 0); + draw_mesh_text(scene, ob, 0); draw_textured_end(); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index bcb2b8b8e35..a1d6a9d13cb 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2824,7 +2824,7 @@ static int drawDispList(Scene *scene, View3D *v3d, Base *base, int dt) /* 5. start filling the arrays */ /* 6. draw the arrays */ /* 7. clean up */ -static void draw_new_particle_system(View3D *v3d, Base *base, ParticleSystem *psys, int dt) +static void draw_new_particle_system(Scene *scene, View3D *v3d, Base *base, ParticleSystem *psys, int dt) { Object *ob=base->object; ParticleSystemModifierData *psmd; @@ -5069,7 +5069,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) glDepthMask(GL_FALSE); for(psys=ob->particlesystem.first; psys; psys=psys->next) - draw_new_particle_system(v3d, base, psys, dt); + draw_new_particle_system(scene, v3d, base, psys, dt); if(G.f & G_PARTICLEEDIT && ob==OBACT) { psys= NULL; // XXX PE_get_current(ob); diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 674291e7e5d..6c20285654e 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -233,6 +233,7 @@ void do_layer_buttons(bContext *C, short event) static void do_view3d_view_camerasmenu(bContext *C, void *arg, int event) { + Scene *scene= CTX_data_scene(C); View3D *v3d; Base *base; int i=1; diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 0d9a92c86c3..69bcf2e0395 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -723,7 +723,7 @@ void mouse_cursor(Scene *scene, ARegion *ar, View3D *v3d, short mx, short my) } -void deselectall(View3D *v3d) /* is toggle */ +void deselectall(Scene *scene, View3D *v3d) /* is toggle */ { Base *base; int a=0, ok=0; @@ -806,7 +806,7 @@ void selectrandom(Scene *scene, View3D *v3d) } /* selects all objects of a particular type, on currently visible layers */ -void selectall_type(View3D *v3d, short obtype) +void selectall_type(Scene *scene, View3D *v3d, short obtype) { Base *base; @@ -825,7 +825,7 @@ void selectall_type(View3D *v3d, short obtype) BIF_undo_push("Select all per type"); } /* selects all objects on a particular layer */ -void selectall_layer(unsigned int layernum) +void selectall_layer(Scene *scene, unsigned int layernum) { Base *base; @@ -1863,6 +1863,7 @@ static int view3d_circle_select(bContext *C, wmOperator *op) { ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); + Scene *scene= CTX_data_scene(C); View3D *v3d= sa->spacedata.first; Base *base; |