Skip to content

Develop#114

Merged
vnoves merged 14 commits intomasterfrom
develop
Jul 10, 2025
Merged

Develop#114
vnoves merged 14 commits intomasterfrom
develop

Conversation

@vnoves
Copy link
Member

@vnoves vnoves commented Jul 10, 2025

Summary by CodeRabbit

  • New Features

    • Added support for tint and fade properties in materials, enabling enhanced color and transparency effects in exports.
    • Improved texture handling for materials, including tint blending and more robust extraction of texture properties.
  • Bug Fixes

    • Improved reliability and accuracy of UV coordinate assignment for textured exports.
  • Refactor

    • Streamlined and modularized material and texture property management for better maintainability.
    • Unified configuration management, moving settings to a user-specific location for improved stability.
    • Simplified and consolidated installer logic and file deployment paths to use user-specific directories instead of system-wide locations.
  • Chores

    • Updated build and deployment scripts to reflect new file structures and installation paths.
    • Removed obsolete configuration and UV mapping files to reduce maintenance overhead.

@coderabbitai
Copy link

coderabbitai bot commented Jul 10, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update refactors texture and material handling in the glTF exporter, centralizes configuration management, and migrates installer and workflow processes from system-wide to user-specific directories. It removes legacy UV mapping code, introduces a new MaterialTextures class, and adjusts project files and build scripts accordingly. Configuration and secrets handling now use SettingsConfig.cs.

Changes

File(s) / Path(s) Change Summary
.github/workflows/*.yml Updated workflow steps to replace version and API key in SettingsConfig.cs instead of App.config; removed previous steps and references to App.config.
Common_glTF_Exporter/App.config Deleted XML configuration file; settings moved to SettingsConfig.cs.
Common_glTF_Exporter/Common_glTF_Exporter.projitems Added MaterialTextures.cs; removed UV-related files and App.config from project items.
Common_glTF_Exporter/Core/GLTFMaterial.cs Added TintColour property to GLTFMaterial.
Common_glTF_Exporter/Core/GlTFExportContext.cs Refactored material and UV handling; removed UVs namespace usage; updated calls to new material export logic.
Common_glTF_Exporter/Materials/AssetProperties.cs Replaced string constants with Autodesk constants; added GetTint and GetFade methods.
Common_glTF_Exporter/Materials/BitmapsUtils.cs Modified BlendImageWithColor to support tint color blending.
Common_glTF_Exporter/Materials/MaterialProperties.cs Moved color factor setting to new SetMaterialColour method.
Common_glTF_Exporter/Materials/MaterialTextures.cs Introduced new static class for setting material textures and related properties.
Common_glTF_Exporter/Materials/RevitMaterials.cs Refactored Export method; centralized texture logic via MaterialTextures.SetMaterialTextures.
Common_glTF_Exporter/UVs/CylindricalUv.cs, PlanarUv.cs, VertexUvs.cs Deleted UV calculation and mapping classes.
Common_glTF_Exporter/Utils/GLTFBinaryDataUtils.cs Updated image export to use material tint color.
Common_glTF_Exporter/Utils/SettingsConfig.cs Refactored for unified, thread-safe config management in user directory; removed legacy code.
GltfInstaller/Program.cs Changed install path to user AppData; refactored file overwritability checks into helper method.
Revit_glTF_Exporter_20XX/Revit_glTF_Exporter_20XX.csproj (all years) Updated post-build scripts to use user-specific AppData path; removed config, images, and x64 DLLs from copy steps.

Sequence Diagram(s)

sequenceDiagram
    participant Exporter
    participant SettingsConfig
    participant MaterialTextures
    participant BitmapsUtils

    Exporter->>SettingsConfig: GetValue("ApiKey") / SetValue(...)
    Exporter->>MaterialTextures: SetMaterialTextures(material, gltfMaterial, doc, opacity)
    MaterialTextures->>AssetPropertiesUtils: GetTexturePath(asset)
    MaterialTextures->>AssetPropertiesUtils: GetTint(asset)
    MaterialTextures->>AssetPropertiesUtils: GetFade(asset)
    MaterialTextures->>gltfMaterial: Set texture, tint, fade properties
    Exporter->>BitmapsUtils: BlendImageWithColor(image, fade, flatColor, format, tintColor)
Loading

Possibly related PRs

  • #112: Changes installer logic and directory from system-wide to user-specific, directly related to similar changes in this PR.
  • #111: Updates workflow steps and SettingsConfig.cs for version/API key handling, matching this PR's config management refactor.
  • #113: Refactors texture and UV handling, adds MaterialTextures.cs, and removes legacy UV code, directly overlapping with this PR.

Poem

In a burrow of code, a rabbit did find
Old configs and UVs, now left behind.
With textures and tints, new colors unfurled,
Settings hop safely in a user’s world.
From App.config’s warren to AppData’s den—
Our exporter leaps forward, again and again!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db8b9d8 and c4d346a.

📒 Files selected for processing (24)
  • .github/workflows/dev_actions.yml (1 hunks)
  • .github/workflows/dev_pull_request.yml (1 hunks)
  • .github/workflows/production_actions.yml (1 hunks)
  • Common_glTF_Exporter/App.config (0 hunks)
  • Common_glTF_Exporter/Common_glTF_Exporter.projitems (1 hunks)
  • Common_glTF_Exporter/Core/GLTFMaterial.cs (1 hunks)
  • Common_glTF_Exporter/Core/GlTFExportContext.cs (3 hunks)
  • Common_glTF_Exporter/Materials/AssetProperties.cs (6 hunks)
  • Common_glTF_Exporter/Materials/BitmapsUtils.cs (1 hunks)
  • Common_glTF_Exporter/Materials/MaterialProperties.cs (1 hunks)
  • Common_glTF_Exporter/Materials/MaterialTextures.cs (1 hunks)
  • Common_glTF_Exporter/Materials/RevitMaterials.cs (2 hunks)
  • Common_glTF_Exporter/UVs/CylindricalUv.cs (0 hunks)
  • Common_glTF_Exporter/UVs/PlanarUv.cs (0 hunks)
  • Common_glTF_Exporter/UVs/VertexUvs.cs (0 hunks)
  • Common_glTF_Exporter/Utils/GLTFBinaryDataUtils.cs (1 hunks)
  • Common_glTF_Exporter/Utils/SettingsConfig.cs (1 hunks)
  • GltfInstaller/Program.cs (4 hunks)
  • Revit_glTF_Exporter_2019/Revit_glTF_Exporter_2019.csproj (1 hunks)
  • Revit_glTF_Exporter_2020/Revit_glTF_Exporter_2020.csproj (1 hunks)
  • Revit_glTF_Exporter_2021/Revit_glTF_Exporter_2021.csproj (1 hunks)
  • Revit_glTF_Exporter_2022/Revit_glTF_Exporter_2022.csproj (1 hunks)
  • Revit_glTF_Exporter_2023/Revit_glTF_Exporter_2023.csproj (1 hunks)
  • Revit_glTF_Exporter_2024/Revit_glTF_Exporter_2024.csproj (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@vnoves vnoves merged commit 7f0d111 into master Jul 10, 2025
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant