Hi, this is my first post here and also my first time creating a Zplugin.
Im developing a plugin to export Turn Around images of the model for showing advance to supervisors.
Im starting a new document size and creating 4 consecutive snapshots of the model rotating in the canvas. For doing this Im using a Loop that increments the rotation of the TransformSet by 90 degrees Y in each loop, but Im having something weird happening. The TransformSet at 90 and 180 degrees is rotating the model also in Z by 180 degrees and I can not figure why. ( Example image below)
My loop code is this one:
[Loop, 4,
[CanvasClick,0,0,0,4]
/* If it is the last view, turn in only 35 degrees for a 3/4 view */
[If, LoopCount==3,
[TransformSet,
([IGet, "Tool:Turn Around Snapshot:Left Padding"]+(LoopCount*[IGet, "Tool:Turn Around Snapshot:Offset"])),[IGet, "Tool:Turn Around Snapshot:Top Padding"],0,
[IGet, "Tool:Turn Around Snapshot:Scale"],[IGet, "Tool:Turn Around Snapshot:Scale"],[IGet, "Tool:Turn Around Snapshot:Scale"],
0,-35,0
],
//else keep rotating the model 90 degrees for the other views.
[TransformSet,
([IGet, "Tool:Turn Around Snapshot:Left Padding"]+(LoopCount*[IGet, "Tool:Turn Around Snapshot:Offset"])),[IGet, "Tool:Turn Around Snapshot:Top Padding"],0,
[IGet, "Tool:Turn Around Snapshot:Scale"],[IGet, "Tool:Turn Around Snapshot:Scale"],[IGet, "Tool:Turn Around Snapshot:Scale"],
0,LoopCount*90,0
]
]
/* New Polygroup color */
[IPress, "Tool:Polygroups:Group Masked Clear Mask"]
/* Take snapshot */
[IPress, "Transform:Snapshot"]
,LoopCount
]
Im using the sliders values to calculate de offset and scale of each view in the canvas, but the rotation values of TransformSet are the ones causing the problem. As you can see, when is the last view it only rotates the model -35 degrees to get a 3/4 view, but the other 3 views rotation is controled by the counter inside the loop multiplied by 90 degrees (LoopCount*90). So in the first loop rotation in Y is 0, second loop is 90 and third loop 180.
I was curious about why so I incremented the Loop loops (hehe) and something interesting happened. Every two views the rotation is changed also in Z, the 90 and 180 degree ones.
Does someone have a clue about what could be happening here?
Thanks in advance.
Ness.