[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2438] branches/geodesic_domes/gui_259. py: removde extra dependency only generate is needed
Peter K.H. Gragert
pkhgragert at gmail.com
Fri Oct 14 12:13:58 CEST 2011
Revision: 2438
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2438
Author: pkhg
Date: 2011-10-14 10:13:58 +0000 (Fri, 14 Oct 2011)
Log Message:
-----------
removde extra dependency only generate is needed
and some cleanup done (removing cloud things)
Modified Paths:
--------------
branches/geodesic_domes/gui_259.py
Modified: branches/geodesic_domes/gui_259.py
===================================================================
--- branches/geodesic_domes/gui_259.py 2011-10-14 08:53:08 UTC (rev 2437)
+++ branches/geodesic_domes/gui_259.py 2011-10-14 10:13:58 UTC (rev 2438)
@@ -38,15 +38,16 @@
Rev 0.1 building menues PKHG
"""
from geodesic_domes import geodesic_259 as geodesic
+#print(dir(geodesic))
import bpy
from math import *
from bpy.props import EnumProperty, IntProperty, FloatProperty, StringProperty, BoolProperty
import sys
# Defintions of variables
-sys.path.append("c:\\Users\\Peter\\25blender\\blenderlatest\\2.59\\scripts\\addons\\geodesicDome")
-typesOfObjects =["Geodesic", "Grid", "Cylinder", "Parabola", "Torus", "Ball", "Your mesh"]
-sys.path.append("c:\\Users\\Peter\\25blender\\blenderlatest\\2.59\\scripts\\addons\\geodesicDome")
+#sys.path.append("c:\\")
+#typesOfObjects =["Geodesic", "Grid", "Cylinder", "Parabola", "Torus", "Ball", "Your mesh"]
+#sys.path.append("c:\\Users\\Peter\\25blender\\blenderlatest\\2.59\\scripts\\addons\\geodesicDome")
bpy.types.Scene.grid_xres= IntProperty(name="X res",min = 1, soft_max=10, max = 20, default = 2)
bpy.types.Scene.grid_yres= IntProperty(name="Y res",min = 1, soft_max=10, max = 20, default = 2)
@@ -123,7 +124,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",
+ name="Type to choose",
description="Choose Geodesic, Grid, Cylinder,Parabola, Torus, Ball, Your mesh",
items=[("0","Geodesic","Generate Geodesic"),
("1","Grid","Generate Grid"),
@@ -135,28 +136,15 @@
],
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="Base",
+ name="BaseType",
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 ",
@@ -181,41 +169,30 @@
layout = self.layout
col = layout.column(align=True)
- WhatToDo = geodesic.getActionToDo(active_obj)
+ WhatToDo = "GENERATE" # geodesic.getActionToDo(active_obj)
- if WhatToDo == 'DEGENERATE':
- col.operator("cloud.generate_cloud", text="DeGenerate")
-
- elif WhatToDo == 'CLOUD_CONVERT_TO_MESH':
- col.operator("cloud.generate_cloud", text="Convert to Mesh")
-
- elif WhatToDo == 'NO_SELECTION_DO_NOTHING':
- col.label(text="Select one or more")
- col.label(text="objects to generate")
- col.label(text="a cloud.")
-
- elif WhatToDo == 'CLOUD_DO_NOTHING':
- col.label(text="Must select")
- col.label(text="bound box")
-
- elif WhatToDo == 'GENERATE':
+ if WhatToDo == 'GENERATE':
col.operator("geodesic.generate_geodesic_dome", text="Generate your object")
col = layout.column()
- col.prop(context.scene,"mode")
-
- mode = context.scene.mode
+ col.label("First choice")
+ col.prop(context.scene,"choose_type")
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 and mode == "Main" :
-
+ 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")
+ else:
+ row.label("Make a choice of class!")
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, "base_type")
col.prop(context.scene, "orientation")
@@ -235,14 +212,14 @@
row = layout.row()
row.prop(context.scene,"square_z")
row.prop(context.scene,"super_rotate_nr2")
- elif tmp == 1 and mode == "Main":
+ elif tmp == 1:
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 and mode == "Main": #cylinder
+ elif tmp == 2: #cylinder
row = layout.row()
row.prop(context.scene,"cylinder_xres")
row.prop(context.scene,"cylinder_yres")
@@ -253,7 +230,7 @@
row.prop(context.scene,"cylinder_stretch")
row.prop(context.scene,"cylinder_gap")
- elif tmp == 3 and mode == "Main": #parabola
+ elif tmp == 3: #parabola
row = layout.row()
row.prop(context.scene,"parabola_xres")
row.prop(context.scene,"parabola_yres")
@@ -263,7 +240,7 @@
row = layout.row()
row.prop(context.scene,"parabola_stretch")
row.prop(context.scene,"parabola_gap")
- elif tmp == 4 and mode == "Main": #torus
+ elif tmp == 4: #torus
row = layout.row()
row.prop(context.scene,"torus_xres")
row.prop(context.scene,"torus_yres")
@@ -278,7 +255,7 @@
row.prop(context.scene,"torus_ygap")
row = layout.row()
row.prop(context.scene,"torus_xgap_rotate")
- elif tmp == 5 and mode == "Main": #ball
+ elif tmp == 5: #ball
row = layout.row()
row.prop(context.scene,"ball_xres")
row.prop(context.scene,"ball_yres")
@@ -290,9 +267,12 @@
row = layout.row()
row.prop(context.scene,"ball_xgap")
row.prop(context.scene,"ball_ygap")
- elif tmp==6 and mode == "Main":
+ else:
col.label("your mesh not yet implemented")
-
+ else:
+ col.label(text="Select one")
+ col.label(text="object to generate")
+ col.label(text="pkhg.")
@@ -313,25 +293,10 @@
'''
def execute(self, context):
geodesic.generate(context)
-
+ return {'FINISHED'}
-
-
-#pkhg see above! return {'FINISHED'}
-
-
-
-
def register():
bpy.utils.register_module(__name__)
-
-
-
-
-
-def unregister():
- bpy.utils.unregister_module(__name__)
-
del bpy.types.Scene.cloudparticles
del bpy.types.Scene.cloud_type
More information about the Bf-extensions-cvs
mailing list