by Adrian Winchell (slightly modified)
This adds a center circle (like translation and resize) to the rotation manipulator that triggers trackball rotation.
- use OBJECT_OT_mode_set rather then OBJECT_OT_*_toggle, better for using report output for script input. OBJECT_OT_posemode_toggle and OBJECT_OT_editmode_toggle are called by OBJECT_OT_mode_set.
I had to add some ugly RNA path finding code here, checking for all places these structs can possibly be reused. Can't think of a better way to go about this though with the path stored in the RNA type...?
It will still flip, but it now has a small buffer region before it does that which returns a really large positive or negative value. This still only happens in perspective cases, when moving along an axis that is nearly aligned with the view.
- revert tiff load/save to use standard libtiff (to ensure 100% colorimetry & alpha interpretation across platforms)
- include patch #18720 to fix load of libtiff dynlib (if present on system)
- added scene.bases (like scene.objects)
- renamed group create operator.
Example
scene = bpy.data.scenes[0]
C = {}
C["scene"] = scene
C["selected_editable_bases"] = [scene.bases[2], scene.bases[3]]
bpy.ops.group.create(C)
Also made operator fake modules not return __call__ (reported by Stani, fixes autocomp. bug)
1) "Even Divisions" - This option ignores the length of bones when considering how they should fit along the curve. This is useful for getting a smoother curve fit without having to worry about getting the bone lengths spot on. By default, this is disabled.
2) "Keep Max Length" - This option prevents the bone chain from extending past its natural length when the spline is stretched beyond that length. When the spline length is substatially shorter though, this bones get scaled to zero; making this option possibly useful for doing "growing tips".
This is essentially a 'no scale' option, although the behaviour when the curve is shorter is really a compromise since the curve cannot be accurately satisfied + left intact without some scaling being applied due to the way this works.
3) "Radius to Thickness" - The average radius of the spline between at the head+tail of each bone determines the x+z scaling of the bone.
note that you can still set rna properties like this.
bpy.data.__dict__["var"] = 1
print(bpy.data.var)
but this is only stored for the python objects lifetime and not actually attached to blenders data
* Fixed crash when reloading a file with Spline IK and/or Damped Track constraints. The targets for these constraints weren't getting relinked.
* Fixed problems with removing Spline IK making some bones unable to be manipulated.
* Jotted down some comments in the Spline IK code noting places where additional tweaks will be added.
For now, this just assumes that the 'lens' parameter was animated (assuming a perspective lens was used). Unfortunately, this may not always be correct, but at least there's a path now that can lead to further tweaking.
At last, this commit introduces the Spline IK Constraint to Blender. Spline IK is a constraint that makes n bones follow the shape of a specified curve.
Simply add a chain of bones, add a curve, add a Spline IK Constraint to the tip bone and set the number of bones in the chain to make it work. Or, try the following test file:
http://download.blender.org/ftp/incoming/250_splineik_spine01.blend
Screenshots of this in action (as proof):
http://download.blender.org/ftp/incoming/b250_splineik_001_before.pnghttp://download.blender.org/ftp/incoming/b250_splineik_001_after.png
I've implemented this in a similar way to how standard IK solvers are done. However, this code is currently not an IK plugin, since I imagine that it would be useful to be able to combine the 2 types of IK. This can be easily changed though :)
Finally, a few notes on what to expect still:
* Constraint blending currently doesn't affect this. Getting that to work correctly will take a bit more work still.
* Options for not affecting the root joint (to make it easier to attach the chain to a stump or whatever), and non-uniform scaling options have yet to be added. I've marked the places where they can be added though
* Control over the twisting of the chain still needs investigation.
Have fun!
Reordering some function calls in transform cleanup to make it simpler (that means other fixes are possible too, sequencer probably don't need it's own freeing function anymore).
# Before
[
bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= ""),
bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True),
bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True),
bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True),
bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
]
# After
path = StringProperty(attr="", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_modifiers = BoolProperty(attr="", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True)
use_normals = BoolProperty(attr="", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True)
use_uvs = BoolProperty(attr="", name="Export UVs", description="Exort the active UV layer", default= True)
use_colors = BoolProperty(attr="", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
Swap active sequence with the sequence on the right (CTRL+R) or left (CTRL+L).
was small Durian wish.
Note: in find_next_prev removed the code to find selected only if sel was != 0
I believe it should be possible to pass -1 in the case I want to find the next strip
regardless of selection state.
Received some additional feedback on the various screens
*Added Game Logic screen, with Logic editor, text editor, outliner and 3D view
*Added Properties screen, good for having direct access to loads of properties on a second monitor
*Tweaked UV Editing screen, removing timeline, and providing access to texture mapping and texture layers
*Tweaked Compositing screen, adding image editor and 3D view camera, and providing fast access to passes.
*Reordered some panels in the N-key area
*Added n-key properties area in the sequencer.
Limitations:
1) Parents and children of selected objects are excluded from the pool (siblings are ok) Making it work with that would required unparenting and reparenting after transform, that would turn nasty really quick.
2) Does not support Connected (this could be done through parent links, but see 3 first).
3) Parent relationships in affected objects aren't taken into account. When parent and children in the area of effect, remember that the children will also take the motion of the parents (with additive results). This could perhaps be fixed, but it could be nasty.
Other stuff:
New BASE_EDITABLE macro that checks if base is editable (like TESTBASELIB except it doesn't check for selection)
Add scene parameter to TESTBASELIB_BGMODE macro (using it from current scope is nasty)
- adding keyframes now works for bones and other data types (not just ID types)
# Add a pose bone keyframe
bpy.data.objects['Armature.001'].pose.pose_channels["Hip"].keyframe_insert("location")
# Add an object keyframe (worked before)
bpy.data.objects['Armature.001'].keyframe_insert("location")
This is effectively a C-port of Nathan Vegdahl's "No Twist" TrackTo PyConstraint, and has been added as a separate type of constraint to be consistent with the existing constraints (Locked Track, and Track To).
In general, this works considerably better than the existing "Track To" constraint, since it works by determining the smallest rotation necessary to get the current orientation of the owner to an orientation which would be tracking the target. It is also a much more straightforward approach than the weird old method the old Track To uses.
I've made a few tweaks to the code to deal with the (hopefully rare) cases where the target and the constrained are coincident. These don't appear to cause too much trouble in general.
TODO:
- Probably the naming of the constraints will change, to better convey their purposes. Naming suggestions welcome.
- undo stops all running jobs (operator redo was crashing with threaded render)
- adding new armatures was crashing if there was no valid view3d
- transform with an active hidden object would crash
- replace libtiff by calls to Cocoa services to load/save tiff files
(Libtiff, dynamically linked is not distributed with OS X, and would have had to be shipped for all four architectures)
The imb_cocoaLoadImage & imb_cocoaSaveImage are generic towards the bitmap format, and thus can handle TIFF, GIF, JPG, JP2000, BMP and raw camera formats (read-only for these), even if today only TIFF is used as the other formats are already handled.
- CMake updated
- scons updated (Thx to Jens Verwiebe)
The aim of this is to avoid having to set the selection each time before running an operator from python.
At the moment this is set as a python dictionary with string keys and rna values... eg.
C = {}
C["active_object"] = bpy.data.objects['SomeOb']
bpy.ops.object.game_property_new(C)
# ofcourse this works too..
bpy.ops.object.game_property_new({"active_object":ob})
# or...
C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)}
bpy.ops.object.location_apply(C)
Will use rotation gimbal axis when an object or bone set to Euler rotation mode is selected (global axis otherwise)
Use case: being able to do rotations that only affect one animation curve in the 3d view instead of just in the curve editor.
I'm committing this right now despite what follows because it's already useful as is.
Known bug: manipulator arrows can look slightly skewed (not really a big problem), but more importantly, rotation circles for the rotation manipulator are skewed and will not perfectly reflect the rotation axis (it will still use the correct one though). That will be fixed shortly.
To do: This orientation should act like Local, where each object/bone uses its own orientation and not just the one of the active object/bone.
Note: Saved files with custom orientations might end up with other orientations selected when being opened up. I don't think it's that useful to make a do_version for that, but I can if warranted.
I tried to make it integrate more with regular render but couldn't
do it well, it still needs a 3D view to take the settings from, and
can't run in a separate thread due to OpenGL.
However, it is now rendering to an offscreen buffer which then gets
displayed in the image window. This requires FBO's to be available, so
a fallback creating a new window is still needed. Currently available
from the Render menu in the top header.
-Continuous Grab is now on by default
-Opened scene panels by default
-Multiple new screens:
*Default (same as before)
*Animation
*Compositing
*Quad View
*Scripting
*UV Editing
*Video Editing
These have been inspired by other Open Movie artists, and their B.blends, including Nathan Vegdahl, Andy Goralczyk, and Bassam Kurdali. The new screens are designed to make optimal use of the new 2.5 UI, and expose newer areas like the compositor, new animation editors and console.
Boolean settings now use TOG instead of ICONTOG when they have icons, since ICONTOG was causing too much trouble with icons changing when they shouldn't be. Perhaps in future there should be some flag for specifying from RNA/UI-Layouts which one you want, but for now, this will do.
Reverting r23936 since that fix depended on ICONTOG behaviour.
* AutoKeying was broken after the fix to get automerge working again in 3D view. The 3D-View check was swallowing the processing before autokeying could be done. Separated these out again.
* The error print when some external data couldn't be found for objects was missing a newline.
* Extrude and Duplicate for Armatures now use proper macros instead of manually calling transform themselves. This means that repeating these operators now works properly.
** NOTE: there's a bug with macros now which prevents the 'forked' extrude operator working correctly. Bug report filed for this.
* Included the proper operators for extrude and duplicate in the toolbar + menus. The operators used there did not activate transform, which meant that users often could not tell that the operation had occurred at all.
This first part of the fix makes it possible to animate ramp settings by making sure that the paths for ramps and their elements can be determined. While the code for constructing the path to the ramps is relatively simple, the code for the elements is a bit more involved :/
However, this commit only fixes the paths, but most of the ramp settings still cannot be keyframed directly from the UI buttons/widgets (i.e. from Material/Texture buttons) since the buttons still use the old layouts.
* There's an unresolved error in transform_conversions.c which I've flagged in this commit. I'm not quite sure what the exact intentions of that code were (i.e. was the "void_pointer = 1" really intended)
- Generated and uploaded api docs - http://www.blender.org/documentation/250PythonDoc
- Added Edit docs menu item & operators as discussed with Mindrones, Brecht, Stani & Letterip @ bconf, needs some web backend. python operator can aparently use xml/rpc to upload docstrings.
- Added operator invoke function - context.manager.invoke_props_popup(self.__operator__, event)
this calls a popup for invoke by default (which intern calls execute())
- Own recent commit to game framing applied to non-camera views too.
- v3d->persp is deprecated but still used in some places.
- Transforming strips could overlap 1 frame if moving them below frame 0
- Transforming overlapping strips could go into an eternal loop (though overlapping strips should not exist)
The previous order is correct, the new order forced all global scale on local axis (in object mode).
The "problem" with scaling (or mirroring) in object mode along an axis that is not aligned along one of the local axis is that the result has to be decomposed (as best it can by TransMat3ToSize) into scaling factors along local axis. The more axis aligned the object is, the more "correct" it will look, with the worse being a scale along two local axis when the scaling axis is right between them.
One "solution" could be to make all Mirror transform in object mode work on local axis only (but I don't think that would be correct, since it still works correctly on aligned axis).
Coded a 'path' getter for Texture Slots. This was a bit more involved than for other paths, since texture slots used the names of the textures assigned, which would be troublesome when a texture got used twice or more.
I've made this a separate operator to Make Parent, since the two were signficantly different (this version only works for Objects, and doesn't care about other types of parenting).
* #19727: Noise modifier does nothing with size 1.0
When the 'Size' and 'Phase' parameters were both 1.0 exactly, and evaltime was an integer (as is the case when doing animation evaluation but not for Graph Editor drawing), the noise calculation function was bailing out. Now, the 'z' component supplied to this function is a decimal value (hardcoded to 0.1 after experimentation) to try and avoid this situation.
* Graph Editor 'Bake' operator was using wrong poll callback, making it useless when trying to use it on a F-Curve that only has modifiers on it (i.e. the main use case of the operator!)
Fixes for these were provided by the submitter, Clark Tucker (ctucker_toc). Thanks!
- #19724: Fix for problems with lasso select with 'occlude background geometry' turned off. Removed a duplicate call to ED_view3d_init_mats_rv3d().
(NOTE: I couldn't reproduce the error on my system, but the duplicate call does look rather fishy. Removing it doesn't seem to have any negative effects at least)
- #19725: Lasso select does not update 'selected vertex count' in 'INFO bar'. Added a notifier here to get the counter refreshed.
* Restored the Grease Pencil tools to the toolbar
Probably, if the reason they were commented out before was so that the repeat stuff is visible, we can swap the order of those two. Otherwise, it's good to have somewhere for the operators now (so that the hotkeys can be found)
* Hotkey displays in the tooltips now show the keymodifier too
For example, "D LeftMouse" or "Ctrl D LeftMouse" for the Grease Pencil operators, instead of just "LeftMouse" or "Ctrl LeftMouse".
* The python 'math' library is now included in the py-namespace used to evaluate button expressions. So it is now possible to do 'radians(somevalue)' to get a rotation value that Blender can understand...
* Shapekey path getting function now uses the appropriate wrapper for grabbing the pointer to the ID block for the ShapeKey
* Made the Graph Editor's minimum zoom size finer...
Active shape key can now be changed while in edit mode. This is based
on exit/enter editmode again in the background, which is not ideal,
as that loses the undo history. But that already happened anyway when
you did exit/change-active/enter manually.
Blended shape keys can now be displayed & edited in edit mode. This
is much like showing an armature modifier in edit mode, and shape keys
now are a applied as a virtual modifier (for mesh & lattice only, curve
doesn't fit in the stack well due to tilt).
The main thing missing still is being able to switch between the active
shape key in edit mode, that's more complicated.. but the weights of
other shapes can be edited while in edit mode.
One thing to be careful about is that this does automatic crazyspace
correction, which means that if you edit a shape key with a low value,
the actual vertices will be moved to correct for that and actually move
a (potentially much) longer distance.
Also includes some UI tweaks, mainly placing some buttons horizontally
since the vertical list was getting too long.
This means if you refer to a member of an object it will fail silently if there is no active object, but if you use an invalid attribute of the object it raises an error.
The method to check this is not nice but works well enough.
also removed pageup/down keys for changing the active shape since listviews can do this now.
Internal change to not apply the shape keys to the Mesh vertex coordinates,
but rather use it as part of the derivedmesh/displist evaluation. This only
has one practical advantage right now, which is that you can now make a
linked duplicate and pin it's shape key to a different shape than the first
object.
Further, this makes shape keys correctly fit into the modifier stack design,
which will help implement some other features later. Also it means the mesh
vertex coordinates are now really the orco's.
* Submenus displaying the options available for certain operators now will now show the hotkey for the operator on the menu entries.
* Added an option for mirroring keyframes in the Graph Editor which makes use of the new cursor
* RNA Path fixing when renaming data now checks if a path in question cannot be resolved before trying to fix it. This should reduce the number of misindentified cases I hope.
* Silenced compiler warnings for EdgeSlide stuff that mingw was making about unused variables.
* Transform code was not properly fixed to work with the new way that axis-angle data was stored
* The order of the args for the conversion function when switching rotation representations was wrong, causing problems when switching from quaternion to axis angle (i.e. these occurred for newly created bones).
Using standard 'save' now pops up a filebrowser when the file hasn't been saved before instead of just assuming that the file should be called "untitled.blend" and dumped in the last used directory.
* Mouse wheel now scrolls the list.
* Up/down key and alt mouse wheel change the active item.
* Adding/removing items from the list now automatically scrolls so the
active item is in the view.
* Shift mouse wheel changes the size of the list widget to display more
items. Lazy replacement for a proper grip.
* Shape key list now displays the influence value next to the name,
* Also fix the range of the value slider to match the defined min/max
range.
It is now possible to choose from 'Bounding Box' (default), '2D-Cursor', and 'Individual Centers' as the pivot point(s) that rotation/scaling is performed around.