add some missing NULL checks, a few parts of the code used a pointer then checked it for NULL after.
also made it more clear that some areas assume the pointer isnt null (remove redundant NULL checks).


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50517 954f8c5b-7b00-dc11-b283-0030488c597c
replace BM_vert_face_count() use of BM_LOOPS_OF_VERT iterator with a direct call to bmesh_disk_facevert_count()


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50518 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#31738] BM_vert_splice modifies loops during iteration

patch by Nicholas Bishop, modified to avoid looping over vert-loops one extra time.

added BM_iter_as_arrayN(), returns an iterator as an array without knowing the length before calling.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50519 954f8c5b-7b00-dc11-b283-0030488c597c
Hopefully this would restore svn history for Carve interface



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50523 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: use min/max inline functions rather than macros & simplify loop


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50524 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#29616] Crash/infinite loop from missing cyclic check in group/dupligroups (unlikely/intentional)

calling BKE_ptcache_ids_from_object() could recursively call BKE_object_handle_update(), when there is no reason to update object transforms at all. Add option not to do any updates and just return an object list.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50525 954f8c5b-7b00-dc11-b283-0030488c597c
missed makign some vars shorts in previous commit


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50526 954f8c5b-7b00-dc11-b283-0030488c597c
Performance fix for Cycles: Don't wait in the main UI thread when resetting devices.

When the scene is updated Cycles resets the renderer device, cancelling
all existing tasks. The main thread would wait for all running tasks to
finish before continuing. This is ok when tasks can actually cancel in a
timely fashion. For OSL however, this does not work, since the OSL
shader group optimization takes quite a bit of time and can not be
easily be cancelled once running (on my crappy machine in full debug
mode: ~0.12 seconds for simple node trees). This would lead to very
laggy UI behavior and make it difficult to accurately control elements
such as sliders.

This patch removes the wait condition from the device->task_cancel
method. Instead it just sets the do_cancel flag and returns. To avoid
backlog in the task pool of the device it will return early from the
BlenderSession::sync function while the reset is going on (tested in
Session::resetting). Once all existing tasks have finished the do_cancel
flag is finally cleared again (checked in TaskPool::num_decrease).

Care has to be taken to avoid race conditions on the do_cancel flag,
since it can now be modified outside the TaskPool::cancel function
itself. For this purpose the scope of the TaskPool::num_mutex locks has
been extended, in most cases the mutex is now locked by the TaskPool
itself before calling TaskScheduler methods, instead of only locking
inside the num_increase/num_decrease functions themselves. The only
occurrence of a lock outside of the TaskPool methods is in
TaskScheduler::thread_run.

This patch is most useful in combination with the OSL renderer mode, so
it can probably wait until after the 2.64 release. SVM tasks tend to be
cancelled quickly, so the effect is less noticeable.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50528 954f8c5b-7b00-dc11-b283-0030488c597c
Fix libmv build on OS X with 10.5 SDK. The tr1::unordered_map implementation
is broken in this SDK, now it uses the boost implementation instead.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50529 954f8c5b-7b00-dc11-b283-0030488c597c
Fix build error with gcc 4.7 in last commit.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50530 954f8c5b-7b00-dc11-b283-0030488c597c
Fix for [#32536] Mixing with translated images in compositor produces
garbage strips for each tile

Promoted the behaviour of combine channels to node operation so that all
nodes use the same implementation. (CombineChannel had a better
implementation)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50534 954f8c5b-7b00-dc11-b283-0030488c597c
bugfix [#32538] 'Mouse Over Any' sensor 'Pulse' button missing since 2.5x [Patch] - based on the patch from HG1

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50536 954f8c5b-7b00-dc11-b283-0030488c597c
a-z menu input now works for enum popups.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50537 954f8c5b-7b00-dc11-b283-0030488c597c
code cleanup: use an enum for uiBut->pointype (more useful debug display of members),
and rename COL -> COLOR --- less confusing since the layout engine has row/col's.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@50538 954f8c5b-7b00-dc11-b283-0030488c597c
fix [#32444] Proportional Edit stays on on Pose Mode, after activating it in Object Mode.

disable PET in posemode.


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