Commit Graph

41776 Commits

Author SHA1 Message Date
Nicholas Bishop
0c0fa7dde6 Improve flat-shaded VBO drawing for sculpt meshes
Separate vertex copies are now made for flat-shading, such that the
normal is correctly flat-shaded. The element index buffer is not
created in this case.
2012-10-06 16:52:52 +00:00
Nicholas Bishop
1df170bb96 Code cleanups for PBVH GPU buffers
* De-duplicate GPU code to check if VBO should be used.

* Add a flag to indicate if the buffer should be drawn smooth or not,
  rather than checking each time the node is drawn.
2012-10-06 16:42:11 +00:00
Lukas Toenne
78978dcd80 Fix for a case of 'static initialization fiasco' with OSL closure variables. The parameter lists are using OIIO::TypeDesc static standards, which are also static variables. With static OSL libraries these are not initialized when the closure parameter lists are initialized, so OSL rejects the closure types.
Putting static initialization into functions works just as well, but ensures the OIIO::TypeDesc access is delayed until initialization is complete.
2012-10-06 16:28:02 +00:00
Lukas Toenne
2ecb4781a7 Fix for incomplete loading of liboslexec static library. This is needed in order to provide the osl_allocate_closure_component function for LLVM. 2012-10-06 14:35:48 +00:00
Campbell Barton
1e2f475512 added simple checker for array sizes, uses clang to parse C/C++,
Warns if an array is passed to a function where the array is declared larger, eg float[2] argument is passed function defined as float[3], (or a greater size).

Existing free static checkers dont do this from what I can tell.
2012-10-06 12:36:21 +00:00
Campbell Barton
4cc29110aa fix writing past array bounds in imagewraposa().
also correct array sizes in othere areas.
2012-10-06 12:04:09 +00:00
Campbell Barton
b6a803fb36 fix reading past array bounds for nearest_uv_between() and draw_tracking_tracks(). 2012-10-06 12:00:54 +00:00
Brecht Van Lommel
098d611c7b Fix for UV texture coordinate problem in cycles, after recent fix. 2012-10-06 11:52:54 +00:00
Lukas Toenne
a2d8cf333f Better support for LLVM linking, needed for static OSL library.
This adds cmake code for LLVM on linux and updates the cmake code used for OSX.
LLVM is linked like other external libraries now, by using the setup_liblinks and setup_libdirs macros instead of the PLATFORM_LINKFLAGS variable.
The use of llvm-config for getting a list of libraries can also be simplified quite a bit.

Caching the LLVM_DIRECTORY and LLVM_VERSION strings could be nicer though.
2012-10-06 11:00:45 +00:00
Sergey Sharybin
c001bd81a7 Color Management: fixed loading configuration from non-ascii paths
Used the same hack as BLI gzip is using -- calculate short path and
send it to OCIO library.
2012-10-06 07:03:03 +00:00
Joshua Leung
950ac47250 Bugfix [#32789] (Minor) Different types used between func declaration and
definition (EDBM_selectmode_convert())

Cheers to Sebastian Nell (codemanx) for catching this.
2012-10-06 03:56:09 +00:00
Campbell Barton
b26ccf0aff toggle cut through in the knife tool now refreshes (before you had to wave the mouse about to see the result).
also remove print from last commit.
2012-10-06 03:34:52 +00:00
Campbell Barton
6a164c7f72 fix [#32779] Bmesh module: assigning to bm.select_mode crashes Blender if bmesh is empty
was missing set typecheck
2012-10-06 03:33:11 +00:00
Campbell Barton
c4472bbab6 add mball_foreachScreenElem() and use for lasso & circle selection, also utility metaball functions to (de)select all. 2012-10-06 03:02:14 +00:00
Campbell Barton
f84f2c7033 add circle select for metaballs 2012-10-06 01:30:49 +00:00
Campbell Barton
39a96e9e3f disable padding warning for DNA, gave problems with struct bounds padding which DNA ignores.
tag operator callbacks as needing their return values used. These are not directly called in many places so the inconvenience is minimal.
2012-10-06 00:42:30 +00:00
Dan Eicher
ba47095627 Grease Pencil notifier/listener cleanup
As suggested by Campbell on the IRC gave grease pencil its own notifier type (NC_GPENCIL) and made the makesrna notifier functions actually update properly.

Also got the #ifdef'd GreasePencil.layers.[new/remove] functions working.
2012-10-05 19:51:11 +00:00
Campbell Barton
db5682ac8c use pose_foreachScreenBone for pose lasso and circle select 2012-10-05 17:51:44 +00:00
Brecht Van Lommel
e23b202693 Fix part of cycles/osl light pass rendering, transmission still not correct. 2012-10-05 17:17:19 +00:00
Campbell Barton
292e8e7e00 add armature_foreachScreenBone(), use for lasso and circle select.
also add boundbox checking for lasso select.
2012-10-05 17:07:02 +00:00
Campbell Barton
657fc4f474 code cleanup: de-duplicate enum. 2012-10-05 15:48:39 +00:00
Campbell Barton
db70bfc206 code cleanup: use functions to initialize selection user data structs, use radius-squared for circle select comparisons.
edge_fully_inside_rect() & edge_inside_rect() args were shorts when all callers were passing ints.
2012-10-05 15:44:11 +00:00
Joshua Leung
d3cdaca648 Code cleanup
* Added/fixed some comments
* Swapped order that invoke/exec calls are defined in the operator definitions
to reflect flow better
2012-10-05 14:56:04 +00:00
Brecht Van Lommel
b67d75fad2 Fix generated texture coordinate issue after "from dupli" option was added. 2012-10-05 14:54:32 +00:00
Joshua Leung
b2a5f28421 Follow Path Constraint - "Animate Path" Operator
Added a convenience operator to the Follow Path constraint which adds a F-Curve
for the path (or the operator's "fixed position" value if no path is assigned),
with options for setting the start frame and length of motion. This makes it
easier for common users to just set up a quick follow-path animation where the
camera (e.g. flying around a set over certain number of frames).

A key advantage of this is that it takes care of the underlying math required
for setting up the generator curve accordingly (I've got some plans for making
this a bit friendlier to use later). Now, animating the paths is a one-click
operation, with the start and length properties able to be controlled using the
operator properties.
2012-10-05 14:51:35 +00:00
Joshua Leung
b7bb1ef9b9 Whitespace edits 2012-10-05 14:05:49 +00:00
Joshua Leung
5baa587a12 Warning indicators for animators when Auto Keying is enabled during transform
Recently on the bf-funboard list, there have been some requests for clearer
indications for animators that autokeying has been enabled when transforming so
that corrective action can be taken sooner if this wasn't expected. This is
especially important in distributed+collaborative environments where multiple
artists may work on a single shot file: someone working on a shot from
another animator may not be aware that autokeying was enabled, thus accidentally
setting a whole bunch of extra keyframes.

In this current incarnation, we display using red (not hardcoded, but using an
existing theme color) a solid 1px border around the 3D view while transforming
with autokeying enabled. In addition to the border, a blinking indicator (record
icon + "Auto Keying On" text) appear in the top right corner, as inspired by the
traditional recording indicator icons on camcorders.
2012-10-05 13:22:09 +00:00
Brecht Van Lommel
72da7722dd Fix #32770: iTaSC IK solver not working correct with bones that have stretch with
have all rotation axes disabled.
2012-10-05 13:11:16 +00:00
Joshua Leung
7e0d1cf652 Typo fix: Tooltip for "Offset Factor" for FollowPath constraint referred to
"bone" instead of "curve"
2012-10-05 13:06:36 +00:00
Bastien Montagne
00ce0c9aae Clean up in "add object" code:
* Get rid of ED_object_add_generic_invoke() and all invoke callbacks using it, it was doing nothing exec() callbacks would not do. In fact, its only action (setting part of common add ops properties, like loc, layers, etc.) was needed too by direct exec call, so it was done twice in case of using invoke()!
* Replace custom invoke code for metaballs by WM_menu_invoke helper (as already used by lamps).
* Add a new OBJECT_OT_empty_add op, to allow direct addition of empties of a given drawtype.
* And some general code cleanup (like trailing spaces, empty lines, ...).

Did quite a bunch of tests/verifications, but obviously could not tackle all possible scenarios... Anyway, if any, bugs should arize quite quickly (but I don’t expect any! :p ).
2012-10-05 12:59:09 +00:00
Brecht Van Lommel
eb46c080a2 Fix #32734: Object.to_mesh() gave wrong user count for curves/surface/text objects. 2012-10-05 12:18:09 +00:00
Brecht Van Lommel
cd19fd6c28 Fix related to #32734: crash saving blend file from render_pre callback. Not
sure I want to recommend anyone doing this, but the fix is simple.
2012-10-05 12:18:07 +00:00
Brecht Van Lommel
456a20ea07 Fix #32735: GLSL shadows not working together with X-ray drawing. 2012-10-05 12:18:04 +00:00
Campbell Barton
d5157a2259 more improvements to logic for selection/projection: replace ED_view3d_project_short_global() with ED_view3d_project_int_object() in some places. 2012-10-05 10:28:36 +00:00
Sergey Sharybin
4c3620c69d Fixed compilation error on widows
Was caused by mixing up own C-API typedefs with OCIO's
2012-10-05 10:05:26 +00:00
Sergey Sharybin
862decfc82 Booleans: epsilon for planar checks seems a bit too small for single precision math
This could solve issue #32748: Boolean Modifiers Making unneeded edges?
2012-10-05 07:31:30 +00:00
Sergey Sharybin
cc26da4421 Fix #32707: texture preview not loaded 2012-10-05 07:17:45 +00:00
Bastien Montagne
a320773b88 Some effect-less code cleanup... 2012-10-05 07:05:52 +00:00
Joshua Leung
3986a5f83a Bugfix [#32760] Crash on entering pose mode if motion paths have no baked points
Dunno how a file with this situation arose, but we now perform some more sanity checking to abort in this sticky situation.
2012-10-05 06:40:21 +00:00
Campbell Barton
a92171c213 fixes/minor improvements to circle select in armature and pose mode.
- pose mode now checks if circle select intersects the bone if neither head/tail are reached (as with editmode)
- checking if the mouse intersects with the bone now checks that neither projection failed.
- use ED_view3d_project_int_object rather then the global version.
2012-10-05 05:59:15 +00:00
Campbell Barton
07a0463ac5 fix for circle select ignoring lock selection option for pose and edit modes, added macros PBONE_SELECTABLE, EBONE_SELECTABLE 2012-10-05 05:27:51 +00:00
Campbell Barton
6e65c7842b replace ED_view3d_project_short_* with ED_view3d_project_int_*, when the result was converted to an int after.
also optimization for particle editmode key_test_depth() was projecting the screen coords, but all callers had already done this, so pass an arg.
2012-10-05 05:11:10 +00:00
Campbell Barton
2ba295bcd1 knife tool: avoid sqrt's for length comparison, and define KNIFE_FLT_EPS rather than using (FLT_EPSILON * 80). 2012-10-05 04:43:46 +00:00
Campbell Barton
07b52efa20 fix for bug in loop select, picking the active vert/edge/face was using global space checks on object space coordinates. this removes last use of ED_view3d_project_float_noclip(). 2012-10-05 04:18:52 +00:00
Campbell Barton
5770e44f43 replace most uses of ED_view3d_project_float_noclip() with ED_view3d_project_float_global/object 2012-10-05 03:57:56 +00:00
Campbell Barton
b9113f205c replace ED_view3d_project_float with ED_view3d_project_float_global 2012-10-05 03:20:14 +00:00
Campbell Barton
080f4441d2 Improvements for knife tool execute function (code was a bit sloppy & could leak memory).
- vertex to screenspace projections were not checking for failure to project (vertex behind the view for eg).
- vertex screenspace 2d vectors were each malloc'd and added to own ghash, then fetched for each edge.
  now just store a vertex aligned array and do index lookups.
- projections were done in global space, now do them in object space (avoids a matrix multiply).
- error cases were commented out and would fail silently, now report them to the operator.
- remove MAX_CUTS hard coded limit, dynamically allocate the mouse path.
- add missing free calls in error cases.
2012-10-05 03:06:01 +00:00
Campbell Barton
61ce7926d3 code cleanup: quiet warnings and use define for transform snap max distance. 2012-10-05 01:34:47 +00:00
Campbell Barton
7339b09e7f add ED_view3d_project_float_global, ED_view3d_project_float_object, ED_view3d_project_float_ex function calls and cleanup cursor3d set function which had some odd logic. 2012-10-05 01:27:28 +00:00
Thomas Dinges
3eba198818 * Fix Scons build when OCIO is disabled.
Still fails when it's enabled though (unresolved symbols).
2012-10-04 23:44:03 +00:00