ScriptSpot

Forum topic · Scripts Wanted

pls fix this script~

By dussla · 2013-12-19

Description

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 (4)

miauu · 2013-12-19

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.

SECOND script error also

dussla · 2013-12-19

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 · 2013-12-19

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

ok i see

dussla · 2013-12-19

thank you good advice
i will try again