Add direct text object tool#83
Conversation
|
Warning Review limit reached
More reviews will be available in 42 minutes and 55 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds ChangesText Object Tool Integration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@desktop/assets/vipermesh-addon.py`:
- Around line 1423-1429: The font_path handling should resolve Blender-relative
paths and avoid duplicate font datablocks: call bpy.path.abspath(font_path) to
get a real filesystem path before using os.path.exists (replace the existing
os.path.exists(font_path) check), then pass that resolved path into
bpy.data.fonts.load(..., check_existing=True) so existing fonts are reused;
update uses of loaded_font to reference the returned font from the resolved-path
load.
In `@lib/orchestration/tool-registry.ts`:
- Around line 186-193: The parameter description for the tool object with name
"add_text_object" currently lists align_y as TOP|CENTER|BOTTOM but is missing
Blender 5.0's TOP_BASELINE and BOTTOM_BASELINE; update the parameters string in
the same tool object (the object literal where name === "add_text_object" in
tool-registry.ts) to include TOP_BASELINE|BOTTOM_BASELINE in the align_y enum
(e.g. align_y?: TOP|CENTER|BOTTOM|TOP_BASELINE|BOTTOM_BASELINE), leaving align_x
as-is.
In `@public/downloads/vipermesh-addon.py`:
- Around line 1422-1459: Currently the code eagerly mutates Blender state
(loading font via bpy.data.fonts.load into loaded_font, creating/linking
target_collection with bpy.data.collections.new and
bpy.context.scene.collection.children.link, and removing existing when existing
and replace_existing) before the new text object is fully created/converted;
instead, validate inputs first, then create the new text object under a
temporary name/unlinked state (use your text_add/convert flow but keep it
isolated), apply font/material/transform to that temp object, and only after all
steps succeed swap it into target_collection and remove the original existing
object (existing/remove) if replace_existing; on any failure, undo any created
datablocks (unload or remove loaded_font if newly loaded), delete the temp
object and delete any newly-created collection to leave the scene unchanged.
Ensure references to loaded_font, target_collection, material_name/mat,
existing, text_add and convert are used to locate and implement the
transactional create-then-swap flow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 779c91c7-4f6a-4e76-b40c-beeb7902d288
📒 Files selected for processing (11)
app/api/test-pipeline/route.tsdata/tool-guides/scene-composition-guide.mddesktop/assets/vipermesh-addon.pydocs/blender-mcp-capability-inventory.mdlib/ai/agents.tslib/orchestration/prompts/blender-agent-system.mdlib/orchestration/tool-filter.tslib/orchestration/tool-registry.tspublic/downloads/vipermesh-addon.pyscripts/test/test-blender-text-object-tool.tsscripts/test/test-tool-guide-trigger-coverage.ts
Summary
add_text_objectto the ViperMesh Blender addon and public download addon for bounded text/signage/title creation.Validation
python -m py_compile desktop/assets/vipermesh-addon.py public/downloads/vipermesh-addon.pynpx tsx scripts/test/test-blender-text-object-tool.tsnpx tsx scripts/test/test-direct-tool-surface-coverage.tsnpx tsx scripts/test/test-tool-guide-trigger-coverage.tsnpx tsc --noEmit --incremental falsenpm run lint(existing baseline-browser-mapping freshness warning only)Summary by CodeRabbit