[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2261] trunk/py/scripts/addons: SVN maintenance.
gsr b3d
gsr.b3d at infernal-iceberg.com
Wed Aug 24 19:43:32 CEST 2011
Revision: 2261
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2261
Author: gsrb3d
Date: 2011-08-24 17:43:32 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
SVN maintenance.
Modified Paths:
--------------
trunk/py/scripts/addons/add_curve_sapling/__init__.py
trunk/py/scripts/addons/add_curve_sapling/utils.py
trunk/py/scripts/addons/io_import_scene_lwo.py
trunk/py/scripts/addons/mocap/__init__.py
trunk/py/scripts/addons/mocap/mocap_constraints.py
trunk/py/scripts/addons/mocap/mocap_tools.py
trunk/py/scripts/addons/mocap/retarget.py
Property Changed:
----------------
trunk/py/scripts/addons/mocap/__init__.py
trunk/py/scripts/addons/mocap/mocap_constraints.py
trunk/py/scripts/addons/mocap/mocap_tools.py
trunk/py/scripts/addons/mocap/retarget.py
Modified: trunk/py/scripts/addons/add_curve_sapling/__init__.py
===================================================================
--- trunk/py/scripts/addons/add_curve_sapling/__init__.py 2011-08-24 13:14:30 UTC (rev 2260)
+++ trunk/py/scripts/addons/add_curve_sapling/__init__.py 2011-08-24 17:43:32 UTC (rev 2261)
@@ -604,4 +604,4 @@
bpy.types.INFO_MT_curve_add.remove(menu_func)
if __name__ == "__main__":
- register()
\ No newline at end of file
+ register()
Modified: trunk/py/scripts/addons/add_curve_sapling/utils.py
===================================================================
--- trunk/py/scripts/addons/add_curve_sapling/utils.py 2011-08-24 13:14:30 UTC (rev 2260)
+++ trunk/py/scripts/addons/add_curve_sapling/utils.py 2011-08-24 17:43:32 UTC (rev 2261)
@@ -926,4 +926,4 @@
for p in armOb.pose.bones:
p.rotation_mode = 'XYZ'
treeOb.parent = armOb
- #print(time.time()-startTime)
\ No newline at end of file
+ #print(time.time()-startTime)
Modified: trunk/py/scripts/addons/io_import_scene_lwo.py
===================================================================
--- trunk/py/scripts/addons/io_import_scene_lwo.py 2011-08-24 13:14:30 UTC (rev 2260)
+++ trunk/py/scripts/addons/io_import_scene_lwo.py 2011-08-24 17:43:32 UTC (rev 2261)
@@ -1255,4 +1255,4 @@
bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__":
- register()
\ No newline at end of file
+ register()
Modified: trunk/py/scripts/addons/mocap/__init__.py
===================================================================
--- trunk/py/scripts/addons/mocap/__init__.py 2011-08-24 13:14:30 UTC (rev 2260)
+++ trunk/py/scripts/addons/mocap/__init__.py 2011-08-24 17:43:32 UTC (rev 2261)
@@ -1,886 +1,886 @@
-# ##### 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 #####
-
-# <pep8 compliant>
-
-bl_info = {
- "name": "Motion Capture Tools",
- "author": "Benjy Cook",
- "blender": (2, 5, 9),
- "api": 39523,
- "location": "Object UI -> Mocap tools",
- "description": "Various tools for working with motion capture animation",
- "warning": "",
- "wiki_url": ("http://wiki.blender.org/index.php/User:Benjycook/GSOC/Manual"),
- "tracker_url": "",
- "support": 'OFFICIAL',
- "category": "Animation"}
-
-if "bpy" in locals():
- import imp
- if "mocap_constraints" in locals():
- imp.reload(mocap_constraints)
- if "retarget" in locals():
- imp.reload(retarget)
- if "mocap_tools" in locals():
- imp.reload(mocap_tools)
-else:
- import bpy
- from bpy.props import *
- from bpy import *
- from . import mocap_constraints
- from . import retarget
- from . import mocap_tools
- from .mocap_constraints import *
-
-# MocapConstraint class
-# Defines MocapConstraint datatype, used to add and configute mocap constraints
-# Attached to Armature data
-
-
-class MocapConstraint(bpy.types.PropertyGroup):
- name = bpy.props.StringProperty(name="Name",
- default="Mocap Fix",
- description="Name of Mocap Fix",
- update=setConstraint)
- constrained_bone = bpy.props.StringProperty(name="Bone",
- default="",
- description="Constrained Bone",
- update=updateConstraintBoneType)
- constrained_boneB = bpy.props.StringProperty(name="Bone (2)",
- default="",
- description="Other Constrained Bone (optional, depends on type)",
- update=setConstraint)
- s_frame = bpy.props.IntProperty(name="S",
- default=0,
- description="Start frame of Fix",
- update=setConstraint)
- e_frame = bpy.props.IntProperty(name="E",
- default=100,
- description="End frame of Fix",
- update=setConstraint)
- smooth_in = bpy.props.IntProperty(name="In",
- default=10,
- description="Amount of frames to smooth in",
- update=setConstraint,
- min=0)
- smooth_out = bpy.props.IntProperty(name="Out",
- default=10,
- description="Amount of frames to smooth out",
- update=setConstraint,
- min=0)
- targetMesh = bpy.props.StringProperty(name="Mesh",
- default="",
- description="Target of Fix - Mesh (optional, depends on type)",
- update=setConstraint)
- active = bpy.props.BoolProperty(name="Active",
- default=True,
- description="Fix is active",
- update=setConstraint)
- show_expanded = bpy.props.BoolProperty(name="Show Expanded",
- default=True,
- description="Fix is fully shown")
- targetPoint = bpy.props.FloatVectorProperty(name="Point", size=3,
- subtype="XYZ", default=(0.0, 0.0, 0.0),
- description="Target of Fix - Point",
- update=setConstraint)
- targetDist = bpy.props.FloatProperty(name="Offset",
- default=0.0,
- description="Distance and Floor Fixes - Desired offset",
- update=setConstraint)
- targetSpace = bpy.props.EnumProperty(
- items=[("WORLD", "World Space", "Evaluate target in global space"),
- ("LOCAL", "Object space", "Evaluate target in object space"),
- ("constrained_boneB", "Other Bone Space", "Evaluate target in specified other bone space")],
- name="Space",
- description="In which space should Point type target be evaluated",
- update=setConstraint)
- type = bpy.props.EnumProperty(name="Type of constraint",
- items=[("point", "Maintain Position", "Bone is at a specific point"),
- ("freeze", "Maintain Position at frame", "Bone does not move from location specified in target frame"),
- ("floor", "Stay above", "Bone does not cross specified mesh object eg floor"),
- ("distance", "Maintain distance", "Target bones maintained specified distance")],
- description="Type of Fix",
- update=updateConstraintBoneType)
- real_constraint = bpy.props.StringProperty()
- real_constraint_bone = bpy.props.StringProperty()
-
-
-
-# Animation Stitch Settings, used for animation stitching of 2 retargeted animations.
-class AnimationStitchSettings(bpy.types.PropertyGroup):
- first_action = bpy.props.StringProperty(name="Action 1",
- description="First action in stitch")
- second_action = bpy.props.StringProperty(name="Action 2",
- description="Second action in stitch")
- blend_frame = bpy.props.IntProperty(name="Stitch frame",
- description="Frame to locate stitch on")
- blend_amount = bpy.props.IntProperty(name="Blend amount",
- description="Size of blending transitiion, on both sides of the stitch",
- default=10)
- second_offset = bpy.props.IntProperty(name="Second offset",
- description="Frame offset for 2nd animation, where it should start",
- default=10)
- stick_bone = bpy.props.StringProperty(name="Stick Bone",
- description="Bone to freeze during transition",
- default="")
-
-
-
-# MocapNLA Tracks. Stores which tracks/actions are associated with each retargeted animation.
-class MocapNLATracks(bpy.types.PropertyGroup):
- name = bpy.props.StringProperty()
- base_track = bpy.props.StringProperty()
- auto_fix_track = bpy.props.StringProperty()
- manual_fix_track = bpy.props.StringProperty()
- stride_action = bpy.props.StringProperty()
-
-
-
-
-#Update function for Advanced Retarget boolean variable.
-def advancedRetargetToggle(self, context):
- enduser_obj = context.active_object
- performer_obj = [obj for obj in context.selected_objects if obj != enduser_obj]
- if enduser_obj is None or len(performer_obj) != 1:
- print("Need active and selected armatures")
- return
- else:
- performer_obj = performer_obj[0]
- if self.advancedRetarget:
- retarget.preAdvancedRetargeting(performer_obj, enduser_obj)
- else:
- retarget.cleanTempConstraints(enduser_obj)
-
-
-
-def toggleIKBone(self, context):
- #Update function for IK functionality. Is called when IK prop checkboxes are toggled.
- if self.IKRetarget:
- if not self.is_in_ik_chain:
- print(self.name + " IK toggled ON!")
- ik = self.constraints.new('IK')
- #ik the whole chain up to the root, excluding
- chainLen = 0
- for parent_bone in self.parent_recursive:
- chainLen += 1
- if hasIKConstraint(parent_bone):
- break
- deformer_children = [child for child in parent_bone.children if child.bone.use_deform]
- #~ if len(deformer_children) > 1:
- #~ break
- ik.chain_count = chainLen
- for bone in self.parent_recursive:
- if bone.is_in_ik_chain:
- bone.IKRetarget = True
- else:
- print(self.name + " IK toggled OFF!")
- cnstrn_bones = []
- newChainLength = []
- if hasIKConstraint(self):
- cnstrn_bones = [self]
- elif self.is_in_ik_chain:
- cnstrn_bones = [child for child in self.children_recursive if hasIKConstraint(child)]
- for cnstrn_bone in cnstrn_bones:
- newChainLength.append(cnstrn_bone.parent_recursive.index(self) + 1)
- if cnstrn_bones:
- # remove constraint, and update IK retarget for all parents of cnstrn_bone up to chain_len
- for i, cnstrn_bone in enumerate(cnstrn_bones):
- print(cnstrn_bone.name)
- if newChainLength:
- ik = hasIKConstraint(cnstrn_bone)
- ik.chain_count = newChainLength[i]
- else:
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list