Commit Graph

55720 Commits

Author SHA1 Message Date
Campbell Barton ad98f00d1f PyAPI: Support multi-dimensional RNA slice assignment
This was already supported for getting slices.
2016-03-08 19:36:12 +11:00
Campbell Barton 846080e6bc Fix Py API array assignment not clamping values 2016-03-08 15:33:28 +11:00
Campbell Barton 02cabdac5a Fix crash loading some library blend files
Blend files with screen but no scene would crash.
2016-03-08 06:56:42 +11:00
Campbell Barton 95983baa09 Fix missing weight invert w/ shrink-wrap modifier 2016-03-08 06:18:46 +11:00
Campbell Barton 27d160f6ca Correct docstrings 2016-03-07 21:54:17 +11:00
Julian Eisel 9fe977dbf0 Fix T47706: 'CTRL ALT Left Mouse' clicking on the dope sheet summary line crashes Blender
Simple NULL-check seems fine here, working as it should now. Most likely caused by rBc4dc14b079d81.
2016-03-07 11:21:01 +01:00
Campbell Barton 19ec1bfa89 Fix T47691: Missing redraw w/ pop-up dialogs
Search buttons would overwrite existing callbacks, even when they weren't needed.
Causing missing updates for search buttons in pop-ups.
2016-03-07 16:38:22 +11:00
Campbell Barton 431a5b623e Fix T47688: Regression in gl_load
Error caused by 771f73b6
2016-03-07 14:31:45 +11:00
Campbell Barton 42e8660272 Simple Deform modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:28:21 +11:00
Campbell Barton d086f6aa5c Shrink Wrap modifier: invert vgroup option
D1839 from @Orgold
2016-03-07 11:24:03 +11:00
Campbell Barton 5fd0c1ed3f BMesh: avoid assert dissolving degenerate faces
For dissolving 2-sided faces, theres no need to check they are valid before removal.
2016-03-06 17:25:56 +11:00
Brecht Van Lommel 6bfd88acd9 Fix T47670: cycles GLSL incorrect normal map node. 2016-03-06 06:55:20 +01:00
Brecht Van Lommel 002deb29cb Fix T47670: cycles GLSL incorrect layer weight / fresnel.
World space and view space normals were mixed up, we should only convert from
world to view space if a custom normal is connected, otherwise it is already in
view space.
2016-03-05 14:33:41 +01:00
Campbell Barton 40b748d40f Fix for missing update changing VFont.filepath
Changing the filepath wouldn't reload the font even after calling scene.update().
2016-03-05 17:40:33 +11:00
Campbell Barton 4e500101a7 Cleanup: quiet -Wcomma, cast to void where needed 2016-03-05 09:16:12 +11:00
Campbell Barton fea07c1a63 Cleanup: unnecessary comma use
Also use SWAP macro
2016-03-05 09:13:16 +11:00
Campbell Barton acebfbb666 Cleanup: unnecessary comma use 2016-03-05 09:12:07 +11:00
Campbell Barton 5513762946 Alternate fix for virtual-pixel update not working
On changing, clear drawable window to force update.
2016-03-05 06:37:56 +11:00
Campbell Barton f33e44151e Revert "Fix changing virtual pixelsize having no affect if only main window is open"
This reverts commit fe7bab1343.

Setting correct context is important,
but this is setting DPI and widget unit on *every* mouse move.
2016-03-05 06:31:40 +11:00
Julian Eisel fe7bab1343 Fix changing virtual pixelsize having no affect if only main window is open
Changing virtual pixelsize only had an affect when a second window was open. (Was also possible to trigger update by opening another window.)

Steps to reproduce:
* Change any editor into user preferences *in main window*
* Change virtual pixel size -> nothing happens
2016-03-04 18:13:01 +01:00
Julian Eisel e0da0a1492 Fix menu aliged to right side of screen in UserPref window
Only applied in a really few cases actually.

To reproduce:
* Open User Preferences *in own window*
* Search for node wrangler add-on (it's one of the few cases where this happens)
* Enable and open details
* Click on one of the menues in the add-on preferences

Actually this was reproducable in any window, user preference area just had to take up most/all of the width.

Note: I'm not totally sure if just disabling these lines is correct, but I didn't find any issues or any information why this was needed. So it seems to be redundant.
2016-03-04 16:52:17 +01:00
Bastien Montagne d8b8a6e275 Fix T47683: broken BBox logic when drawing duplis.
Once a dupli had a valid bbox, that bbox would be used for all following objects
without bbox, instead of skipping clipping check.

Issue unveiled by rB3fa0a1a5bc0ff2, but not related at all (in fact, bug was present before that commit).
2016-03-04 12:35:52 +01:00
Campbell Barton f2c40ca9f0 Fix uninitialized memory use lattice-boundbox
Many other places weren't clearing boundbox dirty flag after calculation.
2016-03-04 21:50:54 +11:00
Campbell Barton b8417501ab Cleanup: suspicious use of commas 2016-03-04 16:38:41 +11:00
Campbell Barton 4ec61ff9f6 Curve/line width change broke outline drawing
Partially revert e29a5ba6
2016-03-04 14:53:36 +11:00
Campbell Barton 9c8b6cc3fd Docs: include mathutils.interpolate 2016-03-04 08:40:22 +11:00
Campbell Barton c38087afc0 Correct image format args (remove 'MOVIE') 2016-03-04 06:36:13 +11:00
Campbell Barton 63d25b47b8 Docs: minor comment correction 2016-03-04 06:36:13 +11:00
Campbell Barton 6d673f8f0c Docs: comment on poly flipping w/ solidify 2016-03-04 06:36:13 +11:00
Campbell Barton b0bd39c12a Use IOError exception failing to write blend file 2016-03-04 06:36:13 +11:00
Bastien Montagne d377f1445a Fix T47676, take two: also do some 'regular file' versionning (allows to handle users own default startup files, among others...). 2016-03-03 16:06:49 +01:00
Bastien Montagne 8ead4990d3 Fix T47676: Broken default values for particle brush strength.
Current startup .blend has old (percent?) values for particle brush strength.

Since rBe4e21480d6331903c90ab073746484498441e1ac, UI controls do not clamp automatically values anymore,
which means when you first enable comb (or any other brush) you get a 50 strength, waaaayyyy to powerful.

This commit fixes this in `BLO_update_defaults_startup_blend`, note that it does not fix custom users'
startup files, nothing to do here...
2016-03-03 15:48:50 +01:00
Bastien Montagne b47137ae46 Fix T47644: crash (use-after-free) regression from rB7a74738914a66e.
Handling `me` data here is not good idea anyway, we override it completly with data
from `tmp` (crash came from freeing already existing bb from me, while pointer still existed in tmp).

(rediscovered it while working on T47676...).

To be backported to 2.77.
2016-03-03 15:03:23 +01:00
Sergey Sharybin 29902e0242 Fix player (c) 2016-03-03 16:11:05 +05:00
Sergey Sharybin 8c113a95e3 Make texture node threaded
Quite trivial idea -- just pass tread ID to the texture sampling function.

Implemented as a TLS to avoid passing huge amount of extra contexts around.
Should be working on all platforms, but compilation test is required.

Reviewers: juicyfruit, campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1831
2016-03-03 16:02:31 +05:00
Sergey Sharybin ba7eb0c7b9 Add utility macro to work with thread local storage 2016-03-03 16:02:31 +05:00
Campbell Barton 3e5414e490 PyAPI: API for selectively writing data-blocks
Useful for writing asset-libraries to a file, eg.

`bpy.data.libraries.write(filepath, datablocks, relative_remap=False, fake_user=False)`
2016-03-03 21:50:20 +11:00
Campbell Barton b02b8a3c00 Refactor BKE_copybuffer for general partial saving
Move to re-usable BKE_blendfile_write_partial API
2016-03-03 21:11:22 +11:00
Sergey Sharybin 82cf78dfe8 Avoid some obvious crashes when running out memory allocating render result 2016-03-03 13:21:04 +05:00
Sergey Sharybin e8bffa7a50 Render Save Buffers: Use proper memory buffer size for a display buffer 2016-03-03 13:13:42 +05:00
Campbell Barton 1776ad53b9 Cleanup: take Main argument for copy 2016-03-03 13:35:21 +11:00
Campbell Barton cfaba8ad6c Fix RNA property clamp assigning in Python
On first assignment the value was clamped, but successive assignments weren't.
2016-03-03 12:36:33 +11:00
Campbell Barton 8fa1d70543 Cleanup: comments for creator_args & line length 2016-03-03 12:36:33 +11:00
Campbell Barton 2177f64585 Armature edit-mode: Add clear-roll operator, Alt-R 2016-03-03 11:45:43 +11:00
Campbell Barton f7062b2407 Increase max-frame to 500,000
Note that we could increase to 524286 without loosing subframe precision,
however this is a round number allowing for longer video export / animations.

See T46859 for details.
2016-03-03 08:47:31 +11:00
Bastien Montagne f51ef8ac4d Correction to own previous rB9c0de0084bfe.
'1mm+1m' would fail with original fix, now consuming all alpha chars before checking unit again...
2016-03-02 18:12:14 +01:00
Bastien Montagne ae0901bb09 Fix bplayer (c)
Seriously...
2016-03-02 18:04:26 +01:00
Bastien Montagne 9c0de0084b Fix T47661: cm (centimeter) unit breaks m (meter) unit in Metric.
`m` unit when used after `cm`/`mm`/etc. ones would get ignored, and the alt version of miles
would be used instead.

The root of the issue is that, in `unit_find_str`, once we get a 'hit' for a unit, we check
it's actual unit (since 'm' would also hit on 'cm', 'mm', etc.). In case that hit is not a
valid unit one, we would just return NULL, breaking the cycle of checks over that unit, and
hence missing all later usages of it.

So now, in case we have an 'invalid unit hit', we immediately retry to find it within remaining string.
2016-03-02 18:02:19 +01:00
Sergey Sharybin bee0a7587b Fix crash accessing nodes search menu
Was caused by d49985c.
2016-03-02 17:58:34 +05:00
Sergey Sharybin 83824947ba Avoid node tree update tag when changed nodes which are not affecting result
This was we don't have re-compo or viewport re-rendering happening when changing
nodes which are not connected to the output at all (for example when adding new
nodes or changing settings for unconnected nodes).

Only basic operations are covered for now. checks could be added to more tools
when needed.

Currently it's not fully optimal implementation, but seems to work fast enough.
Don't see reliable alternative to that -- keeping tag in the node wouldn't work
because of the node groups (which are probably already broken, but should be
easy to solve with current approach). So guess it's more matter of optimizing
path search from a node to output.

Before processing forward let's check whether it's indeed something we want
and whether the approach is indeed not fully bad.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision: https://developer.blender.org/D1765
2016-03-02 17:58:34 +05:00