[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [944] branches/ivygen/ivy_rewrite.py: = = ivy ==
Florian Meyer
florianfelix at web.de
Tue Aug 24 18:51:47 CEST 2010
Revision: 944
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=944
Author: testscreenings
Date: 2010-08-24 18:51:47 +0200 (Tue, 24 Aug 2010)
Log Message:
-----------
== ivy ==
- initial file for ivy rewrite
- nothing to see here
Added Paths:
-----------
branches/ivygen/ivy_rewrite.py
Added: branches/ivygen/ivy_rewrite.py
===================================================================
--- branches/ivygen/ivy_rewrite.py (rev 0)
+++ branches/ivygen/ivy_rewrite.py 2010-08-24 16:51:47 UTC (rev 944)
@@ -0,0 +1,115 @@
+
+bl_addon_info = {
+ 'name': 'Add Mesh: Ivy REWRITE',
+ 'author': 'tstscr',
+ 'version': '0.1',
+ 'blender': (2, 5, 3),
+ 'location': 'View3D > Add Mesh > Ivy Generator',
+ 'description': 'Add an Ivy Curve',
+ 'warning': '',
+ 'wiki_url': 'http://wiki.blender.org/index.php/User:Testscreenings/Ivy_port',
+ 'tracker_url': '',
+ 'category': 'USER'}
+# ##### 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+import bpy
+import mathutils
+import random
+import math
+import noise
+from bpy.props import *
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+##############################################################
+############ OPERATOR ########################################
+
+class ivy_generator_rewrite(bpy.types.Operator):
+ bl_idname = "ivy_generator"
+ bl_label = "ivy_generator_rewrite"
+ bl_options = {'REGISTER', 'UNDO'}
+
+ #### Properties ####
+ ivySeed = IntProperty(name='Seed',
+ min=0, soft_min=0,
+ default=1)
+ ivyIter = IntProperty(name='Iterations',
+ min=0, soft_min=0,
+ default=89)
+ ivyGravityWeight = FloatProperty(name='Gravity Weight',
+ min=0,soft_min=0,
+ max=1,soft_max=1,
+ default=0.1)
+ ivyPrimaryWeight = FloatProperty(name='Primary Weight',
+ min=0,soft_min=0,
+ max=1,soft_max=1,
+ default=0.5)
+ ivyAdhesionWeight = FloatProperty(name='Adhesion Weight',
+ min=0,soft_min=0,
+ max=1,soft_max=1,
+ default=0.5)
+ ivyRandomWeight = FloatProperty(name='Random Weight',
+ min=0,soft_min=0,
+ max=1,soft_max=1,
+ default=0.5)
+ ivyGlobScale = FloatProperty(name='Globel Scale',
+ min=0,soft_min=0,
+ default=1)
+ ivyMaxAdhesionDist = FloatProperty(name='MaxAdhesionDist',
+ min=0,soft_min=0,
+ default=1)
+
+
+ ##### POLL #####
+ @classmethod
+ def poll(cls, context):
+ return (context.active_object and
+ context.active_object.type == 'MESH')
+
+ ##### EXECUTE #####
+ def execute(self, context):
+ import bpy
+ print('\n____________START_____________')
+
+
+
+ return {'FINISHED'}
+
+
+
+######## REGISTER #########
+def ivy_button(self, context):
+ self.layout.operator(ivy_generator_rewrite.bl_idname, text="ivy_generator", icon="PLUGIN")
+
+def register():
+ bpy.types.VIEW3D_PT_tools_objectmode.prepend(ivy_button) #just for testing
+def unregister():
+ bpy.types.VIEW3D_PT_tools_objectmode.remove(ivy_button) #just for testing
+if __name__ == "__main__":
+ register()
\ No newline at end of file
More information about the Bf-extensions-cvs
mailing list