Commit Graph

49420 Commits

Author SHA1 Message Date
Matt Heimlich
3fbc984b06 Nodes: add absolute value operation to all math nodes
Reviewed By: dingto, brecht

Differential Revision: https://developer.blender.org/D507
2014-05-07 16:43:59 +02:00
Tamito Kajiyama
1d03a8b309 Freestyle: minor code clean-up. 2014-05-07 23:16:24 +09:00
Tamito Kajiyama
fe0236be78 Freestyle: time/space optimization in stroke rendering without textures.
When strokes do not have textures assigned, UV coordinates are not computed now.
This will save a bit of time and space in stroke rendering.
2014-05-07 23:16:23 +09:00
Tamito Kajiyama
dfe800b4a8 Freestyle: debug statistics on stroke rendering. 2014-05-07 23:16:22 +09:00
Lukas Tönne
79c345acc2 Fix T40033: Jumping between versions can lead to loss of node storage
data.

Saving a file with a new blender node that uses bNode->storage data and
then loading that in an older version will make the node undefined, but
still retain the original type identifier (in case it is defined later).

If the file is then saved over and loaded again in the newer version,
where the node type is defined, it won't have a valid storage struct.
To handle such cases gracefully, check if storage data is expected but
doesn't exist when initializing node types. User then at least get a
chance of fixing the problem manually.

Suggested fix by @brecht.
2014-05-07 11:46:30 +02:00
Campbell Barton
a8dddca0fe playanim: check for escape key while loading images
(todo from 2.4x)
2014-05-07 18:18:21 +10:00
Campbell Barton
5e55fc21b7 Fix T40051: Inconsistent dupli vert/face handling of group member types 2014-05-07 17:11:33 +10:00
Campbell Barton
dcabd3f81f Fix for dropping images into the 3D View
- wasn't allocing image-user.
- wasn't managing user counts.
2014-05-07 16:53:58 +10:00
Lukas Tönne
77d11a52b3 Fix T40052, Grid Particles Crash due to invalid empty mesh verts access
for bbox calculation.
2014-05-07 07:58:35 +02:00
Campbell Barton
0710d9dfd1 Fix crash binding mdef with no faces 2014-05-07 14:14:27 +10:00
Campbell Barton
5e3509e2d2 Remove redundant NULL check 2014-05-07 14:14:27 +10:00
Joshua Leung
2679eaa712 Bugfix: Bend modifier's angle property has crazy limits
As reported by ZanQdo on IRC, the bend modifier's "angle" property had a range
of +/- 572.95 degrees (equivalent to 10 radians). From the looks of things, this
was simply something overlooked when doing degrees to radians conversions. Now
it has a range of +/- 180 degrees.
2014-05-07 14:20:03 +12:00
Joshua Leung
aad0907644 Get rid of custom tooltip for pushdown button 2014-05-07 14:20:02 +12:00
Tamito Kajiyama
a351ff7264 Freestyle: removed the dummy implementation of a texture manager.
Legacy texture shaders from the original stand-alone Freestyle program are also
declared as deprecated, in favor of Blender's new line style textures.

Patch contribution by Paolo Acampora.  Thanks!
2014-05-07 10:57:32 +09:00
Antony Riakiotakis
2e07109feb Code cleanup: naming.
Prepend BKE_ to the functions moved in blenkernel for recent bug fix.
2014-05-07 02:59:23 +03:00
Antony Riakiotakis
02b1dbef8c Fix T39653 crash on drawing modified UVs
Just a case of uninitialized material array.
Make sure object materials are initialized properly when drawing UVs.

This might look strange since we do not really need materials here.
However, the same GPU object may be used in a 3D viewport and if we try
to avoid initializing the materials somehow this will break.

Also, this breaks on full screen UV editor as is apparent from this
report.
2014-05-07 02:52:31 +03:00
Dalai Felinto
d653c70ee6 Bake API: force opengl reload and mipmap recalc (fix T40055) 2014-05-06 19:30:54 -03:00
Dalai Felinto
2c4ea2a11e Bake API: fix T40054 - baked image update on uv/imag editor for linear/float/noncolor, ...
All image colorspaces should be displaying correctly in the UV/Image Editor.

Viewport may still present an issue, but it was reported separately
anyways (T40055)

Patch reviewed (and corrected) by Sergey Sharybin
2014-05-06 18:25:41 -03:00
Antony Riakiotakis
20f7aaf6be Fix issue discovered while investigating T39950:
Sculpt mode drawing fails after deleting a subsurf modifier
in sculpt mode and undoing.

This was quite difficult to spot. Main cause was that mesh data was not
synchronized properly between undo and sculpt code because we generated
a pbvh on derivedmesh invalidation without really refreshing the rest of
the data. This could result in undo and drawing operating on different
data.

To solve this and avoid bad level calls I had to move quite some code
around. Crazyspace is now moved to blenkernel, as did some sculpt calls
that make sure sculpt data are properly refreshed.
2014-05-06 23:44:06 +03:00
Campbell Barton
af704c6d88 Style cleanup 2014-05-07 06:11:28 +10:00
Campbell Barton
182179a44b Cleanup: redundant NULL checks 2014-05-07 04:35:55 +10:00
Lukas Tönne
5cee409d42 Followup fix to T39966.
The previous fix was not quite correct:
* It would use the same wireframe/bbox check in viewport- and regular render
* The duplicator loop in Blender Internal is more permissive now to avoid disabling wireframe duplicators, but this means we need to check is_object_hidden right before making render objects to ensure this still works.
2014-05-06 17:47:48 +02:00
Dalai Felinto
9fe618e309 Fix T40048: Cycles bake crashes Blender [when there is no image]
The struct with the images was not NULL initialized.
2014-05-06 11:59:51 -03:00
Sergey Sharybin
63a66478f5 Over-optimized stuff in the previous commit, sorry. 2014-05-06 16:56:24 +02:00
Sergey Sharybin
09f5dff244 Fixes to previous sculpting tweaks
undo didn't work, layer and smooth crashed..
2014-05-06 16:27:45 +02:00
Sergey Sharybin
45b4506c0d Cleanup a bit of the locked shape keys painting
It's still gives some slowdown when painting a locked
key in the solid view, but since shape key is now longer
being re-used by DM.

but this change should still give some degree of speedup
propagating delta onto the keyblock if i remember the
code correct.
2014-05-06 14:49:50 +02:00
Campbell Barton
35380cdcad Fix for uninitialized unit_use_radians variable with inset and bevel 2014-05-06 19:20:03 +10:00
Campbell Barton
7fddd7f013 Fix for own recent change to menu shortcut behavior
Missed setting the flag for operator-menus.
Now call `ui_but_add_shortcut` to match the rest of the api.
2014-05-06 18:14:00 +10:00
Tamito Kajiyama
a6f92cd29a Freestyle: added more conditions to be able to switch to the line style texture properties context. 2014-05-06 16:58:57 +09:00
Campbell Barton
7660218202 Correct fix for knife interior use, distance needed to be in object-space 2014-05-06 09:32:06 +10:00
Campbell Barton
d2920e9876 Knife too: was using a ray-cast direction scaled down by the knife epsilon 2014-05-06 09:02:16 +10:00
Campbell Barton
cd9aed7059 Fix T38623: Knife tool completely failing on interior geometry 2014-05-06 08:35:43 +10:00
Antony Riakiotakis
4638ca0ebe Fix T39956.
Even locked shape keys need to be flushed if user is in textured or
wireframe mode.
2014-05-05 22:39:55 +03:00
Antony Riakiotakis
312d3edee5 Hidden PBVH nodes:
Set hidden when rebuilding the PBVH tree if all primitives are hidden.
2014-05-05 22:24:13 +03:00
Bastien Montagne
036de9bfa5 Make bpy.types.EditBone.matrix writeable.
Makes importing armatures from matrices (FBX...) *much* easier.
2014-05-05 20:57:52 +02:00
Antony Riakiotakis
9a1c47de44 Attempt to solve T39950,
Avoid filling up buffers when total buffer triangles are zero.

Better still would be to tag a node as hidden when doing recreation of
the PBVH tree by checking for any visible elements. Original bug report
probably has to do with OpenGL doing something funky but hidden nodes
should be tagged as hidden to completely avoid iterating for painting.
This is to be done in a later commit.

Also some naming cleanup for consistency, GPU_build_pbvh_mesh_buffers to
GPU_build_mesh_pbvh_buffers.
2014-05-05 21:13:27 +03:00
Antony Riakiotakis
fbfaa4770d Fix T39322, hair not rendered in rendered mode viewport after returning
from particle edit mode.

Check for object particle edit mode, not psys->edit. This won't get
freed on exit (which might be worth considering doing, maybe?)
2014-05-05 19:51:58 +03:00
Tamito Kajiyama
ef1e511bb6 Another attempt to fully fix T40020: Freestyle: dashed lines crashes blender.
Problem report by flokkievids through rB047c3aa728a4bb944616a084805988714b796d52#1.
Thanks!
2014-05-05 22:30:00 +09:00
Tamito Kajiyama
f5d9f45a6f Freestyle: Revised a UI text for better understandability in the Outliner. 2014-05-05 19:54:55 +09:00
Campbell Barton
38a430c027 Fix T40029: Apply transform to empties reset their location
also add check for negative scale
2014-05-05 15:47:25 +10:00
Campbell Barton
b82d639f3d Stop all dynamic enums using translations (from blend file data) 2014-05-05 15:23:35 +10:00
Campbell Barton
cf069afdfd Fix: T40016 ID Names translated in menus 2014-05-05 15:09:29 +10:00
Tamito Kajiyama
047c3aa728 Fix T40020: Freestyle: dashed lines crashes blender.
The crash was due to an out-of-range vertex index reference that occured while
computing texture coordinates of strokes with tips.
2014-05-05 11:33:53 +09:00
Campbell Barton
620901426c Code cleanup 2014-05-05 12:29:28 +10:00
Joshua Leung
6d2c23bf70 NLA Pushdown Operator: Active animdata option + More error handling
* If channel_index = -1, the pushdown operator will try to use the active AnimData
  block. To see which one this will be, check the properties (NKEY) region in NLA Editor.
* Added more detailed error handling for the various cases where things are not
  in a valid state for pushing down an action. This is notably to stop scripters
  from putting the NLA into an inconsistent state.
2014-05-05 14:16:41 +12:00
Joshua Leung
4e0aa0e7f2 NLA Editor: Added dedicated operator for the pushdown operation 2014-05-05 14:16:41 +12:00
Joshua Leung
e5c306b101 Code Cleanup: Remove old deprecated NLA channel drawing code 2014-05-05 14:16:40 +12:00
Joshua Leung
1e577739e7 NLA Editor: Polishing a few rough edges with the cleanup 2014-05-05 14:16:39 +12:00
Joshua Leung
da6b1ca27d NLA Editor: Second part of porting NLA Action channel to standard drawing system
This now works (barring one or two minor glitches and the operator on the pushdown
button being a bit of a hack). The old drawing code is still in place though, and
will be kept around for a little while yet while the last kinks are ironed out.
2014-05-05 14:16:38 +12:00
Joshua Leung
b2784d33ce NLA Editor Drawing: Set up AnimChannelType callbacks for drawing NLA Editor
This commit lays some of the groundwork needed to port the last of the NLA Editor
channel types that's still defined using custom code. By moving this code over
to the newer standardised framework, this will enable widgets to have tooltips
to make it easier for users to find out what various buttons do.

Currently this isn't hooked up to anything though.
2014-05-05 14:16:38 +12:00