0

I can't figure out what is going on. If you Open Maya 2016 create four nurbsCircles and run this script you've got this:

Shapes changed their location scale and rotation

// MEL

makeIdentity -apply true -t 1 -r 1 -s 1 -n 0 -pn 1 nurbsCircle1 nurbsCircle2 nurbsCircle3 nurbsCircle4 ;
parent -r -s nurbsCircle2|nurbsCircleShape2 nurbsCircle1 ; 
parent -r -s nurbsCircle3|nurbsCircleShape3 nurbsCircle1 ; 
parent -r -s nurbsCircle4|nurbsCircleShape4 nurbsCircle1 ; 

# Python

import maya.cmds as mc

mc.makeIdentity( mc.ls( sl = 1 ), 
                 apply = True,  
                 t = 1, r = 1, s = 1, n = 0 )

mc.parent( 'nurbsCircle3|nurbsCircleShape3',
           'nurbsCircle2|nurbsCircleShape2',
           'nurbsCircle4|nurbsCircleShape4', 
           'nurbsCircle1',s = 1,r = 1 )   
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
Alexey Gapon
  • 73
  • 2
  • 11

1 Answers1

0

The problem is that the shapes which are parented to the same transform are somehow instanced to their previous transforms, and when the script do it job and delete previous transform nodes and shapes even after parenting to the new transform node still change it transformation.

So the solution is: parent all shapes to the one transform node, using parent -add -r -s [objects] then duplicate this new node and only then you can delete all old nodes.

Very confusing but it`s working

Alexey Gapon
  • 73
  • 2
  • 11