pls fix this script~

hell0
thank you always help
there is some problem
object z zero move is good
but group object is not moved well
what problem ?

if $ != undefined then (
ResetPivot $
CenterPivot $
for i in selection do
(
i.pivot = [i.pivot.x, i.pivot.y, i.min.z]
i.pos = [i.pos.x,i.pos.y,0]
)

)
else (
messageBox "Select an object then run this script again." title:"Selection Error" beep:true
)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

For the grouped objects, you

For the grouped objects, you have to move the top parent. Right ow your code will move all objects in the group along with the parent objects, so the result is not what you want.

dussla's picture

SECOND script error also

i made again
but also that is not work

what problem

(
undo "MOVEZEROr" on
(
for i in selection do
(

if i.min.z > 0 then
( i.pos = [i.pos.x,i.pos.y, -1 * i.min.z] )

Else

(i.pos = [i.pos.x,i.pos.y,-1 * i.min.z] )
)
)
)

barigazy's picture

...

If you want to play with that you need to learn everithing about groups, parenting methods etc. MXS Help Document, this forum and CGTalk forum have very nice examples about this topic

barigazy

dussla's picture

ok i see

thank you good advice
i will try again

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.