Commit Graph

6893 Commits

Author SHA1 Message Date
Campbell Barton
e03bbcec65 fix [#35453] "copy mirrored uv coords" doesn't work
- made precision configurable.
- report a warning when doubles are found since they cause problems.

added Polygon.center attribute to avoid calculating in python.
2013-06-05 03:10:29 +00:00
Gaia Clary
6d9fcdf983 Added 'clear active group' to object data properties -> Vertex Groups -> pulldown menu 2013-06-04 22:30:41 +00:00
Campbell Barton
48fd740096 edit-mesh improvements to select shortest path
- Ctrl+RMB only worked for edges & faces
- Menu item 'Select Shortest Path' only worked for vertices.

Now Ctrl+RMB works for vertices and the menu item works for verts/edges/faces (depending on the current selection).
2013-06-04 01:23:51 +00:00
Campbell Barton
790e9d9fa0 fix [#35311] Planar Decimate / Limited Dissolve fails to merge some adjacent faces
optionally limit by face flipping, also added support to delimit by material and edge crease.
2013-06-03 05:07:16 +00:00
Tamito Kajiyama
d8c2709414 Better API design for making text datablocks after loading.
An optional 'internal' argument was added to the bpy.data.texts.load() operator.  
The changes in revision 57153 were reverted, so that the is_in_memory and is_dirty
properties of text datablocks are not editable again.

In the C API layer, BKE_text_load_ex() was introduced to allow for optionally
making text datablocks internal after loading.
2013-06-02 17:52:06 +00:00
Campbell Barton
5506ab080d add vertex slide to mesh edit toolbar. also expose merge as a menu (rather then button causing popup) 2013-06-02 17:32:45 +00:00
Tamito Kajiyama
829581bbbd Fix for potential division by zero during Freestyle stroke rendering.
Problem report by Light BWK through personal communications with a
sample .blend file for reproducing the problem.  Thanks!
2013-06-02 11:42:04 +00:00
Campbell Barton
a8c55a612b remove duplicate operator,
select-split and unlink-selection did the same thing,
keep select split since it fits closer to mesh editmode and single key access (Ykey).
2013-06-02 00:29:30 +00:00
Tamito Kajiyama
67fb85b5f2 Added a short-cut button in the Freestyle Python Scripting mode for loading
a style module file as a text datablock and appending it to the style module
stack.
2013-06-01 22:37:15 +00:00
Lukas Toenne
26ce8bfada Don't hide sockets in the node properties panel. This feature is only useful to reduce the size and clutter of actual nodes, in the panel it's better to show all meaningful inputs. 2013-06-01 12:45:45 +00:00
Campbell Barton
a4186f301b minor changes to toolbar
- expose unwrap as a menu (rather then a regular button that pops up a menu)
- move 2 extrude buttons into one menu button, also do the same for the mesh menu.
2013-06-01 05:26:37 +00:00
Campbell Barton
2d4a682a8e add popup menu to allow python scripts to show popups without having to define a menu class first. 2013-06-01 04:06:38 +00:00
Sergey Sharybin
7b5318ef46 Follow up to previous commit
Made Ctrl-LMB clear selection from the object.
2013-05-31 09:55:34 +00:00
Sergey Sharybin
5f3c394d04 Fix #35567: Shift+LMB doesn't toggle selection when using the Maya preset
Also added back RMB to set 3d cursor position.
2013-05-31 09:49:52 +00:00
Sergey Sharybin
79f5a013be Patch #35464: Marker placement for motion tracker by clicking on a desired location
Now button in the toolshelf behaves this way:
- User clicks on "Add Marker"
- Then he clicks where the marker should get placed

Patch by Marcos Couto (ocf) with own modifications.
2013-05-30 11:37:53 +00:00
Sergey Sharybin
cf5e979fb4 Motion tracking: automatic keyframe selection
Implements an automatic keyframe selection algorithm which uses
couple of approaches to find out best keyframes candidates:

- First, slightly modifier Pollefeys's criteria is used, which
  limits correspondence ration from 80% to 100%. This allows to
  reject keyframe candidate early without doing heavy math in
  cases there're not much common features with first keyframe.

- Second step is based on Geometric Robust Information Criteria
  (aka GRIC), which checks whether features motion between
  candidate keyframes is better defined by homography or
  fundamental matrices.

  To be a good keyframe candidate, fundamental matrix need to
  define motion better than homography (in this case F-GRIC will
  be smaller than H-GRIC).

  This two criteria are well described in this paper:
  http://www.cs.ait.ac.th/~mdailey/papers/Tahir-KeyFrame.pdf

- Final step is based on estimating reconstruction error of
  a full-scene solution using candidate keyframes. This part
  is based on the following paper:

  ftp://ftp.tnt.uni-hannover.de/pub/papers/2004/ECCV2004-TTHBAW.pdf

  This step requires reconstruction using candidate keyframes
  and obtaining covariance matrix of 3D points positions.
  Reconstruction was done pretty much straightforward using
  other simple pipeline routines, and for covariance estimation
  pseudo-inverse of Hessian is used, which is in this case
  (J^T * J)+, where + denotes pseudo-inverse.

  Jacobian matrix is estimating using Ceres evaluate API.

  This is also crucial to get rid of possible gauge ambiguity,
  which is in our case made by zero-ing 7 (by gauge freedoms
  number) eigen values in pseudo-inverse.

  There're still room for improving and optimizing the code,
  but we need some point to start with anyway :)

  Thanks to Keir Mierle and Sameer Agarwal who assisted a lot
  to make this feature working.
2013-05-30 09:03:49 +00:00
Campbell Barton
0d496b8dce svn merge ^/tags/blender-2.67b-release/blender -c57122 2013-05-29 18:18:11 +00:00
Sergey Sharybin
bcf32407c1 Fix #35374: Region overlap + bugs
Was missing keymap for REGION_TIMER, which ended up
in missing updates happening.

Added this kind of timer to RNA, so keymaps could
bind to it.

Also made 3ds max keymap working again. Too bad it
was broken in 2.67 and 2.67a :S
2013-05-29 16:03:09 +00:00
Campbell Barton
d73529b296 scene render dimension panal: avoid re-creating the framerate string on every redraw, cache the string for reuse.
also remove redundant returns from my last commit.
2013-05-29 14:55:06 +00:00
Lukas Toenne
902dbbe301 Replacement for the "Active Node" panel in node editor properties sidebar. This panel is now defined in space_node.py instead of node_buttons.c. The properties have been split up into generic properties
(name, label), custom colors (closed by default) and input parameters (extra options + unlinked input socket values).
2013-05-29 12:43:37 +00:00
Campbell Barton
0b51ecb9a8 workaround for search menu enum using freed python scripts (py api limitation). 2013-05-29 11:55:35 +00:00
Campbell Barton
de3686ac25 fix [#34851] "UnitSettings.scale_length" not beeing calculated the same way for all objects 2013-05-28 23:07:16 +00:00
Lukas Toenne
81ba62e1e9 Fix for node menu: Show the group input/output nodes in the Input/Output categories respectively, so they can be added with the usual UI in case the user deletes them. These nodes are polled out for
non-group trees (node trees not in the bpy.data.node_groups collection) to avoid confusion. For that purpose a new optional poll function argument has been added to NodeItem, which allows selectively
polling individual items in an otherwise static list.
2013-05-28 09:45:34 +00:00
Brecht Van Lommel
bb15701f86 Particles: patch #35205 by Jakub Zolcik
The Emission panel now has a Use Modifier Stack option to emit particles from
the mesh with modifiers applied. Previously particles would only be emitted from
faces that exist in the original mesh. There are some caveats however:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.68/Tools#Particles
2013-05-27 17:11:05 +00:00
Campbell Barton
5460e31d56 now an addons preference are available when it start,
this change is made so addons may initialize their own settings.
2013-05-27 16:12:06 +00:00
Campbell Barton
8e6ce736c4 disable auto indent when pasting text into the python console. 2013-05-24 01:04:37 +00:00
Thomas Dinges
99b325cebf Cycles / Toon BSDF:
* Added a toon bsdf node to Cycles. This was already available as OSL only closure, but is now available inside the SVM backed as well, for CPU and GPU rendering. 
* There are 2 variations available, diffuse and glossy toon, selectable via a menu inside the node. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Toon

Example render & blend file:
http://www.pasteall.org/pic/show.php?id=51970
http://www.pasteall.org/blend/21579
2013-05-23 17:45:20 +00:00
Campbell Barton
4625e70430 fix/workaround for problem with osx permissions. 2013-05-23 03:35:57 +00:00
Sergey Sharybin
4c0e50011e Fix #35461: Marker gets initialized to arbitrary position
Use center of currently visible frame part instead of
center of the whole frame for position of marker which
is adding from toolbox.

Used separate operator for this to keep operators more
atomic and not confuse with lots of conflicting properties.
2013-05-22 06:06:22 +00:00
Thomas Dinges
07ee0e6f7d Shader Nodes:
* Use unified node sizes, as already was done with compositor nodes. Only Mapping node uses a custom size. This way we don't have too small nodes on creation anymore.
* Don't show Script Category for Blender Internal nodes.
2013-05-21 20:21:46 +00:00
Sergey Sharybin
68b9794a40 Fix #35232: Marker right-click misbehavior on adding
Made it so Add Marker button from toolbox will place
marker in the middle of the frame.
2013-05-21 14:44:50 +00:00
Thomas Dinges
3758193c18 Cycles / Wireframe node:
* Added a wireframe node (Input category) to get access to Mesh wireframe data. 
The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size. 
* Only the triangulated mesh is available now, quads is for later. 

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe

Render and Example file:
http://www.pasteall.org/pic/show.php?id=51731
http://www.pasteall.org/blend/21510
2013-05-20 15:58:37 +00:00
Thomas Dinges
eaf493d323 Cycles / OSL:
* Added Westin Sheen and Westin Backscatter closures for testing, useful for Cloth like effects. 

Only available via OSL, added an example OSL shader to the Templates (Text Editor).
2013-05-18 14:36:03 +00:00
Campbell Barton
a554a031f1 bump to version '2.67a' 2013-05-18 08:47:34 +00:00
Miika Hamalainen
d3a6c0c834 Smoke simulator: Add flow subframes and ability to set custom particle size.
Previously it was nearly impossible to have fast moving objects emitting smoke or they would just leave behind a row of smoke poofs instead of continious stream of smoke. Now it's possible to set number of subframes for each smoke flow.

Another new thing is ability to set size of smoke flow particles instead of using closest smoke cell. This also works with my earlier "full sample" commit, so no more blocky particles either. :)

For more info check my blog post: http://www.miikahweb.com/en/blog/2013/05/17/blender-smoke-subframes

This commit also includes couple of fixes I spotted while testing:
* Fix: dissolve was applied at different time for low res and high res simulations.
* Fix: full sample setting didn't get copied with domain.
2013-05-17 17:45:37 +00:00
Bastien Montagne
9d567dd366 This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...

I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).

This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).

Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.

Thanks to Brecht for reviewing.
2013-05-17 07:10:10 +00:00
Dalai Felinto
49003dd90c partial revert of commit 54126 - (BGE UI: removing " use_occlusion_culling" from the ui)
bug reported by Eloy Felix over email

Apparently there are some files that will perform better with "use_occlusion_culling" off.
For now the UI option can return.

Technically this could make into 2.67a, but the string is not localized (it'll be in English).
Not sure what is more important here:

- consistent UI OR to expose in the UI an option some people need
2013-05-16 21:37:24 +00:00
Brecht Van Lommel
00f0ac8107 Fix #35368:
* Editing number of segments for particle hair did not update the viewport.
* Hidden particles were confusing, the paths were drawn but without the points.
  Now it draws the path faded to indicate that they are hidden/locked.
* Select tips/roots operators now have options to select/deselect/toggle/invert.
2013-05-16 00:07:01 +00:00
Campbell Barton
1df12416ca bmesh, grid fill tool.
This uses 2 edge loops and fills them with a grid, taking into account curvature of surrounding edges.
Access from face menu: Ctrl+F,G

http://www.graphicall.org/ftp/ideasman42/grid_fill.png
2013-05-15 20:34:40 +00:00
Brecht Van Lommel
85530846b6 Fix #35376: node editor throwing python error on some files saved with 2.66 test builds. 2013-05-15 19:24:07 +00:00
Lukas Toenne
916ab30ccb Added an entry for Reroute node in the node categories. Reroute is not a "real" node, but for users it's a bit hard to find, so a menu entry is ok for now.
Eventually a context menu for nodes could be a nicer solution: right-click on node link opening a popup with operators for the node, socket or link under cursor, including option "Insert Reroute".
2013-05-13 09:32:17 +00:00
Sergey Sharybin
d9ca50ff64 Refine markers position operator
This operator will run a tracker from previous
keyframe to current frame for all selected markers.
Current markers positions are considering initial
position guess which could be updated by a tracker
for better match.

Useful in cases when feature disappears from the
frame and then appears again. Usage in this case
is the following:

- When feature point re-appeared on frame, manully
  place marker on it.
- Use Refine Markers operation (which is in Track
  panel) to allow tracker to find a better match.

Depending on direction of tracking use either
Forwards or Backwards refining. It's easy: if
trackign happens forwards, use Refine Frowards,
otherwise use Refine Backwards :)
2013-05-12 16:04:14 +00:00
Pablo Vazquez
128a1c1856 Render Layers UI
Expand the Layers panel by default on Blender Internal as well.
2013-05-12 15:25:35 +00:00
Brecht Van Lommel
8e13bb3f60 Fix #35273: click in empty space to deselect as used by the Maya keymap gave
a python error when used in pose mode.
2013-05-10 20:49:16 +00:00
Miika Hamalainen
2f9f3dd590 Smoke: Add new "Full Sample" option to high resolution smoke panel.
This is hopefully the ultimate solution against smoke blockiness near emitter.

Previously high resolution flow/emitter voxels were generated based on the low resolution ones. So if you had 32 resolution and 4 division high resolution, it still used smoke flow generated from those 32 resolution voxels. Now I introduced a new sampling method called "Full Sample" that generates full resolution flow for for high resolution domain as well.

Read more about it in my blog post: https://www.miikahweb.com/en/blog/2013/05/10/getting-rid-of-smoke-blockiness

Also changed "quick smoke" operator default voxel data interpolation mode to "Cubic B-Spline" to smoothen out it even more.
2013-05-10 16:18:00 +00:00
Sergey Sharybin
764420ed3d Set scene frames operator for clip editor.
This operator will set scene's start/end frames to
match clip's start frame and footage duration.

Available in Clip panel in clip editor's toolbox.
2013-05-10 15:56:32 +00:00
Lukas Toenne
a961b683fc Small fix for node add operators: use the UNDO option so they get registered in undo stack properly. 2013-05-10 09:54:25 +00:00
Bastien Montagne
fffab3993d Bit flag enum props are always expanded, no need to specify it explicitely! 2013-05-09 19:30:09 +00:00
Sergey Sharybin
97138e4dac Added a button to apply scale on scene solution
This is an alternative to using camera to scale the
scene and it's expected to be better solution because
scaling camera leads to issues with z-buffer.

Found the whole scaling thing a bit confusing,
especially for object tracking, but cleaning this up
is a bit different topic.
2013-05-09 16:38:55 +00:00
Campbell Barton
675f845116 use standard name for operator properties - 'props'. 2013-05-09 13:05:36 +00:00