2011-02-23 10:52:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/*
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * ***** 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,
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-12 13:34:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								 * Contributor(s): Blender Foundation (2008), Roland Hess, Joshua Leung
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 *
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * ***** END GPL LICENSE BLOCK *****
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-27 20:20:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/** \file blender/makesrna/intern/rna_pose.c
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 *  \ingroup RNA
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include <stdlib.h>
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include <string.h>
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "RNA_define.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "RNA_enum_types.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "rna_internal.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "DNA_action_types.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "DNA_armature_types.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "DNA_constraint_types.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "DNA_object_types.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "DNA_scene_types.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BLI_math.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "WM_types.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-09 01:14:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/* XXX: this RNA enum define is currently duplicated for objects,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								 * since there is some text here which is not applicable */
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-09 01:14:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								EnumPropertyItem posebone_rotmode_items[] = {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_QUAT, "QUATERNION", 0, "Quaternion (WXYZ)", "No Gimbal Lock (default)"},
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_XYZ, "XYZ", 0, "XYZ Euler", "XYZ Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_XZY, "XZY", 0, "XZY Euler", "XZY Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_YXZ, "YXZ", 0, "YXZ Euler", "YXZ Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_YZX, "YZX", 0, "YZX Euler", "YZX Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_ZXY, "ZXY", 0, "ZXY Euler", "ZXY Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_ZYX, "ZYX", 0, "ZYX Euler", "ZYX Rotation Order (prone to Gimbal Lock)"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ROT_MODE_AXISANGLE, "AXIS_ANGLE", 0, "Axis Angle",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                     "Axis Angle (W+XYZ), defines a rotation around some axis defined by 3D-Vector"},
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-09 01:14:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef RNA_RUNTIME
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BIK_api.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "BKE_action.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-28 12:20:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BKE_armature.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "DNA_userdef_types.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-16 05:46:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "MEM_guardedalloc.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#include "BLI_ghash.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BKE_context.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BKE_constraint.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BKE_depsgraph.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-20 09:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "BKE_idprop.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "ED_object.h"
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "ED_armature.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "MEM_guardedalloc.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "WM_api.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 15:40:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#include "RNA_access.h"
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-31 02:14:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-05 18:59:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-31 02:14:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* XXX when to use this? ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Object *ob = ptr->id.data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-05 18:59:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BIK_clear_data(ob->pose);
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-02 01:22:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static char *rna_PoseBone_path(PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-02 12:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return BLI_sprintfN("pose.bones[\"%s\"]", ((bPoseChannel*)ptr->data)->name);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-02 12:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_BoneGroup_color_set_set(PointerRNA *ptr, int value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-03 12:30:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* if valid value, set the new enum value, then copy the relevant colors? */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if ((value >= -1) && (value < 21))
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										grp->customCol = value;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-03 12:30:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* only do color copying if using a custom color (i.e. not default color)  */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (grp->customCol) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (grp->customCol > 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											/* copy theme colors on-to group's custom color in case user tries to edit color */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											bTheme *btheme = U.themes.first;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											ThemeWireColor *col_set = &btheme->tarm[(grp->customCol - 1)];
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											memcpy(&grp->cs, col_set, sizeof(ThemeWireColor));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										else {
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											/* init custom colors with a generic multi-color rgb set, if not initialized already
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 * (for custom color set) */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											if (grp->cs.solid[0] == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												/* define for setting colors in theme below */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-20 09:45:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												rgba_char_args_set(grp->cs.solid, 0xff, 0x00, 0x00, 255);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												rgba_char_args_set(grp->cs.select, 0x81, 0xe6, 0x14, 255);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												rgba_char_args_set(grp->cs.active, 0x18, 0xb6, 0xe0, 255);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-15 11:07:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								void rna_BoneGroup_name_set(PointerRNA *ptr, const char *value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bActionGroup *agrp = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-15 11:07:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* copy the new name into the name slot */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BLI_strncpy_utf8(agrp->name, value, sizeof(agrp->name));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BLI_uniquename(&ob->pose->agroups, agrp, "Group", '.', offsetof(bActionGroup, name), sizeof(agrp->name));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-19 10:16:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static IDProperty *rna_PoseBone_idprops(PointerRNA *ptr, int create)
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-20 09:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-20 09:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (create && !pchan->prop) {
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-20 09:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										IDPropertyTemplate val = {0};
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										pchan->prop = IDP_New(IDP_GROUP, &val, "RNA_PoseBone group");
							 | 
						
					
						
							
								
									
										
										
										
											2009-05-20 09:52:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return pchan->prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_ik_solver_set(struct PointerRNA *ptr, int value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pose->iksolver != value) {
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* the solver has changed, must clean any temporary structures */
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										BIK_clear_data(pose);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (pose->ikparam) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											MEM_freeN(pose->ikparam);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											pose->ikparam = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										pose->iksolver = value;
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										BKE_pose_ikparam_init(pose);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-08 17:23:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_ik_solver_update(Main *bmain, Scene *scene, PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = ptr->id.data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pose->flag |= POSE_RECALC;	/* checks & sorts pose channels */
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-01 12:47:49 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DAG_scene_sort(bmain, scene);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_pose_update_constraint_flags(pose);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									object_test_constraints(ob);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-05 18:59:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/* rotation - axis-angle */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_rotation_axis_angle_get(PointerRNA *ptr, float *value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* for now, assume that rotation mode is axis-angle */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									value[0] = pchan->rotAngle;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-10 20:43:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									copy_v3_v3(&value[1], pchan->rotAxis);
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/* rotation - axis-angle */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* for now, assume that rotation mode is axis-angle */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pchan->rotAngle = value[0];
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-10 20:43:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									copy_v3_v3(pchan->rotAxis, (float *)&value[1]);
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* TODO: validate axis? */
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 00:57:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-06 23:15:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_rotation_mode_set(PointerRNA *ptr, int value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-06 23:15:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-28 10:19:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* use API Method for conversions... */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_rotMode_change_values(pchan->quat, pchan->eul, pchan->rotAxis, &pchan->rotAngle,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                          pchan->rotmode, (short)value);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-06 23:15:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* finally, set the new rotation type */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pchan->rotmode = value;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-06 23:15:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-04 14:33:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									char oldname[sizeof(pchan->name)], newname[sizeof(pchan->name)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* need to be on the stack */
							 | 
						
					
						
							
								
									
										
										
										
											2011-09-15 12:26:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BLI_strncpy_utf8(newname, value, sizeof(pchan->name));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-04 14:33:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BLI_strncpy(oldname, pchan->name, sizeof(pchan->name));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									ED_armature_bone_rename(ob->data, oldname, newname);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return ED_pose_channel_in_IK_chain(ob, pchan);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								StructRNA *rna_IKParam_refine(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bIKParam *param = (bIKParam *)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									switch (param->iksolver) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case IKSOLVER_ITASC:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return &RNA_Itasc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									default:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return &RNA_IKParam;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								PointerRNA rna_Pose_ikparam_get(struct PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return rna_pointer_inherit_refine(ptr, &RNA_IKParam, pose->ikparam);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static StructRNA *rna_Pose_ikparam_typef(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									switch (pose->iksolver) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									case IKSOLVER_ITASC:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return &RNA_Itasc;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									default:
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return &RNA_IKParam;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-31 02:14:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Itasc_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Object *ob = ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bItasc *itasc = ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* verify values */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->precision < 0.0001f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->precision = 0.0001f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->minstep < 0.001f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->minstep = 0.001f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->maxstep < itasc->minstep)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->maxstep = itasc->minstep;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->feedback < 0.01f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->feedback = 0.01f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->feedback > 100.f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->feedback = 100.f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->maxvel < 0.01f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->maxvel = 0.01f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (itasc->maxvel > 100.f)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										itasc->maxvel = 100.f;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									BIK_update_param(ob->pose);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-05 18:59:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-08 17:23:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Itasc_update_rebuild(Main *bmain, Scene *scene, PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = ptr->id.data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = ob->pose;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									pose->flag |= POSE_RECALC;	/* checks & sorts pose channels */
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-08 17:23:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rna_Itasc_update(bmain, scene, ptr);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-22 16:33:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_bone_custom_set(PointerRNA *ptr, PointerRNA value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pchan->custom) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										id_us_min(&pchan->custom->id);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										pchan->custom = NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									pchan->custom = value.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									id_us_plus(&pchan->custom->id);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (ob) ? ob->pose : NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pose)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										grp = BLI_findlink(&pose->agroups, pchan->agrp_index-1);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										grp = NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, grp);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_bone_group_set(PointerRNA *ptr, PointerRNA value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (ob) ? ob->pose : NULL;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pose)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										pchan->agrp_index = BLI_findindex(&pose->agroups, value.data) + 1;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										pchan->agrp_index = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_bone_group_index_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return MAX2(pchan->agrp_index-1, 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									pchan->agrp_index = value+1;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-30 16:09:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (ob) ? ob->pose : NULL;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									*min = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pose) {
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										*max = BLI_countlist(&pose->agroups)-1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										*max = MAX2(0, *max);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										*max = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, BLI_findlink(&pose->agroups, pose->active_group-1));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_active_bone_group_set(PointerRNA *ptr, PointerRNA value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									pose->active_group = BLI_findindex(&pose->agroups, value.data) + 1;
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static int rna_Pose_active_bone_group_index_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return MAX2(pose->active_group-1, 0);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_active_bone_group_index_set(PointerRNA *ptr, int value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									pose->active_group = value+1;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-30 16:09:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									*min = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									*max = BLI_countlist(&pose->agroups)-1;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									*max = MAX2(0, *max);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-17 14:46:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#if 0
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-14 16:52:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int index)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									grp = BLI_findlink(&pose->agroups, index-1);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else value[0] = '\0';
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-14 16:52:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									grp = BLI_findlink(&pose->agroups, index-1);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return (grp)? strlen(grp->name): 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-14 16:52:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_pose_bgroup_name_index_set(PointerRNA *ptr, const char *value, short *index)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									int a;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									for (a = 1, grp = pose->agroups.first; grp; grp = grp->next, a++) {
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (strcmp(grp->name, value) == 0) {
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											*index = a;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											return;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									*index = 0;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-14 16:52:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bActionGroup *grp;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									for (grp = pose->agroups.first; grp; grp = grp->next) {
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										if (strcmp(grp->name, value) == 0) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											BLI_strncpy(result, value, maxlen);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									result[0] = '\0';
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-17 14:46:22 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-11 19:58:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static PointerRNA rna_PoseChannel_active_constraint_get(PointerRNA *ptr)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bConstraint *con = constraints_get_active(&pchan->constraints);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-11 19:58:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return rna_pointer_inherit_refine(ptr, &RNA_Constraint, con);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_active_constraint_set(PointerRNA *ptr, PointerRNA value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-16 12:33:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									constraints_set_active(&pchan->constraints, (bConstraint *)value.data);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-11 19:58:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-06 01:28:39 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static bConstraint *rna_PoseChannel_constraints_new(bPoseChannel *pchan, int type)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/*WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_ADDED, object); */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* TODO, pass object also */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* TODO, new pose bones don't have updated draw flags */
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return add_pose_constraint(NULL, pchan, NULL, type);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, ReportList *reports, bConstraint *con)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (BLI_findindex(&pchan->constraints, con) == -1) {
							 | 
						
					
						
							
								
									
										
										
										
											2011-09-19 13:23:58 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in pose bone '%s'", con->name, pchan->name);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										return;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-04 05:52:14 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									else {
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Object *ob = (Object *)id;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										const short is_ik = ELEM(con->type, CONSTRAINT_TYPE_KINEMATIC, CONSTRAINT_TYPE_SPLINEIK);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-04 05:52:14 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										remove_constraint(&pchan->constraints, con);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										ED_object_constraint_update(ob);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										constraints_set_active(&pchan->constraints, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-04 05:56:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										WM_main_add_notifier(NC_OBJECT|ND_CONSTRAINT|NA_REMOVED, id);
							 | 
						
					
						
							
								
									
										
										
										
											2011-05-04 05:52:14 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if (is_ik) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											BIK_clear_data(ob->pose);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_proxy_editable(PointerRNA *ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bArmature *arm = ob->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									return (ob->proxy && pchan->bone && (pchan->bone->layer & arm->layer_protected))? 0: PROP_EDITABLE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_location_editable(PointerRNA *ptr, int index)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* only if the axis in question is locked, not editable... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if ((index == 0) && (pchan->protectflag & OB_LOCK_LOCX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 1) && (pchan->protectflag & OB_LOCK_LOCY))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 2) && (pchan->protectflag & OB_LOCK_LOCZ))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return PROP_EDITABLE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_scale_editable(PointerRNA *ptr, int index)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* only if the axis in question is locked, not editable... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if ((index == 0) && (pchan->protectflag & OB_LOCK_SCALEX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 1) && (pchan->protectflag & OB_LOCK_SCALEY))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 2) && (pchan->protectflag & OB_LOCK_SCALEZ))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return PROP_EDITABLE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_rotation_euler_editable(PointerRNA *ptr, int index)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* only if the axis in question is locked, not editable... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if ((index == 0) && (pchan->protectflag & OB_LOCK_ROTX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 1) && (pchan->protectflag & OB_LOCK_ROTY))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else if ((index == 2) && (pchan->protectflag & OB_LOCK_ROTZ))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return PROP_EDITABLE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static int rna_PoseChannel_rotation_4d_editable(PointerRNA *ptr, int index)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* only consider locks if locking components individually... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									if (pchan->protectflag & OB_LOCK_ROT4D) {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										/* only if the axis in question is locked, not editable... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										if ((index == 0) && (pchan->protectflag & OB_LOCK_ROTW))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										else if ((index == 1) && (pchan->protectflag & OB_LOCK_ROTX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										else if ((index == 2) && (pchan->protectflag & OB_LOCK_ROTY))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										else if ((index == 3) && (pchan->protectflag & OB_LOCK_ROTZ))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											return 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									return PROP_EDITABLE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 15:40:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/* not essential, but much faster then the default lookup function */
							 | 
						
					
						
							
								
									
										
										
										
											2011-01-05 14:49:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								int rna_PoseBones_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 15:40:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPose *pose = (bPose*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = BKE_pose_channel_find_name(pose, key);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									if (pchan) {
							 | 
						
					
						
							
								
									
										
										
										
											2011-01-05 14:49:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										RNA_pointer_create(ptr->id.data, &RNA_PoseBone, pchan, r_ptr);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return TRUE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									else {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										return FALSE;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-29 15:40:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_matrix_basis_get(PointerRNA *ptr, float *values)
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_pchan_to_mat4(pchan, (float (*)[4])values);
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_matrix_basis_set(PointerRNA *ptr, const float *values)
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_pchan_apply_mat4(pchan, (float (*)[4])values, FALSE); /* no compat for predictable result */
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_PoseChannel_matrix_set(PointerRNA *ptr, const float *values)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									bPoseChannel *pchan = (bPoseChannel*)ptr->data;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Object *ob = (Object*)ptr->id.data;
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									float tmat[4][4];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_armature_mat_pose_to_bone_ex(ob, pchan, (float (*)[4])values, tmat);
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-05-05 16:03:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									BKE_pchan_apply_mat4(pchan, tmat, FALSE); /* no compat for predictable result */
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_def_bone_group(BlenderRNA *brna)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									static EnumPropertyItem prop_colorSets_items[] = {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{0, "DEFAULT", 0, "Default Colors", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{1, "THEME01", 0, "01 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{2, "THEME02", 0, "02 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{3, "THEME03", 0, "03 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{4, "THEME04", 0, "04 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{5, "THEME05", 0, "05 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{6, "THEME06", 0, "06 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{7, "THEME07", 0, "07 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{8, "THEME08", 0, "08 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{9, "THEME09", 0, "09 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{10, "THEME10", 0, "10 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{11, "THEME11", 0, "11 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{12, "THEME12", 0, "12 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{13, "THEME13", 0, "13 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{14, "THEME14", 0, "14 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{15, "THEME15", 0, "15 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{16, "THEME16", 0, "16 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{17, "THEME17", 0, "17 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{18, "THEME18", 0, "18 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{19, "THEME19", 0, "19 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{20, "THEME20", 0, "20 - Theme Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{-1, "CUSTOM", 0, "Custom Color Set", ""},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* struct */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "BoneGroup", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bActionGroup");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "Bone Group", "Groups of Pose Channels (Bones)");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-09 11:05:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_icon(srna, ICON_GROUP_BONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* name */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Name", "");
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-15 11:07:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_string_funcs(prop, NULL, NULL, "rna_BoneGroup_name_set");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_name_property(srna, prop);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* TODO: add some runtime-collections stuff to access grouped bones  */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* color set + colors */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "color_set", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_sdna(prop, NULL, "customCol");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_colorSets_items);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_funcs(prop, NULL, "rna_BoneGroup_color_set_set", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Color Set", "Custom color set to use");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* TODO: editing the colors for this should result in changes to the color type... */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "colors", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_NEVER_NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* NOTE: the DNA data is not really a pointer, but this code works :) */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_sdna(prop, NULL, "cs");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Colors", "Copy of the colors associated with the group's color set");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 12:38:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static EnumPropertyItem prop_iksolver_items[] = {
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-11 01:11:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									{IKSOLVER_LEGACY, "LEGACY", 0, "Legacy", "Original IK solver"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{IKSOLVER_ITASC, "ITASC", 0, "iTaSC", "Multi constraint, stateful IK solver"},
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static EnumPropertyItem prop_solver_items[] = {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ITASC_SOLVER_SDLS, "SDLS", 0, "SDLS", "Selective Damped Least Square"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{ITASC_SOLVER_DLS, "DLS", 0, "DLS", "Damped Least Square with Numerical Filtering"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cprop)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									FunctionRNA *func;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *parm;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-23 14:08:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_srna(cprop, "PoseBoneConstraints");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "PoseBoneConstraints", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bPoseChannel");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "PoseBone Constraints", "Collection of pose bone constraints");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* Collection active property */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "Constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_active_constraint_get",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                               "rna_PoseChannel_active_constraint_set", NULL, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Active Constraint", "Active PoseChannel constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* Constraint collection */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									func = RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_function_ui_description(func, "Add a constraint to this object");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* return type */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_function_return(func, parm);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-28 13:33:56 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* constraint to add */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									parm = RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(parm, PROP_REQUIRED);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									func = RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove");
							 | 
						
					
						
							
								
									
										
										
										
											2011-09-19 13:23:58 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_function_ui_description(func, "Remove a constraint from this object");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID); /* ID needed for refresh */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* constraint to remove */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									parm = RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 06:40:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_def_pose_channel(BlenderRNA *brna)
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									static float default_quat[4] = {1, 0, 0, 0};	/* default quaternion values */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									static float default_axisAngle[4] = {0, 0, 1, 0};	/* default axis-angle rotation values */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									static float default_scale[3] = {1, 1, 1}; /* default scale values */
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-02 11:51:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									const int matrix_dimsize[] = {4, 4};
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "PoseBone", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bPoseChannel");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "Pose Bone", "Channel defining pose data for a bone in a Pose");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_path_func(srna, "rna_PoseBone_path");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-19 10:16:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_idprops_func(srna, "rna_PoseBone_idprops");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* Bone Constraints */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "Constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-13 16:08:03 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rna_def_pose_channel_constraints(brna, prop);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* Name + Selection Status */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 17:59:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Name", "");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_name_property(srna, prop);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-28 03:45:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* Baked Bone Path cache data */
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-07 22:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rna_def_motionpath_common(srna);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* Relationships to other bones */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "bone", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_NEVER_NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "Bone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Bone", "Bone associated with this PoseBone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "PoseBone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Parent", "Parent of this pose bone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "child", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "PoseBone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Child", "Child of this pose bone");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* Transformation settings */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "loc");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_array_func(prop, "rna_PoseChannel_location_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Location", "");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "size");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_array_func(prop, "rna_PoseChannel_scale_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-23 05:02:00 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_array_default(prop, default_scale);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Scale", "");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "quat");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-28 03:45:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_array_default(prop, default_quat);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Quaternion Rotation", "Rotation in Quaternions");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-11 12:05:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-28 10:19:20 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX: for axis-angle, it would have been nice to have 2 separate fields for UI purposes, but
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 * having a single one is better for Keyframing and other property-management situations...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-09 01:14:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_array(prop, 4);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_funcs(prop, "rna_PoseChannel_rotation_axis_angle_get",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                             "rna_PoseChannel_rotation_axis_angle_set", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_4d_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-12-28 03:45:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_array_default(prop, default_axisAngle);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-11 12:05:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-02 11:51:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "eul");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-25 12:00:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_array_func(prop, "rna_PoseChannel_rotation_euler_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Euler Rotation", "Rotation in Eulers");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-02 11:51:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-02 11:51:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_sdna(prop, NULL, "rotmode");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, posebone_rotmode_items); /* XXX move to using a single define of this someday */
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-06 23:15:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_funcs(prop, NULL, "rna_PoseChannel_rotation_mode_set", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX... disabled, since proxy-locked layers are currently used for ensuring proxy-syncing too */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-02-02 11:51:10 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Rotation Mode", "");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-07 11:05:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-08 05:02:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* transform matrices - should be read-only since these are set directly by AnimSys evaluation */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "matrix_channel", PROP_FLOAT, PROP_MATRIX);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-24 14:26:47 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "chan_mat");
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_multi_array(prop, 2, matrix_dimsize);
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Channel Matrix", "4x4 matrix, before constraints");
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* writable because it touches loc/scale/rot directly */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_multi_array(prop, 2, matrix_dimsize);
							 | 
						
					
						
							
								
									
										
										
										
											2011-09-19 13:23:58 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Basis Matrix",
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									                         "Alternative access to location/scale/rotation relative to the parent and own rest bone");
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_funcs(prop, "rna_PoseChannel_matrix_basis_get", "rna_PoseChannel_matrix_basis_set", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-30 20:22:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2010-03-31 20:39:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* final matrix */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-16 08:20:15 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "pose_mat");
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-15 06:38:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_multi_array(prop, 2, matrix_dimsize);
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_funcs(prop, NULL, "rna_PoseChannel_matrix_set", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Pose Matrix",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Final 4x4 matrix after constraints and drivers are applied (object space)");
							 | 
						
					
						
							
								
									
										
										
										
											2011-07-07 16:09:57 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-24 11:58:49 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "pose_head");
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-24 11:58:49 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "pose_tail");
							 | 
						
					
						
							
								
									
										
										
										
											2009-03-23 13:24:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* IK Settings */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "is_in_ik_chain", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_funcs(prop,  "rna_PoseChannel_has_ik_get", NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_ik_x", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-20 02:08:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK X Lock", "Disallow movement around the X axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_ik_y", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-20 02:08:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Y Lock", "Disallow movement around the Y axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 19:42:33 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_ik_z", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-20 02:08:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Z Lock", "Disallow movement around the Z axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_ik_limit_x", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_ik_limit_y", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_ik_limit_z", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_ik_rotation_control", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ROTCTL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK rot control", "Apply channel rotation as IK constraint");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_ik_linear_control", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_LINCTL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK rot control", "Apply channel size as IK constraint if stretching is enabled");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, -M_PI, 0.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, M_PI);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, -M_PI, 0.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, M_PI);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, -M_PI, 0.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-25 18:38:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, M_PI);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_stiffness_x", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "stiffness[0]");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 0.99f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK X Stiffness", "IK stiffness around the X axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_stiffness_y", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "stiffness[1]");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 0.99f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Y Stiffness", "IK stiffness around the Y axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_stiffness_z", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-14 22:11:25 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "stiffness[2]");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 0.99f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Z Stiffness", "IK stiffness around the Z axis");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_stretch", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "ikstretch");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_IK_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_rotation_weight", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "ikrotweight");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Rot Weight", "Weight of rotation constraint for IK");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_linear_weight", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "iklinweight");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Lin Weight", "Weight of scale constraint for IK");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-07 11:05:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* custom bone shapes */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_sdna(prop, NULL, "custom");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "Object");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-12-22 16:33:13 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_funcs(prop, NULL, "rna_PoseChannel_bone_custom_set", NULL, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-05 11:47:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "custom_shape_transform", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-05 11:47:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_sdna(prop, NULL, "custom_tx");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "PoseBone");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Custom Shape Transform",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Bone that defines the display transform of this custom shape");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-05 11:47:43 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* bone groups */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_sdna(prop, NULL, "agrp_index");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-11-30 20:22:26 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_funcs(prop, "rna_PoseChannel_bone_group_index_get", "rna_PoseChannel_bone_group_index_set",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                           "rna_PoseChannel_bone_group_index_range");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group)");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "BoneGroup");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_bone_group_get",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                               "rna_PoseChannel_bone_group_set", NULL, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Bone Group", "Bone Group this pose channel belongs to");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-23 12:53:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* transform locks */
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_array(prop, 3);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface");
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-13 15:20:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-07 11:05:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_array(prop, 3);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface");
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-13 15:20:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-07 11:05:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-11 12:05:09 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX this is sub-optimal - it really should be included above, but due to technical reasons
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 *     we can't do this! */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_rotation_w", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-12 12:30:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTW);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Lock Rotation (4D Angle)",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Lock editing of 'angle' component of four-component rotations in the interface");
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-13 15:20:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-12 12:30:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* XXX this needs a better name */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_rotations_4d", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-12 12:30:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROT4D);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Lock Rotations (4D)",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Lock editing of four component rotations by components (instead of as Eulers)");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-12 12:30:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-10 08:33:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-16 18:04:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_array(prop, 3);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface");
							 | 
						
					
						
							
								
									
										
										
										
											2010-07-13 15:20:35 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-12 17:08:28 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_editable_func(prop, "rna_PoseChannel_proxy_editable");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-07 11:05:16 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-11 19:58:30 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_api_pose_channel(srna);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_def_pose_itasc(BlenderRNA *brna)
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									static const EnumPropertyItem prop_itasc_mode_items[] = {
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{0, "ANIMATION", 0, "Animation",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										    "Stateless solver computing pose starting from current action and non-IK constraints"},
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										{ITASC_SIMULATION, "SIMULATION", 0, "Simulation",
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										                   "Statefull solver running in real-time context and ignoring actions "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										                   "and non-IK constraints"},
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-02 07:20:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									static const EnumPropertyItem prop_itasc_reiteration_items[] = {
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-11 01:11:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{0, "NEVER", 0, "Never", "The solver does not reiterate, not even on first frame (starts from rest pose)"},
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{ITASC_INITIAL_REITERATION, "INITIAL", 0, "Initial",
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										                            "The solver reiterates (converges) on the first frame but not on "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										                            "subsequent frame"},
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{ITASC_INITIAL_REITERATION|ITASC_REITERATION, "ALWAYS", 0, "Always",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										                                              "The solver reiterates (converges) on all frames"},
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-02 07:20:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										{0, NULL, 0, NULL, NULL}};
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "Itasc", "IKParam");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bItasc");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "bItasc", "Parameters for the iTaSC IK solver");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "precision", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "precision");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 0.1f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Precision", "Precision of convergence in case of reiteration");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_sdna(prop, NULL, "numiter");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 1.f, 1000.f);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Iterations",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Maximum number of iterations for convergence in case of reiteration");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "step_count", PROP_INT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_sdna(prop, NULL, "numstep");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 1.f, 50.f);
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-26 12:30:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Num steps", "Divide the frame interval into this many steps");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-02 07:20:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_itasc_mode_items);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Mode", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "reiteration_method", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-10-02 07:20:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_itasc_reiteration_items);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Reiteration",
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-26 12:30:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									                         "Defines if the solver is allowed to reiterate (converge until "
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									                         "precision is met) on none, first or all frames");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "use_auto_step", PROP_BOOLEAN, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_boolean_sdna(prop, NULL, "flag", ITASC_AUTO_STEP);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Auto step",
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									                         "Automatically determine the optimal number of steps for best "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "performance/accuracy trade off");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "step_min", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "minstep");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 0.1f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Min step", "Lower bound for timestep in second in case of automatic substeps");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "step_max", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "maxstep");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Max step", "Higher bound for timestep in second in case of automatic substeps");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "feedback", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "feedback");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 100.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Feedback",
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									                         "Feedback coefficient for error correction, average response time is 1/feedback "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "(default=20)");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "velocity_max", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "maxvel");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 100.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-26 12:30:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Max Velocity", "Maximum joint velocity in rad/s (default=50)");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "solver", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_sdna(prop, NULL, "solver");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_solver_items);
							 | 
						
					
						
							
								
									
										
										
										
											2011-11-26 12:30:01 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Solver", "Solving method selection: automatic damping or manual damping");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update_rebuild");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "damping_max", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "dampmax");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Damp",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Maximum damping coefficient when singular value is nearly 0 "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "(higher values=more stability, less reactivity - default=0.5)");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "damping_epsilon", PROP_FLOAT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_float_sdna(prop, NULL, "dampeps");
							 | 
						
					
						
							
								
									
										
										
										
											2012-04-29 15:47:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_range(prop, 0.0f, 1.0f);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Epsilon",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Singular value under which damping is progressively applied "
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "(higher values=more stability, less reactivity - default=0.1)");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Itasc_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_def_pose_ikparam(BlenderRNA *brna)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "IKParam", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bIKParam");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "IKParam", "Base type for IK solver parameters");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_refine_func(srna, "rna_IKParam_refine");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_sdna(prop, NULL, "iksolver");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_iksolver_items);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Solver",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/* pose.bone_groups */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								static void rna_def_bone_groups(BlenderRNA *brna, PropertyRNA *cprop)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/*	FunctionRNA *func; */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/*	PropertyRNA *parm; */
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_srna(cprop, "BoneGroups");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "BoneGroups", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bPose");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "Bone Groups", "Collection of bone groups");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "BoneGroup");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                               "rna_Pose_active_bone_group_set", NULL, NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_sdna(prop, NULL, "active_group");
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_int_funcs(prop, "rna_Pose_active_bone_group_index_get", "rna_Pose_active_bone_group_index_set",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                           "rna_Pose_active_bone_group_index_range");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-24 04:02:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Active Bone Group Index", "Active index in bone groups array");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								static void rna_def_pose(BlenderRNA *brna)
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									StructRNA *srna;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									PropertyRNA *prop;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* struct definition */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									srna = RNA_def_struct(brna, "Pose", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_sdna(srna, "bPose");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_struct_ui_text(srna, "Pose", "A collection of pose channels, including settings for animating bones");
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* pose channels */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-11-18 11:40:55 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "PoseBone");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature");
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-18 09:27:36 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										/* can be removed, only for fast lookup */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string", NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* bone groups */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "BoneGroup");
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "Bone Groups", "Groups of the bones");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-23 22:16:45 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rna_def_bone_groups(brna, prop);
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-07 22:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* ik solvers */
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_solver", PROP_ENUM, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_sdna(prop, NULL, "iksolver");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_funcs(prop, NULL, "rna_Pose_ik_solver_set", NULL);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_enum_items(prop, prop_iksolver_items);
							 | 
						
					
						
							
								
									
										
										
										
											2011-10-20 07:56:04 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Solver",
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									                         "Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC");
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_ik_solver_update");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2012-03-05 23:30:41 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									prop = RNA_def_property(srna, "ik_param", PROP_POINTER, PROP_NONE);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_struct_type(prop, "IKParam");
							 | 
						
					
						
							
								
									
										
										
										
											2010-08-03 05:14:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_pointer_funcs(prop, "rna_Pose_ikparam_get", NULL, "rna_Pose_ikparam_typef", NULL);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_clear_flag(prop, PROP_EDITABLE);
							 | 
						
					
						
							
								
									
										
										
										
											2010-02-10 21:15:44 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									RNA_def_property_ui_text(prop, "IK Param", "Parameters for IK solver");
							 | 
						
					
						
							
								
									
										
										
										
											2010-01-07 22:54:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									/* animviz */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rna_def_animviz_common(srna);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-22 16:35:07 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									/* RNA_api_pose(srna); */
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								void RNA_def_pose(BlenderRNA *brna)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								{
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rna_def_pose(brna);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rna_def_pose_channel(brna);
							 | 
						
					
						
							
								
									
										
										
										
											2009-09-24 21:22:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rna_def_pose_ikparam(brna);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									rna_def_pose_itasc(brna);
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-21 10:18:08 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									rna_def_bone_group(brna);
							 | 
						
					
						
							
								
									
										
										
										
											2009-01-07 04:06:52 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								}
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#endif
							 |