diff options
author | meta-androcto <meta.androcto1@gmail.com> | 2017-06-19 04:48:50 +0300 |
---|---|---|
committer | meta-androcto <meta.androcto1@gmail.com> | 2017-06-19 04:48:50 +0300 |
commit | 1b69d1072370fbf76d943d4515c3cf4c26940032 (patch) | |
tree | 6fd84e96b5e758379a3fcb984b568f93bddf8f2d | |
parent | 7580e19b74a2d7bb9f05e3ac40e1e2c1edc79fd9 (diff) |
ant landscape, fix for last commit
-rw-r--r-- | ant_landscape/__init__.py | 13 | ||||
-rw-r--r-- | ant_landscape/ant_functions.py | 13 |
2 files changed, 18 insertions, 8 deletions
diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py index 9d5c6e21..e5bbee55 100644 --- a/ant_landscape/__init__.py +++ b/ant_landscape/__init__.py @@ -22,14 +22,14 @@ bl_info = { "name": "A.N.T.Landscape", "author": "Jim Hazevoet", - "version": (0, 1, 7), - "blender": (2, 78, 0), + "version": (0, 1, 6), + "blender": (2, 77, 0), "location": "View3D > Tool Shelf", "description": "Another Noise Tool: Landscape and Displace", "warning": "", "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/" "Scripts/Add_Mesh/ANT_Landscape", - "category": "Add Mesh", + "category": "Mesh", } if "bpy" in locals(): @@ -64,13 +64,12 @@ from .ant_functions import ( # ------------------------------------------------------------ -# Menu and panels +# Menu's and panels def menu_func_eroder(self, context): - #self.layout.operator(Eroder.bl_idname, text="Eroder", icon='RNDCURVE') self.layout.operator('mesh.eroder', text="Eroder", icon='RNDCURVE') -# Define "Landscape" menu + def menu_func_landscape(self, context): self.layout.operator('mesh.landscape_add', text="Landscape", icon="RNDCURVE") @@ -795,14 +794,12 @@ def register(): bpy.types.INFO_MT_mesh_add.append(menu_func_landscape) bpy.types.Object.ant_landscape = PointerProperty(type=AntLandscapePropertiesGroup, name="ANT_Landscape", description="Landscape properties") bpy.types.VIEW3D_MT_paint_weight.append(menu_func_eroder) - bpy.types.VIEW3D_MT_object.append(menu_func_eroder) def unregister(): bpy.utils.unregister_module(__name__) bpy.types.INFO_MT_mesh_add.remove(menu_func_landscape) bpy.types.VIEW3D_MT_paint_weight.remove(menu_func_eroder) - bpy.types.VIEW3D_MT_object.remove(menu_func_eroder) if __name__ == "__main__": diff --git a/ant_landscape/ant_functions.py b/ant_landscape/ant_functions.py index 826d693e..01354295 100644 --- a/ant_landscape/ant_functions.py +++ b/ant_landscape/ant_functions.py @@ -1122,12 +1122,23 @@ class Eroder(bpy.types.Operator): default=False ) + weight_mode = BoolProperty( + name="Weight Paint Mode", + default=False, + description="Enter weightpaint mode" + ) + stats = Stats() counts= {} # add poll function to restrict action to mesh object in object mode def execute(self, context): + + # Enter WeightPaintMode + if self.weight_mode: + bpy.ops.paint.weight_paint_toggle() + ob = context.active_object #obwater = bpy.data.objects["water"] me = ob.data @@ -1322,6 +1333,8 @@ class Eroder(bpy.types.Operator): layout.prop(self,'smooth') + layout.prop(self,'weight_mode') + #if numexpr_available: # layout.prop(self, 'numexpr') #else: |