GPv3: Implement expanding of Grease Pencil component in the spreadsheet #113507

Merged
Falk David merged 68 commits from filedescriptor/blender:gpv3-geometry-nodes-spreadsheet-layer-tree into main 2023-10-12 16:51:51 +02:00
Member

This patch adds the ability for users to expand the grease pencil component in the spreadsheet and see the values for each CurvesGeometry in each layer.

This patch adds the ability for users to expand the grease pencil component in the spreadsheet and see the values for each `CurvesGeometry` in each layer. <video src="/attachments/c225d786-61fe-4ab2-92b4-7e7feb16085b" title="Peek 2023-10-10 17-57.mp4" controls></video>
Falk David added 58 commits 2023-10-10 18:02:11 +02:00
Falk David added 1 commit 2023-10-10 18:07:46 +02:00
Falk David force-pushed gpv3-geometry-nodes-spreadsheet-layer-tree from 313a0a06ee to 3f4c0cfcc9 2023-10-10 18:34:54 +02:00 Compare
Falk David requested review from Jacques Lucke 2023-10-11 15:24:05 +02:00
Falk David changed title from WIP: GPv3: Implement expanding of Grease Pencil component in the spreadsheet to GPv3: Implement expanding of Grease Pencil component in the spreadsheet 2023-10-11 15:24:12 +02:00
Falk David requested review from Hans Goudey 2023-10-11 15:24:33 +02:00
Jacques Lucke requested changes 2023-10-11 15:42:22 +02:00
@ -424,0 +453,4 @@
}
if (const bke::greasepencil::Drawing *drawing =
bke::greasepencil::get_eval_grease_pencil_layer_drawing(*grease_pencil,
component_index_))
Member

This results in an assert if the index is out of range.

This results in an assert if the index is out of range.
filedescriptor marked this conversation as resolved
@ -1986,2 +1986,4 @@
/* eSpaceSpreadsheet_ObjectEvalState. */
uint8_t object_eval_state;
/* Active index for list of components in another component. */
uint32_t active_component_index;
Member

Think we should just call this by what it is: active grease pencil layer index.
Use int instad of uint32_t.

Think we should just call this by what it is: active grease pencil layer index. Use `int` instad of `uint32_t`.
filedescriptor marked this conversation as resolved
Hans Goudey reviewed 2023-10-12 09:35:02 +02:00
@ -503,8 +542,8 @@ bke::GeometrySet spreadsheet_get_display_geometry_set(const SpaceSpreadsheet *ss
if (object_orig->mode == OB_MODE_EDIT) {
if (const BMEditMesh *em = mesh->edit_mesh) {
Mesh *new_mesh = (Mesh *)BKE_id_new_nomain(ID_ME, nullptr);
/* This is a potentially heavy operation to do on every redraw. The best solution here is
Member

Could revert this whitespace change

Could revert this whitespace change
filedescriptor marked this conversation as resolved
Falk David added 1 commit 2023-10-12 13:42:10 +02:00
Falk David added 1 commit 2023-10-12 13:50:53 +02:00
Author
Member

Updated screenshot:
image

Updated screenshot: ![image](/attachments/79f34dbe-d5be-4f35-acf4-d4d778817adc)
Hans Goudey reviewed 2023-10-12 13:55:39 +02:00
@ -43,6 +43,7 @@ class GeometryDataSource : public DataSource {
const bke::GeometrySet geometry_set_;
const bke::GeometryComponent *component_;
eAttrDomain domain_;
const int component_index_;
Member

I know we're not consistent about this ("geometry_set_" above), but better not to use const for value types inside a class. That means it can't be moved, for example. Also, I'd like to see "component_index" renamed to "layer_index" everywhere, since it's not the index of the component

I know we're not consistent about this ("geometry_set_" above), but better not to use const for value types inside a class. That means it can't be moved, for example. Also, I'd like to see "component_index" renamed to "layer_index" everywhere, since it's not the index of the component
filedescriptor marked this conversation as resolved
Falk David added 2 commits 2023-10-12 14:22:42 +02:00
Falk David added 1 commit 2023-10-12 14:24:30 +02:00
Falk David added 1 commit 2023-10-12 14:30:13 +02:00
Hans Goudey approved these changes 2023-10-12 14:33:25 +02:00
Falk David requested review from Jacques Lucke 2023-10-12 14:38:40 +02:00
Falk David added 1 commit 2023-10-12 15:35:02 +02:00
Author
Member

After talking with Pablo about the UI we decided it would be best to allow all components to be collapsible. There are some UI tweaks that we need to make like moving the icons a little.
image

After talking with Pablo about the UI we decided it would be best to allow all components to be collapsible. There are some UI tweaks that we need to make like moving the icons a little. ![image](/attachments/21555865-f71a-4d53-a36f-d4b7a0335648)
100 KiB
Jacques Lucke approved these changes 2023-10-12 16:07:59 +02:00
@ -38,6 +41,15 @@ class GeometryDataSetTreeViewItem : public ui::AbstractTreeViewItem {
StringRef label,
BIFIconID icon);
GeometryDataSetTreeViewItem(bke::GeometryComponent::Type component_type,
int component_index,
Member

There are still many places that use component_index instead of layer_index.

There are still many places that use `component_index` instead of `layer_index`.
filedescriptor marked this conversation as resolved
Falk David added 1 commit 2023-10-12 16:32:35 +02:00
Falk David merged commit faa24698a5 into main 2023-10-12 16:51:51 +02:00
Falk David deleted branch gpv3-geometry-nodes-spreadsheet-layer-tree 2023-10-12 16:51:53 +02:00
Sign in to join this conversation.
No reviewers
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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113507
No description provided.