[Bf-extensions-cvs] [858f530] master: Camera Rigs: T48119 new addon dolly/crane camera rigs

meta-androcto noreply at git.blender.org
Fri Apr 29 06:17:36 CEST 2016


Commit: 858f530f8b371aa504dca32ee9712699a171ab0f
Author: meta-androcto
Date:   Fri Apr 29 14:14:46 2016 +1000
Branches: master
https://developer.blender.org/rBAC858f530f8b371aa504dca32ee9712699a171ab0f

Camera Rigs: T48119 new addon dolly/crane camera rigs

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

A	rigging_camerarigs.py

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

diff --git a/rigging_camerarigs.py b/rigging_camerarigs.py
new file mode 100644
index 0000000..d1e4bef
--- /dev/null
+++ b/rigging_camerarigs.py
@@ -0,0 +1,740 @@
+bl_info = {
+    "name": "Add Camera Rigs",
+    "author": "Wayne Dixon, Kris Wittig",
+    "version": (1, 1),
+    "blender": (2, 77, 0),
+    "location": "View3D > Add > Armature > Dolly or Camera Rig",
+    "description": "Adds a Camera Rig with UI",
+    "warning": "",
+    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Rigging/Add_Camera_Rigs",
+    "tracker_url": "https://developer.blender.org/maniphest/task/create/?project=3&type=Bug",
+    "category": "Rigging",
+}
+
+import bpy
+from bpy.types import Operator
+from rna_prop_ui import rna_idprop_ui_prop_get
+from math import radians
+
+# =========================================================================
+# Define the functions to build the Widgets
+# =========================================================================
+def create_widget(self, name):
+    """ Creates an empty widget object for a bone, and returns the object."""
+    obj_name = "WDGT_" + name
+    scene = bpy.context.scene
+
+    # Check if it already exists
+    if obj_name in scene.objects:
+        return None
+    else:
+        mesh = bpy.data.meshes.new(obj_name)
+        obj = bpy.data.objects.new(obj_name, mesh)
+        scene.objects.link(obj)
+
+        #this will put the Widget objects out of the way on layer 19
+        WDGT_layers = (False, False, False, False, False, False, False, False, False, True,
+                       False, False, False, False, False, False, False, False, False, False)
+        obj.layers = WDGT_layers
+
+        return obj
+
+def create_root_widget(self, name):
+    # Creates a compass-shaped widget.
+
+    obj = create_widget(self, name)
+    if obj != None:
+        verts = [(0.2102552056312561, -0.0012103617191314697, 0.21025514602661133), (0.11378927528858185, -0.001210339367389679, 0.274711549282074), (-3.070153553608179e-08, -0.0012103626504540443, 0.29734566807746887), (-0.11378933489322662, -0.0012103542685508728, 0.27471157908439636), (-0.2102552056312561, -0.0012103617191314697, 0.21025516092777252), (-0.27471160888671875, -0.0012103617191314697, 0.11378928273916245), (-0.29734569787979126, -0.0012103617191314697, -1.6809221392577456 [...]
+        edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (7, 8), (0, 8), (10, 11), (9, 12), (11, 12), (10, 13), (9, 14), (13, 15), (14, 15), (16, 22), (17, 18), (18, 19), (19, 20), (20, 21), (21, 22), (7, 17), (6, 16), (23, 24), (23, 25), (24, 29), (25, 28), (26, 27), (26, 29), (27, 28), (31, 32), (30, 33), (32, 33), (31, 34), (30, 35), (34, 36), (35, 36), (37, 38), (37, 39), (38, 43), (39, 42), (40, 41), (40, 43), (41, 42)]
+        mesh = obj.data
+        mesh.from_pydata(verts, edges, [])
+        mesh.update()
+
+def create_camera_widget(self, name):
+    # Creates a camera ctrl widget.
+
+    obj = create_widget(self, name)
+    if obj != None:
+        verts = [(0.13756819069385529, 1.0706068032106941e-08, -0.13756819069385529), (0.1797415018081665, 5.353034016053471e-09, -0.07445136457681656), (0.19455081224441528, -6.381313819948996e-16, 8.504085435845354e-09), (0.1797415018081665, -5.353034016053471e-09, 0.07445138692855835), (0.13756819069385529, -1.0706068032106941e-08, 0.13756819069385529), (0.07445137947797775, -2.1412136064213882e-08, 0.1797415018081665), (-9.740904971522468e-08, -2.1412136064213882e-08, 0.1945508122444 [...]
+        edges = [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (7, 8), (0, 8), (10, 11), (9, 12), (11, 12), (10, 13), (9, 14), (13, 15), (14, 15), (16, 22), (17, 18), (18, 19), (19, 20), (20, 21), (21, 22), (7, 17), (6, 16), (23, 24), (23, 25), (24, 29), (25, 28), (26, 29), (27, 28), (31, 32), (30, 33), (32, 33), (31, 34), (30, 35), (34, 36), (35, 36), (37, 38), (37, 39), (38, 43), (39, 42), (40, 41), (40, 43), (41, 42), (50, 53), (49, 52), (44, 45), (45, 46), (46, 47), (47, 48), (4

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list