style cleanup


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54567 954f8c5b-7b00-dc11-b283-0030488c597c
add debug check for mempool double free (or misuse of BLI_MEMPOOL_ALLOW_ITER),
some reports in the tracker show errors on bmesh iteration which could be caused by this.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54569 954f8c5b-7b00-dc11-b283-0030488c597c
Translate "Set Parent To" menu (ctrl-P), reported on bf-translations ML by Satoshi Yamasaki, thanks!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54571 954f8c5b-7b00-dc11-b283-0030488c597c
Fix [#34253] UIList resize, resizes wrong list I/II

When using default UI_UL_list, one should always spully a custom ID, else collision inside an area are quite likely...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54572 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34205: Zooming in rendered mode during update out of sync with intended zoom

Yes, again.

There's some t within which reset is not allowed. This is so no reset happens
too often for performance issues. If camera changes too often, some reset could
be missed because of this timeout.

For now tag engine for update, which will update viewport from blender side.

Proper solution could be to detect such a changes from blender side and tag
cycles for refresh instead of trying to detect changes form cycles, but that's
for later.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54574 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34254: cycles brightness/contrast node was missing for GLSL material view.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54576 954f8c5b-7b00-dc11-b283-0030488c597c
Bugfix [#33970] Background Scene does not show animation of rigid body objects

This was caused by multiple instantiations of the same basic problem. The
rigidbody handling code often assumed that "scene" pointers referred to the
scene where an object participating in the sim resided (and where the rigidbody
world for that sim lived). However, when dealing with background sets, "scene"
often only refers to the active scene, and not the set that the object actually
came from. Hence, the rigidbody code would often (wrongly) conclude that there
was nothing to do.

For example, we may have the following backgound set/scene chaining scenario:
"active"  <-- ... <-- set i (rigidbody objects live here) <-- ... <-- set n

The fix here is a multi-part fix:
1) Moved sim-world calculation from BKE_scene_update_newframe() to
scene_update_tagged_recursive()
    + This is currently the only way that rigidbody sims in background sets will
get calculated, as part of the recursion
     - These checks will get run on each update. <--- FIXME!!!

2) Tweaked depsgraph code so that when checking if there are any time-dependent
features on objects to tag for updating, the checking is done relative to the
scene that the object actually resides in (and not the active scene). Otherwise,
even if we recalculate the sim, the affected objects won't get tagged for
updating. This tagging is needed to actually flush the transforms out of the
RigidBodyObject structs (written by the sim/cache) and into the Object
transforms (obmat's)

3) Removed the requirement for rigidbody world to actually exist before we can
flush rigidbody transforms. In many cases, it should be sufficient to assume
that because the object with rigidbody data attached has been tagged for
updates, it should have updates to perform. Of course, we still check on this
data if we've got it, but that's only if the sim is in the active scene.
   - TODO: if we have further problems, we should investigate passing the
"actual" scene down alongside the "active" scene for BKE_object_handle_update().


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54577 954f8c5b-7b00-dc11-b283-0030488c597c
Fix #34256: join a mesh with non-uniform scale with another mesh showed wrong
normals, they need to be recalculated then.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54578 954f8c5b-7b00-dc11-b283-0030488c597c
Bug fix #34177

Blender's triangulator has been rescued :)
This commit fixes errors with concave holes inside polygons.

Simple explanation:

Blender "ScanFill" works by sorting vertices from top-left to bottom-right, and connecting
these vertices with a sorted list of edges they have.

The inner loop then goes over every vertex, its edges, and tries to make triangles by
checking vertices that are next in the list.
- if the triangle has points inside: it creates an edge to this vertex, and continues
- else: add new triangle.

Very simple, fast and efficient. But it needed one more check for the first step: it should
check every vertex inside the triangle, and pick the best vertex for an edge based on forming 
the sharpest angle with the tested edge. That solves the case for concave holes.

Blender ScanFill was coded 20 years ago, and is an own invention. I wanted a triangulator that
just fills any collection of polygons, including with holes.
No idea if this was ever published in a paper! 




git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54579 954f8c5b-7b00-dc11-b283-0030488c597c
skip fix from r54579 when holes aren't used (keeps bmesh ngon filling fast)


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54580 954f8c5b-7b00-dc11-b283-0030488c597c
revert own commit r54450, this works on X11 but not in Windows and caused bug [#34255] (which may be a bug in windows ghost?, not getting key release for modifiers).

Cross platform modifier keys on activating window better be handled at ghost level anyway.


git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54581 954f8c5b-7b00-dc11-b283-0030488c597c
Various fixes for UI translation issues (reported by Leon Cheung on bf-translations ML, thanks!).

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54582 954f8c5b-7b00-dc11-b283-0030488c597c
Add some more detailed CUDA error prints to try to debug #34166.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54583 954f8c5b-7b00-dc11-b283-0030488c597c
Fix: Collada Import files with X_UP and Y_UP axis where imported with wrong orientation

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54584 954f8c5b-7b00-dc11-b283-0030488c597c
'Reset to Default Theme' wasn't taking into account those themes that enable panel header/background.



git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54585 954f8c5b-7b00-dc11-b283-0030488c597c
Fix part of #34239: crash with cycles textured draw mode + dynamic topology sculpt.

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54586 954f8c5b-7b00-dc11-b283-0030488c597c
And more UI messages issues fixing... Thanks again to Gabriel Gazzán and Leon Cheung!

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@54587 954f8c5b-7b00-dc11-b283-0030488c597c
rigidbody: Avoid unnecessary simulation updates

Now we flag the world for update on frame change and only call
BKE_rigidbody_do_simulation() when needed.

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