Commit Graph

94 Commits

Author SHA1 Message Date
Campbell Barton
118e0426f1 patch [#24221] Creating graph from armature doesn't work with unsaved .blend files (with fix).
from Sergej Reich (sergof)

Made some corrections to the patch as well as using bpy.app.tempdir with tempfile python module.
2010-10-13 00:08:24 +00:00
Campbell Barton
868fdd80a2 use is rather then == when comparing against None. 2010-09-18 10:43:32 +00:00
Campbell Barton
240b164a87 fix some errors in rigify caused by recent api changes 2010-08-27 00:05:00 +00:00
Campbell Barton
4f5f868a52 rna data path names which are more likely to break animations.
Added an operator "Update Animation Data",
access from the search menu to update drivers and fcurves.
2010-08-20 06:09:58 +00:00
Campbell Barton
097a6ca926 rna remaining that negates values 2010-08-20 02:08:43 +00:00
Campbell Barton
513a907730 rna rename Bone and Text changes 2010-08-18 07:45:32 +00:00
Campbell Barton
3bd039eff9 apply rna rename most of the show_*, names. 2010-08-17 17:03:52 +00:00
Campbell Barton
7a31417f50 apply UserPrefs and Theme rna naming changes. 2010-08-17 13:14:41 +00:00
Campbell Barton
556b615cf8 mathutils module methods only contained matrix constructors, move these to matrix class methods since this is acceptable in python. eg: dict.fromkeys() and groups them more logically.
mathutils.RotationMatrix -> mathutils.Matrix.Rotation
 mathutils.ScaleMatrix -> mathutils.Matrix.Scale
 mathutils.ShearMatrix -> mathutils.Matrix.Shear
 mathutils.TranslationMatrix -> mathutils.Matrix.Translation
 mathutils.OrthoProjectionMatrix -> mathutils.Matrix.OrthoProjection
2010-08-11 16:40:36 +00:00
Guillermo S. Romero
95aa8cfa4a Update address in license block. 2010-08-10 21:22:26 +00:00
Campbell Barton
30d180ff0d bugfix [#23194] export UVs miss the extension file
also made all other exporters do this.

Made some internal changes.
- moved path functions from bpy.utils to bpy.path (similar to os.path)
- added functions...
  bpy.path.ensure_ext(path, ".ext", case_sensitive=False) # simple function to ensure the extension is set.
  bpy.path.resolve_ncase(path) # useful for importing scenes made on windows where the path case doesnt match the files.
2010-08-06 01:40:54 +00:00
Campbell Barton
75410037fd - correct some spelling errors.
- remove FreeCamera struct (wasnt used)
- remove world color alpha values (not used anywhre).
2010-07-20 10:41:08 +00:00
Campbell Barton
02da5ecfed Apply first pass of edits to rna values from rna_booleans.txt.
These are not animated and are best not change names like this too late in the release.

ActionGroup.selected -> select:    boolean    Action Group is selected
BezierSplinePoint.hidden -> hide:    boolean    Visibility status
BezierSplinePoint.selected_control_point -> select_control_point:    boolean    Control point selection status
BezierSplinePoint.selected_handle1 -> select_left_handle:    boolean    Handle 1 selection status
BezierSplinePoint.selected_handle2 -> select_right_handle:    boolean    Handle 2 selection status
Bone.restrict_select -> hide_select:    boolean    Bone is able to be selected
Bone.selected -> select:    boolean
CurveMapPoint.selected -> select:    boolean    Selection state of the curve point
EditBone.restrict_select -> hide_select:    boolean    Bone is able to be selected
EditBone.selected -> select:    boolean
EditBone.selected_head -> select_head:    boolean
EditBone.selected_tail -> select_tail:    boolean
EditBone.locked -> lock:    boolean    Bone is not able to be transformed when in Edit Mode
EditBone.hidden -> hide:    boolean    Bone is not visible when in Edit Mode
NEGATE * FCurve.disabled -> enabled:    boolean    F-Curve could not be evaluated in past, so should be skipped when evaluating
FCurve.locked -> lock:    boolean    F-Curve's settings cannot be edited
FCurve.muted -> mute:    boolean    F-Curve is not evaluated
FCurve.selected -> select:    boolean    F-Curve is selected for editing
NEGATE * FCurve.visible -> hide:    boolean    F-Curve and its keyframes are shown in the Graph Editor graphs
FCurveSample.selected -> select:    boolean    Selection status
GPencilFrame.selected -> select:    boolean    Frame is selected for editing in the DopeSheet
GPencilLayer.locked -> lock:    boolean    Protect layer from further editing and/or frame changes
GPencilLayer.selected -> select:    boolean    Layer is selected for editing in the DopeSheet
Keyframe.selected -> select:    boolean    Control point selection status
Keyframe.selected_handle1 -> select_left_handle:    boolean    Handle 1 selection status
Keyframe.selected_handle2 -> select_right_handle:    boolean    Handle 2 selection status
MeshEdge.selected -> select:    boolean
MeshEdge.hidden -> hide:    boolean
MeshFace.hidden -> hide:    boolean
MeshFace.selected -> select:    boolean
MeshVertex.hidden -> hide:    boolean
MeshVertex.selected -> select:    boolean
MotionPathVert.selected -> select:    boolean    Path point is selected for editing
NlaStrip.selected -> select:    boolean    NLA Strip is selected
NlaTrack.locked -> lock:    boolean    NLA Track is locked
NlaTrack.muted -> mute:    boolean    NLA Track is not evaluated
NlaTrack.selected -> select:    boolean    NLA Track is selected
Object.restrict_render -> hide_render:    boolean    Restrict renderability
Object.restrict_select -> hide_select:    boolean    Restrict selection in the viewport
Object.restrict_view -> hide:    boolean    Restrict visibility in the viewport
Object.selected -> select:    boolean    Object selection state
ObjectBase.selected -> select:    boolean    Object base selection state
PoseBone.selected -> select:    boolean
Sequence.right_handle_selected -> select_right_handle:    boolean
Sequence.selected -> select:    boolean
SplinePoint.selected -> select_control_point:    boolean    Selection status
TimelineMarker.selected -> select:    boolean    Marker selection state
Sequence.left_handle_selected -> select_left_handle:    boolean
ActionGroup.locked -> lock:    boolean    Action Group is locked
Bone.hidden -> hide:    boolean    Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)
SplinePoint.hidden -> hide:    boolean    Visibility status
FModifier.muted -> mute:    boolean    F-Curve Modifier will not be evaluated

 note: rebaned uv_select to select_uv
2010-07-15 16:56:04 +00:00
Campbell Barton
9cbbc9d3af rename some rna properties filename --> filepath
* filename == "foo.ext"
 * filepath == "/path/to/and/including/foo.ext"

this was alredy followed in some places not not everywhere.
2010-06-02 17:58:28 +00:00
Campbell Barton
20fd05abc1 manually sync rigify with render branch
fixes [#22231] Rigify Script Error When Generate From Human(Meta-Rig)
2010-05-03 19:12:11 +00:00
Campbell Barton
67cfc427ee PyAPI
- added new mathutils.Color() type, use with rna so we can do for eg:
 material.diffuse_color.r = 1.0
 # also has hsv access
 material.diffuse_color.s = 0.6

 - made Mathutils and Geometry module names lowercase.
2010-04-11 14:22:27 +00:00
Nathan Vegdahl
54b12df3bc Added tongue and neck rigs. The neck rig is quite solid, I think, and is working well in production on Durian. The tongue rig is a bit hacky, but I'm adding it for now since we're using it in Durian.
Also added pupil dilation to the eye rig type, and made the finger rig type work with two-digit fingers.
2010-04-07 14:46:06 +00:00
Campbell Barton
bad41fcff5 - new docstrings for bpy.type.Struct methods & some corrections.
- struct.path_to_id() --> path_from_id().
2010-04-06 07:49:10 +00:00
Campbell Barton
bc149e0fbe pep8 cleanup 2010-04-04 14:52:15 +00:00
Campbell Barton
9105f6f0bd rna naming, *_frame --> frame_* 2010-04-01 21:44:56 +00:00
Campbell Barton
7c0d2ffb64 pep8 cleanup 2010-03-06 01:40:29 +00:00
Campbell Barton
97bdfe6f1b pep8 cleanup + correction for external player operator return value. 2010-02-22 23:32:58 +00:00
Nathan Vegdahl
2b9740bc3b Made a more generic rig type for giving animators direct control over shape keys. With this rig type you can attach shape keys both to the transforms of the bone and any number custom properties on the bone. 2010-02-22 18:07:16 +00:00
Campbell Barton
bc3d96678d bugfix [#21233] Crash in pyapi, with new object.
pass the obdata as an argument rather then assigning later so as not to allow an invalid state.
2010-02-22 00:07:46 +00:00
Nathan Vegdahl
27654953b1 Rigify:
Added a tail control rig.
For now, you have to manually hook the resulting controls up to a separate spline IK rig that you make by hand.  Perhaps this can be automated in the future.
For anyone using this: keep in mind that you need separate armatures for the tail deformation bones and tail control bones.  Otherwise you create a cyclic dependency like so:
tail deform bones <- spline object <- tail control bones
2010-02-15 16:46:24 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Nathan Vegdahl
fb728addd2 Eh... stupid me. Left a duplicate main function in the rig type.
(Tail between legs, walks away shamefully.)
2010-02-03 15:44:19 +00:00
Nathan Vegdahl
11ce6eb4d4 Added a new rig type "shape_key_transforms" that drives shape keys based on the local transforms of a single bone. Quite useful in a variety of situations.
Required options:
    mesh:  name of mesh object(s) to add/get shapekeys to/from
           (if multiple objects, make a comma-separated list)
Optional options:
    loc_<x/y/z>:       name of the shape key to tie to translation of the bone
    loc_<x/y/z>_fac:   default multiplier of the bone influence on the shape key
    rot_<x/y/z>:       name of the shape key to tie to rotation of the bone
    rot_<x/y/z>_fac:   default multiplier of the bone influence on the shape key
    scale_<x/y/z>:     name of the shape key to tie to scale of the bone
    scale_<x/y/z>_fac: default multiplier of the bone influence on the shape key
2010-02-03 15:40:56 +00:00
Nathan Vegdahl
21f1625fd5 Updates to mouth rig. Old method didn't work well in combination with shape keys. This new method (effectively just weighting directly to the lip control bones) is much simpler, but also requires more manual weight painting to get it to look right. 2010-02-02 17:57:12 +00:00
Campbell Barton
fbadf21b00 pep8 changes to rigify (minor warnings still there)
also found quite a few cases where variables were used that hadnt been defined.
2010-01-31 14:33:27 +00:00
Campbell Barton
22d8742f0d white space commit, so the actual changes in the next commiy wont be so hard to find 2010-01-31 14:30:21 +00:00
Nathan Vegdahl
fb8d6b9f7a Rigify:
- Removed control-shape deformation bones from the spine rig (no longer necessary thanks to the new "custom shape at" feature).
- Various improvements to the mouth rig, including a corrective shape key for mouth-open.
- The new method of generating into the same armature object every time wasn't copying pose bone data in the process, such as rotation mode and transform locks.
2010-01-26 11:17:41 +00:00
Nathan Vegdahl
ede3f0285d Rigify now generates the rig into the same armature every time, so you don't have to re-hook-up things like armature modifiers, parenting, etc.
By default the generated rig object is named "rig".  But you can add a custom "rig_object_name" property to the metarig to specify the name of the object to generate into.
2010-01-25 14:19:12 +00:00
Campbell Barton
0a0f4c9d81 Mathutils refactor & include in sphinx generated docs, (TODO, include getset'ers in docs)
- Mathutils.MidpointVecs --> vector.lerp(other, fac)
 - Mathutils.AngleBetweenVecs --> vector.angle(other)
 - Mathutils.ProjectVecs --> vector.project(other)
 - Mathutils.DifferenceQuats --> quat.difference(other)
 - Mathutils.Slerp --> quat.slerp(other, fac)
 - Mathutils.Rand: removed, use pythons random module
 - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --> Mathutils.RotationMatrix(angle, size, axis); merge axis & axis_flag args
 - Matrix.scalePart --> Matrix.scale_part
 - Matrix.translationPart --> Matrix.translation_part
 - Matrix.rotationPart --> Matrix.rotation_part
 - toMatrix --> to_matrix
 - toEuler --> to_euler
 - toQuat --> to_quat
 - Vector.toTrackQuat --> Vector.to_track_quat
2010-01-25 09:44:04 +00:00
Campbell Barton
8f3f1da080 - temp marker rename in menu (using python or the outliner isnt fun)
- marker selected property
- rigify error formatting error
2010-01-21 19:43:27 +00:00
Nathan Vegdahl
c54d54e8ae Rigify:
- Added two driven-shape-key rig types that create and drive shape keys on a mesh/meshes based on the distance or rotation difference between two bones.
- Fixed bug in finger curl rig type where secondary finger controls were not created.  Finger type can also now (optionally) have a hinge switch (useful when using it for wings).
- Changed the blending system in rigify_utils to use copy_transforms constraints instead of copy_loc+copy_rot.
- Finished the quadruped leg type.  Now has both ik and fk control and ik/fk switching.  Also uses a rotating bone to control the knee direction instead of a pole target (seems to work more consistently for quadruped setups).  There's still one annoying bug regarding foot roll, but it's not blocking.  I'll track it down later.
- Mouth rig now creates corrective shape keys on the face mesh for dealing with mouth corners when they spread open.
- Biped arm and leg types now cause mesh to scale when you scale the fk controls.
- Misc improvements to the rig types.
2010-01-19 19:07:09 +00:00
Nathan Vegdahl
40fb29862e Added eyeball and eyelid rig types to rigify.
(First commit!  Let's hope this works!)
2010-01-19 18:52:45 +00:00
Campbell Barton
20df075e38 new rig types from Cessen 2010-01-10 19:20:48 +00:00
Campbell Barton
c723251cc0 rename rig types not to have generic in the name (Cessens decission) 2010-01-10 18:59:32 +00:00
Campbell Barton
57e96e4472 patch from Cessen, update to metarigs and some changes to the rigging main loop.
- property names dont need the bone type prefix anymore
- always add a root bone that all non parented bones are parented to
- x/y/z axis properties for bones.
2010-01-10 18:53:15 +00:00
Campbell Barton
08c9ecb3b0 RNA/Py API
change how data is added. eg.
 bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
 bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)


image and texture stil use add_* funcs
2010-01-09 23:44:01 +00:00
Campbell Barton
e49e9289f0 - leg_quadruped_generic missing imports
- move global pivot in the UI of userprefs since others are closer related
2010-01-06 22:38:51 +00:00
Joshua Leung
a9861e3381 Durian Request: Drivers Recode
Highlights:
* Support for Multi-Target Variables
This was the main reason for this recode. Previously, variables could only be used to give some RNA property used as an input source to the driver a name. However, this meant that effects such as Rotational Difference couldn't be used in conjunction with other effects and/or settings to achieve the powerful results. Now, a variable can take several input targets, perform some interesting operations on them, and spit out a representative value based on that.

* New Variable Types
With the introduction of multi-target variables, there are now 3 types of variable that can be used: single property (i.e. the only type previously), Rotational Difference (angle between two bones), and Distance (distance between two objects or bones).

* New Driver Types
In addition to the existing 'Average', 'Sum', and 'Expression' types, there is now the additional options of 'Minimum' and 'Maximum'. These take the smallest/largest value that one of the variables evaluates to.

* Fix for Driver F-Curve colouring bug 
Newly added drivers did not get automatically coloured in the Graph Editor properly. Was caused by inappropriate notifiers being used.


Notes:
* This commit breaks existing 2.5 files with drivers (in other words, they are lost forever). 
* Rigify has been corrected to work with the new system. The PyAPI for accessing targets used for the variables could still be made nicer (using subclassing to directly access?), but that is left for later.
* Version patching for 2.49 files still needs to be put back in place.
2010-01-04 21:15:45 +00:00
Campbell Barton
d8d11c55d9 patch from Cessen
Adds a new set of bones to rig types which are to be used for weight paint vgroups, in some these have some more segments to account for twist. also use Aligoriths new copy transform constraint.
2010-01-02 23:43:46 +00:00
Campbell Barton
c72089df50 - deform types for copy, arm and leg, patch from Cessen (with slighy modifications)
- bone.center attribute
2009-12-30 18:39:02 +00:00
Campbell Barton
944a4f2a3f pep8 edits, removed MakeCursor.py and rna_array.py, not important to make pep8 2009-12-26 09:36:50 +00:00
Campbell Barton
0c813b2a0e autorigging front end, access in pose mode armature panel (at the bottom)
demo: http://download.blender.org/durian/metarig_demo.ogv
sintel base rig also, would like to include more generic/simple rigs eventually
2009-12-17 19:48:30 +00:00
Campbell Barton
4cddc9e146 rescale metarig types to roughly match 1.0 == 1m for body parts, also fix py error with bone UI 2009-12-17 13:17:24 +00:00
Campbell Barton
3ea2d08e1a pep8 changes 2009-12-16 13:27:30 +00:00
Campbell Barton
b0abe98d59 - original bones in last layer
- dont rename root bone
- use Rigify exceptions
2009-12-15 18:53:16 +00:00