Notifications
Clear all

[Closed] ResetTransform inside groups

Hi !

Does anyone knows if it is possible to apply ResetTransform to objects inside a group? If it is, then how?
Currently i’ve been trying things like:

 ResetTransform geometry 
and
ResetTransform helpers

…but well…they don’t do the trick. I guess the transformation gets applied only to main node of the group.

Any help would be kindly appreciated.
suvakas

2 Replies
 PEN

Well this is going to be a bit more of a problem. The reset trasform you are using really doesn’t do the trick in any situation either if it does what I think it does. What you need is the resetXform() call how ever with objects linked this might not do what you expect. You will need to write your own resetXform that takes into account the new pivot transforms of parent objects. Another way to deal with it is to ungroup every thing, reset then regroup. That might be easier unless you really understand your matrix math. Get Bobo’s the Matrix Explained if you are interested in learning more.

Thanks!
Ok. I’m going with ungrouping->reseting->regrouping
Reseting part works quite Ok, but my script doesn’t find all the groups in a scene. It hits some of them, but not all.
This is my code for finding groups:

 for gr in helpers do 
(
if (isgrouphead gr) == true then
(
	 explode gr
	 my reset stuff....blah blah
	 ..and regroup
)
)

Any ideas why it doesn’t find all the groups? There can’t be any nested groups left after explode right? So groups inside groups should be no issue.

Thanks in advance!
Suvakas