Cleanup: style

This commit is contained in:
2018-06-09 16:39:40 +02:00
parent 70f8eaf1b7
commit 5159ce640f
2 changed files with 9 additions and 8 deletions

View File

@@ -439,8 +439,8 @@ void DepsgraphNodeBuilder::build_id(ID *id) {
} }
void DepsgraphNodeBuilder::build_collection( void DepsgraphNodeBuilder::build_collection(
eDepsNode_CollectionOwner owner_type, eDepsNode_CollectionOwner owner_type,
Collection *collection) Collection *collection)
{ {
if (built_map_.checkIsBuiltAndTag(collection)) { if (built_map_.checkIsBuiltAndTag(collection)) {
return; return;

View File

@@ -722,11 +722,11 @@ static const EnumPropertyItem *rna_UserDef_studiolight_icon_id_itemf(
int totitem = 0; int totitem = 0;
StudioLight *sl = (StudioLight *)ptr->data; StudioLight *sl = (StudioLight *)ptr->data;
if ((sl->flag & (STUDIOLIGHT_ORIENTATION_VIEWNORMAL | STUDIOLIGHT_ORIENTATION_CAMERA)) == 0) if ((sl->flag & (STUDIOLIGHT_ORIENTATION_VIEWNORMAL | STUDIOLIGHT_ORIENTATION_CAMERA)) == 0) {
{
EnumPropertyItem tmp = {0, sl->name, sl->radiance_icon_id, sl->name, ""}; EnumPropertyItem tmp = {0, sl->name, sl->radiance_icon_id, sl->name, ""};
RNA_enum_item_add(&item, &totitem, &tmp); RNA_enum_item_add(&item, &totitem, &tmp);
} }
{ {
EnumPropertyItem tmp = {1, sl->name, sl->irradiance_icon_id, sl->name, ""}; EnumPropertyItem tmp = {1, sl->name, sl->irradiance_icon_id, sl->name, ""};
RNA_enum_item_add(&item, &totitem, &tmp); RNA_enum_item_add(&item, &totitem, &tmp);
@@ -754,7 +754,7 @@ static void rna_UserDef_studiolight_show_expanded_set(PointerRNA *ptr, const boo
{ {
StudioLight *sl = (StudioLight *)ptr->data; StudioLight *sl = (StudioLight *)ptr->data;
sl->flag ^= STUDIOLIGHT_UI_EXPANDED; sl->flag ^= STUDIOLIGHT_UI_EXPANDED;
sl->flag |= value?STUDIOLIGHT_UI_EXPANDED: 0; sl->flag |= value ? STUDIOLIGHT_UI_EXPANDED : 0;
} }
@@ -4936,9 +4936,10 @@ void RNA_def_userdef(BlenderRNA *brna)
prop = RNA_def_property(srna, "studio_lights", PROP_COLLECTION, PROP_NONE); prop = RNA_def_property(srna, "studio_lights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "StudioLight"); RNA_def_property_struct_type(prop, "StudioLight");
RNA_def_property_collection_funcs(prop, "rna_UserDef_studiolight_begin", "rna_iterator_listbase_next", RNA_def_property_collection_funcs(
"rna_iterator_listbase_end", "rna_iterator_listbase_get", prop, "rna_UserDef_studiolight_begin", "rna_iterator_listbase_next",
NULL, NULL, NULL, NULL); "rna_iterator_listbase_end", "rna_iterator_listbase_get",
NULL, NULL, NULL, NULL);
func = RNA_def_function(srna, "studio_lights_refresh", "rna_UserDef_studiolight_refresh"); func = RNA_def_function(srna, "studio_lights_refresh", "rna_UserDef_studiolight_refresh");
RNA_def_function_ui_description(func, "Refresh Studio Lights"); RNA_def_function_ui_description(func, "Refresh Studio Lights");