Commit Graph

7490 Commits

Author SHA1 Message Date
Sergey Sharybin
ed2ddc9f70 Support multiple distortion models, including a new division model
This commit makes it so CameraIntrinsics is no longer hardcoded
to use the traditional polynomial radial distortion model. Currently
the distortion code has generic logic which is shared between
different distortion models, but had no other models until now.

This moves everything specific to the polynomial radial distortion
to a subclass PolynomialDistortionCameraIntrinsics(), and adds a
new division distortion model suitable for cameras such as the
GoPro which have much stronger distortion due to their fisheye lens.

This also cleans up the internal API of CameraIntrinsics to make
it easier to understand and reduces old C-style code.

New distortion model is available in the Lens panel of MCE.

- Polynomial is the old well-known model
- Division is the new one which s intended to deal better with huge
  distortion.

Coefficients of this model works independent from each other
and for division model one probably want to have positive values
to have a barrel distortion.
2014-04-17 17:28:41 +06:00
Bastien Montagne
7d45ddae33 Add Edge sharp/smooth to 3DView shading panel, as well as new Vert sharp/smooth. 2014-04-16 15:26:48 +02:00
Tamito Kajiyama
e1e519bfc0 Fix my last commit cad4bfe: Added 'use_' prefix to Freestyle edge/face mark properties. 2014-04-15 14:44:08 +09:00
Campbell Barton
ea610e655c Style cleanup: C & pep8 2014-04-15 13:11:48 +10:00
Bastien Montagne
18e4224142 Split Normals I (1/5): basis for split normals (nearly nothing user-visible here):
* Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf).
  EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit.
* Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it
  (tessellation, rna access, etc.).
* Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable
  split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding
  this option is now incoherent, will be addressed in a separate commit.

Reviewers: campbellbarton

CC: brecht

Differential Revision: https://developer.blender.org/D365
2014-04-13 12:19:00 +02:00
Tamito Kajiyama
716803c0a0 Fix for Sinus Displacement and 2D Offset stroke geometry modifiers.
These modifiers were not working properly when they were applied to strokes
whose backbone was already modified by other geometry shaders.  This problem
was due to the use of Normal2DF0D that compute 2D vertex normals based on
the underlying FEdges up on which initial stroke geometry is defined.  Now vertex
normals are computed on the basis of modified stroke vertices.

A helper function 'stroke_normal' for computing normals of stroke vertices was
added to the 'freestyle.utils' API module.
2014-04-11 15:16:46 +09:00
Bastien Montagne
8714ae09f8 Fix T39563: Tiny unit-display problem in constraint panels.
There is no good solution here, since RNA props can only have one type/unit.
Tried to find the less worse one - have different RNA props for same DNA value
(a bit like the angle/length for camera lens).

Also fixed two other issues with Transform conctraint:
* Angle were still in degrees (yes, another backward-compatibility breacking).
* Scale was absolute, unlike loc/rot.

Also cleaned up a bit the code, replaced some magic numbers by proper enums, ...
2014-04-07 12:17:01 +02:00
Campbell Barton
0ebade55fc Fix T37509: regression in smart-uv island orientation 2014-04-03 22:03:53 +11:00
Campbell Barton
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
Kevin Dietrich
cb7cfd3ab6 Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D230
2014-04-02 11:53:44 +02:00
Jens Verwiebe
16537a8f89 Sculpt: the thread controls where unintentianlly greyed out along with capabilities.has_gravity condition 2014-04-01 22:52:10 +02:00
Grigory Revzin
420da872a6 Fix T39378: Revert, Recover Last Session and Load Factory Settings have no prompt.
Now they do, to make it harder to accidentally press them and lose work.

Reviewed By: brecht, carter2422

Differential Revision: https://developer.blender.org/D440
2014-04-01 18:00:07 +02:00
Campbell Barton
d25ba1eccd Changes to openmp threads commit (UI and RNA)
- use same names as render threads
- remove OpenMP from UI
- remove details from tips
2014-04-01 08:30:24 +11:00
Bastien Montagne
42fca2f145 Usual UI messages fixes... 2014-03-31 21:15:56 +02:00
Antony Riakiotakis
262fd0865a Revert using slider for detail size on previous commit, makes changing
detail slightly harder.
2014-03-31 20:01:28 +03:00
Antony Riakiotakis
fa3d9f4fbd Make dyntopo detail size maximum smaller (more than 40 pixels should not
be needed according to mapping in code) and change the property to
float.
2014-03-31 19:30:51 +03:00
Jens Verwiebe
277fb1a31f Sculpt/dyntopo: Make the omp threads configurable to overcome performance issues
- autodetect optimal default, which typically avoids HT threads
- can store setting in .blend per scene
- this does not touch general omp max threads, due i found other areas where the calculations are fitting for huge corecount
- Intel notes, some of the older generation processors with HyperThreading would not provide significant performance boost for FPU intensive applications. On those systems you might want to set OMP_NUM_THREADS = total number of cores (not total number of hardware theads).
2014-03-31 13:51:49 +02:00
Campbell Barton
2fc7d04804 Add Simple randomize vertex tool
D432 from Walid Shouman with normal & uniform options added.
2014-03-31 14:56:43 +11:00
Sergey Sharybin
1af69b6df3 Implement asymmetric and free handles type for masks
Summary:
The title actually says it all, it's just possible to
have independent free handles for mask splines. Also
it's now possible to have aligned handles displayed
as independent handles.

Required changes in quite a few places, but they're
rather straightforward.

From user perspective there's one really visible change
which is removed Handle Type menu from the panel. With
asymmetric handles it's not clear which handle type to
display there. So now the only way to change handle type
is via V-key menu.

Rewrote normal evaluation function to make it deal
with new type of handles we support. Now it works in
the following way:

- Offset the original spline by maximal weight
- Calculate vector between corresponding U positions
  on offset and original spline
- Normalize this vector.

Seems to be giving more adequate results and doesn't
tend to self-intersect as much as old behavior used to,

There're still some changes which needed to be done, but
which are planned for further patch:

- Support colors and handle size via themes.
- Make handles color-coded, just the same as done for
  regular bezier splines in 3D viewport.

Additional changes to make roto workflow even better:
- Use circles to draw handles
- Support AA for handles
- Change click-create-drag to change curvature of the
  spline instead of adjusting point position.

Reviewers: campbellbarton

CC: sebastian_k, hype, cronk

Differential Revision: http://developer.blender.org/D121
2014-03-28 17:54:38 +06:00
Lukas Treyer
97cb76a45d Bevel Factor Mapping
Bevel Factor Mapping allows to control the relation between bevel factors
(number between 0 and 1) and the rendered start and end point of a beveled
spline.

There are three options: "Resolution", "Segments", "Spline". "Resolution"
option maps bevel factors as it was done < 2.71, "Spline" and "Segments"
are new.

* "Resolution“: Map the bevel factor to the number of subdivisions of a
  spline (U resolution).
* "Segments“: Map the bevel factor to the length of a segment and to the
  number of subdivisions of a segment.
* "Spline": Map the bevel factor to the length of a spline.

Reviewers: yakca, sergey, campbellbarton

CC: sanne

Differential Revision: https://developer.blender.org/D294
2014-03-28 16:44:33 +06:00
Sv. Lockal
7397ef8666 UI: Fix more double ":" in UI labels 2014-03-27 07:15:08 +04:00
Thomas Beck
7b644952c1 UI: Dynamic paint labels had a double ":" at the end of some strings like "Vertex Group::" 2014-03-26 23:27:51 +01:00
Antony Riakiotakis
0adc1ba209 Attempt to fix T39412
do not use different stroke property names for different paint systems.
This was done due to different stroke sets being supported for each
system, but this lead to trouble if we changed the names (due to
different stroke sets being supported) and users created custom keymaps
with the old property name saved.

The first part of this fix addresses master. A similar commit will be
done to soc-2013-paint.
2014-03-27 00:04:59 +02:00
Bastien Montagne
9d45431a35 Follow Blender slangs! ;) 2014-03-25 21:17:04 +01:00
Antony Riakiotakis
1c22ba1e0e UI naming:
Change topology panel labels to "dyntopo"
2014-03-24 23:17:29 +02:00
Bastien Montagne
7a21330421 Fix T39356: unsatisfied with uv pin unpin button, small bug 2014-03-23 14:30:10 +01:00
Thomas Dinges
d18e4cf6ee Fix typo in API documentation. 2014-03-23 12:31:08 +01:00
Bastien Montagne
4c73001093 Fix T39353: Make Single User menu entries do not work correctly. 2014-03-23 11:33:40 +01:00
Antony Riakiotakis
97e26494ee Slight cosmetic improvement on UI. Add eyedropper icon to detail sample
operator and move it next to the detail slider
2014-03-23 00:01:46 +02:00
Antony Riakiotakis
e732c5809c Detail sampling operator
Located on topology panel.

To use just click on button and click on mesh.
Operator will just use the dimensions of the triangles below to set the
constant detail setting.

Also changed pair of scale/detail size with nice separate float
percentage value.
2014-03-22 23:35:41 +02:00
Antony Riakiotakis
0ef416722e Flood fill for dyntopo constant detail mode.
Nothing spectacular here, fill tools are easy. Just take the dyntopo
code and repeat until nothing more to do.

The tool can be located in the dyntopo panel when the dyntopo constant
detail is on.

Also added scale factor for constant detail. This may change when detail
sampling gets in, I am not very happy with having two numbers here,
still it will give some more control for now.
2014-03-22 17:47:18 +02:00
Joshua Leung
daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
Sergey Sharybin
29f359c975 Fix T39270: Since as the Move Clip Editor have only two modes, menu on tab is needless 2014-03-20 16:08:42 +06:00
Campbell Barton
cc2cdfb08a Code cleanup: de-triplicate add menu/toolbars, also style edits 2014-03-20 01:34:24 +11:00
Bastien Montagne
7698322846 Usual UI messages fixes... 2014-03-19 15:25:32 +01:00
Campbell Barton
22873eaeba Fix T31598: smart UV failed for small faces
previous fixes only tweaked epsilon, but logic for skipping zero area
boxes was still wrong.
2014-03-18 01:34:14 +11:00
Thomas Dinges
13ae541be4 UI: Move OpenGL Settings (AA and Alpha) into the Info Editor render menu. 2014-03-15 17:37:42 +01:00
Joshua Leung
0dd52d1b26 UI Tweak: Add a convenience button for switching to Bone Constraints Tab
To reduce user confusion, we were already presenting users with an error message
when they tried to edit constraints for bones from the Object Constraints tab.
This commit just makes things more convenient by adding a button which takes
users to the right tab when clicked.
2014-03-15 11:45:53 +13:00
Bastien Montagne
0c6e74436f Fix T39158: Help > Operator Cheat Sheet causes a python recursive loop.
Core issue exists since ages - the thing you get from bpy.types.YOUR_OT_operator is fuzzy, and may change,
due to the fact that both Operator and OperatorProperties share the same name...
Would be cool to get rid of this issue one day, but for now it's safer to use rna acessor...

This commit is to be backported to 2.70.
2014-03-13 17:37:19 +01:00
Campbell Barton
a349a3a94e UI: Show edge draw options for duplis, it applied to their instances 2014-03-14 02:15:18 +11:00
Campbell Barton
ba81fb70b2 NDOF: enable orbit sensitivity menuitem outside 3d view
The color picker uses.
2014-03-12 03:38:07 +11:00
Tamito Kajiyama
a7ab389d54 Fix for missing 'field-of-view angle' property for a panoramic camera. 2014-03-12 00:08:28 +09:00
Bastien Montagne
a2ffd8e423 Fix T39028: Quadview views inaccessible with python except bottom right view.
Expose all four quadviews in a collection in RNA API.

Note the region returned by old region_quadview property is now region_quadviews[2].
2014-03-11 15:22:09 +01:00
Lukas Tönne
658b4c0d56 New Corner Pin node: uses explicit corner values for a plane warp transformation.
This was suggested by Christopher Barrett (terrachild). Corner pin is a common feature in compositing.

The corners for the plane warping can be defined by using vector node inputs to allow using perspective plane transformations without having to go via the MovieClip editor tracking data.
Uses the same math as the PlaneTrack node, but without the link to MovieClip and Object.

{F78199}

The code for PlaneTrack operations has been restructured a bit to share it with the CornerPin node.

* PlaneDistortCommonOperation.h/.cpp: Shared generic code for warping images based on 4 plane corners and a perspective matrix generated from these. Contains operation base classes for both the WarpImage and Mask operations.

* PlaneTrackOperation.h/.cpp: Current plane track node operations, based on the common code above. These add pointers to MovieClip and Object which define the track data from wich to read the corners.

* PlaneCornerPinOperation.h/.cpp: New corner pin variant, using explicit input sockets for the plane corners.

One downside of the current compositor design is that there is no concept of invariables (constants) that don't vary over the image space. This has already been an issue for Blur nodes (size input is usually constant except when "variable size" is enabled) and a few others. For the corner pin node it is necessary that the corner input sockets are also invariant. They have to be evaluated for each tile now, otherwise the data is not available. This in turn makes it necessary to make the operation "complex" and request full input buffers, which adds unnecessary overhead.
2014-03-11 14:12:08 +01:00
Sergey Sharybin
48e99c0820 Revert changes to submodules
NEVER use `git commit .` or stage submodules. Leave it to platform maintainers!

See [1] where you'll find few hooks which would help you preventing
accidental commit of submodules.

[1] http://wiki.blender.org/index.php/User:Nazg-gul/DevTools#Git_hooks
2014-03-10 15:17:22 +06:00
Lukas Tönne
19935f0fc3 Fix for potential bug in copy-to-selected ui button operator: Return
value was mixing operator result with an int/boolean.
2014-03-10 09:51:59 +01:00
Antony Riakiotakis
03afa6f9e7 Experimental dyntopo feature:
Dyntopo detail in object space. This allows to set the detail in
percentage of blender units and sculpt in this detail constantly,
regardless of the distance to the mesh.

This commit just enables the functionality, which is really trivial.
There will be some more commits like detail flood fill and
detail sampling in the future.
2014-03-06 20:15:44 +02:00
Jens Verwiebe
68ef6797b2 OSX: adapt codesigning_rules_<binary>r.plist’s to 2.70 2014-03-06 10:16:13 +01:00
Sergey Sharybin
19f7f9afab Update submdules hashes
- Addons and locales now points to v2.70-rc tag
- Also updated hashes for addons_contrib and scons
  to make them up-to-date while i'm on updating this
  hashes.
2014-03-06 00:37:30 +06:00
Campbell Barton
f56a74566a Bump version to Blender2.70rc and new splash
Splash concept art & paint-over: David Revoy. 3D artwork by Mathieu Auvray.
2014-03-06 04:40:49 +11:00