Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
commit44505b38df557a5711703613685a1dec9fc2c3d9 (patch)
tree3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/space_buttons
parent6654e109df952be3a3128fae2508a02c196ae593 (diff)
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c16
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h2
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c10
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c14
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c28
5 files changed, 35 insertions, 35 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index c46beba7ae1..f5e0ccb60c7 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -127,7 +127,7 @@ static int buttons_context_path_world(ButsContextPath *path)
else if (buttons_context_path_scene(path)) {
scene = path->ptr[path->len - 1].data;
world = scene->world;
-
+
if (world) {
RNA_id_pointer_create(&scene->world->id, &path->ptr[path->len]);
path->len++;
@@ -409,7 +409,7 @@ static int buttons_context_path_texture(ButsContextPath *path, ButsContextTextur
if (!ct->user)
return 0;
-
+
id = ct->user->id;
if (id) {
@@ -643,7 +643,7 @@ static int buttons_shading_context(const bContext *C, int mainb)
return 1;
if (mainb == BCONTEXT_DATA && ob && ELEM(ob->type, OB_LAMP, OB_CAMERA))
return 1;
-
+
return 0;
}
@@ -657,7 +657,7 @@ static int buttons_shading_new_context(const bContext *C, int flag)
return BCONTEXT_DATA;
else if (flag & (1 << BCONTEXT_WORLD))
return BCONTEXT_WORLD;
-
+
return BCONTEXT_RENDER;
}
@@ -977,7 +977,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
else if (CTX_data_equals(member, "particle_settings")) {
/* only available when pinned */
PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSettings);
-
+
if (ptr && ptr->data) {
CTX_data_pointer_set(result, ptr->id.data, &RNA_ParticleSettings, ptr->data);
return 1;
@@ -985,7 +985,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
else {
/* get settings from active particle system instead */
ptr = get_pointer_type(path, &RNA_ParticleSystem);
-
+
if (ptr && ptr->data) {
ParticleSettings *part = ((ParticleSystem *)ptr->data)->part;
CTX_data_pointer_set(result, ptr->id.data, &RNA_ParticleSettings, part);
@@ -1025,7 +1025,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
return 1;
}
}
-
+
else if (CTX_data_equals(member, "smoke")) {
PointerRNA *ptr = get_pointer_type(path, &RNA_Object);
@@ -1082,7 +1082,7 @@ static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
}
else
sbuts->pinid = NULL;
-
+
ED_area_tag_redraw(CTX_wm_area(C));
}
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index 141f5abb1f0..53b541ad382 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -45,7 +45,7 @@ struct bNodeTree;
struct uiLayout;
struct wmOperatorType;
-/* buts->scaflag */
+/* buts->scaflag */
#define BUTS_SENS_SEL 1
#define BUTS_SENS_ACT 2
#define BUTS_SENS_LINK 4
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 8198650fd8a..813f4202a49 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -86,7 +86,7 @@ void BUTTONS_OT_toolbox(wmOperatorType *ot)
ot->name = "Toolbox";
ot->description = "Display button panel toolbox";
ot->idname = "BUTTONS_OT_toolbox";
-
+
/* api callbacks */
ot->invoke = toolbox_invoke;
ot->poll = ED_operator_buttons_active;
@@ -106,10 +106,10 @@ static int file_browse_exec(bContext *C, wmOperator *op)
ID *id;
char *str, path[FILE_MAX];
const char *path_prop = RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
-
+
if (RNA_struct_property_is_set(op->ptr, path_prop) == 0 || fbo == NULL)
return OPERATOR_CANCELLED;
-
+
str = RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
/* add slash for directories, important for some properties */
@@ -119,7 +119,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
BLI_strncpy(path, str, FILE_MAX);
BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
-
+
if (BLI_is_dir(path)) {
/* do this first so '//' isnt converted to '//\' on windows */
BLI_add_slash(path);
@@ -255,7 +255,7 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
ot->name = "Accept";
ot->description = "Open a file browser, Hold Shift to open the file, Alt to browse containing directory";
ot->idname = "BUTTONS_OT_file_browse";
-
+
/* api callbacks */
ot->invoke = file_browse_invoke;
ot->exec = file_browse_exec;
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c
index 3a824ff883d..50791cf6bef 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -246,7 +246,7 @@ static void set_texture_context(const bContext *C, SpaceButs *sbuts)
/************************* Texture User **************************/
-static void buttons_texture_user_property_add(ListBase *users, ID *id,
+static void buttons_texture_user_property_add(ListBase *users, ID *id,
PointerRNA ptr, PropertyRNA *prop,
const char *category, int icon, const char *name)
{
@@ -263,7 +263,7 @@ static void buttons_texture_user_property_add(ListBase *users, ID *id,
BLI_addtail(users, user);
}
-static void buttons_texture_user_node_add(ListBase *users, ID *id,
+static void buttons_texture_user_node_add(ListBase *users, ID *id,
bNodeTree *ntree, bNode *node,
const char *category, int icon, const char *name)
{
@@ -290,10 +290,10 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id,
if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) {
PointerRNA ptr;
/* PropertyRNA *prop; */ /* UNUSED */
-
+
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
/* prop = RNA_struct_find_property(&ptr, "texture"); */ /* UNUSED */
-
+
buttons_texture_user_node_add(users, id, ntree, node,
category, RNA_struct_ui_icon(ptr.type), node->name);
}
@@ -646,7 +646,7 @@ static void template_texture_show(bContext *C, void *data_p, void *prop_p)
for (user = ct->users.first; user; user = user->next)
if (user->ptr.data == data_p && user->prop == prop_p)
break;
-
+
if (user) {
/* select texture */
template_texture_select(C, user, NULL);
@@ -676,12 +676,12 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope
for (user = ct->users.first; user; user = user->next)
if (user->ptr.data == ptr->data && user->prop == prop)
break;
-
+
/* draw button */
if (user) {
uiBlock *block = uiLayoutGetBlock(layout);
uiBut *but;
-
+
but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y,
NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Show texture in texture tab"));
UI_but_func_set(but, template_texture_show, user->ptr.data, user->prop);
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 166857aad66..3df913c5f7e 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -55,18 +55,18 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C))
{
ARegion *ar;
SpaceButs *sbuts;
-
+
sbuts = MEM_callocN(sizeof(SpaceButs), "initbuts");
sbuts->spacetype = SPACE_BUTS;
sbuts->align = BUT_VERTICAL;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for buts");
-
+
BLI_addtail(&sbuts->regionbase, ar);
ar->regiontype = RGN_TYPE_HEADER;
ar->alignment = RGN_ALIGN_TOP;
-
+
#if 0
/* context region */
ar = MEM_callocN(sizeof(ARegion), "context region for buts");
@@ -77,7 +77,7 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C))
/* main region */
ar = MEM_callocN(sizeof(ARegion), "main region for buts");
-
+
BLI_addtail(&sbuts->regionbase, ar);
ar->regiontype = RGN_TYPE_WINDOW;
@@ -86,12 +86,12 @@ static SpaceLink *buttons_new(const bContext *UNUSED(C))
/* not spacelink itself */
static void buttons_free(SpaceLink *sl)
-{
+{
SpaceButs *sbuts = (SpaceButs *) sl;
if (sbuts->path)
MEM_freeN(sbuts->path);
-
+
if (sbuts->texuser) {
ButsContextTexture *ct = sbuts->texuser;
BLI_freelistN(&ct->users);
@@ -116,11 +116,11 @@ static void buttons_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
static SpaceLink *buttons_duplicate(SpaceLink *sl)
{
SpaceButs *sbutsn = MEM_dupallocN(sl);
-
+
/* clear or remove stuff from old */
sbutsn->path = NULL;
sbutsn->texuser = NULL;
-
+
return (SpaceLink *)sbutsn;
}
@@ -186,7 +186,7 @@ static void buttons_operatortypes(void)
static void buttons_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap = WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
-
+
WM_keymap_add_item(keymap, "BUTTONS_OT_toolbox", RIGHTMOUSE, KM_PRESS, 0, 0);
}
@@ -211,7 +211,7 @@ static void buttons_header_region_draw(const bContext *C, ARegion *ar)
static void buttons_area_redraw(ScrArea *sa, short buttons)
{
SpaceButs *sbuts = sa->spacedata.first;
-
+
/* if the area's current button set is equal to the one to redraw */
if (sbuts->mainb == buttons)
ED_area_tag_redraw(sa);
@@ -449,10 +449,10 @@ void ED_spacetype_buttons(void)
{
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype buttons");
ARegionType *art;
-
+
st->spaceid = SPACE_BUTS;
strncpy(st->name, "Buttons", BKE_ST_MAXNAME);
-
+
st->new = buttons_new;
st->free = buttons_free;
st->init = buttons_init;
@@ -472,13 +472,13 @@ void ED_spacetype_buttons(void)
BLI_addhead(&st->regiontypes, art);
buttons_context_register(art);
-
+
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey = HEADERY;
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER;
-
+
art->init = buttons_header_region_init;
art->draw = buttons_header_region_draw;
BLI_addhead(&st->regiontypes, art);