blender.git
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.

7 years agofix [#30457] Smooth normals wrongly exported to wavefront
Campbell Barton [Mon, 5 Mar 2012 11:49:24 +0000 (11:49 +0000)]
fix [#30457] Smooth normals wrongly exported to wavefront

mesh.calc_normals() wasnt calculating vertex normals (only face normals),

now only calculate vertex normals.

added a define incase we want to have poly normals back again.

7 years agoedge rotate now keeps edge properties (like seam, crease, bevel weight.. etc)
Campbell Barton [Mon, 5 Mar 2012 01:53:30 +0000 (01:53 +0000)]
edge rotate now keeps edge properties (like seam, crease, bevel weight.. etc)

7 years agoImprovements to bmesh edge rotate
Campbell Barton [Mon, 5 Mar 2012 00:50:18 +0000 (00:50 +0000)]
Improvements to bmesh edge rotate

On a user level, edge rotate now works better with multiple edges selected, it wont make zero area faces or rotate edges into existing ones.

With a single edge selected - rotate is less strict and will allow ugly resulting faces but still checks on duplicate edges.

API:
* BM_edge_rotate now takes a flag, to optionally...
** check for existing edge
** splice edge (rotate and merge)
** check for degenerate resulting faces (overlapping geometry, zero area)
** beauty - only rotate to a better fit.
... this allows it to still be used as a low level API function since all checks can be skipped.

* BM_edge_rotate() now works a bit different, it find the new edge rotation before joining the faces - exposed by BM_edge_rotate_calc().

* Added api call bmesh_radial_faceloop_find_vert() - Radial Find a Vertex Loop in Face

7 years agoAdded option to fit frame to the whole clip editor viewport instead of zooming
Sergey Sharybin [Sun, 4 Mar 2012 21:02:58 +0000 (21:02 +0000)]
Added option to fit frame to the whole clip editor viewport instead of zooming
to a power-of-two factor. Shortcut is F.

7 years agoTrack cleanup operators are now moved to the global clip editor shortcuts
Sergey Sharybin [Sun, 4 Mar 2012 20:44:09 +0000 (20:44 +0000)]
Track cleanup operators are now moved to the global clip editor shortcuts
which makes it possible to cleanup tracks from curve view.

7 years agoFixed copyright lines for some tracking related DNA files.
Sergey Sharybin [Sun, 4 Mar 2012 20:23:50 +0000 (20:23 +0000)]
Fixed copyright lines for some tracking related DNA files.

7 years agoMovie clip editor: implemented border select operator for curves view
Sergey Sharybin [Sun, 4 Mar 2012 19:34:01 +0000 (19:34 +0000)]
Movie clip editor: implemented border select operator for curves view

7 years ago* rename BM_face_other_loop --> BM_face_other_edge_loop
Campbell Barton [Sun, 4 Mar 2012 16:36:31 +0000 (16:36 +0000)]
* rename BM_face_other_loop --> BM_face_other_edge_loop
* optimize BM_face_other_edge_loop to do about half as many iterations for quad heavy meshes, with ngons the gain is much more since searching around the entire ngon when the edge already stores its loop is silly.
 ... also nicer in cases where edge has no face users it avoids a loop on all face corners.

7 years agoswitch arg order for BM_face_other_* funcs (make face come first), and add nice ascii...
Campbell Barton [Sun, 4 Mar 2012 16:01:02 +0000 (16:01 +0000)]
switch arg order for BM_face_other_* funcs (make face come first), and add nice ascii art for BM_face_other_vert_loop since this stuff is hard to grasp as text.

7 years ago#collada skeleton import, bugfix #29621
Arystanbek Dyussenov [Sun, 4 Mar 2012 13:43:23 +0000 (13:43 +0000)]
#collada skeleton import, bugfix #29621

Do not crash when joint SIDs cannot be resolved.

OpenCOLLADA cannot resolve joint SIDs connected to skin if the <skeleton> tag is missing.

Page 148 of COLLADA spec 1.4.1 states: "<skeleton> elements define where to start the sid lookup". So I think this is a bug in "FBX COLLADA exporter" which did not add the <skeleton> tag.

The problem can be fixed by manually adding the <skeleton> tag into <instance_controller>.

7 years agofix for building openjpeg image support on OpenSUSE 12.1, also quiet compile warning.
Campbell Barton [Sun, 4 Mar 2012 11:58:55 +0000 (11:58 +0000)]
fix for building openjpeg image support on OpenSUSE 12.1, also quiet compile warning.

7 years agofix for missing NULL check in bmesh.from_mesh(), bug [#30446]
Campbell Barton [Sun, 4 Mar 2012 11:10:11 +0000 (11:10 +0000)]
fix for missing NULL check in bmesh.from_mesh(), bug [#30446]

7 years agoSmall feature for the viewer linking operator: When no viewer node is present in...
Lukas Toenne [Sun, 4 Mar 2012 10:49:13 +0000 (10:49 +0000)]
Small feature for the viewer linking operator: When no viewer node is present in the tree, it automatically adds a new one next to the output socket.

Also changed the poll function of that operator to make sure it actually only works on compositor trees (others don't have viewer nodes).

7 years agostyle cleanup - comment spelling + translate some dutch.
Campbell Barton [Sun, 4 Mar 2012 04:35:12 +0000 (04:35 +0000)]
style cleanup - comment spelling + translate some dutch.

7 years agofix for issue raise by patch [#30154] non utf8 buildinfo, fails to import 'bpy' module.
Campbell Barton [Sun, 4 Mar 2012 03:14:38 +0000 (03:14 +0000)]
fix for issue raise by patch [#30154] non utf8 buildinfo, fails to import 'bpy' module.

we cant ensure buildinfo to have utf8 encoding so access it as bytes via python - a different workaround then this patch made.

also use C style string formatting for sys_info.py

7 years agoWhitespace tweaks
Joshua Leung [Sun, 4 Mar 2012 02:43:15 +0000 (02:43 +0000)]
Whitespace tweaks

7 years agobmesh: add back feature from 2.4x Ctrl+Shift+T subdivides quads in the alternate...
Campbell Barton [Sun, 4 Mar 2012 02:18:17 +0000 (02:18 +0000)]
bmesh: add back feature from 2.4x Ctrl+Shift+T subdivides quads in the alternate direction.

7 years agofix for crash in bmesh py api, was missing NULL checks for parsing sequences and...
Campbell Barton [Sun, 4 Mar 2012 02:09:02 +0000 (02:09 +0000)]
fix for crash in bmesh py api, was missing NULL checks for parsing sequences and had bad string formatting in exception.

7 years agochanges to ED_mesh_update() to work with OBJ import.
Campbell Barton [Sun, 4 Mar 2012 00:16:50 +0000 (00:16 +0000)]
changes to ED_mesh_update() to work with OBJ import.
* calculate vertex normals (previously was calculating face normals only)
* clear tessfaces unless theres an argument to build them. since no tessfaces is the default state right now.
* if convert_mfaces_to_mpolys() runs, dont calculate edges, since it already does that.

7 years ago#ifdef out ngon edge-ring loop support, from r44561, this is a nice feature but can...
Campbell Barton [Sat, 3 Mar 2012 22:27:34 +0000 (22:27 +0000)]
#ifdef out ngon edge-ring loop support, from r44561, this is a nice feature but can too easily give bad results, perhaps being it back with some sanity checks.

7 years agobmesh py api
Campbell Barton [Sat, 3 Mar 2012 22:07:58 +0000 (22:07 +0000)]
bmesh py api
* add BLI_rfindlink for reverse index lookup (used so bm.select_history[-1] doesn't have to loop the entire list twice).
* add bm.select_history.active so you can get the last selected item or None without having to check seq length.

7 years agoMany i18n fixings, based on [#30428] [2.62] Translation Issues.
Bastien Montagne [Sat, 3 Mar 2012 21:42:21 +0000 (21:42 +0000)]
Many i18n fixings, based on [#30428] [2.62] Translation Issues.

In fact, most "UI special cases" are not well translated, currently. :/ This affects especially the "Properties" panels. This commit should address problems in Graph editors, and 3D View (but probably not yet all of them). Yet it already adds more than 100 new messages (and fixes translated drawing of more).

Also done some style edits…

7 years agostyle cleanup - comment formatting
Campbell Barton [Sat, 3 Mar 2012 20:36:09 +0000 (20:36 +0000)]
style cleanup - comment formatting

7 years agostyle cleanup / comment formatting for bli/bke/bmesh
Campbell Barton [Sat, 3 Mar 2012 20:19:11 +0000 (20:19 +0000)]
style cleanup / comment formatting for bli/bke/bmesh