From 28ee0f92184af8ba6f44d08eda23ce5eb3815697 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 8 Nov 2011 13:07:16 +0000 Subject: Texturing: texture and 3d view draw type changes, these should only have any effect for a render engine using new shading nodes. In short: * No longer uses images assigned to faces in the uv layer, rather the active image texture node is what is edited/painted/drawn. * Textured draw type now shows the active image texture node, with solid lighting. * Material draw mode shows GLSL shader of a simplified material node tree, using solid lighting. * Textures for modifiers, brushes, etc, are now available from a dropdown in the texture tab in the properties editor. These do not use new shading nodes yet. http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow --- .../blender/editors/space_buttons/buttons_intern.h | 49 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_buttons/buttons_intern.h') diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index 27084488163..aa692a940d8 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -31,14 +31,20 @@ #ifndef ED_BUTTONS_INTERN_H #define ED_BUTTONS_INTERN_H +#include "DNA_listBase.h" +#include "RNA_types.h" + struct ARegion; struct ARegionType; +struct ID; +struct SpaceButs; +struct Tex; struct bContext; struct bContextDataResult; -struct SpaceButs; +struct bNode; +struct bNodeTree; struct uiLayout; struct wmOperatorType; -struct ID; /* buts->scaflag */ #define BUTS_SENS_SEL 1 @@ -53,6 +59,42 @@ struct ID; #define BUTS_SENS_STATE 512 #define BUTS_ACT_STATE 1024 +/* context data */ + +typedef struct ButsContextPath { + PointerRNA ptr[8]; + int len; + int flag; + int tex_ctx; +} ButsContextPath; + +typedef struct ButsTextureUser { + struct ButsTextureUser *next, *prev; + + struct ID *id; + + PointerRNA ptr; + PropertyRNA *prop; + + struct bNodeTree *ntree; + struct bNode *node; + + const char *category; + int icon; + const char *name; + + int index; +} ButsTextureUser; + +typedef struct ButsContextTexture { + ListBase users; + + struct Tex *texture; + + struct ButsTextureUser *user; + int index; +} ButsContextTexture; + /* internal exports only */ /* buttons_header.c */ @@ -67,6 +109,9 @@ struct ID *buttons_context_id_path(const struct bContext *C); extern const char *buttons_context_dir[]; /* doc access */ +/* buttons_texture.c */ +void buttons_texture_context_compute(const struct bContext *C, struct SpaceButs *sbuts); + /* buttons_ops.c */ void BUTTONS_OT_file_browse(struct wmOperatorType *ot); void BUTTONS_OT_directory_browse(struct wmOperatorType *ot); -- cgit v1.2.3