Page MenuHome

GPencil: Display only stroke lines when material is NULL
AbandonedPublic

Authored by Antonio Vazquez (antoniov) on Aug 28 2019, 5:48 PM.

Details

Summary

Related to T69210

When the material was removed from slot but the slot was not removed, the strokes were not displayed.

Now, when you remove the material, the stroke is displayed with a pink line. To return to normal stroke, just reassign the material or create a new one in the empty slot.

Example of one color missing:

Diff Detail

Repository
rB Blender
Branch
temp-gpencil-mat (branched from master)
Build Status
Buildable 4652
Build 4652: arc lint + arc unit

Event Timeline

In the proposed solution the line without material is not editable in Edit Mode, and also it disappear while drawing in Draw Mode.
Is this intentional or could be improved?

The lines are editable, but the edit points are not visible. While drawing, the lines are not visible because they are incompatible with the fast drawing.

I'm not sure we must work in these areas... if you have something in pink lines, you must fix it... not follow working with the damaged material. Make all functions and modules work with these pink lines would add more overhead to the drawing engine for something that it does not worth it.

The solution to create a material is also a bad solution because the user will remove a material and suddenly would appear a new one created automatically.

The lines are editable, but the edit points are not visible. While drawing, the lines are not visible because they are incompatible with the fast drawing.

I'm not sure we must work in these areas... if you have something in pink lines, you must fix it... not follow working with the damaged material. Make all functions and modules work with these pink lines would add more overhead to the drawing engine for something that it does not worth it.

The solution to create a material is also a bad solution because the user will remove a material and suddenly would appear a new one created automatically.

Ok, agree that for Draw Mode not worth the effort, but in Edit Mode maybe you want to select the line to assign a new material to it (not change the missing one). I would show the selection if it is possible

Antonio Vazquez (antoniov) edited the summary of this revision. (Show Details)
  • GPencil: Display selection color for strokes selected
Dalai Felinto (dfelinto) requested changes to this revision.Aug 28 2019, 10:47 PM

I really don't like this approach. Pink in Blender means missing texture, we should not add another meaning for that.
What is wrong with following Blender default behaviour for mesh objects (i.e., to have a default material used instead)?

This revision now requires changes to proceed.Aug 28 2019, 10:47 PM
Matias Mendiola (mendio) requested changes to this revision.Aug 28 2019, 10:53 PM

I really don't like this approach. Pink in Blender means missing texture, we should not add another meaning for that.
What is wrong with following Blender default behaviour for mesh objects (i.e., to have a default material used instead)?

You're right, Agree. The color used is not a problem here. We could use a light gray for example as meshes.

We could use the default gray color, this is not a problem, but use a default material is not so easy as meshes. use a default material requires review a lot of palces to be sure is using the right one if the material is not present, also, there are some code to autocreate materials when drawing and this need changes too.

I have been doing test and I don't fully agree with the exclusive use of Pink color for missign textures. Imho, the pink color must mean: "You have something missing"...somehow, to have a missing material in GPencil is the same that have a missing texture.

For example, using the default line color we get this.

And the same, using the Pink color...

This scene is not too complex, but it's clear you can see better the missing colors. In a complex scene is easy to miss the stroke with problems.

If we add a default material we face some problems:

  • There is a lot of code that need review/test to be sure we don't intro new bugs. In Gpencil we have lots of materials, pinned materials, default materials created when painting... it's not so simple.
  • The artist could not notice he has something missing.
  • We created automatically a new material and this is annoying.

Missing in my previous comment... the missing stroke is always put in front (as Edit lines). You can see the lines of the missing material are on top of any other part of the drawing.

For other object types, having no material assigned is not considered an error or missing data. I don't see a good reason for grease pencil to behave differently.

I don't understand why using a default material would be more complicated to implement than showing pink colors. The implementation would be in exactly the same places in the drawing code? It doesn't affect material assignment, just drawing.

ok, I'm going to test with default material.

I'm going to replace this solution using default grease pencil material.