Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-09-10 21:04:38 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-09-10 21:12:42 +0300
commit256b59b76f0a1650815b7a6cb69a6c4987ad5258 (patch)
treee9cb31490a1e89c05b472934d471b84c5b01c8c1 /source/blender/editors/object/object_add.c
parent07d7028dd0d47d54d21c54ae5eaf872e60e1bc4b (diff)
Fix T80191: GPencil - Improve Mesh conversion
There were some problems when converted several objects at the same time, especially with the material conversion. The problems were more visible when bake an animation with several objects at the same time. * Now the layer name include the object name. * Reorganize how the materials are generated including object name. * Fix color not converted to sRGB. * Avoid triangles when generate the stroke. This fix a draw manager issue and also add more geometry to use later. * Code cleanup.
Diffstat (limited to 'source/blender/editors/object/object_add.c')
-rw-r--r--source/blender/editors/object/object_add.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 482ae4019c3..4de48fba494 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2596,20 +2596,18 @@ static int object_convert_exec(bContext *C, wmOperator *op)
bGPdata *gpd = (bGPdata *)ob_gpencil->data;
gpd->draw_mode = GP_DRAWMODE_3D;
- BKE_gpencil_convert_mesh(bmain,
- depsgraph,
- scene,
- ob_gpencil,
- ob,
- angle,
- thickness,
- offset,
- matrix,
- 0,
- use_seams,
- use_faces,
- false);
- gpencilConverted = true;
+ gpencilConverted |= BKE_gpencil_convert_mesh(bmain,
+ depsgraph,
+ scene,
+ ob_gpencil,
+ ob,
+ angle,
+ thickness,
+ offset,
+ matrix,
+ 0,
+ use_seams,
+ use_faces);
/* Remove unused materials. */
int actcol = ob_gpencil->actcol;