Commit Graph

5986 Commits

Author SHA1 Message Date
Campbell Barton
4f02555004 new mesh tool for cleaning up meshes, splits up non-planar faces while they exceed a given angle threshold
(access from the 'Mesh -> Clean' menu).
2013-07-28 19:53:46 +00:00
Campbell Barton
46aea9c0c8 patch [#36296] object->display-properties subpanel layout cleanup
from David Jeske (jeske), with minor edits of my own.
2013-07-28 11:43:11 +00:00
Campbell Barton
4bc32d5ded mesh tool to fill in holes, added in mesh clean menu,
unlike other face creation tools it copies data from surrounding faces.
2013-07-25 18:43:05 +00:00
Campbell Barton
df0114a17a curve only supported radius smoothing, add smooth for tilt and weight. 2013-07-24 14:30:45 +00:00
Campbell Barton
576161b186 fix [#36262] Paste strip with video or sound content from another file crashes Blender
existing code was very stupid.

- all ID pointers for clipboard strips are handled uniformly.
- clipboard stores a duplicate ID pointer which are restored on paste.
- restoring pointers...
-- use ID's that are still in the database (copy&paste within the same file).
-- fallback to name lookup.
-- fallback to loading them from the original filepath (movie-clip and sound only).

also fix bug pasting where initialing the sound wasn't done if there was no frame-offset.
2013-07-24 06:51:04 +00:00
Campbell Barton
f77405356a remove use_relative option from simple deform,
all modifiers should be using object transformations relatively.
2013-07-23 19:31:49 +00:00
Campbell Barton
4d47f5fe05 snap to cursor (offset option) added for UV's too. 2013-07-21 16:45:38 +00:00
Campbell Barton
7233f22e21 add new snap option: 'Selection to Cursor (Offset)',
rather then moving everything into the cursor location, the current selection centers around the cursor, maintaining their relative distances.
works for mesh, object, pose bones etc.
2013-07-20 17:12:33 +00:00
Campbell Barton
49c61e169b misc edits
- fix for missing None check with recent 'Hidden Wire' draw option.
- avoid int overflow with mesh selection.
- remove ';' outside of functions.
2013-07-20 15:07:57 +00:00
Sv. Lockal
8ff67f12c7 Fix descriptions for mask selection operators and use less ambiguous "letter-spacing" term 2013-07-20 12:24:53 +00:00
Sv. Lockal
3de1458cdf Select more/less tool for mask splines 2013-07-20 10:24:16 +00:00
Thomas Dinges
363b04d15e Cycles / Sampling Presets:
* Values were a bit too small for the Progressive integrator, now we use 12 and 24 (sqared).
2013-07-20 09:29:25 +00:00
Campbell Barton
32f3771d0b hidden wireframe option for mesh editmode, important for retopology mode (can be used with xray). 2013-07-20 03:51:49 +00:00
Thomas Dinges
ac1d58d962 Cycles / Sampling Presets:
* Add Presets for Sampling. This comes with a simple Preview and Final preset, but as this is varying a lot depending on the scene, they should just be a starting point. The user can add own presets here.

* Some UI layout changes to match the settings a bit better.
2013-07-19 23:59:40 +00:00
Campbell Barton
2dc6b22382 patch [#35789] Quick hack select more/less tool for armatures
by Pedro Riera (priera), Andrey Dubravin and parts rewritten by myself.
2013-07-19 10:51:54 +00:00
Campbell Barton
df299ab500 patch [#36032] Quick Hack lattice random selection
by Andrey Dubravin (daa)
2013-07-19 10:44:39 +00:00
Campbell Barton
8053b9a801 re-commit temp workaround [#35920], this still fails for OSX retina display,
but at least it resolves for DPI values other then 72.
2013-07-17 10:48:32 +00:00
Bastien Montagne
20d6cd008b Style cleanup of UI messages.
Mostly, "weight groups" -> "vertex groups", and usual case/endpoints/typos/etc.

As a remainder, please read http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#UI_Messages before writing UI messages!
2013-07-16 13:12:58 +00:00
Campbell Barton
b2b6d56443 move keymap ui into modules, its not loaded on startup anymore. 2013-07-08 22:57:51 +00:00
Campbell Barton
8a388a7bef fix [#36043] Missing Tooltip for Excluded Paths field of Auto Run Python Scripts in User Preferences -> File
also select more/less were flipped for mesh menu compared to everywhere else.
2013-07-08 07:40:32 +00:00
Campbell Barton
2c87b88180 re-arrange space_userpref_keymap, no need to use a subclass here, just import the module and call draw_keymaps().
- making this change now because some addons developers are interested in showing keymap UI in their addons prefs and using the class involved making a fake class instance which isnt needed.
2013-07-08 07:25:33 +00:00
Tamito Kajiyama
15a2287a8e Fix for incorrect clipping of Freestyle strokes when the viewport preview is used. 2013-07-07 15:29:00 +00:00
Campbell Barton
52e083fc3f remove dummy menu which WM_OT_context_menu_enum needed, use popup menu directly instead. 2013-07-06 03:04:48 +00:00
Campbell Barton
7132bfe664 fix [#35977] Bake Action doesn't work properly
there are cases where you want to use visual-keying but not remove constraints, also it wasnt obvious that clearing constraints used a different method of keyframing.
So split these into 2 options.
2013-07-04 23:52:02 +00:00
Tamito Kajiyama
db71b5ef88 Partial fix for Bug #35695: Freestyle produces extra line across an object with pointed areas.
The reported problem is a visual artefact (extra lines) generated by 
ChainingIterators.pySketchyChainingIterator used for sketchy chaining with the Same Object
option disabled in the Parameter Editor mode.  The issue is caused by an inconsistency in
the internal data structure (i.e., view map).  For now this fatal error condition is addressed
to avoid visually incorrect results.  Another fix will follow to address the cause of the
internal inconsistency.
2013-07-04 20:24:22 +00:00
Brecht Van Lommel
1268eda19b Fix #35994: shape key mirror without topology did not properly work after
doing mirror with topology.
2013-07-04 11:37:32 +00:00
Thomas Dinges
285ef99931 Cycles:
* Added 2 new nodes to combine and separate HSV colors. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=54828
2013-07-03 23:46:56 +00:00
Thomas Dinges
e7fc69bdfd Merged revision(s) 57908-57978 from trunk/blender into soc-2013-dingto. 2013-07-03 22:12:42 +00:00
Campbell Barton
75aed60ed8 remove checks for active object in the weight panel, this is incorrect for weight transfer and we better rely on operators poll functions. 2013-07-03 21:07:41 +00:00
Gaia Clary
bce00b605c Weight Paint: Enable Transfer Weights tool for Obejcts with no Vertex Groups 2013-07-03 15:57:30 +00:00
Campbell Barton
ffaebe2237 reduce imports on startup 2013-07-03 01:20:32 +00:00
Campbell Barton
b96aa8800e bump up openmp limit for release,
also remove 'Vertex ' prefix for items in the vertex menu.
2013-07-02 04:34:39 +00:00
Thomas Dinges
465a7195b4 Merged revision(s) 57828-57907 from trunk/blender into soc-2013-dingto 2013-07-01 15:23:48 +00:00
Joshua Leung
4f3f95751a Bugfix [#35936] Can't create new vertex group when using Ctrl G menu
This was caused by r.57812

There were two problems here:
  1) vertex_group_vert_select_unlocked_poll()  had faulty logic which meant that
it always failed when there were no vgroups present yet - the final return
always just fell through
  2) Since the "Assign to New Groups" option was actually implemented using the
same operator as "Assign to Active Group" (just with an extra parameter set), if
the active group was locked, it was not possible to "Assign to New Group" (even
though a new group would not be locked).
2013-07-01 13:02:53 +00:00
Campbell Barton
5ae37494f6 revert own fix for adding nodes with (DPI != 72), the fix doesn't work for OSX retina displays. 2013-06-30 11:56:15 +00:00
Brecht Van Lommel
77e0709e48 Fix #35551: the topology mirror setting affected shape key and vertex group but
this was confusing as there was no setting visible for it. Now these menus
contain an entry to mirror without and with topology mirror.
2013-06-28 17:13:09 +00:00
Gaia Clary
e5ff9cced4 weight Paint: moved Auto Normalize and Multipaint options below Blend selector 2013-06-28 17:10:25 +00:00
Thomas Dinges
4a113cab0a Merged revision(s) 57768-57827 from trunk/blender into soc-2013-dingto 2013-06-27 16:16:54 +00:00
Thomas Dinges
ee85587a43 Blender 2.68 Release maintenance:
* Update readme and release-log links to 2.68.
2013-06-27 11:30:53 +00:00
Campbell Barton
29547509b4 fix for adding nodes with a DPI besides 72 causing offset. 2013-06-27 06:49:23 +00:00
Campbell Barton
3ff36f928c 3d text tool - 'insert lorem' was crashing, also add this to the text menu. 2013-06-27 04:18:01 +00:00
Campbell Barton
2085a42e52 pep8 cleanup 2013-06-27 03:05:19 +00:00
Thomas Dinges
63f1e253c3 Merged revision(s) 57671-57767 from trunk/blender into soc-2013-dingto 2013-06-26 11:46:55 +00:00
Gaia Clary
47cfdc4494 Fixed operator call (due to renamed operator parameter) 2013-06-25 22:58:45 +00:00
Thomas Dinges
00234dab2f Merged revision(s) 57587-57670 from trunk/blender into soc-2013-dingto 2013-06-23 18:04:13 +00:00
Campbell Barton
23c053748d add missing notifiers for mask tools, some wouldn't refresh the compositor. 2013-06-23 15:48:00 +00:00
Campbell Barton
219f3ea85d mask menus were missing from the image editor. 2013-06-23 15:12:26 +00:00
Campbell Barton
c6adbe794e comment the icon file from the theme buttons since its not working. 2013-06-22 18:08:58 +00:00
Campbell Barton
c721d82f25 move sort from vert/edge/face into mesh menu only (sorting isn't such a common operation).
correct own recently added assert.
2013-06-20 19:09:18 +00:00
Campbell Barton
2dc88ca338 support proportional editing with x-mirror enabled. 2013-06-20 18:19:42 +00:00
Thomas Dinges
370ebad2f9 Cycles / Vector Transform Node:
* First step towards a new vector transform node, to convert Points/Vectors between World/Object/Camera space.
This only contains the Blender UI, RNA... code, no Cycles integration yet.
2013-06-20 08:20:30 +00:00
Campbell Barton
c00b408052 Snap to Symmetry (editmesh tool)
Update from a script I had in 2.4x, useful if you have mesh data which is _almost_ symmetrical,
there was no good way to automatically make the minor adjustments to make the mesh fully symmetrical.

Options for...
- symmetry-axis.
- blending between the +/- side.
- center mid verts.

Access from Mesh menu.
2013-06-19 21:35:06 +00:00
Thomas Dinges
e6fc174152 Merged revision(s) 57499-57586 from trunk/blender into soc-2013-dingto 2013-06-19 20:40:54 +00:00
Bastien Montagne
881dbac5d9 This commit tackles the "context" buttons in Properties header, which were still using "ugly" old UI code.
It removes buttons_header.c file, adds a (small) space_properties.py one, with a PROPERTIES_HT_header class, which simply uses the RNA enum to draw the context buttons.
It also fixes that enum, btw, it always featured all contexts, which means you could (try to!) set through RNA invalid contexts...

Thanks to brecht and dingto for the reviews.
2013-06-19 19:37:17 +00:00
Campbell Barton
841c200767 report exceptions when enabling and disabling modules in blenders interface.
so if pressing the addon checkbox fails it tells why rather then failing silently.
2013-06-19 05:17:31 +00:00
Campbell Barton
447e9a4cd5 add option to enable auto-execute scripts, but exclude certain directories. 2013-06-18 18:11:52 +00:00
Campbell Barton
b0872918ea fix [#35771] "Specials" ->"Size Y" doesn't work for Cycles area lamp 2013-06-18 06:23:30 +00:00
Bastien Montagne
5bd5e69e98 Add back nl_NL to enabled tranlations, as we now have a (very limited) start of it. 2013-06-17 19:49:06 +00:00
Bastien Montagne
2091eca962 Usual UI messages style edits... 2013-06-17 10:01:35 +00:00
Antony Riakiotakis
e044891d78 Fix #35774 Confusing Text in Texture Paint Panel
A simple copy-paste error.
2013-06-16 14:54:14 +00:00
Campbell Barton
564902582c rename world_to_camera -> world_to_camera_view 2013-06-16 14:35:15 +00:00
Thomas Dinges
0429595440 Merged revision(s) 57423-57498 from trunk/blender into soc-2013-dingto 2013-06-16 12:05:39 +00:00
Tamito Kajiyama
865096919d Fixed the feature edge selection by Freestyle face marks to properly account for border edges. 2013-06-16 00:15:05 +00:00
Campbell Barton
bac418b691 show dissolve edge/vert/face in the delete menu, irrespective of the current mode. 2013-06-15 13:33:28 +00:00
Campbell Barton
64d6810cd9 Change edgeloop delete to use dissolve, fixes bug [#35738].
Was using edge-slide & remove-doubles but this was error prone since remove doubles could fail in some cases or find doubles where it shouldn't (with very small scale objects).

This gives more predictable behavior when the edges of a loop wouldnt slide (in that case they would just drag over to one of the sides with no user control)
and multiple edge loops work better too. eg:
- http://www.graphicall.org/ftp/ideasman42/edge_loop_del_update.png
2013-06-14 03:04:36 +00:00
Campbell Barton
93ba74c20a minor edits to world_to_camera() utility function, include Z so you can tell if the points in font of the camera and avoid divide by zero. 2013-06-13 14:07:36 +00:00
Campbell Barton
f173ff531c handy function for getting the 2d camera coords for a worldspace location.
bpy_extras.object_utils.world_to_camera(scene, obj, coord)
2013-06-13 13:51:01 +00:00
Tamito Kajiyama
d958144b65 Removed the Material Boundary option from the edge detection options in
the Parameter Editor mode.  The Material Boundary toggle button takes
effect only in the Python Scripting mode.  Instead the Parameter Editor
mode automatically determines which edge types need to be computed on the
basis of user-specified line selection criteria in terms of edge types.

Problem report from Light BWK through personal communications, thanks!
2013-06-13 11:10:18 +00:00
Thomas Dinges
d523d27e62 Cycles / Blackbody node:
* First step towards a Blackbody to RGB converter. You can specify a color in Kelvin inside the node.
* Only implemented for OSL atm, SVM will follow.
2013-06-13 08:55:51 +00:00
Campbell Barton
fa51f02be3 minor changes to the script auto-execution based on Brecht's suggestions. 2013-06-12 00:10:56 +00:00
Campbell Barton
c8f30bc7f0 fix [#35574] Export Key Map issue
problem was the keymap failed to import but didnt give any feedback, now it displays error message.
2013-06-11 15:11:55 +00:00
Thomas Dinges
9020df976c Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometers, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

* Code cleanup:
** Moved color functions (xyz and hsv) into dedicated utility files.
** Remove svm_lerp(), use interp() instead. 

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

Example render:
http://www.pasteall.org/pic/show.php?id=53202

This is part of my GSoC 2013. (revisions 57322, 57326, 57335 and 57367 from soc-2013-dingto).
2013-06-10 21:55:41 +00:00
Brecht Van Lommel
6322f01783 Cycles lamp specials menu now includes separate X/Y size for area lamps
and strength (for the basic default node setup, this can't work with with
arbitrary nodes).
2013-06-10 19:01:40 +00:00
Sergey Sharybin
e8408efdba Correction to previous maya keymap commit
Added UNDOflag to the wrong operator..
2013-06-10 10:45:25 +00:00
Sergey Sharybin
00f37e911b Fix #35661: Maya key config - select operations are skipped by "undo" 2013-06-10 09:57:10 +00:00
Joshua Leung
6f2e36f4ee Bugfix [#35643] Animated textures are invisible in Graph Editor if it is not
linked via material

Textures linked to modifiers are now shown in the AnimEditor channel hierarchy
under object level now (i.e. on same level as ob-data, shapekeys, and object's
action). This makes it possible to edit such animation data without having to
ensure that these textures are also linked to the object's material so that they
will appear.

As a side-effect of how this is implemented, if playback is slower on scenes
following this commit, disable the "modifier" filter under the filtering
settings in the relevant animation editor header. In particular, it may be
beneficial to disable this when you've got scenes with meshes that have many
modifiers (but none of these have any linked data with settings which can be
animated), as Blender will still try to go through all those modifiers checking
for anything to show.
2013-06-10 04:39:05 +00:00
Campbell Barton
0d699fb46a minor edit to previous commit, only show option to reload the file if its been saved. 2013-06-10 02:05:38 +00:00
Campbell Barton
412c043474 Python script auto-execution changes:
- script execution is off by default

- if a blend file attempts to execute a script
  this shows a message in the header with the action
  that was suppressed (script/driver/game-autostart) and 2 buttons to either reload the file trusted, or to ignore the message.

- the file selector will always default to use the trust setting in the user preferences,
  but reloading an open file will keep using the current setting (whatever was set before or set on the command-line).

- added SCons setting WITH_BF_PYTHON_SECURITY, this sets the default state for the user prefereces not to trust blend files on load.
  ... this option was in CMake before, but always off, now its enabled by default for SCons and CMake, and forced on in CMake for now.
2013-06-10 00:42:16 +00:00
Thomas Dinges
cf359f6c7f Cycles / Wavelength to RGB node:
* Added a node to convert wavelength (in nanometer, from 380nm to 780nm) to RGB values. This can be useful to match real world colors easier.

Example render:
http://www.pasteall.org/pic/show.php?id=53202

ToDo:
* Move some functions into an util file, maybe a common util_color.h or so.
* Test GPU, unfortunately sm_21 doesn't work for me yet.
2013-06-09 20:46:22 +00:00
Lukas Toenne
9c5729e672 Fix for unintended commit of python template file ... 2013-06-09 09:51:19 +00:00
Lukas Toenne
3fe01ecfd9 Removed the unused draw_add_menu function from pynodes template. This was previously used to extend the node Add menu, now the node categories system is used instead. 2013-06-09 09:49:44 +00:00
Lukas Toenne
6e55460a8d Removed deprecated XXX comment from custom_nodes.py, importing node base types works now (this comment was causing some confusion in the past). 2013-06-09 09:42:34 +00:00
Lukas Toenne
90cbf5d591 Added an example for using the new node categories system to the custom_nodes.py template script. 2013-06-09 08:46:48 +00:00
Lukas Toenne
fd2e3999bb Removed the 'custom node group' example from the pynodes template script. This does not work properly due to the fact that node groups don't have a single registerable base class any more. The reason for
that is that RNA does not support multiple inheritance so the actual node group subtypes (ShaderNodeGroup, CompositorNodeGroup, TextureNodeGroup) can not be derived from both the
ShaderNode/CompositorNode/TextureNode base types as well as a common NodeGroup type ... It is possible however to define node group types entirely in python which avoids the limitations of the RNA system
and is much more flexible, example for this will follow later.
2013-06-09 08:46:47 +00:00
Lukas Toenne
377b4f71ad Fix for node search operator, this was not taking into account possible NodeItemCustom in the categories yet. Such custom items as just ignored for now. 2013-06-08 17:35:05 +00:00
Thomas Dinges
d314600cd2 UI / Freestyle:
* Properties, which depend on an enum should be hidden, not greyed out.
2013-06-08 17:10:17 +00:00
Thomas Dinges
e21db5cd23 UI / Modifiers:
* Skin modifier also wasted quite some space, use dual column layout now.
2013-06-08 16:53:14 +00:00
Thomas Dinges
fe326a8140 UI / Modifiers:
* VERTEX_WEIGHT modifiers had quite a messy UI, improved the grouping of options a bit, so it is easier to scan through.
* Do not use abbreviations like "Rem" or "Dist" in the UI...

* Also small change for BEVEL modifier UI for more efficient space usage.
2013-06-08 16:06:39 +00:00
Campbell Barton
ddee696bc7 add default preset for font settings. 2013-06-07 01:06:01 +00:00
Campbell Barton
94e886943b add support for storing text styles in themes.
also reset text styles when resetting to the default theme.
2013-06-07 00:27:21 +00:00
Campbell Barton
df32165002 code cleanup: use more standard names for userpref ui functions was using context for style vars. 2013-06-06 20:36:28 +00:00
Brecht Van Lommel
5c0ca6e4bc Fix #35644: lamp specials menu still showed blender internal energy and falloff
distance when cycles was selected as renderer.
2013-06-06 11:18:39 +00:00
Lukas Toenne
f681ce08c4 Fix #35640, part 2. Check id.lib in poll functions for operators which do critical modification of node trees (create nodes, link, etc.). Transform operators and hide/show type operators are still
allowed, this does not modify actual behavior of the nodes and can be useful for inspecting linked nodes.
2013-06-05 19:06:33 +00:00
Lukas Toenne
32f35056af Fix #35633, Cannot Add Group Node In Blender 2.67a. The menu entry for the "make group" operator was missing in the new categories system. Added an alternative NodeItemCustom to the standard NodeItem to
allow custom draw functions such as this operator. Used in the group items callback to generate the basic group_make operator call.
2013-06-05 09:21:17 +00:00
Campbell Barton
5f0731dc8d add option to remove all shape keys at once (access from shape key menu on panel).
Without this there was no easy way to get a WYSIWYG copy of a mesh that had shape keys,
since removing them would adjust the mesh.
2013-06-05 06:34:18 +00:00
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
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
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
Lukas Toenne
56485b6562 Upgrade for the add_search node operator. This now uses the same basic system as the regular add_node operator, with enum items generated from the common node categories system (nodeitems_utils module). This means that any node listed in the regular node Add menu can now also be added via searching, including node groups and the like. The search operator also uses the subsequent transform to make insertion a bit more streamlined. 2013-05-09 11:43:48 +00:00
Lukas Toenne
efcfe88adc Fix for add_node operator: needs to have SKIP_SAVE set for the settings collection to prevent it from re-using settings from a previous call. This would otherwise lead to python exceptions when those properties don't exist for the other node type (point in case: node_tree only is defined for group nodes). 2013-05-09 10:13:13 +00:00
Lukas Toenne
89d77c538a Fix suggested by Campbell Barton: use %r instead of %s when building the python expression for the node operator settings to ensure correct escaping. 2013-05-09 08:05:02 +00:00
Campbell Barton
279a2a1916 fix rna_info, python method to C function wasn't being tested for. (broke changelog generator) 2013-05-09 02:50:59 +00:00
Lukas Toenne
a3c82d4cde Updated the custom_nodes.py template script to reflect socket draw API changes in r56584 and r56585. 2013-05-08 16:17:04 +00:00
Lukas Toenne
a092611f67 Fix for node item polling: recursion check was the wrong way around, needs to test is the parent tree is inside the group. 2013-05-08 15:41:09 +00:00
Lukas Toenne
d7c74acab1 Added filter to the node group items callback to remove recursive node groups right from the start. These tree pointers would be polled out internally as well, but this way they don't show up in the menus in the first place. 2013-05-08 15:41:07 +00:00