Commit Graph

36882 Commits

Author SHA1 Message Date
Sergey Sharybin
50b6c903ff Fix #30467: UV/Image Editor: Scope: Opacity Values maybe wrong
Internally vector and waveform opacities are stored as float in 0..1 range
and the same range is exposed to the UI.
From file compatibility POV decided to change prop's type from percentage
to factor so it'll be nice slider with 0..1 range without confusing percentage
symbols (which should be quite easy to follow) and both forward and backwards
compatibilities are here.
2012-03-08 10:01:03 +00:00
Bastien Montagne
4a02307236 Another fix due to recent DM refactoring, for compilation of navmesh... 2012-03-08 09:14:10 +00:00
Sergey Sharybin
2413523d69 Compilation error fix for game engine caused by recent DM refactoring. 2012-03-08 08:57:38 +00:00
Nicholas Bishop
640b0adb98 Code cleanup: use named values for options in DerivedMesh drawing.
The DMSetDrawOptions[Tex] callbacks return 0 (skip), 1 (draw), or 2
(either stipple or skip mcols.) In the CDDM, EDDM, and CCGDM draw
functions, as well as the callbacks in drawmesh/drawobject, replace
these numbers with values from an enum, DMDrawOptions.
2012-03-08 06:47:05 +00:00
Campbell Barton
ee84084f99 style cleanup: pep8 + picky edits 2012-03-08 05:36:05 +00:00
Campbell Barton
e61339a76f code cleanup: duplicate checks and double assignments. 2012-03-08 04:38:35 +00:00
Campbell Barton
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
Campbell Barton
17786b3b3e building without python works again, cleanup bmesh include paths (cmake and scons). 2012-03-08 03:25:53 +00:00
Campbell Barton
640d766370 style cleanup - remove unneeded ';'s 2012-03-08 03:05:57 +00:00
Campbell Barton
1c91d62c7e use BLI_path_cmp() rather then strcmp() 2012-03-08 02:19:41 +00:00
Campbell Barton
6029640bca Many vertex group functions assumed mesh object when lattices could be operated on too. 2012-03-08 01:49:25 +00:00
Campbell Barton
081aa382ed fix
- access to a meshs editmesh before the pointer was checked to be a mesh.
- uninitialized memory use in transform (not a problem practically but nice to quiet the error in valgrind).
2012-03-08 01:22:49 +00:00
Campbell Barton
52db32bb53 fix for 2 crashes from missing NULL checks. 2012-03-08 00:23:28 +00:00
Campbell Barton
6bed106ed4 the length of mesh.tessface_vertex_colors was reported incorrect. (fix needed for FBX export) 2012-03-07 22:21:28 +00:00
Campbell Barton
db4a85162d edits to rna/tessface UV layer needed to get OBJ import/export functional.
add the function to create new UV layers, this only works when there are no polygon layers already created (to prevent confusion since scripts with polygon layers should be adding MTexPoly and MLoopUV layers)
2012-03-07 21:58:58 +00:00
Sergey Sharybin
333433d15e Fix for setting uv_layer name for modifiers
Issue was caused by missing fdata for meshes which doesn't have tessellated
faces yet. Real fix would be to use loop's MLOOPUV layer, but currently interface
is using mtex layer names for UV lists so use poly's mtex layer to check if
layer name is indeed correct.
Should work fine until we'll separate setting textures and UV coordinates.
2012-03-07 20:56:25 +00:00
Campbell Barton
5ebe91ca1f change camera zoom from short to float. 2012-03-07 19:42:22 +00:00
Sergey Sharybin
e5464db95d Fix for opengl render setting current frame to 0 after finish rendering. 2012-03-07 19:19:58 +00:00
Campbell Barton
541d239cdc fix for error in r44711, needed to update sequencer callback.
also quiet some warnings.
2012-03-07 19:19:56 +00:00
Sergey Sharybin
0c98a407a2 Another mango request: Ctrl-MMB zoom in camera view
It makes it much easier to zoom in camera view using the tablet.
2012-03-07 18:34:16 +00:00
Campbell Barton
0c05194639 remove printing versions in makesdna/makesrna - this used svn ID property which isnt set in the files anymore. 2012-03-07 18:27:12 +00:00
Sergey Sharybin
c69e4ef862 Mango request: use active scene clip as background for sequencer scene strip renderer
and opengl renerer when rendering from camera view.

Other usages of offscreen drawing shouldn't be affected by this change.
2012-03-07 17:45:40 +00:00
Luca Bonavita
4aadffa80e == Python API docs ==
(sphinx_doc_gen.py)

- file reorganization to use more functions (easier to read)

- adapting to work after a recent commit that made some of the members of bpy.app.*
  output bytes instead of strings (see [#30154])

- a couple of new command line optionsto avoid editing the script:
    -T: let you choose the sphinx theme: the theme dir get copied in the destination dir
    -b: choose if we want the bpy module page or not

    Current command line arguments optional arguments:
      -h, --help            show this help message and exit
      -o OUTPUT_DIR, --output OUTPUT_DIR
                            Path of the API docs (default=<script dir>)
      -T SPHINX_THEME, --sphinxtheme SPHINX_THEME
                            Sphinx theme (default='default')
      -f, --fullrebuild     Rewrite all rst files in sphinx-in/ (default=False)
      -t, --testdump        Dumps a small part of the API (default=False)
      -b, --bpy             Write the rst file of the bpy module (default=False)

(rst/info_best_practice.rst)

- fixed a typo
2012-03-07 17:36:38 +00:00
Campbell Barton
8a06ee3d42 running operators after loading a file in background mode would often fail because the screen was set to NULL and never assigned again (as it is when not in background mode),
Now skip clearning the screen when in background mode.
2012-03-07 17:18:57 +00:00
Campbell Barton
5d74235b5f patch [#30481] rna_Screen_scene_set does the wrong thing [patch]
from Dan Eicher (dna)

--- from the tracker
Setting Screen.scene only uses the active screen through a call to CTX_wm_screen(C) instead of the actual referenced scene.

The attached py-op demonstrates this behavior, assuming at least two separate scenes in the VSE.
2012-03-07 16:43:42 +00:00
Campbell Barton
c78f02d990 edit to cursor adjustment, use int rather then short to store the cursor position. 2012-03-07 16:24:25 +00:00
Campbell Barton
00781668ce Unify string stepping delimiter code for text buttons, text editor and console (all had duplicate code).
this is also a step toward the console working with utf8 though many todo's remain.
2012-03-07 15:55:12 +00:00
Campbell Barton
b41b19025e style cleanup: picky edits 2012-03-07 15:10:21 +00:00
Howard Trickey
9f742303a7 Knifetool uses direct cutting instead of scanfill: fixes bugs 29908, 28963, 30333.
Knifetool accumulates a bunch of proposed cuts and when the user
confirms, it makes them all. The old code did this by using scanfill
to triangulate the cutting edges in their faces, and then merging
triangles where possible. This sometimes ended up with strange
lost faces, and also made it so that when holes were cut, the
surrounding face ended up totally triangulated. But 29908 was
an example of a lost face.

This new code directly finds chains of cutting edges that go from
one side of a face to the other and using BM_edge_split_n to make
the cuts. Holes are handled by finding two good places where
the hole can be connected to the containing face (using two
because I think some other code in bmesh assumes that there are
no edges that appear twice in a face).

The old code is still there with #if SCANFILL_CUTS, so can easily revert
if this proves to be a bad idea.

Also, a small fix to previously added BM_split_n (forgot to
copy face attributes to new face).
2012-03-07 14:44:43 +00:00
Campbell Barton
41bdcc7e4e tweak text delimiters for button ctrl + left/right, ctrl+backspace/del
now theres always a single step before skipping delimiters, this means the skipping actions always advance by more then 1 char (which matches the text editor).
2012-03-07 13:35:32 +00:00
Brecht Van Lommel
cb45a5bbb0 Cycles: option to specify camera aperture in radius or f/stop:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Camera#Depth_of_Field

Patch by Ejner Fergo.
2012-03-07 13:01:30 +00:00
Nicholas Bishop
925f213427 Code cleanup: simplify the DerivedMesh.drawMappedFaces interface.
This function pointer's 'setDrawOptions' parameter took a slightly
different type than the other drawing callbacks. In particular, it
could set a 'drawSmooth' value to indicate that smoothing should
always be enabled, overriding the face flag. However, all callbacks
either did not set this value, or set it unconditionally to
1. Replaced this by adding a new 'flag' parameter to drawFacesMapped,
which can be set to DM_DRAW_ALWAYS_SMOOTH where appropriate.

Also removed the 'useColors' parameter and replaced it with another
flag value, DM_DRAW_USE_COLORS.

Removed the 'wpaint__setSolidDrawOptions' callback, was only being
used to set the shading to smooth.
2012-03-07 12:48:52 +00:00
Lukas Toenne
43711d8568 Simplified the ntreeUpdate function by getting rid of the dependency list and limiting resorting to cases where it is actually necessary (when nodes get added/removed or links change).
Node updates should generally be local by design, i.e. changes should not depend on any of the other nodes in the same tree. The original purpose of the dependency sort was to allow some experimental nodes to update their socket types based on upstream connected nodes, but these have been removed long ago. If such features need to be implemented they should instead use the tree-wide update callback, which is called after all the local node updates are done.

Removing the extra allocation and recursive function calls from most updates will ensure this function stays as fast as possible and can be called during node space context updates (snode_set_context), which are done very frequently (redraw).
2012-03-07 12:30:29 +00:00
Brecht Van Lommel
e6c2f05efa Cycles: mask layers were still confusing, now they work more like in the original
commit again and less like blender internal, see documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-03-07 12:27:38 +00:00
Brecht Van Lommel
9fba458a7f Cycles: float texture support. Due to GPU limitations there are now 95 byte,
and 5 float image textures. For CPU render this limit will be lifted later
on with image cache support. Patch by Mike Farnsworth.

Also changed color space option in image/environment texture node, to show
options Color and Non-Color Data, instead of sRGB and Linear, this is more
descriptive, and it was not really correct to equate Non-Color Data with
Linear.
2012-03-07 12:27:18 +00:00
Michael Fox
bdf731f03d Patch [#30476] small 3 line patch to add the option 'NOT EQUAL TO' to the select faces by number of vertices operator
"This patch adds "Not Equal To" to the list of options for selecting faces based on the number of vertices. While the equivalent can indeed be achieved by using "Equal To" and invert selection, having this option allows for a smoother work-flow when adjusting the number of vertices to be compared."
2012-03-07 07:32:15 +00:00
Campbell Barton
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
Nicholas Bishop
71e5edeb6a Code cleanup: use typedefs for DerivedMesh drawing callbacks.
There are still fairly bewildering set of callbacks being tossed
around, but it's at least a little less verbose now.
2012-03-07 04:41:14 +00:00
Campbell Barton
b563870fd9 use a better method if picking the rip vertex to use, rather then finding the edge closest to the mouse, find the face corner attached to the vert - thats closest to the mouse, this way ripping gives predictable outcome. 2012-03-07 04:20:30 +00:00
Campbell Barton
0c7487d1eb re: edge split with edges only connected to 2 faces (with no other faces around the verts)
turns out old code also had the same bug (just coincidance it was noticed after my change)

now boundry verts are tagged so edges connected to them are not seen is missing a tagged, adjacent edge.

this fixes [#30471]
2012-03-07 03:58:23 +00:00
Campbell Barton
4fe4cfdb88 revert own commit r44684 it broke edges with one vertex on a boundry 2012-03-07 03:46:30 +00:00
Campbell Barton
04beeea9c9 single vertex rip wasn't finishing with the best vertex selected. 2012-03-07 02:46:58 +00:00
Campbell Barton
6eb6877cdd minor improvement to Rip tool side calculation, measure distance to the edge line segment rather then midpoint. 2012-03-07 01:14:20 +00:00
Campbell Barton
f11d7a426f fix for bug in ED_view3d_project_float that only effected the 'Rip' tool.
when the source and destination vectors were the same pointer, the X value would get overwritten.

now the rip tool uses the best side to grab as in trunk.
2012-03-07 01:06:18 +00:00
Campbell Barton
400a0297b0 - simplify rip code not to expand/contract selection.
- disable BVH edge visibility test (ifdef'd out. dont think its really needed)
2012-03-07 00:08:00 +00:00
Sergey Sharybin
bf9de9d934 Fix #30436: Externally editing unsaved images fails 2012-03-06 21:54:33 +00:00
Sergey Sharybin
7c59666a27 Mango request: for range buttons copy start+1 to end if start>=0
Also copy end-1 to start if changing end boundary and end<=start.

Scene's start/end frames and ghost range in armature buttons are affected.
2012-03-06 21:42:03 +00:00
Nicholas Bishop
2fd7a56526 Fix textured-mode drawing in editmode.
It's currently not respecting the material color, probably since the
BMesh merge. There are a couple problems, both involving "dummy"
variables taking the place of actual MTFace/MCol data.

Code review: http://codereview.appspot.com/5753050/
2012-03-06 21:21:22 +00:00
Campbell Barton
ef67172587 bmesh edge split - use a faster method of finding isolated split edges. 2012-03-06 20:41:11 +00:00
Juha Mäki-Kanto
1148344f46 fix #30440, Collada import: no faces/uv after bmesh merge
Seems too simple, just missing call to convert_mfaces_to_mpolys.
2012-03-06 19:50:07 +00:00