8 years agoChanges in FFV1 codec settings
Sergey Sharybin [Fri, 24 Feb 2012 09:49:44 +0000 (09:49 +0000)]
Changes in FFV1 codec settings

Since FFmpeg 0.10 release FFV1 codec supports alpha channel which is getting
enabled when using PIX_FMT_RGB32 pixel format. This leads to incompatibility of
videos rendered in Blender with almost all external players (especially in OSX).

Seems that PIX_FMT_BGR0 is recommended to be used to make videos compatible with
older players which doesn't support alpha channel in FFV1.

Also added an option to switch to RGBA rendering if FFV1 codec is used and if RGBA
rendering is used FFV1 will be using PIX_FMT_RGB32 format which supports alpha channel.

8 years agotypo cleanup, no functional changes.
Campbell Barton [Fri, 24 Feb 2012 06:44:04 +0000 (06:44 +0000)]
typo cleanup, no functional changes.

8 years agobmesh py api (some api changes and doc additions)
Campbell Barton [Fri, 24 Feb 2012 05:56:06 +0000 (05:56 +0000)]
bmesh py api (some api changes and doc additions)
* remove 'select' and 'hide' from BMLoop
* remove BMesh.update
* add BMesh.normal_update(skip_hidden=False)
* add BMElemSet.index_update(), eg: bm.verts.index_update()

bmesh api
* BM_mesh_normals_update() now takes skip_hidden as an argument
(previously this was default behavior), however this isnt good when
using BMesh modifiers, where you want all normals to be recalculated.
* add bm_iter_itype_htype_map[], to get the iter type from a BMesh

8 years agobmesh python api - add/improve rst docstrings.
Campbell Barton [Fri, 24 Feb 2012 04:59:13 +0000 (04:59 +0000)]
bmesh python api - add/improve rst docstrings.

8 years agoFix #30325: bmesh edges were marked as sharp by default, after recent
Brecht Van Lommel [Thu, 23 Feb 2012 21:23:49 +0000 (21:23 +0000)]
Fix #30325: bmesh edges were marked as sharp by default, after recent
refactor to reuse BM_ELEM_SMOOTH flag for sharp flag.

8 years agoFix #30268: cloth collision and springs not working after bmesh merge,
Brecht Van Lommel [Thu, 23 Feb 2012 21:07:22 +0000 (21:07 +0000)]
Fix #30268: cloth collision and springs not working after bmesh merge,
these cloth and collision modifiers require tesselation still.

8 years agoFix #30326: calling e.g. bpy.ops.object.proxy_make(object = 'Lamp') would
Brecht Van Lommel [Thu, 23 Feb 2012 20:31:51 +0000 (20:31 +0000)]
Fix #30326: calling e.g. bpy.ops.object.proxy_make(object = 'Lamp') would
not pick the right object. This operator had two properties "object" and
"type", but the latter was used while the former had the right description.
Now changed it to have only an "object" property, so that the above code works.

8 years agoFix #30140: cycles multi GPU rendering with one device supporting full
Brecht Van Lommel [Thu, 23 Feb 2012 20:27:17 +0000 (20:27 +0000)]
Fix #30140: cycles multi GPU rendering with one device supporting full
shading and the other not can't work correct, disabled that now.

8 years agoFix #30246: rendering multiple render layers with CUDA still not working,
Brecht Van Lommel [Thu, 23 Feb 2012 19:48:18 +0000 (19:48 +0000)]
Fix #30246: rendering multiple render layers with CUDA still not working,
should really be fixed now.

8 years agoFix #30323: Graph view in the Movie Clip Editor does not stay open
Sergey Sharybin [Thu, 23 Feb 2012 18:51:24 +0000 (18:51 +0000)]
Fix #30323: Graph view in the Movie Clip Editor does not stay open

In fact, Graph View wasn't been supposed to be opened in Clip show editor mode.
Made curves view unavailable from Clip view mode and store it's alignment in
a runtime flag in SpaceClip structure.

8 years agobmesh py api - ensure data layers to store bmesh pointers exist - removing all elemen...
Campbell Barton [Thu, 23 Feb 2012 17:22:37 +0000 (17:22 +0000)]
bmesh py api - ensure data layers to store bmesh pointers exist - removing all elements could free them for eg.

8 years agobmesh py api
Campbell Barton [Thu, 23 Feb 2012 17:14:53 +0000 (17:14 +0000)]
bmesh py api

added a utility function for converting a list of python BMesh elements into a C array.
use for this face_join as well as

8 years agoFix #30306: crash duplicating object with action actuator but no animation data.
Brecht Van Lommel [Thu, 23 Feb 2012 16:12:36 +0000 (16:12 +0000)]
Fix #30306: crash duplicating object with action actuator but no animation data.

8 years agobmesh split tool (Ykey), was only splitting off faces, unlike EditMesh which could...
Campbell Barton [Thu, 23 Feb 2012 16:00:53 +0000 (16:00 +0000)]
bmesh split tool (Ykey), was only splitting off faces, unlike EditMesh which could also split edges.
make this behavior optional and default to off (match EditMesh).

8 years agoprevious fix wasnt working in edge mode, now selection +/- works in vert/edge/face...
Campbell Barton [Thu, 23 Feb 2012 15:47:18 +0000 (15:47 +0000)]
previous fix wasnt working in edge mode, now selection +/- works in vert/edge/face modes.

8 years agofix [#30318] increase/decrease selection won't work (select-more/less)
Campbell Barton [Thu, 23 Feb 2012 15:22:29 +0000 (15:22 +0000)]
fix [#30318] increase/decrease selection won't work (select-more/less)

This was a problem with bmesh merge, now it works as expected again.

8 years agoFix #30298: fluid simulation from older files not working when loaded into 2.62,
Brecht Van Lommel [Thu, 23 Feb 2012 15:10:26 +0000 (15:10 +0000)]
Fix #30298: fluid simulation from older files not working when loaded into 2.62,
this was due to a wrong version patch which leaves simulation speed to 0.

8 years agoCycles: fix cuda kernel not getting rebuilt correctly after changes, due to
Brecht Van Lommel [Thu, 23 Feb 2012 15:10:10 +0000 (15:10 +0000)]
Cycles: fix cuda kernel not getting rebuilt correctly after changes, due to
refactoring that changed variable names, also fixed OpenCL compile issue with
advanced shading.

8 years agofix for meshes not showing up in the game engine.
Campbell Barton [Thu, 23 Feb 2012 14:24:45 +0000 (14:24 +0000)]
fix for meshes not showing up in the game engine.

8 years agobmesh py api, added: bmesh.utils.edge_rotate(edge, ccw=False)
Campbell Barton [Thu, 23 Feb 2012 14:15:26 +0000 (14:15 +0000)]
bmesh py api, added: bmesh.utils.edge_rotate(edge, ccw=False)

    also improved docstrings.

8 years agoquiet error message when saving (WM_OT_save_as_mainfile.use_mesh_compat not found).
Campbell Barton [Thu, 23 Feb 2012 13:14:59 +0000 (13:14 +0000)]
quiet error message when saving (WM_OT_save_as_mainfile.use_mesh_compat not found).

8 years agoelsyiun theme
Campbell Barton [Thu, 23 Feb 2012 13:08:42 +0000 (13:08 +0000)]
elsyiun theme
* too light unselected vertex color.
* active color was darker then selected color (make active a lighter tint of selected).

8 years agoFix #30320: Shading issue with boolean modifier
Sergey Sharybin [Thu, 23 Feb 2012 12:28:18 +0000 (12:28 +0000)]
Fix #30320: Shading issue with boolean modifier

Seems that after converting tessfaces into faces normals should be re-calculated.
At least that's what happening in some other modifiers and what makes boolean
work fine with smooth normals.

8 years agoadding icosphere was broken with own recent commit
Campbell Barton [Thu, 23 Feb 2012 12:11:27 +0000 (12:11 +0000)]
adding icosphere was broken with own recent commit

8 years agoSegments and rings for UV Sphere were swapped.
Sergey Sharybin [Thu, 23 Feb 2012 12:06:49 +0000 (12:06 +0000)]
Segments and rings for UV Sphere were swapped.

8 years agobmesh py api, new elements now take optional 'example' arguments, so the new data...
Campbell Barton [Thu, 23 Feb 2012 11:27:22 +0000 (11:27 +0000)]
bmesh py api, new elements now take optional 'example' arguments, so the new data copies from the existing.

8 years agouse __ prefix on header guards to avoid mixing up defines with api functions / classes.
Campbell Barton [Thu, 23 Feb 2012 10:41:31 +0000 (10:41 +0000)]
use __ prefix on header guards to avoid mixing up defines with api functions / classes.

8 years agoBugfix: don't read from a write-only VBO when updating grid buffers.
Nicholas Bishop [Thu, 23 Feb 2012 10:35:23 +0000 (10:35 +0000)]
Bugfix: don't read from a write-only VBO when updating grid buffers.

8 years agobmesh py api functions:
Campbell Barton [Thu, 23 Feb 2012 10:29:04 +0000 (10:29 +0000)]
bmesh py api functions:
bmesh.utils.vert_collapse_edge, vert_collapse_faces, vert_dissolve, face_split

8 years agobmesh api cleanup, remove unused header.
Campbell Barton [Thu, 23 Feb 2012 10:24:20 +0000 (10:24 +0000)]
bmesh api cleanup, remove unused header.

8 years agoFix #30315: Temporary proxy files are not erased and old proxys are not updated if...
Sergey Sharybin [Thu, 23 Feb 2012 10:18:10 +0000 (10:18 +0000)]
Fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)

Two issues are fixed here:
- On windows rename() doesn't actually renames file if destination file is already exist.
  Solved by ulinking previously built proxy/timecode.
- IMB_TC_MAX_SLOT was set to incorrect value leading to record run timecode calculating
  several times.

8 years agoBGE is compilable by MSVC again
Sergey Sharybin [Thu, 23 Feb 2012 09:40:10 +0000 (09:40 +0000)]
BGE is compilable by MSVC again

Compilation error was mostly caused by trying to use namespace std before it was
actually defined (e.g. before any include of stl header).
It's not actually good idea to use namespaces in header files -- it's really easy to
run into namespace conflicts and so. Resolved by not using "using namespace" in header
files and using full quality accessing to stl collections (e.g. std::vector).

8 years agobmesh minor api refactor
Campbell Barton [Thu, 23 Feb 2012 09:26:53 +0000 (09:26 +0000)]
bmesh minor api refactor
* BM_vert_in_face now loops over a vert's faces rather then every vert in the face.
* rename bmesh_radial_find_first_facevert --> bmesh_radial_find_first_faceloop
* rename bmesh_radial_find_next_facevert --> bmesh_radial_find_next_faceloop
* rename BM_vert_collapse_edges --> BM_vert_collapse_edge (only collapses one)

8 years ago* Fixed some typos in the code, patch [#30247] by Vladimir Rutsky (rutsky). Thanks!
Thomas Dinges [Thu, 23 Feb 2012 09:23:29 +0000 (09:23 +0000)]
* Fixed some typos in the code, patch [#30247] by Vladimir Rutsky (rutsky). Thanks!

8 years agoCycles:
Thomas Dinges [Thu, 23 Feb 2012 09:11:17 +0000 (09:11 +0000)]
* Remove obsolete comments in the Oren Nayar code.

8 years agoRefresh all cached ibmufs used by sequencer after all proxies are built.
Sergey Sharybin [Thu, 23 Feb 2012 08:41:13 +0000 (08:41 +0000)]
Refresh all cached ibmufs used by sequencer after all proxies are built.

Hopefully this will fix #30196: Proxies Not Visible in VSE Preview Window until Blender Reboot

8 years agoCode cleanup: replace some common CCG operations with functions.
Nicholas Bishop [Thu, 23 Feb 2012 07:21:33 +0000 (07:21 +0000)]
Code cleanup: replace some common CCG operations with functions.

The new functions are ccg_gridsize, ccg_edgesize, ccg_spacing, and
ccg_edgebase. These target most of the left-shift operations in the

8 years agobmesh py api, new submodules
Campbell Barton [Thu, 23 Feb 2012 05:20:09 +0000 (05:20 +0000)]
bmesh py api, new submodules
* bmesh.types, just allows access to BMVert, BMEdge etc.
* bmesh.utils, so far only added edge_split() function, this module will give access to mesh editing functions.

8 years agoswap arg order for BM_edge_split(), makes sense to have edge as first
Campbell Barton [Thu, 23 Feb 2012 05:17:07 +0000 (05:17 +0000)]
swap arg order for BM_edge_split(), makes sense to have edge as first

8 years ago- swap arg order for BM_face_copy() boolean options.
Campbell Barton [Thu, 23 Feb 2012 04:26:24 +0000 (04:26 +0000)]
- swap arg order for BM_face_copy() boolean options.
- use edge example for BM_face_split().

8 years agobmesh py api, more wrapped funcs:
Campbell Barton [Thu, 23 Feb 2012 04:19:25 +0000 (04:19 +0000)]
bmesh py api, more wrapped funcs:
* BMFace.copy(verts=True, faces=Trur)
* BMEdge.other_vert(vert)

8 years agobmesh py api: functions for getting the area/angle/center of BMesh elements.
Campbell Barton [Thu, 23 Feb 2012 03:39:39 +0000 (03:39 +0000)]
bmesh py api: functions for getting the area/angle/center of BMesh elements.

8 years agocode cleanup: dont set the namespace in STR_String.h - 'using namespace std', since...
Campbell Barton [Thu, 23 Feb 2012 02:36:30 +0000 (02:36 +0000)]
code cleanup: dont set the namespace in STR_String.h - 'using namespace std', since this is included in many places.

8 years agocode style cleanup, no functional changes.
Campbell Barton [Thu, 23 Feb 2012 02:23:42 +0000 (02:23 +0000)]
code style cleanup, no functional changes.

8 years agostyle cleanup for blenkernel, no functional changes.
Campbell Barton [Thu, 23 Feb 2012 02:17:50 +0000 (02:17 +0000)]
style cleanup for blenkernel, no functional changes.

8 years agoMove PBVH bitmap to separate header in blenlib.
Nicholas Bishop [Wed, 22 Feb 2012 23:57:31 +0000 (23:57 +0000)]
Move PBVH bitmap to separate header in blenlib.

The implementation was also changed in a couple ways: use unsigned
integers as its base type rather than unsigned chars, and uses macros
rather than functions. (These could be changed to inline functions.)

Currently it is still only used during PBVH building, but now it's
accessible elsewhere.

8 years agoCode cleanup: de-duplicate code in GPU_build_grid_buffers() with a macro.
Nicholas Bishop [Wed, 22 Feb 2012 23:30:56 +0000 (23:30 +0000)]
Code cleanup: de-duplicate code in GPU_build_grid_buffers() with a macro.

8 years agoCode cleanup: split up some long functions in sculpt_undo.c.
Nicholas Bishop [Wed, 22 Feb 2012 23:13:05 +0000 (23:13 +0000)]
Code cleanup: split up some long functions in sculpt_undo.c.

Should be no functional changes.

8 years agoCode cleanup: don't use GHash for GPU_build_mesh_buffers().
Nicholas Bishop [Wed, 22 Feb 2012 22:48:34 +0000 (22:48 +0000)]
Code cleanup: don't use GHash for GPU_build_mesh_buffers().

At the point where GPU_build_mesh_buffers is called, the
face_vert_indices map has already been built; it contains the same
data in an easier-to-access format.

8 years agoCode cleanup: remove unused 'skip' field from PBVH iterator.
Nicholas Bishop [Wed, 22 Feb 2012 22:41:08 +0000 (22:41 +0000)]
Code cleanup: remove unused 'skip' field from PBVH iterator.

8 years agoCode cleanup: move the PBVH iterator's initialization into a function.
Nicholas Bishop [Wed, 22 Feb 2012 22:37:01 +0000 (22:37 +0000)]
Code cleanup: move the PBVH iterator's initialization into a function.

Should be no functional changes, just shortens the amount of code
living in the macro.

8 years agofix scons compilation, hopefully for all platforms that have a problem.
Antony Riakiotakis [Wed, 22 Feb 2012 20:31:19 +0000 (20:31 +0000)]
fix scons compilation, hopefully for all platforms that have a problem.

8 years agoArmature pose evaluation: more factorization of code.
Bastien Montagne [Wed, 22 Feb 2012 20:06:33 +0000 (20:06 +0000)]
Armature pose evaluation: more factorization of code.

Now constraints' space conversion code also uses generic armature_mat_(pose_to_bone/bone_to_pose). Previous own function (constraint_pchan_diff_mat) was somewhat inconsistent too with Hinge/NoScale/LocalLocation options...
As with previous similar changes, this might break some old rigs, in very specific cases (when constraint-evaluating an hinge/noscale/local_location bone in local space).

In the same part of code, removed unnecessary matrices copying, mult_m4_m4m4 can take the same matrix as input and output, nowadays...

Also found a bug-generator weakness in those armature_mat_ functions (if both input and output mat where the same, result was wrong, now systematically copying input mat, as done in LIB's matrix funcs).

Finally, factorized offset bone matrix generation into its own small function too, as it is used in two different places in armature.c (pchan_to_pose_mat itself, and restpose's where_is_armature_bone).

Note: I think all parts of blender's code related to that topic have now been tackled, but yet have to check BGE, it’s probably using that stuff too, one way or the other...

8 years agoFix blenderplayer linking with recent additions to bmesh python. We should really...
Antony Riakiotakis [Wed, 22 Feb 2012 18:57:17 +0000 (18:57 +0000)]
Fix blenderplayer linking with recent additions to bmesh python. We should really start building with player on so that mistakes like this can be detected early.

8 years agocode cleanyp - no functional changes.
Campbell Barton [Wed, 22 Feb 2012 16:52:06 +0000 (16:52 +0000)]
code cleanyp - no functional changes.

8 years agoMore style edits (adding a space between statements and parenthesis, if (foo) blah...
Bastien Montagne [Wed, 22 Feb 2012 16:21:17 +0000 (16:21 +0000)]
More style edits (adding a space between statements and parenthesis, if (foo) blah;), to follow proposition.

8 years agobmesh python api change in internal behavior.
Campbell Barton [Wed, 22 Feb 2012 16:08:30 +0000 (16:08 +0000)]
bmesh python api change in internal behavior.

* Only have 1 python object per bmesh, vertex, edge, loop, face.
* Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running).
* Currently this data is created and freed along with the BMesh PyObject.
* Incidentally - this fixes comparisons for bmesh elements which wasnt working before.

8 years agoStyle code cleanup and consistancy (mainly spaces around assignements, C++ comments...
Bastien Montagne [Wed, 22 Feb 2012 15:35:42 +0000 (15:35 +0000)]
Style code cleanup and consistancy (mainly spaces around assignements, C++ comments to C, and misc spaces/tabs cleanup). No functional change.

8 years agoCycles: improve the Oren-Nayar BSDF (roughness value for Diffuse), to avoid
Brecht Van Lommel [Wed, 22 Feb 2012 15:04:22 +0000 (15:04 +0000)]
Cycles: improve the Oren-Nayar BSDF (roughness value for Diffuse), to avoid
undesired dark rings, and give more accurate lighting when the light is
behind the object. As a bonus, the code is simpler & faster.

Patch by Yasuhiro Fujii, detailed explanation here:

8 years agofix 2 small bugs
Campbell Barton [Wed, 22 Feb 2012 14:55:12 +0000 (14:55 +0000)]
fix 2 small bugs
* Ctrl+Click extrude wasnt normalizing the quaternion (was printing warnings)
* bmesh bevel was supposed to add a float layer and remove, but removing passed the mask define of the customdata layer.

8 years agoMulti File Output Node:
Thomas Dinges [Wed, 22 Feb 2012 14:19:39 +0000 (14:19 +0000)]
Multi File Output Node:
* Some small UI tweaks, grey out image settings rather than hide and made it a bit more compact.

8 years agoFix freeing of NULL pointer in array modifier.
Sergey Sharybin [Wed, 22 Feb 2012 13:15:29 +0000 (13:15 +0000)]
Fix freeing of NULL pointer in array modifier.

8 years agoFixed compilation error after recent node commit.
Sergey Sharybin [Wed, 22 Feb 2012 12:59:43 +0000 (12:59 +0000)]
Fixed compilation error after recent node commit.

8 years agoadd slice access to bmesh sequences.
Campbell Barton [Wed, 22 Feb 2012 12:54:53 +0000 (12:54 +0000)]
add slice access to bmesh sequences.
 verts = bm.verts[1:-7]

8 years agoBMesh-py attributes (readonly):
Campbell Barton [Wed, 22 Feb 2012 12:28:32 +0000 (12:28 +0000)]
BMesh-py attributes (readonly):
* is_valid (all types)
* is_wire (verts/edges)
* is_boundry (edge only)
* is_manifold (verts/edges)

also corrected own error, missed updating BMesh operator formatting char (broke erase only-faces)

8 years agoAdds a new node type for saving multiple image files from a single node.
Lukas Toenne [Wed, 22 Feb 2012 12:24:04 +0000 (12:24 +0000)]
Adds a new node type for saving multiple image files from a single node.

Unlike the existing file output node this node has an arbitrary number of
possible input slots. It has a base path string that can be set to a general
base folder. Every input socket then uses its name as an extension of the base
path for file organization. This can include further subfolders on top of the
base path. Example:

Base path: '/home/user/myproject'
Input 1: 'Compo'
Input 2: 'Diffuse/'
Input 3: 'details/Normals'

would create output files
in /home/user/myproject: Compo0001.png, Compo0002.png, ...
in /home/user/myproject/Diffuse: 0001.png, 0002.png, ... (no filename base
in /home/user/myproject/details: Normals0001.png, Normals0002.png, ...

Most settings for the node can be found in the sidebar (NKEY). New input sockets
can be added with the "Add Input" button. There is a list of input sockets and
below that the details for each socket can be changed, including the sub-path
and filename. Sockets can be removed here as well. By default each socket uses
the render settings file output format, but each can use its own format if

To my knowledge this is the first node making use of such dynamic sockets in
trunk. So this is also a design test, other nodes might use this in the future.

Adding operator buttons on top of a node is a bit unwieldy atm, because all node
operators generally work on selected and/or active node(s). The operator button
would therefore either have to make sure the node is  activated before the
operator is called (block callback maybe?) OR it has to store the node name
(risky, weak reference). For now it is only used in the sidebar, where only the
active node's buttons are displayed.

Also adds a new struct_type value to bNodeSocket, in order to distinguish
different socket types with the same data type (file inputs are SOCK_RGBA color
sockets). Would be nicer to use data type only for actual data evaluation, but
used in too many places, this works ok for now.

8 years agoFix #30290: Shape Keys not working as expected
Sergey Sharybin [Wed, 22 Feb 2012 12:11:56 +0000 (12:11 +0000)]
Fix #30290: Shape Keys not working as expected

New method of vertex shapekey propagation didn't restored coordinates in
me->mvert array which lead to unwanted deformation of basis mesh and
lead to issues like described in the report.

8 years agobmesh py api add connectivity attributes - to access adjacent data.
Campbell Barton [Wed, 22 Feb 2012 12:04:44 +0000 (12:04 +0000)]
bmesh py api add connectivity attributes - to access adjacent data.

8 years agobmesh py api - function to remove vert/edge/faces
Campbell Barton [Wed, 22 Feb 2012 11:52:56 +0000 (11:52 +0000)]
bmesh py api - function to remove vert/edge/faces

8 years agobmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh...
Campbell Barton [Wed, 22 Feb 2012 11:31:07 +0000 (11:31 +0000)]
bmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh's api.

8 years agobmesh py api - generalize bmesg sequences to use the iterator type and optionally...
Campbell Barton [Wed, 22 Feb 2012 10:41:07 +0000 (10:41 +0000)]
bmesh py api - generalize bmesg sequences to use the iterator type and optionally another bmesh element.

This allows BMFace.verts to be added without defining a new sequence type.

8 years agoinitial bmesh python api.
Campbell Barton [Wed, 22 Feb 2012 09:19:53 +0000 (09:19 +0000)]
initial bmesh python api.

corrently allows to create and loop over verts/edges/faces, access selection and selection modes.

this is still WIP, access to face, edge verts is still missing, no access to UV's, no access to editing operations yet.

When the api is ready it will be documented by sphinx like mathutils, blf, aud.

8 years agoutility functions to convert between flags / sets, without depending on RNA API.
Campbell Barton [Wed, 22 Feb 2012 09:15:46 +0000 (09:15 +0000)]
utility functions to convert between flags / sets, without depending on RNA API.

8 years agocorrect exception - was using a TypeError when should be a ValueError.
Campbell Barton [Wed, 22 Feb 2012 09:13:29 +0000 (09:13 +0000)]
correct exception - was using a TypeError when should be a ValueError.

8 years agoFix #30276: mesh subdivision shorcut with maya preset
Sergey Sharybin [Wed, 22 Feb 2012 08:25:14 +0000 (08:25 +0000)]
Fix #30276: mesh subdivision shorcut with maya preset

Added subdivisions shortcut for mesh editing mode to maya preset.
Not actually sure such shortcut present in Maya, but seems to be logical
to have it both object and edit modes.

8 years agoMade Maya keymap working again.
Sergey Sharybin [Wed, 22 Feb 2012 08:16:12 +0000 (08:16 +0000)]
Made Maya keymap working again.
Keypam for midpoint knife cutting was disabled for a while due to
midpoint toggle was moved to a model keymap and i'm not sure how to
start operator with midpoint enabled by default.

8 years agoFix #30231: Drag and Droping Parenting from Outliner giving unnecessary Loop Error
Sergey Sharybin [Wed, 22 Feb 2012 07:56:15 +0000 (07:56 +0000)]
Fix #30231: Drag and Droping Parenting from Outliner giving unnecessary Loop Error

In fact, error was much deeper and DND parenting in outliner used to parent all selected
objects to drop target, not just currently dragging object.

This was caused by code sharing between Parent Set operator and this DND operator which
was iterating all selected objects in scene and was setting parent to it.

Solved issue by separating actual parenting code which makes specified object be parented
to specified parent and moved iterating to Parent Set exec callback.

Now both of discovered issues (unneeded loop error and parenting all selected objects)
are solved, but more extensive testing of this changes are welcome.

8 years agoAttempt to fix scons compilation of blenderplayer.
Antony Riakiotakis [Wed, 22 Feb 2012 03:16:34 +0000 (03:16 +0000)]
Attempt to fix scons compilation of blenderplayer.
Added bmesh to player libraries and changed the priority of blenlib so as to avoid duplicate definitions (looks like there are actually functions defined twice that cause conflicts if one changes the order of linking...figures).

Only tested this on mingw-windows, I hope it works elsewhere too.

8 years agoStitch tool fully functional again. Many thanks to Howard Trickey for proposing the...
Antony Riakiotakis [Wed, 22 Feb 2012 00:06:15 +0000 (00:06 +0000)]
Stitch tool fully functional again. Many thanks to Howard Trickey for proposing the loop winding criterion for normal disambiguation of edges. Unfortunately some extra memory has to be allocated for this to work correctly. If the tool had been initially written for bmesh I would have used the already present adjacency information to make it work, avoiding some extra allocations. Maybe a project for another day though, when I am more proficient with bmesh internals.

8 years agochange UvElement to directly use BMLoop * instead of tfindex. This saves quite some...
Antony Riakiotakis [Tue, 21 Feb 2012 19:41:38 +0000 (19:41 +0000)]
change UvElement to directly use BMLoop * instead of tfindex. This saves quite some lookups on uv sculpting and stitching. Based on BMESH todo by Campbell, thanks for the idea!

8 years agouv stitch static island highlight ported to bmesh system.
Antony Riakiotakis [Tue, 21 Feb 2012 18:20:47 +0000 (18:20 +0000)]
uv stitch static island highlight ported to bmesh system.

Unfortunately since we are missing a way to tesselate uvs, the result will look good only on concave faces since we are essentially using a triangle fan to draw. When a tesselation of uv polygons is possible the tool should also change to use that instead. This will also influence the preview drawing code, coming next.

8 years agoText fix:
Ton Roosendaal [Tue, 21 Feb 2012 18:15:28 +0000 (18:15 +0000)]
Text fix:
Added #blender to list of recommended irc channels.

8 years agoRemove debug print code.
Sergey Sharybin [Tue, 21 Feb 2012 17:27:33 +0000 (17:27 +0000)]
Remove debug print code.
It was harmless because it ifdef-ed, but it's likelly not needed anymore.

8 years agoRemove unused code left from old multires interpolation stuff
Sergey Sharybin [Tue, 21 Feb 2012 17:24:21 +0000 (17:24 +0000)]
Remove unused code left from old multires interpolation stuff

- Removed validate() callback for MDisps layer. It wouldn't actually work
  correct from CustomData layer and all needed data might be validated from
  BMesh interpolation level. Also this callback was never actually used in
  BMesh, so can't see why we'll want to have it in structures.
- Removed layrInterp_mdisps callback. Interpolation now happens from
  another level (bmesh_interp) and this callback isn't needed anymore.
- Removed all function from multires.c which were used by old interpolation
  stuff and seems to be useless for other usages.
- multires_topology_changed is still marked as a TODO, Probably it's not
  needed anymore, buy better to keep for now until it'll be 100% clear this
  function isn't needed and all needed re-allocations happens in bmesh_interp.
  Otherwise, it'll be needed to be ported to new system.

8 years ago- Remove unused code in bmesh interpolation module and switch it to using mathutils
Sergey Sharybin [Tue, 21 Feb 2012 17:24:05 +0000 (17:24 +0000)]
- Remove unused code in bmesh interpolation module and switch it to using mathutils
  functions instead of own macros for vectors.
- Double precision isn't needed here at all. It only makes it impossible to use
  mathutils, adds extra float<->double conversions without any benefits.
  (current multires interpolation is already an approximate method and it can't
  be improved using double precision)

8 years agoImproved displacement flipping algorithm to work properly in cases when target grid...
Sergey Sharybin [Tue, 21 Feb 2012 17:23:32 +0000 (17:23 +0000)]
Improved displacement flipping algorithm to work properly in cases when target grid isn't orthogonal.

Subdivision of face now works pretty smooth, only producing minor unwanted displacement on the along edges.

8 years agoFlip displacement direction after interpolation in bmesh_loop_interp_mdisps
Sergey Sharybin [Tue, 21 Feb 2012 17:23:03 +0000 (17:23 +0000)]
Flip displacement direction after interpolation in bmesh_loop_interp_mdisps

This is needed because displacement might been interpolated from a grid
with different orientation and in this case X and Y components of displacement
are need to be flipped in needed order.

Order of flipping is determining by projecting source grids axis orientation
on target grid axis. This probably will give some unwanted artifacts when
interpolating non-planar face but currently can't think about better way
to determine how to flip displacement.

This commit makes operators like Subdivide works much more unpredictable
for sculpting data, but this stuff should be rethinked much more global
because current approach is not acceptable.

8 years agoFix part of #30272: cycles preview render not updating when changing particle
Brecht Van Lommel [Tue, 21 Feb 2012 16:34:00 +0000 (16:34 +0000)]
Fix part of #30272: cycles preview render not updating when changing particle
emission from with instanced objects.

8 years agoFix [#30281] Left/Right vertex weights flipped.
Bastien Montagne [Tue, 21 Feb 2012 14:45:18 +0000 (14:45 +0000)]
Fix [#30281] Left/Right vertex weights flipped.

Mirror modifier was flipping vgroups on org vertices, not mirrored ones!

8 years agoFix #30270, #30265: cycles not displaying textured objects, and not rendering
Brecht Van Lommel [Tue, 21 Feb 2012 14:39:59 +0000 (14:39 +0000)]
Fix #30270, #30265: cycles not displaying textured objects, and not rendering
text/curve objects after the bmesh merge. Also removed a debug print.

8 years agoSomehow typo was made just before commit in previous patch.
Sergey Sharybin [Tue, 21 Feb 2012 13:00:58 +0000 (13:00 +0000)]
Somehow typo was made just before commit in previous patch.

8 years agoCamera tracing: search area was always centered to marker's position when tracking
Sergey Sharybin [Tue, 21 Feb 2012 12:59:52 +0000 (12:59 +0000)]
Camera tracing: search area was always centered to marker's position when tracking

8 years agoAnother fix for non-VBO flat-shading in sculpt mode, this time for non-multires meshes.
Nicholas Bishop [Tue, 21 Feb 2012 04:24:30 +0000 (04:24 +0000)]
Another fix for non-VBO flat-shading in sculpt mode, this time for non-multires meshes.

As with multires, this change calculates face normals rather than
using vertex normals when the node is flat-shaded.

Flat-shading with VBO on non-multires meshes is still wrong, but
fixing that would require larger changes to our vertex buffers.

8 years agoRemove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.
Nicholas Bishop [Tue, 21 Feb 2012 04:16:27 +0000 (04:16 +0000)]
Remove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.

Building the mesh buffers already gets the PBVH_UpdateDrawBuffers flag
set, so this was double-updating the vertex buffer.

8 years agofix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project
Campbell Barton [Tue, 21 Feb 2012 03:43:57 +0000 (03:43 +0000)]
fix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project

8 years agoremove NGon Interp modifier (which was merged as apart of BMesh),
Campbell Barton [Mon, 20 Feb 2012 23:24:57 +0000 (23:24 +0000)]
remove NGon Interp modifier (which was merged as apart of BMesh),
this didnt really give any advantage over subsurf's Simple-Subdiv mode.

8 years agocopy over a change from bmesh branch that was needed for lightmap unpack to work...
Campbell Barton [Mon, 20 Feb 2012 22:58:00 +0000 (22:58 +0000)]
copy over a change from bmesh branch that was needed for lightmap unpack to work, also tag some rna vars as unused.

8 years agoDone BMESH_TODO in object/object_vgroup.c (make getSurroundingVerts() use polys/loops...
Bastien Montagne [Mon, 20 Feb 2012 22:16:20 +0000 (22:16 +0000)]
Done BMESH_TODO in object/object_vgroup.c (make getSurroundingVerts() use polys/loops instead of tessfaces).

Also done a few optimizations of related code (OBJECT_OT_vertex_group_fix operator).

8 years agofix for leak in gpu.export_shader(), wasnt freeing the function.
Campbell Barton [Mon, 20 Feb 2012 22:04:29 +0000 (22:04 +0000)]
fix for leak in gpu.export_shader(), wasnt freeing the function.

also change the bmesh iterator so its possible to initialize without stepping.

8 years agoFix normals for flat-shaded non-VBO sculpt drawing.
Nicholas Bishop [Mon, 20 Feb 2012 21:25:24 +0000 (21:25 +0000)]
Fix normals for flat-shaded non-VBO sculpt drawing.

Example here, original on left, fixed normals on right: