Good Morning. I’m working Perspective on the 8.0.16 Gateway. I have a script that is copying the
props.elements of an SVG to use elsewhere in the project. When I update my copy of the data, it is also changing the original object’s data, since I’m actually given a reference to the original object, not a copy of the object. How can I go about copying the data without simply receiving a reference to the original object?
#Get the element data from the original object element_adjusted = self.getSibling('test_2').props.elements #Update the information for the new object (also updates the original object) element_adjusted.transform = 'translate(50,0) scale (1.0)' #Write the adjusted data to the new object elements_list.append(element_adjusted) self.getSibling('aggregate_layout').props.elements = elements_list
Thanks in advance!