Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
| Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | #define INIT_GP_TYPE(typeName) \ | ||||
| INIT_GP_TYPE(Multiply); | INIT_GP_TYPE(Multiply); | ||||
| INIT_GP_TYPE(Texture); | INIT_GP_TYPE(Texture); | ||||
| #undef INIT_GP_TYPE | #undef INIT_GP_TYPE | ||||
| } | } | ||||
| /* verify if valid layer, material and pass index */ | /* verify if valid layer, material and pass index */ | ||||
| bool is_stroke_affected_by_modifier(Object *ob, | bool is_stroke_affected_by_modifier(Object *ob, | ||||
| char *mlayername, | char *mlayername, | ||||
| char *mmaterialname, | Material *material, | ||||
| const int mpassindex, | const int mpassindex, | ||||
| const int gpl_passindex, | const int gpl_passindex, | ||||
| const int minpoints, | const int minpoints, | ||||
| bGPDlayer *gpl, | bGPDlayer *gpl, | ||||
| bGPDstroke *gps, | bGPDstroke *gps, | ||||
| const bool inv1, | const bool inv1, | ||||
| const bool inv2, | const bool inv2, | ||||
| const bool inv3, | const bool inv3, | ||||
| Show All 10 Lines | if (inv1 == false) { | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| if (STREQ(mlayername, gpl->info)) { | if (STREQ(mlayername, gpl->info)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* omit if filter by material */ | /* Omit if filter by material. */ | ||||
| if (mmaterialname[0] != '\0') { | if (material != NULL) { | ||||
| if (inv4 == false) { | if (inv4 == false) { | ||||
| if (!STREQ(mmaterialname, ma->id.name + 2)) { | if (material != ma) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| if (STREQ(mmaterialname, ma->id.name + 2)) { | if (material == ma) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* verify layer pass */ | /* verify layer pass */ | ||||
| if (gpl_passindex > 0) { | if (gpl_passindex > 0) { | ||||
| if (inv3 == false) { | if (inv3 == false) { | ||||
| if (gpl->pass_index != gpl_passindex) { | if (gpl->pass_index != gpl_passindex) { | ||||
| ▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines | |||||