Commit Graph

49837 Commits

Author SHA1 Message Date
Campbell Barton
9cff20e5c6 Correct assert in own last commit 2015-11-12 05:51:39 +11:00
Bastien Montagne
d74fa9c12c Cleanup: readfile.c: use id_us_ensure_real() instead of own custom 'at least one user' handling.
Note that in master this is mere cleanup, which shall not change much things
(aside from FAKE_USER now being taken into account here too), and mostly
makes things more consistent, but in id-remap branch this becomes mandatory
due to better handling of this ugly 'ensure_real' stuff re user count.
2015-11-11 19:52:42 +01:00
Campbell Barton
137ca0b241 Fix T46741: Transform ignores constraint space
Calling transform operator from Python didn't apply the constraints space.
2015-11-12 02:21:56 +11:00
Bastien Montagne
9d18e46ddf And another fix to psys ID handling - ParticleSystem->part **is** user counted! 2015-11-11 16:14:44 +01:00
Bastien Montagne
256f091cbd Fix (unreported) foreach ID looper going over some psys' IDs twice... 2015-11-11 14:59:50 +01:00
Campbell Barton
7b96f02f5b OpenGL Render: Support full-sample Anti-Aliasing
This brings back old (slower), higher quality method.
Useful since graphics cards often use a faster MSAA which only oversamples edges.
2015-11-12 00:25:09 +11:00
Campbell Barton
145298e2d3 Cleanup: GL Render (simplify internal logic)
Reduce code-paths so improvements to 3D view render apply to sequencer too.
2015-11-11 23:07:07 +11:00
Bastien Montagne
fa959715fd Free libraries last, and not first - most datablocks may have link to those... 2015-11-11 12:28:06 +01:00
Bastien Montagne
a9df76b167 Fix (unreported) potential crash: ParticleSystem->part shall never be NULL. 2015-11-11 11:46:25 +01:00
Campbell Barton
69674f3875 Fix T46694: UVLoop incorrectly copied flag
Error in copying customdata flag lead to pin being randomly enabled.
2015-11-11 19:07:04 +11:00
Bastien Montagne
8c84a1873d Cleanup: use func definitions for wm/notifiers/editors ID callbacks. 2015-11-10 20:35:43 +01:00
Campbell Barton
78836c0211 Fix T46743: Crash w/ limit rotation constraint
Using axis-angle + limit rotations 'Transform' option was crashing.
2015-11-11 04:46:55 +11:00
Bastien Montagne
8323e9f790 Cleanup: make readfile.c also use ID_FAKE_USERS. 2015-11-10 17:29:12 +01:00
Campbell Barton
8d9c7e6988 Correct order-of-freeing error from last commit 2015-11-11 03:18:41 +11:00
Bastien Montagne
d9c89f175f Cleanup: ID usercount: moar checks and factorization. No change in behavior expected. 2015-11-10 16:21:09 +01:00
Campbell Barton
3b38fd6bf9 Fix T46720: Crash applying subsurf modifier
Freeing a modifier that had data in the derived mesh could crash
(applying or removing).
2015-11-11 02:05:13 +11:00
Campbell Barton
0024306362 Fix T46711: view3d UI limits not scaled w/ scene
With the scene scale set to 0.001, buttons were clamped to 10m.
2015-11-11 00:58:22 +11:00
Bastien Montagne
c23179f367 Cleanup: minor deduplicate of code. 2015-11-10 14:50:32 +01:00
Bastien Montagne
7bb16a5ccf Fix (unreported) broken background mode of Blender (due to OSD cleanup called also in background mode). 2015-11-10 10:38:41 +01:00
Campbell Barton
738bc300c7 Fix T46738: Crash adding hook to linked mesh dupli 2015-11-10 20:27:27 +11:00
Sergey Sharybin
e26a0c5782 Fix compilation error with IME enabled after recent changes 2015-11-10 14:09:34 +05:00
Bastien Montagne
22c3d2efeb "Fix" assert in new UI align code.
Looks like UI code can produce widgets with same left/top positions (in very narrow space case).
Not nice, but we do not really care, UI becomes unusable way before we reach that point anyway.
2015-11-10 09:27:36 +01:00
Sergey Sharybin
54a04effff Prevent non-button space used as a SPACE_BUTS from template_preview 2015-11-10 13:00:53 +05:00
Campbell Barton
ee761ebda9 Text Editor: use line-number color for margin
also use stipple so you can see the cursor behind it.
2015-11-10 09:19:34 +11:00
Campbell Barton
39497bbb48 Cleanup: move ui-selextend defines into header 2015-11-10 09:07:43 +11:00
Campbell Barton
0d5f845bb5 UI: support editing >400 length text buttons
RNA could define strings as dynamically sized,
but the interface ignored this and clamped them to UI_MAX_DRAW_STR.

Fixes T46734, also fixes possible pasting non-utf8 text into utf8 buttons.
2015-11-10 08:53:42 +11:00
Bastien Montagne
6860ccabc0 Cleanup: BKE_library_update_ID_link_user: use id_us_ensure_real for IDWALK_USER_ONE. 2015-11-09 21:15:11 +01:00
Bastien Montagne
9c6fe810a3 Fake user: add BKE_library helpers to set/clear that flag.
Since it also involves usercount manipulation, safer and cleaner to do it in BKE_library...
2015-11-09 21:00:53 +01:00
Bastien Montagne
f761ae8f11 Rework a bit id_us_min, and make it assert on usercount error. 2015-11-09 21:00:53 +01:00
Bastien Montagne
865796375b Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.
We have callbacks for that, they also do some checks and help ensure things are done
correctly. Only place where this is assumed not true is blenloader (since here we
may affect refcount of library IDs as well...).
2015-11-09 21:00:53 +01:00
Bastien Montagne
cf959a879e Cleanup: readfile: get rid of USER_ONE, replaced by USER_REAL everywhere.
USER_ONE was only ensuring id->us was non-zero, while USER_REAL ensures
it is non-zero **and** >1 in case fake_user flag is set (which at least
ensures us unsetting fake_user won't leave id->us in invalid zero state).
2015-11-09 21:00:53 +01:00
Campbell Barton
edc780c3b0 UI: avoid duplicating the string to set the cursor
Internal change only.
2015-11-10 05:31:29 +11:00
Bastien Montagne
18ecc8a78f Fix broken groupobject usercount handling.
As we can see in (original) read code, ob pointer in groupobject is actually a 'USER_ONE' case.
This was not done in 'add object to group' code, probably because we can assume objects always
have at least one user in that case? Made it explicit now. Also fixed foreach_ID_link looper.

In general we have waaayyyyyy too much 'own handling' of ID->us count in code currently,
will clean up that...
2015-11-09 14:53:03 +01:00
Brecht Van Lommel
56933373e2 Code cleanup: remove some unused mesh laplacian code. 2015-11-08 15:17:29 +01:00
Sergey Sharybin
73977064a6 Remove outdated TODO, it's supported already 2015-11-08 10:20:54 +05:00
Sergey Sharybin
d6059e991a Point Density: Prevent crash when scene is not sent to calc_point_density() 2015-11-08 10:10:55 +05:00
Sergey Sharybin
5f95a4fb33 Remove unused header files
Was a left-over from recent OpenSubdiv changes.
2015-11-08 07:56:39 +05:00
Sergey Sharybin
15a1faefe9 Fix T46712: Crash while rendering Freestyle scene
The issue was in fact caused by missing initialization of motion blur shutter
curve for all new scenes when not using "Copy Scene Settings" option.
2015-11-08 07:29:12 +05:00
Campbell Barton
6208ca25fa Cleanup: ui align header 2015-11-07 17:36:10 +11:00
Campbell Barton
dcc41c4f78 Cleanup: spelling, headers 2015-11-07 17:31:28 +11:00
Bastien Montagne
02f3cebf6e Fix T46522: DataTransfer modifier: Impossible to set multiple transfer modes by script
(if they're on different properties).

This patch basically gets rid of (ui-related) hack where we was adding specific
'fake' enums for datatypes needing additional options.

That was done because of broken UI code - to summarize, 'align' code did not support
correctly layout mixing vertical and horizontal sub-layouts, in particular if
it was 'column-major'.

A complete rewrite of this align code has been done, so now we can use a more
sane UI code.
2015-11-06 19:27:39 +01:00
Bastien Montagne
3d39b98f94 New uialign code, based on 2D positions of widgets.
This new code fixes a tons of issues with previous one, which basically was epic-failing
in many non-basic cases (especially mixed columns and rows with column-dominant layout).

It basically no more relies over order of buttons declaration in the uiBlock, instead it
finds and stores spatial neighbors and uses that data to compute needed stitching.
See code comments for details.

New code seems to be roughly ten times slower than old one (for complex grouped layouts),
that is, about a few microsecconds per alignment group - this remains reasonable.

Also, ui-align code becomming rather big in itself, it was separated in
own new `interface_align.c` file.

Reviewers: campbellbarton, severin

Reviewed By: campbellbarton, severin

Differential Revision: https://developer.blender.org/D1573
2015-11-06 18:54:33 +01:00
Sergey Sharybin
97c8619b42 Fix T46587: Drivers do not work in node groups
This commit makes drivers on node groups to with when using new dependency graph.

Still TODO: Need a relation between drivers and tree evaluation  perhaps, so we
guarantee proper order of all operations.
2015-11-06 18:36:22 +05:00
Campbell Barton
1ffdb1b472 Fix T46696: Voxel crash indexing over INT_MAX
Use int64_t for index values.
2015-11-06 20:09:56 +11:00
Julian Eisel
4b316e78b6 Draw limit & mist indicators darker for non-active cameras
Darkens the colors for limit and mist indicators of non-active cameras. This makes it easier to see which indicators belong to the active camera and which don't.
Useful for layouts with multiple cameras.

Requested by the Caminandes team.
2015-11-05 19:41:39 +01:00
Campbell Barton
7a09d15ade Cleanup: comments/style 2015-11-06 05:34:05 +11:00
Campbell Barton
1adc196723 Correct error in recent commit 2015-11-06 01:56:29 +11:00
Campbell Barton
131c2a2bef Use 'beauty' for sculpt triangulation
Causes fewer degenerate quads.
2015-11-06 01:13:23 +11:00
Campbell Barton
0f769afe07 Fix T46692: Triangulate creates duplicate faces
Caused a crash in dyntopo.
2015-11-06 01:13:23 +11:00
Bastien Montagne
cb39a4171b Fix T46691: Graph Editor, Channel, Toggle Channel Editability. Cannot reassign hotkey after removing it.
Anim Channels keymap is not editor-related...
2015-11-05 12:57:52 +01:00