Repository navigation
BL_ parameters: keep formulas, flag stale manual values - #29
Merged
Merged
Conversation
Re-baking a family removed every BL_ parameter that no longer arrived or had changed type. When one was used in another parameter's formula, RemoveParameter did not throw: Revit silently emptied that formula (checked live in Revit 2025). Such a parameter is now kept as it is, and a BL_ parameter with a formula of its own is no longer written over. The bake note says which ones were left alone, and the project types only get the values actually written in the family. IsDeterminedByFormula reads false on a parameter with a formula, so the formula text is checked instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A value set by hand from the selection is frozen: after a reshape, or on a Shift+D copy edited afterwards, it kept describing a shape that was gone, with nothing to say so. The object's dimensions are now recorded with each value; when they change the panel shows the value with a warning and the family bake message names the object. The value is still sent: setting it again or clearing it is the user's call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Blender 4.2 and 4.5 obj.dimensions is not updated in Edit Mode after a reshape, so a value measured there recorded the old dimensions and was flagged as soon as the user left Edit Mode (caught by CI). The recorded dimensions are now computed from the evaluated mesh, and nothing is flagged while in Edit Mode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes to the family dimension parameters (#28), before 0.3.0.
BL_ parameters used in formulas. Re-baking a family removed every
BL_parameter that no longer arrived or had changed type. Checked live in Revit 2025: when one is used in another parameter's formula,RemoveParameterdoes not throw, it silently empties that formula. Such a parameter is now kept, aBL_parameter with a formula of its own is not overwritten (Setwas accepted and ignored there;IsDeterminedByFormulareads false, so the formula text is checked), and the bake note says which ones were left alone. The project types only get the values written in the family.Values set by hand after a reshape. A value set from the selection is frozen; after a reshape, or on a Shift+D copy edited afterwards, it described a shape that was gone. The object's dimensions are recorded with each value: when they change the panel shows a warning and the family bake message names the object. The value is still sent.
Tests:
BakeParameter.IsUsedIn(xUnit),changed_since(pytest), new smoke_bake section (set in Edit Mode, copy, reshape, panel warning, clear). Apply's logic run live in Revit 2025 on a temporary family: formula kept, own formula untouched, stale unused parameter removed.🤖 Generated with Claude Code