Commit Graph

24244 Commits

Author SHA1 Message Date
Joshua Leung
5d6bdd7c2e Various constraint code cleanups:
1) Fixed some weird formatting introduced during math-lib cleanups, and some other inconsistencies
2) Optimised the Maintain Volume constraint by taking the value calculations out

Copy All Constraints Operators:
* Added one for bones too
* These are now included in the menus
* Removed some weird/extra code copying/changing/bleh the actcol/totcol stuff...
2010-05-27 11:56:31 +00:00
Campbell Barton
e689ca078d rename curve 'point' to 'co', the property name used verts, bezier points and keyframes. 2010-05-27 11:25:07 +00:00
Joshua Leung
4ebc634168 == Pivot Constraint ==
This constraint allows an object or bone to have their rotations applied as if their origin/pivot-point was located elsewhere. The most obvious uses include foot-roll, see-saws, but could also include more complicated rolling-box examples.  

== Usage Examples ==
=== Foot Roll ===
1. Add 'Pivot' Constraint to the bone without any target.
2. Set the 'Y' value of the offset to the length of the bone. Usually this should be negative (if you rig with feet facing 'forwards' along -Y axis). This gives you a pivot point relative to the bone's (preconstraint) location, which should be at the tip of the bone here. Disabling the 'Use Relative Offset' would make this offset be relative to 0,0,0 instead of to the owner/bone-head.
3. Ensure that the 'Pivot When' setting is set to '-X Rot', (default) which means that the pivot will only used when the rotation on the X-Axis is negative to get tip-toe 'roll'. 

=== See Saw ===
1. Add a 'Pivot' constraint too see-saw plank object, this time with a target that you wish to have as the pivot-point. It's possible to do this without too (as before), but is less intuitive.
2. Optionally, if you want the plank slightly raised, set the z-offset value, which should make the pivot-point used to be relative to the target with the z-offset applied.
3. Ensure that 'Pivot When' is set to 'Always', which means that the pivot will always be used, irrespective of the rotation.

== Notes ==
* The 'Pivot When' setting has been integrated in the constraint, since this is something that will often be required for these setups. Having to set up additional drivers to drive the constraint to do this kindof beats the purpose of providing this.

* The 'Offset' functionality is probably not presented as clearly as it could be. We may need to go over this again.

* For foot-roll - if any scaling of the foot is required, simply set up a driver on the y-offset to make this dynamically respond to the "scale" RNA property of the bones (don't use the "Transform Channel" vartype since that won't work correct here). However, this shouldn't be common enough to warrant special treatment.
2010-05-27 10:50:06 +00:00
Nicholas Bishop
135f8be2c7 Small bug fix:
The array of string names for CD layers was missing a few. Added them back and organized a bit for clarity.
2010-05-27 08:42:59 +00:00
Dalai Felinto
e4530c47f0 Logic Editor: fix for datablock counting when copying/deleting sound actuator
("bug" from 2.49)
2010-05-27 08:34:32 +00:00
Matt Ebb
6e92ddf8b3 Progress indicators for threaded jobs
Now, rather than the bit-too-alarming stop sign, threaded wmJobs 
display a progress indicator in the header. This is an optional feature
for each job type and still uses the same hardcoded ui template
(could use further work here...).

Currently implemented for:
Render - parts completed, then nodes comped
Compositor - nodes comped
Fluid Sim - frames simulated
Texture Bake - faces baked

Example: http://mke3.net/blender/devel/2.5/progress.mov
2010-05-27 08:22:16 +00:00
Dalai Felinto
ec70356424 Logic Editor: ops forgot this small fix on last commit 2010-05-27 08:12:32 +00:00
Campbell Barton
9852543154 make bpy.ops.object.select_name(name) also make the object active since Alt+RMB wasnt setting the object active.
if other tools need this not to switch the active object we could make setting active an option.
2010-05-27 08:09:25 +00:00
Nathan Letwory
ef0239fa6f Update description after 29013, which added windows support for this. 2010-05-27 07:45:57 +00:00
Dalai Felinto
8872cba7e9 Logic Editor: removing usercount for existent datablocks
Using custom setfuncs to avoid increase/decrease of usercount.
That way nothing stops you from removing a material that is used by a
sensor, or a mesh, an action ... (this is how 2.49 works too)

* also some general code cleaning/fix (adding static casts, replacing libaddr_us by lib_addr for dome text (I had no idea how user count worked back then)
2010-05-27 07:37:09 +00:00
Stefan Gartner
0db16ff434 fixed typo that prevented tiff support from being enabled by default 2010-05-27 06:08:48 +00:00
Matt Ebb
f05e79c2ae Warning fixes 2010-05-27 04:54:53 +00:00
Nathan Letwory
31fe70019d Add floating-point exception handler trap for Windows (MSVC). Now you can set breakpoint on fpe_handler on Windows too when debugging floating-point funkyness. 2010-05-26 23:03:25 +00:00
Thomas Dinges
d400c083b8 Tiff Image Format was not displayed in the "file_format" menu. Scons was missing declaration for it. 2010-05-26 20:09:26 +00:00
Campbell Barton
ad02ae8e70 display errors for mesh deform, useful to help find out why mdef isnt being applied. 2010-05-26 18:16:16 +00:00
Nathan Letwory
d17c4e2f91 Copy zlib.dll for win64 too. 2010-05-26 11:25:33 +00:00
Campbell Barton
37fab4a3e1 bugfix [#22426] New Thumbnail code crashes when saving
patch from Ken Nign (ken9). (modified slightly)
2010-05-26 10:52:39 +00:00
Matt Ebb
440917cb0b Fix [#22418] Displace Node also makes entire image fuzzy
Changed displace node sampling to use EWA filtering, and removed old hacks 
for calculating derivatives - I think it should be generated correctly now.
2010-05-26 08:06:51 +00:00
Campbell Barton
244cda6f1a NULL check for parent with do_versions(),
this is also done in the 2 others places in the code which get the parent.

 In our case the crash was caused by a group not containing the parent object.
2010-05-25 18:31:36 +00:00
Campbell Barton
1bd58bdbf4 = misc small stuff =
- own mistake in scene help text.
- rename properties to have users as the prefix for better ordering.
- use fixed height for stamp, gives better aligned text.
2010-05-25 17:04:32 +00:00
Dalai Felinto
13f1ce8bdc fix for recent commit "armature conversion to modifier" (armature->deformflag crash on doversion)
reported by Joerg Mueller (Nexyon)
2010-05-25 15:26:12 +00:00
Brecht Van Lommel
f7c4dd6d56 Merge back a few cloth solver fixes from the render branch:
* Disable openmp for dot product, this gives different results each
  time due to non-commutative floating point add.
* Disable openmp with few vertices, the extra thread overhead only
  slows things down then.
* Replace the hack that would divide stepsPerFrame and then set it
  back, now it simply uses the timescale in the collision function.
  This was incorrect because stepsPerFrame is an int, but we don't
  want this to be rounded.
* Extra out of bounds check for hair velocity smoothing grid.
2010-05-25 13:33:59 +00:00
Dalai Felinto
5416f51b7a BGE Fix for: [#22142] Armature deformation does not work in Game Engine. + parent type to modifiers doversion(). Patch by Xavier Thomas (xat)
This fix the problem of not being able to play animations created with Blender 2.5 in BGE. Patch reviewed by Benoit

Added also other parent to modifier conversions as requested by Joshua (aligorith). I didn't bump subversion here, but the patch should work still. If not I'm increasing subversion sooner anyways (tomorrow or by the middle of the week I hope).

I was waiting to commit this one together with the Logic Editor datablock patch (converting material_name DNA properties to struct Material *). However my patch is getting too big and it's better if it's alone (easier to analyze later, eventual fixes, ...)

Mitchell, this commit adds a function that can help hardware skinning - HasArmatureDeformer()
2010-05-25 08:42:11 +00:00
Matt Ebb
e26cc71bd0 Tweaks to copy game properties operator for Dalai 2010-05-25 06:24:45 +00:00
Campbell Barton
c9ac1cc986 fix for 2 warnings & better error checking for the thumbnail loading. 2010-05-25 05:56:31 +00:00
Campbell Barton
c61e25e6ac blend file thumbnailing
- uses same thumbnail system as image browser
- blend files show thumbnails in ubuntu/gnome (freedesktop spec)
- 128x128 images are embedded into the blend file header, a simple loader avoids reading the entire blend file to extract it when generating thumbnails in the file selector.
  When the image browser reads a directory it loads images and creates thumbnails, blend files embedded images are treated just like loading an image.
- the thumbnail is created from the camera view in solid mode. (no camera == no thumbnal).
- readfile/writefile.c: had to use the 'TEST' code name to save thumbnails, anything else would segfault older blender versions on load. (its not used elsewhere).
2010-05-24 21:52:18 +00:00
Benoit Bolsee
3332b2b29e Update MSCV9 project files 2010-05-24 21:10:58 +00:00
Damien Plisson
671684c539 OSX Intel: Enable floating point exceptions (for debugging purposes)
From Matt's patch [#22408]
2010-05-24 20:39:01 +00:00
Martin Poirier
bd15f5122d BLI_args cleanup
Adding documentation strings in argument data.

--help is auto generated (options not manually categorized end up in the "others" section at the bottom)
2010-05-24 18:53:45 +00:00
Stefan Gartner
be44a3b7c4 Makefiles: set BF_OPENCOLLADA_LIBS for darwin so that it links when opencollada is enabled 2010-05-24 16:12:58 +00:00
Sergey Sharybin
2d450c9e58 Changed BF_TIFF_LIB from libtiff to tiff for MinGW 2010-05-24 16:07:17 +00:00
Campbell Barton
0ae967e665 sound sequence strip wasnt handled by path functions correctly.
fixes make relative/absolute for sound sequences.
2010-05-24 14:41:35 +00:00
Sergey Sharybin
4324dc8389 Changes for static linking to libtiff when compiling by MinGW:
- Use static tiff libraries from lib/windows/gcc in
  scons configuration files
- Commented libtiff.dll installation in SConstruct
2010-05-24 12:41:14 +00:00
Campbell Barton
8c767ce0e8 utility function for mesh data types
mesh.edge_loops_from_edges(edges=None)

Lets you get edge loops from python either from the entire mesh or from by passing an edge list.
2010-05-24 12:18:12 +00:00
Campbell Barton
4178b44b35 - correct --help message
- fix implicit decloration of DAG_scene_sort()
- same fix for tiff as made in renderbranch
- rename 'combined peak' --> 'peak' for shorter messages while rendering.
2010-05-24 11:40:45 +00:00
Dalai Felinto
6c01b7b4f8 Logic Editor - fix for Keyboard Sensor + Copy Game Property fancy submenu
* Keyboard Sensor entry keys (key, modifier 1 and 2) can actually be any key
- (you can use Shift as main key, and D as modifier if you want). It's
- strange in my opinion, but it's 2.49 way of doing it.

* Copy Game Property (operator found in SPACE menu)
- reorganized it so the properties appear as submenu items.
- a "little lot" of work for such a small eye-candie but well I hope more
- people like it as well :)

Matt, I had to recreate the dynamic_enum to make it work. I'm count on you
for a real fix for this ;)
2010-05-24 10:38:05 +00:00
Matt Ebb
9777072c0e Fix [#21521] Displacement modifier does not update when modifing texture
Depgraph now handles texture dependencies - textures can affect objects/data via modifiers.
2010-05-24 07:30:50 +00:00
Campbell Barton
a1ada0f21c - remove OBJECT_OT_curve_add
- rename CURVE_OT_primitive_bezier_add --> CURVE_OT_primitive_bezier_curve_add # matches nurbs operator
- rename CURVE_OT_primitive_curve_path_add --> CURVE_OT_primitive_nurbs_path_add
- fix for warnings from 28923
2010-05-24 07:14:55 +00:00
Matt Ebb
5664c0397c Fix [#22278] Colour Balance Node HSV Value slider range is insufficient. 2010-05-24 02:05:23 +00:00
Matt Ebb
4e70cd4a52 Fix [#22382] Text Editor properties pannel scales, not scrolls, with MMW 2010-05-24 01:23:46 +00:00
Campbell Barton
3aab8f245a bugfix [#22398] Black spots on reflecting surfaces when using Environment Light with HDR
acos() was being called with a value around  '-1.000001' because of float precission error.
2010-05-23 21:38:27 +00:00
Sergey Sharybin
735559f0da Fixes for cross-compilation:
- Set env['CC'] and env['CXX'] as default values for
  CC and CXX variables. This fixes problem with overwriting
  auto-guessed compilators when reading config files
- Added new prefix for mingw tools
2010-05-23 21:20:13 +00:00
Campbell Barton
a97904cbcc GNU style long arguments. see help menu.
- swapped meanting of -y/-Y to enable/disable automatic python execution (matches window border -w/-W).
- removed '-B', no reason to have this.
- renamed -fpe to --debug-fpe and added to --help
2010-05-23 20:39:21 +00:00
Campbell Barton
3251d9d523 was curious if makefile still worked. they didnt, found 2 problems
- use our own openjpeg.
- libXmu isnt found/needed on ubuntu 10.04, removing, can add back if it breaks for someone else.
2010-05-23 17:45:08 +00:00
Campbell Barton
70905d06f1 add new object py module.
- added view align from twisted torus script and return the object's base.
2010-05-23 12:38:49 +00:00
Campbell Barton
f1b9d395e3 - base_object.layers_from_view(view3d), needed for setting local layers
- module 'add_object_utils', so each script doesnt need its own add object code, dealing with layers, scene, cursor location, editmode etc.
2010-05-23 12:14:07 +00:00
Campbell Barton
c249d2b95a view3d - dont draw loose edges with render-override is enabled. 2010-05-23 10:48:35 +00:00
Campbell Barton
a9072177ba opengl render option 'view_context',
When enabled the context's 3D view will be used for rendering.
When disabled a camera view with solid draw mode will be used.

(Needed for batch rendering out animation previews without having to worry about an existing 3D view, its local layer locking and draw type)
2010-05-23 10:47:19 +00:00
Campbell Barton
d1d7c5fbd1 remove some warnings and remove reference to BF_TIFF_LIB in the help message. 2010-05-23 07:53:09 +00:00
Campbell Barton
c9d4672edc [#22301] Fix for 22300 : Blender 2.52 FBX exporter doesn't export correct FBX
patch from Mariusz Borsa (wrotki) 

edited the patch to stay closer to the original function.
2010-05-23 06:43:43 +00:00