GPv3: Show All Materials #115001

Merged
Falk David merged 4 commits from antoniov/blender:GPv3_old_mat_operators into main 2023-11-17 10:32:47 +01:00

New Show All Materials operator.

Also include a refresh of despgraph when hide prop changes.

NOTE: The actual render engine doe snot support Hide by materials.

Related to #114997

New Show All Materials operator. Also include a refresh of despgraph when hide prop changes. NOTE: The actual render engine doe snot support Hide by materials. Related to #114997
Antonio Vazquez added 2 commits 2023-11-16 16:52:34 +01:00
Antonio Vazquez changed title from GPv3_old_mat_operators to GPv3: Show All Materials 2023-11-16 16:52:49 +01:00
Antonio Vazquez added this to the Grease Pencil project 2023-11-16 16:52:56 +01:00
Antonio Vazquez requested review from Matias Mendiola 2023-11-16 16:53:03 +01:00
Antonio Vazquez requested review from Falk David 2023-11-16 16:53:09 +01:00
Antonio Vazquez requested review from Hans Goudey 2023-11-16 16:53:16 +01:00
Author
Member

@filedescriptor I have seen that Hide material prop does nothing in GPv3. I have added the update but this does not work because it looks not implemented yet (if you change the frame, nothing is hidden).

@filedescriptor I have seen that `Hide` material prop does nothing in GPv3. I have added the update but this does not work because it looks not implemented yet (if you change the frame, nothing is hidden).
Falk David requested changes 2023-11-16 17:16:43 +01:00
Falk David left a comment
Member

Some comments

Some comments
@ -0,0 +49,4 @@
}
bool changed = false;
for (int i : IndexRange(*totcol)) {
Member

You need to make sure to iterate over the material slots on the object and object-data. So I think BKE_object_material_len_p doesn't work. But you can just use obejct->totcol I believe.
So:

for (const int i : IndexRange(object->totcol)) {
You need to make sure to iterate over the material slots on the object and object-data. So I think `BKE_object_material_len_p` doesn't work. But you can just use `obejct->totcol` I believe. So: ``` for (const int i : IndexRange(object->totcol)) { ```
Author
Member

It was something I was thinking... changed!

It was something I was thinking... changed!
antoniov marked this conversation as resolved
@ -0,0 +50,4 @@
bool changed = false;
for (int i : IndexRange(*totcol)) {
Material *ma = BKE_gpencil_material(object, i + 1);
Member

if (Material *ma = BKE_gpencil_material(object, i + 1)) {

`if (Material *ma = BKE_gpencil_material(object, i + 1)) {`
antoniov marked this conversation as resolved
@ -0,0 +69,4 @@
static void GREASE_PENCIL_OT_material_reveal(wmOperatorType *ot)
{
Member

Remove blank line here.

Remove blank line here.
antoniov marked this conversation as resolved
Member

@antoniov Yes, the render engine doesn't consider the hide flag.

@antoniov Yes, the render engine doesn't consider the `hide` flag.
Antonio Vazquez added 1 commit 2023-11-16 17:40:45 +01:00
Hans Goudey requested changes 2023-11-16 18:23:09 +01:00
@ -0,0 +6,4 @@
* \ingroup edgreasepencil
*/
#include "BLI_array_utils.hh"
Member

Most of these includes look unnecessary

Most of these includes look unnecessary
antoniov marked this conversation as resolved
Antonio Vazquez added 1 commit 2023-11-16 18:41:27 +01:00
Hans Goudey approved these changes 2023-11-16 18:46:52 +01:00
Falk David merged commit 39f30e848c into main 2023-11-17 10:32:47 +01:00
Sign in to join this conversation.
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#115001
No description provided.