Just wondering what properties the drawing (.tvg) element has within a scene. I’m trying to extract where the pivot point/origin is within a drawing, or perhaps what the extent of the drawing is from the origin. Sadly, the example file in the sample download doesn’t provide and example of this. I’m really hoping it is possible to extract this data, though.
When you talk of extracting, what are trying to do? Create a script or use the interface to do something?
Which program are you talking about?
If you are just dealing in the normal interface, not doing scripting, the drawing pivot is at the 0 North/South and 0 East/West coordinate by default, in the middle of the 12 field grid. If you move the drawing pivot with the Pivot tool it will visually move the pivot with an offset but that value is not presented anywhere in the interface. It is stored in the TVG file itself and you can’t get that info. I don’t think you can go inside a TVG, it’s a proprietary format like .fla , ai, etc.
Cheers for that.
I am indeed trying to access the properties through scripting. I went through the documentation and found a way to fiddle with grid and so on.
I was hoping there was something I could get from a READ module’s attribute, as the whole propriety nature of .tvg makes it pretty much closed-off in any other way.
Hopefully this other method will allow me to locate where in the image the pivot is.
Thanks for the reply!
Hi, as a reference for other people, I would like to post the way to get the real pivot position of a peg when child drawing’s drawing pivot is applied to the peg.
Note that node.getPivot() function returns the value of the pivot after adding drawing pivot’s and layer pivot’s values together.
var sNode = selection.selectedNode(0);
var sNodePivot = node.getPivot(sNode, frame.current());
//We then access the pivot’s x, y, z positions individually:
var sNodePivotX = sNodePivot.x;