[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2432] branches/geodesic_domes/gui_259. py: removed unecessary labels from the GUI to make it more compact ( anything help wise will be in the help mode) and added the main tab from the original with the code name [mode]

james bond thekilon at yahoo.co.uk
Thu Oct 13 15:47:25 CEST 2011


Revision: 2432
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2432
Author:   kilon
Date:     2011-10-13 13:47:24 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
removed unecessary labels from the GUI to make it more compact (anything help wise will be in the help mode) and added the main tab from the original with the code name [mode]

Modified Paths:
--------------
    branches/geodesic_domes/gui_259.py

Modified: branches/geodesic_domes/gui_259.py
===================================================================
--- branches/geodesic_domes/gui_259.py	2011-10-13 12:36:20 UTC (rev 2431)
+++ branches/geodesic_domes/gui_259.py	2011-10-13 13:47:24 UTC (rev 2432)
@@ -123,7 +123,7 @@
 bpy.types.Scene.super_rotate_nr2 = FloatProperty(name="2nd Super_rotate",min = 0.001, soft_min=0.1, soft_max=4,max = 5, default = 1.0)
 
 bpy.types.Scene.choose_type = EnumProperty(
-    name="Type to choose",
+    name="Type",
     description="Choose Geodesic, Grid, Cylinder,Parabola, Torus, Ball, Your mesh",
     items=[("0","Geodesic","Generate Geodesic"),
            ("1","Grid","Generate Grid"),
@@ -135,15 +135,28 @@
 
           ],
     default='0')
+
+bpy.types.Scene.mode = EnumProperty(
+    name="Mode",
+    description="Choose Mode of Action ",
+    items=[("Main","Main","Main"),
+           ("Formula","Formula","Formula"),
+           ("Faces","Faces","Faces"),
+           ("Struts","Struts","Struts"),
+           ("Hubs","Hubs","Hubs"),
+           ("Help","Help","Help"),
+           ],
+    default='Main')
     
 bpy.types.Scene.base_type = EnumProperty(
-    name="BaseType",
+    name="Base",
     description="Choose between Tetrahedron, Octahedron, Icosahedron ",
     items=[("0","Tetrahedron","Generate Tetrahedron"),
            ("1","Octahedron","Generate Octahedron"),
            ("2","Icosahedron","Generate Icosahedron"),
           ],
     default='0')
+
 bpy.types.Scene.orientation = EnumProperty(
     name="Pointer",
     description="Choose what type of top ",
@@ -188,29 +201,21 @@
         elif WhatToDo == 'GENERATE':
             col.operator("geodesic.generate_geodesic_dome", text="Generate your object")
             col = layout.column()
-            col.label("First choice")
-            col.prop(context.scene,"choose_type")
+            col.prop(context.scene,"mode")
+            
+            mode = context.scene.mode
             tmp = int(context.scene.choose_type)
+            if mode== "Main":
+                col.prop(context.scene,"choose_type")
+            
 #pkhg ok            print("\n ======= type =",typesOfObjects[tmp])
             #geodesic
-            if tmp == 0:
-                row = layout.row()            
-                if context.scene.class_one:
-                    row.label("Class 1 AKTIV")
-                elif context.scene.class_two:
-                    row.label("Class 2 AKTIVE")
-    #            elif context.scene.class_two and context.scene.class_one:
-    #                row.label("Class1 takes prererence")
-                else:
-                    row.label("Make a choice of class!")
+            if tmp == 0 and mode == "Main" :
+                
                 row = layout.row()                
                 row.prop(context.scene,"class_one")            
                 row.prop(context.scene,"class_two")                 
                     
-                col.label(text="PKHG: Select one")
-                col.label(text="object to generate")
-    #            col.prop(context.scene, "cloud_type")
-    
                 col.prop(context.scene, "base_type")
                 col.prop(context.scene, "orientation")
     
@@ -230,14 +235,14 @@
                 row = layout.row()
                 row.prop(context.scene,"square_z")
                 row.prop(context.scene,"super_rotate_nr2")
-            elif tmp == 1:
+            elif tmp == 1 and mode == "Main":
                 row = layout.row()
                 row.prop(context.scene,"grid_xres")
                 row.prop(context.scene,"grid_yres")
                 row = layout.row()
                 row.prop(context.scene,"grid_x_size")
                 row.prop(context.scene,"grid_y_size")
-            elif tmp == 2: #cylinder
+            elif tmp == 2 and mode == "Main": #cylinder
                 row = layout.row()
                 row.prop(context.scene,"cylinder_xres")
                 row.prop(context.scene,"cylinder_yres")
@@ -248,7 +253,7 @@
                 row.prop(context.scene,"cylinder_stretch")
                 row.prop(context.scene,"cylinder_gap")
                 
-            elif tmp == 3: #parabola
+            elif tmp == 3 and mode == "Main": #parabola
                 row = layout.row()
                 row.prop(context.scene,"parabola_xres")
                 row.prop(context.scene,"parabola_yres")
@@ -258,7 +263,7 @@
                 row = layout.row()
                 row.prop(context.scene,"parabola_stretch")
                 row.prop(context.scene,"parabola_gap")
-            elif tmp == 4: #torus
+            elif tmp == 4 and mode == "Main": #torus
                 row = layout.row()
                 row.prop(context.scene,"torus_xres")
                 row.prop(context.scene,"torus_yres")
@@ -273,7 +278,7 @@
                 row.prop(context.scene,"torus_ygap")
                 row = layout.row()
                 row.prop(context.scene,"torus_xgap_rotate")
-            elif tmp == 5: #ball
+            elif tmp == 5 and mode == "Main": #ball
                 row = layout.row()
                 row.prop(context.scene,"ball_xres")
                 row.prop(context.scene,"ball_yres")
@@ -285,12 +290,9 @@
                 row = layout.row()
                 row.prop(context.scene,"ball_xgap")
                 row.prop(context.scene,"ball_ygap")
-            else:                
+            elif tmp==6 and mode == "Main":                
                 col.label("your mesh not yet implemented")
-        else:
-            col.label(text="Select one")
-            col.label(text="object to generate")
-            col.label(text="pkhg.")
+        
 
 
 



More information about the Bf-extensions-cvs mailing list