Commit Graph

49420 Commits

Author SHA1 Message Date
Campbell Barton
d9e0a94675 Fix T37939: Crash on exit (reading from freed node trees) 2013-12-26 08:57:44 +11:00
Campbell Barton
ca36091266 correction to last commit 2013-12-26 08:37:28 +11:00
Campbell Barton
7a3594dbd7 BGE: Add missing NULL check from recent LOD updates 2013-12-26 08:28:00 +11:00
Campbell Barton
a5606fadbb Code Cleanup: remove object arg to CDDM_from_mesh mesh_create_derived 2013-12-26 08:27:08 +11:00
Sergej Reich
07ebe89364 Missed this in last commit 2013-12-25 19:25:46 +01:00
Sergej Reich
1fef90695e 3D View: Draw rigid body collision shapes. 2013-12-25 19:17:00 +01:00
Sergej Reich
c15062015c 3D View: Fix drawing bounds for game engine
Needs to be drawn around the origin to accurately represent collision
shapes.
2013-12-25 19:17:00 +01:00
Sergey Sharybin
e5aaa9d387 Code cleanup: no need to switch to threaded alloc, it's done by task pool 2013-12-25 20:35:20 +06:00
Sergey Sharybin
64aef25b83 Use generic task scheduler for threaded image processor
It allows to schedule tasks of smaller size without having
threads overhead or extra worry about splitting tasks into
smaller pieces.

This simplifies code in color management which was manually
splitting task into smaller chunks to keep memory usage low.

Further optimization is possible by avoid malloc called from
threads, but that's how it used to work for ages already
and would be optimized as a separate patch.
2013-12-25 20:32:13 +06:00
Sergey Sharybin
cdd95e354e Motion tracking curves: correct some operator's poll functions
Curve selection and transform were allowed in cases track's motion
curve wasn't visible.
2013-12-25 19:36:54 +06:00
Sergey Sharybin
28b671d98f Implement per-frame track reprojection error visualization
It is now possible to display per-frame track reprojection
error in curve view of clip editor. Simply enable corresponding
option in filter buttons.

Currently displayed using blue color which might confuse with
average reprojection error, further color tweaks are possible
and easy.

Also changed icon track x/y curves. Better icons here are
really appreciated.
2013-12-25 19:24:04 +06:00
Sergey Sharybin
122e2b4bfa Fix T37709: Memory corruption when freeing custom bone shape objects
Summary:
Issue was caused by access to pchan->custom object from channel free
function when freeing all objects from main. Order of objects free
is not defined and such an access might easily end up with access
to freed memory.

We don't need to do user counter stuff when freeing main, so added
an _ex functions with do_id_user flag which is used when freeing main.

We had the same issue with other datablocks, so now it should be
easier to support relevant user counter.

This issue was caused by the fix for T36391, so perhaps that's indeed
high time to do real user counter.

Reviewers: brecht, campbellbarton

Reviewed By: campbellbarton

Maniphest Tasks: T37709

Differential Revision: https://developer.blender.org/D137
2013-12-25 16:43:26 +06:00
Campbell Barton
7f4533fa49 String API: BLI_ascii_strtolower/upper now check NULL terminator
This wasn't needed before now, but since recent change to bUnit_ReplaceString,
it uses in a context where NULL terminator is expected - best add.
(spotted by Sergey)
2013-12-25 01:20:46 +11:00
Campbell Barton
3ffba79ac6 Fix for own recent commit 2013-12-24 18:56:07 +11:00
Campbell Barton
8901701808 UI: Display alpha checkers in image info's color swatch. 2013-12-24 17:20:37 +11:00
Campbell Barton
8a3d3de3ae UI: fix for slight glitch drawing image info
Using sub-pixel position made the text clip badly sometimes.
2013-12-24 15:06:38 +11:00
Campbell Barton
d064968c27 Fix T37914: Mask modifier behaves differently until painted 2013-12-24 14:39:14 +11:00
Campbell Barton
04a902965e BMesh optimize face splitting by taking loops rather then verts
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
HG1
d94db03ac8 Style cleanup: BGE 2013-12-24 05:44:54 +11:00
Campbell Barton
0a5e00e8e8 Code Cleanup: style 2013-12-24 05:04:29 +11:00
Simon Repp
632c29fef3 UI: communicate external data autopack better in the UI.
Previously there was no way to see if autopack was enabled. Now the external
data menu has 3 entries instead of 2:

* Automatically Pack Into .blend (with checkbox to indicate autopack on/off)
* Pack All Into .blend
* Unpack All Into Files

Fixes T37608, includes modifications by Brecht from the original patch.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D118
2013-12-23 18:55:48 +01:00
Sergey Sharybin
3cc7978f19 Move python threading stuff to own file in bf_python_ext
This way blender player can easily use BPY_thread_save/restore.
Not so much important for master branch, but crucial to solve
linking issues in threaded depsgraph branch.
2013-12-23 23:14:10 +06:00
Sergey Sharybin
890be761f5 Make makesdna capable of detecting 32bit alignment issues on 64bit platform
Summary: Just some extra comparison between native and 32bit structure length was needed.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D131
2013-12-23 21:37:39 +06:00
Brecht Van Lommel
6c1525c99f Fix compile error on 32 bits linux / windows, wireframe modifier needs padding.
Thanks to Scott Petrovic and Jia Wang for submitting fixes.

Differential Revision: http://developer.blender.org/D126
Differential Revision: http://developer.blender.org/D130
2013-12-23 15:50:30 +01:00
Campbell Barton
133bc4b991 BMesh API: optimize BM_edge_exists(). 2013-12-23 16:57:39 +11:00
Campbell Barton
63a2cc2ab7 BMesh API: make simple, low level functions inline 2013-12-23 16:03:07 +11:00
Campbell Barton
2a2c27b175 Fix for crash when no args where given with -o, -x command line args
Patch D123 from djnz (Masakazu Ito)
2013-12-23 13:08:32 +11:00
Campbell Barton
7294c54db0 UI: Resolve T37917, disable tooltip scaling (zoomout only) 2013-12-23 12:46:50 +11:00
Campbell Barton
9fa7c235f3 Fix for tooltip right side having zero offset 2013-12-23 12:42:46 +11:00
Campbell Barton
0a61116e54 Fix for converting unfilled 3d text into a mesh 2013-12-23 12:12:40 +11:00
Campbell Barton
7b8622457b Dupliverts: avoid calculating normals if not used 2013-12-23 10:55:40 +11:00
Sergey Sharybin
ff9974ed69 Fix T37898: blenderplayer painfully slow in recent builds
Issue was caused by recent image cache rewrite and root of
the issue goes to the fact that blender player doesn't
initialize cache limiter and it uses 32meg of memory only.

This leads to infinite image loading/freeing.

For now disabled cache limiter in game engine, this brings
back old behavior.

In theory we might be smarter here, but better caching
policy is to be discussed.
2013-12-22 15:26:59 +06:00
Sergey Sharybin
78698a2ecf Add ItemDestroyable to the cache limitor
This callback is used when cache limiter needs to remove
some cached objects when running out of limit.

From blender side it's used to keep painted images always
in memory.

This fixes issue when painted images were removing from
the memory after image cache rewrite.
2013-12-22 14:44:56 +06:00
Campbell Barton
c7a970a78e Code Cleanup: de-duplicate constraint checks with armature join 2013-12-22 16:05:09 +11:00
Campbell Barton
c1c26c36f6 Style Cleanup: remove preprocessor indentation (updated wiki style guide too) 2013-12-22 14:12:19 +11:00
Campbell Barton
1500d9962c error in recent commit (this is getting ridiculous),
faces were flipping the wrong way
2013-12-22 07:27:07 +11:00
Campbell Barton
b01cbede04 error in last commit, missing normal update. 2013-12-22 07:19:48 +11:00
Campbell Barton
a183aa6c67 error in last commit, flag names. 2013-12-22 07:16:41 +11:00
Campbell Barton
d5263c37fa Modifier: New Wireframe Modifier
Based on patch originally by Thomas Beck,
uses options similar to solidify.
2013-12-22 07:13:48 +11:00
Campbell Barton
01acc2a7dc EditMesh: wireframe tool, add offset and vgroup support (not used yet) 2013-12-22 06:54:37 +11:00
Campbell Barton
c80c596194 Fix for mesh deform modifier missing copy for flag. 2013-12-22 04:45:00 +11:00
Campbell Barton
158b4e61a0 Mesh Modifiers: refactor copying using a generic function 2013-12-22 04:37:26 +11:00
Bastien Montagne
87cc890aef Support units in modal numinput
Summary:
This completly changes the way modal numinput is handled. Now, edited expression is a string, which then gets unit- and py-evaluated to get a float value.

We gain many power and flexibility, but lose a few "shortcuts" like '-' to negate, or '/' to inverse (if they are really needed, we still can add them with modifiers, like e.g. ctrl-/ or so).

Features:
- units (cm, ", deg, etc.).
- basic operations from python/BKE_unit (+, *, **, etc.), and math constants and functions (pi, sin, etc.).
- you can navigate in edited value (left/right key, ctrl to move by block) and insert/delete chars, e.g. to fix a typo without having to rewrite everything.
- you can go to next/previous value with (ctrl-)TAB key.
- As before, hitting backspace after having deleted all leading chars will first reset the edited value to init state, and on second press, the whole "modal numinput" editing will be cancelled, going back to usual transform with mouse.

Notes:
- Did not touch to how values are shown in header when modal numinput is not enabled (would do that in another commit), so this is still quite inconsistent.
- Added back radian support in BKE_unit.
- Added arcminute/arcsecond to BKE_unit.
(those unit changes affect all angle UI controls, btw, so you can now enter radians or longitude/latitude values when in degrees units).

Related to T37600.

Reviewers: brecht, campbellbarton, carter2422

Reviewed By: brecht, campbellbarton, carter2422
Thanks everybody!

Differential Revision: http://developer.blender.org/D61
2013-12-21 17:44:48 +01:00
Sergey Sharybin
f72b86da8c Fix T37906: Adding force field settings to boids gives hard crash
Was a regression since fix for another bug T37189.
2013-12-21 20:35:47 +06:00
Sergey Sharybin
b9d732e047 Fix T37907: Crash when change screen layout to "Motion Tracking"
Was a bug in recent change from my own.

Also fixed cache line being displayed twice.
2013-12-21 20:26:23 +06:00
Bastien Montagne
14c9899a69 Fix T37903: Operator log serialization broken for sets.
Was a mistake in rB9d6f05ed style edits (TRUE became false ;) ).
2013-12-20 23:35:28 +01:00
Brecht Van Lommel
163e544006 Fix bookmarks not appearing in file browser after "copy previous settings". 2013-12-20 17:57:11 +01:00
Sergey Sharybin
aec90a8faf Fix wrong display of movie clip cache with mask overlay enabled 2013-12-20 22:17:43 +06:00
Antony Riakiotakis
26aeb81d00 Slightly improve undo performance in dyntopo when last operator was mask
modification. In that case no pbvh needs to be freed and recreated and
we can get away just with draw buffer update (all of them for now. When
pbvh nodes get logged for undo we will be able to only update the
affected ones).
2013-12-20 13:42:03 +02:00
Joshua Leung
48b9680578 Fix T37883: Dope Sheet - Selecting object channels in AnimEditors doesn't make them active
There was probably a reason in the past why this wasn't desirable, but since we allow
bones to be properly selected when clicking on corresponding channels here, we may as
well allow this case too.
2013-12-20 23:55:44 +13:00