Page MenuHome

Assets/IDs: Don't generate previews for object types with no real geometry
ClosedPublic

Authored by Julian Eisel (Severin) on Feb 5 2021, 6:34 PM.

Details

Summary

Object types like empties, cameras or lamps will just end up as empty preview
images. We can think about ways to visualize them still, but meanwhile, don't
create such an empty preview.

Diff Detail

Repository
rB Blender
Branch
temp-object-data-preview-check (branched from master)
Build Status
Buildable 12668
Build 12668: arc lint + arc unit

Event Timeline

Julian Eisel (Severin) requested review of this revision.Feb 5 2021, 6:34 PM
Julian Eisel (Severin) created this revision.

Arc ignored the base branch I passed, hopefully this works now

Hrm, maybe if I pass the actual commit hash?

Julian Eisel (Severin) updated this revision to Diff 33638.EditedFeb 5 2021, 6:50 PM
  • Maybe after merging in the base branch (which I branched this one off...)

Edit: Finally that did the trick. Makes little sense but well, that's arc...
Sorry for the noise.

This revision is now accepted and ready to land.Feb 9 2021, 11:38 AM

This patch has an approved status yet it was not committed yet. So I'm assuming the other reviewers are blocking. Updating the reviewers list to reflect that. This way the patch show as pending still.

This revision now requires review to proceed.Mar 26 2021, 5:15 PM
source/blender/makesdna/DNA_object_types.h
473

What is the difference between "geometry" and "real geometry"?

source/blender/makesdna/DNA_object_types.h
473

We could just call it OB_TYPE_HAS_GEOMETRY or OB_TYPE_SUPPORTS_GEOMETRY or OB_TYPE_IS_GEOMETRY or ... :)

Maybe I'm being pedantic calling it "real" geometry, but thing is that even empties or cameras and such have some geometry for drawing (stored in a GPU batch). But that is of course not what we refer to here.

source/blender/makesdna/DNA_object_types.h
473

even empties or cameras and such have some geometry for drawing (stored in a GPU batch).

Indeed, I wouldn't refer to that as the object "having geometry". When you throw these two kinds of geometry onto one pile, you also get confusion about what "renderable geometry" means -- does a mesh with hidden faces have "renderable geometry"? Or a mesh object without any vertices?

I think that OB_TYPE_IS_GEOMETRY is the clearest. Some object types are geometry types, others are not, and IMO that should be unambiguous.

Sybren A. Stüvel (sybren) requested changes to this revision.Oct 25 2021, 11:39 AM

On second thought, maybe it's better to make this "enable/disable preview" switch more explicit, and not just let it be related to having geometry or not. The current previews for worlds can work quite well:

I'd be more happy with those than with previewless ones.

Also Actions don't have geometry, but we do have preview rendering code in place to generate those previews.

This revision now requires changes to proceed.Oct 25 2021, 11:39 AM

On second thought, maybe it's better to make this "enable/disable preview" switch more explicit, and not just let it be related to having geometry or not. The current previews for worlds can work quite well:

I'd be more happy with those than with previewless ones.

Also Actions don't have geometry, but we do have preview rendering code in place to generate those previews.

This patch is only for Object assets, so that objects with non-geometry object-data (cameras, empty, etc.) do not get a preview rendered. So this patch doesn't affect worlds or actions.

Sybren A. Stüvel (sybren) accepted this revision.EditedOct 25 2021, 11:52 AM

:facepalm:

LGTM with the change to the macro and the avoidance of "real" geometry ;-)

This revision is now accepted and ready to land.Oct 25 2021, 11:52 AM