Cleanup: warnings, correct assert
This commit is contained in:
@@ -1329,7 +1329,7 @@ static int gp_strokes_paste_exec(bContext *C, wmOperator *op)
|
||||
/* Remap material */
|
||||
Material *ma = BLI_ghash_lookup(new_colors, POINTER_FROM_INT(new_stroke->mat_nr));
|
||||
new_stroke->mat_nr = BKE_gpencil_get_material_index(ob, ma);
|
||||
BLI_assert(new_stroke >= 0); /* have to add the material first */
|
||||
BLI_assert(new_stroke->mat_nr >= 0); /* have to add the material first */
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3905,7 +3905,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
|
||||
/* create new grease pencil datablock */
|
||||
gpd_dst = BKE_gpencil_data_addnew(bmain, gpd_src->id.name + 2);
|
||||
ob_dst->data = (bGPdata *)gpd_dst;
|
||||
|
||||
|
||||
/* loop old datablock and separate parts */
|
||||
if ((mode == GP_SEPARATE_POINT) || (mode == GP_SEPARATE_STROKE)) {
|
||||
CTX_DATA_BEGIN(C, bGPDlayer *, gpl, editable_gpencil_layers)
|
||||
|
||||
@@ -443,7 +443,7 @@ static void rna_Brush_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR
|
||||
/*WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL); */
|
||||
}
|
||||
|
||||
static void rna_Brush_material_update(bContext *C, PointerRNA *ptr)
|
||||
static void rna_Brush_material_update(bContext *UNUSED(C), PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
/* number of material users changed */
|
||||
WM_main_add_notifier(NC_SPACE | ND_SPACE_PROPERTIES, NULL);
|
||||
|
||||
@@ -275,7 +275,7 @@ static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
|
||||
WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id);
|
||||
}
|
||||
|
||||
static void rna_MaterialIndex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
static void rna_MaterialIndex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->id.data;
|
||||
if (ob && ob->type == OB_GPENCIL) {
|
||||
|
||||
Reference in New Issue
Block a user