PistonPusher v7.4.5

PistonPusher v6 is available:

Parts:

  • V6 comes with an asset browser library instead of the piston and parts system
  • Parts are now limited by limitations dictated by the asset browser, essentially this means (almost) no limitations. As both single objects and collections are supported. Even parent hierarchies can be restored. Hitting CTRL Z after appending an asset also restores that
  • PistonPusher v5 parts used constraints to parent objects, v6 parts and onwards don’t anymore. The blender parent/child relation system is used instead but you are free to use constraints anyway if you need them
  • Rods with secondary objects do not need constraints anymore as they too have been simplified
  • Origins, generally speaking don’t matter anymore. The only notable exception are mounts. Which still should have their origin at their pivot point. But this is truly a matter of best practice and saving yourself some time later on
  • Templates have been removed but you’ll find cylinder segments and tie rod mesh objects that’ll allow you to assemble them as needed
  • No name requirements anymore.

This does mean that the collection management system for pistons has also been removed. This system was of limited use and in a few cases made my job just that much harder. The snap modal also became less accessible (as pistons have to be appended first now) but I’m pretty confident that most people will prefer to model and rig them in place, completely avoiding the need for the snap modal in many if not the vast majority of cases.

Quick Rig system:

Quick rig pistons started off a simple alternative to the creation modes. Compared to stretchy creation mode pistons, these are a lot simpler. The stretchy creation mode rigs grew into spaghetti rigs and can introduce their own issues when one tries to use them in more advanced scenarios. The quick rig pistons don’t suffer from this and the gap in functionality has almost been closed completely as v6 introduces the option to make stretchy quick rig pistons.

These stretchy rigs are simpler at the expense of not being able to rotate individual piston ‘parts’ anymore. This is also an example of things that got problematic in advanced scenarios because the rig has to account for any physical implications set by your mounting situation. Rotating mounts definitely changes the physics of a system. (Read: The forces that move objects interact differently).

Version V6 focuses on the quick rig system as it is a much simpler system that just doesn’t get in the way. Combined with the parenting and snap and drag tool you’ll have everything you need to make the actuators that your projects need. They can also be saved as assets if you wish to re-use them later on.

UI:

The changes introduced by this version allowed me to simplify the menu quite a bit due to the absence of piston and parts previews. You’ll find any keymaps in add-on preferences too from now on.

Installation/Updating:

  1. Disable and remove pistonpusher v5 (restart blender if issues arise with next steps)
  2. Install pistonpusher v6 using blender’s add-on manager, optionally configure hotkeys, save preferences if needed
  3. Load another file, new or old or restart blender, this ensures the asset library is registered

If you made parts for pistonpusher or have a collection of user made pistons, you’ll find a useful script bundled with the add-on.

Recommended approach:

  • With add-on v5 still installed: Go to add-on prefs and copy path if needed.
  • Follow v6 installation instructions above.
  • open the importassets.blend file in the pistonpusher zip. Configure and run import_assets.py, instructions in comments. Save these file(s) somewhere.
  • Open file(s) that you saved earlier. Mark assets if you didn’t let the script do it. Save file(s) in library of choice.

The script found in the above mentioned file can import both pistons and parts. It can also rig the pistons for you and handle parts to a certain extent. More complex parts will need to be checked manually especially if these used empties to drive an object. It’ll work best with mounts and relatively simple connector parts in the case of parts. If it can’t rig a piston for some reason, it’ll tell you which one it is in console and skip it. User parts can be filtered, directories as well. Script might take some time to run, as in, 10 seconds to a minute, I suppose, if library is large.

Adding your own assets in v6 and onwards:

You’ll have two options:

  1. Make your own independent asset library: https://docs.blender.org/manual/en/latest/files/asset_libraries/introduction.html
  2. Set an external library path, pointing to the directory where you save all blender asset libraries.

If you choose option two, be sure to prefix your file names with ‘user’ or ‘user_’. If you don’t, you run the risk of losing files if they get overwritten with an update later.

From now on, assets can be pretty much anything. The only thing that matters is that mounts have their origin at their pivot point. For mounts made of multiple objects, the root object should have its origin at the pivot point.

Changelog:

  • Added snap and drag tool (toolbar)
    • A tool designed to help assembling things/adding object to (planned) piston instances during the modelling/blockout phase
    • Also has a view based ‘anchor’ snap mode
  • Piston planner tool:
    • Added to toolbar, like the snap and drag tool, starts with mousemove, exits to box select on finish/cancel
    • Improved snap modal support
    • PPI empties are rotated -90 degrees(local y axis) after they are created
  • Snap modal:
    • Now resets scale on exit/cancel
    • Removed support for v5 creation mode pistons
    • Added ability to change (scale) sensitivity (shift+scroll)
    • Only requires a single planned piston empty selected(If it can’t find the corresponding empty it’ll let you know)
    • Now expects custom properties in certain circumstances. See below (Still supports regular empties)
  • WAT modal:
    • A single lmb/rmb click will exit/confirm operator while ‘working on selection’ (only if alt was held while initiating)
    • enter and spacebar key can be used like the lmb key
  • Replace piston:
    • Only available if piston is constrained
  • Hose attachment points:
    • Spawn with (cap) fittings disabled, haps can be edited after a data transfer was set up
    • Only available if an object is selected and it is the active object
  • HAP: Set up HAP DT:
    • Fixed mesh row dots being inaccurate if the hap parent is scaled
  • Copy booleans tool overhaul:
    • Now works regardless of source and target orientation
    • Applying modifiers will be significantly faster but can often be avoided now
    • Ctrl empty has show in front enabled
    • Improved support for mirror modifiers
    • All nested/deeper child booleans are copied as well instead of just the first ‘layer’
    • Ability to skip booleans has been removed, this feature would be hard to utilise as indexes would become much more unpredictable
  • Linked duplicate radial array:
    • Rotate menu now shows even if not all array instances have children
    • Added support for normal parent-child relations
  • Create piston:
    • Can’t add mounts anymore due to removal of parts system
    • Fixed error due to blender api change introduced with blender 3.4
  • Added Quick rig: Set up stretch rig:
    • Stretchy rigs, but better. And much easier to set up
    • Works/available with any piston object selected technically but only the objects that should stretch should be selected
    • Supports only mesh objects for stretching, recommend using geometry nodes for anything pipes. Hoses typically aren’t relevant at this stage yet.
    • Origins still matter as only stretch objects are evaluated vertex by vertex
    • Works regardless of orientation
  • Added Quick rig: duplicate piston:
    • Should be used to duplicate a piston if you need multiple instances, updates custom properties
      • Available if a collection containing a piston armature is selected
    • Hold shift for linked duplicate
  • Added Quick rig: Remove rod:
    • Removes last added piston rod, usable with any object that’s part of a piston armature
    • Updates limit distance constraints using posebone custom properties added when the rod was set up first(only appplies if reverse extension order was used)
  • Quick rig: Rig piston:
    • Bone scale is set automatically only if bone scale = 0.0, adjusted values for a much more reasonable auto-size
    • Any children of the objects used to create a piston are automatically re-parented to the correct piston bone
  • Quick rig: Add rod:
    • rod bone added by operator is hidden
    • Operator is usable with any object that’s part of a pistonpusher armature instead of any armature
    • Added object selector for normal extension order, can be used to specify the leading rod so that its dimensions can be used
    • Added green dot that represents the relative location of the (cap end) end of the added or leading rod when extended(see docs for more info)
    • Evaluates pose bones instead of edit bones, fixing issues if bones were moved before adding a rod, which happens when extending/retracting a piston
    • Trailing distance UI is now offset based on leading distance
    • Leading and trail distance inputs now work as offsets, allowing negative values, with the actual values being based on the armature and/or rod dimensions (if available)
    • These changes make it so that you typically won’t have to change leading/trailing distance
  • Quick rig: Add cardan joint:
    • Removed, cardan/universal joints now come as part of the asset library, a few variations have been added as well
  • Quick rig: Combine cardan joint:
    • only available if a cardan/uni joint armature is actually selected
  • Quick rig selector:
    • Changed in which order and how some operators are polled(and then added to the list if polled true)
  • Tools that offered both a modal operator and an older variant now only offer a modal operator
  • Some modal operators relied on mouse event pass_through to select objects(or bones etc.) This is problematic if a user has configured blender to select objects with the right mouse button. From now on, these modal operators/tools call bpy.ops.viewd3.select() when needed instead
  • Parts and pistons are now bundled with the add-on as an asset library. This does allow for a slightly more streamlined installation process. Users won’t have to trigger asset updates if an external library is used
  • Parts and piston (collection) management systems have been removed in favor of the blender asset browser. As such, both parts and pistons are technically blender assets from now on
  • Removed Reset Hooks and Remove Constraints operators. Both unneeded as you won’t have to reset hooks and constraints can be removed with the set child of constraints tool
  • In most cases where operators/functions still relied on collections, this has been replaced with custom properties:
    • Piston armatures don’t need their own collection anymore
    • Snap modal only requires that a piston object and planned piston instance empty are selected, even if the planned piston empties aren’t in the same collection
    • Deleting objects that received such a custom property could be problematic, currently the only objects you really shouldn’t delete are: Piston armatures or their B empties and planned piston instance empties. This does not apply if you want to remove the planned piston instance or piston from the scene all together
  • ‘placeholder’ propertygroup renamed to ‘pp_props’
  • Added keymap to add-on preferences
  • Numerous UI changes
3 Likes

v6.0.1 is available!

  • New assets: 6 mounts, 6 connectors, 2 extra. Some have snap points

  • Fixed wat modal flip bug introduced with v6.0

  • Updated/improved modal info text system to fix a few little bugs

  • Added snap points system

  • Piston planner tool:

    • Setting 3d cursor now resets rotation mode of 3d cursor
    • While mode = obj, TAB can be pressed to toggle the snap points system ui on/off. You can then click on a snap point to use its location. if state = TVEC, you can also press 1,2,3 to use the x/y/z axis of it as a vector
    • Snap points can be marked, if two snap points are marked, it’ll behave similar to the get center function available in mesh mode. (rmb)
  • Snap and drag tool:

    • Fixed issue when finishing the operator while left mouse button was held and mouse moved.
    • While an object was selected and the left mouse button is still held, TAB can be pressed to toggle the snap points system ui on/off. On release it’ll use the closest/indicated snap point instead of another object

Snap Points:

The snap points system, as the name implies provides an object based snap point system. Object based as in it’ll let you store locations relative to an object. This means that when the object is moved, so are its snap points.

Snap points can be added using the snap points manager, by default bound to the mouse button 5. The manager automatically closes/shuts down on key release but you can prevent this by pressing the spacebar key once. While this behavior should work with any kind of keymap combination, I highly recommend mapping it to a single button. You can do stuff with snap points while the manager is active:

  • LMB: select(obj/mesh element etc, not snap point)
  • A: Add a snap point to the active object
  • D: Mirror closest snap point. + ctrl to mirror all snap points temporarily. Requires an active object and a mirror modifier, does account for mirror objects
  • R: Remove highlighted snap point. + ctrl to remove all snap points in scene
  • F: Only show snap points of the active object, if any. + ctrl to clear
  • Keyboard 1/2 will set the 3d cursor to/spawn an empty at the highlighted snap point

UI:

  • White circle will snap to the snap point ‘closest to mouse’
  • Isolated objects receive a yellow circle around their origin, if objects are isolated, only snap points belonging to those objects are shown
  • Operators can allow you to mark a snap point if a selection of multiple snap points is needed. Marked snap points receive an orange circle
  • Yellow dotted/striped line indicating the owner and distance to owner
  • Snap points of the active object, if any, appear thicker than those belonging to other objects

The manager will work in both object and edit mode!

Note:

  • The isolate list is preserved for the duration of the blender session

The snap point system was written in such a way that other operators, even those of other add-ons can easily access its information. The snap point manager modal operator has a function that can be called to expose the snap point manager class. In theory this means that anyone can access the system and its information in exactly the same way as I can. Including its UI.

Intended usage:
The snap point system can be used to manage arbitrary and temporary locations relative to objects and in many cases replace the empties you’d normally use. It tries to provide a system that’s both fluid and fast in use but still powerful and flexible.

limitations:
Applying transformations on an object that has snap points can result in misplaced snap points. In a similar manner, editing its mesh may invalidate a snap point as well.
Snap points created with the snap points manager mirror option can not be mirrored again

An updated free version is also available but it did not receive any new features. However, it does come with (5) different pistons.

3 Likes

(short) Rig break down of a suspension, expanding on the last video

3 Likes

Rig break down of a front suspension:

2 Likes

Demonstrating the quick rig collection mirror tool and some basics on car rigging:

Making floor constraints react to a mesh:

PistonPusher 6.0.2 is available!

  • Modal operator info area’s now show the operator name instead of ‘tool info:’
  • Snap points scale is now always (1.0, 1.0, 1.0) regardless of owner scale.
  • Added Quick rig: Simple Spring
    • Will spawn/append and rig a spring while offering some adjustable parameters.

version 6.0.3 is available:

  • Fixed issue preventing removal of mirrored snap points
  • Improved mirror math, mirror option now always considers the last mirror modifier in (owner) modifier stack
  • Mirrored snap points can now be mirrored further if needed, as you add mirror modifiers
  • Mirror modifiers can be excluded/ignored by disabling viewport visibility
  • Simple spring allows negative radius/height values

updated free version to 6.0.3 as well.

version 6.0.4 is available!

  • Further improved snap points mirror option math, fixing issues when used with mirror modifiers that do not use a mirror object
  • Mirror option now technically only mirrors location, preserving rotation of the mirror original
  • Added ability to toggle snap points display scale between 1.0 or 0.1, ` key
  • Added ability to center 3d cursor(center between current 3d cursor position and indicated snap point), 3 key
  • Added a steering knuckle asset (with a set of 2k textures, extra category)

version 6.0.5 is available!

  • Added support for multiple/nested collections/pistons for Quick rig: Duplicate piston.
  • Quick rig: Mirror collection now updates pistonpusher custom properties so that piston specific features still work on mirrored copies
  • HAPS: Removed duplicate mode(Not needed anymore, was used automatically if hap target had a parent relationship)
  • HAPS: Added ability to toggle between local/global space for the override face normal option, set to local by default
  • Added a wheel hub assembly, 2k textures, extra category

PistonPusher v7.0.0 is available!

  • Quick rig - Simple springs: Added ‘Rig’ button/checkbox to improve operator execution speed while setting spring values
  • Added ‘Arm as obj’ mode for the Set Bone parent tool, activated if you hold ALT. Causes armatures in your selection that are not the active object to be treated as objects instead of armatures
  • Added Quick Rig - Expose root: Operator that exposes root level bones as empties, can be used to make custom piston-like armatures look like pistonpusher armatures
  • Added Quick Rig - Edit Armature
3 Likes

PistonPusher v7.0.1 is available!

Quick rig - Edit armature:

  • Added ability to increase bone vector (lengths) for custom center points not between bone heads/tails (Hold ctrl+1 and drag mouse)
  • Added ability to set a resolution for bone 2 mesh and joint 2 mesh cylinders
  • Added ability to set radius of child objects, best used with primitives made with this tool or meshes aligned along their Y axes.(Hold 8 and drag mouse)
  • Added ability to update armature/restart operator(0 key)
  • Added ‘Undo all’, resets bones to their initial state/rest pose and removes newly added primitives(0 + ctrl)
  • You can now hold 1 and drag the mouse to set a custom center for a bone, a single press and immediate release will toggle smart adjust on/off
  • Red lines now indicate initial bone states instead of current states
  • Children set with child of constraints now properly adjust even if armature is transformed/rotated
  • Children set with child of constraints do not need to be positioned at a head or tail, instead, the operator decides what to do based on distance to head/tail
  • Primary axis renamed to ’ Align Y with: ‘Y’ ’ behavior was also changed. Read as ‘Align mesh Y with Bone X/Y/Z’, this setting only affects the joint 2 mesh feature

Note:

I found out that trying to undo after bone 2 mesh/joint 2 mesh was used can throw an error and/or crash blender, I couldn’t find the fix this particular case but if you exit the operator using ESC you can undo you can undo any steps made without such problems. So, don’t undo(ctrl+z) in the same session in which you add new primitives and you should mostly be good.

To further help you deal with this issue, the undo all feature deletes newly added primitives in a safer manner but this feature will not be usable in all cases, most notably in cases where the armature is already posed. Imo this is acceptable as these features are not needed anymore by the time a rig has been posed.

1 Like

trying to undo after bone 2 mesh/joint 2 mesh was used can throw an error and/or crash blender

Have you tried bpy.ops.ed.undo_push()? I had a situation like this before and that fixed it. But who knows, Blender has some weird crashes sometimes :upside_down_face:

1 Like

Edit:

I did try just using push and even calling bpy.ops.ed.undo but this resulted in errors/different behaviour in other areas sadly.

I might try it again later. Thank you though!

1 Like

PistonPusher v7.0.2 is available!:

Quick rig - Edit armature:

  • Fixed Smart adjust when vector size was set to greater than 1.0(Invisible offset)
  • Vector size is now always set to 2.0 but UI does not reflect this anymore, removing the need for the 1 + ctrl keymap
  • Red lines for changed bones are now green when smart adjust is enabled (it is by default), and only red if smart adjust is disabled

Assets:

  • Added new assets (2x rigged robotic arm, 1x robot arm base), extra category
  • Added another example file:
2 Likes

PistonPusher v7.0.3 is available!

Quick rig - Edit armature:

  • Vector size can be set to values larger than 2.0, manually in the n-panel, with an edit bone selected. values lower than 2.0 are clipped at 2.0 (b_vec_size)

HAPs:

  • Fixed local/global override setting(Would work in local space regardless of setting)

Set bone as parent tool:

  • Operator will automatically use arm as object mode if selection contains two or more armatures and additional objects
  • Fixed error that could appear when arm as object mode is expected but not actually used

Assets:

  • Added a work crane asset/example, extra category

How to rig a work crane video:

1 Like

Pistonpusher v.7.1.0 is available!

Parent wizard(NEW!):

  • Manage parent-child relations with an improved, color based interface
  • Replaces the set bone as parent and set child of constraint tool, inheriting features where this made sense
  • Added to the free version as well

Piston Planner:

  • Fixed operator performing ‘select’ twice for a single LMB press

Snap Modal:

  • Simplified and improved math

  • Fixed issue when used with scaled pistons

  • Reset behavior now maintains distance between armature and B empty(distance when operator was started)

  • Operator ensures B empty child of constraint inverse matrix is set to armature world space when a piston is reset

  • Now works with empties aligned on any axis instead of just the local Y axes, even if they are flipped relative to eachother

  • Removed bgl usage where possible (Current GPU API provides no method to enable anti-aliasing)

  • Fixed crane asset spring

2 Likes

PistonPusher v7.1.1 is available!

Parent wizard:

  • 2d indicators are now slightly thicker
  • Only meshes that actually have faces use the 3d hud
  • Reduced alpha of highlighted geometry/objects when in pose mode. 2d elements have their alpha values increased while in pose mode
  • Selection state is prioritised over relations, ie, if you select both a child and a parent, both will be yellow
  • Fixed ui sometimes representing bone children incorrectly
  • Improved mesh highlight drawing speed(25+ times when compared to the tool in v7.1.0)
  • Improved high poly drawing optimization: Objects with mesh data only use the 2d hud if the total amount of vertices found in your selection either directly or indirectly through relations, are more than 1m. Raised the per object limit to 50k vertices
  • Added ‘Unparent all children’, can be used to unparent all children of any selected objects/bones
1 Like

Rigging a mechanical manipulator with some pistonpusher pistons:

1 Like

PistonPusher v7.1.2 is available!

Parent wizard:

  • Fixed operator not removing child of constraint based relations
  • Add/remove indicators will blink on/off if the to be added or removed relation involves a child of constraint

Assets:

  • Added gauge asset, extra category


blinkybinky

2 Likes