Revision: 29469 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29469 Author: campbellbarton Date: 2010-06-15 19:45:03 +0200 (Tue, 15 Jun 2010)
Log Message: ----------- Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29449:29468 Modified Paths: -------------- branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp branches/render25/intern/ghost/intern/GHOST_SystemX11.cpp branches/render25/intern/ghost/intern/GHOST_WindowX11.cpp branches/render25/release/scripts/modules/rna_info.py branches/render25/source/blender/blenkernel/BKE_softbody.h branches/render25/source/blender/blenkernel/intern/softbody.c branches/render25/source/blender/editors/curve/editcurve.c branches/render25/source/blender/editors/include/ED_object.h branches/render25/source/blender/editors/interface/interface_templates.c branches/render25/source/blender/editors/mesh/editmesh.c branches/render25/source/blender/editors/mesh/editmesh_add.c branches/render25/source/blender/editors/object/object_add.c branches/render25/source/blender/makesrna/intern/rna_lamp.c branches/render25/source/blender/python/doc/sphinx_doc_gen.py branches/render25/source/blender/python/intern/bpy.c Modified: branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp =================================================================== --- branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-06-15 17:45:03 UTC (rev 29469) @@ -271,6 +271,8 @@ GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) { + if (!GetActiveWindow()) + return GHOST_kFailure; return ::SetCursorPos(x, y) == TRUE ? GHOST_kSuccess : GHOST_kFailure; } Modified: branches/render25/intern/ghost/intern/GHOST_SystemX11.cpp =================================================================== --- branches/render25/intern/ghost/intern/GHOST_SystemX11.cpp 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/intern/ghost/intern/GHOST_SystemX11.cpp 2010-06-15 17:45:03 UTC (rev 29469) @@ -465,7 +465,7 @@ /* could also clamp to screen bounds * wrap with a window outside the view will fail atm */ - bounds.wrapPoint(x_new, y_new, 2); /* offset of one incase blender is at screen bounds */ + bounds.wrapPoint(x_new, y_new, 8); /* offset of one incase blender is at screen bounds */ window->getCursorGrabAccum(x_accum, y_accum); if(x_new != xme.x_root || y_new != xme.y_root) { Modified: branches/render25/intern/ghost/intern/GHOST_WindowX11.cpp =================================================================== --- branches/render25/intern/ghost/intern/GHOST_WindowX11.cpp 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/intern/ghost/intern/GHOST_WindowX11.cpp 2010-06-15 17:45:03 UTC (rev 29469) @@ -57,6 +57,9 @@ #define MWM_HINTS_DECORATIONS (1L << 1) + +// #define GHOST_X11_GRAB + /* * A Client can't change the window property, that is * the work of the window manager. In case, we send @@ -1442,7 +1445,9 @@ setWindowCursorVisibility(false); } +#ifdef GHOST_X11_GRAB XGrabPointer(m_display, m_window, False, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime); +#endif } else { if (m_cursorGrab==GHOST_kGrabHide) { @@ -1460,7 +1465,9 @@ /* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */ setCursorGrabAccum(0, 0); m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */ +#ifdef GHOST_X11_GRAB XUngrabPointer(m_display, CurrentTime); +#endif } XFlush(m_display); Modified: branches/render25/release/scripts/modules/rna_info.py =================================================================== --- branches/render25/release/scripts/modules/rna_info.py 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/release/scripts/modules/rna_info.py 2010-06-15 17:45:03 UTC (rev 29469) @@ -620,3 +620,19 @@ # print(rna_info) return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup + + +if __name__ == "__main__": + import rna_info + struct = rna_info.BuildRNAInfo()[0] + data = "" + for struct_id, v in sorted(struct.items()): + struct_id_str = "".join(sid for sid in struct_id if struct_id) + props = [(prop.identifier, prop) for prop in v.properties] + + for prop_id, prop in sorted(props): + data += "%s.%s: %s %s\n" % (struct_id_str, prop.identifier, prop.type, prop.description) + + + text = bpy.data.texts.new(name="api.py") + text.from_string(data) Modified: branches/render25/source/blender/blenkernel/BKE_softbody.h =================================================================== --- branches/render25/source/blender/blenkernel/BKE_softbody.h 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/source/blender/blenkernel/BKE_softbody.h 2010-06-15 17:45:03 UTC (rev 29469) @@ -1,6 +1,6 @@ /** - * BKE_softbody.h - * + * BKE_softbody.h + * * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -43,7 +43,7 @@ int nofsprings; int *springs; float choke,choke2,frozen; float colball; - short flag; + short loc_flag; //reserved by locale module specific states //char octantflag; float mass; float springweight; Modified: branches/render25/source/blender/blenkernel/intern/softbody.c =================================================================== --- branches/render25/source/blender/blenkernel/intern/softbody.c 2010-06-15 17:40:31 UTC (rev 29468) +++ branches/render25/source/blender/blenkernel/intern/softbody.c 2010-06-15 17:45:03 UTC (rev 29469) @@ -1,5 +1,5 @@ -/* softbody.c - * +/* softbody.c + * * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -32,17 +32,17 @@ ****** variables on the UI for now - float mediafrict; friction to env - float nodemass; softbody mass of *vertex* - float grav; softbody amount of gravitaion to apply - - float goalspring; softbody goal springs - float goalfrict; softbody goal springs friction - float mingoal; quick limits for goal + float mediafrict; friction to env + float nodemass; softbody mass of *vertex* + float grav; softbody amount of gravitaion to apply + + float goalspring; softbody goal springs + float goalfrict; softbody goal springs friction + float mingoal; quick limits for goal float maxgoal; - float inspring; softbody inner springs - float infrict; softbody inner springs friction + float inspring; softbody inner springs + float infrict; softbody inner springs friction ***** */ @@ -83,7 +83,7 @@ /* ********** soft body engine ******* */ -typedef enum {SB_EDGE=1,SB_BEND=2,SB_STIFFQUAD=3} type_spring; +typedef enum {SB_EDGE=1,SB_BEND=2,SB_STIFFQUAD=3,SB_HANDLE=4} type_spring; typedef struct BodySpring { int v1, v2; @@ -136,12 +136,12 @@ int tot; }SB_thread_context; -#define NLF_BUILD 1 -#define NLF_SOLVE 2 +#define NLF_BUILD 1 +#define NLF_SOLVE 2 #define MID_PRESERVE 1 -#define SOFTGOALSNAP 0.999f +#define SOFTGOALSNAP 0.999f /* if bp-> goal is above make it a *forced follow original* and skip all ODE stuff for this bp removes *unnecessary* stiffnes from ODE system */ @@ -149,8 +149,12 @@ #define BSF_INTERSECT 1 /* edge intersects collider face */ -#define SBF_DOFUZZY 1 /* edge intersects collider face */ +/* private definitions for bodypoint states */ +#define SBF_DOFUZZY 1 /* Bodypoint do fuzzy */ +#define SBF_OUTOFCOLLISION 2 /* Bodypoint does not collide */ + + #define BFF_INTERSECT 1 /* collider edge intrudes face */ #define BFF_CLOSEVERT 2 /* collider vertex repulses face */ @@ -187,15 +191,15 @@ { SoftBody *sb= ob->soft; /* is supposed to be there */ if (sb){ - return(sb->physics_speed); - /*hrms .. this could be IPO as well :) + return(sb->physics_speed); + /*hrms .. this could be IPO as well :) estimated range [0.001 sluggish slug - 100.0 very fast (i hope ODE solver can handle that)] 1 approx = a unit 1 pendulum at g = 9.8 [earth conditions] has period 65 frames - theory would give a 50 frames period .. so there must be something inaccurate .. looking for that (BM) + theory would give a 50 frames period .. so there must be something inaccurate .. looking for that (BM) */ } return (1.0f); - /* + /* this would be frames/sec independant timing assuming 25 fps is default but does not work very well with NLA return (25.0f/scene->r.frs_sec) @@ -206,10 +210,10 @@ /* helper functions for everything is animatable jow_go_for2_5 +++++++*/ /* introducing them here, because i know: steps in properties ( at frame timing ) will cause unwanted responses of the softbody system (which does inter frame calculations ) - so first 'cure' would be: interpolate linear in time .. + so first 'cure' would be: interpolate linear in time .. Q: why do i write this? A: because it happend once, that some eger coder 'streamlined' code to fail. - We DO linear interpolation for goals .. and i think we should do on animated properties as well + We DO linear interpolation for goals .. and i think we should do on animated properties as well */ /* animate sb->maxgoal,sb->mingoal */ @@ -221,7 +225,7 @@ if(!(ob->softflag & OB_SB_GOAL)) return (0.0f); if (sb&&bp){ if (bp->goal < 0.0f) return (0.0f); - f = sb->mingoal + bp->goal*ABS(sb->maxgoal - sb->mingoal); + f = sb->mingoal + bp->goal*ABS(sb->maxgoal - sb->mingoal); f = pow(f, 4.0f); return (f); } @@ -247,15 +251,15 @@ /******************** for each target object/face the axis aligned bounding box (AABB) is stored -faces paralell to global axes +faces paralell to global axes so only simple "value" in [min,max] ckecks are used float operations still */ /* just an ID here to reduce the prob for killing objects ** ob->sumohandle points to we should not kill :) -*/ -const int CCD_SAVETY = 190561; +*/ +const int CCD_SAVETY = 190561; typedef struct ccdf_minmax{ float minx,miny,minz,maxx,maxy,maxz; @@ -285,11 +289,11 @@ MFace *mface=NULL; float v[3],hull; int i; - + /* first some paranoia checks */ if (!dm) return NULL; if (!dm->getNumVerts(dm) || !dm->getNumFaces(dm)) return NULL; - + pccd_M = MEM_mallocN(sizeof(ccd_Mesh),"ccd_Mesh"); pccd_M->totvert = dm->getNumVerts(dm); pccd_M->totface = dm->getNumFaces(dm); @@ -297,32 +301,32 @@ pccd_M->bbmin[0]=pccd_M->bbmin[1]=pccd_M->bbmin[2]=1e30f; pccd_M->bbmax[0]=pccd_M->bbmax[1]=pccd_M->bbmax[2]=-1e30f; pccd_M->mprevvert=NULL; - - + + /* blow it up with forcefield ranges */ hull = MAX2(ob->pd->pdef_sbift,ob->pd->pdef_sboft); - + /* alloc and copy verts*/ pccd_M->mvert = dm->dupVertArray(dm); - /* ah yeah, put the verices to global coords once */ - /* and determine the ortho BB on the fly */ + /* ah yeah, put the verices to global coords once */ + /* and determine the ortho BB on the fly */ for(i=0; i < pccd_M->totvert; i++){ mul_m4_v3(ob->obmat, pccd_M->mvert[i].co); - + /* evaluate limits */ VECCOPY(v,pccd_M->mvert[i].co); pccd_M->bbmin[0] = MIN2(pccd_M->bbmin[0],v[0]-hull); pccd_M->bbmin[1] = MIN2(pccd_M->bbmin[1],v[1]-hull); pccd_M->bbmin[2] = MIN2(pccd_M->bbmin[2],v[2]-hull); - + pccd_M->bbmax[0] = MAX2(pccd_M->bbmax[0],v[0]+hull); pccd_M->bbmax[1] = MAX2(pccd_M->bbmax[1],v[1]+hull); pccd_M->bbmax[2] = MAX2(pccd_M->bbmax[2],v[2]+hull); - + } /* alloc and copy faces*/ pccd_M->mface = dm->dupFaceArray(dm); - + /* OBBs for idea1 */ @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs