how to align pivot axis to world?

how to align pivot axis to world?

Waseem_Dabbas
Advocate Advocate
641 Views
4 Replies
Message 1 of 5

how to align pivot axis to world?

Waseem_Dabbas
Advocate
Advocate

Hi,

I want to make a code that aligns the pivot point axis of a selected object/s, or group/s, to the world like the following video

 
0 Likes
Accepted solutions (2)
642 Views
4 Replies
Replies (4)
Message 2 of 5

istan
Advisor
Advisor
Accepted solution
Message 3 of 5

Waseem_Dabbas
Advocate
Advocate

Thank you for answering, I have this simple code that moves the pivot of a selected object/s to the min of the Z axis,

 

 

(
for i in selection do (i.pivot = [i.center.x, i.center.y, i.min.z])
	)

 



so to do what I asked before, I added this line,

 

WorldAlignPivot <node>

 


but didn't know what to put in the node, I apologize for not knowing coding, but I just wanted to add this line if possible.

Thank you



0 Likes
Message 4 of 5

istan
Advisor
Advisor

Sry, I don't understand your question. Don't you know what a node is? Just replace <node> with your node you want to align.

0 Likes
Message 5 of 5

Waseem_Dabbas
Advocate
Advocate
Accepted solution

It works!
As I said, I don't have information about coding. Later, I found out that I need to do the following for the program to work properly.

 

    for i in selection do 
    (
        i.pivot = [i.center.x, i.center.y, i.min.z]
        WorldAlignPivot i
    )

 



I asked the same question a while ago, but I didn't receive the same level of help. I appreciate your cooperation

0 Likes