GreatWhiteShark, вот здесь вот: https://forums.cgsociety.org/t/copy-paste-transform-data/1302176
вот этот вот:
macroScript ObjCopyPaste
category:"K Scripts"
(
try (destroyDialog ObjCopyPaste_Rollout) catch()
rollout ObjCopyPaste_Rollout "ObjT Copy/Paste" width:300
(
label lbl_objects "Objects:" align:#left
dotnetcontrol lst_obj "System.Windows.Forms.Listbox" align:#center height:200
label lbl_transform "Transform:" align:#left width: 275 height:42 style_sunkenedge:true
button btn_save "Save" align:#left across:2
button btn_load "Load" align:#right
button btn_apply "Apply all"
button btn_site "?" align:#center
local xmlPath=getdir(#export) + "\\ObjCopyPaste.xml"
local XML=dotnetobject "System.Xml.XmlDocument"
on objdataT open do
(
lst_obj.HorizontalScrollbar=True
)
on btn_save pressed do
(
if selection.count!=0 then
(
xmlPath=getdir(#export) + "\\ObjCopyPaste.xml"
fileSave=getSaveFileName filename:xmlPath types:"XML File (*.xml)|*.xml"
if fileSave!=undefined then
(
lst_obj.BeginUpdate()
lst_obj.Items.Clear()
---
XML=dotnetobject "System.Xml.XmlDocument"
root=XML.CreateElement "Root"
XML.AppendChild root
for i in selection do
(
xName=XML.CreateElement i.name
xName.InnerText=i.transform as string
root.AppendChild xName
lst_obj.Items.Add i.name
)
XML.Save fileSave
---
lst_obj.EndUpdate()
)
)
)
on btn_load pressed do
(
fileOpen=getOPenFileName filename:xmlPath types:"XML File (*.xml)|*.xml"
if fileOpen!=undefined then
(
lst_obj.BeginUpdate()
lst_obj.Items.Clear()
---
XML.Load fileOpen
root=XML.FirstChild
for i=0 to root.ChildNodes.Count-1 do
(
lst_obj.Items.Add root.ChildNodes.Item[i].name
)
xmlPath=fileOpen
---
lst_obj.SelectedIndex=0
lst_obj.EndUpdate()
)
)
on lst_obj SelectedIndexChanged sender arg do
(
fNode=XML.FirstChild.GetElementsByTagName(lst_obj.SelectedItem)
lbl_transform.text=fNode.Item[0].InnerText
)
on lst_obj DoubleClick sender arg do
(
setCommandPanelTaskMode mode:#create
suspendEditing()
for i in selection do
(
i.transform=execute lbl_transform.text
)
resumeEditing()
)
on btn_apply pressed do
(
if lst_obj.Items.Count!=0 then
(
setCommandPanelTaskMode mode:#create
suspendEditing()
root=XML.FirstChild
for i=0 to root.ChildNodes.Count-1 do
(
try
(
execute ("select $" + root.ChildNodes.Item[i].name)
execute ("$"+ root.ChildNodes.Item[i].name + ".transform=" + root.ChildNodes.Item[i].InnerText)
)
catch (print ("Object " + root.ChildNodes.Item[i].name + " not found"))
)
resumeEditing()
)
)
on btn_site pressed do
(
process=dotnetclass "System.Diagnostics.Process"
process.start "http://www.dimensao3.com/al"
)
)
clearListener()
createDialog ObjCopyPaste_Rollout
)
macroScript ObjCopyPaste category:"K Scripts" ( try (destroyDialog ObjCopyPaste_Rollout) catch() rollout ObjCopyPaste_Rollout "ObjT Copy/Paste" width:300 ( label lbl_objects "Objects:" align: dotnetcontrol lst_obj "System.Windows.Forms.Listbox" align: label lbl_transform "Transform:" align: button btn_save "Save" align: button btn_load "Load" align: button btn_apply "Apply all" button btn_site "?" align: local xmlPath=getdir( local XML=dotnetobject "System.Xml.XmlDocument"on objdataT open do ( lst_obj.HorizontalScrollbar=True ) on btn_save pressed do ( if selection.count!=0then ( xmlPath=getdir( fileSave=getSaveFileName filename:xmlPath types:"XML File (*.xml)|*.xml"if fileSave!=undefinedthen ( lst_obj.BeginUpdate() lst_obj.Items.Clear() --- XML=dotnetobject "System.Xml.XmlDocument" root=XML.CreateElement "Root" XML.AppendChild root for i in selection do ( xName=XML.CreateElement i.name xName.InnerText=i.transform as string root.AppendChild xName lst_obj.Items.Add i.name ) XML.Save fileSave --- lst_obj.EndUpdate() ) ) ) on btn_load pressed do ( fileOpen=getOPenFileName filename:xmlPath types:"XML File (*.xml)|*.xml"if fileOpen!=undefinedthen ( lst_obj.BeginUpdate() lst_obj.Items.Clear() --- XML.Load fileOpen root=XML.FirstChild for i=0 to root.ChildNodes.Count-1do ( lst_obj.Items.Add root.ChildNodes.Item[i].name ) xmlPath=fileOpen --- lst_obj.SelectedIndex=0 lst_obj.EndUpdate() ) ) on lst_obj SelectedIndexChanged sender arg do ( fNode=XML.FirstChild.GetElementsByTagName(lst_obj.SelectedItem) lbl_transform.text=fNode.Item[0].InnerText ) on lst_obj DoubleClick sender arg do ( setCommandPanelTaskMode mode: suspendEditing() for i in selection do ( i.transform=execute lbl_transform.text ) resumeEditing() ) on btn_apply pressed do ( if lst_obj.Items.Count!=0then ( setCommandPanelTaskMode mode: suspendEditing() root=XML.FirstChild for i=0 to root.ChildNodes.Count-1do ( try ( execute ("select $" + root.ChildNodes.Item[i].name) execute ("$"+ root.ChildNodes.Item[i].name + ".transform=" + root.ChildNodes.Item[i].InnerText) ) catch (print ("Object " + root.ChildNodes.Item[i].name + " not found")) ) resumeEditing() ) ) on btn_site pressed do ( process=dotnetclass "System.Diagnostics.Process" process.start "http://www.dimensao3.com/al" ) ) clearListener() createDialog ObjCopyPaste_Rollout )