Cleanup: use braces, unused variable, unused enum
This commit is contained in:
parent
d8fb63661b
commit
059d61ae9d
|
@ -1128,7 +1128,7 @@ static bool ntree_foreach_texnode_recursive(bNodeTree *nodetree,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool count_texture_nodes_cb(bNode *node, void *userdata)
|
||||
static bool count_texture_nodes_cb(bNode *UNUSED(node), void *userdata)
|
||||
{
|
||||
(*((int *)userdata))++;
|
||||
return true;
|
||||
|
|
|
@ -67,16 +67,21 @@ void BKE_paint_toolslots_init_from_main(struct Main *bmain)
|
|||
for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
paint_toolslots_init(bmain, &ts->imapaint.paint);
|
||||
if (ts->sculpt)
|
||||
if (ts->sculpt) {
|
||||
paint_toolslots_init(bmain, &ts->sculpt->paint);
|
||||
if (ts->vpaint)
|
||||
}
|
||||
if (ts->vpaint) {
|
||||
paint_toolslots_init(bmain, &ts->vpaint->paint);
|
||||
if (ts->wpaint)
|
||||
}
|
||||
if (ts->wpaint) {
|
||||
paint_toolslots_init(bmain, &ts->wpaint->paint);
|
||||
if (ts->uvsculpt)
|
||||
}
|
||||
if (ts->uvsculpt) {
|
||||
paint_toolslots_init(bmain, &ts->uvsculpt->paint);
|
||||
if (ts->gp_paint)
|
||||
}
|
||||
if (ts->gp_paint) {
|
||||
paint_toolslots_init(bmain, &ts->gp_paint->paint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6414,16 +6414,21 @@ static void lib_link_scene(FileData *fd, Main *main)
|
|||
sce->gpd = newlibadr_us(fd, sce->id.lib, sce->gpd);
|
||||
|
||||
link_paint(fd, sce, &sce->toolsettings->imapaint.paint);
|
||||
if (sce->toolsettings->sculpt)
|
||||
if (sce->toolsettings->sculpt) {
|
||||
link_paint(fd, sce, &sce->toolsettings->sculpt->paint);
|
||||
if (sce->toolsettings->vpaint)
|
||||
}
|
||||
if (sce->toolsettings->vpaint) {
|
||||
link_paint(fd, sce, &sce->toolsettings->vpaint->paint);
|
||||
if (sce->toolsettings->wpaint)
|
||||
}
|
||||
if (sce->toolsettings->wpaint) {
|
||||
link_paint(fd, sce, &sce->toolsettings->wpaint->paint);
|
||||
if (sce->toolsettings->uvsculpt)
|
||||
}
|
||||
if (sce->toolsettings->uvsculpt) {
|
||||
link_paint(fd, sce, &sce->toolsettings->uvsculpt->paint);
|
||||
if (sce->toolsettings->gp_paint)
|
||||
}
|
||||
if (sce->toolsettings->gp_paint) {
|
||||
link_paint(fd, sce, &sce->toolsettings->gp_paint->paint);
|
||||
}
|
||||
|
||||
if (sce->toolsettings->sculpt) {
|
||||
sce->toolsettings->sculpt->gravity_object = newlibadr(
|
||||
|
|
|
@ -254,8 +254,9 @@ static int text_context(const bContext *C, const char *member, bContextDataResul
|
|||
return 1;
|
||||
}
|
||||
else if (CTX_data_equals(member, "edit_text")) {
|
||||
if (st->text)
|
||||
if (st->text != NULL) {
|
||||
CTX_data_id_pointer_set(result, &st->text->id);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,8 +148,7 @@ typedef struct bGPDpalette {
|
|||
/* bGPDpalette->flag */
|
||||
typedef enum eGPDpalette_Flag {
|
||||
/* palette is active */
|
||||
A,
|
||||
PL_PALETTE_ACTIVE = (1 << 0)
|
||||
PL_PALETTE_ACTIVE = (1 << 0),
|
||||
} eGPDpalette_Flag;
|
||||
|
||||
/* ***************************************** */
|
||||
|
|
Loading…
Reference in New Issue