Copyright (c) 2025
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Compatibility
-
2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008
Operating Systems
History
Created: | 09/25/2010 |
Last Modified: | 04/08/2016 |
File Size: | 6.34 KB |
Keywords
deformer, python API, python scripted plugin, contact deformation
Bugs (8 reported) Help make this item even better. Your bug reports are appreciated!
Date | Priority | Title | Status |
---|---|---|---|
04/13/2016 | high | MEL script error | Pending |
03/02/2011 | medium | distorted mesh | Pending |
10/30/2010 | high | Maya 2008 -Error attempting to save in C:...../Temp | Closed |
10/01/2010 | medium | Multiple Objects | Pending |
09/29/2010 | low | Maya2011(64bit) crashes | Closed |
09/26/2010 | low | Error: IndentationError: unexpected indent | Closed |
09/26/2010 | high | maya 2011 x64 hotfix 3 crashes | Closed |
09/26/2010 | low | Error attempting to save in C:...../Temp | Closed |
Bugs
Error: IndentationError: unexpected indent
Status | closed |
---|---|
Priority | low |
Date | 09/26/2010 |
Submitted by | tristratos |
I loaded up the plugin (worked fine) and created to sample polygon spheres seperated from each other.
Selected them both (one after the other) and executed the command mentioned
import maya.cmds as cmds
sel = cmds.ls(sl=True, type='transform')
collider = sel[0]
traget = sel[1]
collidershape = cmds.listRelatives(collider, s=True)
collisiondeformer = cmds.deformer(traget, type='jlCollisionDeformer', n='collisionDeformer' )
cmds.connectAttr(collidershape[0]+'.worldMesh[0]',collisiondeformer[0]+'.collider')
cmds.connectAttr(collider+'.matrix',collisiondeformer[0]+'.colliderMatrix')
cmds.connectAttr(collider+'.boundingBox.boundingBoxSize',collisiondeformer[0]+'.colliderBBoxSize')
All I get after this is the following error:
# Error: IndentationError: unexpected indent #
Which makes it unable to make any use of it.
Is there something that I am doing wrong, OR there is a known bug that needs to be fixed.
Please help
Comments on this bug:
-
tristratos said over 14 years ago:
Forgot to mention that it is Maya 2011 with Hotfix 3 Any clue ? -
Jan Lachauer said over 14 years ago:
please check the last line of the script, you got a break in it. it should be: cmds.connectAttr(collider+'.boundingBox.boundingBoxSize',collisiondeformer[0]+'.colliderBBoxSize') also keep in mind that python is format sensitive, perhaps there are some redundant whitespaces, tabs ot breaks in the script you are executing (happens easily when copy-pasting python script) -
Jan Lachauer said over 14 years ago:
added a .mel file to the zip that makes it easier to assign the deformer. Check readme!
Post a comment:
Report a bug
Related Items:
-
Spot Lattice Deformer for Maya 1.1.0 (maya script)
$20.00 (USD) -
FemtoRig 1.5.0 for Maya (maya script)
$220.00 (USD) -
American Flag.zip 3D Model
$25.00 (USD) -
Octopus Rig for Maya 1.0.3
$20.00 (USD) -
PinToCurve 1.10.2 for Maya (maya script)
$20.00 (USD) -
Uv Manage for Maya 1.0.0 (maya script)
$20.00 (USD)