Commit Graph

6794 Commits

Author SHA1 Message Date
Campbell Barton
b18ef3b8fb use more rna-constant name for bevel clamping. 2013-04-24 14:14:54 +00:00
Howard Trickey
d2daa230d6 Fix bug #34611: bevel overlap limit
The previous fix limited overlap, but is sometimes
too conservative, and artists want way to turn off
the limiting, so added 'Allow Overlap' option to
modifier.
2013-04-24 12:39:37 +00:00
Tamito Kajiyama
ad6cc0d0ac Fix for broken Material color/alpha/thickness modifiers.
Reverted part of the trunk revision 56234 (RNA attribute consistency edits).
2013-04-24 00:14:16 +00:00
Brecht Van Lommel
a7f5f6caab Fix #35058: Mesh > Edge/Face > Bevel would do vertex bevel if that was used in
the operator the previous time. However for these menus it makes more sense to
always use edge/face bevel and to leave vertex bevel for Mesh > Vertex > Bevel.
2013-04-23 14:12:12 +00:00
Antony Riakiotakis
8f486bdadc Fix missing feature: fit mask stencil to aspect. 2013-04-23 11:34:18 +00:00
Campbell Barton
53917c4e3a rna attribute consistency edits, use common prefix for booleans. 2013-04-23 07:06:29 +00:00
Antony Riakiotakis
51010f5035 Allow hiding separate hiding of overlays on stroke. 2013-04-23 00:32:51 +00:00
Campbell Barton
263ea88392 fix/workaround [#34983] bpy.ops.mesh.primitive_torus_add() ignores rotation-parameter 2013-04-22 20:53:30 +00:00
Antony Riakiotakis
36e476ede6 Overlay refactor:
Allow separate control for tex/mask/cursor overlay. This commit implements
separate overlays for mask textures and cursor curves. The user can turn on
and off separate parts of the overlay by using the appropriate widgets.
The cursor overlay widgets are located at the tool selection panel

Also fixed alpha masks not getting correctly masked and mask texture mapping
not having the correct update callback
2013-04-22 20:46:18 +00:00
Lukas Toenne
d56ceaab4c Nicer registration mechanism for node categories. The lists of node categories and items are now stored in a dictionary with an identifier key, so they can be registered and unregistered individually. The Add menu is now persistent and gets extended with a draw function for each of the registered node category lists.
This allows pynodes to define their own list of node categories and items and register it at runtime without interfering with the standard nodes.
2013-04-22 16:25:35 +00:00
Sergey Sharybin
75f1157b80 Fix #34350: Maya Keyboard map preset problems
Two main things:

- Made a python operator for selection in a viewport
  which will de-select everything if nothing is under
  the mouse.

  To do so needed to modify VIEW3D_OT_select, so invoke
  sets mouse location which is later used by exec
  function.

  This way it's possible to select stuff from python
  defined operator.

  Not best-ever solution since ideally exec() shall not
  do OpenGL stuff, but we've got this issue in some
  other operators. We'll solve this later.

- Used a keymap from Gianmichele Mariani as a reference,
  updated his keymap to latest changes in operators.

  We shall match Maya keymap much better now, thanks
  for the keymap dude!
2013-04-22 14:56:41 +00:00
Brecht Van Lommel
919ecbe55d Fix #35054: adjust tooltip for Render Border option in 3D view panel to say
it has an effect outside of the camera view.
2013-04-22 14:26:57 +00:00
Sergey Sharybin
1b10643920 Footage information panel
Displays such information as current frame dimension,
frame number within image sequence/movie and in case
of image sequence input displays current file name of
a frame.

Not entirely happy with such approach, but was requested
a lot by artists.
2013-04-22 11:19:12 +00:00
Sv. Lockal
edab815137 Add Select More (ctrl np+) and Select Less (ctrl np-) to UV editor
These tools allow to extend or shrink uv selection like in edit mode, but also take selection mode, sync mode and sticky mode into account.
2013-04-21 19:04:04 +00:00
Bastien Montagne
d3d41df6ee Fix for add nodes search box showing nasty "UUUUUUUU"-like entries with some python builds...
Workaround for an issue with python: strings generated by py scripts should also exist in python as long as they are used in C. Else C code may access freed memory.

Simply store the generated list of items in the class, for now. :/
2013-04-21 13:51:51 +00:00
Campbell Barton
44d3d88f9a code cleanup: minor improvements to scripts.
- make wm-property operators use INTERNAL option.
- make console use str.expandtabs() rather then replacing tab->spaces.
2013-04-20 13:23:53 +00:00
Campbell Barton
a76ad2cdad code cleanup: simplify python rigidbody operators. 2013-04-20 13:22:08 +00:00
Bastien Montagne
fba67abf7a Restore usage of difflib's quick_ratio()... Don't actually know what happens here, my tests with timeit showed it much slower than ratio(), but real-life says the contrary... 2013-04-19 16:23:02 +00:00
Campbell Barton
98ef2d1d2e uv project from camera now sets defaults so the image maps to the camera bounds,
also rename newly added `Mesh Debug` -> `Mesh Analysis`
2013-04-19 15:50:17 +00:00
Campbell Barton
5c72a19c09 add display mode for sharp edges. 2013-04-18 17:09:56 +00:00
Bastien Montagne
01ffbab8f5 Some i18n tools fixes (I'm ashamed...), and merge func for I18nMessages objects. 2013-04-18 15:26:22 +00:00
Bastien Montagne
4587ecd45b More i18n tools tweaks:
* Remove difflib's quick_ratio() call, from quick tests looks it is four times slower than ratio(), and yet it gives the same results...
* Moved code to find all po's in a dir into its own func (will be used by i18n addon tools too).
2013-04-18 11:09:25 +00:00
Campbell Barton
8a06acfd7a add mesh distort display mode (highlights distorted faces) 2013-04-18 04:24:18 +00:00
Campbell Barton
14f9f167b2 display options to help with 3d printing.
editmesh debug info,
- overhang (with axis angle options)
- wall thickness (with min/max distance)
- self-intersections.

access below 'Mesh Display' panel.
2013-04-17 09:27:23 +00:00
Lukas Toenne
bb1b2529a0 Added back the basic Search operator to the node Add menu. This operator should be implemented a bit nicer using the new categories system as well, but for now works just as before. 2013-04-17 07:47:00 +00:00
Antony Riakiotakis
c1276960e8 Fix some names, and move overlay flag to overlay_flags. 2013-04-16 15:59:02 +00:00
Antony Riakiotakis
53c9507c28 Option to hide overlay during a stroke. To enable, press the brush icon
next to the overlay alpha.
2013-04-16 15:02:41 +00:00
Sergey Sharybin
d726b4bddc Fix #34897: Select edge loop shortcut not working in Maya preset
Made it so loop/ring selection are assigned to RELEASE button,
so they're not conflicting with regular selection.

There's still seems to be a conflict between loop and ring
selection, but it was here for ages and that's another story.
2013-04-16 10:19:21 +00:00
Campbell Barton
82bf87772e add back attribution field from script. 2013-04-15 11:29:31 +00:00
Campbell Barton
dfe26156fa edits to startup.blend
- temp dir /tmp\ --> /tmp/
- set sequencer cache limit from 128 --> 1024
- set sequencer view to RGB --> RGBA
2013-04-14 15:26:35 +00:00
Thomas Dinges
4d0c576f4e Shader nodes / order:
* Have all "Info" nodes next to each other. 
* Moved "Material Output" to the top.
* Have all light shaders (Emission, Background, AO) next to each other.
2013-04-14 09:34:59 +00:00
Thomas Dinges
e04b7dc209 Node Toolbar:
* Use column() layout, this way it uses a bit less space.
2013-04-14 09:17:03 +00:00
Thomas Dinges
7e1352ba7c Code cleanup:
* Remove obsolete comment from layout file.
2013-04-13 23:06:33 +00:00
Thomas Dinges
98f78fde23 Code cleanup / Layout script:
* Never ever use something like "rowsub" as variable.
2013-04-13 22:52:28 +00:00
Campbell Barton
7c4be99281 make buttons for edge/face area, length, angles etc. more compact. 2013-04-13 22:29:58 +00:00
Campbell Barton
dffbbe65cd remove checks for 'context.scene' when checking if freestyle is enabled. 2013-04-13 22:21:21 +00:00
Campbell Barton
a298cac952 show weight-display options in editmode. 2013-04-13 22:12:55 +00:00
Campbell Barton
31c375b97a Mesh Drawing:
Option to draw mesh vertex-weights in editmode, available from the 'Mesh Display' panel.

TODO: get this to work when modifiers are applied in solid mode (texface-solidmode is working).
2013-04-13 20:20:21 +00:00
Thomas Dinges
a646f505c3 Node UI:
* Now that the toolbar is useful, add menu entry into the "View" menu.
2013-04-13 16:32:28 +00:00
Thomas Dinges
ceacf24e3d Node Toolbar:
* Have panels closed by default.
2013-04-13 16:26:55 +00:00
Thomas Dinges
50e7e34520 Node categories / Add menu:
* Fix for Subsurface Scattering node.
2013-04-13 15:51:25 +00:00
Lukas Toenne
94931f9f45 Replacing the node Add menu and making the toolbar useful
As some people have already noticed, the "Add" menu for nodes is a bit messy since pynodes merge. The reason for this is that the order of nodes in submenus (categories) was previously defined by the order in which all nodes are registered (at the bottom of blenkernel/intern/node.c). For the dynamic registration of node types now possible this system of defining node order along with registration is no longer viable: while it would still sort of work for C nodes, it is completely meaningless for dynamic (python) nodes, which are basically registered automatically in whatever order modules and addons are loaded, with the added complexity of unloading and reloading.

To fix this problem and add a bunch of desirable features this commit replaces the C menu with a python implementation. The new menu does not rely on any particular order of types in the node registry, but instead uses a simple explicit list of all the available nodes, grouped by categories (in scripts/nodeitems_builtins.py).

There are a number of additional features that become possible with this implementation:

1) Node Toolbar can be populated!
The list of nodes is used to create 2 UI items for each node: 1 entry in a submenu of "Add" menu and 1 item in a node toolbar panel with basically the same functionality. Clicking a button in the toolbar will add a new node of this type, just like selecting an item in the menu. The toolbar has the advantage of having collapsible panels for each category, so users can decide if they don't need certain nodes categories and have the rest more easily accessible.

2) Each node item is a true operator call.
The old Add menu is a pretty old piece of C code which doesn't even use proper operator buttons. Now there is a generic node_add operator which can be used very flexibly for adding any of the available nodes.

3) Node Items support additional settings.
Each "NodeItem" consists of the basic node type plus an optional list of initial settings that shall be applied to a new instance. This gives additional flexibility for creating variants of the same node or for defining preferred initial settings. E.g. it has been requested to disable previews for all nodes except inputs, this would be simple change in the py code and much less intrusive than in C.

4) Node items can be generated with a function.
A callback can be used in any category instead of the fixed list, which generates a set of items based on the context (much like dynamic enum items in bpy.props). Originally this was implemented for group nodes, because these nodes only make sense when linked to a node tree from the library data. This principle could come in handy for a number of other nodes, e.g. Image nodes could provide a similar list of node variants based on images in the library - no need to first add node, then select an image.

WARNING: pynodes scripters will have to rework their "draw_add_menu" callback in node tree types, this has been removed now! It was already pretty redundant, since one can add draw functions to the Add menu just like for any other menu. In the future i'd like to improve the categories system further so scripters can use it for custom node systems too, for now just make a draw callback and attach it to the Add menu.
2013-04-13 15:38:02 +00:00
Antony Riakiotakis
a305452275 Paint refactoring commit, non-disruptive (in theory :p)
* Fix precision overflow issue with overlay previews,
* Expose alpha mask mapping to UI (still not functional but coming soon).
* More overlay refactoring:

Overlay now does minimal checking for texture refresh.
Instead, we now have invalidation flags to set an aspect of the brush
overlay as invalid. This is necessary because this way we will be able to
separate and preview different brush attributes on the overlays, using
different textures:

These attributes/aspects are:

Primary texture (main texture for sculpt, vertex, imapaint)
Secondary texture (mask/alpha texture for imapaint)
Cursor texture (cursor texture. It involves brush strength and curves)

Modified the relevant RNA property update functions and C update callback
functions to call the relevant cursor invalidation functions instead
of checking every frame for multiple properties.

Properties that affect this are:

Image changes, if image is used by current brush,
Texture slot changes, similarly
Curve changes,
Object mode change invalidates the cursor
Paint tool change invalidates the cursor.

These changes give slightly more invalidation cases than simply
comparing the relevant properties each frame, but these do not occur in
performance critical moments and it's a much more elegant system than
adding more variables to check per frame each time we add something on
the system.
2013-04-12 17:21:31 +00:00
Bastien Montagne
0e4b092c2d More fixes for addon i18n messages management. 2013-04-12 12:19:50 +00:00
Sergey Sharybin
0d86c3f84c Image draw method option
This option replaces previously added GPU limit
option, which became tricky to follow after GLSL
display space conversion.

There're 4 modes available:
- AUTO which will try to guess which mode is
  best to use.
  Currently It'll try using GLSL and if it fails,
  will fallback to 2D textures.
  Probably it'll make sense checking on whether
  2D textures works well but currently such behavior
  shall be sufficient.
  Later we could make this method smarter (for example
  don't try to use GLSL on certain GPU or so).
- GLSL will currently behave the same way as AUTO,
  but it is intended to always try using GLSL
  (unless it can not be used because of existing
  limitation of dither and RGB curves).
- 2D Textures will use CPU-based color space conversion
  and use OGL 2D Texture to display the image.
  Image will be displayed in tiles, so there shall be
  no big GPU memory consumption.
- DrawPixels will straightly fallback to glDrawPixels
  without trying to use any fancy GPU stuff.

Hopefully this will also fix
#34943: Blender crashes when resizing the Compositing Screen Window
2013-04-12 10:52:47 +00:00
Campbell Barton
677a96e189 add render slot cycle forward/backwards menu items. 2013-04-12 10:19:31 +00:00
Sergey Sharybin
daaca80664 Hide preview for nodes created with Setup Tracking Scene 2013-04-11 13:34:51 +00:00
Sergey Sharybin
432a260869 Setup tracking scene shall work with Cycles now 2013-04-11 13:29:51 +00:00
Konrad Kleine
f2ff494b24 Added circle selection menu entry for lattice, pose and armature. 2013-04-11 13:29:01 +00:00
Sergey Sharybin
c6606986cc Fix for Setup Tracking Scene operator
- Ported to new node add operator
- Alpha mode shall be set to Transparent
2013-04-11 13:25:05 +00:00