Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
| Context not available. | |||||
| } | } | ||||
| if (use_ob->type == OB_MESH) { | if (use_ob->type == OB_MESH) { | ||||
| use_mesh = use_ob->data; | use_mesh = BKE_object_get_evaluated_mesh(use_ob); | ||||
| } | } | ||||
| else { | else { | ||||
| /* If DEG_ITER_OBJECT_FLAG_DUPLI is set, the curve objects are going to have a mesh | /* If DEG_ITER_OBJECT_FLAG_DUPLI is set, the curve objects are going to have a mesh | ||||
| Context not available. | |||||
| if ((match_output || (gpdg = BKE_object_defgroup_name_index(gpencil_object, vgname)) >= 0)) { | if ((match_output || (gpdg = BKE_object_defgroup_name_index(gpencil_object, vgname)) >= 0)) { | ||||
| if (eval_ob && eval_ob->type == OB_MESH) { | if (eval_ob && eval_ob->type == OB_MESH) { | ||||
| int dindex = 0; | int dindex = 0; | ||||
| Mesh *me = (Mesh *)eval_ob->data; | /* TODO(Yiming): Does `eval_ob->data` remain the same from when the object is loaded? | ||||
| * Since this generate function could be called after some evaluations of other | |||||
| * modifiers, I'm not sure what that's gonna do to the depsgraph. If vertex weight | |||||
| * transfer behaves correctly under GPU subdiv, then the code is correct (period). */ | |||||
| Mesh *me = (Mesh *)BKE_object_get_evaluated_mesh(eval_ob); | |||||
kevindietrich: The Mesh that will be returned will be the result from evaluating the subdivision on the CPU… | |||||
NicksBestAuthorUnsubmitted Done Inline ActionsThanks for the explaination :D so far It's indeed working correctly. NicksBest: Thanks for the explaination :D so far It's indeed working correctly. | |||||
| if (me->dvert) { | if (me->dvert) { | ||||
| LISTBASE_FOREACH (bDeformGroup *, db, &me->vertex_group_names) { | LISTBASE_FOREACH (bDeformGroup *, db, &me->vertex_group_names) { | ||||
| if ((!source_vgname) || strstr(db->name, source_vgname) == db->name) { | if ((!source_vgname) || strstr(db->name, source_vgname) == db->name) { | ||||
| Context not available. | |||||
The Mesh that will be returned will be the result from evaluating the subdivision on the CPU not the GPU, so there should also not be any problems regarding vertex weight.