+ bugfix in btAlignedObjectArray, not calling destructors on resize to smaller array.
Thanks Benoit for pointing this out, and bugfix: http://code.google.com/p/bullet/issues/detail?id=218 + Added point to point, hinge, slider and generic 6dof constraints to Maya Dynamica plugin Thanks to Herbert Law for the constribution: http://code.google.com/p/bullet/issues/detail?id=221
This commit is contained in:
@@ -1 +1 @@
|
||||
+ BulletDynamica2.73 1.0
|
||||
+ BulletDynamica2.75 1.0
|
||||
@@ -3,12 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BulletMayaPlugin", "BulletMayaPlugin.vcproj", "{681412B0-F197-4A2F-9263-DEA2E8690146}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE} = {6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}
|
||||
{ED51AA4D-82EF-089C-CD6D-91CF224E2A9E} = {ED51AA4D-82EF-089C-CD6D-91CF224E2A9E}
|
||||
{B1B5F775-54A9-2437-E4AC-7E817E492142} = {B1B5F775-54A9-2437-E4AC-7E817E492142}
|
||||
{61BD1097-CF2E-B296-DAA9-73A6FE135319} = {61BD1097-CF2E-B296-DAA9-73A6FE135319}
|
||||
{A0958CD9-0E39-4A77-3711-9B488F508FBF} = {A0958CD9-0E39-4A77-3711-9B488F508FBF}
|
||||
{6AB01C9C-9163-F400-B5C3-20D046631E17} = {6AB01C9C-9163-F400-B5C3-20D046631E17}
|
||||
{ED51AA4D-82EF-089C-CD6D-91CF224E2A9E} = {ED51AA4D-82EF-089C-CD6D-91CF224E2A9E}
|
||||
{7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A} = {7D6E339F-9C2C-31DA-FDB0-5EE50973CF2A}
|
||||
{A0958CD9-0E39-4A77-3711-9B488F508FBF} = {A0958CD9-0E39-4A77-3711-9B488F508FBF}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libbulletcollision", "..\..\msvc\8\libbulletcollision.vcproj", "{6ADA430D-009C-2ED4-A787-2AC2D6FEB8CE}"
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="install.bat"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
@@ -693,11 +694,355 @@
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\bt_solver.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\colladaExport.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collisionShapeNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\drawUtils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyArrayCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pdbIO.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pluginMain.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyArrayNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\box_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\box_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_box_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_collision_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_convex_hull_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_mesh_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_plane_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_rigid_body.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_solver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_sphere_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\colladaExport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collision_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collision_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collisionShapeNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\convex_hull_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\convex_hull_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\drawUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyArrayCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mathUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mayaUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mesh_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mesh_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pdbIO.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\plane_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\plane_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigid_body.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigid_body_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyArrayNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\shared_ptr.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sphere_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sphere_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Constraint"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\constraint\bt_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\bt_hinge_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\bt_nail_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\bt_sixdof_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\bt_slider_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dHingeConstraintCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dHingeConstraintCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dNailConstraintCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dNailConstraintCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dsixdofConstraintCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dsixdofConstraintCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dSliderConstraintCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\dSliderConstraintCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\hinge_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\hinge_constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\hingeConstraintNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\hingeConstraintNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\nail_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\nail_constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\nailConstraintNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\nailConstraintNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sixdof_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sixdof_constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sixdofConstraintNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sixdofConstraintNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\slider_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\slider_constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sliderConstraintNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint\sliderConstraintNode.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="slider"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="sixdof"
|
||||
>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdCollisionShapeTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdHingeConstraintTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdNailConstraintTemplate.mel"
|
||||
>
|
||||
@@ -710,150 +1055,18 @@
|
||||
RelativePath=".\scripts\AEdRigidBodyTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdSixdofConstraintTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdSliderConstraintTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\AEdSolverTemplate.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\box_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\box_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_box_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_collision_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_convex_hull_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_mesh_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_nail_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_plane_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_rigid_body.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_solver.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_solver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\bt_sphere_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\colladaExport.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\colladaExport.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collision_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collision_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collisionShapeNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\collisionShapeNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\convex_hull_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\convex_hull_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dNailConstraintCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dNailConstraintCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\drawUtils.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\drawUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyArrayCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyArrayCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dRigidBodyCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverCmd.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverCmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\dSolverNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\scripts\dynamica.mel"
|
||||
>
|
||||
@@ -862,106 +1075,6 @@
|
||||
RelativePath=".\scripts\dynamicaUI.mel"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mathUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mayaUtils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mesh_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\mesh_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\nail_constraint.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\nail_constraint_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\nailConstraintNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\nailConstraintNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pdbIO.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pdbIO.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\plane_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\plane_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pluginMain.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigid_body.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigid_body_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyArrayNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyArrayNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyNode.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\rigidBodyNode.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\shared_ptr.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\solver_impl.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sphere_shape.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\sphere_shape_impl.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
|
||||
@@ -28,6 +28,8 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#include "shared_ptr.h"
|
||||
#include "rigid_body_impl.h"
|
||||
#include "bt_collision_shape.h"
|
||||
#include "LinearMath/btAlignedObjectArray.h"
|
||||
#include "constraint/bt_constraint.h"
|
||||
|
||||
class bt_rigid_body_t: public rigid_body_impl_t {
|
||||
public:
|
||||
@@ -153,10 +155,28 @@ public:
|
||||
m_body->applyTorque(btVector3(t[0], t[1], t[2]));
|
||||
}
|
||||
|
||||
virtual void update_constraint()
|
||||
{
|
||||
int count = m_constraintRef.size();
|
||||
for(int i=0; i<count; i++)
|
||||
{
|
||||
m_constraintRef[i]->update_constraint();
|
||||
}
|
||||
}
|
||||
|
||||
btRigidBody* body() { return m_body.get(); }
|
||||
|
||||
virtual void add_constraint(bt_constraint_t* constraint)
|
||||
{
|
||||
m_constraintRef.push_back(constraint);
|
||||
}
|
||||
virtual void remove_constraint(bt_constraint_t* constraint)
|
||||
{
|
||||
m_constraintRef.remove(constraint);
|
||||
}
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
btAlignedObjectArray<bt_constraint_t*> m_constraintRef;
|
||||
|
||||
bt_rigid_body_t(collision_shape_impl_t* cs):
|
||||
m_collision_shape(cs),
|
||||
|
||||
@@ -37,7 +37,10 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#include "bt_box_shape.h"
|
||||
#include "bt_convex_hull_shape.h"
|
||||
#include "bt_mesh_shape.h"
|
||||
#include "bt_nail_constraint.h"
|
||||
#include "constraint/bt_nail_constraint.h"
|
||||
#include "constraint/bt_hinge_constraint.h"
|
||||
#include "constraint/bt_slider_constraint.h"
|
||||
#include "constraint/bt_sixdof_constraint.h"
|
||||
|
||||
class bt_solver_t: public solver_impl_t
|
||||
{
|
||||
@@ -76,6 +79,18 @@ public:
|
||||
{
|
||||
return new bt_nail_constraint_t(rb, pivot);
|
||||
}
|
||||
virtual hinge_constraint_impl_t* create_hinge_constraint(rigid_body_impl_t* rb, vec3f const& pivot)
|
||||
{
|
||||
return new bt_hinge_constraint_t(rb, pivot);
|
||||
}
|
||||
virtual slider_constraint_impl_t* create_slider_constraint(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB)
|
||||
{
|
||||
return new bt_slider_constraint_t(rbA, pivotA, rbB, pivotB);
|
||||
}
|
||||
virtual sixdof_constraint_impl_t* create_sixdof_constraint(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB)
|
||||
{
|
||||
return new bt_sixdof_constraint_t(rbA, pivotA, rbB, pivotB);
|
||||
}
|
||||
|
||||
virtual void add_rigid_body(rigid_body_impl_t* rb)
|
||||
{
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
;--------------------------------
|
||||
|
||||
; The name of the installer
|
||||
Name "Dynamica Bullet 2.73 physics plugin for Maya 2008"
|
||||
Name "Dynamica Bullet 2.75 physics plugin for Maya 2008"
|
||||
|
||||
; The file to write
|
||||
OutFile "DynamicaForMaya2009_32bit.exe"
|
||||
OutFile "DynamicaForMaya2008_32bit.exe"
|
||||
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES\DynamicaBullet2.73\
|
||||
InstallDir $PROGRAMFILES\DynamicaBullet2.75\
|
||||
|
||||
UninstPage uninstConfirm
|
||||
UninstPage instfiles
|
||||
|
||||
125
Extras/MayaPlugin/constraint/bt_hinge_constraint.h
Normal file
125
Extras/MayaPlugin/constraint/bt_hinge_constraint.h
Normal file
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//bt_hinge_constraint.h
|
||||
|
||||
#ifndef DYN_BT_HINGE_CONSTRAINT_H
|
||||
#define DYN_BT_HINGE_CONSTRAINT_H
|
||||
|
||||
#include "bt_constraint.h"
|
||||
#include "hinge_constraint_impl.h"
|
||||
|
||||
class bt_hinge_constraint_t: public bt_constraint_t, public hinge_constraint_impl_t {
|
||||
public:
|
||||
|
||||
virtual void set_damping(float d) {
|
||||
// btHingeConstraint* p2pc = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
// p2pc->m_setting.m_damping = d;
|
||||
}
|
||||
|
||||
virtual void set_limit(float lower, float upper, float softness, float bias_factor, float relaxation_factor) {
|
||||
btHingeConstraint* hinge = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
hinge->setLimit(lower, upper, softness, bias_factor, relaxation_factor);
|
||||
}
|
||||
|
||||
virtual void set_axis(vec3f const &p) {
|
||||
btHingeConstraint* hinge = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
btVector3 axis(p[0], p[1], p[2]);
|
||||
hinge->setAxis(axis);
|
||||
}
|
||||
|
||||
virtual float damping() const {
|
||||
// btHingeConstraint const* hc = static_cast<btHingeConstraint const*>(m_constraint.get());
|
||||
// return hc->m_setting.m_damping;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
virtual void set_pivot(vec3f const &p) {
|
||||
/* btHingeConstraint* p2pc = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
btVector3 bt_pivot(p[0], p[1], p[2]);
|
||||
p2pc->setPivotA(bt_pivot);
|
||||
p2pc->setPivotB(m_constraint->getRigidBodyA().getCenterOfMassTransform()(bt_pivot));
|
||||
// p2pc->buildJacobian();
|
||||
*/ }
|
||||
|
||||
virtual void get_pivot(vec3f &p) const {
|
||||
/* btHingeConstraint const* hc = static_cast<btHingeConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInA().x();
|
||||
p[1] = hc->getPivotInA().y();
|
||||
p[2] = hc->getPivotInA().z();
|
||||
*/ }
|
||||
|
||||
virtual void get_world_pivot(vec3f &p) const {
|
||||
/* btHingeConstraint const* hc = static_cast<btHingeConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInB().x();
|
||||
p[1] = hc->getPivotInB().y();
|
||||
p[2] = hc->getPivotInB().z();
|
||||
*/ }
|
||||
|
||||
virtual void set_world(vec3f const &p) {
|
||||
btHingeConstraint* hc = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
btVector3 world(p[0], p[1], p[2]);
|
||||
btVector3 pivotA = hc->getRigidBodyA().getWorldTransform().inverse() (world);
|
||||
hc->getAFrame().getOrigin() = pivotA;
|
||||
hc->getBFrame().getOrigin() = world;
|
||||
// p2pc->buildJacobian();
|
||||
}
|
||||
|
||||
virtual void get_world(vec3f &p) const {
|
||||
btHingeConstraint const* hc = static_cast<btHingeConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getBFrame().getOrigin().x();
|
||||
p[1] = hc->getBFrame().getOrigin().y();
|
||||
p[2] = hc->getBFrame().getOrigin().z();
|
||||
}
|
||||
|
||||
virtual void enable_motor(bool enable, float velocity, float impulse) {
|
||||
btHingeConstraint* hinge = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
hinge->enableAngularMotor(enable, velocity, impulse);
|
||||
}
|
||||
|
||||
virtual void update_constraint()
|
||||
{
|
||||
btHingeConstraint* hc = static_cast<btHingeConstraint*>(m_constraint.get());
|
||||
btVector3 world = hc->getBFrame().getOrigin();
|
||||
btVector3 pivotA = hc->getRigidBodyA().getWorldTransform().inverse() (world);
|
||||
hc->getAFrame().getOrigin() = pivotA;
|
||||
}
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
|
||||
bt_hinge_constraint_t(rigid_body_impl_t* rb, vec3f const& pivot):
|
||||
hinge_constraint_impl_t()
|
||||
{
|
||||
btRigidBody& bt_body = *static_cast<bt_rigid_body_t*>(rb)->body();
|
||||
btVector3 pivotA = bt_body.getCenterOfMassPosition();
|
||||
btVector3 btAxisA( 0.0f, 1.0f, 0.0f ); // pointing upwards, aka Y-axis
|
||||
btHingeConstraint * hinge = new btHingeConstraint(bt_body, -pivotA, btAxisA);
|
||||
m_constraint.reset(hinge);
|
||||
rb->add_constraint(this);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif //DYN_BT_HINGE_CONSTRAINT_H
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
virtual void set_pivot(vec3f const &p) {
|
||||
virtual void set_pivotA(vec3f const &p) {
|
||||
btPoint2PointConstraint* p2pc = static_cast<btPoint2PointConstraint*>(m_constraint.get());
|
||||
btVector3 bt_pivot(p[0], p[1], p[2]);
|
||||
p2pc->setPivotA(bt_pivot);
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
// p2pc->buildJacobian();
|
||||
}
|
||||
|
||||
virtual void get_pivot(vec3f &p) const {
|
||||
virtual void get_pivotA(vec3f &p) const {
|
||||
btPoint2PointConstraint const* p2pc = static_cast<btPoint2PointConstraint const*>(m_constraint.get());
|
||||
p[0] = p2pc->getPivotInA().x();
|
||||
p[1] = p2pc->getPivotInA().y();
|
||||
@@ -64,6 +64,29 @@ public:
|
||||
p[2] = p2pc->getPivotInB().z();
|
||||
}
|
||||
|
||||
virtual void set_world(vec3f const &p) {
|
||||
btPoint2PointConstraint* p2pc = static_cast<btPoint2PointConstraint*>(m_constraint.get());
|
||||
btVector3 world(p[0], p[1], p[2]);
|
||||
btVector3 pivotA = p2pc->getRigidBodyA().getWorldTransform().inverse() (world);
|
||||
p2pc->setPivotA(pivotA);
|
||||
p2pc->setPivotB(world);
|
||||
p2pc->buildJacobian();
|
||||
}
|
||||
|
||||
virtual void get_world(vec3f &p) const {
|
||||
btPoint2PointConstraint const* p2pc = static_cast<btPoint2PointConstraint const*>(m_constraint.get());
|
||||
p[0] = p2pc->getPivotInB().x();
|
||||
p[1] = p2pc->getPivotInB().y();
|
||||
p[2] = p2pc->getPivotInB().z();
|
||||
}
|
||||
|
||||
virtual void update_constraint()
|
||||
{
|
||||
btPoint2PointConstraint* p2pc = static_cast<btPoint2PointConstraint*>(m_constraint.get());
|
||||
btVector3 world = p2pc->getPivotInB();
|
||||
btVector3 pivotA = p2pc->getRigidBodyA().getWorldTransform().inverse() (world);
|
||||
p2pc->setPivotA(pivotA);
|
||||
}
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
|
||||
@@ -71,8 +94,9 @@ protected:
|
||||
nail_constraint_impl_t()
|
||||
{
|
||||
btRigidBody& bt_body = *static_cast<bt_rigid_body_t*>(rb)->body();
|
||||
|
||||
m_constraint.reset(new btPoint2PointConstraint(bt_body, btVector3(pivot[0], pivot[1], pivot[2])));
|
||||
btVector3 pivotA = bt_body.getCenterOfMassPosition();
|
||||
m_constraint.reset(new btPoint2PointConstraint(bt_body, -pivotA));
|
||||
rb->add_constraint(this);
|
||||
}
|
||||
|
||||
private:
|
||||
123
Extras/MayaPlugin/constraint/bt_sixdof_constraint.h
Normal file
123
Extras/MayaPlugin/constraint/bt_sixdof_constraint.h
Normal file
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//bt_sixdof_constraint.h
|
||||
|
||||
#ifndef DYN_BT_SIXDOF_CONSTRAINT_H
|
||||
#define DYN_BT_SIXDOF_CONSTRAINT_H
|
||||
|
||||
#include "bt_constraint.h"
|
||||
#include "sixdof_constraint_impl.h"
|
||||
|
||||
class bt_sixdof_constraint_t: public bt_constraint_t, public sixdof_constraint_impl_t {
|
||||
public:
|
||||
|
||||
virtual void set_damping(float d) {
|
||||
// btGeneric6DofConstraint* p2pc = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
// p2pc->m_setting.m_damping = d;
|
||||
}
|
||||
|
||||
virtual void set_LinLimit(float lower, float upper) {
|
||||
btGeneric6DofConstraint* sixdof = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
// sixdof->setLowerLinLimit(lower);
|
||||
// sixdof->setUpperLinLimit(upper);
|
||||
}
|
||||
|
||||
virtual void set_AngLimit(float lower, float upper) {
|
||||
btGeneric6DofConstraint* sixdof = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
// sixdof->setLowerAngLimit(lower);
|
||||
// sixdof->setUpperAngLimit(upper);
|
||||
}
|
||||
|
||||
virtual float damping() const {
|
||||
// btGeneric6DofConstraint const* hc = static_cast<btGeneric6DofConstraint const*>(m_constraint.get());
|
||||
// return hc->m_setting.m_damping;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
virtual void set_pivot(vec3f const &p) {
|
||||
/* btGeneric6DofConstraint* p2pc = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
btVector3 bt_pivot(p[0], p[1], p[2]);
|
||||
p2pc->setPivotA(bt_pivot);
|
||||
p2pc->setPivotB(m_constraint->getRigidBodyA().getCenterOfMassTransform()(bt_pivot));
|
||||
// p2pc->buildJacobian();
|
||||
*/ }
|
||||
|
||||
virtual void get_pivot(vec3f &p) const {
|
||||
/* btGeneric6DofConstraint const* hc = static_cast<btGeneric6DofConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInA().x();
|
||||
p[1] = hc->getPivotInA().y();
|
||||
p[2] = hc->getPivotInA().z();
|
||||
*/ }
|
||||
|
||||
virtual void get_world_pivot(vec3f &p) const {
|
||||
/* btGeneric6DofConstraint const* hc = static_cast<btGeneric6DofConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInB().x();
|
||||
p[1] = hc->getPivotInB().y();
|
||||
p[2] = hc->getPivotInB().z();
|
||||
*/ }
|
||||
|
||||
virtual void set_world(vec3f const &p) {
|
||||
btGeneric6DofConstraint* constraint = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
btTransform framInA = constraint->getRigidBodyA().getCenterOfMassTransform().inverse();
|
||||
btTransform framInB = constraint->getRigidBodyB().getCenterOfMassTransform().inverse();
|
||||
constraint->getFrameOffsetA() = framInA;
|
||||
constraint->getFrameOffsetB() = framInB;
|
||||
world = p;
|
||||
}
|
||||
|
||||
virtual void get_world(vec3f &p) const {
|
||||
/* btGeneric6DofConstraint const* hc = static_cast<btGeneric6DofConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getFrameOffsetB().getOrigin().x();
|
||||
p[1] = hc->getFrameOffsetB().getOrigin().y();
|
||||
p[2] = hc->getFrameOffsetB().getOrigin().z();
|
||||
*/ p = world;
|
||||
}
|
||||
|
||||
virtual void update_constraint()
|
||||
{
|
||||
btGeneric6DofConstraint* constraint = static_cast<btGeneric6DofConstraint*>(m_constraint.get());
|
||||
constraint->getFrameOffsetA() = constraint->getRigidBodyA().getCenterOfMassTransform().inverse();
|
||||
constraint->getFrameOffsetB() = constraint->getRigidBodyB().getCenterOfMassTransform().inverse();
|
||||
}
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
vec3f world;
|
||||
|
||||
bt_sixdof_constraint_t(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB):
|
||||
sixdof_constraint_impl_t()
|
||||
{
|
||||
btRigidBody& bt_bodyA = *static_cast<bt_rigid_body_t*>(rbA)->body();
|
||||
btRigidBody& bt_bodyB = *static_cast<bt_rigid_body_t*>(rbB)->body();
|
||||
btTransform framInA = bt_bodyA.getCenterOfMassTransform().inverse();
|
||||
btTransform framInB = bt_bodyB.getCenterOfMassTransform().inverse();
|
||||
btGeneric6DofConstraint * sixdof = new btGeneric6DofConstraint(bt_bodyA, bt_bodyB, framInA, framInB, true);
|
||||
m_constraint.reset(sixdof);
|
||||
rbA->add_constraint(this);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif //DYN_BT_SIXDOF_CONSTRAINT_H
|
||||
128
Extras/MayaPlugin/constraint/bt_slider_constraint.h
Normal file
128
Extras/MayaPlugin/constraint/bt_slider_constraint.h
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//bt_slider_constraint.h
|
||||
|
||||
#ifndef DYN_BT_SLIDER_CONSTRAINT_H
|
||||
#define DYN_BT_SLIDER_CONSTRAINT_H
|
||||
|
||||
#include "bt_constraint.h"
|
||||
#include "slider_constraint_impl.h"
|
||||
|
||||
class bt_slider_constraint_t: public bt_constraint_t, public slider_constraint_impl_t {
|
||||
public:
|
||||
|
||||
virtual void set_damping(float d) {
|
||||
// btSliderConstraint* p2pc = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
// p2pc->m_setting.m_damping = d;
|
||||
}
|
||||
|
||||
virtual void set_LinLimit(float lower, float upper) {
|
||||
btSliderConstraint* slider = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
slider->setLowerLinLimit(lower);
|
||||
slider->setUpperLinLimit(upper);
|
||||
}
|
||||
|
||||
virtual void set_AngLimit(float lower, float upper) {
|
||||
btSliderConstraint* slider = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
slider->setLowerAngLimit(lower);
|
||||
slider->setUpperAngLimit(upper);
|
||||
}
|
||||
|
||||
virtual float damping() const {
|
||||
// btSliderConstraint const* hc = static_cast<btSliderConstraint const*>(m_constraint.get());
|
||||
// return hc->m_setting.m_damping;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//
|
||||
virtual void set_pivot(vec3f const &p) {
|
||||
/* btSliderConstraint* p2pc = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
btVector3 bt_pivot(p[0], p[1], p[2]);
|
||||
p2pc->setPivotA(bt_pivot);
|
||||
p2pc->setPivotB(m_constraint->getRigidBodyA().getCenterOfMassTransform()(bt_pivot));
|
||||
// p2pc->buildJacobian();
|
||||
*/ }
|
||||
|
||||
virtual void get_pivot(vec3f &p) const {
|
||||
/* btSliderConstraint const* hc = static_cast<btSliderConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInA().x();
|
||||
p[1] = hc->getPivotInA().y();
|
||||
p[2] = hc->getPivotInA().z();
|
||||
*/ }
|
||||
|
||||
virtual void get_world_pivot(vec3f &p) const {
|
||||
/* btSliderConstraint const* hc = static_cast<btSliderConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getPivotInB().x();
|
||||
p[1] = hc->getPivotInB().y();
|
||||
p[2] = hc->getPivotInB().z();
|
||||
*/ }
|
||||
|
||||
virtual void set_world(vec3f const &p) {
|
||||
/* btSliderConstraint* hc = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
btVector3 world(p[0], p[1], p[2]);
|
||||
btVector3 pivotA = hc->getRigidBodyA().getWorldTransform().inverse() (world);
|
||||
hc->getFrameOffsetA().getOrigin() = pivotA;
|
||||
hc->getFrameOffsetB().getOrigin() = world;
|
||||
*/ // p2pc->buildJacobian();
|
||||
world = p;
|
||||
}
|
||||
|
||||
virtual void get_world(vec3f &p) const {
|
||||
/* btSliderConstraint const* hc = static_cast<btSliderConstraint const*>(m_constraint.get());
|
||||
p[0] = hc->getFrameOffsetB().getOrigin().x();
|
||||
p[1] = hc->getFrameOffsetB().getOrigin().y();
|
||||
p[2] = hc->getFrameOffsetB().getOrigin().z();
|
||||
*/ p = world;
|
||||
}
|
||||
|
||||
virtual void update_constraint()
|
||||
{
|
||||
/* btRigidBody& bt_bodyA = *static_cast<bt_rigid_body_t*>(rbA)->body();
|
||||
btRigidBody& bt_bodyB = *static_cast<bt_rigid_body_t*>(rbB)->body();
|
||||
btTransform framInA = btTransform::getIdentity();
|
||||
btTransform framInB = btTransform::getIdentity();
|
||||
btSliderConstraint* slider = static_cast<btSliderConstraint*>(m_constraint.get());
|
||||
slider->getFrameOffsetA();
|
||||
*/ }
|
||||
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
vec3f world;
|
||||
|
||||
bt_slider_constraint_t(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB):
|
||||
slider_constraint_impl_t()
|
||||
{
|
||||
btRigidBody& bt_bodyA = *static_cast<bt_rigid_body_t*>(rbA)->body();
|
||||
btRigidBody& bt_bodyB = *static_cast<bt_rigid_body_t*>(rbB)->body();
|
||||
btTransform framInA = btTransform::getIdentity();
|
||||
btTransform framInB = btTransform::getIdentity();
|
||||
btSliderConstraint * slider = new btSliderConstraint(bt_bodyA, bt_bodyB, framInA, framInB, true);
|
||||
m_constraint.reset(slider);
|
||||
rbA->add_constraint(this);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif //DYN_BT_SLIDER_CONSTRAINT_H
|
||||
133
Extras/MayaPlugin/constraint/dHingeConstraintCmd.cpp
Normal file
133
Extras/MayaPlugin/constraint/dHingeConstraintCmd.cpp
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dHingeConstraintCmd.cpp
|
||||
|
||||
#include <maya/MGlobal.h>
|
||||
#include <maya/MItDependencyNodes.h>
|
||||
#include <maya/MSyntax.h>
|
||||
|
||||
#include "hingeConstraintNode.h"
|
||||
#include "dHingeConstraintCmd.h"
|
||||
|
||||
|
||||
MString dHingeConstraintCmd::typeName("dHingeConstraint");
|
||||
|
||||
dHingeConstraintCmd::dHingeConstraintCmd()
|
||||
: m_argDatabase(0),
|
||||
m_dagModifier(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
dHingeConstraintCmd::~dHingeConstraintCmd()
|
||||
{
|
||||
if (m_argDatabase) {
|
||||
delete m_argDatabase;
|
||||
}
|
||||
|
||||
if (m_dagModifier) {
|
||||
delete m_dagModifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
dHingeConstraintCmd::creator()
|
||||
{
|
||||
return new dHingeConstraintCmd;
|
||||
}
|
||||
|
||||
|
||||
MSyntax
|
||||
dHingeConstraintCmd::syntax()
|
||||
{
|
||||
MSyntax syntax;
|
||||
syntax.enableQuery(false);
|
||||
syntax.enableEdit(false);
|
||||
|
||||
syntax.addFlag("-n", "-name", MSyntax::kString);
|
||||
// syntax.addFlag("-fn", "-filename", MSyntax::kString);
|
||||
// syntax.addFlag("-col", "-color", MSyntax::kString);
|
||||
// syntax.addFlag("-dia", "-diameter", MSyntax::kDouble);
|
||||
|
||||
return syntax;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dHingeConstraintCmd::doIt(const MArgList &args)
|
||||
{
|
||||
MStatus stat;
|
||||
m_argDatabase = new MArgDatabase(syntax(), args, &stat);
|
||||
if (stat == MS::kFailure) {
|
||||
return stat;
|
||||
}
|
||||
return redoIt();
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dHingeConstraintCmd::undoIt()
|
||||
{
|
||||
MGlobal::setActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
if (m_dagModifier) {
|
||||
m_dagModifier->undoIt();
|
||||
delete m_dagModifier;
|
||||
m_dagModifier = 0;
|
||||
}
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dHingeConstraintCmd::redoIt()
|
||||
{
|
||||
MGlobal::getActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
MString name;
|
||||
if (m_argDatabase->isFlagSet("-name")) {
|
||||
m_argDatabase->getFlagArgument("-name", 0, name);
|
||||
}
|
||||
if (!name.length()) {
|
||||
name = "dHingeConstraint";
|
||||
}
|
||||
|
||||
m_dagModifier = new MDagModifier;
|
||||
|
||||
MObject parentObj = m_dagModifier->createNode("transform");
|
||||
m_dagModifier->renameNode(parentObj, name + "#");
|
||||
m_dagModifier->doIt();
|
||||
|
||||
MObject dConstraintObj = m_dagModifier->createNode(hingeConstraintNode::typeId, parentObj);
|
||||
std::string dConstraintName = MFnDependencyNode(parentObj).name().asChar();
|
||||
std::string::size_type pos = dConstraintName.find_last_not_of("0123456789");
|
||||
dConstraintName.insert(pos + 1, "Shape");
|
||||
m_dagModifier->renameNode(dConstraintObj, dConstraintName.c_str());
|
||||
m_dagModifier->doIt();
|
||||
|
||||
setResult(MFnDependencyNode(dConstraintObj).name());
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
58
Extras/MayaPlugin/constraint/dHingeConstraintCmd.h
Normal file
58
Extras/MayaPlugin/constraint/dHingeConstraintCmd.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dHingeConstraintCmd.h
|
||||
|
||||
#ifndef DYN_HINGE_CONSTRAINT_CMD_H
|
||||
#define DYN_HINGE_CONSTRAINT_CMD_H
|
||||
|
||||
#include <maya/MArgDatabase.h>
|
||||
#include <maya/MDagModifier.h>
|
||||
#include <maya/MSelectionList.h>
|
||||
|
||||
#include <maya/MPxCommand.h>
|
||||
|
||||
class dHingeConstraintCmd : public MPxCommand
|
||||
{
|
||||
public:
|
||||
dHingeConstraintCmd();
|
||||
virtual ~dHingeConstraintCmd();
|
||||
|
||||
static void *creator();
|
||||
static MSyntax syntax();
|
||||
|
||||
MStatus doIt(const MArgList &i_mArgList);
|
||||
MStatus redoIt();
|
||||
MStatus undoIt();
|
||||
bool isUndoable() const { return true; }
|
||||
bool hasSyntax() const { return true; }
|
||||
|
||||
static MString typeName;
|
||||
|
||||
protected:
|
||||
MArgDatabase *m_argDatabase;
|
||||
MDagModifier *m_dagModifier;
|
||||
|
||||
MSelectionList m_undoSelectionList;
|
||||
};
|
||||
|
||||
#endif //DYN_HINGE_CONSTRAINT_CMD_H
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Walt Disney Studios
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
133
Extras/MayaPlugin/constraint/dSliderConstraintCmd.cpp
Normal file
133
Extras/MayaPlugin/constraint/dSliderConstraintCmd.cpp
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dSliderConstraintCmd.cpp
|
||||
|
||||
#include <maya/MGlobal.h>
|
||||
#include <maya/MItDependencyNodes.h>
|
||||
#include <maya/MSyntax.h>
|
||||
|
||||
#include "sliderConstraintNode.h"
|
||||
#include "dSliderConstraintCmd.h"
|
||||
|
||||
|
||||
MString dSliderConstraintCmd::typeName("dSliderConstraint");
|
||||
|
||||
dSliderConstraintCmd::dSliderConstraintCmd()
|
||||
: m_argDatabase(0),
|
||||
m_dagModifier(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
dSliderConstraintCmd::~dSliderConstraintCmd()
|
||||
{
|
||||
if (m_argDatabase) {
|
||||
delete m_argDatabase;
|
||||
}
|
||||
|
||||
if (m_dagModifier) {
|
||||
delete m_dagModifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
dSliderConstraintCmd::creator()
|
||||
{
|
||||
return new dSliderConstraintCmd;
|
||||
}
|
||||
|
||||
|
||||
MSyntax
|
||||
dSliderConstraintCmd::syntax()
|
||||
{
|
||||
MSyntax syntax;
|
||||
syntax.enableQuery(false);
|
||||
syntax.enableEdit(false);
|
||||
|
||||
syntax.addFlag("-n", "-name", MSyntax::kString);
|
||||
// syntax.addFlag("-fn", "-filename", MSyntax::kString);
|
||||
// syntax.addFlag("-col", "-color", MSyntax::kString);
|
||||
// syntax.addFlag("-dia", "-diameter", MSyntax::kDouble);
|
||||
|
||||
return syntax;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSliderConstraintCmd::doIt(const MArgList &args)
|
||||
{
|
||||
MStatus stat;
|
||||
m_argDatabase = new MArgDatabase(syntax(), args, &stat);
|
||||
if (stat == MS::kFailure) {
|
||||
return stat;
|
||||
}
|
||||
return redoIt();
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSliderConstraintCmd::undoIt()
|
||||
{
|
||||
MGlobal::setActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
if (m_dagModifier) {
|
||||
m_dagModifier->undoIt();
|
||||
delete m_dagModifier;
|
||||
m_dagModifier = 0;
|
||||
}
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSliderConstraintCmd::redoIt()
|
||||
{
|
||||
MGlobal::getActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
MString name;
|
||||
if (m_argDatabase->isFlagSet("-name")) {
|
||||
m_argDatabase->getFlagArgument("-name", 0, name);
|
||||
}
|
||||
if (!name.length()) {
|
||||
name = "dSliderConstraint";
|
||||
}
|
||||
|
||||
m_dagModifier = new MDagModifier;
|
||||
|
||||
MObject parentObj = m_dagModifier->createNode("transform");
|
||||
m_dagModifier->renameNode(parentObj, name + "#");
|
||||
m_dagModifier->doIt();
|
||||
|
||||
MObject dConstraintObj = m_dagModifier->createNode(sliderConstraintNode::typeId, parentObj);
|
||||
std::string dConstraintName = MFnDependencyNode(parentObj).name().asChar();
|
||||
std::string::size_type pos = dConstraintName.find_last_not_of("0123456789");
|
||||
dConstraintName.insert(pos + 1, "Shape");
|
||||
m_dagModifier->renameNode(dConstraintObj, dConstraintName.c_str());
|
||||
m_dagModifier->doIt();
|
||||
|
||||
setResult(MFnDependencyNode(dConstraintObj).name());
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
58
Extras/MayaPlugin/constraint/dSliderConstraintCmd.h
Normal file
58
Extras/MayaPlugin/constraint/dSliderConstraintCmd.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dSliderConstraintCmd.h
|
||||
|
||||
#ifndef DYN_SLIDER_CONSTRAINT_CMD_H
|
||||
#define DYN_SLIDER_CONSTRAINT_CMD_H
|
||||
|
||||
#include <maya/MArgDatabase.h>
|
||||
#include <maya/MDagModifier.h>
|
||||
#include <maya/MSelectionList.h>
|
||||
|
||||
#include <maya/MPxCommand.h>
|
||||
|
||||
class dSliderConstraintCmd : public MPxCommand
|
||||
{
|
||||
public:
|
||||
dSliderConstraintCmd();
|
||||
virtual ~dSliderConstraintCmd();
|
||||
|
||||
static void *creator();
|
||||
static MSyntax syntax();
|
||||
|
||||
MStatus doIt(const MArgList &i_mArgList);
|
||||
MStatus redoIt();
|
||||
MStatus undoIt();
|
||||
bool isUndoable() const { return true; }
|
||||
bool hasSyntax() const { return true; }
|
||||
|
||||
static MString typeName;
|
||||
|
||||
protected:
|
||||
MArgDatabase *m_argDatabase;
|
||||
MDagModifier *m_dagModifier;
|
||||
|
||||
MSelectionList m_undoSelectionList;
|
||||
};
|
||||
|
||||
#endif //DYN_SLIDER_CONSTRAINT_CMD_H
|
||||
133
Extras/MayaPlugin/constraint/dsixdofConstraintCmd.cpp
Normal file
133
Extras/MayaPlugin/constraint/dsixdofConstraintCmd.cpp
Normal file
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dSixdofConstraintCmd.cpp
|
||||
|
||||
#include <maya/MGlobal.h>
|
||||
#include <maya/MItDependencyNodes.h>
|
||||
#include <maya/MSyntax.h>
|
||||
|
||||
#include "sixdofConstraintNode.h"
|
||||
#include "dSixdofConstraintCmd.h"
|
||||
|
||||
|
||||
MString dSixdofConstraintCmd::typeName("dSixdofConstraint");
|
||||
|
||||
dSixdofConstraintCmd::dSixdofConstraintCmd()
|
||||
: m_argDatabase(0),
|
||||
m_dagModifier(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
dSixdofConstraintCmd::~dSixdofConstraintCmd()
|
||||
{
|
||||
if (m_argDatabase) {
|
||||
delete m_argDatabase;
|
||||
}
|
||||
|
||||
if (m_dagModifier) {
|
||||
delete m_dagModifier;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
dSixdofConstraintCmd::creator()
|
||||
{
|
||||
return new dSixdofConstraintCmd;
|
||||
}
|
||||
|
||||
|
||||
MSyntax
|
||||
dSixdofConstraintCmd::syntax()
|
||||
{
|
||||
MSyntax syntax;
|
||||
syntax.enableQuery(false);
|
||||
syntax.enableEdit(false);
|
||||
|
||||
syntax.addFlag("-n", "-name", MSyntax::kString);
|
||||
// syntax.addFlag("-fn", "-filename", MSyntax::kString);
|
||||
// syntax.addFlag("-col", "-color", MSyntax::kString);
|
||||
// syntax.addFlag("-dia", "-diameter", MSyntax::kDouble);
|
||||
|
||||
return syntax;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSixdofConstraintCmd::doIt(const MArgList &args)
|
||||
{
|
||||
MStatus stat;
|
||||
m_argDatabase = new MArgDatabase(syntax(), args, &stat);
|
||||
if (stat == MS::kFailure) {
|
||||
return stat;
|
||||
}
|
||||
return redoIt();
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSixdofConstraintCmd::undoIt()
|
||||
{
|
||||
MGlobal::setActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
if (m_dagModifier) {
|
||||
m_dagModifier->undoIt();
|
||||
delete m_dagModifier;
|
||||
m_dagModifier = 0;
|
||||
}
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
|
||||
MStatus
|
||||
dSixdofConstraintCmd::redoIt()
|
||||
{
|
||||
MGlobal::getActiveSelectionList(m_undoSelectionList);
|
||||
|
||||
MString name;
|
||||
if (m_argDatabase->isFlagSet("-name")) {
|
||||
m_argDatabase->getFlagArgument("-name", 0, name);
|
||||
}
|
||||
if (!name.length()) {
|
||||
name = "dSixdofConstraint";
|
||||
}
|
||||
|
||||
m_dagModifier = new MDagModifier;
|
||||
|
||||
MObject parentObj = m_dagModifier->createNode("transform");
|
||||
m_dagModifier->renameNode(parentObj, name + "#");
|
||||
m_dagModifier->doIt();
|
||||
|
||||
MObject dConstraintObj = m_dagModifier->createNode(sixdofConstraintNode::typeId, parentObj);
|
||||
std::string dConstraintName = MFnDependencyNode(parentObj).name().asChar();
|
||||
std::string::size_type pos = dConstraintName.find_last_not_of("0123456789");
|
||||
dConstraintName.insert(pos + 1, "Shape");
|
||||
m_dagModifier->renameNode(dConstraintObj, dConstraintName.c_str());
|
||||
m_dagModifier->doIt();
|
||||
|
||||
setResult(MFnDependencyNode(dConstraintObj).name());
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
58
Extras/MayaPlugin/constraint/dsixdofConstraintCmd.h
Normal file
58
Extras/MayaPlugin/constraint/dsixdofConstraintCmd.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//dSixdofConstraintCmd.h
|
||||
|
||||
#ifndef DYN_SIXDOF_CONSTRAINT_CMD_H
|
||||
#define DYN_SIXDOF_CONSTRAINT_CMD_H
|
||||
|
||||
#include <maya/MArgDatabase.h>
|
||||
#include <maya/MDagModifier.h>
|
||||
#include <maya/MSelectionList.h>
|
||||
|
||||
#include <maya/MPxCommand.h>
|
||||
|
||||
class dSixdofConstraintCmd : public MPxCommand
|
||||
{
|
||||
public:
|
||||
dSixdofConstraintCmd();
|
||||
virtual ~dSixdofConstraintCmd();
|
||||
|
||||
static void *creator();
|
||||
static MSyntax syntax();
|
||||
|
||||
MStatus doIt(const MArgList &i_mArgList);
|
||||
MStatus redoIt();
|
||||
MStatus undoIt();
|
||||
bool isUndoable() const { return true; }
|
||||
bool hasSyntax() const { return true; }
|
||||
|
||||
static MString typeName;
|
||||
|
||||
protected:
|
||||
MArgDatabase *m_argDatabase;
|
||||
MDagModifier *m_dagModifier;
|
||||
|
||||
MSelectionList m_undoSelectionList;
|
||||
};
|
||||
|
||||
#endif //DYN_SIXDOF_CONSTRAINT_CMD_H
|
||||
443
Extras/MayaPlugin/constraint/hingeConstraintNode.cpp
Normal file
443
Extras/MayaPlugin/constraint/hingeConstraintNode.cpp
Normal file
@@ -0,0 +1,443 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//hingeConstraintNode.cpp
|
||||
|
||||
#include <maya/MFnDependencyNode.h>
|
||||
#include <maya/MPlugArray.h>
|
||||
#include <maya/MFnMessageAttribute.h>
|
||||
#include <maya/MFnNumericAttribute.h>
|
||||
#include <maya/MFnMatrixAttribute.h>
|
||||
#include <maya/MMatrix.h>
|
||||
#include <maya/MFnMatrixData.h>
|
||||
#include <maya/MFnTransform.h>
|
||||
#include <maya/MQuaternion.h>
|
||||
#include <maya/MEulerRotation.h>
|
||||
#include <maya/MVector.h>
|
||||
|
||||
#include "rigidBodyNode.h"
|
||||
#include "hingeConstraintNode.h"
|
||||
#include "mayaUtils.h"
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
MTypeId hingeConstraintNode::typeId(0x10033B);
|
||||
MString hingeConstraintNode::typeName("dHingeConstraint");
|
||||
|
||||
MObject hingeConstraintNode::ia_rigidBody;
|
||||
MObject hingeConstraintNode::ia_damping;
|
||||
MObject hingeConstraintNode::ia_lowerLimit;
|
||||
MObject hingeConstraintNode::ia_upperLimit;
|
||||
MObject hingeConstraintNode::ia_limitSoftness;
|
||||
MObject hingeConstraintNode::ia_biasFactor;
|
||||
MObject hingeConstraintNode::ia_relaxationFactor;
|
||||
MObject hingeConstraintNode::ia_hingeAxis;
|
||||
|
||||
MObject hingeConstraintNode::ia_enableAngularMotor;
|
||||
MObject hingeConstraintNode::ia_motorTargetVelocity;
|
||||
MObject hingeConstraintNode::ia_maxMotorImpulse;
|
||||
|
||||
MObject hingeConstraintNode::ca_constraint;
|
||||
MObject hingeConstraintNode::ca_constraintParam;
|
||||
|
||||
MStatus hingeConstraintNode::initialize()
|
||||
{
|
||||
MStatus status;
|
||||
MFnMessageAttribute fnMsgAttr;
|
||||
MFnNumericAttribute fnNumericAttr;
|
||||
MFnMatrixAttribute fnMatrixAttr;
|
||||
|
||||
ia_rigidBody = fnMsgAttr.create("inRigidBody", "inrb", &status);
|
||||
MCHECKSTATUS(status, "creating inRigidBody attribute")
|
||||
status = addAttribute(ia_rigidBody);
|
||||
MCHECKSTATUS(status, "adding inRigidBody attribute")
|
||||
|
||||
ia_damping = fnNumericAttr.create("damping", "dmp", MFnNumericData::kDouble, 1.0, &status);
|
||||
MCHECKSTATUS(status, "creating damping attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_damping);
|
||||
MCHECKSTATUS(status, "adding damping attribute")
|
||||
|
||||
ia_lowerLimit = fnNumericAttr.create("lowerLimit", "llmt", MFnNumericData::kDouble, -1.57, &status);
|
||||
MCHECKSTATUS(status, "creating lower limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_lowerLimit);
|
||||
MCHECKSTATUS(status, "adding lower limit attribute")
|
||||
|
||||
ia_upperLimit = fnNumericAttr.create("upperLimit", "ulmt", MFnNumericData::kDouble, 1.57, &status);
|
||||
MCHECKSTATUS(status, "creating upper limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_upperLimit);
|
||||
MCHECKSTATUS(status, "adding upper limit attribute")
|
||||
|
||||
ia_limitSoftness = fnNumericAttr.create("limitSoftness", "lmSo", MFnNumericData::kDouble, 0.9, &status);
|
||||
MCHECKSTATUS(status, "creating limitSoftness attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_limitSoftness);
|
||||
MCHECKSTATUS(status, "adding limitSoftness attribute")
|
||||
|
||||
ia_biasFactor = fnNumericAttr.create("biasFactor", "biFa", MFnNumericData::kDouble, 0.3, &status);
|
||||
MCHECKSTATUS(status, "creating biasFactor attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_biasFactor);
|
||||
MCHECKSTATUS(status, "adding biasFactor attribute")
|
||||
|
||||
ia_relaxationFactor = fnNumericAttr.create("relaxationFactor", "reFa", MFnNumericData::kDouble, 1.0, &status);
|
||||
MCHECKSTATUS(status, "creating relaxationFactor attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_relaxationFactor);
|
||||
MCHECKSTATUS(status, "adding relaxationFactor attribute")
|
||||
|
||||
ia_hingeAxis = fnNumericAttr.createPoint("hingeAxis", "hgAx", &status);
|
||||
MCHECKSTATUS(status, "creating hingeAxis attribute")
|
||||
status = addAttribute(ia_hingeAxis);
|
||||
MCHECKSTATUS(status, "adding hingeAxis attribute")
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
ia_enableAngularMotor = fnNumericAttr.create("enableAngularMotor", "enAM", MFnNumericData::kBoolean, false, &status);
|
||||
MCHECKSTATUS(status, "creating enableAngularMotor attribute")
|
||||
status = addAttribute(ia_enableAngularMotor);
|
||||
MCHECKSTATUS(status, "adding enableAngularMotor attribute")
|
||||
|
||||
ia_motorTargetVelocity = fnNumericAttr.create("motorTargetVelocity", "mTV", MFnNumericData::kDouble, 1, &status);
|
||||
MCHECKSTATUS(status, "creating motorTargetVelocity attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_motorTargetVelocity);
|
||||
MCHECKSTATUS(status, "adding motorTargetVelocity attribute")
|
||||
|
||||
ia_maxMotorImpulse = fnNumericAttr.create("maxMotorImpulse", "mMI", MFnNumericData::kDouble, 1, &status);
|
||||
MCHECKSTATUS(status, "creating maxMotorImpulse attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_maxMotorImpulse);
|
||||
MCHECKSTATUS(status, "adding maxMotorImpulse attribute")
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
ca_constraint = fnNumericAttr.create("ca_constraint", "caco", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraint attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraint);
|
||||
MCHECKSTATUS(status, "adding ca_constraint attribute")
|
||||
|
||||
ca_constraintParam = fnNumericAttr.create("ca_constraintParam", "cacop", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraintParam attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding ca_constraintParam attribute")
|
||||
|
||||
|
||||
status = attributeAffects(ia_rigidBody, ca_constraint);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBody, ca_constraint)")
|
||||
|
||||
status = attributeAffects(ia_rigidBody, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBody, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_damping, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_damping, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_lowerLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_lowerLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_upperLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_upperLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_limitSoftness, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_limitSoftness, ca_constraintParam)")
|
||||
status = attributeAffects(ia_biasFactor, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_biasFactor, ca_constraintParam)")
|
||||
status = attributeAffects(ia_relaxationFactor, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_relaxationFactor, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_hingeAxis, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_hingeAxis, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_enableAngularMotor, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_enableAngularMotor, ca_constraintParam)")
|
||||
status = attributeAffects(ia_motorTargetVelocity, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_motorTargetVelocity, ca_constraintParam)")
|
||||
status = attributeAffects(ia_maxMotorImpulse, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_maxMotorImpulse, ca_constraintParam)")
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
hingeConstraintNode::hingeConstraintNode()
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::hingeConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
hingeConstraintNode::~hingeConstraintNode()
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::~hingeConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
void hingeConstraintNode::nodeRemoved(MObject& node, void *clientData)
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::nodeRemoved" << std::endl;
|
||||
MFnDependencyNode fnNode(node);
|
||||
hingeConstraintNode *pNode = static_cast<hingeConstraintNode*>(fnNode.userNode());
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(pNode->m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
}
|
||||
|
||||
void* hingeConstraintNode::creator()
|
||||
{
|
||||
return new hingeConstraintNode();
|
||||
}
|
||||
|
||||
|
||||
bool hingeConstraintNode::setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx)
|
||||
{
|
||||
/* if ((plug == pdbFiles) || (plug == ia_scale) || (plug == ia_percent)) {
|
||||
m_framesDirty = true;
|
||||
} else if(plug == textureFiles) {
|
||||
gpufx::m_renderer.setColorTextureDirty();
|
||||
}*/
|
||||
return false; //setInternalValueInContext(plug,dataHandle,ctx);
|
||||
}
|
||||
|
||||
MStatus hingeConstraintNode::compute(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
//std::cout << "hingeConstraintNode::compute: " << plug.name() << std::endl;
|
||||
//MTime time = data.inputValue( hingeConstraintNode::inTime ).asTime();
|
||||
if(plug == ca_constraint) {
|
||||
computeConstraint(plug, data);
|
||||
} else if(plug == ca_constraintParam) {
|
||||
computeConstraintParam(plug, data);
|
||||
} else if(plug.isElement()) {
|
||||
if(plug.array() == worldMatrix && plug.logicalIndex() == 0) {
|
||||
computeWorldMatrix(plug, data);
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
return MStatus::kSuccess;
|
||||
}
|
||||
|
||||
void hingeConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status )
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::draw" << std::endl;
|
||||
|
||||
update();
|
||||
|
||||
view.beginGL();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
if( !(status == M3dView::kActive ||
|
||||
status == M3dView::kLead ||
|
||||
status == M3dView::kHilite ||
|
||||
( style != M3dView::kGouraudShaded && style != M3dView::kFlatShaded )) ) {
|
||||
glColor3f(1.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
vec3f pos;
|
||||
if (m_constraint) {
|
||||
vec3f world;
|
||||
m_constraint->get_world(world);
|
||||
vec3f posA;
|
||||
quatf rotA;
|
||||
m_constraint->rigid_body()->get_transform(posA, rotA);
|
||||
pos = posA - world;
|
||||
}
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(0.0, 0.0, 0.0);
|
||||
glVertex3f(pos[0], pos[1], pos[2]);
|
||||
|
||||
glVertex3f(-1.0, 0.0, 0.0);
|
||||
glVertex3f(1.0, 0.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, -1.0, 0.0);
|
||||
glVertex3f(0.0, 1.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, 0.0, -1.0);
|
||||
glVertex3f(0.0, 0.0, 1.0);
|
||||
glEnd();
|
||||
|
||||
glPopAttrib();
|
||||
view.endGL();
|
||||
}
|
||||
|
||||
bool hingeConstraintNode::isBounded() const
|
||||
{
|
||||
//return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
MBoundingBox hingeConstraintNode::boundingBox() const
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::boundingBox()" << std::endl;
|
||||
//load the pdbs
|
||||
MObject node = thisMObject();
|
||||
|
||||
MPoint corner1(-1, -1, -1);
|
||||
MPoint corner2(1, 1, 1);
|
||||
return MBoundingBox(corner1, corner2);
|
||||
}
|
||||
|
||||
//standard attributes
|
||||
void hingeConstraintNode::computeConstraint(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::computeConstraint" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MPlug plgRigidBody(thisObject, ia_rigidBody);
|
||||
MObject update;
|
||||
//force evaluation of the rigidBody
|
||||
plgRigidBody.getValue(update);
|
||||
|
||||
rigid_body_t::pointer rigid_body;
|
||||
if(plgRigidBody.isConnected()) {
|
||||
MPlugArray connections;
|
||||
plgRigidBody.connectedTo(connections, true, true);
|
||||
if(connections.length() != 0) {
|
||||
MFnDependencyNode fnNode(connections[0].node());
|
||||
if(fnNode.typeId() == rigidBodyNode::typeId) {
|
||||
rigidBodyNode *pRigidBodyNode = static_cast<rigidBodyNode*>(fnNode.userNode());
|
||||
rigid_body = pRigidBodyNode->rigid_body();
|
||||
} else {
|
||||
std::cout << "hingeConstraintNode connected to a non-rigidbody node!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rigid_body) {
|
||||
//not connected to a rigid body, put a default one
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
m_constraint = solver_t::create_hinge_constraint(rigid_body);
|
||||
constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::add_constraint(constraint);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraint).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
|
||||
void hingeConstraintNode::computeWorldMatrix(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::computeWorldMatrix" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MFnDagNode fnDagNode(thisObject);
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
|
||||
MStatus status;
|
||||
|
||||
MFnTransform fnParentTransform(fnDagNode.parent(0, &status));
|
||||
|
||||
MVector mtranslation = fnParentTransform.getTranslation(MSpace::kTransform, &status);
|
||||
|
||||
// MQuaternion mrotation;
|
||||
// fnParentTransform.getRotation(mrotation, MSpace::kTransform);
|
||||
|
||||
if(m_constraint) {
|
||||
vec3f world_pivot;
|
||||
m_constraint->get_world(world_pivot);
|
||||
if(world_pivot[0] != float(mtranslation.x) ||
|
||||
world_pivot[1] != float(mtranslation.y) ||
|
||||
world_pivot[2] != float(mtranslation.z)) {
|
||||
|
||||
// mat4x4f xform;
|
||||
// m_constraint->rigid_body()->get_transform(xform);
|
||||
// vec4f pivot = prod(trans(xform), vec4f(mtranslation.x, mtranslation.y, mtranslation.z, 1.0));
|
||||
// m_constraint->set_pivot(vec3f(pivot[0], pivot[1], pivot[2]));
|
||||
m_constraint->set_world(vec3f((float) mtranslation[0], (float) mtranslation[1], (float) mtranslation[2]));
|
||||
}
|
||||
}
|
||||
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
void hingeConstraintNode::computeConstraintParam(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
//std::cout << "hingeConstraintNode::computeRigidBodyParam data.className=" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
if(m_constraint) {
|
||||
float damping = (float) data.inputValue(ia_damping).asDouble();
|
||||
m_constraint->set_damping(damping);
|
||||
float lower = (float) data.inputValue(ia_lowerLimit).asDouble();
|
||||
float upper = (float) data.inputValue(ia_upperLimit).asDouble();
|
||||
float limit_softness = (float) data.inputValue(ia_limitSoftness).asDouble();
|
||||
float bias_factor = (float) data.inputValue(ia_biasFactor).asDouble();
|
||||
float relaxation_factor = (float) data.inputValue(ia_relaxationFactor).asDouble();
|
||||
|
||||
m_constraint->set_limit(lower, upper, limit_softness, bias_factor, relaxation_factor);
|
||||
|
||||
float* axis = data.inputValue(ia_hingeAxis).asFloat3();
|
||||
m_constraint->set_axis(vec3f(axis[0], axis[1], axis[2]));
|
||||
|
||||
bool enable_motor = data.inputValue(ia_enableAngularMotor).asBool();
|
||||
float motorTargetVelocity = (float) data.inputValue(ia_motorTargetVelocity).asDouble();
|
||||
float maxMotorImpulse = (float) data.inputValue(ia_maxMotorImpulse).asDouble();
|
||||
m_constraint->enable_motor(enable_motor, motorTargetVelocity, maxMotorImpulse);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraintParam).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
hinge_constraint_t::pointer hingeConstraintNode::constraint()
|
||||
{
|
||||
// std::cout << "hingeConstraintNode::rigid_body" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
return m_constraint;
|
||||
}
|
||||
|
||||
void hingeConstraintNode::update()
|
||||
{
|
||||
MObject thisObject(thisMObject());
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
MPlug(thisObject, worldMatrix).elementByLogicalIndex(0).getValue(update);
|
||||
}
|
||||
106
Extras/MayaPlugin/constraint/hingeConstraintNode.h
Normal file
106
Extras/MayaPlugin/constraint/hingeConstraintNode.h
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//hingeConstraintNode.h
|
||||
|
||||
#ifndef DYN_HINGE_CONSTRAINT_NODE_H
|
||||
#define DYN_HINGE_CONSTRAINT_NODE_H
|
||||
|
||||
#include <maya/MString.h>
|
||||
#include <maya/MTypeId.h>
|
||||
#include <maya/MPxLocatorNode.h>
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
class hingeConstraintNode: public MPxLocatorNode
|
||||
{
|
||||
public:
|
||||
hingeConstraintNode();
|
||||
virtual ~hingeConstraintNode();
|
||||
|
||||
virtual bool setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx);
|
||||
|
||||
// virtual MStatus setDependentsDirty ( const MPlug & plug, MPlugArray & plugArray);
|
||||
|
||||
virtual MStatus compute( const MPlug& plug, MDataBlock& data );
|
||||
|
||||
virtual void draw( M3dView & view, const MDagPath & path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status );
|
||||
|
||||
|
||||
virtual bool isBounded() const ;
|
||||
virtual MBoundingBox boundingBox() const;
|
||||
|
||||
virtual bool excludeAsLocator() const { return false; }
|
||||
virtual bool isTransparent() const { return false; }
|
||||
|
||||
static void * creator();
|
||||
static MStatus initialize();
|
||||
|
||||
public:
|
||||
|
||||
hinge_constraint_t::pointer constraint();
|
||||
|
||||
public:
|
||||
|
||||
//Attributes
|
||||
static MObject ia_rigidBody;
|
||||
static MObject ia_damping;
|
||||
|
||||
static MObject ia_lowerLimit;
|
||||
static MObject ia_upperLimit;
|
||||
static MObject ia_limitSoftness;
|
||||
static MObject ia_biasFactor;
|
||||
static MObject ia_relaxationFactor;
|
||||
|
||||
static MObject ia_hingeAxis;
|
||||
|
||||
static MObject ca_constraint;
|
||||
static MObject ca_constraintParam;
|
||||
|
||||
static MObject ia_enableAngularMotor;
|
||||
static MObject ia_motorTargetVelocity;
|
||||
static MObject ia_maxMotorImpulse;
|
||||
|
||||
public:
|
||||
static MTypeId typeId;
|
||||
static MString typeName;
|
||||
|
||||
private:
|
||||
void update();
|
||||
void computeConstraint(const MPlug& plug, MDataBlock& data);
|
||||
void computeConstraintParam(const MPlug& plug, MDataBlock& data);
|
||||
void computeWorldMatrix(const MPlug& plug, MDataBlock& data);
|
||||
|
||||
public:
|
||||
static void nodeRemoved(MObject& node, void *clientData);
|
||||
|
||||
private:
|
||||
hinge_constraint_t::pointer m_constraint;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //DYN_HINGE_CONSTRAINT_NODE_H
|
||||
52
Extras/MayaPlugin/constraint/hinge_constraint_impl.h
Normal file
52
Extras/MayaPlugin/constraint/hinge_constraint_impl.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//hinge_constraint_impl.h
|
||||
|
||||
#ifndef DYN_HINGE_CONSTRAINT_IMPL_H
|
||||
#define DYN_HINGE_CONSTRAINT_IMPL_H
|
||||
|
||||
#include "constraint_impl.h"
|
||||
|
||||
class hinge_constraint_impl_t: public constraint_impl_t
|
||||
{
|
||||
public:
|
||||
//
|
||||
virtual void set_pivot(vec3f const& p) = 0;
|
||||
virtual void get_pivot(vec3f& p) const = 0;
|
||||
virtual void get_world_pivot(vec3f& p) const = 0;
|
||||
virtual void set_world(vec3f const& p) = 0;
|
||||
virtual void get_world(vec3f& p) const = 0;
|
||||
|
||||
//
|
||||
virtual void set_damping(float d) = 0;
|
||||
virtual float damping() const = 0;
|
||||
virtual void set_limit(float lower, float upper, float softness, float bias_factor, float relaxation_factor) = 0;
|
||||
virtual void set_axis(vec3f const& p) = 0;
|
||||
|
||||
virtual void enable_motor(bool enable, float velocity, float impulse) = 0;
|
||||
|
||||
public:
|
||||
virtual ~hinge_constraint_impl_t() {};
|
||||
};
|
||||
|
||||
#endif //DYN_HINGE_CONSTRAINT_IMPL_H
|
||||
@@ -174,8 +174,20 @@ void nailConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
( style != M3dView::kGouraudShaded && style != M3dView::kFlatShaded )) ) {
|
||||
glColor3f(1.0, 1.0, 0.0);
|
||||
}
|
||||
vec3f pos;
|
||||
if (m_constraint) {
|
||||
vec3f world;
|
||||
m_constraint->get_world(world);
|
||||
vec3f posA;
|
||||
quatf rotA;
|
||||
m_constraint->rigid_body()->get_transform(posA, rotA);
|
||||
pos = posA - world;
|
||||
}
|
||||
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(0.0, 0.0, 0.0);
|
||||
glVertex3f(pos[0], pos[1], pos[2]);
|
||||
|
||||
glVertex3f(-1.0, 0.0, 0.0);
|
||||
glVertex3f(1.0, 0.0, 0.0);
|
||||
|
||||
@@ -269,16 +281,19 @@ void nailConstraintNode::computeWorldMatrix(const MPlug& plug, MDataBlock& data)
|
||||
// fnParentTransform.getRotation(mrotation, MSpace::kTransform);
|
||||
|
||||
if(m_constraint) {
|
||||
vec3f world_pivot;
|
||||
m_constraint->get_world_pivot(world_pivot);
|
||||
if(world_pivot[0] != float(mtranslation.x) ||
|
||||
world_pivot[1] != float(mtranslation.y) ||
|
||||
world_pivot[2] != float(mtranslation.z)) {
|
||||
vec3f world;
|
||||
m_constraint->get_world(world);
|
||||
if(world[0] != float(mtranslation.x) ||
|
||||
world[1] != float(mtranslation.y) ||
|
||||
world[2] != float(mtranslation.z)) {
|
||||
|
||||
mat4x4f xform;
|
||||
/* mat4x4f xform;
|
||||
m_constraint->rigid_body()->get_transform(xform);
|
||||
vec4f pivot = prod(trans(xform), vec4f(mtranslation.x, mtranslation.y, mtranslation.z, 1.0));
|
||||
m_constraint->set_pivot(vec3f(pivot[0], pivot[1], pivot[2]));
|
||||
std::cout << "pivot (" << pivot[0] << "," << pivot[0] << "," << pivot[0] << ")" << std::endl;
|
||||
*/
|
||||
// std::cout << "mtranslation (" << mtranslation[0] << "," << mtranslation[0] << "," << mtranslation[0] << ")" << std::endl;
|
||||
m_constraint->set_world(vec3f((float) mtranslation[0], (float) mtranslation[1], (float) mtranslation[2]));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,7 +309,7 @@ void nailConstraintNode::computeConstraintParam(const MPlug& plug, MDataBlock& d
|
||||
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
if(m_constraint) {
|
||||
m_constraint->set_damping(data.inputValue(ia_damping).asDouble());
|
||||
m_constraint->set_damping((float) data.inputValue(ia_damping).asDouble());
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraintParam).set(true);
|
||||
@@ -42,22 +42,27 @@ public:
|
||||
rigid_body_t::pointer rigid_body() { return m_rigid_body; }
|
||||
|
||||
//
|
||||
void set_pivot(vec3f const& p)
|
||||
{
|
||||
void set_pivotA(vec3f const& p) {
|
||||
nail_constraint_impl_t* nail_impl = dynamic_cast<nail_constraint_impl_t*>(impl());
|
||||
nail_impl->set_pivot(p);
|
||||
nail_impl->set_pivotA(p);
|
||||
}
|
||||
|
||||
//local space pivot
|
||||
void get_pivot(vec3f& p) const {
|
||||
void get_pivotA(vec3f& p) const {
|
||||
nail_constraint_impl_t const* nail_impl = dynamic_cast<nail_constraint_impl_t const*>(impl());
|
||||
nail_impl->get_pivot(p);
|
||||
nail_impl->get_pivotA(p);
|
||||
}
|
||||
|
||||
//
|
||||
void get_world_pivot(vec3f& p) const {
|
||||
void set_world(vec3f const& p) {
|
||||
nail_constraint_impl_t* nail_impl = dynamic_cast<nail_constraint_impl_t*>(impl());
|
||||
nail_impl->set_world(p);
|
||||
}
|
||||
|
||||
//
|
||||
void get_world(vec3f& p) const {
|
||||
nail_constraint_impl_t const* nail_impl = dynamic_cast<nail_constraint_impl_t const*>(impl());
|
||||
nail_impl->get_world_pivot(p);
|
||||
nail_impl->get_world(p);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -31,9 +31,10 @@ class nail_constraint_impl_t: public constraint_impl_t
|
||||
{
|
||||
public:
|
||||
//
|
||||
virtual void set_pivot(vec3f const& p) = 0;
|
||||
virtual void get_pivot(vec3f& p) const = 0;
|
||||
virtual void get_world_pivot(vec3f& p) const = 0;
|
||||
virtual void set_pivotA(vec3f const& p) = 0;
|
||||
virtual void get_pivotA(vec3f& p) const = 0;
|
||||
virtual void set_world(vec3f const& p) = 0;
|
||||
virtual void get_world(vec3f& p) const = 0;
|
||||
|
||||
//
|
||||
virtual void set_damping(float d) = 0;
|
||||
419
Extras/MayaPlugin/constraint/sixdofConstraintNode.cpp
Normal file
419
Extras/MayaPlugin/constraint/sixdofConstraintNode.cpp
Normal file
@@ -0,0 +1,419 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sixdofConstraintNode.cpp
|
||||
|
||||
#include <maya/MFnDependencyNode.h>
|
||||
#include <maya/MPlugArray.h>
|
||||
#include <maya/MFnMessageAttribute.h>
|
||||
#include <maya/MFnNumericAttribute.h>
|
||||
#include <maya/MFnMatrixAttribute.h>
|
||||
#include <maya/MMatrix.h>
|
||||
#include <maya/MFnMatrixData.h>
|
||||
#include <maya/MFnTransform.h>
|
||||
#include <maya/MQuaternion.h>
|
||||
#include <maya/MEulerRotation.h>
|
||||
#include <maya/MVector.h>
|
||||
|
||||
#include "rigidBodyNode.h"
|
||||
#include "sixdofConstraintNode.h"
|
||||
#include "mayaUtils.h"
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
MTypeId sixdofConstraintNode::typeId(0x10033D);
|
||||
MString sixdofConstraintNode::typeName("dSixdofConstraint");
|
||||
|
||||
MObject sixdofConstraintNode::ia_rigidBodyA;
|
||||
MObject sixdofConstraintNode::ia_rigidBodyB;
|
||||
MObject sixdofConstraintNode::ia_damping;
|
||||
MObject sixdofConstraintNode::ca_constraint;
|
||||
MObject sixdofConstraintNode::ca_constraintParam;
|
||||
MObject sixdofConstraintNode::ia_lowerLinLimit;
|
||||
MObject sixdofConstraintNode::ia_upperLinLimit;
|
||||
MObject sixdofConstraintNode::ia_lowerAngLimit;
|
||||
MObject sixdofConstraintNode::ia_upperAngLimit;
|
||||
|
||||
MStatus sixdofConstraintNode::initialize()
|
||||
{
|
||||
MStatus status;
|
||||
MFnMessageAttribute fnMsgAttr;
|
||||
MFnNumericAttribute fnNumericAttr;
|
||||
MFnMatrixAttribute fnMatrixAttr;
|
||||
|
||||
ia_rigidBodyA = fnMsgAttr.create("inRigidBodyA", "inrbA", &status);
|
||||
MCHECKSTATUS(status, "creating inRigidBodyA attribute")
|
||||
status = addAttribute(ia_rigidBodyA);
|
||||
MCHECKSTATUS(status, "adding inRigidBody attribute")
|
||||
|
||||
ia_rigidBodyB = fnMsgAttr.create("inRigidBodyB", "inrbB", &status);
|
||||
MCHECKSTATUS(status, "creating inRigidBodyB attribute")
|
||||
status = addAttribute(ia_rigidBodyB);
|
||||
MCHECKSTATUS(status, "adding inRigidBodyB attribute")
|
||||
|
||||
ia_damping = fnNumericAttr.create("damping", "dmp", MFnNumericData::kDouble, 1.0, &status);
|
||||
MCHECKSTATUS(status, "creating damping attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_damping);
|
||||
MCHECKSTATUS(status, "adding damping attribute")
|
||||
|
||||
ia_lowerLinLimit = fnNumericAttr.create("lowerLinLimit", "lllt", MFnNumericData::kDouble, 1, &status);
|
||||
MCHECKSTATUS(status, "creating lower linear limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_lowerLinLimit);
|
||||
MCHECKSTATUS(status, "adding lower linear limit attribute")
|
||||
|
||||
ia_upperLinLimit = fnNumericAttr.create("upperLinLimit", "ullt", MFnNumericData::kDouble, -1, &status);
|
||||
MCHECKSTATUS(status, "creating upper linear limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_upperLinLimit);
|
||||
MCHECKSTATUS(status, "adding upper linear limit attribute")
|
||||
|
||||
ia_lowerAngLimit = fnNumericAttr.create("lowerAngLimit", "lalt", MFnNumericData::kDouble, 0, &status);
|
||||
MCHECKSTATUS(status, "creating lower angular limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_lowerAngLimit);
|
||||
MCHECKSTATUS(status, "adding lower angular limit attribute")
|
||||
|
||||
ia_upperAngLimit = fnNumericAttr.create("upperAngLimit", "ualt", MFnNumericData::kDouble, 0, &status);
|
||||
MCHECKSTATUS(status, "creating upper angular limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_upperAngLimit);
|
||||
MCHECKSTATUS(status, "adding upper angular limit attribute")
|
||||
|
||||
ca_constraint = fnNumericAttr.create("ca_constraint", "caco", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraint attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraint);
|
||||
MCHECKSTATUS(status, "adding ca_constraint attribute")
|
||||
|
||||
ca_constraintParam = fnNumericAttr.create("ca_constraintParam", "cacop", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraintParam attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding ca_constraintParam attribute")
|
||||
|
||||
|
||||
status = attributeAffects(ia_rigidBodyA, ca_constraint);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyA, ca_constraint)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyA, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyA, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyB, ca_constraint);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyB, ca_constraint)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyB, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyB, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_damping, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_damping, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_lowerLinLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_lowerLinLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_upperLinLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_upperLinLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_lowerAngLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_lowerAngLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_upperAngLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_upperAngLimit, ca_constraintParam)")
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
sixdofConstraintNode::sixdofConstraintNode()
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::sixdofConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
sixdofConstraintNode::~sixdofConstraintNode()
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::~sixdofConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
void sixdofConstraintNode::nodeRemoved(MObject& node, void *clientData)
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::nodeRemoved" << std::endl;
|
||||
MFnDependencyNode fnNode(node);
|
||||
sixdofConstraintNode *pNode = static_cast<sixdofConstraintNode*>(fnNode.userNode());
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(pNode->m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
}
|
||||
|
||||
void* sixdofConstraintNode::creator()
|
||||
{
|
||||
return new sixdofConstraintNode();
|
||||
}
|
||||
|
||||
|
||||
bool sixdofConstraintNode::setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx)
|
||||
{
|
||||
/* if ((plug == pdbFiles) || (plug == ia_scale) || (plug == ia_percent)) {
|
||||
m_framesDirty = true;
|
||||
} else if(plug == textureFiles) {
|
||||
gpufx::m_renderer.setColorTextureDirty();
|
||||
}*/
|
||||
return false; //setInternalValueInContext(plug,dataHandle,ctx);
|
||||
}
|
||||
|
||||
MStatus sixdofConstraintNode::compute(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
//std::cout << "sixdofConstraintNode::compute: " << plug.name() << std::endl;
|
||||
//MTime time = data.inputValue( sixdofConstraintNode::inTime ).asTime();
|
||||
if(plug == ca_constraint) {
|
||||
computeConstraint(plug, data);
|
||||
} else if(plug == ca_constraintParam) {
|
||||
computeConstraintParam(plug, data);
|
||||
} else if(plug.isElement()) {
|
||||
if(plug.array() == worldMatrix && plug.logicalIndex() == 0) {
|
||||
computeWorldMatrix(plug, data);
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
return MStatus::kSuccess;
|
||||
}
|
||||
|
||||
void sixdofConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status )
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::draw" << std::endl;
|
||||
|
||||
update();
|
||||
|
||||
view.beginGL();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
|
||||
// glPushMatrix();
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
if( !(status == M3dView::kActive ||
|
||||
status == M3dView::kLead ||
|
||||
status == M3dView::kHilite ||
|
||||
( style != M3dView::kGouraudShaded && style != M3dView::kFlatShaded )) ) {
|
||||
glColor3f(1.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
vec3f posA;
|
||||
vec3f posB;
|
||||
if (m_constraint) {
|
||||
vec3f world;
|
||||
m_constraint->get_world(world);
|
||||
quatf rotA;
|
||||
m_constraint->rigid_bodyA()->get_transform(posA, rotA);
|
||||
posA = posA - world;
|
||||
quatf rotB;
|
||||
m_constraint->rigid_bodyB()->get_transform(posB, rotB);
|
||||
posB = posB - world;
|
||||
}
|
||||
|
||||
// glLoadIdentity();
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(posA[0], posA[1], posA[2]);
|
||||
glVertex3f(posB[0], posB[1], posB[2]);
|
||||
|
||||
glVertex3f(-1.0, 0.0, 0.0);
|
||||
glVertex3f(1.0, 0.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, -1.0, 0.0);
|
||||
glVertex3f(0.0, 1.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, 0.0, -1.0);
|
||||
glVertex3f(0.0, 0.0, 1.0);
|
||||
glEnd();
|
||||
|
||||
// glPopMatrix();
|
||||
|
||||
glPopAttrib();
|
||||
view.endGL();
|
||||
}
|
||||
|
||||
bool sixdofConstraintNode::isBounded() const
|
||||
{
|
||||
//return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
MBoundingBox sixdofConstraintNode::boundingBox() const
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::boundingBox()" << std::endl;
|
||||
//load the pdbs
|
||||
MObject node = thisMObject();
|
||||
|
||||
MPoint corner1(-1, -1, -1);
|
||||
MPoint corner2(1, 1, 1);
|
||||
return MBoundingBox(corner1, corner2);
|
||||
}
|
||||
|
||||
//standard attributes
|
||||
void sixdofConstraintNode::computeConstraint(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::computeConstraint" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MPlug plgRigidBodyA(thisObject, ia_rigidBodyA);
|
||||
MPlug plgRigidBodyB(thisObject, ia_rigidBodyB);
|
||||
MObject update;
|
||||
//force evaluation of the rigidBody
|
||||
plgRigidBodyA.getValue(update);
|
||||
plgRigidBodyB.getValue(update);
|
||||
|
||||
rigid_body_t::pointer rigid_bodyA;
|
||||
if(plgRigidBodyA.isConnected()) {
|
||||
MPlugArray connections;
|
||||
plgRigidBodyA.connectedTo(connections, true, true);
|
||||
if(connections.length() != 0) {
|
||||
MFnDependencyNode fnNodeA(connections[0].node());
|
||||
if(fnNodeA.typeId() == rigidBodyNode::typeId) {
|
||||
rigidBodyNode *pRigidBodyNodeA = static_cast<rigidBodyNode*>(fnNodeA.userNode());
|
||||
rigid_bodyA = pRigidBodyNodeA->rigid_body();
|
||||
} else {
|
||||
std::cout << "sixdofConstraintNode connected to a non-rigidbody node!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rigid_body_t::pointer rigid_bodyB;
|
||||
if(plgRigidBodyB.isConnected()) {
|
||||
MPlugArray connections;
|
||||
plgRigidBodyB.connectedTo(connections, true, true);
|
||||
if(connections.length() != 0) {
|
||||
MFnDependencyNode fnNodeB(connections[0].node());
|
||||
if(fnNodeB.typeId() == rigidBodyNode::typeId) {
|
||||
rigidBodyNode *pRigidBodyNodeB = static_cast<rigidBodyNode*>(fnNodeB.userNode());
|
||||
rigid_bodyB = pRigidBodyNodeB->rigid_body();
|
||||
} else {
|
||||
std::cout << "sixdofConstraintNode connected to a non-rigidbody node!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rigid_bodyA && rigid_bodyB) {
|
||||
//not connected to a rigid body, put a default one
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
m_constraint = solver_t::create_sixdof_constraint(rigid_bodyA, vec3f(), rigid_bodyB, vec3f());
|
||||
constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::add_constraint(constraint);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraint).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
|
||||
void sixdofConstraintNode::computeWorldMatrix(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::computeWorldMatrix" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MFnDagNode fnDagNode(thisObject);
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
|
||||
MStatus status;
|
||||
|
||||
MFnTransform fnParentTransform(fnDagNode.parent(0, &status));
|
||||
|
||||
MVector mtranslation = fnParentTransform.getTranslation(MSpace::kTransform, &status);
|
||||
|
||||
// MQuaternion mrotation;
|
||||
// fnParentTransform.getRotation(mrotation, MSpace::kTransform);
|
||||
|
||||
if(m_constraint) {
|
||||
vec3f world_pivot;
|
||||
m_constraint->get_world(world_pivot);
|
||||
if(world_pivot[0] != float(mtranslation.x) ||
|
||||
world_pivot[1] != float(mtranslation.y) ||
|
||||
world_pivot[2] != float(mtranslation.z)) {
|
||||
|
||||
// mat4x4f xform;
|
||||
// m_constraint->rigid_body()->get_transform(xform);
|
||||
// vec4f pivot = prod(trans(xform), vec4f(mtranslation.x, mtranslation.y, mtranslation.z, 1.0));
|
||||
// m_constraint->set_pivot(vec3f(pivot[0], pivot[1], pivot[2]));
|
||||
m_constraint->set_world(vec3f((float) mtranslation[0], (float) mtranslation[1], (float) mtranslation[2]));
|
||||
}
|
||||
}
|
||||
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
void sixdofConstraintNode::computeConstraintParam(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::computeRigidBodyParam" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
if(m_constraint) {
|
||||
m_constraint->set_damping((float) data.inputValue(ia_damping).asDouble());
|
||||
float lin_lower = (float) data.inputValue(ia_lowerLinLimit).asDouble();
|
||||
float lin_upper = (float) data.inputValue(ia_upperLinLimit).asDouble();
|
||||
m_constraint->set_LinLimit(lin_lower, lin_upper);
|
||||
float ang_lower = (float) data.inputValue(ia_lowerAngLimit).asDouble();
|
||||
float ang_upper = (float) data.inputValue(ia_upperAngLimit).asDouble();
|
||||
m_constraint->set_AngLimit(ang_lower, ang_upper);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraintParam).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
sixdof_constraint_t::pointer sixdofConstraintNode::constraint()
|
||||
{
|
||||
// std::cout << "sixdofConstraintNode::rigid_body" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
return m_constraint;
|
||||
}
|
||||
|
||||
void sixdofConstraintNode::update()
|
||||
{
|
||||
MObject thisObject(thisMObject());
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
MPlug(thisObject, worldMatrix).elementByLogicalIndex(0).getValue(update);
|
||||
}
|
||||
100
Extras/MayaPlugin/constraint/sixdofConstraintNode.h
Normal file
100
Extras/MayaPlugin/constraint/sixdofConstraintNode.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sixdofConstraintNode.h
|
||||
|
||||
#ifndef DYN_SIXDOF_CONSTRAINT_NODE_H
|
||||
#define DYN_SIXDOF_CONSTRAINT_NODE_H
|
||||
|
||||
#include <maya/MString.h>
|
||||
#include <maya/MTypeId.h>
|
||||
#include <maya/MPxLocatorNode.h>
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
class sixdofConstraintNode: public MPxLocatorNode
|
||||
{
|
||||
public:
|
||||
sixdofConstraintNode();
|
||||
virtual ~sixdofConstraintNode();
|
||||
|
||||
virtual bool setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx);
|
||||
|
||||
// virtual MStatus setDependentsDirty ( const MPlug & plug, MPlugArray & plugArray);
|
||||
|
||||
virtual MStatus compute( const MPlug& plug, MDataBlock& data );
|
||||
|
||||
virtual void draw( M3dView & view, const MDagPath & path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status );
|
||||
|
||||
|
||||
virtual bool isBounded() const ;
|
||||
virtual MBoundingBox boundingBox() const;
|
||||
|
||||
virtual bool excludeAsLocator() const { return false; }
|
||||
virtual bool isTransparent() const { return false; }
|
||||
|
||||
static void * creator();
|
||||
static MStatus initialize();
|
||||
|
||||
public:
|
||||
|
||||
sixdof_constraint_t::pointer constraint();
|
||||
|
||||
public:
|
||||
|
||||
//Attributes
|
||||
static MObject ia_rigidBodyA;
|
||||
static MObject ia_rigidBodyB;
|
||||
static MObject ia_damping;
|
||||
|
||||
static MObject ia_lowerLinLimit;
|
||||
static MObject ia_upperLinLimit;
|
||||
static MObject ia_lowerAngLimit;
|
||||
static MObject ia_upperAngLimit;
|
||||
|
||||
static MObject ca_constraint;
|
||||
static MObject ca_constraintParam;
|
||||
|
||||
public:
|
||||
static MTypeId typeId;
|
||||
static MString typeName;
|
||||
|
||||
private:
|
||||
void update();
|
||||
void computeConstraint(const MPlug& plug, MDataBlock& data);
|
||||
void computeConstraintParam(const MPlug& plug, MDataBlock& data);
|
||||
void computeWorldMatrix(const MPlug& plug, MDataBlock& data);
|
||||
|
||||
public:
|
||||
static void nodeRemoved(MObject& node, void *clientData);
|
||||
|
||||
private:
|
||||
sixdof_constraint_t::pointer m_constraint;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //DYN_SIXDOF_CONSTRAINT_NODE_H
|
||||
116
Extras/MayaPlugin/constraint/sixdof_constraint.h
Normal file
116
Extras/MayaPlugin/constraint/sixdof_constraint.h
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sixdof_constraint.h
|
||||
|
||||
#ifndef DYN_SIXDOF_CONSTRAINT_H
|
||||
#define DYN_SIXDOF_CONSTRAINT_H
|
||||
|
||||
#include "shared_ptr.h"
|
||||
#include "rigid_body.h"
|
||||
#include "mathUtils.h"
|
||||
|
||||
#include "constraint.h"
|
||||
#include "sixdof_constraint_impl.h"
|
||||
|
||||
class sixdof_constraint_t: public constraint_t
|
||||
{
|
||||
public:
|
||||
//typedefs
|
||||
typedef shared_ptr<sixdof_constraint_t> pointer;
|
||||
|
||||
//
|
||||
rigid_body_t::pointer rigid_bodyA() { return m_rigid_bodyA; }
|
||||
rigid_body_t::pointer rigid_bodyB() { return m_rigid_bodyB; }
|
||||
|
||||
//
|
||||
void set_pivot(vec3f const& p)
|
||||
{
|
||||
sixdof_constraint_impl_t* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t*>(impl());
|
||||
sixdof_impl->set_pivot(p);
|
||||
}
|
||||
|
||||
//local space pivot
|
||||
void get_pivot(vec3f& p) const {
|
||||
sixdof_constraint_impl_t const* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t const*>(impl());
|
||||
sixdof_impl->get_pivot(p);
|
||||
}
|
||||
|
||||
//
|
||||
void get_world_pivot(vec3f& p) const {
|
||||
sixdof_constraint_impl_t const* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t const*>(impl());
|
||||
sixdof_impl->get_world_pivot(p);
|
||||
}
|
||||
|
||||
//
|
||||
void set_damping(float d) {
|
||||
sixdof_constraint_impl_t* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t*>(impl());
|
||||
sixdof_impl->set_damping(d);
|
||||
}
|
||||
|
||||
float damping() const {
|
||||
sixdof_constraint_impl_t const* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t const*>(impl());
|
||||
return sixdof_impl->damping();
|
||||
}
|
||||
|
||||
void set_world(vec3f const& p)
|
||||
{
|
||||
sixdof_constraint_impl_t* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t*>(impl());
|
||||
sixdof_impl->set_world(p);
|
||||
}
|
||||
|
||||
//local space pivot
|
||||
void get_world(vec3f& p) const {
|
||||
sixdof_constraint_impl_t const* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t const*>(impl());
|
||||
sixdof_impl->get_world(p);
|
||||
}
|
||||
|
||||
void set_LinLimit(float lower, float upper) {
|
||||
sixdof_constraint_impl_t* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t*>(impl());
|
||||
sixdof_impl->set_LinLimit(lower, upper);
|
||||
}
|
||||
|
||||
void set_AngLimit(float lower, float upper) {
|
||||
sixdof_constraint_impl_t* sixdof_impl = dynamic_cast<sixdof_constraint_impl_t*>(impl());
|
||||
sixdof_impl->set_AngLimit(lower, upper);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~sixdof_constraint_t() {};
|
||||
|
||||
protected:
|
||||
friend class solver_t;
|
||||
sixdof_constraint_t(sixdof_constraint_impl_t* impl, rigid_body_t::pointer& rigid_bodyA, rigid_body_t::pointer& rigid_bodyB):
|
||||
constraint_t(impl),
|
||||
m_rigid_bodyA(rigid_bodyA),
|
||||
m_rigid_bodyB(rigid_bodyB)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
rigid_body_t::pointer m_rigid_bodyA;
|
||||
rigid_body_t::pointer m_rigid_bodyB;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //DYN_SIXDOF_CONSTRAINT_H
|
||||
50
Extras/MayaPlugin/constraint/sixdof_constraint_impl.h
Normal file
50
Extras/MayaPlugin/constraint/sixdof_constraint_impl.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sixdof_constraint_impl.h
|
||||
|
||||
#ifndef DYN_SIXDOF_CONSTRAINT_IMPL_H
|
||||
#define DYN_SIXDOF_CONSTRAINT_IMPL_H
|
||||
|
||||
#include "constraint_impl.h"
|
||||
|
||||
class sixdof_constraint_impl_t: public constraint_impl_t
|
||||
{
|
||||
public:
|
||||
//
|
||||
virtual void set_pivot(vec3f const& p) = 0;
|
||||
virtual void get_pivot(vec3f& p) const = 0;
|
||||
virtual void get_world_pivot(vec3f& p) const = 0;
|
||||
virtual void set_world(vec3f const& p) = 0;
|
||||
virtual void get_world(vec3f& p) const = 0;
|
||||
|
||||
//
|
||||
virtual void set_damping(float d) = 0;
|
||||
virtual float damping() const = 0;
|
||||
virtual void set_LinLimit(float lower, float upper) = 0;
|
||||
virtual void set_AngLimit(float lower, float upper) = 0;
|
||||
|
||||
public:
|
||||
virtual ~sixdof_constraint_impl_t() {};
|
||||
};
|
||||
|
||||
#endif //DYN_SIXDOF_CONSTRAINT_IMPL_H
|
||||
419
Extras/MayaPlugin/constraint/sliderConstraintNode.cpp
Normal file
419
Extras/MayaPlugin/constraint/sliderConstraintNode.cpp
Normal file
@@ -0,0 +1,419 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sliderConstraintNode.cpp
|
||||
|
||||
#include <maya/MFnDependencyNode.h>
|
||||
#include <maya/MPlugArray.h>
|
||||
#include <maya/MFnMessageAttribute.h>
|
||||
#include <maya/MFnNumericAttribute.h>
|
||||
#include <maya/MFnMatrixAttribute.h>
|
||||
#include <maya/MMatrix.h>
|
||||
#include <maya/MFnMatrixData.h>
|
||||
#include <maya/MFnTransform.h>
|
||||
#include <maya/MQuaternion.h>
|
||||
#include <maya/MEulerRotation.h>
|
||||
#include <maya/MVector.h>
|
||||
|
||||
#include "rigidBodyNode.h"
|
||||
#include "sliderConstraintNode.h"
|
||||
#include "mayaUtils.h"
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
MTypeId sliderConstraintNode::typeId(0x10033C);
|
||||
MString sliderConstraintNode::typeName("dSliderConstraint");
|
||||
|
||||
MObject sliderConstraintNode::ia_rigidBodyA;
|
||||
MObject sliderConstraintNode::ia_rigidBodyB;
|
||||
MObject sliderConstraintNode::ia_damping;
|
||||
MObject sliderConstraintNode::ca_constraint;
|
||||
MObject sliderConstraintNode::ca_constraintParam;
|
||||
MObject sliderConstraintNode::ia_lowerLinLimit;
|
||||
MObject sliderConstraintNode::ia_upperLinLimit;
|
||||
MObject sliderConstraintNode::ia_lowerAngLimit;
|
||||
MObject sliderConstraintNode::ia_upperAngLimit;
|
||||
|
||||
MStatus sliderConstraintNode::initialize()
|
||||
{
|
||||
MStatus status;
|
||||
MFnMessageAttribute fnMsgAttr;
|
||||
MFnNumericAttribute fnNumericAttr;
|
||||
MFnMatrixAttribute fnMatrixAttr;
|
||||
|
||||
ia_rigidBodyA = fnMsgAttr.create("inRigidBodyA", "inrbA", &status);
|
||||
MCHECKSTATUS(status, "creating inRigidBodyA attribute")
|
||||
status = addAttribute(ia_rigidBodyA);
|
||||
MCHECKSTATUS(status, "adding inRigidBody attribute")
|
||||
|
||||
ia_rigidBodyB = fnMsgAttr.create("inRigidBodyB", "inrbB", &status);
|
||||
MCHECKSTATUS(status, "creating inRigidBodyB attribute")
|
||||
status = addAttribute(ia_rigidBodyB);
|
||||
MCHECKSTATUS(status, "adding inRigidBodyB attribute")
|
||||
|
||||
ia_damping = fnNumericAttr.create("damping", "dmp", MFnNumericData::kDouble, 1.0, &status);
|
||||
MCHECKSTATUS(status, "creating damping attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_damping);
|
||||
MCHECKSTATUS(status, "adding damping attribute")
|
||||
|
||||
ia_lowerLinLimit = fnNumericAttr.create("lowerLinLimit", "lllt", MFnNumericData::kDouble, 1, &status);
|
||||
MCHECKSTATUS(status, "creating lower linear limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_lowerLinLimit);
|
||||
MCHECKSTATUS(status, "adding lower linear limit attribute")
|
||||
|
||||
ia_upperLinLimit = fnNumericAttr.create("upperLinLimit", "ullt", MFnNumericData::kDouble, -1, &status);
|
||||
MCHECKSTATUS(status, "creating upper linear limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_upperLinLimit);
|
||||
MCHECKSTATUS(status, "adding upper linear limit attribute")
|
||||
|
||||
ia_lowerAngLimit = fnNumericAttr.create("lowerAngLimit", "lalt", MFnNumericData::kDouble, 0, &status);
|
||||
MCHECKSTATUS(status, "creating lower angular limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_lowerAngLimit);
|
||||
MCHECKSTATUS(status, "adding lower angular limit attribute")
|
||||
|
||||
ia_upperAngLimit = fnNumericAttr.create("upperAngLimit", "ualt", MFnNumericData::kDouble, 0, &status);
|
||||
MCHECKSTATUS(status, "creating upper angular limit attribute")
|
||||
fnNumericAttr.setKeyable(true);
|
||||
status = addAttribute(ia_upperAngLimit);
|
||||
MCHECKSTATUS(status, "adding upper angular limit attribute")
|
||||
|
||||
ca_constraint = fnNumericAttr.create("ca_constraint", "caco", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraint attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraint);
|
||||
MCHECKSTATUS(status, "adding ca_constraint attribute")
|
||||
|
||||
ca_constraintParam = fnNumericAttr.create("ca_constraintParam", "cacop", MFnNumericData::kBoolean, 0, &status);
|
||||
MCHECKSTATUS(status, "creating ca_constraintParam attribute")
|
||||
fnNumericAttr.setConnectable(false);
|
||||
fnNumericAttr.setHidden(true);
|
||||
fnNumericAttr.setStorable(false);
|
||||
fnNumericAttr.setKeyable(false);
|
||||
status = addAttribute(ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding ca_constraintParam attribute")
|
||||
|
||||
|
||||
status = attributeAffects(ia_rigidBodyA, ca_constraint);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyA, ca_constraint)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyA, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyA, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyB, ca_constraint);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyB, ca_constraint)")
|
||||
|
||||
status = attributeAffects(ia_rigidBodyB, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_rigidBodyB, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_damping, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_damping, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_lowerLinLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_lowerLinLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_upperLinLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_upperLinLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_lowerAngLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_lowerAngLimit, ca_constraintParam)")
|
||||
|
||||
status = attributeAffects(ia_upperAngLimit, ca_constraintParam);
|
||||
MCHECKSTATUS(status, "adding attributeAffects(ia_upperAngLimit, ca_constraintParam)")
|
||||
|
||||
return MS::kSuccess;
|
||||
}
|
||||
|
||||
sliderConstraintNode::sliderConstraintNode()
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::sliderConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
sliderConstraintNode::~sliderConstraintNode()
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::~sliderConstraintNode" << std::endl;
|
||||
}
|
||||
|
||||
void sliderConstraintNode::nodeRemoved(MObject& node, void *clientData)
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::nodeRemoved" << std::endl;
|
||||
MFnDependencyNode fnNode(node);
|
||||
sliderConstraintNode *pNode = static_cast<sliderConstraintNode*>(fnNode.userNode());
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(pNode->m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
}
|
||||
|
||||
void* sliderConstraintNode::creator()
|
||||
{
|
||||
return new sliderConstraintNode();
|
||||
}
|
||||
|
||||
|
||||
bool sliderConstraintNode::setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx)
|
||||
{
|
||||
/* if ((plug == pdbFiles) || (plug == ia_scale) || (plug == ia_percent)) {
|
||||
m_framesDirty = true;
|
||||
} else if(plug == textureFiles) {
|
||||
gpufx::m_renderer.setColorTextureDirty();
|
||||
}*/
|
||||
return false; //setInternalValueInContext(plug,dataHandle,ctx);
|
||||
}
|
||||
|
||||
MStatus sliderConstraintNode::compute(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
//std::cout << "sliderConstraintNode::compute: " << plug.name() << std::endl;
|
||||
//MTime time = data.inputValue( sliderConstraintNode::inTime ).asTime();
|
||||
if(plug == ca_constraint) {
|
||||
computeConstraint(plug, data);
|
||||
} else if(plug == ca_constraintParam) {
|
||||
computeConstraintParam(plug, data);
|
||||
} else if(plug.isElement()) {
|
||||
if(plug.array() == worldMatrix && plug.logicalIndex() == 0) {
|
||||
computeWorldMatrix(plug, data);
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
} else {
|
||||
return MStatus::kUnknownParameter;
|
||||
}
|
||||
return MStatus::kSuccess;
|
||||
}
|
||||
|
||||
void sliderConstraintNode::draw( M3dView & view, const MDagPath &path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status )
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::draw" << std::endl;
|
||||
|
||||
update();
|
||||
|
||||
view.beginGL();
|
||||
glPushAttrib( GL_ALL_ATTRIB_BITS );
|
||||
|
||||
// glPushMatrix();
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
if( !(status == M3dView::kActive ||
|
||||
status == M3dView::kLead ||
|
||||
status == M3dView::kHilite ||
|
||||
( style != M3dView::kGouraudShaded && style != M3dView::kFlatShaded )) ) {
|
||||
glColor3f(1.0, 1.0, 0.0);
|
||||
}
|
||||
|
||||
vec3f posA;
|
||||
vec3f posB;
|
||||
if (m_constraint) {
|
||||
vec3f world;
|
||||
m_constraint->get_world(world);
|
||||
quatf rotA;
|
||||
m_constraint->rigid_bodyA()->get_transform(posA, rotA);
|
||||
posA = posA - world;
|
||||
quatf rotB;
|
||||
m_constraint->rigid_bodyB()->get_transform(posB, rotB);
|
||||
posB = posB - world;
|
||||
}
|
||||
|
||||
// glLoadIdentity();
|
||||
glBegin(GL_LINES);
|
||||
glVertex3f(posA[0], posA[1], posA[2]);
|
||||
glVertex3f(posB[0], posB[1], posB[2]);
|
||||
|
||||
glVertex3f(-1.0, 0.0, 0.0);
|
||||
glVertex3f(1.0, 0.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, -1.0, 0.0);
|
||||
glVertex3f(0.0, 1.0, 0.0);
|
||||
|
||||
glVertex3f(0.0, 0.0, -1.0);
|
||||
glVertex3f(0.0, 0.0, 1.0);
|
||||
glEnd();
|
||||
|
||||
// glPopMatrix();
|
||||
|
||||
glPopAttrib();
|
||||
view.endGL();
|
||||
}
|
||||
|
||||
bool sliderConstraintNode::isBounded() const
|
||||
{
|
||||
//return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
MBoundingBox sliderConstraintNode::boundingBox() const
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::boundingBox()" << std::endl;
|
||||
//load the pdbs
|
||||
MObject node = thisMObject();
|
||||
|
||||
MPoint corner1(-1, -1, -1);
|
||||
MPoint corner2(1, 1, 1);
|
||||
return MBoundingBox(corner1, corner2);
|
||||
}
|
||||
|
||||
//standard attributes
|
||||
void sliderConstraintNode::computeConstraint(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::computeConstraint" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MPlug plgRigidBodyA(thisObject, ia_rigidBodyA);
|
||||
MPlug plgRigidBodyB(thisObject, ia_rigidBodyB);
|
||||
MObject update;
|
||||
//force evaluation of the rigidBody
|
||||
plgRigidBodyA.getValue(update);
|
||||
plgRigidBodyB.getValue(update);
|
||||
|
||||
rigid_body_t::pointer rigid_bodyA;
|
||||
if(plgRigidBodyA.isConnected()) {
|
||||
MPlugArray connections;
|
||||
plgRigidBodyA.connectedTo(connections, true, true);
|
||||
if(connections.length() != 0) {
|
||||
MFnDependencyNode fnNodeA(connections[0].node());
|
||||
if(fnNodeA.typeId() == rigidBodyNode::typeId) {
|
||||
rigidBodyNode *pRigidBodyNodeA = static_cast<rigidBodyNode*>(fnNodeA.userNode());
|
||||
rigid_bodyA = pRigidBodyNodeA->rigid_body();
|
||||
} else {
|
||||
std::cout << "sliderConstraintNode connected to a non-rigidbody node!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rigid_body_t::pointer rigid_bodyB;
|
||||
if(plgRigidBodyB.isConnected()) {
|
||||
MPlugArray connections;
|
||||
plgRigidBodyB.connectedTo(connections, true, true);
|
||||
if(connections.length() != 0) {
|
||||
MFnDependencyNode fnNodeB(connections[0].node());
|
||||
if(fnNodeB.typeId() == rigidBodyNode::typeId) {
|
||||
rigidBodyNode *pRigidBodyNodeB = static_cast<rigidBodyNode*>(fnNodeB.userNode());
|
||||
rigid_bodyB = pRigidBodyNodeB->rigid_body();
|
||||
} else {
|
||||
std::cout << "sliderConstraintNode connected to a non-rigidbody node!" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(rigid_bodyA && rigid_bodyB) {
|
||||
//not connected to a rigid body, put a default one
|
||||
constraint_t::pointer constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::remove_constraint(constraint);
|
||||
m_constraint = solver_t::create_slider_constraint(rigid_bodyA, vec3f(), rigid_bodyB, vec3f());
|
||||
constraint = static_cast<constraint_t::pointer>(m_constraint);
|
||||
solver_t::add_constraint(constraint);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraint).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
|
||||
void sliderConstraintNode::computeWorldMatrix(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::computeWorldMatrix" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MFnDagNode fnDagNode(thisObject);
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
|
||||
MStatus status;
|
||||
|
||||
MFnTransform fnParentTransform(fnDagNode.parent(0, &status));
|
||||
|
||||
MVector mtranslation = fnParentTransform.getTranslation(MSpace::kTransform, &status);
|
||||
|
||||
// MQuaternion mrotation;
|
||||
// fnParentTransform.getRotation(mrotation, MSpace::kTransform);
|
||||
|
||||
if(m_constraint) {
|
||||
vec3f world_pivot;
|
||||
m_constraint->get_world(world_pivot);
|
||||
if(world_pivot[0] != float(mtranslation.x) ||
|
||||
world_pivot[1] != float(mtranslation.y) ||
|
||||
world_pivot[2] != float(mtranslation.z)) {
|
||||
|
||||
// mat4x4f xform;
|
||||
// m_constraint->rigid_body()->get_transform(xform);
|
||||
// vec4f pivot = prod(trans(xform), vec4f(mtranslation.x, mtranslation.y, mtranslation.z, 1.0));
|
||||
// m_constraint->set_pivot(vec3f(pivot[0], pivot[1], pivot[2]));
|
||||
m_constraint->set_world(vec3f((float) mtranslation[0], (float) mtranslation[1], (float) mtranslation[2]));
|
||||
}
|
||||
}
|
||||
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
void sliderConstraintNode::computeConstraintParam(const MPlug& plug, MDataBlock& data)
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::computeRigidBodyParam" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
if(m_constraint) {
|
||||
m_constraint->set_damping((float) data.inputValue(ia_damping).asDouble());
|
||||
float lin_lower = (float) data.inputValue(ia_lowerLinLimit).asDouble();
|
||||
float lin_upper = (float) data.inputValue(ia_upperLinLimit).asDouble();
|
||||
m_constraint->set_LinLimit(lin_lower, lin_upper);
|
||||
float ang_lower = (float) data.inputValue(ia_lowerAngLimit).asDouble();
|
||||
float ang_upper = (float) data.inputValue(ia_upperAngLimit).asDouble();
|
||||
m_constraint->set_AngLimit(ang_lower, ang_upper);
|
||||
}
|
||||
|
||||
data.outputValue(ca_constraintParam).set(true);
|
||||
data.setClean(plug);
|
||||
}
|
||||
|
||||
slider_constraint_t::pointer sliderConstraintNode::constraint()
|
||||
{
|
||||
// std::cout << "sliderConstraintNode::rigid_body" << std::endl;
|
||||
|
||||
MObject thisObject(thisMObject());
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
|
||||
return m_constraint;
|
||||
}
|
||||
|
||||
void sliderConstraintNode::update()
|
||||
{
|
||||
MObject thisObject(thisMObject());
|
||||
|
||||
MObject update;
|
||||
MPlug(thisObject, ca_constraint).getValue(update);
|
||||
MPlug(thisObject, ca_constraintParam).getValue(update);
|
||||
MPlug(thisObject, worldMatrix).elementByLogicalIndex(0).getValue(update);
|
||||
}
|
||||
100
Extras/MayaPlugin/constraint/sliderConstraintNode.h
Normal file
100
Extras/MayaPlugin/constraint/sliderConstraintNode.h
Normal file
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//sliderConstraintNode.h
|
||||
|
||||
#ifndef DYN_SLIDER_CONSTRAINT_NODE_H
|
||||
#define DYN_SLIDER_CONSTRAINT_NODE_H
|
||||
|
||||
#include <maya/MString.h>
|
||||
#include <maya/MTypeId.h>
|
||||
#include <maya/MPxLocatorNode.h>
|
||||
|
||||
#include "solver.h"
|
||||
|
||||
class sliderConstraintNode: public MPxLocatorNode
|
||||
{
|
||||
public:
|
||||
sliderConstraintNode();
|
||||
virtual ~sliderConstraintNode();
|
||||
|
||||
virtual bool setInternalValueInContext ( const MPlug & plug,
|
||||
const MDataHandle & dataHandle,
|
||||
MDGContext & ctx);
|
||||
|
||||
// virtual MStatus setDependentsDirty ( const MPlug & plug, MPlugArray & plugArray);
|
||||
|
||||
virtual MStatus compute( const MPlug& plug, MDataBlock& data );
|
||||
|
||||
virtual void draw( M3dView & view, const MDagPath & path,
|
||||
M3dView::DisplayStyle style,
|
||||
M3dView::DisplayStatus status );
|
||||
|
||||
|
||||
virtual bool isBounded() const ;
|
||||
virtual MBoundingBox boundingBox() const;
|
||||
|
||||
virtual bool excludeAsLocator() const { return false; }
|
||||
virtual bool isTransparent() const { return false; }
|
||||
|
||||
static void * creator();
|
||||
static MStatus initialize();
|
||||
|
||||
public:
|
||||
|
||||
slider_constraint_t::pointer constraint();
|
||||
|
||||
public:
|
||||
|
||||
//Attributes
|
||||
static MObject ia_rigidBodyA;
|
||||
static MObject ia_rigidBodyB;
|
||||
static MObject ia_damping;
|
||||
|
||||
static MObject ia_lowerLinLimit;
|
||||
static MObject ia_upperLinLimit;
|
||||
static MObject ia_lowerAngLimit;
|
||||
static MObject ia_upperAngLimit;
|
||||
|
||||
static MObject ca_constraint;
|
||||
static MObject ca_constraintParam;
|
||||
|
||||
public:
|
||||
static MTypeId typeId;
|
||||
static MString typeName;
|
||||
|
||||
private:
|
||||
void update();
|
||||
void computeConstraint(const MPlug& plug, MDataBlock& data);
|
||||
void computeConstraintParam(const MPlug& plug, MDataBlock& data);
|
||||
void computeWorldMatrix(const MPlug& plug, MDataBlock& data);
|
||||
|
||||
public:
|
||||
static void nodeRemoved(MObject& node, void *clientData);
|
||||
|
||||
private:
|
||||
slider_constraint_t::pointer m_constraint;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //DYN_SLIDER_CONSTRAINT_NODE_H
|
||||
116
Extras/MayaPlugin/constraint/slider_constraint.h
Normal file
116
Extras/MayaPlugin/constraint/slider_constraint.h
Normal file
@@ -0,0 +1,116 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//slider_constraint.h
|
||||
|
||||
#ifndef DYN_SLIDER_CONSTRAINT_H
|
||||
#define DYN_SLIDER_CONSTRAINT_H
|
||||
|
||||
#include "shared_ptr.h"
|
||||
#include "rigid_body.h"
|
||||
#include "mathUtils.h"
|
||||
|
||||
#include "constraint.h"
|
||||
#include "slider_constraint_impl.h"
|
||||
|
||||
class slider_constraint_t: public constraint_t
|
||||
{
|
||||
public:
|
||||
//typedefs
|
||||
typedef shared_ptr<slider_constraint_t> pointer;
|
||||
|
||||
//
|
||||
rigid_body_t::pointer rigid_bodyA() { return m_rigid_bodyA; }
|
||||
rigid_body_t::pointer rigid_bodyB() { return m_rigid_bodyB; }
|
||||
|
||||
//
|
||||
void set_pivot(vec3f const& p)
|
||||
{
|
||||
slider_constraint_impl_t* slider_impl = dynamic_cast<slider_constraint_impl_t*>(impl());
|
||||
slider_impl->set_pivot(p);
|
||||
}
|
||||
|
||||
//local space pivot
|
||||
void get_pivot(vec3f& p) const {
|
||||
slider_constraint_impl_t const* slider_impl = dynamic_cast<slider_constraint_impl_t const*>(impl());
|
||||
slider_impl->get_pivot(p);
|
||||
}
|
||||
|
||||
//
|
||||
void get_world_pivot(vec3f& p) const {
|
||||
slider_constraint_impl_t const* slider_impl = dynamic_cast<slider_constraint_impl_t const*>(impl());
|
||||
slider_impl->get_world_pivot(p);
|
||||
}
|
||||
|
||||
//
|
||||
void set_damping(float d) {
|
||||
slider_constraint_impl_t* slider_impl = dynamic_cast<slider_constraint_impl_t*>(impl());
|
||||
slider_impl->set_damping(d);
|
||||
}
|
||||
|
||||
float damping() const {
|
||||
slider_constraint_impl_t const* slider_impl = dynamic_cast<slider_constraint_impl_t const*>(impl());
|
||||
return slider_impl->damping();
|
||||
}
|
||||
|
||||
void set_world(vec3f const& p)
|
||||
{
|
||||
slider_constraint_impl_t* slider_impl = dynamic_cast<slider_constraint_impl_t*>(impl());
|
||||
slider_impl->set_world(p);
|
||||
}
|
||||
|
||||
//local space pivot
|
||||
void get_world(vec3f& p) const {
|
||||
slider_constraint_impl_t const* slider_impl = dynamic_cast<slider_constraint_impl_t const*>(impl());
|
||||
slider_impl->get_world(p);
|
||||
}
|
||||
|
||||
void set_LinLimit(float lower, float upper) {
|
||||
slider_constraint_impl_t* slider_impl = dynamic_cast<slider_constraint_impl_t*>(impl());
|
||||
slider_impl->set_LinLimit(lower, upper);
|
||||
}
|
||||
|
||||
void set_AngLimit(float lower, float upper) {
|
||||
slider_constraint_impl_t* slider_impl = dynamic_cast<slider_constraint_impl_t*>(impl());
|
||||
slider_impl->set_AngLimit(lower, upper);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~slider_constraint_t() {};
|
||||
|
||||
protected:
|
||||
friend class solver_t;
|
||||
slider_constraint_t(slider_constraint_impl_t* impl, rigid_body_t::pointer& rigid_bodyA, rigid_body_t::pointer& rigid_bodyB):
|
||||
constraint_t(impl),
|
||||
m_rigid_bodyA(rigid_bodyA),
|
||||
m_rigid_bodyB(rigid_bodyB)
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
rigid_body_t::pointer m_rigid_bodyA;
|
||||
rigid_body_t::pointer m_rigid_bodyB;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif //DYN_SLIDER_CONSTRAINT_H
|
||||
213
Extras/MayaPlugin/icons/dynamicaCreate6DofConstraint.xpm
Normal file
213
Extras/MayaPlugin/icons/dynamicaCreate6DofConstraint.xpm
Normal file
@@ -0,0 +1,213 @@
|
||||
/* XPM */
|
||||
static char * dynamicaCreatePinConstraint_xpm[] = {
|
||||
"32 32 178 2",
|
||||
" c #B1B1B1",
|
||||
". c #A8A8A8",
|
||||
"+ c #A5A5A5",
|
||||
"@ c #718172",
|
||||
"# c #6D866F",
|
||||
"$ c #999999",
|
||||
"% c #9B9B9B",
|
||||
"& c #7B9B7E",
|
||||
"* c #77CF80",
|
||||
"= c #69846C",
|
||||
"- c #8F8F8F",
|
||||
"; c #989898",
|
||||
"> c #82A185",
|
||||
", c #88EC91",
|
||||
"' c #57DD63",
|
||||
") c #529C59",
|
||||
"! c #878787",
|
||||
"~ c #A2A2A2",
|
||||
"{ c #949494",
|
||||
"] c #88AA8B",
|
||||
"^ c #8EED97",
|
||||
"/ c #58E465",
|
||||
"( c #23DC34",
|
||||
"_ c #30B33C",
|
||||
": c #667A68",
|
||||
"< c #959595",
|
||||
"[ c #9E9E9E",
|
||||
"} c #757C76",
|
||||
"| c #9BD9A1",
|
||||
"1 c #87EC90",
|
||||
"2 c #4BE259",
|
||||
"3 c #17DA29",
|
||||
"4 c #04D718",
|
||||
"5 c #13C624",
|
||||
"6 c #528C57",
|
||||
"7 c #8B8B8B",
|
||||
"8 c #A9A9A9",
|
||||
"9 c #A6A6A6",
|
||||
"0 c #717371",
|
||||
"a c #99CB9E",
|
||||
"b c #9BEFA3",
|
||||
"c c #6FE87A",
|
||||
"d c #30DE40",
|
||||
"e c #09D71C",
|
||||
"f c #00D614",
|
||||
"g c #33A73E",
|
||||
"h c #8E8E8E",
|
||||
"i c #93BB97",
|
||||
"j c #A3F0AA",
|
||||
"k c #82EB8C",
|
||||
"l c #49E257",
|
||||
"m c #15D927",
|
||||
"n c #01D615",
|
||||
"o c #28B235",
|
||||
"p c #419B49",
|
||||
"q c #508D56",
|
||||
"r c #9F9F9F",
|
||||
"s c #89A68C",
|
||||
"t c #A6F1AD",
|
||||
"u c #8DED96",
|
||||
"v c #59E466",
|
||||
"w c #21DB32",
|
||||
"x c #24B532",
|
||||
"y c #858585",
|
||||
"z c #969696",
|
||||
"A c #929292",
|
||||
"B c #809281",
|
||||
"C c #A7EBAD",
|
||||
"D c #94EE9C",
|
||||
"E c #67E773",
|
||||
"F c #2DDD3D",
|
||||
"G c #06D119",
|
||||
"H c #5E8061",
|
||||
"I c #A0A0A0",
|
||||
"J c #919191",
|
||||
"K c #8A8A8A",
|
||||
"L c #778278",
|
||||
"M c #A0E2A6",
|
||||
"N c #99EFA1",
|
||||
"O c #73E87E",
|
||||
"P c #3BDF4A",
|
||||
"Q c #10D923",
|
||||
"R c #36A441",
|
||||
"S c #BE0000",
|
||||
"T c #A20000",
|
||||
"U c #7C1D14",
|
||||
"V c #88744E",
|
||||
"W c #877D52",
|
||||
"X c #8B8F5F",
|
||||
"Y c #95CA89",
|
||||
"Z c #77E982",
|
||||
"` c #46E155",
|
||||
" . c #03D617",
|
||||
".. c #13C424",
|
||||
"+. c #69766B",
|
||||
"@. c #AAAAAA",
|
||||
"#. c #747D74",
|
||||
"$. c #94D79B",
|
||||
"%. c #86EC8F",
|
||||
"&. c #7EEA88",
|
||||
"*. c #6DE878",
|
||||
"=. c #47E155",
|
||||
"-. c #1CDB2E",
|
||||
";. c #4C9053",
|
||||
">. c #75C27C",
|
||||
",. c #7AEA84",
|
||||
"'. c #74E97F",
|
||||
"). c #68E774",
|
||||
"!. c #5AE467",
|
||||
"~. c #4CE25A",
|
||||
"{. c #38DF48",
|
||||
"]. c #1DDB2F",
|
||||
"^. c #07D71A",
|
||||
"/. c #23B631",
|
||||
"(. c #848484",
|
||||
"_. c #66896A",
|
||||
":. c #49C955",
|
||||
"<. c #35DF45",
|
||||
"[. c #2BDD3C",
|
||||
"}. c #22DB33",
|
||||
"|. c #1ADA2C",
|
||||
"1. c #11D924",
|
||||
"2. c #09CE1C",
|
||||
"3. c #5D8160",
|
||||
"4. c #69786A",
|
||||
"5. c #32B03E",
|
||||
"6. c #02D616",
|
||||
"7. c #2BAF37",
|
||||
"8. c #898989",
|
||||
"9. c #A4A4A4",
|
||||
"0. c #7F7F7F",
|
||||
"a. c #399141",
|
||||
"b. c #06D019",
|
||||
"c. c #24B631",
|
||||
"d. c #A7A7A7",
|
||||
"e. c #AFAFAF",
|
||||
"f. c #BDBDBD",
|
||||
"g. c #528156",
|
||||
"h. c #12C223",
|
||||
"i. c #14C424",
|
||||
"j. c #6C746C",
|
||||
"k. c #AEAEAE",
|
||||
"l. c #EBEBEB",
|
||||
"m. c #F4F4F4",
|
||||
"n. c #C2C2C2",
|
||||
"o. c #697A6A",
|
||||
"p. c #26AE33",
|
||||
"q. c #09CE1B",
|
||||
"r. c #627D64",
|
||||
"s. c #A3A3A3",
|
||||
"t. c #C7C7C7",
|
||||
"u. c #FCFCFC",
|
||||
"v. c #E6E6E6",
|
||||
"w. c #DFDFDF",
|
||||
"x. c #409C48",
|
||||
"y. c #04D217",
|
||||
"z. c #6E726F",
|
||||
"A. c #B0B0B0",
|
||||
"B. c #F8F8F8",
|
||||
"C. c #8D8D8D",
|
||||
"D. c #528B57",
|
||||
"E. c #1BA610",
|
||||
"F. c #5B835F",
|
||||
"G. c #DDDDDD",
|
||||
"H. c #EAEAEA",
|
||||
"I. c #880000",
|
||||
"J. c #B5B5B5",
|
||||
"K. c #DEDEDE",
|
||||
"L. c #E9E9E9",
|
||||
"M. c #A1A1A1",
|
||||
"N. c #CACACA",
|
||||
"O. c #DCDCDC",
|
||||
"P. c #ACACAC",
|
||||
"Q. c #D8D8D8",
|
||||
"R. c #C6C6C6",
|
||||
"S. c #ADADAD",
|
||||
"T. c #BA0000",
|
||||
"U. c #BB0000",
|
||||
" ",
|
||||
" . + ",
|
||||
" . @ # $ ",
|
||||
" % & * = - ",
|
||||
" ; > , ' ) ! ~ ",
|
||||
" { ] ^ / ( _ : < ",
|
||||
" [ } | 1 2 3 4 5 6 7 8 ",
|
||||
" 9 0 a b c d e f f f g h ",
|
||||
" 7 i j k l m n f o p q r ",
|
||||
" h s t u v w 4 f x y z r ",
|
||||
" A B C D E F e f G H I ",
|
||||
" 8 J - K L M N O P Q n f R h ",
|
||||
" S S S S S S S S T U V W X Y D Z ` 3 .f ..+.@. ",
|
||||
" S I #.$.N ^ %.&.*.=.-.4 f f ;.z ",
|
||||
" S y >.,.'.).!.~.{.].^.f f /.(. ",
|
||||
" S I _.:.<.[.}.|.1.^.n f 2.3.r ",
|
||||
" S ; 4.5.^.4 4 6.n f f 7.8. ",
|
||||
" S 9.0.a.b.f f f f f c.y ",
|
||||
" S d.e.f.g.h.f f f f i.j.k. ",
|
||||
" S e.; l.m.n.o.p.f f f q.r.8 ",
|
||||
" S s.t.u.v.w.; (.x.y.f /.z.A. ",
|
||||
" S @.~ B.v.w.9 9.A.C.D.E.F.r ",
|
||||
" S r G.H.w.9.9. $ I.$ ",
|
||||
" S + J.m.K.s.9. S ",
|
||||
" S k.$ L.G.M.9. S ",
|
||||
" S s.N.O.I + S ",
|
||||
" S P.+ Q.r + S ",
|
||||
" S ~ R.r 9 S ",
|
||||
" S S.s.[ P. S ",
|
||||
" S S S S T.U.S S S S S S S S S S S S ",
|
||||
" ",
|
||||
" "};
|
||||
213
Extras/MayaPlugin/icons/dynamicaCreateConeTwistConstraint.xpm
Normal file
213
Extras/MayaPlugin/icons/dynamicaCreateConeTwistConstraint.xpm
Normal file
@@ -0,0 +1,213 @@
|
||||
/* XPM */
|
||||
static char * dynamicaCreatePinConstraint_xpm[] = {
|
||||
"32 32 178 2",
|
||||
" c #B1B1B1",
|
||||
". c #A8A8A8",
|
||||
"+ c #A5A5A5",
|
||||
"@ c #718172",
|
||||
"# c #6D866F",
|
||||
"$ c #999999",
|
||||
"% c #9B9B9B",
|
||||
"& c #7B9B7E",
|
||||
"* c #77CF80",
|
||||
"= c #69846C",
|
||||
"- c #8F8F8F",
|
||||
"; c #989898",
|
||||
"> c #82A185",
|
||||
", c #88EC91",
|
||||
"' c #57DD63",
|
||||
") c #529C59",
|
||||
"! c #878787",
|
||||
"~ c #A2A2A2",
|
||||
"{ c #949494",
|
||||
"] c #88AA8B",
|
||||
"^ c #8EED97",
|
||||
"/ c #58E465",
|
||||
"( c #23DC34",
|
||||
"_ c #30B33C",
|
||||
": c #667A68",
|
||||
"< c #959595",
|
||||
"[ c #9E9E9E",
|
||||
"} c #757C76",
|
||||
"| c #9BD9A1",
|
||||
"1 c #87EC90",
|
||||
"2 c #4BE259",
|
||||
"3 c #17DA29",
|
||||
"4 c #04D718",
|
||||
"5 c #13C624",
|
||||
"6 c #528C57",
|
||||
"7 c #8B8B8B",
|
||||
"8 c #A9A9A9",
|
||||
"9 c #A6A6A6",
|
||||
"0 c #717371",
|
||||
"a c #99CB9E",
|
||||
"b c #9BEFA3",
|
||||
"c c #6FE87A",
|
||||
"d c #30DE40",
|
||||
"e c #09D71C",
|
||||
"f c #00D614",
|
||||
"g c #33A73E",
|
||||
"h c #8E8E8E",
|
||||
"i c #93BB97",
|
||||
"j c #A3F0AA",
|
||||
"k c #82EB8C",
|
||||
"l c #49E257",
|
||||
"m c #15D927",
|
||||
"n c #01D615",
|
||||
"o c #28B235",
|
||||
"p c #419B49",
|
||||
"q c #508D56",
|
||||
"r c #9F9F9F",
|
||||
"s c #89A68C",
|
||||
"t c #A6F1AD",
|
||||
"u c #8DED96",
|
||||
"v c #59E466",
|
||||
"w c #21DB32",
|
||||
"x c #24B532",
|
||||
"y c #858585",
|
||||
"z c #969696",
|
||||
"A c #929292",
|
||||
"B c #809281",
|
||||
"C c #A7EBAD",
|
||||
"D c #94EE9C",
|
||||
"E c #67E773",
|
||||
"F c #2DDD3D",
|
||||
"G c #06D119",
|
||||
"H c #5E8061",
|
||||
"I c #A0A0A0",
|
||||
"J c #919191",
|
||||
"K c #8A8A8A",
|
||||
"L c #778278",
|
||||
"M c #A0E2A6",
|
||||
"N c #99EFA1",
|
||||
"O c #73E87E",
|
||||
"P c #3BDF4A",
|
||||
"Q c #10D923",
|
||||
"R c #36A441",
|
||||
"S c #BE0000",
|
||||
"T c #A20000",
|
||||
"U c #7C1D14",
|
||||
"V c #88744E",
|
||||
"W c #877D52",
|
||||
"X c #8B8F5F",
|
||||
"Y c #95CA89",
|
||||
"Z c #77E982",
|
||||
"` c #46E155",
|
||||
" . c #03D617",
|
||||
".. c #13C424",
|
||||
"+. c #69766B",
|
||||
"@. c #AAAAAA",
|
||||
"#. c #747D74",
|
||||
"$. c #94D79B",
|
||||
"%. c #86EC8F",
|
||||
"&. c #7EEA88",
|
||||
"*. c #6DE878",
|
||||
"=. c #47E155",
|
||||
"-. c #1CDB2E",
|
||||
";. c #4C9053",
|
||||
">. c #75C27C",
|
||||
",. c #7AEA84",
|
||||
"'. c #74E97F",
|
||||
"). c #68E774",
|
||||
"!. c #5AE467",
|
||||
"~. c #4CE25A",
|
||||
"{. c #38DF48",
|
||||
"]. c #1DDB2F",
|
||||
"^. c #07D71A",
|
||||
"/. c #23B631",
|
||||
"(. c #848484",
|
||||
"_. c #66896A",
|
||||
":. c #49C955",
|
||||
"<. c #35DF45",
|
||||
"[. c #2BDD3C",
|
||||
"}. c #22DB33",
|
||||
"|. c #1ADA2C",
|
||||
"1. c #11D924",
|
||||
"2. c #09CE1C",
|
||||
"3. c #5D8160",
|
||||
"4. c #69786A",
|
||||
"5. c #32B03E",
|
||||
"6. c #02D616",
|
||||
"7. c #2BAF37",
|
||||
"8. c #898989",
|
||||
"9. c #A4A4A4",
|
||||
"0. c #7F7F7F",
|
||||
"a. c #399141",
|
||||
"b. c #06D019",
|
||||
"c. c #24B631",
|
||||
"d. c #A7A7A7",
|
||||
"e. c #AFAFAF",
|
||||
"f. c #BDBDBD",
|
||||
"g. c #528156",
|
||||
"h. c #12C223",
|
||||
"i. c #14C424",
|
||||
"j. c #6C746C",
|
||||
"k. c #AEAEAE",
|
||||
"l. c #EBEBEB",
|
||||
"m. c #F4F4F4",
|
||||
"n. c #C2C2C2",
|
||||
"o. c #697A6A",
|
||||
"p. c #26AE33",
|
||||
"q. c #09CE1B",
|
||||
"r. c #627D64",
|
||||
"s. c #A3A3A3",
|
||||
"t. c #C7C7C7",
|
||||
"u. c #FCFCFC",
|
||||
"v. c #E6E6E6",
|
||||
"w. c #DFDFDF",
|
||||
"x. c #409C48",
|
||||
"y. c #04D217",
|
||||
"z. c #6E726F",
|
||||
"A. c #B0B0B0",
|
||||
"B. c #F8F8F8",
|
||||
"C. c #8D8D8D",
|
||||
"D. c #528B57",
|
||||
"E. c #1BA610",
|
||||
"F. c #5B835F",
|
||||
"G. c #DDDDDD",
|
||||
"H. c #EAEAEA",
|
||||
"I. c #880000",
|
||||
"J. c #B5B5B5",
|
||||
"K. c #DEDEDE",
|
||||
"L. c #E9E9E9",
|
||||
"M. c #A1A1A1",
|
||||
"N. c #CACACA",
|
||||
"O. c #DCDCDC",
|
||||
"P. c #ACACAC",
|
||||
"Q. c #D8D8D8",
|
||||
"R. c #C6C6C6",
|
||||
"S. c #ADADAD",
|
||||
"T. c #BA0000",
|
||||
"U. c #BB0000",
|
||||
" ",
|
||||
" . + ",
|
||||
" . @ # $ ",
|
||||
" % & * = - ",
|
||||
" ; > , ' ) ! ~ ",
|
||||
" { ] ^ / ( _ : < ",
|
||||
" [ } | 1 2 3 4 5 6 7 8 ",
|
||||
" 9 0 a b c d e f f f g h ",
|
||||
" 7 i j k l m n f o p q r ",
|
||||
" h s t u v w 4 f x y z r ",
|
||||
" A B C D E F e f G H I ",
|
||||
" 8 J - K L M N O P Q n f R h ",
|
||||
" S S S S S S S S T U V W X Y D Z ` 3 .f ..+.@. ",
|
||||
" S I #.$.N ^ %.&.*.=.-.4 f f ;.z ",
|
||||
" S y >.,.'.).!.~.{.].^.f f /.(. ",
|
||||
" S I _.:.<.[.}.|.1.^.n f 2.3.r ",
|
||||
" S ; 4.5.^.4 4 6.n f f 7.8. ",
|
||||
" S 9.0.a.b.f f f f f c.y ",
|
||||
" S d.e.f.g.h.f f f f i.j.k. ",
|
||||
" S e.; l.m.n.o.p.f f f q.r.8 ",
|
||||
" S s.t.u.v.w.; (.x.y.f /.z.A. ",
|
||||
" S @.~ B.v.w.9 9.A.C.D.E.F.r ",
|
||||
" S r G.H.w.9.9. $ I.$ ",
|
||||
" S + J.m.K.s.9. S ",
|
||||
" S k.$ L.G.M.9. S ",
|
||||
" S s.N.O.I + S ",
|
||||
" S P.+ Q.r + S ",
|
||||
" S ~ R.r 9 S ",
|
||||
" S S.s.[ P. S ",
|
||||
" S S S S T.U.S S S S S S S S S S S S ",
|
||||
" ",
|
||||
" "};
|
||||
213
Extras/MayaPlugin/icons/dynamicaCreateHingeConstraint.xpm
Normal file
213
Extras/MayaPlugin/icons/dynamicaCreateHingeConstraint.xpm
Normal file
@@ -0,0 +1,213 @@
|
||||
/* XPM */
|
||||
static char * dynamicaCreatePinConstraint_xpm[] = {
|
||||
"32 32 178 2",
|
||||
" c #B1B1B1",
|
||||
". c #A8A8A8",
|
||||
"+ c #A5A5A5",
|
||||
"@ c #718172",
|
||||
"# c #6D866F",
|
||||
"$ c #999999",
|
||||
"% c #9B9B9B",
|
||||
"& c #7B9B7E",
|
||||
"* c #77CF80",
|
||||
"= c #69846C",
|
||||
"- c #8F8F8F",
|
||||
"; c #989898",
|
||||
"> c #82A185",
|
||||
", c #88EC91",
|
||||
"' c #57DD63",
|
||||
") c #529C59",
|
||||
"! c #878787",
|
||||
"~ c #A2A2A2",
|
||||
"{ c #949494",
|
||||
"] c #88AA8B",
|
||||
"^ c #8EED97",
|
||||
"/ c #58E465",
|
||||
"( c #23DC34",
|
||||
"_ c #30B33C",
|
||||
": c #667A68",
|
||||
"< c #959595",
|
||||
"[ c #9E9E9E",
|
||||
"} c #757C76",
|
||||
"| c #9BD9A1",
|
||||
"1 c #87EC90",
|
||||
"2 c #4BE259",
|
||||
"3 c #17DA29",
|
||||
"4 c #04D718",
|
||||
"5 c #13C624",
|
||||
"6 c #528C57",
|
||||
"7 c #8B8B8B",
|
||||
"8 c #A9A9A9",
|
||||
"9 c #A6A6A6",
|
||||
"0 c #717371",
|
||||
"a c #99CB9E",
|
||||
"b c #9BEFA3",
|
||||
"c c #6FE87A",
|
||||
"d c #30DE40",
|
||||
"e c #09D71C",
|
||||
"f c #00D614",
|
||||
"g c #33A73E",
|
||||
"h c #8E8E8E",
|
||||
"i c #93BB97",
|
||||
"j c #A3F0AA",
|
||||
"k c #82EB8C",
|
||||
"l c #49E257",
|
||||
"m c #15D927",
|
||||
"n c #01D615",
|
||||
"o c #28B235",
|
||||
"p c #419B49",
|
||||
"q c #508D56",
|
||||
"r c #9F9F9F",
|
||||
"s c #89A68C",
|
||||
"t c #A6F1AD",
|
||||
"u c #8DED96",
|
||||
"v c #59E466",
|
||||
"w c #21DB32",
|
||||
"x c #24B532",
|
||||
"y c #858585",
|
||||
"z c #969696",
|
||||
"A c #929292",
|
||||
"B c #809281",
|
||||
"C c #A7EBAD",
|
||||
"D c #94EE9C",
|
||||
"E c #67E773",
|
||||
"F c #2DDD3D",
|
||||
"G c #06D119",
|
||||
"H c #5E8061",
|
||||
"I c #A0A0A0",
|
||||
"J c #919191",
|
||||
"K c #8A8A8A",
|
||||
"L c #778278",
|
||||
"M c #A0E2A6",
|
||||
"N c #99EFA1",
|
||||
"O c #73E87E",
|
||||
"P c #3BDF4A",
|
||||
"Q c #10D923",
|
||||
"R c #36A441",
|
||||
"S c #BE0000",
|
||||
"T c #A20000",
|
||||
"U c #7C1D14",
|
||||
"V c #88744E",
|
||||
"W c #877D52",
|
||||
"X c #8B8F5F",
|
||||
"Y c #95CA89",
|
||||
"Z c #77E982",
|
||||
"` c #46E155",
|
||||
" . c #03D617",
|
||||
".. c #13C424",
|
||||
"+. c #69766B",
|
||||
"@. c #AAAAAA",
|
||||
"#. c #747D74",
|
||||
"$. c #94D79B",
|
||||
"%. c #86EC8F",
|
||||
"&. c #7EEA88",
|
||||
"*. c #6DE878",
|
||||
"=. c #47E155",
|
||||
"-. c #1CDB2E",
|
||||
";. c #4C9053",
|
||||
">. c #75C27C",
|
||||
",. c #7AEA84",
|
||||
"'. c #74E97F",
|
||||
"). c #68E774",
|
||||
"!. c #5AE467",
|
||||
"~. c #4CE25A",
|
||||
"{. c #38DF48",
|
||||
"]. c #1DDB2F",
|
||||
"^. c #07D71A",
|
||||
"/. c #23B631",
|
||||
"(. c #848484",
|
||||
"_. c #66896A",
|
||||
":. c #49C955",
|
||||
"<. c #35DF45",
|
||||
"[. c #2BDD3C",
|
||||
"}. c #22DB33",
|
||||
"|. c #1ADA2C",
|
||||
"1. c #11D924",
|
||||
"2. c #09CE1C",
|
||||
"3. c #5D8160",
|
||||
"4. c #69786A",
|
||||
"5. c #32B03E",
|
||||
"6. c #02D616",
|
||||
"7. c #2BAF37",
|
||||
"8. c #898989",
|
||||
"9. c #A4A4A4",
|
||||
"0. c #7F7F7F",
|
||||
"a. c #399141",
|
||||
"b. c #06D019",
|
||||
"c. c #24B631",
|
||||
"d. c #A7A7A7",
|
||||
"e. c #AFAFAF",
|
||||
"f. c #BDBDBD",
|
||||
"g. c #528156",
|
||||
"h. c #12C223",
|
||||
"i. c #14C424",
|
||||
"j. c #6C746C",
|
||||
"k. c #AEAEAE",
|
||||
"l. c #EBEBEB",
|
||||
"m. c #F4F4F4",
|
||||
"n. c #C2C2C2",
|
||||
"o. c #697A6A",
|
||||
"p. c #26AE33",
|
||||
"q. c #09CE1B",
|
||||
"r. c #627D64",
|
||||
"s. c #A3A3A3",
|
||||
"t. c #C7C7C7",
|
||||
"u. c #FCFCFC",
|
||||
"v. c #E6E6E6",
|
||||
"w. c #DFDFDF",
|
||||
"x. c #409C48",
|
||||
"y. c #04D217",
|
||||
"z. c #6E726F",
|
||||
"A. c #B0B0B0",
|
||||
"B. c #F8F8F8",
|
||||
"C. c #8D8D8D",
|
||||
"D. c #528B57",
|
||||
"E. c #1BA610",
|
||||
"F. c #5B835F",
|
||||
"G. c #DDDDDD",
|
||||
"H. c #EAEAEA",
|
||||
"I. c #880000",
|
||||
"J. c #B5B5B5",
|
||||
"K. c #DEDEDE",
|
||||
"L. c #E9E9E9",
|
||||
"M. c #A1A1A1",
|
||||
"N. c #CACACA",
|
||||
"O. c #DCDCDC",
|
||||
"P. c #ACACAC",
|
||||
"Q. c #D8D8D8",
|
||||
"R. c #C6C6C6",
|
||||
"S. c #ADADAD",
|
||||
"T. c #BA0000",
|
||||
"U. c #BB0000",
|
||||
" ",
|
||||
" . + ",
|
||||
" . @ # $ ",
|
||||
" % & * = - ",
|
||||
" ; > , ' ) ! ~ ",
|
||||
" { ] ^ / ( _ : < ",
|
||||
" [ } | 1 2 3 4 5 6 7 8 ",
|
||||
" 9 0 a b c d e f f f g h ",
|
||||
" 7 i j k l m n f o p q r ",
|
||||
" h s t u v w 4 f x y z r ",
|
||||
" A B C D E F e f G H I ",
|
||||
" 8 J - K L M N O P Q n f R h ",
|
||||
" S S S S S S S S T U V W X Y D Z ` 3 .f ..+.@. ",
|
||||
" S I #.$.N ^ %.&.*.=.-.4 f f ;.z ",
|
||||
" S y >.,.'.).!.~.{.].^.f f /.(. ",
|
||||
" S I _.:.<.[.}.|.1.^.n f 2.3.r ",
|
||||
" S ; 4.5.^.4 4 6.n f f 7.8. ",
|
||||
" S 9.0.a.b.f f f f f c.y ",
|
||||
" S d.e.f.g.h.f f f f i.j.k. ",
|
||||
" S e.; l.m.n.o.p.f f f q.r.8 ",
|
||||
" S s.t.u.v.w.; (.x.y.f /.z.A. ",
|
||||
" S @.~ B.v.w.9 9.A.C.D.E.F.r ",
|
||||
" S r G.H.w.9.9. $ I.$ ",
|
||||
" S + J.m.K.s.9. S ",
|
||||
" S k.$ L.G.M.9. S ",
|
||||
" S s.N.O.I + S ",
|
||||
" S P.+ Q.r + S ",
|
||||
" S ~ R.r 9 S ",
|
||||
" S S.s.[ P. S ",
|
||||
" S S S S T.U.S S S S S S S S S S S S ",
|
||||
" ",
|
||||
" "};
|
||||
213
Extras/MayaPlugin/icons/dynamicaCreateSliderConstraint.xpm
Normal file
213
Extras/MayaPlugin/icons/dynamicaCreateSliderConstraint.xpm
Normal file
@@ -0,0 +1,213 @@
|
||||
/* XPM */
|
||||
static char * dynamicaCreatePinConstraint_xpm[] = {
|
||||
"32 32 178 2",
|
||||
" c #B1B1B1",
|
||||
". c #A8A8A8",
|
||||
"+ c #A5A5A5",
|
||||
"@ c #718172",
|
||||
"# c #6D866F",
|
||||
"$ c #999999",
|
||||
"% c #9B9B9B",
|
||||
"& c #7B9B7E",
|
||||
"* c #77CF80",
|
||||
"= c #69846C",
|
||||
"- c #8F8F8F",
|
||||
"; c #989898",
|
||||
"> c #82A185",
|
||||
", c #88EC91",
|
||||
"' c #57DD63",
|
||||
") c #529C59",
|
||||
"! c #878787",
|
||||
"~ c #A2A2A2",
|
||||
"{ c #949494",
|
||||
"] c #88AA8B",
|
||||
"^ c #8EED97",
|
||||
"/ c #58E465",
|
||||
"( c #23DC34",
|
||||
"_ c #30B33C",
|
||||
": c #667A68",
|
||||
"< c #959595",
|
||||
"[ c #9E9E9E",
|
||||
"} c #757C76",
|
||||
"| c #9BD9A1",
|
||||
"1 c #87EC90",
|
||||
"2 c #4BE259",
|
||||
"3 c #17DA29",
|
||||
"4 c #04D718",
|
||||
"5 c #13C624",
|
||||
"6 c #528C57",
|
||||
"7 c #8B8B8B",
|
||||
"8 c #A9A9A9",
|
||||
"9 c #A6A6A6",
|
||||
"0 c #717371",
|
||||
"a c #99CB9E",
|
||||
"b c #9BEFA3",
|
||||
"c c #6FE87A",
|
||||
"d c #30DE40",
|
||||
"e c #09D71C",
|
||||
"f c #00D614",
|
||||
"g c #33A73E",
|
||||
"h c #8E8E8E",
|
||||
"i c #93BB97",
|
||||
"j c #A3F0AA",
|
||||
"k c #82EB8C",
|
||||
"l c #49E257",
|
||||
"m c #15D927",
|
||||
"n c #01D615",
|
||||
"o c #28B235",
|
||||
"p c #419B49",
|
||||
"q c #508D56",
|
||||
"r c #9F9F9F",
|
||||
"s c #89A68C",
|
||||
"t c #A6F1AD",
|
||||
"u c #8DED96",
|
||||
"v c #59E466",
|
||||
"w c #21DB32",
|
||||
"x c #24B532",
|
||||
"y c #858585",
|
||||
"z c #969696",
|
||||
"A c #929292",
|
||||
"B c #809281",
|
||||
"C c #A7EBAD",
|
||||
"D c #94EE9C",
|
||||
"E c #67E773",
|
||||
"F c #2DDD3D",
|
||||
"G c #06D119",
|
||||
"H c #5E8061",
|
||||
"I c #A0A0A0",
|
||||
"J c #919191",
|
||||
"K c #8A8A8A",
|
||||
"L c #778278",
|
||||
"M c #A0E2A6",
|
||||
"N c #99EFA1",
|
||||
"O c #73E87E",
|
||||
"P c #3BDF4A",
|
||||
"Q c #10D923",
|
||||
"R c #36A441",
|
||||
"S c #BE0000",
|
||||
"T c #A20000",
|
||||
"U c #7C1D14",
|
||||
"V c #88744E",
|
||||
"W c #877D52",
|
||||
"X c #8B8F5F",
|
||||
"Y c #95CA89",
|
||||
"Z c #77E982",
|
||||
"` c #46E155",
|
||||
" . c #03D617",
|
||||
".. c #13C424",
|
||||
"+. c #69766B",
|
||||
"@. c #AAAAAA",
|
||||
"#. c #747D74",
|
||||
"$. c #94D79B",
|
||||
"%. c #86EC8F",
|
||||
"&. c #7EEA88",
|
||||
"*. c #6DE878",
|
||||
"=. c #47E155",
|
||||
"-. c #1CDB2E",
|
||||
";. c #4C9053",
|
||||
">. c #75C27C",
|
||||
",. c #7AEA84",
|
||||
"'. c #74E97F",
|
||||
"). c #68E774",
|
||||
"!. c #5AE467",
|
||||
"~. c #4CE25A",
|
||||
"{. c #38DF48",
|
||||
"]. c #1DDB2F",
|
||||
"^. c #07D71A",
|
||||
"/. c #23B631",
|
||||
"(. c #848484",
|
||||
"_. c #66896A",
|
||||
":. c #49C955",
|
||||
"<. c #35DF45",
|
||||
"[. c #2BDD3C",
|
||||
"}. c #22DB33",
|
||||
"|. c #1ADA2C",
|
||||
"1. c #11D924",
|
||||
"2. c #09CE1C",
|
||||
"3. c #5D8160",
|
||||
"4. c #69786A",
|
||||
"5. c #32B03E",
|
||||
"6. c #02D616",
|
||||
"7. c #2BAF37",
|
||||
"8. c #898989",
|
||||
"9. c #A4A4A4",
|
||||
"0. c #7F7F7F",
|
||||
"a. c #399141",
|
||||
"b. c #06D019",
|
||||
"c. c #24B631",
|
||||
"d. c #A7A7A7",
|
||||
"e. c #AFAFAF",
|
||||
"f. c #BDBDBD",
|
||||
"g. c #528156",
|
||||
"h. c #12C223",
|
||||
"i. c #14C424",
|
||||
"j. c #6C746C",
|
||||
"k. c #AEAEAE",
|
||||
"l. c #EBEBEB",
|
||||
"m. c #F4F4F4",
|
||||
"n. c #C2C2C2",
|
||||
"o. c #697A6A",
|
||||
"p. c #26AE33",
|
||||
"q. c #09CE1B",
|
||||
"r. c #627D64",
|
||||
"s. c #A3A3A3",
|
||||
"t. c #C7C7C7",
|
||||
"u. c #FCFCFC",
|
||||
"v. c #E6E6E6",
|
||||
"w. c #DFDFDF",
|
||||
"x. c #409C48",
|
||||
"y. c #04D217",
|
||||
"z. c #6E726F",
|
||||
"A. c #B0B0B0",
|
||||
"B. c #F8F8F8",
|
||||
"C. c #8D8D8D",
|
||||
"D. c #528B57",
|
||||
"E. c #1BA610",
|
||||
"F. c #5B835F",
|
||||
"G. c #DDDDDD",
|
||||
"H. c #EAEAEA",
|
||||
"I. c #880000",
|
||||
"J. c #B5B5B5",
|
||||
"K. c #DEDEDE",
|
||||
"L. c #E9E9E9",
|
||||
"M. c #A1A1A1",
|
||||
"N. c #CACACA",
|
||||
"O. c #DCDCDC",
|
||||
"P. c #ACACAC",
|
||||
"Q. c #D8D8D8",
|
||||
"R. c #C6C6C6",
|
||||
"S. c #ADADAD",
|
||||
"T. c #BA0000",
|
||||
"U. c #BB0000",
|
||||
" ",
|
||||
" . + ",
|
||||
" . @ # $ ",
|
||||
" % & * = - ",
|
||||
" ; > , ' ) ! ~ ",
|
||||
" { ] ^ / ( _ : < ",
|
||||
" [ } | 1 2 3 4 5 6 7 8 ",
|
||||
" 9 0 a b c d e f f f g h ",
|
||||
" 7 i j k l m n f o p q r ",
|
||||
" h s t u v w 4 f x y z r ",
|
||||
" A B C D E F e f G H I ",
|
||||
" 8 J - K L M N O P Q n f R h ",
|
||||
" S S S S S S S S T U V W X Y D Z ` 3 .f ..+.@. ",
|
||||
" S I #.$.N ^ %.&.*.=.-.4 f f ;.z ",
|
||||
" S y >.,.'.).!.~.{.].^.f f /.(. ",
|
||||
" S I _.:.<.[.}.|.1.^.n f 2.3.r ",
|
||||
" S ; 4.5.^.4 4 6.n f f 7.8. ",
|
||||
" S 9.0.a.b.f f f f f c.y ",
|
||||
" S d.e.f.g.h.f f f f i.j.k. ",
|
||||
" S e.; l.m.n.o.p.f f f q.r.8 ",
|
||||
" S s.t.u.v.w.; (.x.y.f /.z.A. ",
|
||||
" S @.~ B.v.w.9 9.A.C.D.E.F.r ",
|
||||
" S r G.H.w.9.9. $ I.$ ",
|
||||
" S + J.m.K.s.9. S ",
|
||||
" S k.$ L.G.M.9. S ",
|
||||
" S s.N.O.I + S ",
|
||||
" S P.+ Q.r + S ",
|
||||
" S ~ R.r 9 S ",
|
||||
" S S.s.[ P. S ",
|
||||
" S S S S T.U.S S S S S S S S S S S S ",
|
||||
" ",
|
||||
" "};
|
||||
@@ -1,4 +1,3 @@
|
||||
xcopy /S /Y /C /I /h bin\*.* "C:\Program Files\Autodesk\Maya2008\bin"
|
||||
xcopy /S /Y /C /I /h icons\*.* "C:\Program Files\Autodesk\Maya2008\icons"
|
||||
xcopy /S /Y /C /I /h mvl\*.* "C:\Program Files\Autodesk\Maya2008\mvl"
|
||||
xcopy /S /Y /C /I /h scripts\*.* "C:\Program Files\Autodesk\Maya2008\scripts"
|
||||
xcopy /S /Y /C /I /h icons\*.xpm "C:\Program Files\Autodesk\Maya2008\icons"
|
||||
xcopy /S /Y /C /I /h scripts\*.mel "C:\Program Files\Autodesk\Maya2008\scripts"
|
||||
xcopy /S /Y /C /I /h BulletMayaPluginDebug.mll "C:\Program Files\Autodesk\Maya2008\bin\plug-ins"
|
||||
|
||||
@@ -29,12 +29,18 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#include "rigidBodyNode.h"
|
||||
#include "rigidBodyArrayNode.h"
|
||||
#include "collisionShapeNode.h"
|
||||
#include "nailConstraintNode.h"
|
||||
#include "constraint/nailConstraintNode.h"
|
||||
#include "constraint/hingeConstraintNode.h"
|
||||
#include "constraint/sliderConstraintNode.h"
|
||||
#include "constraint/sixdofConstraintNode.h"
|
||||
#include "dSolverNode.h"
|
||||
#include "dSolverCmd.h"
|
||||
#include "dRigidBodyCmd.h"
|
||||
#include "dRigidBodyArrayCmd.h"
|
||||
#include "dNailConstraintCmd.h"
|
||||
#include "constraint/dNailConstraintCmd.h"
|
||||
#include "constraint/dHingeConstraintCmd.h"
|
||||
#include "constraint/dSliderConstraintCmd.h"
|
||||
#include "constraint/dSixdofConstraintCmd.h"
|
||||
#include "mvl/util.h"
|
||||
#include "colladaExport.h"
|
||||
|
||||
@@ -51,7 +57,7 @@ const char *const colladaDefaultOptions =
|
||||
MStatus initializePlugin( MObject obj )
|
||||
{
|
||||
MStatus status;
|
||||
MFnPlugin plugin( obj, "Walt Disney Feature Animation", "2.73", "Any");
|
||||
MFnPlugin plugin( obj, "Walt Disney Feature Animation", "2.75", "Any");
|
||||
|
||||
solver_t::initialize();
|
||||
|
||||
@@ -97,8 +103,31 @@ MStatus initializePlugin( MObject obj )
|
||||
MCHECKSTATUS(status, "registering nailConstraintNode")
|
||||
MDGMessage::addNodeRemovedCallback(nailConstraintNode::nodeRemoved, nailConstraintNode::typeName);
|
||||
|
||||
|
||||
//
|
||||
status = plugin.registerNode( hingeConstraintNode::typeName, hingeConstraintNode::typeId,
|
||||
hingeConstraintNode::creator,
|
||||
hingeConstraintNode::initialize,
|
||||
MPxNode::kLocatorNode );
|
||||
MCHECKSTATUS(status, "registering hingeConstraintNode")
|
||||
MDGMessage::addNodeRemovedCallback(hingeConstraintNode::nodeRemoved, hingeConstraintNode::typeName);
|
||||
|
||||
//
|
||||
status = plugin.registerNode( sliderConstraintNode::typeName, sliderConstraintNode::typeId,
|
||||
sliderConstraintNode::creator,
|
||||
sliderConstraintNode::initialize,
|
||||
MPxNode::kLocatorNode );
|
||||
MCHECKSTATUS(status, "registering sliderConstraintNode")
|
||||
MDGMessage::addNodeRemovedCallback(sliderConstraintNode::nodeRemoved, sliderConstraintNode::typeName);
|
||||
|
||||
//
|
||||
status = plugin.registerNode( sixdofConstraintNode::typeName, sixdofConstraintNode::typeId,
|
||||
sixdofConstraintNode::creator,
|
||||
sixdofConstraintNode::initialize,
|
||||
MPxNode::kLocatorNode );
|
||||
MCHECKSTATUS(status, "registering sixdofConstraintNode")
|
||||
MDGMessage::addNodeRemovedCallback(sixdofConstraintNode::nodeRemoved, sixdofConstraintNode::typeName);
|
||||
|
||||
//
|
||||
status = plugin.registerNode( dSolverNode::typeName, dSolverNode::typeId,
|
||||
dSolverNode::creator,
|
||||
dSolverNode::initialize,
|
||||
@@ -126,7 +155,22 @@ MStatus initializePlugin( MObject obj )
|
||||
dNailConstraintCmd::syntax);
|
||||
MCHECKSTATUS(status, "registering dNailConstraintCmd")
|
||||
|
||||
MGlobal::executeCommand( "source dynamicaUI.mel" );
|
||||
status = plugin.registerCommand( dHingeConstraintCmd::typeName,
|
||||
dHingeConstraintCmd::creator,
|
||||
dHingeConstraintCmd::syntax);
|
||||
MCHECKSTATUS(status, "registering dHingeConstraintCmd")
|
||||
|
||||
status = plugin.registerCommand( dSliderConstraintCmd::typeName,
|
||||
dSliderConstraintCmd::creator,
|
||||
dSliderConstraintCmd::syntax);
|
||||
MCHECKSTATUS(status, "registering dSliderConstraintCmd")
|
||||
|
||||
status = plugin.registerCommand( dSixdofConstraintCmd::typeName,
|
||||
dSixdofConstraintCmd::creator,
|
||||
dSixdofConstraintCmd::syntax);
|
||||
MCHECKSTATUS(status, "registering dSixdofConstraintCmd")
|
||||
|
||||
MGlobal::executeCommand( "source dynamicaUI.mel" );
|
||||
MGlobal::executeCommand( "dynamicaUI_initialize" );
|
||||
|
||||
return status;
|
||||
@@ -140,7 +184,13 @@ MStatus uninitializePlugin( MObject obj )
|
||||
status = plugin.deregisterCommand(dNailConstraintCmd::typeName);
|
||||
MCHECKSTATUS(status, "deregistering dNailConstraintCmd")
|
||||
|
||||
status = plugin.deregisterCommand(dRigidBodyArrayCmd::typeName);
|
||||
status = plugin.deregisterCommand(dHingeConstraintCmd::typeName);
|
||||
MCHECKSTATUS(status, "deregistering dHingeConstraintCmd")
|
||||
|
||||
status = plugin.deregisterCommand(dSliderConstraintCmd::typeName);
|
||||
MCHECKSTATUS(status, "deregistering dSliderConstraintCmd")
|
||||
|
||||
status = plugin.deregisterCommand(dRigidBodyArrayCmd::typeName);
|
||||
MCHECKSTATUS(status, "deregistering dRigidBodyArrayCmd")
|
||||
|
||||
status = plugin.deregisterCommand(dRigidBodyCmd::typeName);
|
||||
@@ -155,7 +205,16 @@ MStatus uninitializePlugin( MObject obj )
|
||||
status = plugin.deregisterNode(nailConstraintNode::typeId);
|
||||
MCHECKSTATUS(status, "deregistering nailConstraintNode")
|
||||
|
||||
status = plugin.deregisterNode(collisionShapeNode::typeId);
|
||||
status = plugin.deregisterNode(hingeConstraintNode::typeId);
|
||||
MCHECKSTATUS(status, "deregistering hingeConstraintNode")
|
||||
|
||||
status = plugin.deregisterNode(sliderConstraintNode::typeId);
|
||||
MCHECKSTATUS(status, "deregistering sliderConstraintNode")
|
||||
|
||||
status = plugin.deregisterNode(sixdofConstraintNode::typeId);
|
||||
MCHECKSTATUS(status, "deregistering sixdofConstraintNode")
|
||||
|
||||
status = plugin.deregisterNode(collisionShapeNode::typeId);
|
||||
MCHECKSTATUS(status, "deregistering collisionShapeNode")
|
||||
|
||||
status = plugin.deregisterNode(rigidBodyArrayNode::typeId);
|
||||
|
||||
@@ -470,6 +470,13 @@ void rigidBodyNode::computeWorldMatrix(const MPlug& plug, MDataBlock& data)
|
||||
m_rigid_body->set_transform(vec3f(mtranslation.x, mtranslation.y, mtranslation.z),
|
||||
quatf(mrotation.w, mrotation.x, mrotation.y, mrotation.z));
|
||||
|
||||
if(pos[0] != float(mtranslation.x) ||
|
||||
pos[1] != float(mtranslation.y) ||
|
||||
pos[2] != float(mtranslation.z))
|
||||
{
|
||||
m_rigid_body->update_constraint();
|
||||
}
|
||||
|
||||
data.setClean(plug);
|
||||
|
||||
//set the scale to the collision shape
|
||||
|
||||
@@ -67,6 +67,10 @@ public:
|
||||
void apply_central_force(vec3f const& f) { m_impl->apply_central_force(f); }
|
||||
void apply_torque(vec3f const& t) { m_impl->apply_torque(t); }
|
||||
|
||||
void update_constraint() { m_impl->update_constraint(); }
|
||||
void add_constraint(bt_constraint_t* constraint) { m_impl->add_constraint(constraint); }
|
||||
void remove_constraint(bt_constraint_t* constraint) { m_impl->remove_constraint(constraint); }
|
||||
|
||||
public:
|
||||
virtual ~rigid_body_t() {};
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#define DYN_RIGID_BODY_IMPL_H
|
||||
|
||||
#include "mathUtils.h"
|
||||
#include "constraint/bt_constraint.h"
|
||||
|
||||
class rigid_body_impl_t
|
||||
{
|
||||
@@ -55,6 +56,10 @@ public:
|
||||
virtual void apply_central_force(vec3f const& f) = 0;
|
||||
virtual void apply_torque(vec3f const& t) = 0;
|
||||
|
||||
virtual void update_constraint() = 0;
|
||||
virtual void add_constraint(bt_constraint_t* constraint) = 0;
|
||||
virtual void remove_constraint(bt_constraint_t* constraint) = 0;
|
||||
|
||||
public:
|
||||
virtual ~rigid_body_impl_t() {};
|
||||
};
|
||||
|
||||
197
Extras/MayaPlugin/scenes/pointConstraint.ma
Normal file
197
Extras/MayaPlugin/scenes/pointConstraint.ma
Normal file
@@ -0,0 +1,197 @@
|
||||
//Maya ASCII 2008 scene
|
||||
//Name: pointConstraint.ma
|
||||
//Last modified: Wed, May 06, 2009 12:39:07 PM
|
||||
//Codeset: 1252
|
||||
requires maya "2008";
|
||||
requires "BulletMayaPlugin" "2.73";
|
||||
currentUnit -l centimeter -a degree -t film;
|
||||
fileInfo "application" "maya";
|
||||
fileInfo "product" "Maya Unlimited 2008";
|
||||
fileInfo "version" "2008";
|
||||
fileInfo "cutIdentifier" "200708022245-704165";
|
||||
fileInfo "osv" "Microsoft Windows XP Service Pack 2 (Build 2600)\n";
|
||||
createNode transform -s -n "persp";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 5.4310852522104263 10.227807249820351 8.9834453601726043 ;
|
||||
setAttr ".r" -type "double3" -36.938352729603878 18.200000000000443 0 ;
|
||||
createNode camera -s -n "perspShape" -p "persp";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".fl" 34.999999999999993;
|
||||
setAttr ".coi" 12.88344218879959;
|
||||
setAttr ".imn" -type "string" "persp";
|
||||
setAttr ".den" -type "string" "persp_depth";
|
||||
setAttr ".man" -type "string" "persp_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -p %camera";
|
||||
createNode transform -s -n "top";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 100.1 0 ;
|
||||
setAttr ".r" -type "double3" -89.999999999999986 0 0 ;
|
||||
createNode camera -s -n "topShape" -p "top";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "top";
|
||||
setAttr ".den" -type "string" "top_depth";
|
||||
setAttr ".man" -type "string" "top_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -t %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "front";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 0 100.1 ;
|
||||
createNode camera -s -n "frontShape" -p "front";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "front";
|
||||
setAttr ".den" -type "string" "front_depth";
|
||||
setAttr ".man" -type "string" "front_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -f %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "side";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 100.1 0 0 ;
|
||||
setAttr ".r" -type "double3" 0 89.999999999999986 0 ;
|
||||
createNode camera -s -n "sideShape" -p "side";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "side";
|
||||
setAttr ".den" -type "string" "side_depth";
|
||||
setAttr ".man" -type "string" "side_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -s %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -n "dRigidBody1";
|
||||
createNode dRigidBody -n "dRigidBodyShape1" -p "dRigidBody1";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".ma" 0;
|
||||
createNode transform -n "dRigidBody2";
|
||||
setAttr ".t" -type "double3" 0 2.3922815322875977 0 ;
|
||||
setAttr ".r" -type "double3" -1.5902777198834224e-015 -1.5902771511559264e-015 9.6200597810677602e-006 ;
|
||||
createNode dRigidBody -n "dRigidBodyShape2" -p "dRigidBody2";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".inpo" -type "float3" 0 2.3922815 0 ;
|
||||
setAttr ".inro" -type "float3" 0 0 9.6200602e-006 ;
|
||||
createNode transform -n "dRigidBody3";
|
||||
setAttr ".t" -type "double3" -1.1345885992050171 3.7411060333251953 0 ;
|
||||
setAttr ".r" -type "double3" -2.484861663096116e-017 4.9695900306853732e-017 -0.00061626089443063338 ;
|
||||
createNode dRigidBody -n "dRigidBodyShape3" -p "dRigidBody3";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".inpo" -type "float3" -1.1345886 3.741106 0 ;
|
||||
setAttr ".inro" -type "float3" 0 0 -0.00061626092 ;
|
||||
createNode transform -n "dNailConstraint1";
|
||||
setAttr ".t" -type "double3" 0.34766338361584892 4.4408998843332972 0 ;
|
||||
createNode dNailConstraint -n "dNailConstraintShape1" -p "dNailConstraint1";
|
||||
setAttr -k off ".v";
|
||||
createNode lightLinker -n "lightLinker1";
|
||||
setAttr -s 2 ".lnk";
|
||||
setAttr -s 2 ".slnk";
|
||||
createNode displayLayerManager -n "layerManager";
|
||||
createNode displayLayer -n "defaultLayer";
|
||||
createNode renderLayerManager -n "renderLayerManager";
|
||||
createNode renderLayer -n "defaultRenderLayer";
|
||||
setAttr ".g" yes;
|
||||
createNode dSolver -n "dSolver1";
|
||||
setAttr ".grvt" -type "float3" 1.4012985e-045 -9.8100004 0 ;
|
||||
createNode dCollisionShape -n "dCollisionShape1";
|
||||
setAttr ".tp" 6;
|
||||
createNode dCollisionShape -n "dCollisionShape2";
|
||||
setAttr ".tp" 4;
|
||||
createNode dCollisionShape -n "dCollisionShape3";
|
||||
setAttr ".tp" 4;
|
||||
createNode script -n "uiConfigurationScriptNode";
|
||||
setAttr ".b" -type "string" (
|
||||
"// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n"
|
||||
+ " -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n"
|
||||
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n"
|
||||
+ " -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n"
|
||||
+ " -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n"
|
||||
+ " -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
|
||||
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n"
|
||||
+ " -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n"
|
||||
+ " -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n"
|
||||
+ " -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n"
|
||||
+ " -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n"
|
||||
+ " -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n"
|
||||
+ " -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n"
|
||||
+ " -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n"
|
||||
+ " -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n"
|
||||
+ " -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" == $panelName) {\n"
|
||||
+ "\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n"
|
||||
+ " -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n"
|
||||
+ " -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"persp\" \n"
|
||||
+ " -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n"
|
||||
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n"
|
||||
+ " -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `outlinerPanel -unParent -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUnitlessCurves 1\n -showCompounds 1\n"
|
||||
+ " -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n"
|
||||
+ " -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"graphEditor\" -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 1\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
|
||||
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n"
|
||||
+ " -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 1\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
|
||||
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n"
|
||||
+ " -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dopeSheetPanel\" -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 0\n"
|
||||
+ " -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n"
|
||||
+ " -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n"
|
||||
+ " -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n"
|
||||
+ " -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"clipEditorPanel\" -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels `;\n"
|
||||
+ "\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"none\" \n -snapValue \"none\" \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"none\" \n -snapValue \"none\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n"
|
||||
+ "\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"hyperGraphPanel\" -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -zoom 1\n -animateTransition 0\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -iconSize \"smallIcons\" \n -showCachedConnections 0\n"
|
||||
+ " $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -zoom 1\n -animateTransition 0\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -iconSize \"smallIcons\" \n -showCachedConnections 0\n"
|
||||
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"hyperShadePanel\" -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"visorPanel\" -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Texture Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"polyTexturePlacementPanel\" -l (localizedPanelLabel(\"UV Texture Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Texture Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"multiListerPanel\" (localizedPanelLabel(\"Multilister\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"multiListerPanel\" -l (localizedPanelLabel(\"Multilister\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Multilister\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"renderWindowPanel\" -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"blendShapePanel\" (localizedPanelLabel(\"Blend Shape\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\tblendShapePanel -unParent -l (localizedPanelLabel(\"Blend Shape\")) -mbv $menusOkayInPanels ;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tblendShapePanel -edit -l (localizedPanelLabel(\"Blend Shape\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n"
|
||||
+ "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dynRelEdPanel\" -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"devicePanel\" (localizedPanelLabel(\"Devices\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\tdevicePanel -unParent -l (localizedPanelLabel(\"Devices\")) -mbv $menusOkayInPanels ;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tdevicePanel -edit -l (localizedPanelLabel(\"Devices\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
|
||||
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"relationshipPanel\" -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"referenceEditorPanel\" -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"componentEditorPanel\" (localizedPanelLabel(\"Component Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"componentEditorPanel\" -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dynPaintScriptedPanelType\" -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"webBrowserPanel\" (localizedPanelLabel(\"Web Browser\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"webBrowserPanel\" -l (localizedPanelLabel(\"Web Browser\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Web Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"scriptEditorPanel\" -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-defaultImage \"\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n"
|
||||
+ "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"wireframe\\\" \\n -activeOnly 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 1\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 8192\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -maxConstantTransparency 1\\n -rendererName \\\"base_OpenGL_Renderer\\\" \\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -shadows 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n"
|
||||
+ "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"wireframe\\\" \\n -activeOnly 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 1\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 8192\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -maxConstantTransparency 1\\n -rendererName \\\"base_OpenGL_Renderer\\\" \\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -shadows 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n"
|
||||
+ "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n setFocus `paneLayout -q -p1 $gMainPane`;\n sceneUIReplacement -deleteRemaining;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\n}\n");
|
||||
setAttr ".st" 3;
|
||||
createNode script -n "sceneConfigurationScriptNode";
|
||||
setAttr ".b" -type "string" "playbackOptions -min 1 -max 1000 -ast 1 -aet 1000 ";
|
||||
setAttr ".st" 6;
|
||||
select -ne :time1;
|
||||
setAttr ".o" 1;
|
||||
select -ne :renderPartition;
|
||||
setAttr -s 2 ".st";
|
||||
select -ne :renderGlobalsList1;
|
||||
select -ne :defaultShaderList1;
|
||||
setAttr -s 2 ".s";
|
||||
select -ne :postProcessList1;
|
||||
setAttr -s 2 ".p";
|
||||
select -ne :lightList1;
|
||||
select -ne :initialShadingGroup;
|
||||
setAttr ".ro" yes;
|
||||
select -ne :initialParticleSE;
|
||||
setAttr ".ro" yes;
|
||||
select -ne :hardwareRenderGlobals;
|
||||
setAttr ".ctrs" 256;
|
||||
setAttr ".btrs" 512;
|
||||
select -ne :defaultHardwareRenderGlobals;
|
||||
setAttr ".fn" -type "string" "im";
|
||||
setAttr ".res" -type "string" "ntsc_4d 646 485 1.333";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape1.solv";
|
||||
connectAttr "dCollisionShape1.oucs" "dRigidBodyShape1.incs";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape2.solv";
|
||||
connectAttr "dCollisionShape2.oucs" "dRigidBodyShape2.incs";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape3.solv";
|
||||
connectAttr "dCollisionShape3.oucs" "dRigidBodyShape3.incs";
|
||||
connectAttr "dRigidBodyShape3.msg" "dNailConstraintShape1.inrb";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[0].llnk";
|
||||
connectAttr ":initialShadingGroup.msg" "lightLinker1.lnk[0].olnk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[1].llnk";
|
||||
connectAttr ":initialParticleSE.msg" "lightLinker1.lnk[1].olnk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.slnk[0].sllk";
|
||||
connectAttr ":initialShadingGroup.msg" "lightLinker1.slnk[0].solk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.slnk[1].sllk";
|
||||
connectAttr ":initialParticleSE.msg" "lightLinker1.slnk[1].solk";
|
||||
connectAttr "layerManager.dli[0]" "defaultLayer.id";
|
||||
connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid";
|
||||
connectAttr ":time1.o" "dSolver1.it";
|
||||
connectAttr "lightLinker1.msg" ":lightList1.ln" -na;
|
||||
// End of pointConstraint.ma
|
||||
196
Extras/MayaPlugin/scenes/sliderConstraint.ma
Normal file
196
Extras/MayaPlugin/scenes/sliderConstraint.ma
Normal file
@@ -0,0 +1,196 @@
|
||||
//Maya ASCII 2008 scene
|
||||
//Name: sliderConstraint.ma
|
||||
//Last modified: Wed, May 06, 2009 12:45:51 PM
|
||||
//Codeset: 1252
|
||||
requires maya "2008";
|
||||
requires "BulletMayaPlugin" "2.73";
|
||||
currentUnit -l centimeter -a degree -t film;
|
||||
fileInfo "application" "maya";
|
||||
fileInfo "product" "Maya Unlimited 2008";
|
||||
fileInfo "version" "2008";
|
||||
fileInfo "cutIdentifier" "200708022245-704165";
|
||||
fileInfo "osv" "Microsoft Windows XP Service Pack 2 (Build 2600)\n";
|
||||
createNode transform -s -n "persp";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" -0.56341467921671107 10.723027971979135 23.053470331557246 ;
|
||||
setAttr ".r" -type "double3" -24.938352729602354 -1.3999999999999964 0 ;
|
||||
createNode camera -s -n "perspShape" -p "persp";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".fl" 34.999999999999993;
|
||||
setAttr ".coi" 25.431540639855051;
|
||||
setAttr ".imn" -type "string" "persp";
|
||||
setAttr ".den" -type "string" "persp_depth";
|
||||
setAttr ".man" -type "string" "persp_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -p %camera";
|
||||
createNode transform -s -n "top";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 100.1 0 ;
|
||||
setAttr ".r" -type "double3" -89.999999999999986 0 0 ;
|
||||
createNode camera -s -n "topShape" -p "top";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "top";
|
||||
setAttr ".den" -type "string" "top_depth";
|
||||
setAttr ".man" -type "string" "top_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -t %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "front";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 0 100.1 ;
|
||||
createNode camera -s -n "frontShape" -p "front";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "front";
|
||||
setAttr ".den" -type "string" "front_depth";
|
||||
setAttr ".man" -type "string" "front_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -f %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "side";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 100.1 0 0 ;
|
||||
setAttr ".r" -type "double3" 0 89.999999999999986 0 ;
|
||||
createNode camera -s -n "sideShape" -p "side";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "side";
|
||||
setAttr ".den" -type "string" "side_depth";
|
||||
setAttr ".man" -type "string" "side_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -s %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -n "dRigidBody1";
|
||||
setAttr ".t" -type "double3" -0.95629078149795532 4.8076047897338867 0 ;
|
||||
setAttr ".r" -type "double3" -1.895758319773386e-022 -7.9513867036587919e-016 -2.3696978997167325e-023 ;
|
||||
createNode dRigidBody -n "dRigidBodyShape1" -p "dRigidBody1";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".inpo" -type "float3" -0.95629078 4.8076048 0 ;
|
||||
createNode transform -n "dRigidBody2";
|
||||
setAttr ".t" -type "double3" 0.36419060826301575 4.8076047897338867 0 ;
|
||||
setAttr ".r" -type "double3" 5.6872749593201579e-022 3.975693351829396e-016 1.9731698772535437e-039 ;
|
||||
createNode dRigidBody -n "dRigidBodyShape2" -p "dRigidBody2";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".inpo" -type "float3" 0.36419061 4.8076048 0 ;
|
||||
createNode transform -n "dSliderConstraint1";
|
||||
setAttr ".t" -type "double3" 0 4.4119499147547163 0 ;
|
||||
createNode dSliderConstraint -n "dSliderConstraintShape1" -p "dSliderConstraint1";
|
||||
setAttr -k off ".v";
|
||||
createNode transform -n "dRigidBody3";
|
||||
createNode dRigidBody -n "dRigidBodyShape3" -p "dRigidBody3";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".ma" 0;
|
||||
createNode lightLinker -n "lightLinker1";
|
||||
setAttr -s 2 ".lnk";
|
||||
setAttr -s 2 ".slnk";
|
||||
createNode displayLayerManager -n "layerManager";
|
||||
createNode displayLayer -n "defaultLayer";
|
||||
createNode renderLayerManager -n "renderLayerManager";
|
||||
createNode renderLayer -n "defaultRenderLayer";
|
||||
setAttr ".g" yes;
|
||||
createNode dSolver -n "dSolver1";
|
||||
setAttr ".grvt" -type "float3" 1.4012985e-045 -9.8100004 0 ;
|
||||
createNode dCollisionShape -n "dCollisionShape1";
|
||||
setAttr ".tp" 4;
|
||||
createNode dCollisionShape -n "dCollisionShape2";
|
||||
setAttr ".tp" 4;
|
||||
createNode dCollisionShape -n "dCollisionShape3";
|
||||
setAttr ".tp" 6;
|
||||
createNode script -n "uiConfigurationScriptNode";
|
||||
setAttr ".b" -type "string" (
|
||||
"// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n"
|
||||
+ " -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n"
|
||||
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n"
|
||||
+ " -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n"
|
||||
+ " -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n"
|
||||
+ " -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
|
||||
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n"
|
||||
+ " -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n"
|
||||
+ " -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n"
|
||||
+ " -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n"
|
||||
+ " -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n"
|
||||
+ " -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n"
|
||||
+ " -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n"
|
||||
+ " -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n"
|
||||
+ " -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n"
|
||||
+ " -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" == $panelName) {\n"
|
||||
+ "\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `modelPanel -unParent -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n"
|
||||
+ " -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n"
|
||||
+ " -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -camera \"persp\" \n"
|
||||
+ " -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 8192\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -maxConstantTransparency 1\n -rendererName \"base_OpenGL_Renderer\" \n -colorResolution 256 256 \n"
|
||||
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nRigids 1\n"
|
||||
+ " -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -shadows 0\n $editorName;\nmodelEditor -e -viewSelected 0 $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `outlinerPanel -unParent -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels `;\n\t\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUnitlessCurves 1\n -showCompounds 1\n"
|
||||
+ " -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n outlinerEditor -e \n -showShapes 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n"
|
||||
+ " -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"graphEditor\" -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 1\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
|
||||
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n"
|
||||
+ " -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 1\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
|
||||
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n"
|
||||
+ " -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dopeSheetPanel\" -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -autoExpand 0\n"
|
||||
+ " -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n"
|
||||
+ " -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n"
|
||||
+ " -showMuteInfo 0\n -autoExpand 0\n -showDagOnly 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -sortOrder \"none\" \n"
|
||||
+ " -longNames 0\n -niceNames 1\n -showNamespace 1\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"clipEditorPanel\" -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels `;\n"
|
||||
+ "\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"none\" \n -snapValue \"none\" \n $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -autoFit 0\n -snapTime \"none\" \n -snapValue \"none\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n"
|
||||
+ "\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"hyperGraphPanel\" -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -zoom 1\n -animateTransition 0\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -iconSize \"smallIcons\" \n -showCachedConnections 0\n"
|
||||
+ " $editorName;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -zoom 1\n -animateTransition 0\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n -showConstraints 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -freeform 0\n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -iconSize \"smallIcons\" \n -showCachedConnections 0\n"
|
||||
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"hyperShadePanel\" -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"visorPanel\" -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Texture Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"polyTexturePlacementPanel\" -l (localizedPanelLabel(\"UV Texture Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Texture Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"multiListerPanel\" (localizedPanelLabel(\"Multilister\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"multiListerPanel\" -l (localizedPanelLabel(\"Multilister\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Multilister\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"renderWindowPanel\" -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"blendShapePanel\" (localizedPanelLabel(\"Blend Shape\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\tblendShapePanel -unParent -l (localizedPanelLabel(\"Blend Shape\")) -mbv $menusOkayInPanels ;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tblendShapePanel -edit -l (localizedPanelLabel(\"Blend Shape\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n"
|
||||
+ "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dynRelEdPanel\" -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"devicePanel\" (localizedPanelLabel(\"Devices\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\tdevicePanel -unParent -l (localizedPanelLabel(\"Devices\")) -mbv $menusOkayInPanels ;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tdevicePanel -edit -l (localizedPanelLabel(\"Devices\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
|
||||
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"relationshipPanel\" -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"referenceEditorPanel\" -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"componentEditorPanel\" (localizedPanelLabel(\"Component Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"componentEditorPanel\" -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"dynPaintScriptedPanelType\" -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"webBrowserPanel\" (localizedPanelLabel(\"Web Browser\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"webBrowserPanel\" -l (localizedPanelLabel(\"Web Browser\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Web Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" == $panelName) {\n\t\tif ($useSceneConfig) {\n\t\t\t$panelName = `scriptedPanel -unParent -type \"scriptEditorPanel\" -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels `;\n\t\t}\n\t} else {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-defaultImage \"\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n"
|
||||
+ "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"wireframe\\\" \\n -activeOnly 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 1\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 8192\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -maxConstantTransparency 1\\n -rendererName \\\"base_OpenGL_Renderer\\\" \\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -shadows 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n"
|
||||
+ "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"wireframe\\\" \\n -activeOnly 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 1\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 8192\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -maxConstantTransparency 1\\n -rendererName \\\"base_OpenGL_Renderer\\\" \\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -shadows 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName\"\n"
|
||||
+ "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n setFocus `paneLayout -q -p1 $gMainPane`;\n sceneUIReplacement -deleteRemaining;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\n}\n");
|
||||
setAttr ".st" 3;
|
||||
createNode script -n "sceneConfigurationScriptNode";
|
||||
setAttr ".b" -type "string" "playbackOptions -min 1 -max 1000 -ast 1 -aet 1000 ";
|
||||
setAttr ".st" 6;
|
||||
select -ne :time1;
|
||||
setAttr ".o" 1;
|
||||
select -ne :renderPartition;
|
||||
setAttr -s 2 ".st";
|
||||
select -ne :renderGlobalsList1;
|
||||
select -ne :defaultShaderList1;
|
||||
setAttr -s 2 ".s";
|
||||
select -ne :postProcessList1;
|
||||
setAttr -s 2 ".p";
|
||||
select -ne :lightList1;
|
||||
select -ne :initialShadingGroup;
|
||||
setAttr ".ro" yes;
|
||||
select -ne :initialParticleSE;
|
||||
setAttr ".ro" yes;
|
||||
select -ne :hardwareRenderGlobals;
|
||||
setAttr ".ctrs" 256;
|
||||
setAttr ".btrs" 512;
|
||||
select -ne :defaultHardwareRenderGlobals;
|
||||
setAttr ".fn" -type "string" "im";
|
||||
setAttr ".res" -type "string" "ntsc_4d 646 485 1.333";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape1.solv";
|
||||
connectAttr "dCollisionShape1.oucs" "dRigidBodyShape1.incs";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape2.solv";
|
||||
connectAttr "dCollisionShape2.oucs" "dRigidBodyShape2.incs";
|
||||
connectAttr "dRigidBodyShape1.msg" "dSliderConstraintShape1.inrbA";
|
||||
connectAttr "dRigidBodyShape2.msg" "dSliderConstraintShape1.inrbB";
|
||||
connectAttr "dSolver1.rbds" "dRigidBodyShape3.solv";
|
||||
connectAttr "dCollisionShape3.oucs" "dRigidBodyShape3.incs";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[0].llnk";
|
||||
connectAttr ":initialShadingGroup.msg" "lightLinker1.lnk[0].olnk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[1].llnk";
|
||||
connectAttr ":initialParticleSE.msg" "lightLinker1.lnk[1].olnk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.slnk[0].sllk";
|
||||
connectAttr ":initialShadingGroup.msg" "lightLinker1.slnk[0].solk";
|
||||
connectAttr ":defaultLightSet.msg" "lightLinker1.slnk[1].sllk";
|
||||
connectAttr ":initialParticleSE.msg" "lightLinker1.slnk[1].solk";
|
||||
connectAttr "layerManager.dli[0]" "defaultLayer.id";
|
||||
connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid";
|
||||
connectAttr ":time1.o" "dSolver1.it";
|
||||
connectAttr "lightLinker1.msg" ":lightList1.ln" -na;
|
||||
// End of sliderConstraint.ma
|
||||
52
Extras/MayaPlugin/scripts/AEdHingeConstraintTemplate.mel
Normal file
52
Extras/MayaPlugin/scripts/AEdHingeConstraintTemplate.mel
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//AEdHingeConstraintTemplate.mel
|
||||
|
||||
global proc AEdHingeConstraintTemplate( string $nodeName )
|
||||
{
|
||||
|
||||
editorTemplate -beginScrollLayout;
|
||||
|
||||
editorTemplate -addControl damping;
|
||||
editorTemplate -addControl inRigidBody;
|
||||
|
||||
editorTemplate -addControl lowerLimit;
|
||||
editorTemplate -addControl upperLimit;
|
||||
editorTemplate -addControl limitSoftness;
|
||||
editorTemplate -addControl biasFactor;
|
||||
editorTemplate -addControl relaxationFactor;
|
||||
|
||||
separator;
|
||||
|
||||
editorTemplate -addControl hingeAxis;
|
||||
editorTemplate -addControl enableAngularMotor;
|
||||
editorTemplate -addControl motorTargetVelocity;
|
||||
editorTemplate -addControl maxMotorImpulse;
|
||||
|
||||
AEdependNodeTemplate $nodeName;
|
||||
|
||||
editorTemplate -addExtraControls;
|
||||
editorTemplate -endScrollLayout;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Walt Disney Studios
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
@@ -17,36 +17,28 @@ would be appreciated but is not required.
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//bt_constraint.h
|
||||
//AEdSixdofConstraintTemplate.mel
|
||||
|
||||
#ifndef DYN_BT_CONSTRAINT_H
|
||||
#define DYN_BT_CONSTRAINT_H
|
||||
|
||||
#include "btBulletCollisionCommon.h"
|
||||
#include "btBulletDynamicsCommon.h"
|
||||
|
||||
class bt_constraint_t
|
||||
global proc AEdSixdofConstraintTemplate( string $nodeName )
|
||||
{
|
||||
public:
|
||||
|
||||
protected:
|
||||
friend class bt_solver_t;
|
||||
editorTemplate -beginScrollLayout;
|
||||
|
||||
bt_constraint_t() { }
|
||||
editorTemplate -addControl damping;
|
||||
editorTemplate -addControl inRigidBodyA;
|
||||
editorTemplate -addControl inRigidBodyB;
|
||||
editorTemplate -addControl lowerLinLimit;
|
||||
editorTemplate -addControl upperLinLimit;
|
||||
editorTemplate -addControl lowerAngLimit;
|
||||
editorTemplate -addControl upperAngLimit;
|
||||
|
||||
btTypedConstraint* constraint() { return m_constraint.get(); }
|
||||
void set_constraint(btTypedConstraint *constraint) { return m_constraint.reset(constraint); }
|
||||
AEdependNodeTemplate $nodeName;
|
||||
|
||||
public:
|
||||
friend class bt_rigid_body_t;
|
||||
editorTemplate -addExtraControls;
|
||||
editorTemplate -endScrollLayout;
|
||||
|
||||
virtual ~bt_constraint_t() { }
|
||||
}
|
||||
|
||||
protected:
|
||||
shared_ptr<btTypedConstraint> m_constraint;
|
||||
};
|
||||
|
||||
#endif
|
||||
44
Extras/MayaPlugin/scripts/AEdSliderConstraintTemplate.mel
Normal file
44
Extras/MayaPlugin/scripts/AEdSliderConstraintTemplate.mel
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Bullet Continuous Collision Detection and Physics Library Maya Plugin
|
||||
Copyright (c) 2008 Herbert Law
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty.
|
||||
In no event will the authors be held liable for any damages arising
|
||||
from the use of this software.
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it freely,
|
||||
subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must
|
||||
not claim that you wrote the original software. If you use this
|
||||
software in a product, an acknowledgment in the product documentation
|
||||
would be appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must
|
||||
not be misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Written by: Herbert Law <Herbert.Law@gmail.com>
|
||||
*/
|
||||
|
||||
//AEdSliderConstraintTemplate.mel
|
||||
|
||||
global proc AEdSliderConstraintTemplate( string $nodeName )
|
||||
{
|
||||
|
||||
editorTemplate -beginScrollLayout;
|
||||
|
||||
editorTemplate -addControl damping;
|
||||
editorTemplate -addControl inRigidBodyA;
|
||||
editorTemplate -addControl inRigidBodyB;
|
||||
editorTemplate -addControl lowerLinLimit;
|
||||
editorTemplate -addControl upperLinLimit;
|
||||
editorTemplate -addControl lowerAngLimit;
|
||||
editorTemplate -addControl upperAngLimit;
|
||||
|
||||
AEdependNodeTemplate $nodeName;
|
||||
|
||||
editorTemplate -addExtraControls;
|
||||
editorTemplate -endScrollLayout;
|
||||
|
||||
}
|
||||
|
||||
@@ -316,6 +316,19 @@ global proc string dynamicaUI_createMainTab()
|
||||
string $createNailConstraintBtn = `iconTextButton -style "iconAndTextVertical" -label "Nail"
|
||||
-width 100 -image1 "dynamicaCreateNailConstraint.xpm" -c ("dynamicaUI_createNailConstraint")
|
||||
-ann "Create a nail constraint"`;
|
||||
string $createHingeConstraintBtn = `iconTextButton -style "iconAndTextVertical" -label "Hinge"
|
||||
-width 100 -image1 "dynamicaCreateHingeConstraint.xpm" -c ("dynamicaUI_createHingeConstraint")
|
||||
-ann "Create a hinge constraint"`;
|
||||
string $createSliderConstraintBtn = `iconTextButton -style "iconAndTextVertical" -label "Slider"
|
||||
-width 100 -image1 "dynamicaCreateSliderConstraint.xpm" -c ("dynamicaUI_createSliderConstraint")
|
||||
-ann "Create a slider constraint"`;
|
||||
/* string $createConeTwistConstraintBtn = `iconTextButton -style "iconAndTextVertical" -label "ConeTwist"
|
||||
-width 100 -image1 "dynamicaCreateConeTwistConstraint.xpm" -c ("dynamicaUI_createConeTwistConstraint")
|
||||
-ann "Create a conetwist constraint"`;
|
||||
*/ string $create6DofConstraintBtn = `iconTextButton -style "iconAndTextVertical" -label "6Dof"
|
||||
-width 100 -image1 "dynamicaCreate6DofConstraint.xpm" -c ("dynamicaUI_create6DofConstraint")
|
||||
-ann "Create a 6dof constraint"`;
|
||||
|
||||
|
||||
|
||||
setParent ..;
|
||||
@@ -680,7 +693,6 @@ global proc dynamicaUI_createNailConstraint()
|
||||
dSolver;
|
||||
|
||||
string $newConstraints[];
|
||||
|
||||
for($i = 0; $i < size($selection) / 2; $i++) {
|
||||
if($selection[$i * 2 + 1] == "dRigidBody") {
|
||||
string $constraintNode = `dNailConstraint`;
|
||||
@@ -689,9 +701,73 @@ global proc dynamicaUI_createNailConstraint()
|
||||
$newConstraints[$i] = $constraintTransforms[0];
|
||||
}
|
||||
}
|
||||
|
||||
select -r $newConstraints;
|
||||
}
|
||||
global proc dynamicaUI_createHingeConstraint()
|
||||
{
|
||||
string $selection[] = `ls -selection -dag -leaf -showType -type "geometry"`;
|
||||
|
||||
//create dSolver node if necessary
|
||||
dSolver;
|
||||
|
||||
string $newConstraints[];
|
||||
for($i = 0; $i < size($selection) / 2; $i++) {
|
||||
if($selection[$i * 2 + 1] == "dRigidBody") {
|
||||
string $constraintNode = `dHingeConstraint`;
|
||||
connectAttr ($selection[$i * 2] + ".message") ($constraintNode + ".inRigidBody");
|
||||
string $constraintTransforms[] = `listRelatives -parent $constraintNode`;
|
||||
$newConstraints[$i] = $constraintTransforms[0];
|
||||
}
|
||||
}
|
||||
select -r $newConstraints;
|
||||
}
|
||||
global proc dynamicaUI_createSliderConstraint()
|
||||
{
|
||||
string $selection[] = `ls -selection -dag -leaf -showType -type "geometry"`;
|
||||
|
||||
//create dSolver node if necessary
|
||||
dSolver;
|
||||
|
||||
string $newConstraints[];
|
||||
if (size($selection) < 4)
|
||||
print("Requres 2 Rigid Body to create a Slider");
|
||||
for($i = 0; $i < size($selection) / 4; $i++) {
|
||||
if($selection[$i * 2 + 1] == "dRigidBody" && $selection[$i * 2 + 3] == "dRigidBody") {
|
||||
string $constraintNode = `dSliderConstraint`;
|
||||
connectAttr ($selection[$i * 2] + ".message") ($constraintNode + ".inRigidBodyA");
|
||||
connectAttr ($selection[$i * 2 + 2] + ".message") ($constraintNode + ".inRigidBodyB");
|
||||
string $constraintTransforms[] = `listRelatives -parent $constraintNode`;
|
||||
$newConstraints[$i] = $constraintTransforms[0];
|
||||
select -r $newConstraints;
|
||||
} else
|
||||
{
|
||||
print("Requres 2 Rigid Body to create a slider constraint");
|
||||
}
|
||||
}
|
||||
}
|
||||
global proc dynamicaUI_create6DofConstraint()
|
||||
{
|
||||
string $selection[] = `ls -selection -dag -leaf -showType -type "geometry"`;
|
||||
|
||||
//create dSolver node if necessary
|
||||
dSolver;
|
||||
|
||||
string $newConstraints[];
|
||||
if (size($selection) < 4)
|
||||
print("Requres 2 Rigid Body to create a 6Dof constraint");
|
||||
for($i = 0; $i < size($selection) / 4; $i++) {
|
||||
if($selection[$i * 2 + 1] == "dRigidBody" && $selection[$i * 2 + 3] == "dRigidBody") {
|
||||
string $constraintNode = `dSixdofConstraint`;
|
||||
connectAttr ($selection[$i * 2] + ".message") ($constraintNode + ".inRigidBodyA");
|
||||
connectAttr ($selection[$i * 2 + 2] + ".message") ($constraintNode + ".inRigidBodyB");
|
||||
string $constraintTransforms[] = `listRelatives -parent $constraintNode`;
|
||||
$newConstraints[$i] = $constraintTransforms[0];
|
||||
select -r $newConstraints;
|
||||
} else
|
||||
{
|
||||
print("Requres 2 Rigid Body to create a 6Dof constraint");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
global proc dyn_demo1()
|
||||
|
||||
@@ -89,7 +89,18 @@ nail_constraint_t::pointer solver_t::create_nail_constraint(rigid_body_t::point
|
||||
{
|
||||
return nail_constraint_t::pointer(new nail_constraint_t(m_impl->create_nail_constraint(rb->impl(), pivot), rb));
|
||||
}
|
||||
|
||||
hinge_constraint_t::pointer solver_t::create_hinge_constraint(rigid_body_t::pointer& rb, vec3f const& pivot)
|
||||
{
|
||||
return hinge_constraint_t::pointer(new hinge_constraint_t(m_impl->create_hinge_constraint(rb->impl(), pivot), rb));
|
||||
}
|
||||
slider_constraint_t::pointer solver_t::create_slider_constraint(rigid_body_t::pointer& rbA, vec3f const& pivotA, rigid_body_t::pointer& rbB, vec3f const& pivotB)
|
||||
{
|
||||
return slider_constraint_t::pointer(new slider_constraint_t(m_impl->create_slider_constraint(rbA->impl(), pivotA, rbB->impl(), pivotB), rbA, rbB));
|
||||
}
|
||||
sixdof_constraint_t::pointer solver_t::create_sixdof_constraint(rigid_body_t::pointer& rbA, vec3f const& pivotA, rigid_body_t::pointer& rbB, vec3f const& pivotB)
|
||||
{
|
||||
return sixdof_constraint_t::pointer(new sixdof_constraint_t(m_impl->create_sixdof_constraint(rbA->impl(), pivotA, rbB->impl(), pivotB), rbA, rbB));
|
||||
}
|
||||
|
||||
//add/remove from world
|
||||
void solver_t::add_rigid_body(rigid_body_t::pointer& rb)
|
||||
|
||||
@@ -38,9 +38,13 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#include "box_shape.h"
|
||||
#include "convex_hull_shape.h"
|
||||
#include "mesh_shape.h"
|
||||
#include "nail_constraint.h"
|
||||
#include "constraint/nail_constraint.h"
|
||||
#include "solver_impl.h"
|
||||
|
||||
#include "constraint/hinge_constraint.h"
|
||||
#include "constraint/slider_constraint.h"
|
||||
#include "constraint/sixdof_constraint.h"
|
||||
|
||||
class solver_t
|
||||
{
|
||||
public:
|
||||
@@ -65,6 +69,9 @@ public:
|
||||
static rigid_body_t::pointer create_rigid_body(collision_shape_t::pointer& cs);
|
||||
|
||||
static nail_constraint_t::pointer create_nail_constraint(rigid_body_t::pointer& rb, vec3f const& pivot = vec3f(0, 0, 0));
|
||||
static hinge_constraint_t::pointer create_hinge_constraint(rigid_body_t::pointer& rb, vec3f const& pivot = vec3f(0, 0, 0));
|
||||
static slider_constraint_t::pointer create_slider_constraint(rigid_body_t::pointer& rbA, vec3f const& pivotA, rigid_body_t::pointer& rbB, vec3f const& pivotB = vec3f(0, 0, 0));
|
||||
static sixdof_constraint_t::pointer create_sixdof_constraint(rigid_body_t::pointer& rbA, vec3f const& pivotA, rigid_body_t::pointer& rbB, vec3f const& pivotB = vec3f(0, 0, 0));
|
||||
|
||||
//add/remove from world
|
||||
static void add_rigid_body(rigid_body_t::pointer& rb);
|
||||
|
||||
@@ -26,9 +26,13 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#define DYN_SOLVER_IMPL_H
|
||||
|
||||
#include "rigid_body_impl.h"
|
||||
#include "nail_constraint_impl.h"
|
||||
#include "constraint/nail_constraint_impl.h"
|
||||
#include "collision_shape_impl.h"
|
||||
|
||||
#include "constraint/hinge_constraint_impl.h"
|
||||
#include "constraint/slider_constraint_impl.h"
|
||||
#include "constraint/sixdof_constraint_impl.h"
|
||||
|
||||
class solver_impl_t
|
||||
{
|
||||
public:
|
||||
@@ -49,6 +53,9 @@ public:
|
||||
virtual rigid_body_impl_t* create_rigid_body(collision_shape_impl_t* cs) = 0;
|
||||
|
||||
virtual nail_constraint_impl_t* create_nail_constraint(rigid_body_impl_t* rb, vec3f const& pivot) = 0;
|
||||
virtual hinge_constraint_impl_t* create_hinge_constraint(rigid_body_impl_t* rb, vec3f const& pivot) = 0;
|
||||
virtual slider_constraint_impl_t* create_slider_constraint(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB) = 0;
|
||||
virtual sixdof_constraint_impl_t* create_sixdof_constraint(rigid_body_impl_t* rbA, vec3f const& pivotA, rigid_body_impl_t* rbB, vec3f const& pivotB) = 0;
|
||||
|
||||
virtual void add_rigid_body(rigid_body_impl_t* rb) = 0;
|
||||
|
||||
|
||||
@@ -127,6 +127,29 @@ public:
|
||||
|
||||
}
|
||||
|
||||
void setAxis(btVector3& axisInA = btVector3(0, 1, 0))
|
||||
{
|
||||
btVector3 rbAxisA1, rbAxisA2;
|
||||
btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2);
|
||||
btVector3 pivotInA = m_rbAFrame.getOrigin();
|
||||
// m_rbAFrame.getOrigin() = pivotInA;
|
||||
m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
|
||||
rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
|
||||
rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
|
||||
|
||||
btVector3 axisInB = m_rbA.getCenterOfMassTransform().getBasis() * axisInA;
|
||||
|
||||
btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
|
||||
btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1);
|
||||
btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
|
||||
|
||||
|
||||
m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(pivotInA);
|
||||
m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
|
||||
rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
|
||||
rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
|
||||
}
|
||||
|
||||
btScalar getLowerLimit() const
|
||||
{
|
||||
return m_lowerLimit;
|
||||
@@ -143,8 +166,11 @@ public:
|
||||
void testLimit();
|
||||
|
||||
|
||||
const btTransform& getAFrame() { return m_rbAFrame; };
|
||||
const btTransform& getBFrame() { return m_rbBFrame; };
|
||||
const btTransform& getAFrame() const { return m_rbAFrame; };
|
||||
const btTransform& getBFrame() const { return m_rbBFrame; };
|
||||
|
||||
btTransform& getAFrame() { return m_rbAFrame; };
|
||||
btTransform& getBFrame() { return m_rbBFrame; };
|
||||
|
||||
inline int getSolveLimit()
|
||||
{
|
||||
|
||||
@@ -88,6 +88,22 @@ btSliderConstraint::btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const
|
||||
initParams();
|
||||
} // btSliderConstraint::btSliderConstraint()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static btRigidBody s_fixed(0, 0, 0);
|
||||
btSliderConstraint::btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB)
|
||||
: btTypedConstraint(SLIDER_CONSTRAINT_TYPE, s_fixed, rbB)
|
||||
,
|
||||
m_frameInB(frameInB),
|
||||
m_useLinearReferenceFrameA(useLinearReferenceFrameB),
|
||||
m_useSolveConstraintObsolete(false)
|
||||
// m_useSolveConstraintObsolete(true)
|
||||
{
|
||||
///not providing rigidbody B means implicitly using worldspace for body B
|
||||
// m_frameInA.getOrigin() = m_rbA.getCenterOfMassTransform()(m_frameInA.getOrigin());
|
||||
|
||||
initParams();
|
||||
} // btSliderConstraint::btSliderConstraint()
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void btSliderConstraint::buildJacobian()
|
||||
|
||||
@@ -126,6 +126,7 @@ protected:
|
||||
public:
|
||||
// constructors
|
||||
btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
|
||||
btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB);
|
||||
btSliderConstraint();
|
||||
// overrides
|
||||
virtual void buildJacobian();
|
||||
|
||||
@@ -171,9 +171,9 @@ class btAlignedObjectArray
|
||||
{
|
||||
int curSize = size();
|
||||
|
||||
if (newsize < size())
|
||||
if (newsize < curSize)
|
||||
{
|
||||
for(int i = curSize; i < newsize; i++)
|
||||
for(int i = newsize; i < curSize; i++)
|
||||
{
|
||||
m_data[i].~T();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user