[Bf-extensions-cvs] [331f2982] master: Add Advanced Objects: Bump to ver. 0.1.3, Cleanup, Fixes

lijenstina noreply at git.blender.org
Wed May 24 18:32:44 CEST 2017


Commit: 331f2982d714f51cb6ded56b3f6b10ba004ff62f
Author: lijenstina
Date:   Wed May 24 18:31:25 2017 +0200
Branches: master
https://developer.blender.org/rBA331f2982d714f51cb6ded56b3f6b10ba004ff62f

Add Advanced Objects: Bump to ver. 0.1.3, Cleanup, Fixes

Bump version to 0.1.3
Cleanup - some style and UI modifications
Improved Tooltips, add missing descriptions
Menu and Panel Listing in the preferences
Move scene props to init for proper reg - unreg
Translate comments into English

Fix several bugs with scripts:
- Drop to ground: add missing poll for Drop all
- Cubester: fix sound generation, missing checks for data
move properties to __init__ together with the update functions
- Make Struts: add a try block allows the global undo to be
restored, fix division by zero error, add missing poll
- rope_alpha: fix several crashes with hardcoded names on re-runs
make the similation work for new scenes
- Circle array: fix (flawed attempt) check for allowed types
- Copy2: add check for properties passed, error handling, division by 0
on non mesh copy objects, add a missing poll
- Unfold Transition: fix polls for active objects, division by 0
add a warning about selecting an another armature
- oscurart_constellation: add a try block, move the prop to init
- easy_lattice: simplify enumproperty, polling
- Laplacian Lightning: prints are optional, API change to obj.raycast,
UI refactor, move winmgr props to scene properties
- add_light_template - try block, fix crash with constraints
and no camera in the scene

===================================================================

M	add_advanced_objects/__init__.py
M	add_advanced_objects/add_light_template.py
M	add_advanced_objects/add_mesh_aggregate.py
M	add_advanced_objects/arrange_on_curve.py
M	add_advanced_objects/circle_array.py
M	add_advanced_objects/copy2.py
M	add_advanced_objects/cubester.py
M	add_advanced_objects/delaunay_voronoi/DelaunayVoronoi.py
M	add_advanced_objects/delaunay_voronoi/__init__.py
M	add_advanced_objects/delaunay_voronoi/delaunayVoronoiBlender.py
M	add_advanced_objects/delaunay_voronoi/oscurart_constellation.py
M	add_advanced_objects/drop_to_ground.py
M	add_advanced_objects/make_struts.py
M	add_advanced_objects/mesh_easylattice.py
M	add_advanced_objects/object_add_chain.py
M	add_advanced_objects/object_laplace_lightning.py
M	add_advanced_objects/object_mangle_tools.py
M	add_advanced_objects/oscurart_chain_maker.py
M	add_advanced_objects/pixelate_3d.py
M	add_advanced_objects/random_box_structure.py
M	add_advanced_objects/rope_alpha.py
M	add_advanced_objects/scene_objects_bi.py
M	add_advanced_objects/scene_objects_cycles.py
M	add_advanced_objects/scene_texture_render.py
M	add_advanced_objects/trilighting.py
M	add_advanced_objects/unfold_transition.py

===================================================================

diff --git a/add_advanced_objects/__init__.py b/add_advanced_objects/__init__.py
index 3c15d1b4..cad3c077 100644
--- a/add_advanced_objects/__init__.py
+++ b/add_advanced_objects/__init__.py
@@ -20,19 +20,18 @@
 # 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   #
-# Dannyboy, Mano-Wii, Kursad Karatas, teldredge
+# Atom, Dannyboy, Mano-Wii, Kursad Karatas, teldredge, Phil Cote #
 
 bl_info = {
     "name": "Add Advanced Objects",
     "author": "Meta Androcto,",
-    "version": (0, 1, 1),
+    "version": (0, 1, 3),
     "blender": (2, 78, 0),
     "location": "View3D > Add ",
     "description": "Add Object & Camera extras",
     "warning": "",
     "wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6"
                 "/Py/Scripts",
-    "tracker_url": "",
     "category": "Object"}
 
 if "bpy" in locals():
@@ -64,46 +63,54 @@ if "bpy" in locals():
     importlib.reload(oscurart_chain_maker)
 
 else:
-    from . import (
-        add_light_template,
-        scene_objects_bi,
-        scene_objects_cycles,
-        scene_texture_render,
-        trilighting,
-        pixelate_3d,
-        object_add_chain,
-        oscurart_chain_maker,
-        drop_to_ground,
-        circle_array,
-        unfold_transition,
-        copy2,
-        make_struts,
-        random_box_structure,
-        cubester,
-        rope_alpha,
-        add_mesh_aggregate,
-        object_mangle_tools,
-        arrange_on_curve,
-        object_laplace_lightning,
-        mesh_easylattice
-        )
-    from .delaunay_voronoi import (
-        DelaunayVoronoi,
-        delaunayVoronoiBlender,
-        oscurart_constellation
-        )
+    from . import add_light_template
+    from . import scene_objects_bi
+    from . import scene_objects_cycles
+    from . import scene_texture_render
+    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 (
         Menu,
         AddonPreferences,
+        PropertyGroup,
+        )
+from bpy.props import (
+        BoolProperty,
+        BoolVectorProperty,
+        EnumProperty,
+        FloatProperty,
+        FloatVectorProperty,
+        IntProperty,
+        StringProperty,
+        PointerProperty,
         )
 
 
+# Define the "Scenes" menu
 class INFO_MT_scene_elements_add(Menu):
-    # Define the "scenes" menu
     bl_idname = "INFO_MT_scene_elements"
-    bl_label = "Test scenes"
+    bl_label = "Test Scenes"
 
     def draw(self, context):
         layout = self.layout
@@ -116,8 +123,8 @@ class INFO_MT_scene_elements_add(Menu):
                         text="Scene_Textures_Cycles")
 
 
+# Define the "Lights" menu
 class INFO_MT_mesh_lamps_add(Menu):
-    # Define the "lights" menu
     bl_idname = "INFO_MT_scene_lamps"
     bl_label = "Lighting Sets"
 
@@ -130,8 +137,8 @@ class INFO_MT_mesh_lamps_add(Menu):
                         text="Add Tri Lighting")
 
 
+# Define the "Chains" menu
 class INFO_MT_mesh_chain_add(Menu):
-    # Define the "Chains" menu
     bl_idname = "INFO_MT_mesh_chain"
     bl_label = "Chains"
 
@@ -142,47 +149,45 @@ class INFO_MT_mesh_chain_add(Menu):
         layout.operator("mesh.primitive_oscurart_chain_add", icon="LINKED")
 
 
+# Define the "Array" Menu
 class INFO_MT_array_mods_add(Menu):
-    # Define the "array" menu
     bl_idname = "INFO_MT_array_mods"
     bl_label = "Array Mods"
 
     def draw(self, context):
         layout = self.layout
         layout.operator_context = 'INVOKE_REGION_WIN'
-        self.layout.menu("INFO_MT_mesh_chain", icon="LINKED")
+
+        layout.menu("INFO_MT_mesh_chain", icon="LINKED")
+
         layout.operator("objects.circle_array_operator",
-                        text="Circle Array", icon='MOD_ARRAY')
+                        text="Circle Array", icon="MOD_ARRAY")
         layout.operator("object.agregate_mesh",
-                        text="Aggregate Mesh", icon='MOD_ARRAY')
-        obj = context.object
-        if obj.type in ['MESH',]:  
-            layout.operator("mesh.copy2",
-                        text="Copy To Vert/Edge", icon='MOD_ARRAY')
-
+                        text="Aggregate Mesh", icon="MOD_ARRAY")
+        layout.operator("mesh.copy2",
+                text="Copy To Vert/Edge", icon="MOD_ARRAY")
 
 
+# Define the "Blocks" Menu
 class INFO_MT_quick_blocks_add(Menu):
-    # Define the "Blocks" menu
     bl_idname = "INFO_MT_quick_tools"
     bl_label = "Block Tools"
 
     def draw(self, context):
         layout = self.layout
         layout.operator_context = 'INVOKE_REGION_WIN'
-        layout.operator('object.pixelate', icon='MESH_GRID')
-        obj = context.object
-        if obj.type in ['MESH',]:  
-            layout.operator("mesh.generate_struts",
-                        text="Struts", icon='GRID')
-            layout.operator("object.easy_lattice",
-                        text="Easy Lattice", icon='MOD_LATTICE')
-            layout.operator("object.make_structure",
-                        text="Random Boxes", icon='SEQ_SEQUENCER')
 
+        layout.operator("object.pixelate", icon="MESH_GRID")
+        layout.operator("mesh.generate_struts",
+                    text="Struts", icon="GRID")
+        layout.operator("object.make_structure",
+                    text="Random Boxes", icon="SEQ_SEQUENCER")
+        layout.operator("object.easy_lattice",
+                    text="Easy Lattice", icon="MOD_LATTICE")
 
+
+# Define the "Phsysics Tools" Menu
 class INFO_MT_Physics_tools_add(Menu):
-    # Define the "mesh objects" menu
     bl_idname = "INFO_MT_physics_tools"
     bl_label = "Physics Tools"
 
@@ -190,7 +195,7 @@ class INFO_MT_Physics_tools_add(Menu):
         layout = self.layout
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("object.drop_on_active",
-                        text="Drop To Ground")
+                        text="Drop To Ground", icon="SORTSIZE")
         layout.operator("ball.rope",
                         text="Wrecking Ball", icon='PHYSICS')
         layout.operator("clot.rope",
@@ -211,22 +216,551 @@ def menu(self, context):
 
 
 # Addons Preferences
-class AddonPreferences(AddonPreferences):
+class AdvancedObjPreferences(AddonPreferences):
     bl_idname = __name__
 
+    show_menu_list = BoolProperty(
+            name="Menu List",
+            description="Show/Hide the Add Menu items",
+            default=False
+            )
+    show_panel_list = BoolProperty(
+            name="Panels List",
+            description="Show/Hide the Panel items",
+            default=False
+            )
+
     def draw(self, context):
         layout = self.layout
-        layout.label(text="----Add Menu Advanced----")
-        layout.label(text="Quick Tools:")
-        layout.label(text="Drop, Pixelate & Wrecking Ball")
-        layout.label(text="Array Mods:")
-        layout.label(text="Circle Array, Chains, Vert to Edge, Aggregate")
+
+        icon_1 = "TRIA_RIGHT" if not self.show_menu_list else "TRIA_DOWN"
+        box = layout.box()
+        box.prop(self, "show_menu_list", emboss=False, icon=icon_1)
+
+        if self.show_menu_list:
+            box.label(text="Items located in the Add Menu (default shortcut Ctrl + A):",
+                      icon="LAYER_USED")
+            box.label(text="Test Scenes:", icon="LAYER_ACTIVE")
+            box.label(text="Scene Objects BI, Scene Objects Cycles, Scene Textures Cycles",
+                      icon="LAYER_USED")
+            box.label(text="Lighting Sets:", icon="LAYER_ACTIVE")
+            box.label(text="Add Light Template, Add Tri Lighting", icon="LAYER_USED")
+            box.label(text="Array Mods:", icon="LAYER_ACTIVE")
+            box.label(text="Circle Array, Chains submenu, Copy Vert/Edge and Aggregate Mesh",
+                         icon="LAYER_ACTIVE")
+            box.label(text="Chains Submenu - Add Chain, Chain to Bones",
+                      icon="LAYER_ACTIVE")
+            box.label(text="Block Tools:", icon="LAYER_ACTIVE")
+            box.label(text="Pixelate Object, Struts, Random Boxes, Easy Lattice",
+                      icon="LAYER_USED")
+            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)
+
+        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
+def find_audio_length(self, context):
+    adv_obj = context.scene.advanced_objects
+    audio_file = adv_obj.cubester_audio_path
+    length = 0
+
+    if audio_file != "

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list