[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20904] branches/blender2.5/blender: 2. 5 UI

Andrea Weikert elubie at gmx.net
Mon Jun 15 22:28:49 CEST 2009


Revision: 20904
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20904
Author:   elubie
Date:     2009-06-15 22:28:49 +0200 (Mon, 15 Jun 2009)

Log Message:
-----------
2.5 UI
* RNA enum for icons to allow specifying icons as string
* example: row.itemR(st, "line_numbers", text="", icon='ICON_LINENUMBERS_OFF')

Modified Paths:
--------------
    branches/blender2.5/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj
    branches/blender2.5/blender/release/ui/buttons_scene.py
    branches/blender2.5/blender/release/ui/space_text.py
    branches/blender2.5/blender/source/blender/editors/include/UI_resources.h
    branches/blender2.5/blender/source/blender/editors/interface/interface_api.c
    branches/blender2.5/blender/source/blender/editors/interface/resources.c

Added Paths:
-----------
    branches/blender2.5/blender/source/blender/editors/include/UI_icons.h

Modified: branches/blender2.5/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj
===================================================================
--- branches/blender2.5/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj	2009-06-15 20:22:50 UTC (rev 20903)
+++ branches/blender2.5/blender/projectfiles_vc9/blender/editors/ED_editors.vcproj	2009-06-15 20:28:49 UTC (rev 20904)
@@ -310,6 +310,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\source\blender\editors\include\UI_icons.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\source\blender\editors\include\UI_interface.h"
 				>
 			</File>

Modified: branches/blender2.5/blender/release/ui/buttons_scene.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_scene.py	2009-06-15 20:22:50 UTC (rev 20903)
+++ branches/blender2.5/blender/release/ui/buttons_scene.py	2009-06-15 20:28:49 UTC (rev 20904)
@@ -162,8 +162,8 @@
 		rd = context.scene.render_data
 
 		row = layout.row()
-		row.itemO("SCREEN_OT_render", text="Render Still", icon=109)
-		row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon=111)
+		row.itemO("SCREEN_OT_render", text="Render Still", icon='ICON_IMAGE_COL')
+		row.item_booleanO("SCREEN_OT_render", "anim", True, text="Render Animation", icon='ICON_SEQUENCE')
 		
 		row = layout.row()
 		row.itemR(rd, "do_composite")

Modified: branches/blender2.5/blender/release/ui/space_text.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_text.py	2009-06-15 20:22:50 UTC (rev 20903)
+++ branches/blender2.5/blender/release/ui/space_text.py	2009-06-15 20:28:49 UTC (rev 20904)
@@ -30,12 +30,12 @@
 		if text and text.modified:
 			row = layout.row()
 			# row.color(redalert)
-			row.itemO("TEXT_OT_resolve_conflict", text="", icon=ICON_HELP)
+			row.itemO("TEXT_OT_resolve_conflict", text="", icon='ICON_HELP')
 
 		row = layout.row(align=True)
-		row.itemR(st, "line_numbers", text="", icon=ICON_LINENUMBERS_OFF)
-		row.itemR(st, "word_wrap", text="", icon=ICON_WORDWRAP_OFF)
-		row.itemR(st, "syntax_highlight", text="", icon=ICON_SYNTAX_OFF)
+		row.itemR(st, "line_numbers", text="", icon='ICON_LINENUMBERS_OFF')
+		row.itemR(st, "word_wrap", text="", icon='ICON_WORDWRAP_OFF')
+		row.itemR(st, "syntax_highlight", text="", icon='ICON_SYNTAX_OFF')
 		# row.itemR(st, "do_python_plugins", text="", icon=ICON_SCRIPTPLUGINS)
 
 		layout.template_ID(context, st, "text", new="TEXT_OT_new", open="TEXT_OT_open", unlink="TEXT_OT_unlink")
@@ -63,9 +63,9 @@
 		layout = self.layout
 
 		flow = layout.column_flow()
-		flow.itemR(st, "line_numbers", icon=ICON_LINENUMBERS_OFF)
-		flow.itemR(st, "word_wrap", icon=ICON_WORDWRAP_OFF)
-		flow.itemR(st, "syntax_highlight", icon=ICON_SYNTAX_OFF)
+		flow.itemR(st, "line_numbers", icon='ICON_LINENUMBERS_OFF')
+		flow.itemR(st, "word_wrap", icon='ICON_WORDWRAP_OFF')
+		flow.itemR(st, "syntax_highlight", icon='ICON_SYNTAX_OFF')
 		flow.itemR(st, "live_edit")
 
 		flow = layout.column_flow()
@@ -85,14 +85,14 @@
 		col = layout.column(align=True)
 		row = col.row()
 		row.itemR(st, "find_text", text="")
-		row.itemO("TEXT_OT_find_set_selected", text="", icon=ICON_TEXT)
+		row.itemO("TEXT_OT_find_set_selected", text="", icon='ICON_TEXT')
 		col.itemO("TEXT_OT_find")
 
 		# replace
 		col = layout.column(align=True)
 		row = col.row()
 		row.itemR(st, "replace_text", text="")
-		row.itemO("TEXT_OT_replace_set_selected", text="", icon=ICON_TEXT)
+		row.itemO("TEXT_OT_replace_set_selected", text="", icon='ICON_TEXT')
 		col.itemO("TEXT_OT_replace")
 
 		# mark

Added: branches/blender2.5/blender/source/blender/editors/include/UI_icons.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/include/UI_icons.h	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/editors/include/UI_icons.h	2009-06-15 20:28:49 UTC (rev 20904)
@@ -0,0 +1,882 @@
+/**
+ * $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.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/* Note: this is included twice with different #defines for DEF_ICON
+   once from UI_resources.h for the internal icon enum and once fro interface_api.c for
+   definition of the RNA enum for he icons */
+
+DEF_ICON(ICON_BLENDER)
+DEF_ICON(ICON_QUESTION)
+DEF_ICON(ICON_ERROR)
+DEF_ICON(ICON_BLANK1)	// XXX this is used lots, it's not actually 'blank'
+DEF_ICON(ICON_TRIA_RIGHT)
+DEF_ICON(ICON_TRIA_DOWN)
+DEF_ICON(ICON_TRIA_LEFT)
+DEF_ICON(ICON_TRIA_UP)
+DEF_ICON(ICON_ARROW_LEFTRIGHT)
+DEF_ICON(ICON_PLUS)
+DEF_ICON(ICON_DISCLOSURE_TRI_DOWN)
+DEF_ICON(ICON_DISCLOSURE_TRI_RIGHT)
+DEF_ICON(ICON_RADIOBUT_OFF)
+DEF_ICON(ICON_RADIOBUT_ON)
+DEF_ICON(ICON_MENU_PANEL)
+DEF_ICON(ICON_PYTHON)
+DEF_ICON(ICON_BLANK003)
+DEF_ICON(ICON_DOT)
+DEF_ICON(ICON_BLANK004)
+DEF_ICON(ICON_X)
+DEF_ICON(ICON_BLANK005)
+DEF_ICON(ICON_GO_LEFT)
+DEF_ICON(ICON_BLANK006)
+DEF_ICON(ICON_BLANK007)
+DEF_ICON(ICON_BLANK008)
+DEF_ICON(ICON_BLANK008b)
+	
+	/* ui */
+DEF_ICON(ICON_FULLSCREEN)
+DEF_ICON(ICON_SPLITSCREEN)
+DEF_ICON(ICON_RIGHTARROW_THIN)
+DEF_ICON(ICON_BORDERMOVE)
+DEF_ICON(ICON_VIEWZOOM)
+DEF_ICON(ICON_ZOOMIN)
+DEF_ICON(ICON_ZOOMOUT)
+DEF_ICON(ICON_PANEL_CLOSE)
+DEF_ICON(ICON_BLANK009)
+DEF_ICON(ICON_EYEDROPPER)
+DEF_ICON(ICON_BLANK010)
+DEF_ICON(ICON_AUTO)
+DEF_ICON(ICON_CHECKBOX_DEHLT)
+DEF_ICON(ICON_CHECKBOX_HLT)
+DEF_ICON(ICON_UNLOCKED)
+DEF_ICON(ICON_LOCKED)
+DEF_ICON(ICON_PINNED)
+DEF_ICON(ICON_UNPINNED)
+DEF_ICON(ICON_BLANK015)
+DEF_ICON(ICON_RIGHTARROW)
+DEF_ICON(ICON_DOWNARROW_HLT)
+DEF_ICON(ICON_DOTSUP)
+DEF_ICON(ICON_DOTSDOWN)
+DEF_ICON(ICON_LINK)
+DEF_ICON(ICON_INLINK)
+DEF_ICON(ICON_BLANK012b)
+	
+	/* various ui */	
+DEF_ICON(ICON_HELP)
+DEF_ICON(ICON_GHOSTDRAW)
+DEF_ICON(ICON_COLOR)
+DEF_ICON(ICON_LINKED)
+DEF_ICON(ICON_UNLINKED)
+DEF_ICON(ICON_HAND)
+DEF_ICON(ICON_ZOOM_ALL)
+DEF_ICON(ICON_ZOOM_SELECTED)
+DEF_ICON(ICON_ZOOM_PREVIOUS)
+DEF_ICON(ICON_ZOOM_IN)
+DEF_ICON(ICON_ZOOM_OUT)
+DEF_ICON(ICON_RENDER_REGION)
+DEF_ICON(ICON_BORDER_RECT)
+DEF_ICON(ICON_BORDER_LASSO)
+DEF_ICON(ICON_FREEZE)
+DEF_ICON(ICON_BLANK031)
+DEF_ICON(ICON_BLANK032)
+DEF_ICON(ICON_BLANK033)
+DEF_ICON(ICON_BLANK034)
+DEF_ICON(ICON_BLANK035)
+DEF_ICON(ICON_BLANK036)
+DEF_ICON(ICON_BLANK037)
+DEF_ICON(ICON_BLANK038)
+DEF_ICON(ICON_BLANK039)
+DEF_ICON(ICON_BLANK040)
+DEF_ICON(ICON_BLANK040b)
+	
+	/* BUTTONS */
+DEF_ICON(ICON_LAMP)
+DEF_ICON(ICON_MATERIAL)
+DEF_ICON(ICON_TEXTURE)
+DEF_ICON(ICON_ANIM)
+DEF_ICON(ICON_WORLD)
+DEF_ICON(ICON_SCENE)
+DEF_ICON(ICON_EDIT)
+DEF_ICON(ICON_GAME)
+DEF_ICON(ICON_RADIO)
+DEF_ICON(ICON_SCRIPT)
+DEF_ICON(ICON_PARTICLES)
+DEF_ICON(ICON_PHYSICS)
+DEF_ICON(ICON_SPEAKER)
+DEF_ICON(ICON_BLANK041)
+DEF_ICON(ICON_BLANK042)
+DEF_ICON(ICON_BLANK043)
+DEF_ICON(ICON_BLANK044)
+DEF_ICON(ICON_BLANK045)
+DEF_ICON(ICON_BLANK046)
+DEF_ICON(ICON_BLANK047)
+DEF_ICON(ICON_BLANK048)
+DEF_ICON(ICON_BLANK049)
+DEF_ICON(ICON_BLANK050)
+DEF_ICON(ICON_BLANK051)
+DEF_ICON(ICON_BLANK052)
+DEF_ICON(ICON_BLANK052b)
+	
+	/* EDITORS */
+DEF_ICON(ICON_VIEW3D)
+DEF_ICON(ICON_IPO)
+DEF_ICON(ICON_OOPS)
+DEF_ICON(ICON_BUTS)
+DEF_ICON(ICON_FILESEL)
+DEF_ICON(ICON_IMAGE_COL)
+DEF_ICON(ICON_INFO)
+DEF_ICON(ICON_SEQUENCE)
+DEF_ICON(ICON_TEXT)
+DEF_ICON(ICON_IMASEL)
+DEF_ICON(ICON_SOUND)
+DEF_ICON(ICON_ACTION)
+DEF_ICON(ICON_NLA)
+DEF_ICON(ICON_SCRIPTWIN)
+DEF_ICON(ICON_TIME)
+DEF_ICON(ICON_NODE)
+DEF_ICON(ICON_BLANK053)
+DEF_ICON(ICON_BLANK054)
+DEF_ICON(ICON_BLANK055)
+DEF_ICON(ICON_BLANK056)
+DEF_ICON(ICON_BLANK057)
+DEF_ICON(ICON_BLANK058)
+DEF_ICON(ICON_BLANK059)
+DEF_ICON(ICON_BLANK060)
+DEF_ICON(ICON_BLANK061)
+DEF_ICON(ICON_BLANK061b)
+	
+	/* MODES */
+DEF_ICON(ICON_OBJECT_DATAMODE)	// XXX fix this up
+DEF_ICON(ICON_EDITMODE_HLT)
+DEF_ICON(ICON_FACESEL_HLT)
+DEF_ICON(ICON_VPAINT_HLT)
+DEF_ICON(ICON_TPAINT_HLT)
+DEF_ICON(ICON_WPAINT_HLT)
+DEF_ICON(ICON_SCULPTMODE_HLT)
+DEF_ICON(ICON_POSE_HLT)
+DEF_ICON(ICON_PARTICLEMODE)
+DEF_ICON(ICON_BLANK062)
+DEF_ICON(ICON_BLANK063)
+DEF_ICON(ICON_BLANK064)
+DEF_ICON(ICON_BLANK065)
+DEF_ICON(ICON_BLANK066)
+DEF_ICON(ICON_BLANK067)
+DEF_ICON(ICON_BLANK068)
+DEF_ICON(ICON_BLANK069)
+DEF_ICON(ICON_BLANK070)
+DEF_ICON(ICON_BLANK071)
+DEF_ICON(ICON_BLANK072)
+DEF_ICON(ICON_BLANK073)
+DEF_ICON(ICON_BLANK074)
+DEF_ICON(ICON_BLANK075)
+DEF_ICON(ICON_BLANK076)
+DEF_ICON(ICON_BLANK077)
+DEF_ICON(ICON_BLANK077b)
+	
+	/* DATA */
+DEF_ICON(ICON_SCENE_DATA)
+DEF_ICON(ICON_RENDERLAYERS)
+DEF_ICON(ICON_WORLD_DATA)
+DEF_ICON(ICON_OBJECT_DATA)
+DEF_ICON(ICON_MESH_DATA)
+DEF_ICON(ICON_CURVE_DATA)
+DEF_ICON(ICON_META_DATA)
+DEF_ICON(ICON_LATTICE_DATA)
+DEF_ICON(ICON_LAMP_DATA)
+DEF_ICON(ICON_MATERIAL_DATA)
+DEF_ICON(ICON_TEXTURE_DATA)
+DEF_ICON(ICON_ANIM_DATA)
+DEF_ICON(ICON_CAMERA_DATA)
+DEF_ICON(ICON_PARTICLE_DATA)
+DEF_ICON(ICON_LIBRARY_DATA_DIRECT)
+DEF_ICON(ICON_GROUP)
+DEF_ICON(ICON_ARMATURE_DATA)
+DEF_ICON(ICON_POSE_DATA)
+DEF_ICON(ICON_BONE_DATA)
+DEF_ICON(ICON_CONSTRAINT)
+DEF_ICON(ICON_SHAPEKEY_DATA)
+DEF_ICON(ICON_BLANK079a)
+DEF_ICON(ICON_BLANK079)
+DEF_ICON(ICON_PACKAGE)
+DEF_ICON(ICON_UGLYPACKAGE)
+DEF_ICON(ICON_BLANK079b)
+
+	/* DATA */
+DEF_ICON(ICON_BRUSH_DATA)
+DEF_ICON(ICON_IMAGE_DATA)
+DEF_ICON(ICON_FILE)
+DEF_ICON(ICON_FCURVE)
+DEF_ICON(ICON_FONT_DATA)
+DEF_ICON(ICON_RENDER_RESULT)
+DEF_ICON(ICON_SURFACE_DATA)
+DEF_ICON(ICON_EMPTY_DATA)
+DEF_ICON(ICON_SETTINGS)
+DEF_ICON(ICON_BLANK080D)
+DEF_ICON(ICON_BLANK080E)
+DEF_ICON(ICON_BLANK080F)
+DEF_ICON(ICON_BLANK080)
+DEF_ICON(ICON_STRANDS)
+DEF_ICON(ICON_LIBRARY_DATA_INDIRECT)
+DEF_ICON(ICON_BLANK082)
+DEF_ICON(ICON_BLANK083)
+DEF_ICON(ICON_BLANK084)
+DEF_ICON(ICON_GROUP_BONE)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list