[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2152] branches/ivygen/pkhg_ivy/ makePanelVoorIvy.py: proposal menu for ivygen

Peter K.H. Gragert pkhgragert at gmail.com
Thu Jul 21 07:03:35 CEST 2011


Revision: 2152
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2152
Author:   pkhg
Date:     2011-07-21 05:03:34 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
proposal menu for ivygen

Added Paths:
-----------
    branches/ivygen/pkhg_ivy/makePanelVoorIvy.py

Added: branches/ivygen/pkhg_ivy/makePanelVoorIvy.py
===================================================================
--- branches/ivygen/pkhg_ivy/makePanelVoorIvy.py	                        (rev 0)
+++ branches/ivygen/pkhg_ivy/makePanelVoorIvy.py	2011-07-21 05:03:34 UTC (rev 2152)
@@ -0,0 +1,85 @@
+import bpy
+from bpy.props import *
+class OBJECT_PT_IvyPanel(bpy.types.Panel):
+    bl_label = "Ivy Panel"
+    bl_space_type = "VIEW_3D"
+    bl_region_type = 'TOOL_PROPS'
+
+#make parameters changable
+    sce = bpy.types.Scene
+#    sce.value = *Property( description = "des", default = None)
+#    sce.* = FloatProperty(name = "*", min = 0.1, max = 1.0,  description = "des", default = 0.5)
+
+#Weights
+    sce.primaryWeight = FloatProperty(name = "Wprimary", min = 0.1, max = 1.0,  description = "primary Weight ...", default = 0.5)
+    sce.randomWeight = FloatProperty(name = "Wrandom", min = 0.1, max = 1.0,  description = "random Weidht  ...", default = 0.2)
+    sce.gravityWeight = FloatProperty(name = "Wgravity", min = -1.0, max = 10.0,  description = "gravity Weight", default = 1.0)        
+    sce.adhesionWeight = FloatProperty(name = "adhesion Weight", min = 0.1, max = 1.0,  description = "adhesion Weight", default = 0.1)
+#Probabilities
+    sce.branchingProbability = FloatProperty(name = "Pbranching", min = 0.1, max = 1.0,  description = "branching Probability", default = 0.5)
+    sce.leafProbability = FloatProperty(name = "Pbleaf", min = 0.1, max = 1.0,  description = "leaf Probabilty", default = 0.5)
+#Sizes
+    sce.ivySize = FloatProperty(name = "Sivy", min = 0.1, max = 5.0,  description = "ivy Size", default = 1.5)
+#        self.ivyLeafSize = 1.5
+#        self.ivyBranchSize = 0.15
+    sce.ivyLeafSize = FloatProperty(name = "SivyLeaf", min = 0.1, max = 5.0,  description = "ivyleaf Size", default = 1.5)
+    sce.ivyBranchSize = FloatProperty(name = "SivyBranch", min = 0.1, max = 5.0,  description = "ivyBranch Size", default = 0.15)
+#Distances
+#        self.maxFloatLength = 0.1
+#        self.maxAdhesionDistance = 0.1
+#        self.maxLength = 0.0
+
+    sce.maxFloatLength = FloatProperty(name = "Lfloat", min = 0.1, max = 5.0,  description = "max. Float Lenght ", default = 0.15)
+    sce.maxAdhesionDistance = FloatProperty(name = "LadhesionDist", min = 0.01, max = 5.0,  description = "max. Adhesion Distance", default = 0.1)
+    sce.maxLength = FloatProperty(name = "Llength", min = 0.1, max = 5.0,  description = "max Lenght", default = 0.15)
+
+
+
+#layout GUI    
+    def draw(self, context):
+        layout = self.layout
+        scn = context.scene
+        row1 = layout.row(align=True)
+        row1.label("Weight values")
+        row2 = layout.row(align=True)        
+        box2 = row2.box()
+        box2.prop(scn,"primaryWeight")
+        box2.prop(scn,"randomWeight")
+        box2.prop(scn,"gravityWeight")
+        box2.prop(scn,"adhesionWeight")
+        
+        row3 = layout.row(align=True)
+        row3.label("set Probabilities")        
+        row4 = layout.row(align=True)
+        box4 = row4.box()
+        box4.prop(scn,"branchingProbability")
+        box4.prop(scn,"leafProbability")
+        
+        row5 = layout.row(align=True)
+        row5.label("set Sizes")
+        row6 = layout.row(align=True)        
+        box6 = row6.box()
+        box6.prop(scn,"ivySize")
+        box6.prop(scn,"ivyLeafSize")
+        box6.prop(scn,"ivyBranchSize")
+        row7 = layout.row(align = True)
+
+        row7.label("Lengthes")
+        row8 = layout.row()
+        box8 = row8.box()
+        box8.prop(scn,"maxFloatLength")
+        box8.prop(scn,"maxAdhesionDistance")
+        box8.prop(scn,"maxLength")
+
+        row9 = layout.row()
+        row9.label("the action!")
+def register():
+    bpy.utils.register_module(__name__)
+
+def unregister():
+    bpy.utils.unregister_module(__name__)
+    pass
+
+if __name__ == "__main__":
+    register()
+    



More information about the Bf-extensions-cvs mailing list