Camera tracking integration
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 19 Jul 2011 20:22:03 +0000 (20:22 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 19 Jul 2011 20:22:03 +0000 (20:22 +0000)
===========================

- Selected bundles are now highlighted with outline.
  It looks more Blender-way of highlighting selected items.
- Added option to show bundles names in 3D viewport.
- Bundles now coudl be selected from 3D viewport.

release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/BKE_tracking.h
source/blender/blenkernel/intern/tracking.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_select.c
source/blender/makesdna/DNA_view3d_types.h
source/blender/makesrna/intern/rna_space.c

index 43a3d56d31dfdfb98217a393361195a04e1e0f95..9ac9289b535a1683b677d01b942122d882c26362 100644 (file)
@@ -2184,6 +2184,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
         sub = layout.column()
         sub.active = view.show_reconstruction
         sub.prop(view, "bundle_size")
+        sub.prop(view, "show_bundle_name")
         sub.prop(view, "show_camera_path")
 
         layout.separator()
index e055887792fc7167e68d750222c964ff3d1e8e0d..67aabfbae07897b588b3e9ef7657231e70955aee 100644 (file)
@@ -82,6 +82,8 @@ void BKE_tracking_apply_intrinsics(struct MovieTracking *tracking, float co[2],
 
 void BKE_tracking_detect(struct MovieTracking *tracking, struct ImBuf *imbuf, int framenr);
 
+struct MovieTrackingTrack *BKE_tracking_indexed_bundle(struct MovieTracking *tracking, int bundlenr);
+
 #define TRACK_SELECTED(track)                          ((track)->flag&SELECT || (track)->pat_flag&SELECT || (track)->search_flag&SELECT)
 #define TRACK_AREA_SELECTED(track, area)       ((area)==TRACK_AREA_POINT?(track)->flag&SELECT : ((area)==TRACK_AREA_PAT?(track)->pat_flag&SELECT:(track)->search_flag&SELECT))
 #define TRACK_VIEW_SELECTED(track)                     ((track->flag&TRACK_HIDDEN)==0 && TRACK_SELECTED(track))
index e63790924d48d54e48f910bf7b0db2ed962b6635..52c3102a9dff481f88072cf161a7d3e5529c8cde 100644 (file)
@@ -1030,3 +1030,22 @@ void BKE_tracking_detect(MovieTracking *tracking, ImBuf *ibuf, int framenr)
        libmv_destroyCorners(corners);
 #endif
 }
+
+MovieTrackingTrack *BKE_tracking_indexed_bundle(MovieTracking *tracking, int bundlenr)
+{
+       MovieTrackingTrack *track= tracking->tracks.first;
+       int cur= 1;
+
+       while(track) {
+               if(track->flag&TRACK_HAS_BUNDLE) {
+                       if(cur==bundlenr)
+                               return track;
+
+                       cur++;
+               }
+
+               track= track->next;
+       }
+
+       return NULL;
+}
index 68b1023584cd6365cb23e9036f5de466b8f0919b..0f3e0464d91188ee4b4b43f2a334d7396a047992 100644 (file)
@@ -74,6 +74,8 @@
 #include "BKE_particle.h"
 #include "BKE_pointcache.h"
 #include "BKE_unit.h"
+#include "BKE_movieclip.h"
+#include "BKE_tracking.h"
 
 #include "smoke_API.h"
 
@@ -200,6 +202,40 @@ static void view3d_project_short_noclip(ARegion *ar, float *vec, short *adr)
        }
 }
 
+/* same as view3d_project_short_clip but use persmat instead of persmatob for projection */
+static void view3d_project_short_clip_persmat(ARegion *ar, float *vec, short *adr, int local)
+{
+       RegionView3D *rv3d= ar->regiondata;
+       float fx, fy, vec4[4];
+
+       adr[0]= IS_CLIPPED;
+
+       /* clipplanes in eye space */
+       if(rv3d->rflag & RV3D_CLIPPING) {
+               if(ED_view3d_test_clipping(rv3d, vec, local))
+                       return;
+       }
+
+       copy_v3_v3(vec4, vec);
+       vec4[3]= 1.0;
+
+       mul_m4_v4(rv3d->persmat, vec4);
+
+       /* clipplanes in window space */
+       if( vec4[3] > (float)BL_NEAR_CLIP ) {   /* is the NEAR clipping cutoff for picking */
+               fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]);
+
+               if( fx>0 && fx<ar->winx) {
+
+                       fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]);
+
+                       if(fy > 0.0f && fy < (float)ar->winy) {
+                               adr[0]= (short)floorf(fx);
+                               adr[1]= (short)floorf(fy);
+                       }
+               }
+       }
+}
 /* ************************ */
 
 /* check for glsl drawing */
@@ -708,7 +744,12 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
        for(vos= strings->first; vos; vos= vos->next) {
                if(mat && !(vos->flag & V3D_CACHE_TEXT_WORLDSPACE))
                        mul_m4_v3(mat, vos->vec);
-               view3d_project_short_clip(ar, vos->vec, vos->sco, 0);
+
+               if(vos->flag&V3D_CACHE_TEXT_GLOBALSPACE)
+                       view3d_project_short_clip_persmat(ar, vos->vec, vos->sco, 0);
+               else
+                       view3d_project_short_clip(ar, vos->vec, vos->sco, 0);
+
                if(vos->sco[0]!=IS_CLIPPED)
                        tot++;
        }
@@ -1335,11 +1376,193 @@ static void draw_focus_cross(float dist, float size)
        glEnd();
 }
 
+/* ****************** draw clip data *************** */
+
+static void draw_bundle_sphere(void)
+{
+       static GLuint displist= 0;
+
+       if (displist == 0) {
+               GLUquadricObj *qobj;
+
+               displist= glGenLists(1);
+               glNewList(displist, GL_COMPILE);
+
+               qobj= gluNewQuadric();
+               gluQuadricDrawStyle(qobj, GLU_FILL);
+               glShadeModel(GL_SMOOTH);
+               gluSphere(qobj, 0.05, 16, 16);
+               glShadeModel(GL_FLAT);
+               gluDeleteQuadric(qobj);
+
+               glEndList();
+       }
+
+       glCallList(displist);
+}
+
+static void draw_bundle_outline(void)
+{
+       static GLuint displist=0;
+
+       if (displist == 0) {
+               GLUquadricObj   *qobj;
+
+               displist= glGenLists(1);
+               glNewList(displist, GL_COMPILE);
+
+               glPushMatrix();
+
+               qobj= gluNewQuadric();
+               gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
+               gluDisk(qobj, 0.0,  0.05, 16, 1);
+
+               glRotatef(90, 0, 1, 0);
+               gluDisk(qobj, 0.0,  0.05, 16, 1);
+
+               glRotatef(90, 1, 0, 0);
+               gluDisk(qobj, 0.0,  0.05, 16, 1);
+
+               gluDeleteQuadric(qobj);
+
+               glPopMatrix();
+               glEndList();
+       }
+
+       glCallList(displist);
+}
+
+static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d, MovieClip *clip, int flag)
+{
+       MovieTracking *tracking= &clip->tracking;
+       MovieTrackingTrack *track;
+       float mat[4][4], imat[4][4], curcol[4];
+       unsigned char col[4], scol[4];
+       int bundlenr= 1;
+
+       if((v3d->flag2&V3D_SHOW_RECONSTRUCTION)==0)
+               return;
+
+       if(v3d->flag2&V3D_RENDER_OVERRIDE)
+               return;
+
+       glGetFloatv(GL_CURRENT_COLOR, curcol);
+
+       UI_GetThemeColor4ubv(TH_TEXT, col);
+       UI_GetThemeColor4ubv(TH_SELECT, scol);
+
+       BKE_get_tracking_mat(scene, mat);
+
+       glEnable(GL_LIGHTING);
+       glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
+       glEnable(GL_COLOR_MATERIAL);
+       glShadeModel(GL_SMOOTH);
+
+       /* current ogl matrix is translated in camera space, bundles should
+          be rendered in world space, so camera matrix should be "removed"
+          from current ogl matrix */
+       invert_m4_m4(imat, base->object->obmat);
+
+       glPushMatrix();
+       glMultMatrixf(imat);
+       glMultMatrixf(mat);
+
+       for ( track= tracking->tracks.first; track; track= track->next) {
+               if((track->flag&TRACK_HAS_BUNDLE)==0)
+                       continue;
+
+               if(flag&DRAW_PICKING)
+                       glLoadName(base->selcol + (bundlenr<<16));
+
+               glPushMatrix();
+                       glTranslatef(track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
+                       glScalef(v3d->bundle_size/0.05, v3d->bundle_size/0.05, v3d->bundle_size/0.05);
+
+                       if(v3d->drawtype==OB_WIRE) {
+                               glDisable(GL_LIGHTING);
+                               glDepthMask(0);
+
+                               if(TRACK_SELECTED(track)) UI_ThemeColor(TH_SELECT);
+                               else UI_ThemeColor(TH_WIRE);
+                               draw_bundle_outline();
+
+                               glDepthMask(1);
+                               glEnable(GL_LIGHTING);
+                       } else if(v3d->drawtype>OB_WIRE) {
+                               /* selection outline */
+                               if(TRACK_SELECTED(track)) {
+                                       UI_ThemeColor(TH_SELECT);
+
+                                       glDepthMask(0);
+                                       glLineWidth(2.f);
+                                       glDisable(GL_LIGHTING);
+                                       glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+
+                                       draw_bundle_sphere();
+
+                                       glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+                                       glEnable(GL_LIGHTING);
+                                       glLineWidth(1.f);
+                                       glDepthMask(1);
+                               }
+
+                               UI_ThemeColor(TH_BUNDLE_SOLID);
+                               draw_bundle_sphere();
+                       }
+
+               glPopMatrix();
+
+               if((flag & DRAW_PICKING)==0 && (v3d->flag2&V3D_SHOW_BUNDLENAME)) {
+                       float pos[3];
+                       unsigned char tcol[4];
+
+                       if(TRACK_SELECTED(track)) memcpy(tcol, scol, sizeof(tcol));
+                       else memcpy(tcol, col, sizeof(tcol));
+
+                       mul_v3_m4v3(pos, mat, track->bundle_pos);
+                       view3d_cached_text_draw_add(pos, track->name, 10, V3D_CACHE_TEXT_GLOBALSPACE, tcol);
+               }
+
+               bundlenr++;
+       }
+
+       if((flag & DRAW_PICKING)==0) {
+               if(v3d->flag2&V3D_SHOW_CAMERAPATH && clip->tracking.camera.reconnr) {
+                       int a= 0;
+                       MovieTrackingCamera *camera= &clip->tracking.camera;
+                       MovieReconstructedCamera *cur= camera->reconstructed;
+
+                       glDisable(GL_LIGHTING);
+                       UI_ThemeColor(TH_CAMERA_PATH);
+                       glLineWidth(2.0f);
+
+                       glBegin(GL_LINE_STRIP);
+                               for(a= 0; a<camera->reconnr; a++, cur++) {
+                                       glVertex3f(cur->mat[3][0], cur->mat[3][1], cur->mat[3][2]);
+                               }
+                       glEnd();
+
+                       glLineWidth(1.0f);
+                       glEnable(GL_LIGHTING);
+               }
+       }
+
+       glPopMatrix();
+
+       /* restore */
+       glShadeModel(GL_FLAT);
+       glDisable(GL_COLOR_MATERIAL);
+       glDisable(GL_LIGHTING);
+
+       glColor4fv(curcol);
+}
+
 /* flag similar to draw_object() */
-static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int flag)
+static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int flag)
 {
        /* a standing up pyramid with (0,0,0) as top */
        Camera *cam;
+       Object *ob= base->object;
        float vec[8][4], facx, facy, depth, aspx, aspy, caspx, caspy, shx, shy;
        int i;
        float drawsize;
@@ -1410,6 +1633,10 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob
                glVertex3fv(vec[4]);
        glEnd();
 
+       /* draw data for movie clip set as active for scene */
+       if(scene->clip)
+               draw_viewport_reconstruction(scene, base, v3d, scene->clip, flag);
+
        if(is_view)
                return;
 
@@ -5991,7 +6218,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
                        break;
                case OB_CAMERA:
                        if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0 || (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */
-                               drawcamera(scene, v3d, rv3d, ob, flag);
+                               drawcamera(scene, v3d, rv3d, base, flag);
                        break;
                case OB_LATTICE:
                        if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
index 9debd3314fdc4051e7e350889e3e921478eca8bd..2c79c7f79885f3bd1396745fafba0059f014c665 100644 (file)
@@ -64,7 +64,6 @@
 #include "BKE_screen.h"
 #include "BKE_unit.h"
 #include "BKE_movieclip.h"
-#include "BKE_tracking.h"
 
 #include "RE_pipeline.h"       // make_stars
 
@@ -1535,144 +1534,6 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d)
        }
 }
 
-/* ****************** draw clip data *************** */
-
-static void draw_bundle_sphere(void)
-{
-       static GLuint displist= 0;
-
-       if (displist == 0) {
-               GLUquadricObj *qobj;
-
-               displist= glGenLists(1);
-               glNewList(displist, GL_COMPILE);
-
-               qobj= gluNewQuadric();
-               gluQuadricDrawStyle(qobj, GLU_FILL);
-               glShadeModel(GL_SMOOTH);
-               gluSphere(qobj, 0.05, 8, 8);
-               glShadeModel(GL_FLAT);
-               gluDeleteQuadric(qobj);
-
-               glEndList();
-       }
-
-       glCallList(displist);
-}
-
-static void draw_bundle_outline(void)
-{
-       static GLuint displist=0;
-
-       if (displist == 0) {
-               GLUquadricObj   *qobj;
-
-               displist= glGenLists(1);
-               glNewList(displist, GL_COMPILE);
-
-               glPushMatrix();
-
-               qobj= gluNewQuadric();
-               gluQuadricDrawStyle(qobj, GLU_SILHOUETTE);
-               gluDisk(qobj, 0.0,  0.05, 16, 1);
-
-               glRotatef(90, 0, 1, 0);
-               gluDisk(qobj, 0.0,  0.05, 16, 1);
-
-               glRotatef(90, 1, 0, 0);
-               gluDisk(qobj, 0.0,  0.05, 16, 1);
-
-               gluDeleteQuadric(qobj);
-
-               glPopMatrix();
-               glEndList();
-       }
-
-       glCallList(displist);
-}
-
-static void draw_viewport_reconstruction(Scene *scene, View3D *v3d, MovieClip *clip)
-{
-       MovieTracking *tracking= &clip->tracking;
-       MovieTrackingTrack *track;
-       float mat[4][4];
-
-       if((v3d->flag2&V3D_SHOW_RECONSTRUCTION)==0)
-               return;
-
-       if(v3d->flag2&V3D_RENDER_OVERRIDE)
-               return;
-
-       BKE_get_tracking_mat(scene, mat);
-
-       glEnable(GL_LIGHTING);
-       glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
-       glEnable(GL_COLOR_MATERIAL);
-       glShadeModel(GL_SMOOTH);
-
-       glPushMatrix();
-       glMultMatrixf(mat);
-
-       for ( track= tracking->tracks.first; track; track= track->next) {
-               float pos[3];
-               if((track->flag&TRACK_HAS_BUNDLE)==0)
-                       continue;
-
-               glPushMatrix();
-                       glTranslatef(track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
-                       glScalef(v3d->bundle_size/0.05, v3d->bundle_size/0.05, v3d->bundle_size/0.05);
-
-                       if(TRACK_SELECTED(track)) {
-                               UI_ThemeColor(TH_SELECT);
-                       }
-
-                       if(v3d->drawtype==OB_WIRE) {
-                               glDisable(GL_LIGHTING);
-                               glDepthMask(0);
-
-                               if(TRACK_SELECTED(track)) UI_ThemeColor(TH_SELECT);
-                               else UI_ThemeColor(TH_WIRE);
-                               draw_bundle_outline();
-
-                               glDepthMask(1);
-                               glEnable(GL_LIGHTING);
-                       }
-                       else if(v3d->drawtype>OB_WIRE) {
-                               if(TRACK_SELECTED(track)) UI_ThemeColor(TH_SELECT);
-                               else UI_ThemeColor(TH_BUNDLE_SOLID);
-                               
-                               draw_bundle_sphere();
-                       }
-               glPopMatrix();
-       }
-
-       if(v3d->flag2&V3D_SHOW_CAMERAPATH && clip->tracking.camera.reconnr) {
-               int a= 0;
-               MovieTrackingCamera *camera= &clip->tracking.camera;
-               MovieReconstructedCamera *cur= camera->reconstructed;
-
-               glDisable(GL_LIGHTING);
-               UI_ThemeColor(TH_CAMERA_PATH);
-               glLineWidth(2.0f);
-
-               glBegin(GL_LINE_STRIP);
-                       for(a= 0; a<camera->reconnr; a++, cur++) {
-                               glVertex3f(cur->mat[3][0], cur->mat[3][1], cur->mat[3][2]);
-                       }
-               glEnd();
-
-               glLineWidth(1.0f);
-               glEnable(GL_LIGHTING);
-       }
-
-       glPopMatrix();
-
-       /* restore */
-       glShadeModel(GL_FLAT);
-       glDisable(GL_COLOR_MATERIAL);
-       glDisable(GL_LIGHTING);
-}
-
 /* ****************** View3d afterdraw *************** */
 
 typedef struct View3DAfter {
@@ -2754,10 +2615,6 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
                }
        }
 
-       /* draw data for movie clip set as active for scene */
-       if(scene->clip)
-               draw_viewport_reconstruction(scene, v3d, scene->clip);
-
 //     REEB_draw();
 
        if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) {
index aa92f0d0a590dc0aac6da7929cdbd85757d0afa0..d2efe80448cc57c2c45d9d32eeaf7d901ad04d96 100644 (file)
@@ -118,6 +118,7 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa
 #define V3D_CACHE_TEXT_ZBUF                    (1<<0)
 #define V3D_CACHE_TEXT_WORLDSPACE      (1<<1)
 #define V3D_CACHE_TEXT_ASCII           (1<<2)
+#define V3D_CACHE_TEXT_GLOBALSPACE     (1<<3)
 
 /* drawarmature.c */
 int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag, const short is_outline);
index 9290e1fc631748db451a00e595aaa126c00abc01..74505b6133a2695ebd1cf4bf59721458a5316b72 100644 (file)
@@ -44,6 +44,7 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 #include "DNA_scene_types.h"
+#include "DNA_tracking_types.h"
 
 #include "MEM_guardedalloc.h"
 
@@ -57,6 +58,8 @@
 #include "BKE_context.h"
 #include "BKE_paint.h"
 #include "BKE_armature.h"
+#include "BKE_movieclip.h"
+#include "BKE_tracking.h"
 
 
 #include "BIF_gl.h"
@@ -1268,6 +1271,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
                if(hits>0) {
                        int has_bones= 0;
                        
+                       /* note: bundles are handling in the same way as bones */
                        for(a=0; a<hits; a++) if(buffer[4*a+3] & 0xFFFF0000) has_bones= 1;
 
                        /* note; shift+alt goes to group-flush-selecting */
@@ -1278,7 +1282,37 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
                        }
                        
                        if(has_bones && basact) {
-                               if(ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend) ) {     /* then bone is found */
+                               int is_cam= basact->object->type==OB_CAMERA;
+
+                               if(is_cam) {
+                                       int i, hitresult;
+                                       MovieTrackingTrack *track;
+
+                                       for (i=0; i< hits; i++) {
+                                               hitresult= buffer[3+(i*4)];
+
+                                               /* if there's bundles in buffer select bundles first,
+                                                  so non-camera elements should be ignored in buffer */
+                                               if(basact->selcol != (hitresult & 0xFFFF))
+                                                       continue;
+
+                                               /* index of bundle is 1<<16-based. if there's no "bone" index
+                                                  in hight word, this buffer value belongs to camera,. not to bundle */
+                                               if(buffer[4*i+3] & 0xFFFF0000) {
+                                                       track= BKE_tracking_indexed_bundle(&scene->clip->tracking, hitresult >> 16);
+                                                       BKE_movieclip_select_track(scene->clip, track, TRACK_AREA_ALL, extend);
+
+                                                       basact->flag|= SELECT;
+                                                       basact->object->flag= basact->flag;
+
+                                                       retval= 1;
+                                                       WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, basact->object);
+
+                                                       break;
+                                               }
+                                       }
+                               }
+                               else if(ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend) ) {        /* then bone is found */
                                
                                        /* we make the armature selected: 
                                           not-selected active object in posemode won't work well for tools */
@@ -1297,7 +1331,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce
 
                                }
                                /* prevent bone selecting to pass on to object selecting */
-                               if(basact==BASACT)
+                               if(!is_cam && basact==BASACT)
                                        basact= NULL;
                        }
                }
index ab7b130896e03c1944e85ebe34add2dc4e62f8ab..47a96db8f628b7ba38f86ff4d49a07eb31fe448a 100644 (file)
@@ -252,6 +252,7 @@ typedef struct View3D {
 #define V3D_LOCK_CAMERA                        32
 #define V3D_SHOW_RECONSTRUCTION        64
 #define V3D_SHOW_CAMERAPATH            128
+#define V3D_SHOW_BUNDLENAME            256
 
 /* View3D->around */
 #define V3D_CENTER              0
index 4f6e7da6345bb01a4efc7e853847580f327c3070..16a1909c9f0a0f31a86669fc491c70018e3855ec 100644 (file)
@@ -1448,6 +1448,11 @@ static void rna_def_space_view3d(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed path of ameraip");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 
+       prop= RNA_def_property(srna, "show_bundle_name", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME);
+       RNA_def_property_ui_text(prop, "Show Bundle Name", "Show names for bundle objects");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
+
        /* region */
 
        srna= RNA_def_struct(brna, "RegionView3D", NULL);