blender.git
7 years agoCycles: support for environment texture "Mirror Ball" projection mode, next to
Brecht Van Lommel [Thu, 8 Mar 2012 19:52:58 +0000 (19:52 +0000)]
Cycles: support for environment texture "Mirror Ball" projection mode, next to
existing "Equirectangular". This projection is useful to create light probes
from a chrome ball placed in a real scene. It expects as input a photograph of
the chrome ball, cropped so the ball just fits inside the image boundaries.

Example setup with panorama camera and mixing two (poor quality) photographs
from different viewpoints to avoid stretching and hide the photographer:
http://www.pasteall.org/pic/28036

7 years agoFix #30435: 2.62 Torus Batch building "Bug" or A Experimental Feature?
Sergey Sharybin [Thu, 8 Mar 2012 18:50:42 +0000 (18:50 +0000)]
Fix #30435: 2.62 Torus Batch building "Bug" or A Experimental Feature?

Python-defined primitives used to be added to all visible layers instead of
adding to active scene layer as it happens with C-defined primitives.

7 years ago== Python API docs ==
Luca Bonavita [Thu, 8 Mar 2012 18:36:23 +0000 (18:36 +0000)]
== Python API docs ==

- Enhanced the -T option:

  - we can now choose among custom themes (now 'blender-org' and later 'naiad')
    and Sphinx internal themes (use -h option to see which ones)

  - choosing a custom theme will copy the theme dir to the output dir

- Added two new command line options:

  -N: Add the theme name to the html dir name
      For example, if we choose the theme 'haiku'
      with using -N will create html files in sphinx-out_haiku/
      Useful to test separate themes without overwriting the smae folder each time

  -B: Builds the html docs running sphinx-build
      This is useful to avoid runing sphinx with a separate shell command

- Fixed the URL in undocumented_message()

7 years agoFix for Francesco Siddi: ALT+A should always start with the scene start frame!
Ton Roosendaal [Thu, 8 Mar 2012 17:40:55 +0000 (17:40 +0000)]
Fix for Francesco Siddi: ALT+A should always start with the scene start frame!

7 years agoNew operators for clip editor's curve view:
Sergey Sharybin [Thu, 8 Mar 2012 17:06:40 +0000 (17:06 +0000)]
New operators for clip editor's curve view:
- Select All operator for selecting markers
- Disable selected markers operator

7 years agobmesh: fix for edge split allowing marked boundry edges for splitting.
Campbell Barton [Thu, 8 Mar 2012 16:46:14 +0000 (16:46 +0000)]
bmesh: fix for edge split allowing marked boundry edges for splitting.

7 years ago- Clip draw as scene strip background works fine again
Sergey Sharybin [Thu, 8 Mar 2012 16:27:53 +0000 (16:27 +0000)]
- Clip draw as scene strip background works fine again
- Path cleanup performed from curve view now clears only active track
  instead of all selected tracks.

7 years agoFix #30485: TRANSFORM / STABILIZE 2D: First row / column blackness.
Sergey Sharybin [Thu, 8 Mar 2012 14:23:34 +0000 (14:23 +0000)]
Fix #30485: TRANSFORM / STABILIZE 2D: First row / column blackness.

Clamp source coordinates to boundaries so it'll be kind of correct weight
calculated for the pixel.

7 years agoFixing several issues with keyingsets:
Bastien Montagne [Thu, 8 Mar 2012 14:04:06 +0000 (14:04 +0000)]
Fixing several issues with keyingsets:
*Add a new idname to keyingsets, keeping name as label-only (using same string for both made lookup fail when using i18n other than english, as it tried to compare an untranslated static string id against a translated RNA name). Also adding a description string (can be helpful with custom keyingsets, imho).
*Fixed a few other bugs related to that area (namely, you can’t deselect current keyingset from the shift-ctrl-alt-I popup menu, and insert/delete key ops were using a rather strange way to get chosen custom keyingset…).
*Fixed UI code so that it always uses (RNA) enum, and simplified menu-creation code.

7 years agoFix #30489: Loop Cut by Typing Numbers Is Limited to 32?
Sergey Sharybin [Thu, 8 Mar 2012 13:20:06 +0000 (13:20 +0000)]
Fix #30489: Loop Cut by Typing Numbers Is Limited to 32?

Increase numbering input of number of loop cuts to 130 as it was in 2.49.
Also display count of cuts in a header.

7 years agoModified behaviour of the link-insertion operator (drag on link, request by Sebastian...
Lukas Toenne [Thu, 8 Mar 2012 12:04:06 +0000 (12:04 +0000)]
Modified behaviour of the link-insertion operator (drag on link, request by Sebastian Koenig). This would previously attempt to find a socket with exactly matching type to the from/to sockets of the cut link, but this is annoying because it often links to the "secondary" sockets, such as Factor input in the Mix node. New behaviour is to choose the input/output for reconnection based on the "highest" (= most important) socket types (in order color, vector, value), like the autoconnect operator (FKEY) also does. It is far from ideal and will probably not work in all situations either, but until we have a detailed design for "best sockets to auto-link" this will have to do.

7 years agoFix ##30455: Orthographic grid alignment jumps/shifts when zooming
Sergey Sharybin [Thu, 8 Mar 2012 11:57:51 +0000 (11:57 +0000)]
Fix ##30455: Orthographic grid alignment jumps/shifts when zooming

Issue was caused by precision errors with floats.
Made internal grid drawing stuff using doubles and also added some
functions to multiply double vector by float matrix which also makes
all intermediate calculation in doubles.

7 years agoKnifetool: change ESC to mean cancel, not confirm.
Howard Trickey [Thu, 8 Mar 2012 11:56:11 +0000 (11:56 +0000)]
Knifetool: change ESC to mean cancel, not confirm.

This corresponds to the more usual convention.
There was no key connected to Cancel, and we already
have Return, Numpad-Return, and Right-click for confirm.

7 years agoPartial Bugfix [#30097] : Current frame indicator on Motion Paths drawn
Joshua Leung [Thu, 8 Mar 2012 10:53:40 +0000 (10:53 +0000)]
Partial Bugfix [#30097] : Current frame indicator on Motion Paths drawn
incorrectly

When the current frame occurs outside the current visible range a given motion
path, the point lookup was seeking past the ends of the path's point cache,
causing sporadic flickering of current frame indicator at 0,0,0.

7 years agoAdd missing include.
Nathan Letwory [Thu, 8 Mar 2012 10:52:30 +0000 (10:52 +0000)]
Add missing include.

7 years agoFix #30464: Confusing lack of label for Fluid "use"
Sergey Sharybin [Thu, 8 Mar 2012 10:13:31 +0000 (10:13 +0000)]
Fix #30464: Confusing lack of label for Fluid "use"

It was indeed not clear at all what that label-less check box does.
Move it to next row (to prevent fluid type menu be too narrow) and
use label default for it.

Also don't create second column which is empty for outflow fluid type.

7 years agoFix #30467: UV/Image Editor: Scope: Opacity Values maybe wrong
Sergey Sharybin [Thu, 8 Mar 2012 10:01:03 +0000 (10:01 +0000)]
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.

7 years agoAnother fix due to recent DM refactoring, for compilation of navmesh...
Bastien Montagne [Thu, 8 Mar 2012 09:14:10 +0000 (09:14 +0000)]
Another fix due to recent DM refactoring, for compilation of navmesh...

7 years agoCompilation error fix for game engine caused by recent DM refactoring.
Sergey Sharybin [Thu, 8 Mar 2012 08:57:38 +0000 (08:57 +0000)]
Compilation error fix for game engine caused by recent DM refactoring.

7 years agoCode cleanup: use named values for options in DerivedMesh drawing.
Nicholas Bishop [Thu, 8 Mar 2012 06:47:05 +0000 (06:47 +0000)]
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.

7 years agostyle cleanup: pep8 + picky edits
Campbell Barton [Thu, 8 Mar 2012 05:36:05 +0000 (05:36 +0000)]
style cleanup: pep8 + picky edits

7 years agocode cleanup: duplicate checks and double assignments.
Campbell Barton [Thu, 8 Mar 2012 04:38:35 +0000 (04:38 +0000)]
code cleanup: duplicate checks and double assignments.

7 years agostyle cleanup - spelling.
Campbell Barton [Thu, 8 Mar 2012 04:12:11 +0000 (04:12 +0000)]
style cleanup - spelling.

7 years agobuilding without python works again, cleanup bmesh include paths (cmake and scons).
Campbell Barton [Thu, 8 Mar 2012 03:25:53 +0000 (03:25 +0000)]
building without python works again, cleanup bmesh include paths (cmake and scons).

7 years agostyle cleanup - remove unneeded ';'s
Campbell Barton [Thu, 8 Mar 2012 03:05:57 +0000 (03:05 +0000)]
style cleanup - remove unneeded ';'s

7 years agouse BLI_path_cmp() rather then strcmp()
Campbell Barton [Thu, 8 Mar 2012 02:19:41 +0000 (02:19 +0000)]
use BLI_path_cmp() rather then strcmp()

7 years agoMany vertex group functions assumed mesh object when lattices could be operated on...
Campbell Barton [Thu, 8 Mar 2012 01:49:25 +0000 (01:49 +0000)]
Many vertex group functions assumed mesh object when lattices could be operated on too.

7 years agofix
Campbell Barton [Thu, 8 Mar 2012 01:22:49 +0000 (01:22 +0000)]
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).

7 years agofix for 2 crashes from missing NULL checks.
Campbell Barton [Thu, 8 Mar 2012 00:23:28 +0000 (00:23 +0000)]
fix for 2 crashes from missing NULL checks.

7 years agothe length of mesh.tessface_vertex_colors was reported incorrect. (fix needed for...
Campbell Barton [Wed, 7 Mar 2012 22:21:28 +0000 (22:21 +0000)]
the length of mesh.tessface_vertex_colors was reported incorrect. (fix needed for FBX export)

7 years agoedits to rna/tessface UV layer needed to get OBJ import/export functional.
Campbell Barton [Wed, 7 Mar 2012 21:58:58 +0000 (21:58 +0000)]
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)

7 years agoFix for setting uv_layer name for modifiers
Sergey Sharybin [Wed, 7 Mar 2012 20:56:25 +0000 (20:56 +0000)]
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.

7 years agochange camera zoom from short to float.
Campbell Barton [Wed, 7 Mar 2012 19:42:22 +0000 (19:42 +0000)]
change camera zoom from short to float.

7 years agoFix for opengl render setting current frame to 0 after finish rendering.
Sergey Sharybin [Wed, 7 Mar 2012 19:19:58 +0000 (19:19 +0000)]
Fix for opengl render setting current frame to 0 after finish rendering.

7 years agofix for error in r44711, needed to update sequencer callback.
Campbell Barton [Wed, 7 Mar 2012 19:19:56 +0000 (19:19 +0000)]
fix for error in r44711, needed to update sequencer callback.
also quiet some warnings.

7 years agoAnother mango request: Ctrl-MMB zoom in camera view
Sergey Sharybin [Wed, 7 Mar 2012 18:34:16 +0000 (18:34 +0000)]
Another mango request: Ctrl-MMB zoom in camera view
It makes it much easier to zoom in camera view using the tablet.

7 years agoremove printing versions in makesdna/makesrna - this used svn ID property which isnt...
Campbell Barton [Wed, 7 Mar 2012 18:27:12 +0000 (18:27 +0000)]
remove printing versions in makesdna/makesrna - this used svn ID property which isnt set in the files anymore.

7 years agoMango request: use active scene clip as background for sequencer scene strip renderer
Sergey Sharybin [Wed, 7 Mar 2012 17:45:40 +0000 (17:45 +0000)]
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.

7 years ago== Python API docs ==
Luca Bonavita [Wed, 7 Mar 2012 17:36:38 +0000 (17:36 +0000)]
== 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

7 years agorunning operators after loading a file in background mode would often fail because...
Campbell Barton [Wed, 7 Mar 2012 17:18:57 +0000 (17:18 +0000)]
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.

7 years agopatch [#30481] rna_Screen_scene_set does the wrong thing [patch]
Campbell Barton [Wed, 7 Mar 2012 16:43:42 +0000 (16:43 +0000)]
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.

7 years agoedit to cursor adjustment, use int rather then short to store the cursor position.
Campbell Barton [Wed, 7 Mar 2012 16:24:25 +0000 (16:24 +0000)]
edit to cursor adjustment, use int rather then short to store the cursor position.

7 years agoUnify string stepping delimiter code for text buttons, text editor and console (all...
Campbell Barton [Wed, 7 Mar 2012 15:55:12 +0000 (15:55 +0000)]
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.

7 years agostyle cleanup: picky edits
Campbell Barton [Wed, 7 Mar 2012 15:10:21 +0000 (15:10 +0000)]
style cleanup: picky edits

7 years agoKnifetool uses direct cutting instead of scanfill: fixes bugs 29908, 28963, 30333.
Howard Trickey [Wed, 7 Mar 2012 14:44:43 +0000 (14:44 +0000)]
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).

7 years agotweak text delimiters for button ctrl + left/right, ctrl+backspace/del
Campbell Barton [Wed, 7 Mar 2012 13:35:32 +0000 (13:35 +0000)]
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).

7 years agoCycles: option to specify camera aperture in radius or f/stop:
Brecht Van Lommel [Wed, 7 Mar 2012 13:01:30 +0000 (13:01 +0000)]
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.

7 years agoCode cleanup: simplify the DerivedMesh.drawMappedFaces interface.
Nicholas Bishop [Wed, 7 Mar 2012 12:48:52 +0000 (12:48 +0000)]
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.

7 years agoSimplified the ntreeUpdate function by getting rid of the dependency list and limitin...
Lukas Toenne [Wed, 7 Mar 2012 12:30:29 +0000 (12:30 +0000)]
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).

7 years agoCycles: mask layers were still confusing, now they work more like in the original
Brecht Van Lommel [Wed, 7 Mar 2012 12:27:38 +0000 (12:27 +0000)]
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

7 years agoCycles: float texture support. Due to GPU limitations there are now 95 byte,
Brecht Van Lommel [Wed, 7 Mar 2012 12:27:18 +0000 (12:27 +0000)]
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.

7 years agoPatch [#30476] small 3 line patch to add the option 'NOT EQUAL TO' to the select...
Michael Fox [Wed, 7 Mar 2012 07:32:15 +0000 (07:32 +0000)]
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."

7 years agostyle cleanup - braces & else / if's
Campbell Barton [Wed, 7 Mar 2012 04:53:43 +0000 (04:53 +0000)]
style cleanup - braces & else / if's

7 years agoCode cleanup: use typedefs for DerivedMesh drawing callbacks.
Nicholas Bishop [Wed, 7 Mar 2012 04:41:14 +0000 (04:41 +0000)]
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.

7 years agouse a better method if picking the rip vertex to use, rather then finding the edge...
Campbell Barton [Wed, 7 Mar 2012 04:20:30 +0000 (04:20 +0000)]
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.

7 years agore: edge split with edges only connected to 2 faces (with no other faces around the...
Campbell Barton [Wed, 7 Mar 2012 03:58:23 +0000 (03:58 +0000)]
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]

7 years agorevert own commit r44684 it broke edges with one vertex on a boundry
Campbell Barton [Wed, 7 Mar 2012 03:46:30 +0000 (03:46 +0000)]
revert own commit r44684 it broke edges with one vertex on a boundry

7 years agosingle vertex rip wasn't finishing with the best vertex selected.
Campbell Barton [Wed, 7 Mar 2012 02:46:58 +0000 (02:46 +0000)]
single vertex rip wasn't finishing with the best vertex selected.

7 years agominor improvement to Rip tool side calculation, measure distance to the edge line...
Campbell Barton [Wed, 7 Mar 2012 01:14:20 +0000 (01:14 +0000)]
minor improvement to Rip tool side calculation, measure distance to the edge line segment rather then midpoint.

7 years agofix for bug in ED_view3d_project_float that only effected the 'Rip' tool.
Campbell Barton [Wed, 7 Mar 2012 01:06:18 +0000 (01:06 +0000)]
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.

7 years ago- simplify rip code not to expand/contract selection.
Campbell Barton [Wed, 7 Mar 2012 00:08:00 +0000 (00:08 +0000)]
- simplify rip code not to expand/contract selection.
- disable BVH edge visibility test (ifdef'd out. dont think its really needed)

7 years agoFix #30436: Externally editing unsaved images fails
Sergey Sharybin [Tue, 6 Mar 2012 21:54:33 +0000 (21:54 +0000)]
Fix #30436: Externally editing unsaved images fails

7 years agoMango request: for range buttons copy start+1 to end if start>=0
Sergey Sharybin [Tue, 6 Mar 2012 21:42:03 +0000 (21:42 +0000)]
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.

7 years agoFix textured-mode drawing in editmode.
Nicholas Bishop [Tue, 6 Mar 2012 21:21:22 +0000 (21:21 +0000)]
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/

7 years agobmesh edge split - use a faster method of finding isolated split edges.
Campbell Barton [Tue, 6 Mar 2012 20:41:11 +0000 (20:41 +0000)]
bmesh edge split - use a faster method of finding isolated split edges.

7 years agofix #30440, Collada import: no faces/uv after bmesh merge
Juha Mäki-Kanto [Tue, 6 Mar 2012 19:50:07 +0000 (19:50 +0000)]
fix #30440, Collada import: no faces/uv after bmesh merge

Seems too simple, just missing call to convert_mfaces_to_mpolys.

7 years agofix for own error in edge-rotate keeping edge customdata - this was crashing when...
Campbell Barton [Tue, 6 Mar 2012 19:29:05 +0000 (19:29 +0000)]
fix for own error in edge-rotate keeping edge customdata - this was crashing when rotating multiple edges.

Now create the rotate edge in advance and copy its customdata (before joining the faces).

This commit also fixes an annoyance where tryangulating faces could create duplicate edges.

7 years agostyle cleanup, brackets in else/if, some indentation.
Campbell Barton [Tue, 6 Mar 2012 18:40:15 +0000 (18:40 +0000)]
style cleanup, brackets in else/if, some indentation.

7 years agocode cleanup - give edge split more helpful var names and replace edgetag macros...
Campbell Barton [Tue, 6 Mar 2012 17:23:26 +0000 (17:23 +0000)]
code cleanup - give edge split more helpful var names and replace edgetag macros with static functions.

7 years agoFix for fracture object crash
Sergey Sharybin [Tue, 6 Mar 2012 16:22:41 +0000 (16:22 +0000)]
Fix for fracture object crash

Issue was caused by incorrect resetting of tesselated fave data in copy_mesh:
- CustomData_free will free data from original mesh because layers in new mesh
  are pointing to the same memory just after copy. So it's needed only to
  set some pointers to NULL.
- It was incorrect filling fdata with zeroes because of incorrect structure size used.

7 years agobmesh: speedup for deselecting all, (avoid topology loops since all get deselected...
Campbell Barton [Tue, 6 Mar 2012 16:17:55 +0000 (16:17 +0000)]
bmesh: speedup for deselecting all, (avoid topology loops since all get deselected anyway).
& some ascii art to explain BM_face_other_vert_loop() behavior.

7 years agoFix sculpt partial redraw in viewport not working, my mistake, found by Nicholas.
Brecht Van Lommel [Tue, 6 Mar 2012 14:48:11 +0000 (14:48 +0000)]
Fix sculpt partial redraw in viewport not working, my mistake, found by Nicholas.

7 years agoActual fix for mango files crashes on load
Sergey Sharybin [Tue, 6 Mar 2012 14:46:45 +0000 (14:46 +0000)]
Actual fix for mango files crashes on load
Was caused by recent code cleanup.

7 years agoFix for crash when loading some mango files
Sergey Sharybin [Tue, 6 Mar 2012 13:57:28 +0000 (13:57 +0000)]
Fix for crash when loading some mango files

Seems that issue is caused by several threads accessing to movie clip and one
of the threads (compositor node) was editing ImBuf which isn't nice anyway.

7 years agoquiet some warnings and fix build error with strict casting rules.
Campbell Barton [Tue, 6 Mar 2012 12:51:17 +0000 (12:51 +0000)]
quiet some warnings and fix build error with strict casting rules.

7 years agoCamera tracking: wall scene orientation operator
Sergey Sharybin [Tue, 6 Mar 2012 12:27:42 +0000 (12:27 +0000)]
Camera tracking: wall scene orientation operator

Made Set Floor a bit more general and name it Set Plane which defines
orientation from 3 selected tracks and makes them belong to specified
plane (wall or floor).

7 years agoFix to knifetool when intermediate point in space.
Howard Trickey [Tue, 6 Mar 2012 12:16:55 +0000 (12:16 +0000)]
Fix to knifetool when intermediate point in space.

Before, if you cut the same edge multiple times
with an intermediate point in space, it wouldn't
get all of the edges.

7 years agoAdd BM_face_split_n which splits a face with intermediate points with given coordinates.
Howard Trickey [Tue, 6 Mar 2012 12:09:35 +0000 (12:09 +0000)]
Add BM_face_split_n which splits a face with intermediate points with given coordinates.

This will be used in soon-to-be-commited knife tool rewrite.
Interpolates using the original face.
Also fixed or improved a couple of comments.

7 years agoFix for 30439, Cycles node group conversion wasn't checking node->id pointer (group...
Lukas Toenne [Tue, 6 Mar 2012 11:34:57 +0000 (11:34 +0000)]
Fix for 30439, Cycles node group conversion wasn't checking node->id pointer (group node without internal node tree). This is a somewhat unusual case (UI buttons don't allow unlinking group tree), but not entirely forbidden.

Also fixed similar issue in node_templates.c where the group tree is used to generate a button name.

7 years agoFixed typo in tracking-related tweaks for depsgraph resulting with crash
Sergey Sharybin [Tue, 6 Mar 2012 11:24:23 +0000 (11:24 +0000)]
Fixed typo in tracking-related tweaks for depsgraph resulting with crash
in special cases (like setting camera's constraint clip if scene's clip is not set)

7 years agoFix incorrect null parameter in PBVH drawing
Nicholas Bishop [Tue, 6 Mar 2012 09:19:13 +0000 (09:19 +0000)]
Fix incorrect null parameter in PBVH drawing

7 years agoCode cleanup: remove some PBVH material code that isn't needed anymore.
Nicholas Bishop [Tue, 6 Mar 2012 03:34:27 +0000 (03:34 +0000)]
Code cleanup: remove some PBVH material code that isn't needed anymore.

7 years agoDraw individual face's material and shading correctly in the PBVH.
Nicholas Bishop [Tue, 6 Mar 2012 02:40:08 +0000 (02:40 +0000)]
Draw individual face's material and shading correctly in the PBVH.

Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.

This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)

Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.

In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).

7 years agoCode cleanup: remove unused parameter from some ccgSubSurf accessors.
Nicholas Bishop [Tue, 6 Mar 2012 01:01:42 +0000 (01:01 +0000)]
Code cleanup: remove unused parameter from some ccgSubSurf accessors.

Remove 'CCGSubSurf *ss' parameter from ccgSubSurf_getFaceFaceHandle,
ccgSubSurf_getFaceVert, and ccgSubSurf_getFaceEdge.

7 years agoBugfix and code cleanup: use better types for faceFlags in CCGDM.
Nicholas Bishop [Tue, 6 Mar 2012 00:17:03 +0000 (00:17 +0000)]
Bugfix and code cleanup: use better types for faceFlags in CCGDM.

Previously this was just a character array that stored face/poly flags
and mat_nr. Since mat_nr should be a short, this would have truncated
for higher values.

Replaced with a new DMFaceFlags struct.

7 years agoCode cleanup in rna files (huge, higly automated with py script).
Bastien Montagne [Mon, 5 Mar 2012 23:30:41 +0000 (23:30 +0000)]
Code cleanup in rna files (huge, higly automated with py script).

Addresses:
* C++ comments.
* Spaces after if/for/while/switch statements.
* Spaces around assignment operators.

7 years agoCode cleanup: factor out some common code from PBVH build_sub/build_leaf.
Nicholas Bishop [Mon, 5 Mar 2012 22:24:49 +0000 (22:24 +0000)]
Code cleanup: factor out some common code from PBVH build_sub/build_leaf.

7 years agoCode cleanup: add comments for build_sub() and remove debug function.
Nicholas Bishop [Mon, 5 Mar 2012 22:12:50 +0000 (22:12 +0000)]
Code cleanup: add comments for build_sub() and remove debug function.

Remove the function (and call to) check_partitioning(), this was just
a debug function.

7 years agoCode cleanup: split PBVH build_sub() into two functions.
Nicholas Bishop [Mon, 5 Mar 2012 21:55:53 +0000 (21:55 +0000)]
Code cleanup: split PBVH build_sub() into two functions.

Removes also a confusing else{} block that didn't make much sense.

7 years agoDisable interpolation of customdata layers on edge slide
Sergey Sharybin [Mon, 5 Mar 2012 21:42:17 +0000 (21:42 +0000)]
Disable interpolation of customdata layers on edge slide

This option might be useful in some cases like keeping UV coordinated in kind of
"correct" state so sliding edge loop will also slide edges in UV. But for other
layers like shapekeys and vertex colors it's arguable it's actually needed.

The way it's currently done isn't actually acceptable because it doesn't take
flags like UVCALC_TRANSFORM_CORRECT into account and also makes extra unwanted
things like interpolating shapekeys which leads to propagating changes into
basis keys and also results with slide applied twice for relative keys because
offset is also applying on loading edit mesh.

Also discussed with Brecht who agreed with marking this things as TODO and
disabling for now.

This should fix issue reported in #30387: Edge Slide propogates to Basis Shape Key

7 years agoCode cleanup: remove unused drawFacesColored from DerivedMesh.
Nicholas Bishop [Mon, 5 Mar 2012 21:27:28 +0000 (21:27 +0000)]
Code cleanup: remove unused drawFacesColored from DerivedMesh.

This function pointer isn't called anymore, so removing it and the
cddm/ccgdm/gpu code associated with it.

7 years agofix [#30459] BMesh Edge Split Hangs.
Campbell Barton [Mon, 5 Mar 2012 21:17:24 +0000 (21:17 +0000)]
fix [#30459] BMesh Edge Split Hangs.

edge split result is still not correct in this case but at least avoid eternal loop.

also - dont tag sharp edges with <2 faces for splitting.

7 years agoFix for OpenEXR half float save function resulting in dark images saved
Sergey Sharybin [Mon, 5 Mar 2012 18:54:57 +0000 (18:54 +0000)]
Fix for OpenEXR half float save function resulting in dark images saved

Float buffers of ImBuf are always supposed to be linear space a,d ImBuf's
profile means how byte array was constructed from float buffer.

7 years agocopying a mesh was generating tessfaces which isnt needed
Campbell Barton [Mon, 5 Mar 2012 18:05:06 +0000 (18:05 +0000)]
copying a mesh was generating tessfaces which isnt needed

7 years agoAdd stub needed for blenderplayer compilation.
Sergey Sharybin [Mon, 5 Mar 2012 17:23:52 +0000 (17:23 +0000)]
Add stub needed for blenderplayer compilation.

7 years agoadded check for DNA C syntax we cant parse:
Campbell Barton [Mon, 5 Mar 2012 16:21:13 +0000 (16:21 +0000)]
added check for DNA C syntax we cant parse:

 void*somepointer;

.. this is valid C but breaks makesdna.c

7 years agotesselat -> tessellat in UI messages, + style edits.
Bastien Montagne [Mon, 5 Mar 2012 16:19:16 +0000 (16:19 +0000)]
tesselat -> tessellat in UI messages, + style edits.

7 years agoFix for missed faces in mesh after switching active shape key in edit mode.
Sergey Sharybin [Mon, 5 Mar 2012 14:25:52 +0000 (14:25 +0000)]
Fix for missed faces in mesh after switching active shape key in edit mode.

7 years ago== Python API docs ==
Luca Bonavita [Mon, 5 Mar 2012 14:12:38 +0000 (14:12 +0000)]
== Python API docs ==

Adding two new command line options (-f = full rebuild, -t = testing) so that we don't have to edit the file each time

7 years agoRegionView3D.update call, to address issue in report:
Campbell Barton [Mon, 5 Mar 2012 13:02:45 +0000 (13:02 +0000)]
RegionView3D.update call, to address issue in report:
 [#30454] perspective_matrix not update in real time with bpy.ops.view3d.zoom

This is so you can modifify the view settings and get the view matrix after without waiting for a redraw.