blender-staging.git
8 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).

8 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

8 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.

8 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."

8 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

8 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.

8 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.

8 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]

8 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

8 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.

8 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.

8 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.

8 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)

8 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

8 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.

8 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/

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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).

8 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.

8 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.

8 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.

8 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)

8 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

8 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.

8 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).

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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

8 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.

8 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.

8 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.

8 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

8 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.

8 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

8 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.

8 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.

8 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

8 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.

8 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.

8 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)

8 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

8 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.

8 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.

8 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.

8 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

8 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.

8 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.

8 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>.

8 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.

8 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]

8 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).

8 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.

8 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

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

8 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.

8 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.

8 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.

8 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.

8 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.

8 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…

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

8 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

8 years agostyle cleanup - use aligned * prefixed blocks for descriptive comments (was already...
Campbell Barton [Sat, 3 Mar 2012 16:31:46 +0000 (16:31 +0000)]
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).

8 years agofix for leak in bmesh edge split - assert when invalid args are given rather then...
Campbell Barton [Sat, 3 Mar 2012 14:48:50 +0000 (14:48 +0000)]
fix for leak in bmesh edge split - assert when invalid args are given rather then returning NULL.

8 years agobmesh support for rotating multiple edges at once.
Campbell Barton [Sat, 3 Mar 2012 12:49:03 +0000 (12:49 +0000)]
bmesh support for rotating multiple edges at once.

8 years agobmesh edge rotate
Campbell Barton [Sat, 3 Mar 2012 12:35:37 +0000 (12:35 +0000)]
bmesh edge rotate
* improve check to see if edge rotate can be done,
  was checking if both edges verts have an edge count of 2, which is really a meaningless test since the verts can have stray edges connected and the result wont work right.
  instead check if the next verts in both faces share a vertex.

* add utility function BM_face_other_vert_loop() which gets the next loop in a face.
* add convenience function BM_edge_face_pair() which returns 2 faces for edges that have exactly 2 face users. (saves ugly e->l->radial_next ... in code) and is more readable.

8 years agostyle cleanup - spelling corrections & update some incorrect comments.
Campbell Barton [Sat, 3 Mar 2012 11:45:08 +0000 (11:45 +0000)]
style cleanup - spelling corrections & update some incorrect comments.

8 years agooption for the Armature Actuator to change the influence of a bone constraint.
Dalai Felinto [Sat, 3 Mar 2012 02:47:01 +0000 (02:47 +0000)]
option for the Armature Actuator to change the influence of a bone constraint.
Also adds DampedTrackTo to the list of supported constraints in the BGE

Test file:
http://www.pasteall.org/blend/11715

Patch developed as part of a project to NF-UBC Nereus Program.
Development time 'sponsored' by the project.
www.nereusprogram.org

8 years agofix for error report in property registration, it wasnt printing the error.
Campbell Barton [Sat, 3 Mar 2012 00:20:05 +0000 (00:20 +0000)]
fix for error report in property registration, it wasnt printing the error.

8 years ago"Fix" [#30431] UI string spelling & similar fixes.
Bastien Montagne [Fri, 2 Mar 2012 21:14:37 +0000 (21:14 +0000)]
"Fix" [#30431] UI string spelling & similar fixes.

All suggested changes looked good to me, thx to Michael Färber for this list of changes!

8 years agofix bug [#30426] crash in bmesh python api.
Campbell Barton [Fri, 2 Mar 2012 18:23:08 +0000 (18:23 +0000)]
fix bug [#30426] crash in bmesh python api.

if blender freed the BMesh before python was finished (on exit editmode for eg), python would attempt to access the bmesh to clear python pointers in it.

8 years agoremove prints committed by accident.
Campbell Barton [Fri, 2 Mar 2012 17:53:39 +0000 (17:53 +0000)]
remove prints committed by accident.

8 years agostyle cleanup
Campbell Barton [Fri, 2 Mar 2012 16:05:54 +0000 (16:05 +0000)]
style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.

8 years agoFix #30421: Panorama option in camera properties always disabled
Sergey Sharybin [Fri, 2 Mar 2012 15:14:42 +0000 (15:14 +0000)]
Fix #30421: Panorama option in camera properties always disabled

Issue was caused by comparing camera's type with PERSPECTIVE instead of PERSP which is
declared in RNA files.

Patch by Susanne H., thanks!

8 years agomesh.update() now has option to calculate tessellation faces.
Campbell Barton [Fri, 2 Mar 2012 14:46:14 +0000 (14:46 +0000)]
mesh.update() now has option to calculate tessellation faces.

8 years ago== Python API docs ==
Luca Bonavita [Fri, 2 Mar 2012 14:39:18 +0000 (14:39 +0000)]
== Python API docs ==

- Works in macOSX now (hackish)
  (TODO: not check for OSX explicitly but handle exception if it fails)

- We can now generate rst files outside out of the source (was annoying)
  - Moved some vars at module level
  - Managing the command line args with argparse.
    Example usage:
    ./cmake/bin/blender -b -P ./blender/doc/python_api/sphinx_doc_gen.py -- -o ./python_api

8 years agoCode Cleanup - naming consistancy for bmesh struct types
Campbell Barton [Fri, 2 Mar 2012 12:44:34 +0000 (12:44 +0000)]
Code Cleanup - naming consistancy for bmesh struct types

8 years agocode cleanup:
Campbell Barton [Fri, 2 Mar 2012 12:09:49 +0000 (12:09 +0000)]
code cleanup:
replace casts: '((Mesh *)ob->data)->edit_btmesh' with 'BMEdit_FromObject(ob)'

also minor style edits.

8 years agobmesh minor changes
Campbell Barton [Fri, 2 Mar 2012 10:49:15 +0000 (10:49 +0000)]
bmesh minor changes
* dont check selection and hiddent state (select + hide isnt allowed and api ensures this)
* MESH_OT_noise had incorrect check for texture (checked if slot [0] was filled but then used active texture)

8 years agoFix [#30419] Median wrongly setting lattice vertex weights.
Bastien Montagne [Fri, 2 Mar 2012 10:30:11 +0000 (10:30 +0000)]
Fix [#30419] Median wrongly setting lattice vertex weights.

In fact, the same bug affected curves' weights too. Now using the same method as for setting mesh edges' crease and bevel weights. Also factorized/simplified that part of code by defining a new utility func computing the scale factor.

Also greatly simplified UI code in same v3d_editvertex_buts() function, was really over-complicated (this fixes btw a few minor UI bugs in the transform editmode panel, like missing tips, etc.).

8 years agominor edits to last commit - use fixed chunksize, rather than the number of verts...
Campbell Barton [Thu, 1 Mar 2012 23:59:34 +0000 (23:59 +0000)]
minor edits to last commit - use fixed chunksize, rather than the number of verts/edges/faces in bm_mempool_init().

8 years agostyle cleanup for mempool
Campbell Barton [Thu, 1 Mar 2012 23:14:51 +0000 (23:14 +0000)]
style cleanup for mempool

8 years agoCode Cleanup: update to mempool, use flag rather then bool args.
Campbell Barton [Thu, 1 Mar 2012 22:59:18 +0000 (22:59 +0000)]
Code Cleanup: update to mempool, use flag rather then bool args.

8 years agobmesh - changes to mempool allocations
Campbell Barton [Thu, 1 Mar 2012 22:17:04 +0000 (22:17 +0000)]
bmesh - changes to mempool allocations
* double default edge allocation size (double the number of verts/faces).
* CustomData_bmesh_init_pool was using allocsize & chunksize as the same variable. Now use type specific chunk size.
* bmesh copy and editmode conversion now allocate the BMesh mempool size needed for the entire vert/edge/loop/face arrays since its known already.

8 years agoFix #30413: dynamic paint crash with texture slots with no texture assigned.
Brecht Van Lommel [Thu, 1 Mar 2012 20:41:13 +0000 (20:41 +0000)]
Fix #30413: dynamic paint crash with texture slots with no texture assigned.

8 years agobmmesh api - use struct rather than int[4] to initialize mesh sizes.
Campbell Barton [Thu, 1 Mar 2012 20:09:17 +0000 (20:09 +0000)]
bmmesh api - use struct rather than int[4] to initialize mesh sizes.

also correct bad assert() in previous commit.