Add helper to validate (and fix) material indices of meshes' polygons, curves' splines and texts' letters.

Useful especially for importer addons.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D650
Fix T41113: Hide doesn't work on particle systems

Particles could completely cancel Hide flag! 'Accumulative' bool is not a really good idea here,
hide (or render-hide) are some kind of 'absolute' no-go.

Found another issue in that area, duplicated objects would still show in 'render override' mode,
when object was render-disabled.

Hopefully things are better now.
Fix a BI bug: when an object had dupliobjects children, it was never rendered at all,
even if having particle systems.

This was not matching behavior of Cycles and 3DView!
Fix -1 passed as bool
Code cleanup
BGE: Add level mode to property actuator

This patch adds to the existing property actuator a level mode, which is switching the property depending on the input level.

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D652
BGE: Add missing documentation and attribute constraint_type for ConstraintWrapper

1. Add attribute to get the constraint type.
2. Add missing documentation for getParent, setParam, constraint_id in bge.types.KX_ConstraintWrapper.rst.
3. Add missing documentation for GENERIC_6DOF_CONSTRAINT and flag bit in bge.constraints.rst.
4. Fix typo in CcdPhysicsEnvironment.cpp

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D654
BGE: Add property/material detection and X-Ray for mouse over any sensor

This patch adds a Property/Material detection and a X-Ray mode to the mouse over any sensor like on the ray sensor.

Proposal:
http://blenderartists.org/forum/showthread.php?261847-BGE-proposal-Mouse-Over-Any-sensor-with-Property-and-X-Ray&highlight=proposal

Reviewers: moguri

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D653
Fix wrong index update when removing CV points
Fix T41039: Hook modifier sometimes fails to retain correct bezier curve point assignment
Fix wrong interface flags combination in inverse kinematics panel
Fix T41035: Scale Manipulator CTRL-ALT-S issue with maya shortcuts
Fix T41081: Presets not working on pinned properties panels.

Preset operators should avoid using `bpy.context.object.data` as a base
path to properties. This path is not available in the buttons context
when using pinned datablocks! Instead use the specific
`bpy.context.camera` and `bpy.context.lamp.sky` paths now, which lead to
the correct datablocks in any case.
Fix T41114: Particle systems cause memory corruption due to invalid
dmcache index (again).
Fix T41109: Reloading image that has been modified outside Blender does not update image in Image Texture nodes
Cleanup: curvecaches for curves, not mballs!
Cleanup in MBALL/displist: no need to create curvecache for non-basis mballs, will never be used anyway!
Cleanup: warning
Fix RGN_DRAW_REFRESH_UI flag being overwritten
MBall cleanup: remove unused F_ERROR references, als fix/enhance BKE_mball_basis_find()

BKE_mball_basis_find() was making a bunch of string manipulations for all MBall objects
(including duplis), and then making a (broken!) check to do nothing in case of duplis mball!

Now it makes correct check in early stage.