Commit Graph

12883 Commits

Author SHA1 Message Date
Lukas Tönne
0297763afa Tweak for smoothing limits in stretch-constraint volume preservation.
Uses a arctan instead of sine function now, which has the advantage of
not overestimating the bulging.
2014-10-14 11:03:13 +02:00
Bastien Montagne
cd2295f93e BLI_bitmap: add a macro to set/clear the whole bitmap at once. 2014-10-14 09:40:35 +02:00
Lukas Tönne
f9cbb908a3 Integrated limits for volume preservation in stretch-to constraints.
Currently the volume variation feature in stretch constraints is
unlimited. This has to be compensated by riggers by adding scale limit
constraints, but these are unaware of the stretch orientation and can
lead to flipping. Also the stretch calculation itself is not working
properly and can lead to collapsing volume.

The patch fixes this with several modifications:
- Interpret the volume variation factor as exponent, which works better
  with large values for artistic purposes.
- Add integrated limits to the volume "bulge" factor, so secondary
  constraints for compensation become unnecessary
- Add a smoothness factor to make limits less visible.

Eventually a generic volume preservation constraint would be nicer,
because multiple constraints currently implement volume variation of
their own. This feature could actually work very nicely independent from
other constraint features.

Differential Revision: https://developer.blender.org/D826
2014-10-13 19:58:53 +02:00
Tamito Kajiyama
f4a260fb3c Fix T42198: Linked lines only work with linked objects.
The reported issue was caused by a backward incompatibility due to careless
code changes made when per-material Freestyle line colors were introduced
in rB7915d7277ac8c605f016f30f943080556244fb59.  In 2.71 line style
Material color/alpha/thickness modifiers was retrieving alpha transparency
from Material.alpha, whereas in 2.72 Material.line_color[3] was referenced.

The present fix reverts the aforementioned code changes.

This issue is a regression from 2.71, so the fix is appropriate for inclusion in
the 2.72a release.
2014-10-14 01:14:33 +09:00
Campbell Barton
a4258d40a1 BLI_utildefines: add SQUARE macro
also minor cleanup
2014-10-13 15:36:13 +02:00
Bastien Montagne
116439ed91 Mesh calc smooth group: several fixes.
* Consider non-manifold edges as sharp, as in split normals handling.
* Consider edges from sharp polys as sharp!!!
* Fix returned number of groups (was off-by-one for non-bitflags grouping, could also
  be wrong in case of id overflow).

Note about using sharp polys too to define groups: Only current use of this function
(Obj exporter) does not need that, because it does its own check for sharp faces.
However, we might reuse that func in other places in future (e.g. in custom split
normals area), so better to get a consistent behavior!
2014-10-13 14:03:39 +02:00
Campbell Barton
545308fd10 Sculpt: update dystopia debug verify 2014-10-11 17:57:46 +02:00
Sergey Sharybin
067f70cff7 Code cleanup: tabs vs. spaces (tm) commit 2014-10-10 20:17:56 +06:00
Campbell Barton
e640b4fb72 Sculpt: remove offset args from internal funcs
Detect this from the element type, also typecheck lookup functions
2014-10-10 12:38:04 +02:00
Campbell Barton
642c8243e7 BLI_buffer: empty macro 2014-10-10 10:10:13 +02:00
Campbell Barton
30dab51c29 Cleanup: use bool and const args 2014-10-09 22:44:03 +02:00
Antony Riakiotakis
016e75ad64 Fix T42139, vertical noise stripe patterns in noise texture.
Two fixes here (only the second one is strictly needed to fix the issue,
but both make the system better).

First is introduction of a random generator array for use with threaded
systems where each thread needs to access its own number generator.
The random texture now uses this so it should not be influenced by other
random generator reseedings of the main random generator like it did
before.

Second, I reshuffled the texture code to resample the upper bits of the
random number first. According to Numerical Recipes, this is where the
most variance can be found, so by sampling those we avoid correlation
issues. Also, multiplying here is not ideal because if a pair of bits
are zero, then the whole result will also be zero.

Overall this is much more random (tm) than before, however result will
also be brighter, since we now have less black spots. Tweaking the
brightness/contrast should somewhat fix that, generally having the same
result as before is not possible anyway if we are to really fix this.

Also, seems like exposing procedural depth might be nice here since it
influences the precision of the texture lookup.
2014-10-09 15:48:52 +02:00
Jason Wilkins
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
Campbell Barton
22e9f4f838 Sculpt: dyntopo, avoid redundant gset remove calls 2014-10-07 20:26:17 +02:00
Antony Riakiotakis
c03951da14 Texture painting:
Do not generate materials/images/UVs if they are missing.

Now we spawn a panel ("Missing Data") with operators to generate the missing data and
pop a warning if user tries to paint without them.

The reason we have reverted this is that it is too easy to end up with more textures
than we wanted. It was impossible to enter texture paint without having textures added,
and code makes too many assumptions about what user may want.

Discussed during Sunday's meeting.

This might be a candidate for 2.72a but I'm not sure how other artists will take this
(and how refined and crash-free it is), better make a few iterations first.

And for interested parties...test please, don't wait until after a release to poke with such issues.

Also, add slot operator now adds a new unconnected image node in cycles. Only
used in the "Missing Data" panel. This should be a separate commit but I am squashing it into the same commit because
it relies too much on changes done here and can be reverted easily if complainstorm occurs again.
2014-10-06 20:10:12 +02:00
Bastien Montagne
29bb5f9a69 Fix Cycles crashing with previous own commit.
Behavior with NULL context was wrong.
2014-10-06 18:00:56 +02:00
Bastien Montagne
8cb1b35bee Fix T40350: Some texture prop did not have visual feedback they were driven.
This is only a (hacky) partial fix, actually, since `RNA_property_animated()` will still
not work in those cases... Better that than nothing, though.

Thanks to Campbell for review.
2014-10-06 17:08:24 +02:00
Campbell Barton
471a011122 Cleanup: remove old preview code 2014-10-06 14:08:41 +02:00
Campbell Barton
b15d9ecb6d Cleanup: remove paranoid NULL checks 2014-10-06 12:23:47 +02:00
Campbell Barton
9cfcddc8f4 Dyntopo: minor speedup collapsing edges 2014-10-06 12:16:06 +02:00
Thomas Dinges
8f36d260d3 2.73 Release Cycle: Alpha. 2014-10-03 15:43:30 +02:00
Campbell Barton
bc0411f687 Fix for 2-sided faces in array modifier 2014-10-03 14:36:34 +02:00
Antony Riakiotakis
72f557d34e Sculpting:
Grab and Snake hook brushes now support strength. To keep compatibility
with older brushes, this commit also sets strength to 1.0 for those
brushes.
2014-10-03 13:14:10 +02:00
Campbell Barton
230c272fe3 Comments: note on bmesh_region_match
also correct buffer type
2014-10-03 08:21:14 +02:00
Sergey Sharybin
617131410c Fix T42008: Dragging and packing issue about new blank image
The issue was caused by the fact that we never used to store the
generated image color in DNA, so image reload will loose this
information.

Now we store the color in DNA, making ti so re-loading the image
will preserve it's generated color.

It is now also possible to change generated image color using the
color swatch in image properties after the image was created.
2014-10-02 19:06:35 +06:00
Tamito Kajiyama
2cb134be2b Freestyle: New line style options for sorting and chain selection.
The following two sort keys are added for sorting chains.

* Projected X - Sort by the projected X value in the image coordinate system.
* Projected Y - Sort by the projected Y value in the image coordinate system.

A new line style option for the selection of first N chains is also added.

Moreover, the chain sorting and chain selection operations are now executed
in this order instead of the reverse order used previously.  The UI has also
changed accordingly.  This functional change is backward compatible and
won't result in visual differences.
2014-10-01 16:01:40 +09:00
Bastien Montagne
c7684b456a Fix T42026: Unit scale affects camera focal length.
Not a regression, yet maybe simple/safe enough for 2.72?
2014-09-30 15:07:44 +02:00
Sergey Sharybin
4268f1c8f2 Fix T42018: Crash when displaying beveled poly-curves with spline bevfac mapping
This fix is for 2.72.
2014-09-30 15:58:19 +06:00
Sergey Sharybin
9a19fd5811 Fix T41955: lamp error: double update for all lamps
This is actually also safe for 2.72 :)
2014-09-29 15:05:02 +06:00
Campbell Barton
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
Kévin Dietrich
e1afaa02bf Fix T41974: blender ships vulnerable minilzo version
Update lzo library due to security issue

Update lzo to latest version. This fixes a security issue (reported in T41974)

This also fixes some (false-positive) valgrind warnings.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D803
2014-09-28 01:35:12 +06:00
Campbell Barton
88d8cb73af Cleanup 2014-09-27 00:57:54 +10:00
Sergey Sharybin
d653500152 Tracking: Some minor improvements to copy-paste
- Deselect all existing tracks when pasteing, makes it
  easier to tweak stuff after the paste.

- Make first of the pasted tracks active.
2014-09-26 14:49:06 +06:00
Tamito Kajiyama
2854b93202 Fix for missing initialization of Freestyle RenderData parameters for new scenes. 2014-09-26 12:05:18 +09:00
Brecht Van Lommel
87c27ef92f Fix use of uninitialized variable in mesh_get_mapped_verts_coords.
It did not cause an actual bug, this code path is never executed at the moment.
2014-09-26 00:03:57 +02:00
Sergey Sharybin
058e3f087e Tracking: Decouple C-API module into more granular files
This way maintaining the C-API is a bit less tedious job
and makes code cleaner to follow.

Should be no functional changes.
2014-09-25 17:04:56 +06:00
Campbell Barton
6f2f80887b GHash: use bool for comparison (simplify compare) 2014-09-25 06:16:37 +10:00
Campbell Barton
6dae643450 Correct for change in recent commit 2014-09-24 20:46:27 +10:00
Campbell Barton
d0bd474375 Custom Data API: redundant pointer-to-pointer arg 2014-09-24 18:50:29 +10:00
Campbell Barton
059e0dafb4 Cleanup: const correctness for BLI_sortlist 2014-09-24 14:55:02 +10:00
Campbell Barton
31833d2dc8 Cleanup: use const for read-only arrays 2014-09-24 14:55:02 +10:00
Campbell Barton
3a40aed3d5 Cleanup: use float versions of functions when in/output are floats 2014-09-24 14:55:02 +10:00
Campbell Barton
e7f495d8a0 Cleanup: bool 2014-09-24 14:55:01 +10:00
Campbell Barton
7ae60703a2 Version Bump: Entering 2.72 rc state 2014-09-24 02:18:15 +10:00
Campbell Barton
c9a7789bcf Corrent recent commit: off by one error 2014-09-22 13:23:42 +10:00
Campbell Barton
1004a7db97 Correct MAX_LIBARRAY define, assert when its wrong 2014-09-22 12:04:14 +10:00
Antony Riakiotakis
070ce416b9 One last tweak to palette deletion code. It would correct active color
only when deleting the last color.
2014-09-18 13:03:02 +02:00
Antony Riakiotakis
b247e19ff1 Palettes
* Remove some duplication in deletion code
* Fix crash when restoring file from last saved state.
2014-09-18 12:07:17 +02:00
Antony Riakiotakis
e6271d2367 Palettes:
Avoid having an invalid active index if user deletes a color.

Also attempt to set active color on clicking (Not working yet but fix
coming soon)
2014-09-18 11:16:31 +02:00
Campbell Barton
3c28eecb6e Fix T41862: Autosmooth & multi-material glitch 2014-09-18 14:55:33 +10:00