Krayne's Tools: Free addon for Blender!

I only just noticed now that the lates version breaks the center along axis function in kxAlign

I’ve patched that and uploaded to GR as Krayne’s Tools 2.0.6

It looks like on my end I broke the whole addon in 2.0.6, so I removed et and replaced it with 2.0.7 with the import errors fixed!

Tip: you don’t have to use empties and hooks.

1 Like

Oh. Ohhhhhhhhhhhhhhhhhh. facepalm Ill fix that right away!
Thanks for that. I’m glad I don’t have to have to add a new collection full of empties to the scene!

1 Like

Gumroad has been updated with 2.0.8!

KT 2.1 is out and up now on GR!

Changelog:
-Fixed kxAlignment
-Fixed import errors
-Made bones from curve more efficient
-Fixed a bug in kxNameSet
-Added Simple Retarget to kRetarget and made retarget bone constraints actually work
-Fixed tooltips for KTP props, then remembered tooltips dont work there
-Changed the retarget dropdown menu to a dropdown box with buttons
-Fixed ktIndicate attribute error
-Made Zero key values apply to all selected objects and skip non-keyed objects

2 Likes

KT 2.1.5 is out and up on GR to download!

Here’s what’s changed:
Fixed kxAlignment
Fixed import errors
Fixed a bug in kxNameSet

Added Simple Retarget to kRetarget and made retarget bone constraints actually work

Changed the retarget dropdown menu to a dropdown box subpanel with buttons as opposed to a pulldown list

Fixed ApplywKeys’s doubling shapes and undo bug

kBoneFromCurve: Changed it back to the empty method and make it parent new armature to original curve parent, also made it put the new objuects in same collection as curve

kBoneFromCurve: Added control props to empty sizes and target bone length and props for locking start and end bones

kBoneFromCurve: various other small fixes

added Undo to text tools

added delete and apply mods/constraints by name buttons to ktConModTog.py - This is so you can delete or apply a specific mod/con across all objects instead of one at a time or all at once.
added hold Alt to apply to all objects functionality to ktConModTog (bones dont work)

Fixed missing icon on Remove Duplicate Mats button

Made the retarget dropdown smaller

Added SquareVerts to kxAlignment - This takes any set of verts, and arranges them in a perfect square along a best fit plane. Good for squaring circles!

Added props to kQuickCurveMod for adjustment in UI, made it so the added curve goes in object’s collection

added object driver and extra reporting removal to kDelInvDriv

Fixed bug with ktClearAllMats where clear mats would also clear slots. Also changed button name for remove slots for more clarity

More changes to kxindicate:

Moved indicators to bottom center, added indicator for “Locations Only”,

added indi panel to customize

made text color selectable and added a shadow in case of white bg

added “Report Active Edge Length” to the panel, because I like to be able to compare edge lengths and since it requires switching to object mode to get that data, I couldn’t make it its own indicator or it would be changing modes with every move of the mouse

changed the label on the values from Circle to Circles and rearranged the panel

sort of managed to get it to display on startup but not always

Moved collate panel logic into kCollate from older version of init

Fixed property for delete SK and delete VG not working. Had merged the two into one mod but didn’t update the preferences props

Cleaned up init a bit

Added kxCurveSimp.py:
This adds a new choice in the add curve menu: Simple line. I don’t know about you, but I found it annoying how blenders default “line” curve has to be at an angle. Its first point is at 0 which is fine but its seconf point is at (2, 2, 2)
by default, which for me is the opposite of useful. I either have to manually flatten it in the viewport or set the vector to (2, 0, 0) using the “Adjust previous operation” panel. Yes, all subsequent curve lines I add are straight and (2, 0, 0) but if I close the file or open a new one, it resets to 222. I don’t want to have to go through all that every single time I want a basic line of a nice, round unit length. This object only two settings when created: Length and Axis(+/-)

added kMoveToCol.py:
This allows you to, in viewport, move/link selected object(s) to active object’s collection. When my projects get big and there are a lot of parts and sub-parts and I add or paste an object without setting my collection first, it usually ends up in the scene collection and then I have to click on the active object, move mouse into outliner, press f2 (to quickly expand collection object is in) then escape to cancel the rename. Then I have to scroll down to the bottom of the list, find my new objects and drag and drop. I could do all of this by pressing M in viewport but then it takes even longer for me to find the correct collection and put in that collection without making a mistake somewhere. So this mod skips all of that and sends all selected objects straight into Active’s collection.
Added at the top of the Object context menu (right click in 3d viewport in object mode)

Added kDrivCorr
This is highly specific and was made to work with kBonesFromCurves.
When I make a cable using it, the IK usually moves the bones in the wrong way or in a way that intersects with something. This mod is set up so that you can move the target around somewhere, select source and target channels, then it will automatically put a driver on the rotation of that bone that goes from zero to the corrected rotation based on the transforms of a target object. This way the bending of bones from IK get corrected as the target or something else moves. I might modify it to also take other inputs, but only if the need comes up, so, unlikely.
This one has its own panel “Drivers”

Added kDelHalf
This is a simple one-click way to cut a mesh in half along one of the chosen axes.
A lot of the time when I’m modeling a symmetrical object, I’ll also be sculpting it and if you try to smooth the middle of a mirrored mesh, it ends up making it sharper because it isn’t considering the mirrored verts to be connected.
So I frequently need to go back and forth between a mirrored mesh that I’m editing parts of directly and a fully applied and symmetrical mesh that I can sculpt and smooth across the middle, then back again after I do some more direct editing that doesn’t auto-mirror (like subdividing, joining, knifing adding or deleting geometry, etc.)
This is especially helpful if what I’m editing is a UVsphere, where it becomes tedious to select those pole verts that are really close to but not on the plane of symmetry.

KT 2.2.0 out!
Lots of fixes and additions in this one:

Simplified and fixed Delete Invalid Drivers:
-It didn’t catch all invalid drivers before

Added error handling to kRetarget.py

Added hold alt to select half in kDelHalf.py
-Now, in my mesh Delete Half tool, you can hold down alt to merely select and not delete half the verts. This is helpful for when I’ve made, say, a side-specific “handed” shape key and while sculpting I forgot to turn off mirrored mode, or my sculpting action spills over to the other side. Now I can alt click to select the half that shouldn’t be morphed and I can quickly blend from shape: Basis to reset just the one half.

Fixed applyw/Keys so original values and min/max are preserved

Added more controls to QuickCurveMod
-To allow for controlling the length and tilt of the generated curve

Added ktSelMatUse
-Simple tool for finding other objects that also use the active material in the materials pane. This function is in the Material specials context menu

Updated kDelInvDrv to now work on bones

Fixed kCleanArm so that it ALWAYS deletes the in-scene shapes,
-Was having issues earlier with shape names that already had extensions not getting deleted. Also, if the bone shapes didn’t already exist (say, pasting your armature into a blank file) it will automatically move the bone shape objects to a new collection “bshapes” and hide the collection.

Fixed kCleanArm so that it does not also delete the rigged mesh

Added kCopyBS (copy bone shapes)
-This tool works like the Copy Bone Shape from the built in “Copy Attributes Menu” addon, except this is done at the object level and copies ALL bone shapes from one armature to the other, matching the bone names.

Added kxLinkLimits
-Another tool to help me with DAZ models, this tool takes the limits in bone constraints and copies them to the IK limits, because (at least, at the time) the DAZ exporter didn’t set the IK limits to match the constraint limits.
Also useful if you had manually set up limits for all the bones on your armature but didn’t set the IK limits to match, which when done manually is tedious AF
Found in the Pose 3dview context menu (right click)

Added kmAddAOV
-This is a materials mod that adds an AOV node to all mats on selected objects and links the AOV node to the nearest RGB or Color output.
Useful for separating pure color from your render as a separate pass (make sure you have Shader AOV set up in View Layers

Deleted accidental “a” line in kxAlignment

Fixed kxIndicate
-Doubled the size of the indicators (for my new 4k display) and possibly fixed it not being shown at start

Fixed kCleanArm:
-Now works even if the bone shapes have no extension
-Adds a collection for the bone shapes if they are the only ones in scene
-Excludes the collection instead of hiding from viewport
-Fixed a nested collection error

Added ktRenameLists
-This tool allows you to batch rename Vgroups and Skeys and more since blender doesn’t appear to have a default way to do that. Found in the specials menu for each respective list.

Changed the max/min values for ktDelKeysVGs
-because 100 was too small

Finally got copy key drivers to work!! added kCopySKDrivers
-Although for some reason it still won’t properly copy driver variables with an idtype of anything other than object. These are copied, but you do manually have to change the ID type for each one

Fixed kMaskSel
-Made it work on the first click instead of the second
-Expanded functionality to now Boolean the selection onto the mask (Add, Subtract, Intersect and Exclude)
-This also works in reverse, going from mask to selection!
-These extra options are found in the “Adjust last operation” popup in the bottom left of 3d view

Fixed kApplywKeys:
-Now it also copies key drivers

Fixed kQuickCurveMod:
-Fixed an issue with it erroneously checking “use path animation”:
-Fixed the rotation functionality to work on preexisting curves
-Added option to not move to origin

Fixed kRetarget:
-Fixed issue where it wouldn’t work if modifier didn’t start with a target

Updated kCollate to work better:
-Made it work for shapekeys too
-Improved L/R Identification
-Preserved active item
-Added it to the specials menus for vgroups and skeys

Updated kxDupeShapeKey:
-Made it so it also duplicates and switches handedness of driver and driver vars, but uses same logic as CopySKDrivers so it might not get the ID type right if its set to Key or something else

Changed kCopySKDrivers:
-Extracted the main driver copying process into a dedicated function so I could put it in other modules

1 Like

2.4.0 is now out!
I did several bug fixes and added some functionality to previous mods. For a full breakdown look at !changelog240.txt in the zip file.

Tool Preferences changed:

I realize that this addon is getting bigger and bigger, so I added a checkbox to turn all on or turn all off, as well as a special Essentials Only button which only turns on the ones shown above. A lot of these tools are super niche and I rarely use them, so to keep clutter down only these ones that I use the most or feel are the most important/useful.

If I add more modules, I’ll probably either rearrange them into groups (mesh, view, object, armature, etc) based on what they are used on, or I’ll just put them all into a big list with checkboxes, like the main addon list in preferences.
They are currently sorted by where they appear in the UI: K designates items that appear in the tool panel, KT designates items that appear in properties panels or other locations, and KX designates ones that are found strictly in context or specials menus.
And no, they don’t all strictly follow this categorization.

New modules added:

Added ktDelProps

This is just a simple mod that adds a button to delete all custom properties on an object, just in case you have a ton of props that need deleting and you don’t want to do it one by one

Added kxApplyColl

This is a mod to apply all mods and shape key mixes and convert to mesh to all objects within a collection, then joins them together into one mesh object, all with a single click!
Found by right-clicking any collection in the outliner then clicking “Apply Collection” at the bottom

Added kDrivCorr

This mod adds a new tab to the N-panel to quickly create corrective shape key drivers for rigged models that need a little custom sculpting to make them look good when posed. For when weight painting is not enough.

Just select your mesh, armature bone and axis, enter the angle range you want then click “create” and this mod will handle all of the driver, Fcurve and variable setup for you! The Direction options control weather it goes from high to low, low to high or angle to angle. The curved arrow flips this, and the lock keeps you on your current user mode/selection (with lock off, it automatically selects the mesh and scrolls to the new shape key)

Added kBoolFast

Yes I know there are already loads of addons for making fast Booleans, but I thought I’d throw one in anyways. This one is even faster! With just one click it takes all selected objects and uses them as carvers for the active object! There are also options in the “Adjust last operation” popup (F9) to merge the selected objects into one object or to add a Boolean modifier for each selected object!
You can also choose between solvers in the f9 popup!

Removed kxMoveKeys

Deprecated because blender 5.0’s shape key list can now be multi-selected and dragged and dropped. Same with Delete N Shape keys

Updated kxLinkLimit

Now has the option to directly link the bone IK limits to bone constraints through drivers (as opposed to just copying them) so you can control and change these limits from the bone constraint on the fly. Also added an option to remove these drivers.
Also add a function to take IK limits on each selected bone and modify existing bone constraints to match (if no limit rotation constraint is found, it creates one.)

Updated kxAlignment

Changed name to kxAlignVerts
-Added an option to align (snap) verts to grids, but only along one axis. This is if you want only one component of the vert’s coords to be on the grid. I find this useful for when Im looking top down at a mesh and I want the verts to stay on the X or Y grid but they might have fine Z coords that I want to keep off the grid, for example.
-Added a Flatten along Axis option, because the “Align” option forced all selected verts onto a single line. Flatten does exactly what it says: Flattens them to a single axis plane. This simplifies having to select a pivot point take selected verts, press S, then press X Y or Z, then type 0 to get them all flattened
-Added options to the F9 popup: Now you can chose your snap-to point (Active element, median point, bounding box center, 3d cursor) after the fact so you dont need to change the pivot point you are working with. Also added a dropdown for action type and selection buttons for axis so you change what it does after running the operation!
-Made it also work with curves, points and handles! With the option to only move the handles, only move the points while keeping handle points the same relative to the point, and both!

Added kxSelectInf

Sometimes I want to select a whole column or row of verts that might be very close to other verts I don’t want to select, but there’s a bunch of them. I have to zoom in really close to make sure I don’t select the wrong ones, but this pushes the rest of them WAY out of view in the viewport (For example, I have a human model I want to mirror and I want to make sure all of the central verts are lined up, but there are some verts that get really close together, typically at the crotch, the nose, mouth, and top of head.) I want to select them but alt-clicking them doesn’t catch all of them (Due to there being a pole on the center verts or the mesh not having quads at some point along it.)
This mod gives you a tool that lets you click and drag a line and that creates an area that extends infinitely above and below it, at any angle!

Hold shift to constrain it to 45º angles
Hold Alt to center the selection on initial point clicked
Hold Ctrl to de-select verts

Also in the F9 popup I added a dropdown to select the selection mode like a Boolean selection (Add, Subtract, Invert, Exclude)

added kxFindRef

To find where the pointers are to the objects that get copied over when you copy/paste something. Also can remove these pointers.
I get a little annoyed when you copy an object that has parents or driver targets or bone shapes or something else, and when you paste it, it also pastes all these objects with it!
While I did make kCleanArm to deal with bone shapes and kCopyEx to try to prevent the parents from getting copied over, I ran into an issue where I had a geo nodes object with a big node tree with a lot of object info nodes, and when I imported it as an asset it kept also importing a placeholder object with it. I couldn’t for the life of me find it, so I wrote this script to take the active object’s name (or you can enter a name if no active object selected) and searches through the whole blend file for any references, pointers or dependencies to that object and prints a detailed report of their location and type in the console!
This is great for finding ghost dependencies or the odd unused node with a pointer to something that you don’t use anymore or don’t want!
This is different from kxFindUsers in that it works from the 3d viewport as opposed to the outliner, and it finds pointers to objects only (As opposed to users of any data type in kxFindUsers)

Fixed kCleanArm

There were some issues with it not working quite right, see !changelog for details

Updated kApplywKeys

The original way this was able to apply mods while keeping shape keys and skey drivers intact was it would duplicate the object, select (activate) the shape key, solo the active key, then it would apply the key and all active mods, then use “Join as shapes” to the original object. It would do this for every single shape key on the object, and this could get real slow real fast for big meshes with lots of verts and lots and lots of shape keys (Such as a human model like Daz’s Genesis models which have corrective morphs for a ton of limb positions as well as a ton of body shape morphs.)
This method is slow, but it works for mods like Subdivision Surface modifier which don’t have the option to “save as shape key.”
But I found another method that should work with most other modifiers… For each modifier: First, it saves the modifier as a shape key. Then it selects the base key, does a “Blend From Shape” operation, blending the new shape key into the base. Then it deletes that key. Doing it this way should propagate across all other shape keys, so if your modifier is, say a displace modifiers to make it slightly bigger, then when you apply it this way all your other keys should also be slightly bigger along with it.

In my testing I found this method to be roughly twice as fast as the old method. Not great, but enough to make a big difference for large/key rich meshes.

So now you get an option to chose Slow or Fast when you apply w/ keys.

Added kWorldPivot
This mod adds an option to use the world origin as pivot point. I’m kind of surprised that this isn’t already a thing. Like, in order to to that you need to center the cursor then select 3d cursor as pivot point then do your scale or rotate.

A lot of the time I want to use world origin as pivot/scale point but I dont want to move my 3d cursor, so this mod adds an item to the pivot point pie menu when you press “.”

To be clear, this doesn’t effect blender’s default pie menu. I couldn’t find any way to add an item to that menu or to the Pivot Transform Point pulldown menu in the viewport. At least in Python, blender has no way of letting you inject items into those menus.
So the is a WORKAROUND: This mod creates a custom pie menu in the 3d viewport then binds it to the default “.” key:

So if you have rebound your . key to something else, or you use a different key to bring up the pivot pie menu, you will have to do some rebinding.
Choosing “World Origin” actually sets the pivot point to 3d cursor, and when you do a scale or a rotate transform, it moves the 3d cursor to center (0, 0, 0) then does the transform around that. And when you finish or cancel rotating or scaling, it sends the 3d cursor back to where it was before.
This all feels like a kludgey set of workarounds but hey, its what we got!
There was no way to add this to the Pivot Transform Point pulldown menu in the viewport.

That’s it for now! I will also in the future upload any tweaks I make to the Gumroad link. Happy blending!

2 Likes

2.4.1:
Single update bug fix to “Cleanup Bone Shapes” (kCleanArm)
Fixed a new bug that accidentally delete/moved the armature’s children and associated mesh.