Commit Graph

3173 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
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
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
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
Matt Ebb
e26cc71bd0 Tweaks to copy game properties operator for Dalai 2010-05-25 06:24:45 +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
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
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
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
Campbell Barton
a368bdad8d [#22391] Fix for eps-export of UVs
patch from Marc Fontaine (cubbie)
2010-05-23 06:00:08 +00:00
Campbell Barton
b5afa606bc replace context.areas.spaces[0] with context.space_data 2010-05-23 05:34:45 +00:00
Michael Fox
3d417a833c 2010-05-23 02:02:04 +00:00
Matt Ebb
a17f074ffc Fix typo in add group instance menu 2010-05-21 04:44:23 +00:00
Campbell Barton
e8ed1f1f55 enable different rotation types for imported BVH's including 'Native', which uses the rotation order defined in the BVH 2010-05-20 17:36:59 +00:00
Campbell Barton
f37518d902 bugfix [#22311] BVH Import broken
from Stig Olavsen & Tod Liverseed
2010-05-20 17:23:37 +00:00
Campbell Barton
4d6d68bfa1 obscure sounding feature thats actually useful: isolate render type
Select lamp, isolate, all other visible lamps are disabled.
2010-05-20 15:30:28 +00:00
Joshua Leung
89b7d4a5d6 Motion Path Tweaks:
- #22155: keyframe dots not shown on path for bone keyframes that aren't in a group with a matching name. Since this situation is going to become more common in 2.5, I've added an option which will alternatively just search the entire action to find all F-Curves associated with bones. The old option is still the default though for the general cases.

- When keyframe drawing is enabled, the current frame will also be indicated on the path now as a (bigger) green dot, as requested by William. This makes it easier to see the position on the path on the current frame.
2010-05-20 12:31:55 +00:00
Campbell Barton
79a45e75d3 view3d modal operator template 2010-05-20 07:49:41 +00:00
Joshua Leung
226140f2ee 3D View Header - Removing the annoying little extra gap between expand-icon and first menu 2010-05-20 03:52:35 +00:00
Campbell Barton
b7a7859eb0 render_ -> use_ prefix, copied from render branch. 2010-05-19 08:26:33 +00:00
Campbell Barton
ba728620ce text utility functions.
- st = text.as_string()
 - text.from_string(st)
2010-05-18 09:07:58 +00:00
Campbell Barton
0a9d914ad7 context.PointCache --> context.point_cache (not to confuse type with property name) 2010-05-18 07:39:07 +00:00
Matt Ebb
10f5be4fbf Fix [#22345] ReleaseRenderOpt 2.5 Problem with rendering displacement map
Communicate the existing material displacement feature's strange dependence on both
'normal' and 'displacement' influences better. This will do until the improved displacement
is merged from render branch.
2010-05-18 03:10:47 +00:00
Campbell Barton
26ded51077 add back codecs UI for exr (from previous patch) 2010-05-17 16:38:20 +00:00
Thomas Dinges
01b16aea59 Decimate Modifier UI:
* Changed Face Count button to a label.
2010-05-17 13:48:09 +00:00
Dalai Felinto
ce6e6112eb Logic UI: copy logic operator (old Ctrl+C) + add logics (shift+a)
According to Matt the RMB->Copy to selected wouldn't work for logics because the copy we need is for the whole logic (s/c/a). So (at least for the time been), copy logic is possible again.
It work as 2.49 (replacing the existent logic).

Add Logics is a python menu to give quick access to add logics. I have to see how to put that in Add Menu. I should be easy, but I'll leave it for later.
2010-05-16 16:28:50 +00:00
Campbell Barton
80de1162ee clear some pep8 warnings 2010-05-16 12:15:04 +00:00
Joshua Leung
6e66bfe110 Removed obsolete comment for previous commit 2010-05-16 11:43:48 +00:00
Thomas Dinges
e1bf9d30bc Properties Window:
*The narrowui value was hard coded in all ui scripts, made an user preferences option. Basically this value determines on which area width, it should switch between dual/single column layout. 

ToDo: The Changes only take effect when reloading scripts/restarting Blender (after saving as default). Will maybe add the "Reload Scripts" operator next to the button in the future. 

* Small fix for Fluid Add Button, when in single column mode. Didn't expand like the other "Add" Buttons.
2010-05-16 10:21:00 +00:00
Thomas Dinges
91a6fb4b5c Some Renaming:
Render:
*antialiasing > render_antialiasing
Mist:
*enabled > use_mist
Stars:
*enabled > use_stars
2010-05-16 08:36:29 +00:00
Campbell Barton
05eeee3fe3 bugfix [#22325] bpy.ops.import is invalid name 2010-05-16 08:30:40 +00:00
Matt Ebb
0524fc1df6 Fix [#22337] Wrong operator descriptions 2010-05-14 07:20:16 +00:00
Matt Ebb
2b44cab9ef Tweak to text editor context menu 2010-05-13 01:46:48 +00:00
Diego Borghetti
3c3502fda4 Small change to Node Space and two new function.
"Select all of the same type" now is binding to Shift + GKEY

Two new function, select next and prev node of the same type.

Select a node and press Shift + [ or Shift + ] go to the
previous and next node of the same type (of the active node).
2010-05-12 13:55:09 +00:00
Diego Borghetti
9a4ba57ee9 Node Space: Small feature for Venomgfx, Shift + F select node of the same type
This is a small request from Venomgfx, select a node
and then press Shift + F to select all the nodes of the
same type (of the active node).

The key binding can be change, we thing in a "Find Next" (that is
way the FKEY) with venomgfx, but no problem with change that.

Also I add the entry in the select menu.
2010-05-12 12:03:38 +00:00
Matt Ebb
4cc49ad899 Add a little RMB context menu to text editor 2010-05-12 08:03:36 +00:00
Joseph Eagar
aaa7c493e4 merge of last commit to trunk 2010-05-11 20:06:20 +00:00
Campbell Barton
e8408697de bpy.utils.blend_paths(absolute=False) (was Blender.GetPaths in 2.4x) 2010-05-11 07:08:32 +00:00
Campbell Barton
daba1d23ff utility functions
bpy.utils.smpte_from_seconds(time)
 bpy.utils.smpte_from_frame(frame)
2010-05-10 20:41:01 +00:00
Thomas Dinges
9502fb0dcf Wrong operator description in preset base class. 2010-05-10 18:04:04 +00:00
Thomas Dinges
68376214b5 Themes "3D View":
*Minor code changes and added some missing edge settings.
2010-05-10 17:54:34 +00:00
Sergey Sharybin
8d9e55122f "Every Nth number of Points" operator for curves/surfaces
This is replacement of old "Select every Nth" operator with
de-select strategy to make the same behaviour as for meshes.
2010-05-10 17:32:11 +00:00
Matt Ebb
413c4c91ca Fix [#22296] Wrong Operator Names? 2010-05-10 01:49:35 +00:00
Campbell Barton
d58a591072 Sequencer crashes with clips that have OpenGl render enabled (rev 28658)
disabling for now, opengl write rendering isnt drivial to solve.
2010-05-08 19:08:33 +00:00
Toni Alatalo
05e2e92611 Add the option to show also the UVs of other selected objects in image
space / uv edit. The code was already there, and the option as a rna 
bool, but no ui to set it. Matt figured that the View menu in image 
space next to other uv stuff, which only shows when UVs are edited, is 
the right place. 

Works so that when entering editmode for an object to edit UVs, when 
have also other objects selected and this option on, also the UVs of 
those other objects are shown in the image view.

Liquidape asked this on IRC, and we thought the feat doesn't exist, so I 
looked out of curiosity in the code as was thinking it would be easy to 
add. Was surprised to find it there already :)

First time that did anything with 2.5, was sure fun enough to search 
thru the code to figure out how things work. Adding this ui thing proved 
to be exactly as trivial and nice as it should, and the things under the 
hood seemed nice, yay!
2010-05-06 23:47:25 +00:00
Campbell Barton
c8a0592288 option to use the linked path or the local path for pointcache.
needed for sintels hair to be baked locally.
2010-05-06 17:12:44 +00:00
Campbell Barton
cbf7d507c5 last commit broke linking to scenes from the UI 2010-05-06 11:47:10 +00:00
Campbell Barton
52517570f0 python property - object.scene_users
Also made this and object.group_users return tuples so it raises an error in this case...
  ob.scene_users.append(scene)
2010-05-06 08:30:42 +00:00
Campbell Barton
12cf8ac1d6 - split objet group add/link into 2 operators
- link now brings up a search box so when there are 100's of groups its less annoying.
- utility functions for id-enums so only local objects can be displayed in a search list (used for group_link)
- renamed operator properties from typle to scene, group, action etc.
2010-05-05 15:41:38 +00:00