2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-12-13 19:00:54 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
2018-06-01 18:19:39 +02:00
|
|
|
* of the License, or (at your option) any later version.
|
2008-12-13 19:00:54 +00:00
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-13 19:00:54 +00:00
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*/
|
2011-02-27 20:29:51 +00:00
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
|
* \ingroup spbuttons
|
2011-02-27 20:29:51 +00:00
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __BUTTONS_INTERN_H__
|
|
|
|
|
#define __BUTTONS_INTERN_H__
|
2008-12-13 19:00:54 +00:00
|
|
|
|
2011-11-08 13:07:16 +00:00
|
|
|
#include "DNA_listBase.h"
|
|
|
|
|
#include "RNA_types.h"
|
|
|
|
|
|
2009-03-29 19:44:39 +00:00
|
|
|
struct ARegionType;
|
2011-11-08 13:07:16 +00:00
|
|
|
struct ID;
|
2019-02-16 10:44:15 +11:00
|
|
|
struct SpaceProperties;
|
2011-11-08 13:07:16 +00:00
|
|
|
struct Tex;
|
2009-03-29 19:44:39 +00:00
|
|
|
struct bContext;
|
2009-06-03 00:01:22 +00:00
|
|
|
struct bContextDataResult;
|
2011-11-08 13:07:16 +00:00
|
|
|
struct bNode;
|
|
|
|
|
struct bNodeTree;
|
2009-06-07 13:36:12 +00:00
|
|
|
struct uiLayout;
|
|
|
|
|
struct wmOperatorType;
|
2008-12-13 19:00:54 +00:00
|
|
|
|
2018-10-29 22:55:54 +01:00
|
|
|
/* Display the context path in the header instead of the main window */
|
|
|
|
|
#define USE_HEADER_CONTEXT_PATH
|
|
|
|
|
|
2011-11-08 13:07:16 +00:00
|
|
|
/* context data */
|
|
|
|
|
|
|
|
|
|
typedef struct ButsContextPath {
|
2019-04-17 06:17:24 +02:00
|
|
|
PointerRNA ptr[8];
|
|
|
|
|
int len;
|
|
|
|
|
int flag;
|
|
|
|
|
int collection_ctx;
|
2011-11-08 13:07:16 +00:00
|
|
|
} ButsContextPath;
|
|
|
|
|
|
|
|
|
|
typedef struct ButsTextureUser {
|
2019-04-17 06:17:24 +02:00
|
|
|
struct ButsTextureUser *next, *prev;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
struct ID *id;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
PointerRNA ptr;
|
|
|
|
|
PropertyRNA *prop;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
struct bNodeTree *ntree;
|
|
|
|
|
struct bNode *node;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
const char *category;
|
|
|
|
|
int icon;
|
|
|
|
|
const char *name;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
int index;
|
2011-11-08 13:07:16 +00:00
|
|
|
} ButsTextureUser;
|
|
|
|
|
|
|
|
|
|
typedef struct ButsContextTexture {
|
2019-04-17 06:17:24 +02:00
|
|
|
ListBase users;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
struct Tex *texture;
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
struct ButsTextureUser *user;
|
|
|
|
|
int index;
|
2011-11-08 13:07:16 +00:00
|
|
|
} ButsContextTexture;
|
|
|
|
|
|
2008-12-13 19:00:54 +00:00
|
|
|
/* internal exports only */
|
|
|
|
|
|
2009-06-03 00:01:22 +00:00
|
|
|
/* buttons_context.c */
|
2019-02-16 10:44:15 +11:00
|
|
|
void buttons_context_compute(const struct bContext *C, struct SpaceProperties *sbuts);
|
2019-04-17 06:17:24 +02:00
|
|
|
int buttons_context(const struct bContext *C,
|
|
|
|
|
const char *member,
|
|
|
|
|
struct bContextDataResult *result);
|
2009-06-07 13:36:12 +00:00
|
|
|
void buttons_context_draw(const struct bContext *C, struct uiLayout *layout);
|
2009-06-03 23:33:56 +00:00
|
|
|
void buttons_context_register(struct ARegionType *art);
|
* Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
/usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
bpy.data.images.load(), missed this call.
(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
2010-03-30 12:15:16 +00:00
|
|
|
struct ID *buttons_context_id_path(const struct bContext *C);
|
2009-06-03 00:01:22 +00:00
|
|
|
|
2011-02-15 14:38:43 +00:00
|
|
|
extern const char *buttons_context_dir[]; /* doc access */
|
|
|
|
|
|
2011-11-08 13:07:16 +00:00
|
|
|
/* buttons_texture.c */
|
2019-02-16 10:44:15 +11:00
|
|
|
void buttons_texture_context_compute(const struct bContext *C, struct SpaceProperties *sbuts);
|
2011-11-08 13:07:16 +00:00
|
|
|
|
2009-06-07 13:36:12 +00:00
|
|
|
/* buttons_ops.c */
|
2009-07-28 18:51:06 +00:00
|
|
|
void BUTTONS_OT_file_browse(struct wmOperatorType *ot);
|
2011-06-16 15:28:39 +00:00
|
|
|
void BUTTONS_OT_directory_browse(struct wmOperatorType *ot);
|
2018-06-27 17:07:02 +02:00
|
|
|
void BUTTONS_OT_context_menu(struct wmOperatorType *ot);
|
2009-07-23 20:40:51 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __BUTTONS_INTERN_H__ */
|