GPv3: Outliner support #111105
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#111105
Loading…
Reference in New Issue
No description provided.
Delete Branch "filedescriptor/blender:gpv3-outliner-support"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR adds support for displaying the content of the GPv3 object in the outliner.
05e95fad66
tofe6f8e81ce
@blender-bot build
@ -0,0 +22,4 @@
{
BLI_assert(legacy_te.store_elem->type == TSE_GREASE_PENCIL_NODE);
legacy_te.name = node.name;
legacy_te.directdata = &node;
Let's avoid usages of
directdata
. All necessary data can be stored directly withinTreeElementGreasePencilNode
. Code that needs access to it can usetree_element_cast()
to get this from theTreeElement
, and then use accessors to type-safely get the data.@ -0,0 +37,4 @@
&legacy_te_,
TSE_GREASE_PENCIL_NODE,
0,
child->wrap().is_group());
I don't see a reason to use the
expand
option here. It exists because sometimes we just want to display some objects or collections, without expanding their entire hierarchy. It's mostly a performance workaround. Here there just isn't anything to expand, so theexpand()
function won't add elements anyway.I tried setting this to
false
but then I cannot expand groups with a single child. They show up as if they had no child at all.You don't need to set it at all, it has a default parameter value of
true
.Ah that explains it, ok.
@ -117,6 +117,7 @@ typedef enum eTreeStoreElemType {
TSE_LIBRARY_OVERRIDE = 45,
TSE_LIBRARY_OVERRIDE_OPERATION = 46,
TSE_GENERIC_LABEL = 47, /* No ID */
TSE_GREASE_PENCIL_NODE = 48, /* No ID */
The comment says this is not an ID, but
TreeStoreElem.id
actually points to a valid ID. Checking above, it seems like the ID is needed, so the comment can be removed. Otherwise (if it wouldn't actually point to an ID),TSE_IS_REAL_ID()
would have to be updated.@JulianEisel Seems like the windows bot is failing, but I don't understand why.
I'm also wondering about the current use of the folder icon. I think it fits well but the yellowish color in the outliner doesn't make much sense. It should be light grey like the collections. We also plan to add color tags to them.
@pablovazquez what do you think?
Noted the likely fix inline.
@ -0,0 +11,4 @@
#include "tree_element.hh"
namespace blender::bke::greasepencil {
struct TreeNode;
Should be
class
, otherwise MSVC won't build.@ -133,6 +134,7 @@ typedef enum eTreeStoreElemType {
TSE_RNA_ARRAY_ELEM, \
TSE_ID_BASE, \
TSE_GP_LAYER, \
TSE_GREASE_PENCIL_NODE, \
Nope, this is still pointing to an ID, so this shouldn't be included here :) (Note the negation:
#define TSE_IS_REAL_ID(_tse) (!ELEM(...))
)I actually don't think we should use the folder icon like that. A folder is a metaphor used for file hierarchies on disk, we are not dealing with files here. Does this need an icon even? Or we just use the regular layer icon, I still wonder if we should even expose layers and layer groups as separate concepts to the user. As far as they are concerned a layer may simply support nesting.
The difference is that a layer group cannot be drawn on, they don't store any stroke or animation data. They are simply a way to organize layers together.
So, to me, it wouldn't make sense to have them use the same icon as layers.
@blender-bot build
IIRC, wasn't planned to support coloring groups, so i anticipate that it will be reflected in the outliner ?
@hamza-el-barmaki That's what I said here, yes.
@ -0,0 +40,4 @@
&legacy_te_,
TSE_GREASE_PENCIL_NODE,
0,
child->wrap().is_group());
This should still be unnecessary.
ee40b144c9
to006f44859c
@JulianEisel Also let me know if the changes I've made to deal with showing the number of layers in a layer group or in the object-data (using
MergedIconRow
) are fine. The code is a bit messy there so I'm not too sure of this.I wouldn't bother much with it, this code needs refactoring anyway. The recent changes/refactors in the Outliner code should help quite a bit.
Accepting, but I still have objections against the folder icon. Maybe commit without this for now?
@JulianEisel For the folder icon: https://devtalk.blender.org/t/ui-discussion-grease-pencil-layer-and-layer-group-icons/30693
Would it be okay to commit as is and wait for the devtalk thread to resolve the questions about the icons? Then create another PR that fixes the icons properly?
Problem is that such temporary icons often end up in a release and being not so temporary anymore. I would rather remove it entirely for now.
@JulianEisel I would have to do that in the properties panel and dopesheet as well then. I agree that this should not end up in a release, but since GPv3 is experimental, that is unlikely to happen. It's only really there for testing purposes.
But I can create a PR removing it from everywhere if this is really needed.
Okay, given that this icon is used in other places already I'm fine with keeping it.