add advanced objects: split to 2 folders menu and panel

This commit is contained in:
Brendon Murphy 2017-06-15 22:06:00 +10:00
parent 17d2936873
commit c667612755
27 changed files with 551 additions and 293 deletions

View File

@ -1,51 +0,0 @@
# -*- coding:utf-8 -*-
# ##### 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 #####
bl_info = {
"name": "Delaunay Voronoi",
"description": "Points cloud Delaunay triangulation in 2.5D "
"(suitable for terrain modelling) or Voronoi diagram in 2D",
"author": "Domlysz, Oscurart",
"version": (1, 3),
"blender": (2, 7, 0),
"location": "View3D > Tools > GIS",
"warning": "",
"wiki_url": "https://github.com/domlysz/BlenderGIS/wiki",
"category": ""
}
if "bpy" in locals():
import importlib
importlib.reload(oscurart_constellation)
else:
from . import oscurart_constellation
import bpy
from .delaunayVoronoiBlender import ToolsPanelDelaunay
# Register
def register():
bpy.utils.register_module(__name__)
def unregister():
bpy.utils.unregister_module(__name__)

View File

@ -44,23 +44,16 @@ if "bpy" in locals():
importlib.reload(trilighting)
importlib.reload(pixelate_3d)
importlib.reload(object_add_chain)
importlib.reload(drop_to_ground)
importlib.reload(circle_array)
importlib.reload(unfold_transition)
importlib.reload(copy2)
importlib.reload(make_struts)
importlib.reload(random_box_structure)
importlib.reload(cubester)
importlib.reload(rope_alpha)
importlib.reload(add_mesh_aggregate)
importlib.reload(object_mangle_tools)
importlib.reload(arrange_on_curve)
importlib.reload(object_laplace_lightning)
importlib.reload(mesh_easylattice)
importlib.reload(DelaunayVoronoi)
importlib.reload(delaunayVoronoiBlender)
importlib.reload(oscurart_constellation)
importlib.reload(oscurart_chain_maker)
else:
from . import add_light_template
@ -70,24 +63,16 @@ else:
from . import trilighting
from . import pixelate_3d
from . import object_add_chain
from . import oscurart_chain_maker
from . import drop_to_ground
from . import circle_array
from . import unfold_transition
from . import copy2
from . import make_struts
from . import random_box_structure
from . import cubester
from . import rope_alpha
from . import add_mesh_aggregate
from . import object_mangle_tools
from . import arrange_on_curve
from . import object_laplace_lightning
from . import mesh_easylattice
from .delaunay_voronoi import DelaunayVoronoi
from .delaunay_voronoi import delaunayVoronoiBlender
from .delaunay_voronoi import oscurart_constellation
import bpy
from bpy.types import (
@ -256,6 +241,7 @@ class AdvancedObjPreferences(AddonPreferences):
box.label(text="Physics Tools:", icon="LAYER_ACTIVE")
box.label(text="Drop to Ground, Wrecking Ball and Cloth Rope", icon="LAYER_USED")
icon_2 = "TRIA_RIGHT" if not self.show_panel_list else "TRIA_DOWN"
box = layout.box()
box.prop(self, "show_panel_list", emboss=False, icon=icon_2)
@ -263,14 +249,8 @@ class AdvancedObjPreferences(AddonPreferences):
if self.show_panel_list:
box.label(text="Panels located in 3D View Tools Region > Create",
icon="LAYER_ACTIVE")
box.label(text="Drop to Ground", icon="LAYER_USED")
box.label(text="Unfold Transition", icon="LAYER_USED")
box.label(text="CubeSter", icon="LAYER_USED")
box.label(text="Mangle tools", icon="LAYER_USED")
box.label(text="Laplacian Lighting", icon="LAYER_USED")
box.label(text="Delaunay Voronoi", icon="LAYER_USED")
box.label(text="Duplicate on Curve (Shown if an Active Curve Object is it the 3D View)",
icon="LAYER_USED")
# Cubester update functions
@ -556,202 +536,6 @@ class AdvancedObjProperties(PropertyGroup):
],
default='O',
)
# object_laplace_lighting props
ORIGIN = FloatVectorProperty(
name="Origin charge"
)
GROUNDZ = IntProperty(
name="Ground Z coordinate"
)
HORDER = IntProperty(
name="Secondary paths orders",
default=1
)
# object_laplace_lighting UI props
TSTEPS = IntProperty(
name="Iterations",
default=350,
description="Number of cells to create\n"
"Will end early if hits ground plane or cloud"
)
GSCALE = FloatProperty(
name="Grid unit size",
default=0.12,
description="scale of cells, .25 = 4 cells per blenderUnit"
)
BIGVAR = FloatProperty(
name="Straightness",
default=6.3,
description="Straightness/branchiness of bolt, \n"
"<2 is mush, >12 is staight line, 6.3 is good"
)
GROUNDBOOL = BoolProperty(
name="Use Ground object",
description="Use ground plane or not",
default=True
)
GROUNDC = IntProperty(
name="Ground charge",
default=-250,
description="Charge of the ground plane"
)
CLOUDBOOL = BoolProperty(
name="Use Cloud object",
default=False,
description="Use cloud object - attracts and terminates like ground but\n"
"any obj instead of z plane\n"
"Can slow down loop if obj is large, overrides ground"
)
CLOUDC = IntProperty(
name="Cloud charge",
default=-1,
description="Charge of a cell in cloud object\n"
"(so total charge also depends on obj size)"
)
VMMESH = BoolProperty(
name="Multi mesh",
default=True,
description="Output to multi-meshes for different materials on main/sec/side branches"
)
VSMESH = BoolProperty(
name="Single mesh",
default=False,
description="Output to single mesh for using build modifier and particles for effects"
)
VCUBE = BoolProperty(
name="Cubes",
default=False,
description="CTRL-J after run to JOIN\n"
"Outputs a bunch of cube objects, mostly for testing"
)
VVOX = BoolProperty(
name="Voxel (experimental)",
default=False,
description="Output to a voxel file to bpy.data.filepath\FSLGvoxels.raw\n"
"(doesn't work well right now)"
)
IBOOL = BoolProperty(
name="Use Insulator object",
default=False,
description="Use insulator mesh object to prevent growth of bolt in areas"
)
OOB = StringProperty(
name="Select",
default="",
description="Origin of bolt, can be an Empty\n"
"if object is a mesh will use all verts as charges")
GOB = StringProperty(
name="Select",
default="",
description="Object to use as ground plane, uses z coord only"
)
COB = StringProperty(
name="Select",
default="",
description="Object to use as cloud, best to use a cube"
)
IOB = StringProperty(
name="Select",
default="",
description="Object to use as insulator, 'voxelized'\n"
"before generating bolt (can be slow)"
)
# object_mangle_tools properties
mangle_constraint_vector = BoolVectorProperty(
name="Mangle Constraint",
default=(True, True, True),
subtype='XYZ',
description="Constrains Mangle Direction"
)
mangle_random_magnitude = IntProperty(
name="Mangle Severity",
default=5,
min=1, max=30,
description="Severity of mangling"
)
mangle_name = StringProperty(
name="Shape Key Name",
default="mangle",
description="Name given for mangled shape keys"
)
# unfold_transition properties
unfold_arm_name = StringProperty(
default=""
)
unfold_modo = EnumProperty(
name="",
items=[("cursor", "3D Cursor", "Use the Distance to 3D Cursor"),
("weight", "Weight Map", "Use a Painted Weight map"),
("index", "Mesh Indices", "Use Faces and Vertices index")],
description="How to Sort Bones for animation", default="cursor"
)
unfold_flip = BoolProperty(
name="Flipping Faces",
default=False,
description="Rotate faces around the Center and skip Scaling - "
"keep checked for both operators"
)
unfold_fold_duration = IntProperty(
name="Total Time",
min=5, soft_min=25,
max=10000, soft_max=2500,
default=200,
description="Total animation length"
)
unfold_sca_time = IntProperty(
name="Scale Time",
min=1,
max=5000, soft_max=500,
default=10,
description="Faces scaling time"
)
unfold_rot_time = IntProperty(
name="Rotation Time",
min=1, soft_min=5,
max=5000, soft_max=500,
default=15,
description="Faces rotation time"
)
unfold_rot_max = IntProperty(
name="Angle",
min=-180,
max=180,
default=135,
description="Faces rotation angle"
)
unfold_fold_noise = IntProperty(
name="Noise",
min=0,
max=500, soft_max=50,
default=0,
description="Offset some faces animation"
)
unfold_bounce = FloatProperty(
name="Bounce",
min=0,
max=10, soft_max=2.5,
default=0,
description="Add some bounce to rotation"
)
unfold_from_point = BoolProperty(
name="Point",
default=False,
description="Scale faces from a Point instead of from an Edge"
)
unfold_wiggle_rot = BoolProperty(
name="Wiggle",
default=False,
description="Use all Axis + Random Rotation instead of X Aligned"
)
# oscurart_constellation
constellation_limit = FloatProperty(
name="Inital Threshold",
description="Edges will be created only if the distance\n"
"between vertices is smaller than this value\n"
"This is a starting value on Operator Invoke",
default=2,
min=0
)
def register():

View File

@ -0,0 +1,467 @@
# ##### 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 #####
# Contributed to by:
# meta-androcto, Bill Currie, Jorge Hernandez - Melenedez Jacob Morris, Oscurart #
# Rebellion, Antonis Karvelas, Eleanor Howick, lijenstina, Daniel Schalla, Domlysz #
# Unnikrishnan(kodemax), Florian Meyer, Omar ahmed, Brian Hinton (Nichod), liero #
# Atom, Dannyboy, Mano-Wii, Kursad Karatas, teldredge, Phil Cote #
bl_info = {
"name": "Add Advanced Object Panels",
"author": "meta-androcto,",
"version": (1, 1, 4),
"blender": (2, 7, 7),
"description": "Individual Create Panel Activation List",
"location": "Addons Preferences",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/3D_interaction/viewport_pies",
"category": "Object"
}
import bpy
from bpy.types import (
Menu,
AddonPreferences,
PropertyGroup,
)
from bpy.props import (
BoolProperty,
BoolVectorProperty,
EnumProperty,
FloatProperty,
FloatVectorProperty,
IntProperty,
StringProperty,
PointerProperty,
)
sub_modules_names = (
"drop_to_ground",
"object_laplace_lightning",
"object_mangle_tools",
"unfold_transition",
"delaunay_voronoi",
"oscurart_constellation",
)
sub_modules = [__import__(__package__ + "." + submod, {}, {}, submod) for submod in sub_modules_names]
sub_modules.sort(key=lambda mod: (mod.bl_info['category'], mod.bl_info['name']))
#Addons Preferences
def _get_pref_class(mod):
import inspect
for obj in vars(mod).values():
if inspect.isclass(obj) and issubclass(obj, PropertyGroup):
if hasattr(obj, 'bl_idname') and obj.bl_idname == mod.__name__:
return obj
def get_addon_preferences(name=''):
"""Acquisition and registration"""
addons = bpy.context.user_preferences.addons
if __name__ not in addons: # wm.read_factory_settings()
return None
addon_prefs = addons[__name__].preferences
if name:
if not hasattr(addon_prefs, name):
for mod in sub_modules:
if mod.__name__.split('.')[-1] == name:
cls = _get_pref_class(mod)
if cls:
prop = PointerProperty(type=cls)
setattr(AdvancedObjPreferences1, name, prop)
bpy.utils.unregister_class(AdvancedObjPreferences1)
bpy.utils.register_class(AdvancedObjPreferences1)
return getattr(addon_prefs, name, None)
else:
return addon_prefs
def register_submodule(mod):
if not hasattr(mod, '__addon_enabled__'):
mod.__addon_enabled__ = False
if not mod.__addon_enabled__:
mod.register()
mod.__addon_enabled__ = True
def unregister_submodule(mod):
if mod.__addon_enabled__:
mod.unregister()
mod.__addon_enabled__ = False
prefs = get_addon_preferences()
name = mod.__name__.split('.')[-1]
if hasattr(AdvancedObjPreferences1, name):
delattr(AdvancedObjPreferences1, name)
if prefs:
bpy.utils.unregister_class(AdvancedObjPreferences1)
bpy.utils.register_class(AdvancedObjPreferences1)
if name in prefs:
del prefs[name]
class AdvancedObjPreferences1(AddonPreferences):
bl_idname = __name__
def draw(self, context):
layout = self.layout
for mod in sub_modules:
mod_name = mod.__name__.split('.')[-1]
info = mod.bl_info
column = layout.column()
box = column.box()
# first stage
expand = getattr(self, 'show_expanded_' + mod_name)
icon = 'TRIA_DOWN' if expand else 'TRIA_RIGHT'
col = box.column()
row = col.row()
sub = row.row()
sub.context_pointer_set('addon_prefs', self)
op = sub.operator('wm.context_toggle', text='', icon=icon,
emboss=False)
op.data_path = 'addon_prefs.show_expanded_' + mod_name
sub.label('{}: {}'.format(info['category'], info['name']))
sub = row.row()
sub.alignment = 'RIGHT'
if info.get('warning'):
sub.label('', icon='ERROR')
sub.prop(self, 'use_' + mod_name, text='')
# The second stage
if expand:
if info.get('description'):
split = col.row().split(percentage=0.15)
split.label('Description:')
split.label(info['description'])
if info.get('location'):
split = col.row().split(percentage=0.15)
split.label('Location:')
split.label(info['location'])
if info.get('author') and info.get('author') != 'chromoly':
split = col.row().split(percentage=0.15)
split.label('Author:')
split.label(info['author'])
if info.get('version'):
split = col.row().split(percentage=0.15)
split.label('Version:')
split.label('.'.join(str(x) for x in info['version']),
translate=False)
if info.get('warning'):
split = col.row().split(percentage=0.15)
split.label('Warning:')
split.label(' ' + info['warning'], icon='ERROR')
tot_row = int(bool(info.get('wiki_url')))
if tot_row:
split = col.row().split(percentage=0.15)
split.label(text='Internet:')
if info.get('wiki_url'):
op = split.operator('wm.url_open',
text='Documentation', icon='HELP')
op.url = info.get('wiki_url')
for i in range(4 - tot_row):
split.separator()
# Details and settings
if getattr(self, 'use_' + mod_name):
prefs = get_addon_preferences(mod_name)
if prefs and hasattr(prefs, 'draw'):
box = box.column()
prefs.layout = box
try:
prefs.draw(context)
except:
traceback.print_exc()
box.label(text='Error (see console)', icon='ERROR')
del prefs.layout
row = layout.row()
row.label("End of Panel Activations")
for mod in sub_modules:
info = mod.bl_info
mod_name = mod.__name__.split('.')[-1]
def gen_update(mod):
def update(self, context):
if getattr(self, 'use_' + mod.__name__.split('.')[-1]):
if not mod.__addon_enabled__:
register_submodule(mod)
else:
if mod.__addon_enabled__:
unregister_submodule(mod)
return update
prop = BoolProperty(
name=info['name'],
description=info.get('description', ''),
update=gen_update(mod),
)
setattr(AdvancedObjPreferences1, 'use_' + mod_name, prop)
prop = BoolProperty()
setattr(AdvancedObjPreferences1, 'show_expanded_' + mod_name, prop)
class AdvancedObjProperties1(PropertyGroup):
# main properties
# object_laplace_lighting props
ORIGIN = FloatVectorProperty(
name="Origin charge"
)
GROUNDZ = IntProperty(
name="Ground Z coordinate"
)
HORDER = IntProperty(
name="Secondary paths orders",
default=1
)
# object_laplace_lighting UI props
TSTEPS = IntProperty(
name="Iterations",
default=350,
description="Number of cells to create\n"
"Will end early if hits ground plane or cloud"
)
GSCALE = FloatProperty(
name="Grid unit size",
default=0.12,
description="scale of cells, .25 = 4 cells per blenderUnit"
)
BIGVAR = FloatProperty(
name="Straightness",
default=6.3,
description="Straightness/branchiness of bolt, \n"
"<2 is mush, >12 is staight line, 6.3 is good"
)
GROUNDBOOL = BoolProperty(
name="Use Ground object",
description="Use ground plane or not",
default=True
)
GROUNDC = IntProperty(
name="Ground charge",
default=-250,
description="Charge of the ground plane"
)
CLOUDBOOL = BoolProperty(
name="Use Cloud object",
default=False,
description="Use cloud object - attracts and terminates like ground but\n"
"any obj instead of z plane\n"
"Can slow down loop if obj is large, overrides ground"
)
CLOUDC = IntProperty(
name="Cloud charge",
default=-1,
description="Charge of a cell in cloud object\n"
"(so total charge also depends on obj size)"
)
VMMESH = BoolProperty(
name="Multi mesh",
default=True,
description="Output to multi-meshes for different materials on main/sec/side branches"
)
VSMESH = BoolProperty(
name="Single mesh",
default=False,
description="Output to single mesh for using build modifier and particles for effects"
)
VCUBE = BoolProperty(
name="Cubes",
default=False,
description="CTRL-J after run to JOIN\n"
"Outputs a bunch of cube objects, mostly for testing"
)
VVOX = BoolProperty(
name="Voxel (experimental)",
default=False,
description="Output to a voxel file to bpy.data.filepath\FSLGvoxels.raw\n"
"(doesn't work well right now)"
)
IBOOL = BoolProperty(
name="Use Insulator object",
default=False,
description="Use insulator mesh object to prevent growth of bolt in areas"
)
OOB = StringProperty(
name="Select",
default="",
description="Origin of bolt, can be an Empty\n"
"if object is a mesh will use all verts as charges")
GOB = StringProperty(
name="Select",
default="",
description="Object to use as ground plane, uses z coord only"
)
COB = StringProperty(
name="Select",
default="",
description="Object to use as cloud, best to use a cube"
)
IOB = StringProperty(
name="Select",
default="",
description="Object to use as insulator, 'voxelized'\n"
"before generating bolt (can be slow)"
)
# object_mangle_tools properties
mangle_constraint_vector = BoolVectorProperty(
name="Mangle Constraint",
default=(True, True, True),
subtype='XYZ',
description="Constrains Mangle Direction"
)
mangle_random_magnitude = IntProperty(
name="Mangle Severity",
default=5,
min=1, max=30,
description="Severity of mangling"
)
mangle_name = StringProperty(
name="Shape Key Name",
default="mangle",
description="Name given for mangled shape keys"
)
# unfold_transition properties
unfold_arm_name = StringProperty(
default=""
)
unfold_modo = EnumProperty(
name="",
items=[("cursor", "3D Cursor", "Use the Distance to 3D Cursor"),
("weight", "Weight Map", "Use a Painted Weight map"),
("index", "Mesh Indices", "Use Faces and Vertices index")],
description="How to Sort Bones for animation", default="cursor"
)
unfold_flip = BoolProperty(
name="Flipping Faces",
default=False,
description="Rotate faces around the Center and skip Scaling - "
"keep checked for both operators"
)
unfold_fold_duration = IntProperty(
name="Total Time",
min=5, soft_min=25,
max=10000, soft_max=2500,
default=200,
description="Total animation length"
)
unfold_sca_time = IntProperty(
name="Scale Time",
min=1,
max=5000, soft_max=500,
default=10,
description="Faces scaling time"
)
unfold_rot_time = IntProperty(
name="Rotation Time",
min=1, soft_min=5,
max=5000, soft_max=500,
default=15,
description="Faces rotation time"
)
unfold_rot_max = IntProperty(
name="Angle",
min=-180,
max=180,
default=135,
description="Faces rotation angle"
)
unfold_fold_noise = IntProperty(
name="Noise",
min=0,
max=500, soft_max=50,
default=0,
description="Offset some faces animation"
)
unfold_bounce = FloatProperty(
name="Bounce",
min=0,
max=10, soft_max=2.5,
default=0,
description="Add some bounce to rotation"
)
unfold_from_point = BoolProperty(
name="Point",
default=False,
description="Scale faces from a Point instead of from an Edge"
)
unfold_wiggle_rot = BoolProperty(
name="Wiggle",
default=False,
description="Use all Axis + Random Rotation instead of X Aligned"
)
# oscurart_constellation
constellation_limit = FloatProperty(
name="Inital Threshold",
description="Edges will be created only if the distance\n"
"between vertices is smaller than this value\n"
"This is a starting value on Operator Invoke",
default=2,
min=0
)
# Class list
classes = (
AdvancedObjPreferences1,
AdvancedObjProperties1,
)
def register():
for cls in classes:
bpy.utils.register_class(cls)
bpy.types.Scene.advanced_objects1 = PointerProperty(
type=AdvancedObjProperties1
)
prefs = get_addon_preferences()
for mod in sub_modules:
if not hasattr(mod, '__addon_enabled__'):
mod.__addon_enabled__ = False
name = mod.__name__.split('.')[-1]
if getattr(prefs, 'use_' + name):
register_submodule(mod)
def unregister():
for mod in sub_modules:
if mod.__addon_enabled__:
unregister_submodule(mod)
del bpy.types.Scene.advanced_objects1
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
if __name__ == "__main__":
register()

View File

@ -1,5 +1,38 @@
# -*- coding:utf-8 -*-
# ##### 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 #####
bl_info = {
"name": "Delaunay Voronoi",
"description": "Points cloud Delaunay triangulation in 2.5D "
"(suitable for terrain modelling) or Voronoi diagram in 2D",
"author": "Domlysz, Oscurart",
"version": (1, 3),
"blender": (2, 7, 0),
"location": "View3D > Tools > GIS",
"warning": "",
"wiki_url": "https://github.com/domlysz/BlenderGIS/wiki",
"category": "Add Mesh"
}
import bpy
from .DelaunayVoronoi import (
computeVoronoiDiagram,
@ -75,12 +108,6 @@ class ToolsPanelDelaunay(Panel):
col.operator("delaunay.triangulation")
col.operator("voronoi.tesselation")
box = layout.box()
col = box.column(align=True)
col.label("Constellation:")
col.operator("mesh.constellation", text="Cross Section")
col.prop(adv_obj, "constellation_limit")
class OBJECT_OT_TriangulateButton(Operator):
bl_idname = "delaunay.triangulation"
@ -266,3 +293,20 @@ class OBJECT_OT_VoronoiButton(Operator):
self.report({"INFO"}, "Mesh created (" + str(len(polyIdx)) + " polygons)")
return {'FINISHED'}
# Register
def register():
bpy.utils.register_class(OBJECT_OT_VoronoiButton)
bpy.utils.register_class(OBJECT_OT_TriangulateButton)
bpy.utils.register_class(ToolsPanelDelaunay)
def unregister():
bpy.utils.unregister_class(OBJECT_OT_VoronoiButton)
bpy.utils.unregister_class(OBJECT_OT_TriangulateButton)
bpy.utils.unregister_class(ToolsPanelDelaunay)
if __name__ == "__main__":
register()

View File

@ -19,13 +19,10 @@
bl_info = {
"name": "Drop to Ground1",
"author": "Unnikrishnan(kodemax), Florian Meyer(testscreenings)",
"version": (1, 2, 1),
"blender": (2, 71, 0),
"location": "3D View > Toolshelf > Tools Tab",
"description": "Drop selected objects on active object",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Object/Drop_to_ground",
"category": "Object"}

View File

@ -22,12 +22,10 @@
bl_info = {
"name": "Laplacian Lightning",
"author": "teldredge",
"version": (0, 2, 9),
"blender": (2, 78, 0),
"location": "View3D > Toolshelf > Create Tab",
"description": "Lightning mesh generator using laplacian growth algorithm",
"warning": "",
"wiki_url": "http://www.funkboxing.com/wordpress/?p=301",
"category": "Object"}
# BLENDER LAPLACIAN LIGHTNING

View File

@ -23,7 +23,6 @@
bl_info = {
"name": "Mangle Tools",
"author": "Phil Cote",
"version": (0, 2, 2),
"blender": (2, 71, 0),
"location": "View3D > Toolshelf > Tools Tab",
"description": "Set of tools to mangle curves, meshes, and shape keys",

View File

@ -19,7 +19,6 @@
bl_info = {
"name": "Mesh: Constellation",
"author": "Oscurart",
"version": (1, 1, 1),
"blender": (2, 67, 0),
"location": "Add > Mesh > Constellation",
"description": "Create a new Mesh From Selected",
@ -31,10 +30,12 @@ bl_info = {
# the adv_obj and advanced_objects patterns
import bpy
from bpy.types import Operator
from bpy.props import FloatProperty
from math import sqrt
from bpy.types import (
Operator,
Panel,
)
def VertDis(a, b):
dst = sqrt(pow(a.co.x - b.co.x, 2) +
@ -108,16 +109,33 @@ class Oscurart_Constellation(Operator):
return {'FINISHED'}
class Constellation_Operator_Panel(Panel):
bl_label = "Constellation"
bl_region_type = "TOOLS"
bl_space_type = "VIEW_3D"
bl_options = {'DEFAULT_CLOSED'}
bl_context = "objectmode"
bl_category = "Create"
def draw(self, context):
layout = self.layout
adv_obj = context.scene.advanced_objects
box = layout.box()
col = box.column(align=True)
col.label("Constellation:")
col.operator("mesh.constellation", text="Cross Section")
col.prop(adv_obj, "constellation_limit")
# Register
def register():
bpy.utils.register_class(Oscurart_Constellation)
bpy.utils.register_class(Constellation_Operator_Panel)
def unregister():
bpy.utils.unregister_class(Oscurart_Constellation)
bpy.utils.unregister_class(Constellation_Operator_Panel)
if __name__ == "__main__":
register()

View File

@ -3,7 +3,6 @@
bl_info = {
"name": "Unfold transition",
"author": "Liero, Atom",
"version": (0, 1, 2),
"location": "Tool bar > Animation tab > UnFold Transition",
"description": "Simple unfold transition / animation, will "
"separate faces and set up an armature",
@ -327,17 +326,20 @@ class PanelFOLD(Panel):
if not adv_obj.unfold_flip:
row.prop(adv_obj, "unfold_from_point")
classes = (
Set_Up_Fold,
Animate_Fold,
PanelFOLD,
)
def register():
bpy.utils.register_class(Set_Up_Fold)
bpy.utils.register_class(Animate_Fold)
bpy.utils.register_class(PanelFOLD)
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
bpy.utils.unregister_class(Set_Up_Fold)
bpy.utils.unregister_class(Animate_Fold)
bpy.utils.unregister_class(PanelFOLD)
for cls in classes:
bpy.utils.unregister_class(cls)
if __name__ == "__main__":