Page MenuHome

PLY import with vertex color if alpha isn't set
ClosedPublic

Authored by Robert Guetzkow (rjg) on Apr 4 2019, 10:14 PM.

Diff Detail

Event Timeline

Jacques Lucke (JacquesLucke) requested changes to this revision.Apr 5 2019, 2:17 PM

Generally seems to work. I'd just like to see code that is a little bit more specific here, does that make sense?

io_mesh_ply/import_ply.py
279

trailing whitespace (you can configure your editor so that trailing whitespace is removed automatically when you save)

280

I think it would be better to make sure that mesh_colors always contains rgba data.
So there should be a case distinction here.
Then the change further down should not be necessary anymore.

Also, the readability of this nested list comprehension is fairly low imo. Better be more explicit about what is happening here (by "unrolling" the loop a bit).

This revision now requires changes to proceed.Apr 5 2019, 2:17 PM

Sure, no problem. It'll be less DRY, but I guess that's ok.

  • Less list comprehension
Robert Guetzkow (rjg) marked 2 inline comments as done.Apr 5 2019, 4:26 PM
  • Removed redundant check
io_mesh_ply/import_ply.py
259

do vertices have to have colors?
Of no, then this prints a warning even when the file just does not contain vertex colors.
You probably know the file format better than me.

Removed the print. Should there be a message if fewer color channels than RGB are present?

Robert Guetzkow (rjg) marked an inline comment as done.Apr 5 2019, 4:58 PM
Robert Guetzkow (rjg) added inline comments.
io_mesh_ply/import_ply.py
259

You're right, I was bit too quick on this one.

Robert Guetzkow (rjg) marked an inline comment as done.Apr 5 2019, 4:58 PM

Removed the print. Should there be a message if fewer color channels than RGB are present?

Hm, yes. Something like Warning: One obligatory color channel is missing, ignoring vertex colors.

  • Warning when vertex color is ignored because a color channel is there, but not all of the required R, G and B are present
This revision is now accepted and ready to land.Apr 5 2019, 6:12 PM
This revision was automatically updated to reflect the committed changes.

Oh no. I just noticed, that I made a mistake in the reset of colindices. Sorry.

Oh no. I just noticed, that I made a mistake in the reset of colindices. Sorry.

just create another patch.
Btw, can you use arcanist to upload the patches?

Where is the mistake?

Patch is D4655. Haven't use arcanist before, will look into it for future patches.