[API CHANGE SUGGESION] Make `TextureOpt::missingcolor` a `cspan`

オープン
#4,483 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp

調査の方向性

TextureOpt の宣言と、missingcolor、conservative_filter、firstchannel、subimage、subimagename の API エントリポイントから始めます。破壊的な cspan の動作と命名範囲を定義する前に、既存の呼び出し元とテストを確認します。完了には、合意された API 設計と対応するカバレッジが必要です。

索引モデルが issue の本文から書いたものです。

説明

I heard most pointers + length would be replaced with spans of some sort going forward.

In that spirit I would like to suggest a (breaking) change to TextureOpt. The title kinda sums it up already. 😁

The change would be that the length of the missingcolor does not have to match nchannels any more.
It would simply be using the last channel value as fill if the cspan is shorter than nchannels or ignore channels at the end, if it is longer.

On that note: the OIIO API has quite afew naming inconistencies with its use of underscores. For example, the set prefix in some some methods is sometimes postfixed with an underscore and sometimes not.

In TextureOpt itself the obvious example is conservative_filter (uses an underscore) vs missingcolor, firstchannel, subimage, subimagename, etc. (don't).
It should be conservative_filter, missing_color, first_channel, sub_image, sub_image_name, etc.
Or neither should have an underscore.

While this is more changes than just removing the underscore from conservative_filter: as a non-native speaker I very much prefer the underscore version.
One of the reasons people struggle with German is that we string arbitray number of nouns together to create new ones. 😁
When you read these it is very difficult for non-native speakers to understand where one noun ends and the next one starts. So if you think this is a silly request, ask someone in your circle of friends who know German as a second language how they feel about that. They can probably reason about it better than I. 😉

TLDR; if the missingcolor as cspan change happens that may be an opportunity to clean up naming in this struct too.

In the Rust version I btw. also postfixed any s & t settings, i.e. s_blur etc.

主要言語
C++
スター
2.4k
フォーク
727
平均マージ
4日 8時間
マージ済み PR(30日)
67

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

AcademySoftwareFoundation/OpenImageIO のほかの issue

AcademySoftwareFoundation/OpenImageIO の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。