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

* 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:


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

* 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

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 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:

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

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

8 years agoFix #30405: combine HSVA node not working correct with fixed color instead
Brecht Van Lommel [Thu, 1 Mar 2012 20:05:14 +0000 (20:05 +0000)]
Fix #30405: combine HSVA node not working correct with fixed color instead
of socket connected as input, patch by Denis Declara.

8 years agoFix related to #30416: python render_stats handler now also gets called when the
Brecht Van Lommel [Thu, 1 Mar 2012 19:19:10 +0000 (19:19 +0000)]
Fix related to #30416: python render_stats handler now also gets called when the
saved file message is printed.

8 years agoFix #30415: motion blur option still had an effect on external engines / cycles,
Brecht Van Lommel [Thu, 1 Mar 2012 19:19:04 +0000 (19:19 +0000)]
Fix #30415: motion blur option still had an effect on external engines / cycles,
should not be used then.

8 years agofix [#30280] bmesh: Dissolve with error message kills Crease
Campbell Barton [Thu, 1 Mar 2012 19:05:14 +0000 (19:05 +0000)]
fix [#30280] bmesh: Dissolve with error message kills Crease

CD_MASK_BMESH was didnt include crease of bevel weight - so copying the bmesh would skip these.

8 years agobmesh api:
Campbell Barton [Thu, 1 Mar 2012 17:38:04 +0000 (17:38 +0000)]
bmesh api:
* name bmesh operator func's BMO_slot_buffer_* rather then BMO_slot_* since it wasnt obvious some only dealt with buffer, some both.
* more typechecks and asserts of BMO_ functions (I lost some time calling a map with a buffer function that failed silently).
* small speedup for extrude check - test if the edge is wire _before_ doign a hash lookup.

8 years agoCode Cleanup: remove bmesh_radial_loop_next() function,
Campbell Barton [Thu, 1 Mar 2012 17:13:02 +0000 (17:13 +0000)]
Code Cleanup: remove bmesh_radial_loop_next() function,
just access l->radial_next

8 years agoSame fix for file output node as Brecht did in r44580, EXR compression is defined...
Lukas Toenne [Thu, 1 Mar 2012 17:02:05 +0000 (17:02 +0000)]
Same fix for file output node as Brecht did in r44580, EXR compression is defined in exr_codec instead compression.

8 years agofast-path for BM_edge_is_manifold, BM_edge_is_boundary functions.
Campbell Barton [Thu, 1 Mar 2012 16:56:42 +0000 (16:56 +0000)]
fast-path for BM_edge_is_manifold, BM_edge_is_boundary functions.

8 years agoFix related to #30384: multilayer exr files not saving compressed correctly.
Brecht Van Lommel [Thu, 1 Mar 2012 16:41:51 +0000 (16:41 +0000)]
Fix related to #30384: multilayer exr files not saving compressed correctly.

8 years agofix [#30399] bmesh: Extrusions adjacent to mirror plane leave stray edges.
Campbell Barton [Thu, 1 Mar 2012 16:27:44 +0000 (16:27 +0000)]
fix [#30399] bmesh: Extrusions adjacent to mirror plane leave stray edges.

thanks to Antony Riakiotakis for finding the cause.

8 years agobmesh regression with extrude.
Campbell Barton [Thu, 1 Mar 2012 16:12:11 +0000 (16:12 +0000)]
bmesh regression with extrude.

Extruding an edge where both verts were clipped would not create a face for this edge.

This is ok when a connected face is also extruded but not when the edge is selected on its own.

8 years agostyle cleanup
Campbell Barton [Thu, 1 Mar 2012 16:04:37 +0000 (16:04 +0000)]
style cleanup
* add extra argument to BMO_slot_map_to_flag() to filter by vert/edge/face
* made BMO_slot_map_* / BMO_slot_buffer_* functions stricter with type checking.

8 years agostyle cleanup: bmesh - have continue on new line, also avoid unneeded loop in bmo_ext...
Campbell Barton [Thu, 1 Mar 2012 13:13:08 +0000 (13:13 +0000)]
style cleanup: bmesh - have continue on new line, also avoid unneeded loop in bmo_extrude_face_region_exec() in some cases.

8 years agoSpelling Cleanup
Campbell Barton [Thu, 1 Mar 2012 12:20:18 +0000 (12:20 +0000)]
Spelling Cleanup

8 years agoCall the node freestorage callback _before_ actually freeing sockets, since this...
Lukas Toenne [Thu, 1 Mar 2012 12:07:59 +0000 (12:07 +0000)]
Call the node freestorage callback _before_ actually freeing sockets, since this is also responsible for freeing possible socket storage data.

8 years agoWhen adding a file output socket make it active, for convenience. Also move back...
Lukas Toenne [Thu, 1 Mar 2012 11:41:15 +0000 (11:41 +0000)]
When adding a file output socket make it active, for convenience. Also move back one index when deleting the last.

8 years agoFix for Multilayer EXR API. This was using implementation stubs directly in the heade...
Lukas Toenne [Thu, 1 Mar 2012 11:19:41 +0000 (11:19 +0000)]
Fix for Multilayer EXR API. This was using implementation stubs directly in the header file, causing problems with scons in particular.

8 years agoFix for wrong channel number in ImBuf when file node output format is something other...
Lukas Toenne [Thu, 1 Mar 2012 08:47:32 +0000 (08:47 +0000)]
Fix for wrong channel number in ImBuf when file node output format is something other than RGBA. This doesn't get set in the init function, has to be done manually (i guess?).

8 years ago* Removed DNA_DEPRECATED tag from old NodeImageFile struct typedef, it doesn't work...
Lukas Toenne [Thu, 1 Mar 2012 08:17:16 +0000 (08:17 +0000)]
* Removed DNA_DEPRECATED tag from old NodeImageFile struct typedef, it doesn't work that way (duh)

* Moved format field and added (deprecated) sfra and efra ints to ensure some forward compatibility of file output node. Earlier blender versions will simple interpret the struct as NodeFileImage, so by matching the first fields the numbers can stay somewhat valid.