[Bf-extensions-cvs] [1b69d107] master: ant landscape, fix for last commit
meta-androcto
noreply at git.blender.org
Mon Jun 19 03:49:15 CEST 2017
Commit: 1b69d1072370fbf76d943d4515c3cf4c26940032
Author: meta-androcto
Date: Mon Jun 19 11:48:50 2017 +1000
Branches: master
https://developer.blender.org/rBA1b69d1072370fbf76d943d4515c3cf4c26940032
ant landscape, fix for last commit
===================================================================
M ant_landscape/__init__.py
M ant_landscape/ant_functions.py
===================================================================
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:
More information about the Bf-extensions-cvs
mailing list