Notifications
Clear all
[Closed] Retrieving and getting/setting the value of each property of an object
Nov 05, 2021 7:07 pm
I can retrieve all the properties I want from an object by using this command (I’m doing this on a Capsule):
objProperties = (for currProperty in (getpropnames $) collect currProperty)
However the result is returned like this:
#(#height, #smooth, #radius, #sides, #mapcoords, #sliceon, #heighttype, #heightsegs, #slicefrom, #sliceto, #realWorldMapSize)
My goal is the be able to copy all of the attribute-values from one object to another (of identical type), but as I normally do this by using $.height, I don’t know how to deal with #height.
I’m pretty sure I’m missing something trivial here, but my google-skills has failed me, so I was wondering if anyone could point me in the right direction?
2 Replies
Nov 05, 2021 7:07 pm
Is there anything you don’t have the answer to? Thank you again sir, much appreciated!