code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53255 954f8c5b-7b00-dc11-b283-0030488c597c
Text Editor: Gray out the Register check unless the file has .py extension. (feature lost since July)



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53256 954f8c5b-7b00-dc11-b283-0030488c597c
BGE: Committing async LibLoad from Swiss. This does the lib loading in a separate thread to keep the BGE from freezing. Here is an example from the docs:

      # Print a message when an async LibLoad is done
      import bge

      def finished_cb(status):
          print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))

      bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb

LibLoad() now returns a KX_LibLoadStatus object for information on the library loading. LibNew() and LibFree() are unaffected by this commit. In other words, the async option only works for LibLoad(). Furthermore it only works for Scenes, not Actions or Meshes.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53257 954f8c5b-7b00-dc11-b283-0030488c597c
function for flushing polygon -> vert,edge selection (in object mode), currently unused.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53259 954f8c5b-7b00-dc11-b283-0030488c597c
Weight gradient tool for weight paint mode
- blends from current weight into alpha zero.
- uses brush alpha & curve.
- respects weight paint vertex/face select modes.
- updates realtime.


Access With
- Alt+LMB (linear gradient)
- Ctrl+Alt+LMB (radial gradient)


note:
- WM_gesture_straightline_* are used but not well suited to this task, may end up replacing with own modal operator.
- Key handling works but needs to be done better.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53260 954f8c5b-7b00-dc11-b283-0030488c597c
correct own error in openmp use for BM_mesh_elem_index_ensure().


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53261 954f8c5b-7b00-dc11-b283-0030488c597c
BGE: The PyGILState_Ensure() call in KX_Scene was causing a segfault in the Blenderplayer even when being run in the main thread. I'm removing it for now since I don't think it will really cause a problem. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53262 954f8c5b-7b00-dc11-b283-0030488c597c
fix for using uninitialized flag in my last commit. 


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53263 954f8c5b-7b00-dc11-b283-0030488c597c
Small tweak in the new "Relative Parent" option for Bones that have Object-children:

- Transform now is relative to the bone root.

For backwards compatibility this transform was set to the tip for parenting... 

Now the new parenting option uses the root, the old one still the tip.
I've noted in the code to check on a version patch, to make it consistent.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53264 954f8c5b-7b00-dc11-b283-0030488c597c
Small drawing glitch, for UI with transparent overlapping regions;

- The corner 'duplicate/merge area' widget was drawing too often.

(Added comment in subwindow 'active' code, too many redraws are being
sent on moving mouse over region eddges)



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53265 954f8c5b-7b00-dc11-b283-0030488c597c
From the long todo:

New Outliner mode: "Main Data".

This shows a flattened, non-hierarchical list of all linkable "ID" data in
your current project. It works fine on searches. Actually this is the
view on the "Main" database in Blender, the one that's saved in a .blend.

This is in general more useful than the "Datablocks" viewer,
which is not searchable, and shows every property of data as well.




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53266 954f8c5b-7b00-dc11-b283-0030488c597c
flush selection when switching weight paint vertex/face selection modes.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53267 954f8c5b-7b00-dc11-b283-0030488c597c
replace RNA_ID_type_name() with BKE_idcode_to_name_plural()


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53268 954f8c5b-7b00-dc11-b283-0030488c597c
flush selection from vertex paint and weight paint modes when exiting, this isnt fool-proof, will need more work.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53269 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup:
make vertex/weight flag names consistent
ME_EDIT_VERT_SEL   --> ME_EDIT_PAINT_VERT_SEL
ME_EDIT_PAINT_MASK --> ME_EDIT_PAINT_FACE_SEL

also remove unused header BLO_soundfile.h


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53270 954f8c5b-7b00-dc11-b283-0030488c597c
Bug - old code, not working for new outliner view: Click on World needed a context check.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53272 954f8c5b-7b00-dc11-b283-0030488c597c
Cycles OSL: handle new getattribute constant folding with renderstate NULL check,
and fix #33654, distance to line segment function is not implemented but compiled
anyway, now it should give a compile error.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53273 954f8c5b-7b00-dc11-b283-0030488c597c
Reshuffled data view for Outliner.

- The new "Main Data" option is now under the category "Blender File".
- That category also displays the Linked Library files.
  (Including allows browsing what's used from this file)

Also fixed CTRL+click on names, crashed.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53276 954f8c5b-7b00-dc11-b283-0030488c597c
New Outliner "Blender File" option: the first entry couldn't be closed/re-opened.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53277 954f8c5b-7b00-dc11-b283-0030488c597c
Change default baking bias distance to 0.001 for new scenes

Would need to update startup.blend as well, but not so much familiar
with doing this nowadays.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@53279 954f8c5b-7b00-dc11-b283-0030488c597c