From 25aaa7b92e4b28c6e3e4da9c9868adb2f1c8cd87 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 2 Jan 2009 23:05:28 +0000 Subject: Made the basic RNA changes for Tex(ture), no properties wrapped yet. --- source/blender/editors/space_outliner/outliner.c | 4 +- source/blender/makesrna/RNA_access.h | 1 + source/blender/makesrna/intern/CMakeLists.txt | 1 + source/blender/makesrna/intern/makesrna.c | 1 + source/blender/makesrna/intern/rna_ID.c | 1 + source/blender/makesrna/intern/rna_internal.h | 1 + source/blender/makesrna/intern/rna_main.c | 2 +- source/blender/makesrna/intern/rna_texture.c | 48 ++++++++++++++++++++++++ 8 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 source/blender/makesrna/intern/rna_texture.c (limited to 'source/blender') diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index c3c45466ac1..7992e442243 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -3203,8 +3203,8 @@ static int tselem_rna_icon(PointerRNA *ptr) return ICON_PARTICLES; else if(rnatype == &RNA_Material) return ICON_MATERIAL; - /*else if(rnatype == &RNA_Texture) - return ICON_TEXTURE;*/ + else if(rnatype == &RNA_Texture) + return ICON_TEXTURE; else if(rnatype == &RNA_Image) return ICON_TEXTURE; else if(rnatype == &RNA_Screen) diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index db988866074..546edde85c3 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -207,6 +207,7 @@ extern StructRNA RNA_Text; extern StructRNA RNA_TextBox; extern StructRNA RNA_TextLine; extern StructRNA RNA_TextMarker; +extern StructRNA RNA_Texture; extern StructRNA RNA_TouchSensor; extern StructRNA RNA_TransformSequence; extern StructRNA RNA_UVProjectModifier; diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 0c6d28d4172..648714e056b 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -63,6 +63,7 @@ SET(SRC rna_sequence.c rna_sound.c rna_text.c + rna_texture.c rna_userdef.c rna_vfont.c rna_wm.c diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index cebcd3a4d63..2848b1736a3 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -932,6 +932,7 @@ RNAProcessItem PROCESS_ITEMS[]= { {"rna_sensor.c", RNA_def_sensor}, {"rna_sequence.c", RNA_def_sequence}, {"rna_text.c", RNA_def_text}, + {"rna_texture.c", RNA_def_texture}, {"rna_sound.c", RNA_def_sound}, {"rna_userdef.c", RNA_def_userdef}, {"rna_vfont.c", RNA_def_vfont}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index ea87a8ec0f4..0a70fbb42bd 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -78,6 +78,7 @@ static StructRNA *rna_ID_refine(PointerRNA *ptr) case ID_SCR: return &RNA_Screen; case ID_SO: return &RNA_Sound; case ID_TXT: return &RNA_Text; + case ID_TE: return &RNA_Texture; case ID_VF: return &RNA_VectorFont; case ID_WO: return &RNA_World; case ID_WM: return &RNA_WindowManager; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index 8f416f6f997..01177314f2c 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -129,6 +129,7 @@ void RNA_def_scriptlink(struct BlenderRNA *brna); void RNA_def_sensor(struct BlenderRNA *brna); void RNA_def_sequence(struct BlenderRNA *brna); void RNA_def_text(struct BlenderRNA *brna); +void RNA_def_texture(struct BlenderRNA *brna); void RNA_def_sound(struct BlenderRNA *brna); void RNA_def_userdef(struct BlenderRNA *brna); void RNA_def_vfont(struct BlenderRNA *brna); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 0f809b99edc..59cf3bf02ac 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -236,7 +236,7 @@ void RNA_def_main(BlenderRNA *brna) {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks."}, {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks."}, {"vfonts", "VectorFont", "rna_Main_vfont_begin", "Vector Fonts", "Vector font datablocks."}, - {"textures", "ID", "rna_Main_tex_begin", "Textures", "Texture datablocks."}, + {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks."}, {"ipos", "Ipo", "rna_Main_ipo_begin", "Ipos", "Ipo datablocks."}, {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks."}, {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks."}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c new file mode 100644 index 00000000000..4b0780d5a01 --- /dev/null +++ b/source/blender/makesrna/intern/rna_texture.c @@ -0,0 +1,48 @@ +/** + * $Id$ + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * 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 + * of the License, or (at your option) any later version. + * + * 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, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Contributor(s): Blender Foundation (2008). + * + * ***** END GPL LICENSE BLOCK ***** + */ + +#include "RNA_define.h" +#include "RNA_types.h" + +#include "rna_internal.h" + +#include "DNA_texture_types.h" + +#ifdef RNA_RUNTIME + +#else + +void RNA_def_texture(BlenderRNA *brna) +{ + StructRNA *srna; + PropertyRNA *prop; + + srna= RNA_def_struct(brna, "Texture", "ID"); + RNA_def_struct_sdna(srna, "Tex"); + RNA_def_struct_ui_text(srna, "Texture", "DOC_BROKEN"); + + +} + +#endif -- cgit v1.2.3