Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

feat(builder): should be able to set a custom textures path#44

Merged
codecat merged 3 commits into
codecat:masterfrom
Levrault:feat/custom_texture_path
Nov 22, 2022
Merged

feat(builder): should be able to set a custom textures path#44
codecat merged 3 commits into
codecat:masterfrom
Levrault:feat/custom_texture_path

Conversation

@Levrault

Copy link
Copy Markdown
Contributor

Proposal

Hi,

I never use tbloader or TrenchBroom before this morning and I barely coded in c++ in the last 12 years.

But this seems like exactly what I needed for my projects. The only con (after 1h of use) was the static res::textures/ folder path. So I made a quick edit to setup a custom textures path.

This should also close the following issue #41.

Trenchboom config

image
image

Workflow

2022-11-22.14-27-39.mp4

@codecat

codecat commented Nov 22, 2022

Copy link
Copy Markdown
Owner

Thanks for the PR! I think you should be using m_loader->m_texture_path instead of passing the path to all the relevant functions in the Builder class. (texture_path, material_path, material_from_name)

Otherwise this looks good!

@Levrault

Copy link
Copy Markdown
Contributor Author

Thanks! I was too shy to edit the static function 😅
Should be good now

Comment thread src/builder.cpp Outdated
@codecat

codecat commented Nov 22, 2022

Copy link
Copy Markdown
Owner

I didn't realize they were static actually 😅 changing them to not be static is the right call though. 👍

@Levrault Levrault requested a review from codecat November 22, 2022 20:45
@codecat codecat merged commit 80c50d1 into codecat:master Nov 22, 2022
@codecat

codecat commented Nov 22, 2022

Copy link
Copy Markdown
Owner

Thank you! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants