docs/kitbash.md, install.md, setObjectParent's row: which writes a two-driver loop refuses; the rig generator will read held rows

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-03 15:57:10 +01:00
commit f91df3253e
3 changed files with 24 additions and 16 deletions

View file

@ -29,7 +29,7 @@
{"name": "targetObjectName", "type": "string", "required": true, "doc": "the object's name"},
{"name": "visible", "type": "boolean", "default": true}
]},
{"name": "setObjectParent", "doc": "Parent an object to another.", "changesScene": true, "editModeSafe": false, "fields": [
{"name": "setObjectParent", "doc": "Parent an object to another. Refused, with nothing changed, when an enabled add-on that defines brokkr_parent_refusal(object, parent) answers a reason, which is the message: brokkr_kitbash refuses a parent that would give a loop that follows a second driver, and any parent of a part such a loop hangs from while the loop already has one (both drivers are named; hold the joint, make it follow the driver, or clear the loop first). An object no loop hangs from is not refused.", "changesScene": true, "editModeSafe": false, "fields": [
{"name": "targetObjectName", "type": "string", "required": true, "doc": "the object's name"},
{"name": "parentObjectName", "type": "string", "doc": "empty or absent clears the parent"}
]},

View file

@ -184,7 +184,8 @@ Behaviour the table does not say, per action:
only to their own `objectType`.
- `setObjectParent`: an empty or absent `parentObjectName` clears the parent. Before it writes, each enabled
add-on that defines `brokkr_parent_refusal(object, parent)` is asked, and a reason it answers refuses the
intent with nothing changed (`brokkr_kitbash` answers its one-driver rule, `docs/kitbash.md`).
intent with nothing changed (`brokkr_kitbash` answers its one-driver rule over the loops the object is part
of or stands above, `docs/kitbash.md`; an object no loop hangs from is never refused by it).
- `importGltf`: `filepath`, `.gltf` or `.glb`, relative to the add-on preference
`Import Directory` (absolute paths, `..` and symlinks that resolve outside it are
refused). Empty `Import Directory` disables the action. Needs Blender's glTF add-on.

View file

@ -222,14 +222,16 @@ and the part closed on) moves with the driver: it is the driver, follows it, or
driver is the only input the two ends depend on: every revolute or prismatic joint between an end and the part the
two ends share (or the root, when they share none) is the driver, follows it, or is held by limits of one value. A
joint there that follows another driver, or that follows nothing and has travel, is a second driver: a pose of it
would open the loop, and nothing here solves a loop for two drivers. The rule is read over every loop in the scene
before each write, as the scene would stand after it (`one_driver`, asked by the one writer of connections, by
`set_params` before it rebuilds a mesh, by `detach` and by Brokkr's `setObjectParent`), so it holds after the loop
is stated as it does when `follow` states it. Each of these is refused with
would open the loop, and nothing here solves a loop for two drivers. The rule is read before each write, over
each loop the write touches, as the scene would stand after it (`one_driver`, asked by the one writer of
connections, by `set_params` before it rebuilds a mesh, by `detach` and by Brokkr's `setObjectParent`), so it holds
after the loop is stated as it does when `follow` states it. A write touches a loop when a part it writes is the
closing follower, the part closed on or the driver, or one of those hangs from it; no other write can change what
the loop's ends depend on, and no other loop is read. Each of these is refused with
nothing changed, naming the loop's driver and each other one: `attach` of an end's root on a pin or a slide,
`detach` of a part between an end and the part both ends hang from, `follow` with null on a follower between the
ends, `joint` widening or clearing limits that held a pin there, `setObjectParent` giving or clearing a parent
between the ends, and any pose or `set_params` once such a joint was written by hand. To change a mechanism between a loop's ends, give the new joint its one driver or its one value first, or
between the ends, and any write that touches the loop once such a joint was written by hand. To change a mechanism between a loop's ends, give the new joint its one driver or its one value first, or
clear the loop and state it again. A loop whose driver is detached is derived by nothing and is not read; the
attach that gives the driver a connection again reads it. A torque link is the case for limits of one value: a
real torque link exists to stop the rod rolling in its barrel, so its lug has no travel, and a strut pinned to
@ -259,10 +261,12 @@ limits first. One whose limits reach that far is refused by the bound above befo
What followers give up: a loop of three or more unknowns, or one out of a plane, is not solved (follow-up
`kit-follows-wider-loops`); a follower does not drive another; `set_params` never derives a follower again, so a
loop it opens reads `holds: false` until its driver is posed; and a scene that holds a loop
with a second driver (a limit widened by hand, a parent set in Blender's own interface, a saved file) is refused
every write of a connection, a `set_params` and a `setObjectParent`, related to the loop or not, until the joint
is held again, follows the driver, or the loop is cleared. A connection's row in a report carries `follows: {driver, kind, k, offset, holds, reason}`:
loop it opens reads `holds: false` until its driver is posed; and a loop
with a second driver (a limit widened by hand, a parent set in Blender's own interface, a saved file) refuses
every write that touches it (a write of a connection, a `set_params` or a `setObjectParent` of one of its parts
or of a part it hangs from, whether or not that write is the fault) until the joint is held again, follows the
driver, or the loop is cleared. A write that touches no such loop is made: a camera, an empty or a part of
another mechanism is posed and given a parent as before, and so is an object parented under a part of the loop. A connection's row in a report carries `follows: {driver, kind, k, offset, holds, reason}`:
`holds` is false, with a reason, when the value stands off the ratio, the loop's closure does not hold, or the
driver is gone or states no revolute or prismatic connection. Detaching a driver leaves its followers'
statements; detaching a loop follower clears its partner's. No Blender driver or constraint is made: a follower's
@ -300,10 +304,12 @@ null, so a report of a sub-tree carries the joint the sub-tree hangs by. `parent
the object the part hangs from: rigid connections fold into it and are counted in `rigid`. `axis` and `origin` are the parent socket's z and origin in the root object's
frame. `min` and `max` are the limits less the value, the travel either way from the pose the report was taken at,
which is the shape of Aetheria's `ShipJoint` (`Min` and `Max` about rest). `held` is true when the limits are of
one value: the joint has no travel (a torque link's lug held at `[90, 90]`), its `min` and `max` are 0, and a rig
makes a fixed bone for it and not a degree of freedom; a held row is in neither `unlimited` nor `rigid`. `driven` is null, or what the row follows
(`by` the driver's id, `kind`, `k`, `offset`): a driven row's value is derived, so a rig makes a driven bone for it
and not a degree of freedom. `unlimited` lists the ids of the rows this report carries that are not driven and
one value: the joint has no travel (a torque link's lug held at `[90, 90]`), its `min` and `max` are 0, and the
rig generator will make a fixed bone for it and not a degree of freedom (nothing reads joints rows yet:
`brokkr_rig` reads meshes); a held row is in neither `unlimited` nor `rigid`. `held` is computed from the limits
alone and is not the free `mechanism` label: a joint labelled `"held"` that has travel reads `held: false`. `driven` is null, or what the row follows
(`by` the driver's id, `kind`, `k`, `offset`): a driven row's value is derived, so the rig generator will make a
driven bone for it and not a degree of freedom. `unlimited` lists the ids of the rows this report carries that are not driven and
state no limits, so an exporter that needs limits on every degree of freedom refuses by reading one field of each
report. A tree whose rows a receipt cannot carry (about 60 rows, 33 with names of 62 characters) is read in pages:
`jointsOmitted` counts the rows left off, `next` is then the id of the last row carried, and a call with `after`
@ -428,7 +434,8 @@ that breaks one (a `pipe_r` that no longer matches the flange it is bolted to) i
connection.
**Drift.** `setObjectTransform` and `setObjectParent` are Brokkr's own rows and can move or re-parent an attached
child; `setObjectParent` refuses only a parent that would give a stated loop a second driver ("Followers").
child; `setObjectParent` refuses only a parent that would give a stated loop a second driver, or the parent of a
part a loop that already has one hangs from ("Followers").
Reports show it: a part's `connection` is `null`, or
```json