BGE: Flipping vsync constants so VSYNC_ON is 0.

This will make transitions from older versions of Blender easier since VSYNC_ON
will be the default. This could have been changed in a do_version, but the vsync
code has yet to see an official release, so I figured this would be a bit nicer.
Also, this makes VSYNC_ON the default for new scenes as well.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59194 954f8c5b-7b00-dc11-b283-0030488c597c
BGE: Adding partial support for LibLoaded lights with GLSL materials.

Any GLSL materials loaded after lights are LibLoaded will now use the lights in
heir shaders. This includes materials loaded from the same scene as the LibLoaded
lights. We could later add a new flag to LibLoad to recompile all existing shaders,
but this commit should offer a lot more flexibility as is.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59196 954f8c5b-7b00-dc11-b283-0030488c597c
change CHECK_TYPE_INLINE macro not to add the pointer in the macro.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59197 954f8c5b-7b00-dc11-b283-0030488c597c
use 'with' keyword for script stub (recommended with py3).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59198 954f8c5b-7b00-dc11-b283-0030488c597c
add linklist stack macros, use where over allocating an array was previously done.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59199 954f8c5b-7b00-dc11-b283-0030488c597c
fix for crash in compositor/opencl, the error value of -1001 would read past the error-string array.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59200 954f8c5b-7b00-dc11-b283-0030488c597c
avoid double ghash lookups


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59202 954f8c5b-7b00-dc11-b283-0030488c597c
remove unused args from edgenet fill (since rewrite, but they weren't used before either)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59204 954f8c5b-7b00-dc11-b283-0030488c597c
missed from last commit


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59205 954f8c5b-7b00-dc11-b283-0030488c597c
Fix [36486] Outliner doesn't allow to expand Hierarchies of armature if it's present on 2 Scenes

This is done by fixing logic for finding the first unused element in treehash.
The blend file from [36486] also exposes a memleak, but it should be addressed separately.


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


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59210 954f8c5b-7b00-dc11-b283-0030488c597c
bmesh api internal changes
- optimize BM_face_exists_overlap_subset(), dont check faces smaller then the vert array, don't initialize overlap flag unless its needed.
- BM_face_exists_overlap had incorrect check (currently function is unused so no harm done)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59213 954f8c5b-7b00-dc11-b283-0030488c597c
add assert for hashes if an existing element is ever inserted into a ghash/edgehash.

the outliner does this intentionally, so add a flag to allow this situation optionally.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59222 954f8c5b-7b00-dc11-b283-0030488c597c
minor api cleanup for ghash/edgehash
- use single inlined lookup function.
- move comments into source.
- pack iterator vars more efficiently.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59223 954f8c5b-7b00-dc11-b283-0030488c597c
Code cleanup:
* Forgot to remove RNA/DNA in r59043. No need to keep this here, we never used it in Trunk. 

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@59224 954f8c5b-7b00-dc11-b283-0030488c597c
add hash function BLI_ghash_assign, BLI_edgehash_assign
avoids remove,insert and only hashes the key once.


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