[Bf-extensions-cvs] [200a9bbb] master: Add Advanced Objects: Fix missing import, small cleanup
lijenstina
noreply at git.blender.org
Sat Jun 17 02:10:24 CEST 2017
Commit: 200a9bbbd480251d774424700a424f105022535a
Author: lijenstina
Date: Sat Jun 17 02:09:38 2017 +0200
Branches: master
https://developer.blender.org/rBA200a9bbbd480251d774424700a424f105022535a
Add Advanced Objects: Fix missing import, small cleanup
Oscurart Chain Maker was missing from the menu init
Small cleanup
Remove unused imports
Drop To Ground:
fix a few issues with the object types crashes
Better tooltips, logging and help description
Clear the reported variable on reruns
===================================================================
M add_advanced_objects_menu/__init__.py
M add_advanced_objects_menu/arrange_on_curve.py
M add_advanced_objects_panels/__init__.py
M add_advanced_objects_panels/delaunay_voronoi.py
M add_advanced_objects_panels/drop_to_ground.py
M add_advanced_objects_panels/object_laplace_lightning.py
M add_advanced_objects_panels/object_mangle_tools.py
M add_advanced_objects_panels/oscurart_constellation.py
M add_advanced_objects_panels/unfold_transition.py
===================================================================
diff --git a/add_advanced_objects_menu/__init__.py b/add_advanced_objects_menu/__init__.py
index b1d86454..cacf8419 100644
--- a/add_advanced_objects_menu/__init__.py
+++ b/add_advanced_objects_menu/__init__.py
@@ -24,8 +24,8 @@
bl_info = {
"name": "Add Advanced Objects",
- "author": "Meta Androcto,",
- "version": (0, 1, 3),
+ "author": "Meta Androcto",
+ "version": (0, 1, 4),
"blender": (2, 78, 0),
"location": "View3D > Add ",
"description": "Add Object & Camera extras",
@@ -44,6 +44,7 @@ if "bpy" in locals():
importlib.reload(trilighting)
importlib.reload(pixelate_3d)
importlib.reload(object_add_chain)
+ importlib.reload(oscurart_chain_maker)
importlib.reload(circle_array)
importlib.reload(copy2)
importlib.reload(make_struts)
@@ -63,6 +64,7 @@ else:
from . import trilighting
from . import pixelate_3d
from . import object_add_chain
+ from . import oscurart_chain_maker
from . import circle_array
from . import copy2
from . import make_struts
@@ -82,10 +84,8 @@ from bpy.types import (
)
from bpy.props import (
BoolProperty,
- BoolVectorProperty,
EnumProperty,
FloatProperty,
- FloatVectorProperty,
IntProperty,
StringProperty,
PointerProperty,
@@ -241,7 +241,6 @@ 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)
@@ -250,7 +249,8 @@ class AdvancedObjPreferences(AddonPreferences):
box.label(text="Panels located in 3D View Tools Region > Create",
icon="LAYER_ACTIVE")
box.label(text="CubeSter", 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
diff --git a/add_advanced_objects_menu/arrange_on_curve.py b/add_advanced_objects_menu/arrange_on_curve.py
index 14017480..b811263b 100644
--- a/add_advanced_objects_menu/arrange_on_curve.py
+++ b/add_advanced_objects_menu/arrange_on_curve.py
@@ -5,7 +5,7 @@ bl_info = {
"author": "Mano-Wii",
"version": (6, 3, 0),
"blender": (2, 7, 7),
- "location": "View3D > TOOLS",
+ "location": "3D View > Toolshelf > Create > Arrange on Curve",
"description": "Arrange objects along a curve",
"warning": "Select curve",
"wiki_url": "",
@@ -35,7 +35,7 @@ class PanelDupliCurve(Panel):
bl_region_type = "TOOLS"
bl_context = "objectmode"
bl_category = "Create"
- bl_label = "Duplicate on curve"
+ bl_label = "Arrange on Curve"
bl_options = {'DEFAULT_CLOSED'}
@classmethod
diff --git a/add_advanced_objects_panels/__init__.py b/add_advanced_objects_panels/__init__.py
index 81950727..439f9e41 100644
--- a/add_advanced_objects_panels/__init__.py
+++ b/add_advanced_objects_panels/__init__.py
@@ -24,20 +24,19 @@
bl_info = {
"name": "Add Advanced Object Panels",
- "author": "meta-androcto,",
+ "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",
+ "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6"
+ "/Py/Scripts/Object/Add_Advanced",
"category": "Object"
}
import bpy
from bpy.types import (
- Menu,
AddonPreferences,
PropertyGroup,
)
@@ -66,7 +65,7 @@ sub_modules = [__import__(__package__ + "." + submod, {}, {}, submod) for submod
sub_modules.sort(key=lambda mod: (mod.bl_info['category'], mod.bl_info['name']))
-#Addons Preferences
+# Add-ons Preferences
def _get_pref_class(mod):
import inspect
@@ -160,7 +159,7 @@ class AdvancedObjPreferences1(AddonPreferences):
split = col.row().split(percentage=0.15)
split.label('Location:')
split.label(info['location'])
- if info.get('author') and info.get('author') != 'chromoly':
+ if info.get('author'):
split = col.row().split(percentage=0.15)
split.label('Author:')
split.label(info['author'])
@@ -195,12 +194,14 @@ class AdvancedObjPreferences1(AddonPreferences):
try:
prefs.draw(context)
except:
+ import traceback
traceback.print_exc()
- box.label(text='Error (see console)', icon='ERROR')
+ box.label(text="Error (see console)", icon="ERROR")
del prefs.layout
row = layout.row()
- row.label("End of Panel Activations")
+ row.label(text="End of Advanced Object Panels Activations",
+ icon="FILE_PARENT")
for mod in sub_modules:
@@ -218,10 +219,10 @@ for mod in sub_modules:
return update
prop = BoolProperty(
- name=info['name'],
- description=info.get('description', ''),
- update=gen_update(mod),
- )
+ 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)
@@ -229,8 +230,6 @@ for mod in sub_modules:
class AdvancedObjProperties1(PropertyGroup):
- # main properties
-
# object_laplace_lighting props
ORIGIN = FloatVectorProperty(
name="Origin charge"
diff --git a/add_advanced_objects_panels/delaunay_voronoi.py b/add_advanced_objects_panels/delaunay_voronoi.py
index 02768232..0537bf6f 100644
--- a/add_advanced_objects_panels/delaunay_voronoi.py
+++ b/add_advanced_objects_panels/delaunay_voronoi.py
@@ -25,14 +25,12 @@ bl_info = {
"author": "Domlysz, Oscurart",
"version": (1, 3),
"blender": (2, 7, 0),
- "location": "View3D > Tools > GIS",
+ "location": "3D View > Toolshelf > Create > Delaunay Voronoi",
"warning": "",
"wiki_url": "https://github.com/domlysz/BlenderGIS/wiki",
"category": "Add Mesh"
}
-
-
import bpy
from .DelaunayVoronoi import (
computeVoronoiDiagram,
@@ -100,7 +98,6 @@ class ToolsPanelDelaunay(Panel):
def draw(self, context):
layout = self.layout
- adv_obj = context.scene.advanced_objects1
box = layout.box()
col = box.column(align=True)
@@ -294,6 +291,7 @@ class OBJECT_OT_VoronoiButton(Operator):
return {'FINISHED'}
+
# Register
def register():
bpy.utils.register_class(OBJECT_OT_VoronoiButton)
@@ -309,4 +307,3 @@ def unregister():
if __name__ == "__main__":
register()
-
diff --git a/add_advanced_objects_panels/drop_to_ground.py b/add_advanced_objects_panels/drop_to_ground.py
index 35020020..e6facbcf 100644
--- a/add_advanced_objects_panels/drop_to_ground.py
+++ b/add_advanced_objects_panels/drop_to_ground.py
@@ -20,7 +20,7 @@ bl_info = {
"name": "Drop to Ground1",
"author": "Unnikrishnan(kodemax), Florian Meyer(testscreenings)",
"blender": (2, 71, 0),
- "location": "3D View > Toolshelf > Tools Tab",
+ "location": "3D View > Toolshelf > Create > Drop To Ground",
"description": "Drop selected objects on active object",
"warning": "",
"category": "Object"}
@@ -39,6 +39,12 @@ from bpy.types import (
from bpy.props import BoolProperty
+def test_ground_object(ground):
+ if ground.type in {'MESH', 'FONT', 'META', 'CURVE', 'SURFACE'}:
+ return True
+ return False
+
+
def get_align_matrix(location, normal):
up = Vector((0, 0, 1))
angle = normal.angle(up)
@@ -99,7 +105,7 @@ def get_lowest_world_co(context, ob, mat_parent=None):
def drop_objectsall(self, context):
- ground = bpy.context.active_object
+ ground = context.active_object
name = ground.name
for obs in bpy.context.scene.objects:
@@ -119,7 +125,8 @@ def drop_objectsall(self, context):
lowest_world_co = get_lowest_world_co(context, ob)
if not lowest_world_co:
- message = "Type {} is not supported. Failed to drop {}".format(ob.type, ob.name)
+ message = "Object {} is of type {} works only with Use Center option " \
+ "checked".format(ob.name, ob.type)
self.reported.append(message)
continue
is_hit, hit_location, hit_normal, hit_index = tmp_ground.ray_cast(lowest_world_co, down)
@@ -159,9 +166,12 @@ def drop_objectsall(self, context):
def drop_objects(self, context):
- ground = context.object
+ ground = context.active_object
+
obs = context.selected_objects
- obs.remove(ground)
+ if ground in obs:
+ obs.remove(ground)
+
tmp_ground = transform_ground_to_world(context.scene, ground)
down = Vector((0, 0, -10000))
@@ -172,13 +182,14 @@ def drop_objects(self, context):
lowest_world_co = get_lowest_world_co(context, ob)
if not lowest_world_co:
- message = "Type {} is not supported. Failed to drop {}".format(ob.type, ob.name)
+ message = "Object {} is of type {} works only with Use Center option " \
+ "checked".format(ob.name, ob.type)
self.reported.append(message)
continue
is_hit, hit_location, hit_normal, hit_index = tmp_ground.ray_cast(lowest_world_co, down)
if not is_hit:
- message = ob.name + " did not hit the Ground"
+ message = ob.name + " did not hit the Active Object"
self.reported.append(message)
co
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list