Commit Graph

7045 Commits

Author SHA1 Message Date
Bastien Montagne
b7e2cd5948 UIList: update examples and templates. 2013-08-29 13:34:36 +00:00
Bastien Montagne
113997a03c Last uiList patch (for now!): filtering and reordering of shown elements.
Thanks to Brecht for the reviews. :)

This commit adds a show/hide extension below each uiList, containing by default an option to filter and/or reorder items by name (and to reverse those filtering and reordering).

Each derived uiList class in Python can define more specific filtering by implementing callbacks: the draw_filter() function to draw options in UI, and the filter_items() function to effectively filter/reorder items.

Note: the advanced options for vgroups shown as "proof od concept" in patches do not go in trunk for now, we have to find a better way to get those vgroups info for UI code, we can't afford to loop over each vertex here!

And doc (release notes and uiList example) is still to be updated, will do this in next days.
2013-08-29 12:55:31 +00:00
Campbell Barton
73068ca3df use os.remove rather then unlink (the same but all other areas use 'remove') 2013-08-29 06:02:19 +00:00
Mitchell Stokes
dea537fd68 BGE: The WM_OT_blenderplayer_start addon now saves a copy of the current blendfile with a trailing '~' to keep paths intact. An unsaved file will still go to the tmp directory. This file is deleted when the blenderplayer process exits. 2013-08-29 04:31:55 +00:00
Campbell Barton
95fcf02500 patch [#36336] Split operator for curves and surfaces
by Kevin Mackay (yakca)

The operator follows roughly the same behaviour as the split operator for a mesh (Ykey).
2013-08-29 02:32:51 +00:00
Lukas Toenne
562313bfd3 Fix for #36589 Node Editor displays incorrect Material name when Pinning.
The material button displayed in the node editor header is the "active_material" of the active object. When pinning the node tree this should ideally be the pinned node tree's material slot, but this
would require adding even more confusing info in SpaceNode to find the correct slot in addition to the id_from datablock. Solution for now is to just disable these buttons when pinning to communicate
better.
2013-08-28 09:05:09 +00:00
Lukas Toenne
771906bc09 Fix for #36387, User Preferences "Addons" panel bogs down the whole interface.
The addons panel draw function calls addon_utils.modules() which in turn retrieves a list of fake modules from the script paths every time. This can become costly when network paths are included for
addons. Solution is to put the scanning process into a dedicated "refresh" function and disable it in frequently called draw and filter functions, i.e. in these cases the cached addons_fake_modules list
will be used instead.

Note that this may lead to invalid addon lists if script paths are changed (which is not working 100% without restart anyway according to Campbell). For this there is now a "Refresh" operator button in
the addons preferences. If necessary and feasible such forced refreshes can be added later too.
2013-08-28 06:36:54 +00:00
Bastien Montagne
07aaf4a90a Icons: add a "grip" one. 2013-08-27 15:21:58 +00:00
Campbell Barton
d90d25ec78 add icons utility make target. 2013-08-27 10:03:37 +00:00
Bastien Montagne
71e5e90fb7 Followup to r59536: make "is_argument_optional" available to py, and use it in API doc generation.
Thanks Campbell for the much better name suggestion!
2013-08-26 21:39:06 +00:00
Sergey Sharybin
03dbae07d3 Mask primitives
Currently only circle and square, might be easily
extended in the future.

New primitives are creating at cursor location.
This also implied adding 2d cursor to space clip.

Also fix set 2D cursor location which didn't work
in image editor's mask mode since 2.67.

TODO: draw_image_cursor better be moved to some
      more generic file, but it's not so much
      important for now and might be solved later.

Thanks Campbell for the review!
2013-08-26 20:23:26 +00:00
Campbell Barton
762e7da976 add some safety checks in debug mode to ensure sets/hashes aren't confused. 2013-08-26 09:37:15 +00:00
Tamito Kajiyama
6c14f641f3 Partial revert of UI appearance changes in r52778 in the Strokes tab of the Freestyle Line Style panel. 2013-08-25 16:29:10 +00:00
Andrea Weikert
ba4d8762fe Made large "blender icon" for save blends (.blend1, .blend2, etc.) have a bit darker background as well. 2013-08-24 14:01:07 +00:00
Bastien Montagne
17679aaa52 Adding a darker "blender icon" for save blends (.blend1, .blend2, etc.), as requested by elubie. 2013-08-24 13:28:18 +00:00
Bastien Montagne
c43e7bfd74 "Fix" [#36551] Camera has wrong rotation in default scene :P 2013-08-23 21:37:39 +00:00
Bastien Montagne
5b83a89c81 Followup to r59434 : py UI scripts edits.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
2013-08-23 20:41:21 +00:00
Lukas Toenne
dd36c6b948 Fix for an obscure bpy_types bug: When attempting to define __setattr__ in a metaclass based on RNAMetaPropGroup, the base class' __setattr__ method can not be called, since python prohibits setattr on
builtin classes. This was done in Python 2.3 to prevent changes to the 'object' type definition and similar issues. As explained by Guido van Rossum in the following mail, the python check will look for
the *closest* base class, which fails for RNAMetaPropGroup because its first base is RNAMeta, which is in turn a subclass of 'type'.

http://code.activestate.com/lists/python-dev/34489/

The easiest and safest way to prevent this issue therefore seems to be
to swap the base class order for RNAMetaPropGroup, so that StructMetaPropGroup is the first base, which has a perfectly valid setattr implementation.
2013-08-23 15:39:25 +00:00
Campbell Barton
c752346cfa new mesh bisect tool, available in the mesh menu.
cuts the mesh in half based on the cursor location and the viewport,
optionally supports filling the cut area (with uvs. vcols, etc),
and removing geometry on either side of the cut.
2013-08-23 11:46:08 +00:00
Sergey Sharybin
9f72bf7865 Tracking cleanup
- Collapse plane track panels by default
- Hide 3D markers when in mask edit mode
- Remove alpha from mask layers list

Discussed with Sebastian and Roman.
2013-08-23 09:40:42 +00:00
Thomas Dinges
fc9d4bdf73 Cycles / Sampling UI:
* Add a "Total Samples" info at the bottom of the panel.
This makes understanding the Non-Progressive integrator easier, as it displays how many samples are used for the different ray types. 

* Rename Squared Samples to Square samples, to indicate that the action is not already done. The new Total Samples info should make this easier to understand now as well. Also added back for Progressive integrator, for consistency. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=57980
2013-08-22 19:57:56 +00:00
Bastien Montagne
104cd04f4f Had not been updated after last edit to prvicons.svg file (r53004)... 2013-08-22 13:48:22 +00:00
Campbell Barton
636b200709 style cleanup: pep8, also use float literals when comparing floats and pass tuples to mathutils.Vector() rather then list. 2013-08-21 23:19:01 +00:00
Tamito Kajiyama
2a5b6d9c8f Temporary fix for gaps in strokes when objects are behind the lines.
Problem report by Light BWK through personal communications, thanks a lot!

Apparently there is something wrong in the way how edges are chained to
create strokes.  For some unknown reason, strokes may contain a very small
line segment that proceeds in the opposite direction (e.g., downward
even when adjacent stroke segments proceed upward), resulting in the
reported visual artefact.

This revision is intended to address the reported issue in most cases.
The present solution is not a proper fix of the issue.  Another code
update with better understanding of the real cause is due in the future
work.
2013-08-21 21:20:51 +00:00
Campbell Barton
b1a0dc6630 quiet error installing an addon when the directory already exists (would happen on OSX frequently),
the addon would install but error was misleading.
2013-08-20 14:43:01 +00:00
Sergey Sharybin
400bd9bfba MCE: usability improvement
Align Clear Before/After into a row and remove
Clear button (which wasn't actually used by
artists).
2013-08-19 11:24:35 +00:00
Bastien Montagne
b9f78815f1 Fix [#36423] Audio strips contain selectable (visual) blend modes and opacity value
Simply hide blend type and opacity for SOUND strips!
2013-08-18 15:48:51 +00:00
Bastien Montagne
a567dd20c0 More "relpath" try/except protection... 2013-08-18 15:17:33 +00:00
Campbell Barton
0f07ca6809 remove unused args from edgenet fill (since rewrite, but they weren't used before either) 2013-08-17 09:25:12 +00:00
Campbell Barton
2633488877 use 'with' keyword for script stub (recommended with py3). 2013-08-17 05:27:58 +00:00
Sergey Sharybin
24ce60cfe4 Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.

Movie clip editor changes:

- Artist might create a plane track out of multiple point
  tracks which belongs to the same track (minimum amount of
  point tracks is 4, maximum is not actually limited).

  When new plane track is added, it's getting "tracked"
  across all point tracks, which makes it stick to the same
  plane point tracks belong to.

- After plane track was added, it need to be manually adjusted
  in a way it covers feature one might to mask/replace.

  General transform tools (G, R, S) or sliding corners with
  a mouse could be sued for this. Plane corner which
  corresponds to left bottom image corner has got X/Y axis
  on it (red is for X axis, green for Y).

- Re-adjusting plane corners makes plane to be "re-tracked"
  for the frames sequence between current frame and next
  and previous keyframes.

- Kayframes might be removed from the plane, using Shit-X
  (Marker Delete) operator. However, currently manual
  re-adjustment or "re-track" trigger is needed.

Compositor changes:

- Added new node called Plane Track Deform.

- User selects which plane track to use (for this he need
  to select movie clip datablock, object and track names).

- Node gets an image input, which need to be warped into
  the plane.

- Node outputs:
  * Input image warped into the plane.
  * Plane, rasterized to a mask.

Masking changes:

- Mask points might be parented to a plane track, which
  makes this point deforming in a way as if it belongs
  to the tracked plane.

Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578

This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
Campbell Barton
4006f8c83b fix [#36455] importing obj data after saving doesn't work 2013-08-15 00:32:12 +00:00
Bastien Montagne
4e8b97823b Typo (dimention instead of dimension). 2013-08-13 18:35:39 +00:00
Ton Roosendaal
004fa8e729 GPL V3 license, which will be valid for the binary releases.
(Because Blender links with the Apache2 license).

Cleanup of this directory will happen before official release.
2013-08-12 12:31:51 +00:00
Sergey Sharybin
9f9b4cf9b3 Add jemalloc license to release/text
Official linux builds are linking against jemalloc,
and in the own branch i'm using some of it's code.

License files location could be changed a bit later
(i.e. make it so all the license files are in the
single folder, not in the root of the blender distro).
2013-08-12 12:17:54 +00:00
Campbell Barton
1c5b416cbf image_load() utility function's 'recursive' option wasn't functional since 2.4x 2013-08-12 07:48:31 +00:00
Campbell Barton
4fbe426151 bpy.path.reduce_dirs() - new utility function to de-duplicate and remove nested paths before doing a recursive search. 2013-08-12 07:44:38 +00:00
Sv. Lockal
4c136881a5 Add better UI for "Add Torus" function
The previous one did nothing in many cases and was very unintuitive:
http://www.pasteall.org/pic/show.php?id=57219
2013-08-10 15:37:24 +00:00
Brecht Van Lommel
bfb63ab5a5 Fix #36373: maya and max key configurations for mesh loop select did not work correct
when doing an extend loop select, then doing a regular loop select, it would still
extend.
2013-08-07 15:51:57 +00:00
Bastien Montagne
0214dac604 Usual edits/fixes to new UI messages... 2013-08-06 14:55:00 +00:00
Miika Hamalainen
91d148b891 Dynamic Paint: Added a new "smoothness" parameter for waves.
It greatly helps getting rid of that "noise" that occurs if you use really steep objects (like cubes) as a brush. New default value is 1.0 which is just high enough to only get rid of the sharpest spikes, so if you want really smooth waves it's better use higher values.

This also seems to "fix" bug [#35413].
2013-08-03 09:46:38 +00:00
Thomas Dinges
9caaa78c32 Fix for r58798, forgot to update the presets. 2013-08-01 14:00:24 +00:00
Thomas Dinges
2a2f0319bc Cycles / HSV Separator and Combine node:
* Added nodes to separate and combine hsv colors.

Part of my GSoC 2013 project, SVN merge of r57981.
2013-07-31 21:27:48 +00:00
Thomas Dinges
34009da32e Cycles / Vector Transform node:
* Add a note to convert a Vector, Point or Normal between World <=> Camera <=> Object coordinate space. 

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

Part of my GSoC 2013 project, SVN merge of r57599, r57670, r57918, r57919, r58245 and r58775.
2013-07-31 21:18:23 +00:00
Thomas Dinges
6d9720ef63 Cycles / Blackbody to RGB node:
* Added a node to convert a temperature in Kelvin to an RGB color. This can be used e.g. for lights, to easily find the right color temperature. 
= Some common temperatures =
Candle light: 1500 Kelvin
Sunset/Sunrise: 1850 Kelvin
Studio lamps: 3200 Kelvin
Horizon daylight: 5000 Kelvin

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

Thanks to Philipp Oeser (lichtwerk), who essentially contributed to this with a patch! :)

This is part of my GSoC 2013 project. SVN merge of r57424, r57487, r57507, r57525, r58253 and r58774
2013-07-31 20:56:32 +00:00
Thomas Dinges
6c5a4aedc2 Fix for [#36321] 'Mark Freestyle Edge' still showing with Cycles renderer
* Now we hide Freestyle properties when "use_shading_nodes" is true.
2013-07-30 09:00:31 +00:00
Lukas Toenne
7e02d82036 Minor change to the custom_nodes.py template that has some consequences for addons: use bpy.types.* base classes instead of bpy_types.*
The bpy_types classes cause issues when used in addons when loading on Blender startup (subclasses cannot be properly registered).
2013-07-30 08:30:15 +00:00
Mitchell Stokes
29f8dfd37a BGE: Adding vsync control. Users can enable vsync, disable vsync, or use adaptive vsync via UI options in the render properties, or by using the new Python method bge.render.setVsync(). Win32 and X11 support are done via EXT_swap_control. Support for using EXT_swap_control on OS X still needs to be added to Ghost. 2013-07-29 22:31:32 +00:00
Thomas Dinges
46ad9b6b47 UI / Code:
Cody style changes for r58692.
* First of all, UI code is really simple, especially in such small panels, no need to comment obvious things like left/right column.
* "if 1" nested structs for code clarity? That's a really bad thing, especially if you have 3  lines which belong together, but only 2 of them are indented...

    sub = row.row()
    sub.active = obj.show_bounds
sub.prop(obj, "draw_bounds_type", text="")

* Empty line after layout = self.layout declarations, we still follow these Rules.
http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Layouts

Thanks!
2013-07-28 22:12:19 +00:00
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